:root {
  color-scheme: light;
  --page: #f3f2ed;
  --ink: #222721;
  --secondary: #515b53;
  --rule: #c5c9bf;
  --paper: #f8f7f3;
  --graphite: #181c22;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
.defs { position: absolute; pointer-events: none; }
.inner { width: min(1216px,100%); padding-inline: clamp(16px,4vw,48px); margin: auto; }
.top { border-bottom: 1px solid var(--rule); }
.top .inner, .top nav, .heading, .columns > div, .label-title, .signature, .tone, .tiny, .base-color,
.sample-foot { display: flex; align-items: center; }
.top .inner, .heading, .columns > div, .sample-foot { justify-content: space-between; }
.top .inner { min-height: 65px; gap: 12px; }
.top nav { gap: 9px; }
a, label { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 5px; cursor: pointer; }
a { padding-inline: 10px; color: var(--ink); text-underline-offset: 4px; }
.sheet { padding-block: 32px 24px; }
.heading { gap: 16px; margin-bottom: 27px; align-items: flex-end; }
h1 { margin: 0; font-size: clamp(36px,5vw,57px); line-height: 1.05; font-weight: 650; letter-spacing: -.045em; }
h2 { font-size: clamp(20px,2.1vw,26px); line-height: 1.2; margin: 0; font-weight: 620; letter-spacing: -.035em; }
.heading p { margin: 10px 0 0; font-size: clamp(15px,2vw,18px); color: var(--secondary); }
fieldset { position: relative; margin: 0; padding: 3px; border: 1px solid var(--rule); border-radius: 7px; display: inline-flex; gap: 2px; flex-shrink: 0; }
legend, input { width: 1px; height: 1px; overflow: hidden; position: absolute; clip-path: inset(50%); }
label { padding-inline: 12px; font-size: 14px; }
label:has(input:checked) { background: var(--ink); color: white; }
label:has(input:focus-visible), a:focus-visible { outline: 3px solid #996125; outline-offset: 3px; }
@media(hover:hover) and (pointer:fine) {
  a:hover, label:not(:has(input:checked)):hover { background: #e2e4d9; }
  label:has(input:checked):hover { background: #405043; }
}
a:active, label:active { box-shadow: inset 0 0 0 2px #9a7347; }
.columns, .row { display: grid; grid-template-columns: minmax(164px,.72fr) repeat(2,minmax(0,1.8fr)); }
.columns { font-size: 14px; border-top: 1px solid #8f978a; }
.columns > div { padding: 10px clamp(12px,2vw,24px); }
.columns > div:first-child { padding-left: 0; }
.columns code { font: 12px var(--mono); color: var(--secondary); }
.rows { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.row + .row { border-top: 1px solid var(--rule); }
.label { display: flex; flex-direction: column; justify-content: center; gap: 11px; padding: 15px 12px 15px 0; }
.label-title { gap: 12px; }
.key { font: 13px var(--mono); color: #535c53; }
.base-color { margin-left: 21px; gap: 8px; font: 13px var(--mono); }
.base-color i, .tone i { width: 12px; height: 12px; background: var(--base); border-radius: 2px; flex-shrink: 0; }
.sample { min-width: 0; padding: 15px clamp(12px,2.35vw,30px) 10px; }
.sample.light { --pigment: var(--light-ink); color: #222721; background: var(--paper); border-left: 1px solid #d5d7cd; }
.sample.dark { --pigment: var(--dark-ink); color: #f4f4eb; background: var(--graphite); }
.signature { gap: clamp(12px,1.8vw,20px); justify-content: center; min-height: 70px; }
.primary-mark { width: 68px; height: 68px; flex-shrink: 0; }
.word { width: 135px; height: 35px; max-width: 100%; }
.primary-mark, .small-mark { color: var(--pigment); }
.sample-foot { margin-top: 5px; gap: 6px; }
.tone, .tiny { gap: 7px; font: 12px var(--mono); }
.tone i { background: var(--pigment); width: 8px; height: 8px; }
.tiny { color: #596257; font-size: 11px; }
.dark .tiny { color: #b1b7bc; }
.small-mark { height: 24px; width: 24px; }
.note { padding: 0; margin: 16px 0 0; color: var(--secondary); font-size: 14px; }
.mobile-caption, .fixed, .save-fixed { display: none; }
body:has(input[value="base"]:checked) .sample { --pigment: var(--base); }
body:has(input[value="base"]:checked) .adaptive { display: none; }
body:has(input[value="base"]:checked) .fixed { display: inline; }
body:has(input[value="base"]:checked) .save-fixed { display: inline-flex; }
body:has(input[value="base"]:checked) .save-adaptive { display: none; }
@media(max-width:760px) {
  .inner { padding-inline: clamp(12px,3.5vw,24px); }
  .heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .sheet { padding-top: 24px; }
  .columns { display: none; }
  .row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .label { grid-column: 1/-1; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 0; }
  .label-title { gap: 9px; }
  .base-color { margin: 0; }
  .rows { border-bottom: none; }
  .row + .row { border-top: 0; margin-top: 8px; }
  .sample { padding: 9px clamp(8px,2.3vw,16px); }
  .sample.light { border: 1px solid #d2d5cb; }
  .mobile-caption { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 12px; }
  .mobile-caption span { font: 10px var(--mono); opacity: .8; }
  .signature { gap: clamp(5px,2vw,13px); min-height: 64px; }
  .primary-mark { width: clamp(30px,9vw,60px); height: clamp(30px,9vw,60px); }
  .word { width: clamp(61px,19.5vw,116px); height: auto; aspect-ratio:118/30; flex-shrink: 1; }
  .tone, .tiny { font-size: 10px; gap: 4px; }
  .tiny span { display: none; }
  .top nav { gap: 0; font-size: 13px; }
  .top nav a { padding-inline: 6px; }
}
@media print {
  .top, fieldset { display: none; }
  * { print-color-adjust: exact; }
  .sheet { padding-top: 30px; }
  .heading { margin-bottom: 24px; }
}

@media(max-width:480px) {
  .top .inner { flex-wrap:wrap; gap:2px; padding-block:8px; }
  .top nav { flex-wrap:wrap; }
}
