/* Gong Tiejing — personal identity, second edition (2026)
   One typeface family (EB Garamond, SIL OFL 1.1). No framework, no build step. */

:root {
  --ink: #1C1A17;
  --ink-2: #2B2824;
  --vellum: #F4EFE6;
  --paper: #FBF8F2;
  --oxblood: #5C1F24;
  --oxblood-deep: #44161A;
  --stone: #625A4F;
  --rule: #D3C8B6;
  --dim: #C9C1B3;        /* secondary text on ink */
  --rule-dark: #47423B;  /* hairlines on ink */
  --brass: #A2854F;      /* screen reference for brass foil; decorative only */

  --serif: "EB Garamond", Garamond, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --han: "Noto Serif SC", "Songti SC", "STSong", serif;

  --margin: clamp(20px, 4.2vw, 64px);
  --measure: 34em;
  --sec: clamp(88px, 11vw, 160px);
  --max: 1320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--vellum);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  font-feature-settings: "onum" 1, "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* paper: an almost invisible fibre, 2 KB, no image request */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .31 0 0 0 0 .24 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
p + p { margin-top: .75em; }
em, i { font-style: italic; }
.sc { font-variant-caps: all-small-caps; letter-spacing: .08em; font-weight: 500; font-feature-settings: "lnum" 1; }
.han { font-family: var(--han); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
.mute { color: var(--stone); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 9; }

/* ---------------------------------------------------------------- masthead */
.mast { border-bottom: 1px solid var(--rule); z-index: 10; }
.mast .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.mast .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mast .brand img { height: 24px; width: auto; }
.mast .brand span { font-variant-caps: small-caps; letter-spacing: .06em; font-size: 19px; font-weight: 500; }
.mast nav { display: flex; gap: clamp(16px, 2.2vw, 30px); }
.mast nav a { text-decoration: none; font-size: 16px; }
.mast nav a:hover { text-decoration: underline; }
.mast details { display: none; }

/* ---------------------------------------------------------------- title page */
.title { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.title .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.title .mark img { width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.title .kicker { color: var(--stone); font-size: 16px; }
.title h1 { margin: 28px 0 30px; }
.title h1 img { width: 100%; max-width: 640px; height: auto; }
.title .role { font-style: italic; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.25; }
.title hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0 20px; max-width: 640px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 28px; font-size: 19px; }
.facts dt { color: var(--stone); font-size: 16px; padding-top: 2px; }
.title .note { margin-top: 28px; max-width: 30em; color: var(--stone); font-style: italic; font-size: 18px; }

.contents { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.contents ol { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.contents li a { display: grid; grid-template-columns: 2.6em 1fr; padding: 18px 16px 18px 0; text-decoration: none; line-height: 1.3; }
.contents li a b { font-weight: 500; }
.contents li a small { display: block; color: var(--stone); font-style: italic; font-size: 16px; margin-top: 2px; }
.contents .num { color: var(--oxblood); font-variant-caps: small-caps; letter-spacing: .04em; }

/* ---------------------------------------------------------------- sections */
.sec { padding: var(--sec) 0 0; }
.sec:last-of-type { padding-bottom: var(--sec); }
.head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; align-items: baseline; margin-bottom: clamp(40px, 5vw, 72px); }
.head .num { color: var(--oxblood); font-size: 18px; }
.head h2 { font-weight: 500; font-size: clamp(38px, 4.8vw, 66px); line-height: 1.04; letter-spacing: -.005em; }
.head h2 + p { margin-top: 18px; max-width: var(--measure); font-size: clamp(20px, 1.6vw, 23px); line-height: 1.5; color: var(--ink); }
.cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; }
.side { color: var(--stone); font-size: 17px; line-height: 1.5; }
.side .sc { display: block; color: var(--ink); margin-bottom: 6px; font-size: 15px; }
.prose { max-width: var(--measure); }
h3 { font-weight: 500; font-size: 26px; line-height: 1.2; margin-bottom: 14px; }
.label { color: var(--stone); font-size: 15px; font-variant-caps: all-small-caps; letter-spacing: .09em; font-weight: 500; font-feature-settings: "lnum" 1; }
figcaption { color: var(--stone); font-size: 16px; font-style: italic; margin-top: 12px; line-height: 1.4; }
.rule-top { border-top: 1px solid var(--rule); padding-top: 28px; }

/* I — mark */
.mark-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.mark-split .prose p:first-child::first-letter { font-weight: 500; }
.sizes { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; align-items: end; }
.sizes .row { display: flex; align-items: flex-end; gap: clamp(20px, 3.5vw, 52px); flex-wrap: wrap; }
.sizes figure { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.sizes figure .px { font-size: 14px; color: var(--stone); font-feature-settings: "lnum" 1, "tnum" 1; }
.sizes .chip { background: var(--oxblood); display: grid; place-items: center; }

/* II — name */
.name-plate { background: var(--paper); border: 1px solid var(--rule); padding: clamp(40px, 8vw, 120px) clamp(20px, 6vw, 96px); }
.name-plate img { width: 100%; height: auto; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; font-size: 18px; line-height: 1.55; }
.lockups { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; margin-top: clamp(56px, 7vw, 96px); }
.lockups figure > div { background: var(--paper); border: 1px solid var(--rule); display: grid; place-items: center; padding: clamp(28px, 5vw, 64px); min-height: 100%; }
.lockups figure { display: flex; flex-direction: column; min-width: 0; }
.lockups figure > div > img { width: 100%; height: auto; }
.lockups figure > div { flex: 1; }
.han-name { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; margin-top: clamp(56px, 7vw, 96px); align-items: center; }
.han-name .big { font-family: var(--han); font-weight: 600; font-size: clamp(56px, 8vw, 112px); letter-spacing: .2em; line-height: 1; }
.han-name .grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }

/* III — versions */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; background: var(--rule); border: 1px solid var(--rule); }
.tile { background: var(--paper); padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 300px; }
.tile .art { flex: 1; display: grid; place-items: center; }
.tile .art img { max-height: 170px; width: auto; }
.tile.w2 { grid-column: span 2; } .tile.w3 { grid-column: span 3; } .tile.w4 { grid-column: span 4; }
.tile.dark { background: var(--ink); color: var(--vellum); }
.tile.dark .label { color: var(--dim); }
.tile.pure { background: #fff; } .tile.black { background: #000; color: #fff; }
.tile.black .label { color: #bbb; } .tile.pure .label { color: #444; }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; font-size: 18px; line-height: 1.5; }
.rules table { width: 100%; border-collapse: collapse; font-feature-settings: "lnum" 1, "tnum" 1; }
.rules td { padding: 7px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.rules td + td { text-align: right; color: var(--stone); padding-left: 12px; }
.rules ul { list-style: none; }
.rules li { padding: 7px 0; border-top: 1px solid var(--rule); }
.clear { background: var(--paper); border: 1px solid var(--rule); padding: 20px; display: grid; place-items: center; }

/* IV — colour */
.ratio { display: flex; height: 120px; border: 1px solid var(--rule); }
.ratio > div { display: flex; align-items: flex-end; padding: 12px; font-size: 14px; font-feature-settings: "lnum" 1, "tnum" 1; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 32px; margin-top: 56px; }
.sw .chip { height: 132px; border: 1px solid rgba(28, 26, 23, .12); margin-bottom: 14px; }
.sw h3 { font-size: 24px; margin-bottom: 2px; }
.sw dl { display: grid; grid-template-columns: 5.2em 1fr; font-size: 16px; line-height: 1.5; font-feature-settings: "lnum" 1, "tnum" 1; margin-top: 8px; }
.sw dt { color: var(--stone); }
.sw p { font-size: 17px; line-height: 1.45; }
.pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.pair { padding: 22px; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(28, 26, 23, .12); }
.pair b { font-weight: 500; font-size: 30px; line-height: 1; }
.pair small { font-size: 15px; font-feature-settings: "lnum" 1, "tnum" 1; }
.pair.no { background: var(--ink); color: var(--oxblood); position: relative; }
.pair.no small { color: var(--dim); }
.metal { margin-top: 40px; font-size: 18px; }

/* V — type */
.specimen { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: clamp(32px, 5vw, 64px) 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.specimen .aa { font-size: clamp(88px, 14vw, 200px); line-height: .9; font-weight: 500; letter-spacing: -.01em; }
.specimen .aa i { font-weight: 400; color: var(--oxblood); }
.specimen .cast { font-size: 22px; line-height: 1.6; word-break: break-all; color: var(--stone); }
.scale { width: 100%; border-collapse: collapse; margin-top: 48px; }
.scale th { text-align: left; font-weight: 500; color: var(--stone); font-size: 15px; font-variant-caps: all-small-caps; letter-spacing: .09em; padding: 0 16px 10px 0; }
.scale td { border-top: 1px solid var(--rule); padding: 16px 16px 16px 0; vertical-align: baseline; font-size: 17px; font-feature-settings: "lnum" 1, "tnum" 1; }
.scale td:first-child { width: 42%; font-feature-settings: "onum" 1; }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.figs .f { font-size: 30px; line-height: 1.3; }

/* VI — applications */
.dark-band { background: var(--ink); color: var(--vellum); padding: var(--sec) 0 clamp(64px, 8vw, 112px); margin-top: var(--sec); }
.dark-band .head .num { color: var(--brass); }
.dark-band .head h2 + p { color: var(--vellum); }
.dark-band .label, .dark-band figcaption { color: var(--dim); }
.avatars { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.av-row { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; }
.av-row img { border-radius: 50%; box-shadow: 0 0 0 1px var(--rule-dark); }
.chat { background: #EDEDED; color: #111; border-radius: 6px; overflow: hidden; font-family: -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif; font-size: 15px; max-width: 420px; }
.chat .row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: #fff; border-bottom: 1px solid #E5E5E5; }
.chat .row img, .chat .ph { width: 48px; height: 48px; border-radius: 6px; }
.chat .ph { background: #C8CCD0; }
.chat .ph.b { background: #9DB3A3; } .chat .ph.c { background: #D2BFA6; }
.chat b { font-weight: 500; display: block; font-size: 16px; }
.chat span { color: #888; font-size: 13px; }
.chat time { color: #aaa; font-size: 12px; align-self: start; }

.app { padding-top: clamp(64px, 8vw, 112px); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: start; }
.stock { box-shadow: 0 1px 1px rgba(28, 26, 23, .08), 0 10px 30px -10px rgba(28, 26, 23, .35); background: var(--paper); }
.stock img { width: 100%; height: auto; }
.actual { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-top: 28px; }
.actual .stock { width: 3.5in; }
.sig { background: #fff; color: #222; padding: 28px; border: 1px solid var(--rule); }
.pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.pages .stock { aspect-ratio: 8.5 / 11; }
.spec { margin-top: 18px; font-size: 16px; line-height: 1.5; color: var(--stone); }
.spec b { color: var(--ink); font-weight: 500; }
.more { display: inline-block; margin-top: 14px; font-size: 17px; }

/* VII — assets */
.assets { width: 100%; border-collapse: collapse; }
.assets th { text-align: left; font-weight: 500; color: var(--stone); font-size: 15px; font-variant-caps: all-small-caps; letter-spacing: .09em; padding: 0 16px 10px 0; }
.assets td { border-top: 1px solid var(--rule); padding: 16px 16px 16px 0; vertical-align: middle; font-size: 18px; }
.assets td:first-child { width: 88px; }
.assets td .thumb { width: 64px; height: 64px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--rule); }
.assets td .thumb img { max-width: 46px; max-height: 46px; }
.assets td a { white-space: nowrap; }
.assets .links a + a::before { content: " · "; color: var(--rule); text-decoration: none; display: inline-block; padding: 0 .3em; }
.zip { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--rule); padding: 24px 28px; margin-bottom: 40px; }
.button { display: inline-block; background: var(--oxblood); color: var(--vellum); padding: 12px 22px; text-decoration: none; font-size: 18px; }
.button:hover { background: var(--oxblood-deep); color: var(--vellum); }

/* colophon */
.colophon { border-top: 1px solid var(--rule); padding: 56px 0 72px; font-size: 16px; line-height: 1.55; color: var(--stone); }
.colophon .wrap { display: grid; grid-template-columns: minmax(0, 3fr) repeat(3, minmax(0, 3fr)); gap: 32px; }
.colophon img { height: 44px; width: auto; }
.colophon b { color: var(--ink); font-weight: 500; display: block; margin-bottom: 4px; }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  .title .mark img { animation: settle 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .title .text { animation: settle 1.1s .12s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  a, .button { transition: color .2s, background-color .2s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1080px) {
  .mast nav { display: none; }
  .mast details { display: block; position: relative; }
  .mast summary { list-style: none; cursor: pointer; font-variant-caps: all-small-caps; letter-spacing: .09em; font-weight: 500; font-size: 17px; padding: 8px 0; }
  .mast summary::-webkit-details-marker { display: none; }
  .mast details[open] nav { display: flex; flex-direction: column; gap: 0; position: absolute; right: 0; top: 46px; background: var(--paper); border: 1px solid var(--rule); padding: 8px 22px; min-width: 220px; z-index: 5; }
  .mast details[open] nav a { padding: 10px 0; border-top: 1px solid var(--rule); }
  .mast details[open] nav a:first-child { border-top: 0; }
  .contents ol { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile.w3 { grid-column: span 2; }
  .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colophon .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 720px) {
  body { font-size: 19px; line-height: 1.55; }
  .mast .wrap { height: 64px; }
  .title { padding-top: 28px; }
  .title .wrap { grid-template-columns: 1fr; gap: 20px; }
  .title .mark img { max-width: 62%; margin: 0; }
  .title h1 { margin: 18px 0 18px; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 10px; }
  .contents ol { grid-template-columns: 1fr; }
  .contents li + li a { border-top: 1px solid var(--rule); }
  .head, .cols, .sizes, .han-name { grid-template-columns: 1fr; gap: 12px; }
  .head { margin-bottom: 28px; }
  .mark-split, .avatars, .lockups, .cards, .pages, .specimen, .figs { grid-template-columns: minmax(0, 1fr); }
  .trio, .rules { grid-template-columns: 1fr; gap: 20px; }
  .han-name .grid { grid-template-columns: 1fr; }
  .lockups figure > div { min-height: 0; flex: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { grid-column: span 1; min-height: 190px; padding: 18px; }
  .tile.w4 { grid-column: span 2; }
  .tile .art img { max-height: 110px; }
  .swatches { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .sw .chip { height: 72px; }
  .sw h3 { font-size: 21px; } .sw p { font-size: 15px; } .sw dl { grid-template-columns: 1fr; font-size: 14px; } .sw dt { margin-top: 4px; }
  .assets td.links::before { content: attr(data-l); display: inline-block; min-width: 2.6em; color: var(--stone); font-size: 13px; font-variant-caps: all-small-caps; letter-spacing: .08em; }
  .ratio { height: 96px; } .ratio > div { font-size: 11px; padding: 6px; }
  .pairs { grid-template-columns: 1fr 1fr; gap: 10px; } .pair { min-height: 130px; padding: 16px; } .pair b { font-size: 24px; }
  .scale thead { display: none; }
  .scale tr { display: block; border-top: 1px solid var(--rule); padding: 14px 0; }
  .scale td { display: block; border: 0; padding: 2px 0; width: auto !important; }
  .assets thead { display: none; }
  .assets tr { display: grid; grid-template-columns: 72px 1fr; gap: 4px 14px; border-top: 1px solid var(--rule); padding: 14px 0; }
  .assets td { border: 0; padding: 0; font-size: 17px; }
  .assets td:first-child { grid-row: span 3; width: auto; }
  .assets td a { white-space: normal; }
  .actual .stock { width: 3.5in; max-width: 100%; }
  .colophon .wrap { grid-template-columns: 1fr; }
}

@media print {
  body::before, .mast, .contents { display: none; }
  .dark-band { background: none; color: var(--ink); }
}
