/* ============================================================
   Forma - Cyanotype Studio
   Every workshop is documented as a cyanotype specimen sheet.
   Plain HTML/CSS. No build, no runtime CDN.
   ============================================================ */

/* ---------- Fonts (locally hosted) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper:        #e7eef1;  /* cool blueprint paper */
  --paper-soft:   #dde7ea;
  --paper-deep:   #d2dde2;
  --sheet:        #eef3f5;
  --ink:          #102a43;  /* deep ink blue, body text */
  --ink-soft:     #36506b;
  --ink-faint:    #6f8398;
  --cy:           #1b4e89;  /* cyanotype blue - the one accent */
  --cy-deep:      #103a66;
  --cy-bright:    #2a6bb0;
  --cy-pale:      #c5d6e2;
  --line:         rgba(27, 78, 137, 0.16);
  --line-strong:  rgba(27, 78, 137, 0.42);
  --grid:         rgba(27, 78, 137, 0.07);
  --shadow:       0 18px 40px -22px rgba(16, 42, 67, 0.45);
  --radius:       4px;     /* drafting: near-square corners. Containers/controls 4px; tiny inline marks 1-2px. */
  --gutter:       clamp(16px, 4vw, 40px);
  --maxw:         1240px;
  --sans:         "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:         "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  /* faint drafting grid */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px, 30px 30px;
  background-position: -1px -1px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible {
  outline: 2.5px solid var(--cy-bright);
  outline-offset: 2px;
  border-radius: 2px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: var(--paper);
  border-bottom: 1.5px solid var(--cy);
  backdrop-filter: saturate(1.1);
}
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.brand__mark {
  font-family: var(--sans); font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--cy-deep);
  display: inline-flex; align-items: center; gap: 10px;
}
.brand__mark::before {
  content: ""; width: 22px; height: 22px; flex: none;
  background:
    linear-gradient(var(--cy), var(--cy)) center/100% 1.5px no-repeat,
    linear-gradient(var(--cy), var(--cy)) center/1.5px 100% no-repeat;
  border: 1.5px solid var(--cy);
  /* a tiny drafting crosshair square */
  transform: rotate(45deg);
}
.brand__sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 520px) { .brand__sub { display: none; } }

/* Saved-filter toggle (proof sheet) */
.proof {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 14px 9px 12px;
  background: var(--sheet);
  color: var(--ink);
  border: 1.5px solid var(--cy);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.proof::before {
  content: ""; width: 12px; height: 12px; flex: none;
  border: 1.5px solid var(--cy);
  border-radius: 1px;
  background: transparent;
  transition: background .18s ease;
}
.proof:hover { transform: translateY(-1px); }
.proof:active { transform: translateY(0); }
.proof[aria-pressed="true"] {
  background: var(--cy-deep); color: var(--sheet);
  border-color: var(--cy-deep);
}
.proof[aria-pressed="true"]::before {
  background: var(--sheet); border-color: var(--sheet);
}
.proof__count {
  font-variant-numeric: tabular-nums;
  padding-left: 6px; border-left: 1px solid var(--line-strong);
  margin-left: 2px;
}
.proof[aria-pressed="true"] .proof__count { border-color: rgba(238,243,245,.5); }

/* ---------- Intro / hero strip ---------- */
.intro {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(28px, 6vw, 56px) var(--gutter) clamp(18px, 3vw, 30px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
@media (max-width: 820px) { .intro { grid-template-columns: 1fr; gap: 18px; align-items: start; } }
.intro__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(30px, 5.4vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.intro__title em {
  font-style: italic; font-weight: 700; color: var(--cy-deep);
  /* italic descender clearance for 'g' in 'light' */
  padding-bottom: 0.14em;
}
.intro__lede {
  margin: 0;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-soft);
  max-width: 46ch;
  padding-bottom: 4px;
}
.intro__stamp {
  grid-column: 1 / -1;
  margin-top: 16px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-strong);
  background: var(--paper-soft);
}
.stamp-cell {
  padding: 9px 12px;
  border-right: 1px solid var(--line-strong);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.stamp-cell:last-child { border-right: 0; }
.stamp-k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
}
.stamp-v {
  font-family: var(--mono); font-size: 12px; color: var(--cy-deep); font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 560px) {
  .intro__stamp { grid-template-columns: repeat(2, 1fr); }
  .stamp-cell:nth-child(2n) { border-right: 0; }
  .stamp-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line-strong); }
}

