/* Pastel Labs test pages: the hub's "Colorman's Deck" outer frame only (catalog header, one field-note sheet, footer).
   Tokens from pastel-labs-site DESIGN.md / colormans-deck.css. No fan, flip, bloom or deal-in motion. Fonts self-hosted, same origin (SIL OFL). */
@font-face { font-family: "Bodoni Moda Variable"; font-style: normal; font-display: swap; font-weight: 400 900; src: url("fonts/bodoni-moda-latin-opsz-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Spectral"; font-style: normal; font-display: swap; font-weight: 400; src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-display: swap; font-weight: 400; src: url("fonts/spectral-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-display: swap; font-weight: 600; src: url("fonts/spectral-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat Variable"; font-style: normal; font-display: swap; font-weight: 400 700; src: url("fonts/caveat-latin-wght-normal.woff2") format("woff2-variations"); }

:root {
  --lamp: #16130e;
  --bone: #ece3d0;
  --bone-2: #d9cfb8;
  --stock: #e7ddc6;
  --unprinted-stock: #efe7d4;
  --ink: #221c14;
  --ink-2: #4a4032;
  --ochre: #c39238;
  --hairline: rgba(34, 28, 20, 0.28);
  --margin-ink: #7a4b22;
  --font-display: "Bodoni Moda Variable", "Didot", "Bodoni MT", serif;
  --font-body: "Spectral", "Georgia", serif;
  --font-hand: "Caveat Variable", cursive;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --frame: min(74rem, calc(100% - 3rem));
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--lamp); color-scheme: dark; -webkit-text-size-adjust: 100%; scrollbar-color: #4a4136 var(--lamp); }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background:
    radial-gradient(1100px 700px at 82% -10%, rgba(195, 146, 56, 0.1), transparent 62%),
    radial-gradient(900px 900px at 8% 112%, rgba(51, 84, 156, 0.08), transparent 60%),
    var(--lamp);
  color: var(--bone); font-family: var(--font-body); font-size: 1.05rem; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ochre); color: var(--lamp); }

/* Skip link */
.deck-skip { position: absolute; top: 0.75rem; left: 0.75rem; z-index: 100; transform: translateY(-300%); background: var(--bone); color: var(--lamp); font-weight: 600; font-size: 0.95rem; padding: 0.55rem 0.9rem; border-radius: 0.4rem; text-decoration: none; }
.deck-skip:focus-visible { transform: translateY(0); outline: 2px solid var(--ochre); outline-offset: 2px; }

/* Catalog header */
.deck-header { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap; width: var(--frame); margin: 0 auto; padding: 1.3rem 0 0; }
.deck-wordmark { display: inline-flex; flex-direction: column; gap: 0.15rem; text-decoration: none; }
.deck-wordmark-name { font-family: var(--font-display); font-variation-settings: "opsz" 96; font-weight: 650; font-size: 1.35rem; letter-spacing: 0.06em; color: var(--bone); }
.deck-wordmark-line { font-style: italic; font-size: 0.95rem; color: var(--bone-2); }
.deck-nav, .deck-footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.deck-nav a, .deck-footer-nav a { font-size: 0.95rem; color: var(--bone-2); text-decoration: underline; text-decoration-color: rgba(236, 227, 208, 0.35); text-underline-offset: 0.22em; text-decoration-thickness: 1px; padding: 0.35rem 0; }
.deck-nav a:hover, .deck-footer-nav a:hover { color: var(--bone); text-decoration-color: var(--ochre); }
.deck-nav a:focus-visible, .deck-footer-nav a:focus-visible, .deck-wordmark:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 2px; }

