/* ------------------------------------------------------------------
   Folio — 视觉系统
   设计稿样式，供验收与工程师落地对照。非正式生产环境样式表。
   字体、留白与照片承担全部表达；不要在此基础上加回卡片、按钮或装饰。
   ------------------------------------------------------------------ */

:root {
  --ink: #1C1916;
  --ink-muted: #6B6560;
  --paper: #F6F3EE;
  --paper-deep: #EDE8E1;
  --rule: rgba(28, 25, 22, 0.14);
  --accent: #8C3A2E;

  --serif: "Source Serif 4", "Noto Serif SC", "Noto Serif CJK SC", serif;
  --sans: "Source Sans 3", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;

  --fs-masthead: 48px;
  --fs-article-title: 42px;
  --fs-page-title: 36px;
  --fs-h2: 23px;
  --fs-home-title: 24px;
  --fs-h3: 19px;
  --fs-standfirst: 19px;
  --fs-pull: 22px;
  --fs-body: 18px;
  --fs-dek: 17px;
  --fs-caption: 12.5px;
  --fs-meta: 12.5px;
  --fs-kicker: 11px;
  --fs-nav: 12px;
  --fs-footer: 12px;

  --lh-body: 1.95;
  --measure: 38rem; /* 608px: ~34em of the 18px body */

  --pad-x: 100px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  --wrap: 1200px;
  --ease: 180ms ease;
}

@media (max-width: 900px) {
  :root {
    --fs-masthead: 34px;
    --fs-article-title: 30px;
    --fs-page-title: 30px;
    --fs-h2: 21px;
    --fs-home-title: 22px;
    --fs-h3: 18px;
    --fs-standfirst: 18px;
    --fs-pull: 20px;
    --fs-body: 17.5px;
    --fs-dek: 16.5px;
    --pad-x: 26px;
    --space-6: 48px;
    --space-7: 64px;
    --space-8: 80px;
  }
}

/* --- Reset ------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-synthesis: none;
  font-kerning: normal;
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease), border-color var(--ease);
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

p, h1, h2, h3, h4, ul, ol, blockquote, figure, figcaption, hr {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

::selection {
  background: rgba(140, 58, 46, 0.18);
  color: var(--ink);
}

/* --- Layout ------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.measure {
  max-width: var(--measure);
}

/* --- Masthead ---------------------------------------------------- */

.masthead {
  padding-top: var(--space-6);
}

.masthead-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.site-name {
  font-family: var(--serif);
  font-size: var(--fs-masthead);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  flex: 0 1 auto;
}

.site-name:hover {
  color: var(--ink);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.85rem;
}

.nav a {
  font-family: var(--sans);
  font-size: var(--fs-nav);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  line-height: 1.4;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: transparent;
}

.nav a[aria-current="page"]:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .masthead {
    padding-top: var(--space-5);
  }

  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-bottom: 1.35rem;
  }

  .nav ul {
    justify-content: flex-start;
    gap: 0.3rem 1.35rem;
  }
}

/* --- Footer ------------------------------------------------------ */

.site-footer {
  margin-top: var(--space-8);
  padding-bottom: var(--space-6);
}

.site-footer-inner {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  font-family: var(--sans);
  font-size: var(--fs-footer);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .site-footer {
    padding-bottom: var(--space-5);
  }

  .site-footer-inner {
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 1.35rem;
  }
}

/* --- Shared page opening ----------------------------------------- */

.page {
  padding-top: var(--space-7);
}