/* ---------- Controls bar ---------- */
.controls {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter) 6px;
  display: flex; flex-wrap: wrap; align-items: end; gap: 18px 22px;
  justify-content: space-between;
}
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 260px; max-width: 460px; }
.field--search { flex: 1 1 320px; }
.field__label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-faint);
}
.field__label b { color: var(--cy-deep); font-weight: 700; }
.input, .select {
  appearance: none;
  font-family: var(--mono); font-size: 14px;
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--cy);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  transition: box-shadow .16s ease, background .16s ease;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus, .select:focus { outline: none; box-shadow: 0 0 0 3px rgba(27,78,137,.18); }
.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cy) 50%),
    linear-gradient(135deg, var(--cy) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.controls__count {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint);
  white-space: nowrap;
  margin-left: auto;
}
.controls__count b { color: var(--cy-deep); font-weight: 700; font-size: 14px; }

/* ---------- Specimen grid ---------- */
.grid-wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px var(--gutter) 80px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}

/* The blueprint card */
.card {
  position: relative;
  background: var(--sheet);
  border: 1.5px solid var(--cy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 16px;
  display: flex; flex-direction: column;
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s ease, border-color .22s ease;
  /* blueprint corner brackets drawn via gradients */
}
.card::before {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  border-radius: 2px;
  background-image:
    linear-gradient(var(--cy), var(--cy)),
    linear-gradient(var(--cy), var(--cy)),
    linear-gradient(var(--cy), var(--cy)),
    linear-gradient(var(--cy), var(--cy)),
    linear-gradient(var(--cy), var(--cy)),
    linear-gradient(var(--cy), var(--cy)),
    linear-gradient(var(--cy), var(--cy)),
    linear-gradient(var(--cy), var(--cy));
  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
  background-size:
    14px 1.5px, 1.5px 14px,
    14px 1.5px, 1.5px 14px,
    14px 1.5px, 1.5px 14px,
    14px 1.5px, 1.5px 14px;
  background-repeat: no-repeat;
  opacity: .65;
  transition: opacity .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -24px rgba(16,42,67,.55); }
.card:hover::before { opacity: 1; }
.card:focus-within::before { opacity: 1; }

/* subtle per-card tilt for variance (disabled on small screens + reduced motion) */
.card:nth-child(3n)   { transform: rotate(-1.1deg); }
.card:nth-child(3n+1) { transform: rotate(0.7deg); }
.card:nth-child(3n+2) { transform: rotate(-0.4deg); }
.card:nth-child(3n):hover,
.card:nth-child(3n+1):hover,
.card:nth-child(3n+2):hover { transform: translateY(-4px) rotate(0deg); }
@media (max-width: 640px) {
  .card, .card:nth-child(3n), .card:nth-child(3n+1), .card:nth-child(3n+2) { transform: none; }
  .card:hover { transform: translateY(-3px); }
}

/* Cyanotype photo */
.card__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cy-pale);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 14px;
}
.card__photo img {
  width: 100%; height: 100%; object-fit: cover;
  /* duotone cyanotype: grayscale -> multiply blue backdrop produces blue monotone */
  filter: grayscale(1) contrast(1.12) brightness(1.06);
  mix-blend-mode: multiply;
  transform: scale(1.01);
  transition: filter .3s ease, transform .4s ease;
}
.card:hover .card__photo img { transform: scale(1.05); }
/* paper-white highlight wash to push lights toward paper */
.card__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(238,243,245,.35), rgba(27,78,137,.06) 60%, rgba(16,58,102,.18));
  mix-blend-mode: screen;
  pointer-events: none;
}
/* corner registration ticks on photo */
.card__photo::before {
  content: ""; position: absolute; inset: 7px; z-index: 2; pointer-events: none;
  background-image:
    linear-gradient(rgba(238,243,245,.8), rgba(238,243,245,.8)),
    linear-gradient(rgba(238,243,245,.8), rgba(238,243,245,.8)),
    linear-gradient(rgba(238,243,245,.8), rgba(238,243,245,.8)),
    linear-gradient(rgba(238,243,245,.8), rgba(238,243,245,.8));
  background-position: 0 0, 0 0, 100% 0, 100% 0;
  background-size: 10px 1px, 1px 10px, 10px 1px, 1px 10px;
  background-repeat: no-repeat;
  opacity: .55;
}

.card__cat {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cy-deep);
  margin-bottom: 6px;
}
.card__title {
  margin: 0 0 10px;
  font-weight: 700; font-size: 21px; line-height: 1.1;
  letter-spacing: -0.01em; color: var(--ink);
}
.card__open {
  display: block; text-align: left; width: 100%;
  background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; color: inherit;
}
.card__open:hover .card__title { color: var(--cy-deep); }

