/* OBJEKT catalog - the spec sheet's own furniture, set in the system's
   vocabulary. The system itself lives in objekt-core.css; nothing here is a
   component an implementer should copy. Same print rules: no radius, no blur,
   no gradient as a blend, no opacity effects. */

/* ---------- masthead: a lead label strip pinned under the frame ---------- */

.mast {
  position: sticky; top: var(--frame-w); z-index: 30;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 8px 12px 8px 16px;
  background: var(--stock-lead); color: var(--ink-on-lead);
  /* paint the frame band above the strip, so the sheet never shows
     through the gap between the frame edge and the pinned strip */
  box-shadow: 0 calc(-1 * var(--frame-w)) 0 var(--frame);
}
.mast :focus-visible { outline-color: var(--ink-on-lead); }
.mast-word {
  font-family: var(--font-display); font-size: 22px; line-height: 1;
  text-transform: uppercase; letter-spacing: -0.01em; text-decoration: none; color: inherit;
}
.mast-idx { display: flex; flex-wrap: wrap; gap: 2px 14px; flex: 1; }
.mast-idx a {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-on-lead-2); text-decoration: none;
  padding: 3px 0; border-bottom: 1px solid transparent;
}
.mast-idx a:hover { color: var(--ink-on-lead); border-bottom-color: currentColor; }
.mast .btn { font-size: 12px; padding: 6px 12px 5px; }
.mast .btn:focus-visible { outline-color: var(--ink-on-lead); }
/* on the lead strip the lift shadow has to be drawn in the strip's own ink */
.mast .btn:hover { box-shadow: 4px 4px 0 var(--ink-on-lead-2); }
.mast .btn:active { box-shadow: none; }

/* ---------- thesis ---------- */

.hero-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 220px));
  gap: clamp(12px, 2.4vw, 26px); justify-content: center; align-items: stretch;
}
.thesis {
  max-width: 1010px; margin: 34px auto 0;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 32px;
  align-items: start;
}
.thesis h1 { font-size: clamp(38px, 5.6vw, 64px); }
.thesis p { font-size: 15px; line-height: 1.55; max-width: 60ch; }
.thesis p + p { margin-top: 12px; }
.thesis-copy { padding-top: 4px; }
.thesis-copy .rule { margin-bottom: 16px; }

/* ---------- read this first: handling instructions ---------- */

.brief { padding: 18px 20px 20px; box-shadow: var(--lift); margin-top: clamp(40px, 6vw, 64px); }
.brief-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brief-head h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 26px; line-height: 1; }
.brief ol { list-style: none; counter-reset: brief; }
.brief li {
  counter-increment: brief;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px;
  padding: 9px 0; border-top: 1px solid currentColor;
  font-size: 14px; line-height: 1.5;
}
.brief li::before {
  content: "0" counter(brief);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  border: 1.5px solid currentColor; text-align: center; align-self: start; padding: 3px 0 2px;
}

/* ---------- section body ---------- */

.lede { font-size: 16px; line-height: 1.5; max-width: 64ch; margin-bottom: 22px; }
.lede + .lede { margin-top: -10px; }
code {
  font-family: var(--font-mono); font-size: 0.86em; letter-spacing: 0.02em;
  background: var(--stock-base); color: var(--ink); padding: 0 3px;
}
.stock-lead code, .sec-head code { background: var(--ink-on-lead); color: var(--stock-lead); }