.page-title {
  font-family: var(--serif);
  font-size: var(--fs-page-title);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-note {
  margin-top: 0.7em;
  font-family: var(--sans);
  font-size: var(--fs-kicker);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
}

.kicker {
  font-family: var(--sans);
  font-size: var(--fs-kicker);
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.kicker-latin {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* --- Home lead (featured photograph) ----------------------------- */

.home-lede {
  padding-top: var(--space-7);
  max-width: 16em;
}

.home-lede p {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .home-lede p { font-size: 18px; }
}

.home-lead {
  margin-top: var(--space-7);
}

.lead-figure {
  margin: 0;
}

.lead-figure img {
  display: block;
  width: calc(100% - 32px);
  max-width: none;
  height: auto;
  margin: 0 16px;
}

.lead-figure a {
  display: block;
  border-bottom: 0;
}

.lead-figure a:hover {
  border-bottom: 0;
}

.lead-figure figcaption,
.caption {
  font-family: var(--sans);
  font-size: var(--fs-caption);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  line-height: 1.55;
}

.lead-figure figcaption {
  max-width: var(--wrap);
  margin: 0.9rem auto 0;
  padding: 0 var(--pad-x);
}

.lead-meta {
  margin-top: 1.85rem;
}

.lead-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.lead-title a {
  border-bottom: 1px solid transparent;
}

.lead-title a:hover {
  border-bottom-color: var(--ink);
}

.home-index {
  margin-top: var(--space-8);
  max-width: var(--measure);
}

.home-index .kicker {
  margin-bottom: 0.85rem;
}

@media (max-width: 900px) {
  .lead-figure img {
    width: calc(100% - 16px);
    margin: 0 8px;
  }

  .lead-title {
    font-size: 26px;
  }
}

/* --- Entry lists (home + articles) ------------------------------- */

.entry-list {
  display: flex;
  flex-direction: column;
}

.entry {
  padding: 2.15rem 0;
  border-top: 1px solid var(--rule);
}

.entry:last-child {
  border-bottom: 1px solid var(--rule);
}

.entry-date {
  display: block;
  font-family: var(--sans);
  font-size: var(--fs-meta);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  margin-bottom: 0.55em;
}

.entry-title {
  font-family: var(--serif);
  font-size: var(--fs-home-title);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.entry-title a {
  border-bottom: 1px solid transparent;
}

.entry-title a:hover {
  border-bottom-color: var(--ink);
}

.entry-dek {
  margin-top: 0.55em;
  font-family: var(--serif);
  font-size: var(--fs-dek);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 30em;
}

.year-group {
  margin-top: var(--space-6);
}

.year-group .kicker {
  margin-bottom: 0.85rem;
}

/* --- Article ----------------------------------------------------- */

.article-header {
  max-width: var(--measure);
  padding-bottom: var(--space-6);
}

.article-header .entry-date {
  margin-bottom: 1.15em;
}

.article-title {
  font-family: var(--serif);
  font-size: var(--fs-article-title);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.standfirst {
  margin-top: 1.35em;
  font-family: var(--serif);
  font-size: var(--fs-standfirst);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  max-width: 26em;
}

.prose {
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--ink);
  text-align: left;
  hanging-punctuation: allow-end;
}

.prose p + p {
  margin-top: 0.85em;
}

.prose h2 {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-top: 2.6em;
  margin-bottom: 0.7em;
}

.prose h3 {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-top: 2.1em;
  margin-bottom: 0.55em;
}

.pullquote {
  font-family: var(--serif);
  font-size: var(--fs-pull);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  margin: 2.75em 0;
  padding-left: 1.4em;
  border-left: 1px solid var(--accent);
  max-width: 28em;
}

.article-figure {
  margin: 2.85em -3rem;
  width: calc(100% + 6rem);
  max-width: none;
}

.article-figure img {
  width: 100%;
  height: auto;
}

.article-figure figcaption {
  margin-top: 0.8em;
  font-family: var(--sans);
  font-size: var(--fs-caption);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  line-height: 1.55;
  max-width: 36em;
  margin-left: 3rem;
}

@media (max-width: 900px) {
  .article-figure {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .article-figure figcaption {
    margin-left: 0;
  }
}

/* Featured entry on the article index: one photograph, then typographic list. */
.year-group.year-group-wide {
  max-width: none;
  margin-top: var(--space-6);
}

.year-group-wide > .kicker {
  margin-bottom: 1.5rem;
}

.entry-featured {
  padding: 0 0 var(--space-6);
  border: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}

.entry-featured .index-lead-figure {
  margin: 0 0 1.75rem;
}

.entry-featured .index-lead-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-featured .index-lead-figure a {
  display: block;
  border-bottom: 0;
}

.entry-featured .lead-title {
  font-size: 28px;
}

.entry-featured + .entry-list .entry:first-child {
  border-top: none;
}

@media (max-width: 900px) {
  .entry-featured .lead-title { font-size: 24px; }
}

/* Two-image sequence: more air than a contact sheet. */
.figure-pair {
  margin: 3.5em -3rem 4em;
  width: calc(100% + 6rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.75rem 2rem;
  max-width: none;
}

.figure-pair figure {
  margin: 0;
}

.figure-pair img {
  width: 100%;
  height: auto;
  display: block;
}

.figure-pair figcaption {
  margin-top: 0.8em;
  margin-left: 0;
  font-family: var(--sans);
  font-size: var(--fs-caption);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .figure-pair {
    grid-template-columns: 1fr;
    gap: 2.75rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

/* Video placeholder: same family as a photograph, 16:9 still + typographic mark.
   Lives inside .prose so .article-figure can break the measure the same way. */
.video-demo {
  margin-top: 3.25em;
}

.video-demo .kicker {
  margin-bottom: 1.15rem;
}

.video-figure {
  /* reuses .article-figure width; placed as a sibling after .video-demo kicker */
}

.video-still {
  position: relative;
  display: block;
  line-height: 0;
}

.video-still img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.play-mark {
  position: absolute;
  left: 1.15rem;
  bottom: 1.15rem;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.play-mark svg {
  display: block;
  width: 18px;
  height: 18px;
}

.video-figure.article-figure {
  margin-top: 0;
}

@media (max-width: 900px) {
  .play-mark {
    left: 0.85rem;
    bottom: 0.85rem;
  }
}

.article-nav {
  max-width: var(--measure);
  margin-top: var(--space-7);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.article-nav a,
.back-link {
  font-family: var(--sans);
  font-size: var(--fs-meta);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  border-bottom: 1px solid transparent;
  line-height: 1.5;
}

.article-nav a:hover,
.back-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.article-nav .next {
  text-align: right;
}

/* --- About / Space ----------------------------------------------- */

.about-body,
.space-intro,
.space-coda {
  margin-top: var(--space-6);
}

.split {
  margin-top: var(--space-6);
  max-width: 56rem;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 3.5rem;
  align-items: start;
}

.split-rule {
  background: var(--rule);
  width: 1px;
  min-height: 100%;
  align-self: stretch;
}

.split .kicker {
  margin-bottom: 1rem;
}

.split p:not(.kicker) {
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.85;
  color: var(--ink);
}

.space-coda p + p {
  margin-top: 0.85em;
}

@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: var(--measure);
  }

  .split-rule {
    width: 100%;
    height: 1px;
    min-height: 0;
    max-height: 1px;
    align-self: auto;
    margin: 2.25rem 0;
  }
}

/* --- Specimen (review only) -------------------------------------- */

.specimen-flag {
  margin-top: 1.6rem;
  font-family: var(--sans);
  font-size: var(--fs-kicker);
  color: var(--ink-muted);
  letter-spacing: 0.12em;
}

.specimen {
  padding-bottom: var(--space-4);
}

.specimen-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}

.specimen > header + .specimen-section {
  margin-top: var(--space-7);
}

.specimen-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem 2rem;
  margin-bottom: var(--space-6);
}

.specimen-num {
  font-family: var(--sans);
  font-size: var(--fs-kicker);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.16em;
  flex: 0 0 auto;
}

.specimen-head h2 {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.specimen-intro,
.specimen-note,
.engineer-notes p {
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}

.specimen-note,
.engineer-notes p {
  color: var(--ink);
}

.font-sample {
  margin-top: var(--space-5);
}

.font-sample + .font-sample {
  margin-top: var(--space-7);
}

.font-meta {
  margin-bottom: 1.1rem;
}

.font-meta p {
  font-family: var(--sans);
  font-size: var(--fs-meta);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.font-meta .name {
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: none;
  font-weight: 500;
}

.sample-display {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.sample-sans-display {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.sample-mixed {
  margin-top: 1.5rem;
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.sample-labels {
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: var(--fs-meta);
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  line-height: 1.8;
}

.ramp {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.ramp-item {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem 2rem;
  align-items: baseline;
}

.ramp-spec {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  line-height: 1.55;
}

.ramp-spec strong {
  display: block;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.08em;
  margin-bottom: 0.2em;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 1.6rem;
}

.swatch-block {
  width: 7.4rem;
}

.swatch {
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid var(--rule);
  margin-bottom: 0.85rem;
}

.swatch-ink { background: var(--ink); }
.swatch-ink-muted { background: var(--ink-muted); }
.swatch-paper { background: var(--paper); }
.swatch-paper-deep { background: var(--paper-deep); }
.swatch-rule {
  background: var(--paper);
  position: relative;
}
.swatch-rule::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  top: 50%;
  height: 1px;
  background: var(--rule);
}
.swatch-accent { background: var(--accent); }

.swatch-block h3 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 0.2em;
}

.swatch-block p {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.space-scale {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.75rem 2.25rem;
}

.space-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.space-bar {
  width: 4.5rem;
  background: var(--paper-deep);
}

.space-bar-wrap span {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}

.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 4rem;
  max-width: 52em;
}

.dos-donts h3 {
  font-family: var(--sans);
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.dos-donts.donts-head h3,
.dos-col + .donts-col h3 {
  color: var(--ink);
}

.dos-donts li {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  padding: 0.85em 0;
  border-top: 1px solid var(--rule);
  color: var(--ink);
}

.dos-donts li:last-child {
  border-bottom: 1px solid var(--rule);
}

.token-list {
  margin-top: var(--space-5);
  max-width: 40em;
}

.token-list li {
  display: grid;
  grid-template-columns: 11rem 18rem 1fr;
  gap: 0.75rem 1.25rem;
  padding: 0.7em 0;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.token-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.token-list .t-name { color: var(--ink); font-weight: 500; }
.token-list .t-val { color: var(--ink); font-variant-numeric: tabular-nums; }
.token-list .t-use { color: var(--ink-muted); }

.engineer-notes p + p {
  margin-top: 0.85em;
}

@media (max-width: 720px) {
  .sample-display { font-size: 36px; }
  .sample-sans-display { font-size: 22px; }

  .ramp-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .dos-donts {
    grid-template-columns: 1fr;
    gap: 2.5rem 0;
  }

  .token-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Specimen uses the same masthead language, but is not a public page.
   Keep chrome consistent so the system can be judged in situ. */