/* dimension line under title */
.card__dim {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 12px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.card__dim::before, .card__dim::after {
  content: ""; height: 1px; flex: 1; background: var(--line-strong);
}
.card__dim span { white-space: nowrap; }

.card__meta {
  margin-top: auto;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 14px;
  font-family: var(--mono); font-size: 12px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 10px;
}
.card__meta dt { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }
.card__meta dd { margin: 0; color: var(--ink); text-align: right; font-weight: 700; }
.card__meta .price { color: var(--cy-deep); }

.card__openlink {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cy-deep);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.card__openlink::after {
  content: ""; width: 16px; height: 1.5px; background: var(--cy);
  box-shadow: 0 -5px 0 var(--cy), 0 5px 0 var(--cy);
  /* little open-sheet arrow made of ticks */
}

/* saved card state */
.card[data-saved="true"] {
  border-color: var(--cy-deep);
  box-shadow: 0 24px 50px -24px rgba(16,58,102,.6), inset 0 0 0 1px var(--cy-deep);
}
.card[data-saved="true"] .clip {
  position: absolute; top: -6px; right: 16px; z-index: 3;
  width: 22px; height: 30px;
  background: var(--cy-deep);
  border-radius: 4px;
  box-shadow: 0 4px 6px -2px rgba(16,42,67,.5);
}
.card[data-saved="true"] .clip::after {
  content: "CLIPPED";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-90deg);
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.2em;
  color: var(--sheet); white-space: nowrap;
}
.card[data-saved="true"] .clip::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 2px;
  background: var(--sheet); opacity: .55;
}

/* entrance stagger */
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(14px) rotate(0deg); }
  to   { opacity: 1; }
}
.grid .card { animation: sheet-in .5s cubic-bezier(.16,1,.3,1) both; }
.grid .card:nth-child(1) { animation-delay: .03s; }
.grid .card:nth-child(2) { animation-delay: .07s; }
.grid .card:nth-child(3) { animation-delay: .11s; }
.grid .card:nth-child(4) { animation-delay: .15s; }
.grid .card:nth-child(5) { animation-delay: .19s; }
.grid .card:nth-child(6) { animation-delay: .23s; }
/* preserve hover tilt baseline: animation 'to' sets rotate 0, then transform via nth-child overrides after animation */
.grid .card:nth-child(3n)   { animation-name: sheet-in-tilt-neg; }
.grid .card:nth-child(3n+1) { animation-name: sheet-in-tilt-pos; }
.grid .card:nth-child(3n+2) { animation-name: sheet-in-tilt-slight; }
@keyframes sheet-in-tilt-neg   { from { opacity:0; transform: translateY(14px) rotate(-1.1deg);} to { opacity:1; transform: rotate(-1.1deg);} }
@keyframes sheet-in-tilt-pos   { from { opacity:0; transform: translateY(14px) rotate(0.7deg);}  to { opacity:1; transform: rotate(0.7deg);} }
@keyframes sheet-in-tilt-slight{ from { opacity:0; transform: translateY(14px) rotate(-0.4deg);} to { opacity:1; transform: rotate(-0.4deg);} }

/* ---------- Empty state ---------- */
.empty {
  max-width: 560px; margin: 10px auto 0;
  text-align: left;
  background: var(--sheet);
  border: 1.5px solid var(--cy);
  border-radius: var(--radius);
  padding: 40px clamp(20px, 4vw, 44px);
  position: relative;
}
.empty::before {
  content: "NO SHEET FOUND";
  position: absolute; top: 14px; right: 16px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--ink-faint);
}
.empty h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: var(--ink); }
.empty p { margin: 0 0 22px; color: var(--ink-soft); max-width: 44ch; }
.empty .reset {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--cy-deep); color: var(--sheet);
  border: 1.5px solid var(--cy-deep);
  border-radius: var(--radius);
  padding: 11px 16px; cursor: pointer;
  transition: background .16s ease, transform .12s ease;
}
.empty .reset:hover { background: var(--cy); }
.empty .reset:active { transform: translateY(1px); }

/* ---------- Detail dialog (specimen sheet) ---------- */
dialog {
  border: 0; padding: 0; background: transparent; margin: 0; max-width: none; max-height: none;
}
dialog::backdrop { background: rgba(16,42,67,.62); backdrop-filter: blur(2px); }
.sheet-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: safe center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(16,42,67,.62);
  backdrop-filter: blur(2px);
  overflow: auto;
}
.sheet {
  position: relative;
  width: min(1080px, 100%);
  background: var(--sheet);
  color: var(--ink);
  border: 1.5px solid var(--cy-deep);
  border-radius: 4px;
  box-shadow: 0 40px 90px -30px rgba(16,42,67,.7);
  /* inner blueprint grid on the sheet itself */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  animation: sheet-pop .34s cubic-bezier(.16,1,.3,1) both;
}
@keyframes sheet-pop {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.sheet__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--cy);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint);
}
.sheet__bar b { color: var(--cy-deep); font-weight: 700; }
.sheet__close {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--sheet); color: var(--ink);
  border: 1.5px solid var(--cy);
  border-radius: var(--radius);
  padding: 8px 12px; cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.sheet__close:hover { background: var(--cy-deep); color: var(--sheet); }