/* The one field-note sheet */
.deck-main { flex: 1; width: var(--frame); margin: 0 auto; }
.deck-sheet {
  width: min(56rem, 100%); margin: clamp(1rem, 3vh, 2rem) auto clamp(1.5rem, 4vh, 3rem);
  padding: clamp(1.6rem, 4vw, 2.75rem) clamp(1.4rem, 4.5vw, 3rem);
  background: linear-gradient(168deg, rgba(255, 252, 240, 0.5), rgba(255, 252, 240, 0) 34%), var(--stock);
  color: var(--ink);
  border-radius: 15px 13px 17px 12px / 13px 17px 12px 15px;
  border: 1px solid rgba(236, 227, 208, 0.14);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.42), 0 26px 44px rgba(0, 0, 0, 0.5);
}
.deck-sheet a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ochre); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.deck-sheet a:hover { color: #000; text-decoration-thickness: 3px; }
.deck-sheet :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.filed { font-family: var(--font-hand); font-size: 1.3rem; line-height: 1.2; color: var(--margin-ink); transform: rotate(-1.5deg); transform-origin: left center; margin: 0 0 0.4rem; }
h1 { font-family: var(--font-display); font-variation-settings: "opsz" 96; font-weight: 600; font-size: clamp(2rem, 4.5vw, 2.7rem); line-height: 1.06; letter-spacing: -0.015em; margin: 0 0 0.9rem; color: var(--ink); text-wrap: balance; }
h2 { font-family: var(--font-display); font-variation-settings: "opsz" 36; font-weight: 620; font-size: 1.5rem; line-height: 1.15; margin: 2rem 0 0.5rem; color: var(--ink); }
h3 { font-family: var(--font-display); font-variation-settings: "opsz" 36; font-weight: 620; font-size: 1.2rem; line-height: 1.2; margin: 1.3rem 0 0.4rem; color: var(--ink); }
.lede p { margin: 0 0 1rem; font-size: 1.02rem; line-height: 1.65; }
.lede p:first-child { font-size: 1.16rem; line-height: 1.6; }
.anchor-note { font-size: 0.95rem; color: var(--ink-2); margin: 0.2rem 0 0; }
.soon { font-weight: 600; color: var(--ink); }

/* Controls: a lighter slip inside the sheet */
.panel, .card { background: var(--unprinted-stock); border: 1px solid var(--hairline); border-radius: 3px; }
.panel { padding: 1.15rem; margin: 1.5rem 0 1.25rem; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.75rem; }
button { font: inherit; font-weight: 600; font-size: 1.02rem; min-height: 3rem; padding: 0.6rem 1rem; border-radius: 3px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; touch-action: manipulation; }
button:hover:not(:disabled) { background: rgba(34, 28, 20, 0.07); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: var(--ink); border-color: var(--ink); color: var(--stock); }
button.primary:hover:not(:disabled) { background: #000; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.98rem; padding: 0.35rem 0; cursor: pointer; }
.check input, .opts input[type=checkbox] { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--ink); flex: none; }
.monitor { margin-top: 1rem; }
#status { font-weight: 600; font-size: 1.05rem; margin: 0 0 0.45rem; }
#step { font-size: 0.92rem; color: var(--ink-2); min-height: 1.4em; margin-top: 0.35rem; }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 0.55rem; border: 1px solid var(--hairline); border-radius: 2px; background: var(--stock); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: var(--stock); }
progress::-webkit-progress-value { background: var(--ink); }
progress::-moz-progress-bar { background: var(--ink); }
details { border-top: 1px solid var(--hairline); margin-top: 1rem; }
details > summary { cursor: pointer; font-weight: 600; padding: 0.7rem 0; }
details[open] > summary { padding-bottom: 0.4rem; }
input[type=number], select { font: inherit; font-size: 1rem; padding: 0.3rem 0.5rem; border: 1.5px solid var(--ink-2); border-radius: 3px; background: var(--unprinted-stock); color: var(--ink); min-height: 2.5rem; }
.opts label { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; padding: 0.3rem 0; font-size: 0.98rem; }
#visit, #env { font-size: 0.9rem; color: var(--ink-2); overflow-wrap: anywhere; }
#visit { margin: 0 0 0.8rem; }

/* Results */
.results { min-width: 0; }
.results > div:not(:empty) { overflow-x: auto; }
.card { padding: 0.9rem 1rem; margin: 0.9rem 0; overflow-x: auto; }
.card > b:first-child { font-family: var(--font-display); font-variation-settings: "opsz" 36; font-weight: 620; font-size: 1.1rem; }
.pass, .skip { color: var(--ink); font-weight: 600; }
.fail { color: var(--margin-ink); font-weight: 600; }
.note { font-size: 0.9rem; color: var(--ink-2); }
table { border-collapse: collapse; font-family: var(--font-body); font-size: 0.9rem; margin: 0.6rem 0 1rem; font-variant-numeric: lining-nums tabular-nums; min-width: 100%; color: var(--ink); }
th, td { padding: 0.38rem 0.6rem; text-align: right; border-bottom: 1px solid var(--hairline); white-space: nowrap; color: var(--ink); }
th { font-weight: 600; border-bottom: 1.5px solid var(--ink); }
td:first-child, th:first-child { text-align: left; white-space: normal; }
td.fail, td.skip { white-space: normal; text-align: left; min-width: 16rem; max-width: 28rem; overflow-wrap: anywhere; }
td.fail { color: var(--margin-ink); }
pre { font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 18rem; overflow: auto; background: var(--unprinted-stock); color: var(--ink); padding: 0.8rem; border: 1px solid var(--hairline); border-radius: 3px; }

/* Glossary */
.glossary dl { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: 0.5rem 1.25rem; margin: 0.25rem 0 0.5rem; font-size: 0.98rem; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; }

/* Footer */
.deck-footer { width: var(--frame); margin: clamp(1rem, 4vh, 2.5rem) auto 0; padding: 1.4rem 0 1.8rem; border-top: 1px solid rgba(236, 227, 208, 0.14); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem 1.5rem; flex-wrap: wrap; }
.deck-colophon { font-size: 0.92rem; color: var(--bone-2); max-width: 34rem; margin: 0; }
.deck-colophon + .deck-colophon { flex-basis: 100%; max-width: none; order: 3; overflow-wrap: anywhere; }

@media (max-width: 44rem) {
  .deck-sheet { padding: 1.4rem 1.15rem 1.6rem; }
  .actions { grid-template-columns: 1fr 1fr; }
  .glossary dl { grid-template-columns: 1fr; gap: 0.1rem; }
  .glossary dd { margin-bottom: 0.6rem; }
}