.sub-cap {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; margin: 30px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.sub-cap::after { content: ""; flex: 1; height: 1px; background: currentColor; }

/* the "why" label: mark stock, a lead tab, a thick rule on top */
.callout {
  margin-top: 24px; padding: 14px 16px 16px;
  border-top: var(--rule-w) solid var(--ink);
  box-shadow: 4px 4px 0 var(--shade);
  font-size: 14px; line-height: 1.55;
}
.callout-tag {
  display: inline-block; margin-right: 10px;
  background: var(--stock-lead); color: var(--ink-on-lead);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 3px 7px 2px; vertical-align: 2px;
}
.callout p { max-width: 72ch; }
.note { font-size: 14px; line-height: 1.55; max-width: 70ch; margin-top: 16px; }

.g-plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.g-plates-wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.stack-14 > * + * { margin-top: 14px; }
.stack-22 > * + * { margin-top: 22px; }
.states-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.states-row + .plate-cap { margin-top: 18px; }

/* ---------- colour: day / night swatches ---------- */

.duo { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.swatch { padding: 10px; box-shadow: 4px 4px 0 var(--shade); }
.swatch .halves { display: grid; grid-template-columns: 1fr 1fr; height: 58px; border: 1.5px solid var(--ink); }
.swatch .halves i { display: block; }
.swatch .halves i + i { border-left: 1.5px solid var(--ink); }
.swatch-cap { display: grid; gap: 3px; margin-top: 8px; }
.swatch-cap .nm { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; font-weight: 700; }
.swatch-cap .role { font-size: 12.5px; line-height: 1.4; }
.swatch-cap .hex {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; color: var(--c-ink-2);
}

.swatch-plate { display: flex; flex-direction: column; min-height: 190px; }
.swatch-plate .t-display { font-size: clamp(28px, 3.6vw, 40px); }
.swatch-plate .rule { margin: 10px 0; }
.swatch-rows { margin-top: auto; }
.swatch-rows .r { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.swatch-rows .tk { text-transform: none; }

/* token tables: the system's spec table, with a head and a prose column */
.spec-table.tok thead th {
  font-family: var(--font-mono); font-weight: 400; font-size: 9px;
  letter-spacing: 0.14em; color: var(--c-ink-2); padding-top: 8px;
}
.spec-table.tok td { text-align: left; text-transform: none; }
.spec-table.tok td:first-child { white-space: nowrap; }
.spec-table.tok td.v { white-space: nowrap; }
.spec-table.tok td.d {
  font-family: var(--font-fine); text-transform: none; letter-spacing: 0;
  font-size: 13px; line-height: 1.45;
}
.spec-table.tok td.d b { font-weight: 700; }
.spec-table.tok td.demo { width: 34%; vertical-align: middle; }

/* ---------- type ---------- */

.voice-display { font-size: clamp(42px, 6vw, 74px); }
.voice-note { margin-top: 12px; }
.type-ladder > * { padding: 12px 0; border-bottom: 1px solid currentColor; }
.type-ladder > *:first-child { border-top: var(--rule-w) solid currentColor; }
.type-ladder .lbl { display: block; margin-bottom: 6px; }
.sp-strip { font-family: var(--font-display); text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; font-size: clamp(56px, 7.2vw, 92px); }
.sp-sec { font-family: var(--font-display); text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; font-size: clamp(20px, 3vw, 30px); }
.sp-stamp { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; font-size: 14px; }
.sp-value { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; }
.sp-label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; font-size: 9px; }
.sp-digits { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.28em; font-size: 9px; }
.sp-body { font-size: 14px; line-height: 1.45; }

/* ---------- space and form ---------- */

.scale-bar { height: 10px; background: currentColor; }
.edge-demo { height: 34px; background: var(--stock-base); }
.lift-demo { height: 34px; background: var(--stock-base); border: 1.5px solid var(--ink); }
.lift-demo.rest-6 { box-shadow: 6px 6px 0 var(--shade); }
.lift-demo.rest-4 { box-shadow: 4px 4px 0 var(--shade); }
.lift-demo.lifted { box-shadow: var(--lift); transform: translate(-2px, -2px); }
.corner-demo { width: 44px; height: 34px; border: 2px solid var(--ink); background: var(--stock-base); }

/* ---------- screen: the thermal head and its static fallback ---------- */

.shader-row { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shader-cell { display: flex; flex-direction: column; gap: 10px; }
.shader-stage {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--stock-base);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--shade);
}
.shader-stage canvas {
  display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none;
  opacity: 0; /* transparent until the first frame lands - then it simply appears, print does not fade */
}
/* The fallback IS the design: an unprinted sheet of die-cut labels, drawn
   from the same two tokens the shader reads. The gradients are hard-stop line
   generators, one pixel of die line and nothing blended. Label pitch matches
   the shader: 34 x 22 dots of 4px. */
#thermalFallback, .shader-stage.is-fallback {
  background-color: var(--stock-base);
  background-image:
    linear-gradient(to right, var(--ink-dis) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ink-dis) 1px, transparent 1px);
  background-size: 136px 88px;
}
.shader-cap {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--c-ink-2);
}

/* ---------- motifs ---------- */

.draw-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }
.draw-gallery figure { display: flex; flex-direction: column; gap: 8px; }
.draw-gallery .tdraw { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
/* uniform figure height so stroke weight reads consistently across drawings */
.draw-gallery .tdraw svg { width: auto; height: 170px; max-width: 100%; }
.draw-gallery figcaption {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--c-ink-2);
}
.rule-demo > * + * { margin-top: 22px; }
.strip-solo { display: flex; gap: 24px; align-items: stretch; flex-wrap: wrap; }
.strip-solo .strip { flex: 0 0 220px; }
.strip-solo .note { flex: 1 1 280px; margin-top: 0; }

/* ---------- composition ---------- */

.app-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.app-head { display: flex; align-items: baseline; gap: 14px; padding: 10px 14px 8px; margin-bottom: 16px; }
.app-head .t-display { font-size: clamp(26px, 3.4vw, 38px); }
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.app-actions .field { flex: 0 1 120px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- rules: pass / rejected ---------- */

.dodont { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.dodont > div { padding: 16px 18px 18px; box-shadow: 4px 4px 0 var(--shade); }
.dodont .verdict {
  display: inline-block; margin-bottom: 12px;
  font-family: var(--font-display); font-size: 22px; text-transform: uppercase; line-height: 1;
  border: 2px solid currentColor; padding: 5px 10px 4px;
}
.dodont ul { list-style: none; }
.dodont li { padding: 8px 0; border-top: 1px solid currentColor; font-size: 14px; line-height: 1.5; }

/* ---------- foot ---------- */

.sheet-foot { margin-top: clamp(48px, 7vw, 84px); text-align: center; }
.sheet-foot .barcode { max-width: 260px; margin: 26px auto 0; }
.sheet-foot .t-display { font-size: clamp(30px, 5vw, 52px); margin-top: 18px; }
.sheet-foot .t-data { margin-top: 10px; max-width: 70ch; margin-left: auto; margin-right: auto; }
.sheet-foot .btn { margin-top: 22px; }
.sheet-foot .rule { max-width: 420px; margin: 0 auto; }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 220px)); }
}
@media (max-width: 820px) {
  .thesis { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: minmax(0, 220px); }
  .app-grid { grid-template-columns: minmax(0, 1fr); }
  .mast-idx { order: 3; flex-basis: 100%; }
  .mast .btn { margin-left: auto; }
  .brief li { grid-template-columns: 36px minmax(0, 1fr); }
}

/* A four-column spec sheet cannot fit a phone without crushing every cell to
   one word per line. Below 640px it scrolls inside its own frame instead of
   pushing the whole sheet sideways. */
@media (max-width: 640px) {
  .spec-table.tok { display: block; overflow-x: auto; }
}