.sheet__close::before {
  content: ""; width: 12px; height: 12px; flex: none;
  background:
    linear-gradient(var(--cy), var(--cy)) center/100% 1.5px no-repeat,
    linear-gradient(var(--cy), var(--cy)) center/1.5px 100% no-repeat;
  transform: rotate(45deg);
}
.sheet__close:hover::before { background: var(--sheet); }

.sheet__body {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(18px, 3vw, 36px);
  padding: clamp(18px, 3vw, 30px);
}
@media (max-width: 820px) { .sheet__body { grid-template-columns: 1fr; } }

.sheet__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cy-pale);
  border: 1.5px solid var(--cy);
  overflow: hidden;
  border-radius: 4px;
}
.sheet__photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(1.06);
  mix-blend-mode: multiply;
}
.sheet__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(238,243,245,.32), rgba(27,78,137,.05) 60%, rgba(16,58,102,.2));
  mix-blend-mode: screen; pointer-events: none;
}
/* dimension ticks framing the photo */
.sheet__photo .tick {
  position: absolute; background: var(--cy-deep); z-index: 2; pointer-events: none;
}
.sheet__photo .tick.tl-h, .sheet__photo .tick.tr-h { top: 8px; width: 16px; height: 1.5px; }
.sheet__photo .tick.tl-v, .sheet__photo .tick.tr-v { top: 8px; width: 1.5px; height: 16px; }
.sheet__photo .tick.bl-h, .sheet__photo .tick.br-h { bottom: 8px; width: 16px; height: 1.5px; }
.sheet__photo .tick.bl-v, .sheet__photo .tick.br-v { bottom: 8px; width: 1.5px; height: 16px; }
.sheet__photo .tick.tl-h, .sheet__photo .tick.tl-v { left: 8px; }
.sheet__photo .tick.tr-h, .sheet__photo .tick.tr-v { right: 8px; }
.sheet__photo .tick.bl-h, .sheet__photo .tick.bl-v { left: 8px; }
.sheet__photo .tick.br-h, .sheet__photo .tick.br-v { right: 8px; }

.sheet__content { display: flex; flex-direction: column; min-width: 0; }
.sheet__cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cy-deep);
  margin-bottom: 10px;
}
.sheet__title {
  margin: 0 0 14px;
  font-weight: 700; font-size: clamp(28px, 4vw, 42px); line-height: 1.04;
  letter-spacing: -0.02em; color: var(--ink);
}
.sheet__body-copy {
  margin: 0 0 22px;
  font-size: clamp(15px, 1.6vw, 17px); line-height: 1.6; color: var(--ink-soft);
  max-width: 52ch;
  border-left: 2px solid var(--cy);
  padding-left: 14px;
}

.sheet__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  border: 1.5px solid var(--cy);
  transition: background .16s ease, color .16s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--save { background: var(--sheet); color: var(--cy-deep); }
.btn--save::before {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 9px;
  border: 1.5px solid var(--cy); border-radius: 1px; vertical-align: -1px;
  transition: background .16s ease, border-color .16s ease;
}
.btn--save:hover { background: var(--cy-pale); }
.btn--save[aria-pressed="true"] {
  background: var(--cy-deep); color: var(--sheet); border-color: var(--cy-deep);
}
.btn--save[aria-pressed="true"]::before { background: var(--sheet); border-color: var(--sheet); }

/* Engineering title block (the drafting motif made literal) */
.titleblock {
  grid-column: 1 / -1;
  margin-top: 6px;
  border: 1.5px solid var(--cy-deep);
  border-radius: 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--paper-soft);
  overflow: hidden;
}
.titleblock .cell {
  padding: 12px 14px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.titleblock .cell:nth-child(4n) { border-right: 0; }
.titleblock .cell:nth-last-child(-n+4) { border-bottom: 0; }
.titleblock .label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
}
.titleblock .value {
  font-family: var(--mono); font-size: 14px; color: var(--ink); font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.titleblock .value.price { color: var(--cy-deep); }
@media (max-width: 560px) {
  .titleblock { grid-template-columns: repeat(2, 1fr); }
  .titleblock .cell:nth-child(4n) { border-right: 1px solid var(--line-strong); }
  .titleblock .cell:nth-child(2n) { border-right: 0; }
  .titleblock .cell:nth-last-child(-n+4) { border-bottom: 1px solid var(--line-strong); }
  .titleblock .cell:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1.5px solid var(--cy);
  background: var(--paper-soft);
}
.foot__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
}
.foot__inner b { color: var(--cy-deep); font-weight: 700; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card, .card:nth-child(3n), .card:nth-child(3n+1), .card:nth-child(3n+2) { transform: none !important; }
}

/* keyboard-nav helpers hidden until needed */
[hidden] { display: none !important; }
