/* ═══════════════════════════════════════════════════════════════════════════
   DRAFTING.CSS — "The Drawing Package" · NANOWHITE FROST
   Portfolio-as-engineering-drawing-set, reskinned as white/grey glassmorphism.
   Nanowhite desk · frosted-glass sheets · silver hairlines · graphite ink.
   Think machined aluminum, gallery walls, silver renders. No canvas loops,
   no blend-mode overlays, no glows — static backdrop, cheap compositing.

   Layer classes (body): hide-dims · hide-stamps · hide-hatch · hide-crosshair
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Desk + glass + ink */
  --desk: #EEF0F3;                       /* nanowhite background */
  --paper: rgba(255, 255, 255, 0.62);    /* frosted pane fill */
  --paper-2: rgba(21, 23, 27, 0.035);    /* recessed cells / table headers */
  --paper-solid: #F7F8FA;                /* solid chip backing (dims, code) */
  --ink: #17181B;
  --ink-dim: rgba(23, 24, 27, 0.72);
  --ink-faint: rgba(23, 24, 27, 0.47);
  --ink-ghost: rgba(23, 24, 27, 0.28);
  --line: rgba(23, 24, 27, 0.14);        /* interior hairlines */
  --line-soft: rgba(23, 24, 27, 0.07);
  --frame: rgba(23, 24, 27, 0.22);       /* sheet border ink */
  --silver: #C9CED6;                     /* machined edge highlight */

  /* Accent — graphite ink (Tweaks can swap to steel blue / safety orange) */
  --accent: #17181B;
  --accent-soft: rgba(23, 24, 27, 0.055);
  --accent-line: rgba(23, 24, 27, 0.32);
  --accent-glow: rgba(23, 24, 27, 0.10);
  --stamp: #9A6B32;                      /* in-work amber, muted */
  --ok: #3E7454;                         /* released green, muted */
  --ok-line: rgba(62, 116, 84, 0.45);
  --warm-line: rgba(154, 107, 50, 0.45);

  /* Type */
  --sans: "Barlow", "Helvetica Neue", system-ui, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --script: "Caveat", cursive;

  /* Metrics */
  --sheet-max: 1400px;
  --gutter: 22px;                 /* zone gutter between frame and inner frame */
  --pad: clamp(26px, 4.2vw, 62px);
  --speed: 1;

  /* Frost + radius scale */
  --frost: 64px;                   /* backdrop blur radius (Tweaks slider). Lowered
                                      from 128px: the band width of the sheets'
                                      backdrop-filter re-raster flicker scales with
                                      this radius, so a smaller kernel = smaller band. */
  --r-xl: 24px;                   /* sheets */
  --r-lg: 16px;                   /* minis, divider, inner chrome */
  --r-md: 12px;                   /* tables, specs, figs, listings */
  --r-sm: 10px;                   /* buttons, stamps */
  --r-xs: 7px;                    /* chips, small cells */
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.crosshair-on main { cursor: crosshair; }

/* Static backdrop — soft silver washes + faint drafting grid.
   One fixed layer, painted once; the frosted panes sample it. */
#backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(238, 240, 243, 0.15), rgba(234, 236, 239, 0.35)),
    url("media/backgrounds/bright-swirl.webp") center 30% / cover no-repeat;
  transition: opacity 0.5s ease;
}
#backdrop::after {
  content: none;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, black 40%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 50% 40%, black 40%, transparent 100%);
}
main { position: relative; z-index: 1; }

/* ═══ DARK MODE — night sky backdrop, glowing frosted edges ═══════════════ */
body.dark-mode {
  --desk: #0A0D14;
  --paper: rgba(18, 22, 32, 0.30);
  --paper-2: rgba(210, 220, 240, 0.05);
  --paper-solid: #10131C;
  --ink: #EEF1F6;
  --ink-dim: rgba(238, 241, 246, 0.78);
  --ink-faint: rgba(238, 241, 246, 0.52);
  --ink-ghost: rgba(238, 241, 246, 0.30);
  --line: rgba(210, 220, 245, 0.16);
  --line-soft: rgba(210, 220, 245, 0.08);
  --frame: rgba(220, 228, 248, 0.30);
  --accent: #8FB8FF;
  --accent-soft: rgba(143, 184, 255, 0.10);
  --accent-line: rgba(143, 184, 255, 0.5);
  --accent-glow: rgba(143, 184, 255, 0.45);
  --stamp: #FFC98A;
  --ok: #7FE3B2;
  --ok-line: rgba(127, 227, 178, 0.5);
  --warm-line: rgba(255, 201, 138, 0.5);
  background: var(--desk);
}
body.dark-mode #backdrop {
  background:
    linear-gradient(180deg, rgba(4, 6, 12, 0.1), rgba(4, 6, 12, 0.45)),
    url("media/backgrounds/dark-swirl.webp") center 35% / cover no-repeat;
}
body.dark-mode #backdrop::after { background-image: none; }
body.dark-mode ::selection { background: var(--accent); color: #0A0D14; }

/* Frosted panes — thinner, glassier, edges glow like lit acrylic */
body.dark-mode .set-tabs {
  background: rgba(12, 16, 26, 0.10);
  border-color: rgba(210, 224, 255, 0.16);
  outline-color: rgba(210, 224, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(143, 184, 255, 0.10), 0 0 24px rgba(143, 184, 255, 0.16), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}
body.dark-mode .set-tabs .brand,
body.dark-mode .set-tabs nav a.active { color: var(--ink); }
body.dark-mode .set-tabs nav a.active::after { box-shadow: 0 0 10px var(--accent-glow); }
body.dark-mode .set-tabs nav a.tab-projects { color: #0A0D14; background: var(--accent); }
body.dark-mode .sheet, body.dark-mode .divider {
  background: linear-gradient(165deg, rgba(24, 30, 44, 0.12), rgba(18, 22, 34, 0.07) 45%, rgba(20, 26, 40, 0.10));
  border-color: rgba(210, 224, 255, 0.16);
  outline-color: rgba(210, 224, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(210, 224, 255, 0.10),
    0 0 0 1px rgba(143, 184, 255, 0.08),
    0 0 30px rgba(143, 184, 255, 0.10),
    0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
body.dark-mode a.sheet:hover {
  outline-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(210, 224, 255, 0.12),
    0 0 0 1.5px var(--accent-line),
    0 0 46px rgba(143, 184, 255, 0.30),
    0 32px 70px -26px rgba(0, 0, 0, 0.75);
}
body.dark-mode .giant, body.dark-mode .h-sheet, body.dark-mode .cs-title {
  background: linear-gradient(180deg, #FFFFFF 20%, #C7D6F2 65%, #8FA6D6 105%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
body.dark-mode .giant .red, body.dark-mode .h-sheet .red, body.dark-mode .cs-title .red { -webkit-text-fill-color: var(--accent); }
body.dark-mode .btn { background: rgba(210, 224, 255, 0.06); border-color: rgba(210, 224, 255, 0.22); }
body.dark-mode .btn:hover { background: var(--ink); color: #0A0D14; border-color: var(--ink); }
body.dark-mode .btn.primary { background: var(--accent); border-color: var(--accent); color: #0A0D14; box-shadow: 0 0 20px rgba(143, 184, 255, 0.35); }
body.dark-mode .btn.primary:hover { background: #C7D6F2; border-color: #C7D6F2; }
body.dark-mode .dwg-table.rows tbody tr:hover td { background: rgba(143, 184, 255, 0.10); color: var(--ink); }
body.dark-mode .mini:hover { box-shadow: 0 0 0 1.5px var(--accent-line), 0 0 40px rgba(143, 184, 255, 0.22), 0 20px 44px -16px rgba(0,0,0,0.6); }
body.dark-mode .dim .dval { background: var(--paper-solid); }
body.dark-mode #xh-v, body.dark-mode #xh-h { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }

/* ── Dark-mode toggle switch, lives in the coords cluster ────────────────── */
.dm-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none; padding-left: 4px;
}
.dm-toggle .track {
  position: relative; width: 34px; height: 18px; border-radius: 999px;
  background: var(--line); border: 1px solid var(--line);
  transition: background 0.2s ease;
}
.dm-toggle .knob {
  position: absolute; top: 1px; left: 1px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); transition: transform 0.2s cubic-bezier(0.34,1.4,0.64,1), background 0.2s ease;
}
body.dark-mode .dm-toggle .track { background: var(--accent-soft); border-color: var(--accent-line); }
body.dark-mode .dm-toggle .knob { transform: translateX(16px); background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.dm-toggle .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

::selection { background: var(--ink); color: #FFFFFF; }

a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

/* Type utilities */
.mono   { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.mono-s { font-family: var(--mono); font-size: 9.5px;  letter-spacing: 0.12em; text-transform: uppercase; }
.red    { color: var(--accent); }

/* ── Crosshair layer (transform-only — cheap) ────────────────────────────── */
#xh-v, #xh-h { position: fixed; z-index: 30; pointer-events: none; opacity: 0; transition: opacity 0.6s ease; }
#xh-v { top: 0; bottom: 0; width: 1px; background: var(--ink); left: 0; }
#xh-h { left: 0; right: 0; height: 1px; background: var(--ink); top: 0; }
body.crosshair-on:not(.hide-crosshair) #xh-v,
body.crosshair-on:not(.hide-crosshair) #xh-h { opacity: 0.12; }
body.xh-idle #xh-v, body.xh-idle #xh-h { opacity: 0 !important; }
@media (pointer: coarse) { #xh-v, #xh-h { display: none; } }

/* ── Set tabs — floating frosted bar ─────────────────────────────────────── */
.set-tabs {
  position: fixed; top: 10px; left: 10px; right: 10px; z-index: 50;
  height: 46px;
  max-width: var(--sheet-max);
  margin: 0 auto;
  background: rgba(252, 253, 254, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.75);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 24, 27, 0.05), 0 10px 30px -12px rgba(23, 24, 27, 0.18);
  display: flex; align-items: stretch;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint);
}
/* Bar frost is FAKED, not a live backdrop-filter: a pre-blurred copy of the
   static #backdrop, viewport-aligned via background-attachment:fixed. A real
   backdrop-filter re-rasterizes on every cursor-driven repaint (coord readout
   + crosshair) and its edge-clamped kernel smears into a flickering luminance
   band along the bar's bottom edge. This pseudo-element samples only static
   pixels — nothing to re-blur, nothing to flicker — and is oversized so the
   blur's own clamped edges fall outside the bar's overflow clip. */
.set-tabs::before {
  content: ""; position: absolute; inset: -48px; z-index: -1;
  background:
    linear-gradient(rgba(252, 253, 254, 0.28), rgba(252, 253, 254, 0.28)),
    linear-gradient(180deg, rgba(238, 240, 243, 0.15), rgba(234, 236, 239, 0.35)),
    url("media/backgrounds/bright-swirl.webp") center 30% / cover no-repeat;
  background-attachment: fixed;
  filter: blur(18px) saturate(140%);
  pointer-events: none;
}
body.dark-mode .set-tabs::before {
  background:
    linear-gradient(rgba(12, 16, 26, 0.16), rgba(12, 16, 26, 0.16)),
    linear-gradient(180deg, rgba(4, 6, 12, 0.1), rgba(4, 6, 12, 0.45)),
    url("media/backgrounds/dark-swirl.webp") center 35% / cover no-repeat;
  background-attachment: fixed;
}
.set-tabs .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-right: 1px solid var(--line-soft);
  color: var(--ink); font-weight: 500; letter-spacing: 0.18em; white-space: nowrap;
}
.set-tabs .brand b { color: var(--ink); font-weight: 600; }
.set-tabs nav { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; flex: 1; }
.set-tabs nav::-webkit-scrollbar { display: none; }
.set-tabs nav a {
  display: flex; align-items: center; padding: 0 16px;
  text-decoration: none; color: var(--ink-faint);
  border-right: 1px solid var(--line-soft);
  white-space: nowrap; position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}
.set-tabs nav a:hover { color: var(--ink); background: rgba(23, 24, 27, 0.04); }
.set-tabs nav a.active { color: var(--ink); }
.set-tabs nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
}
.set-tabs .coords {
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  border-left: 1px solid var(--line-soft); white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--ink-faint);
}
.set-tabs .coords i { font-style: normal; color: var(--ink); min-width: 74px; display: inline-block; }
/* Below 900px drop the X/Y/MM readouts but keep the night toggle reachable. */
@media (max-width: 900px) { .set-tabs .coords > span { display: none; } }
@media (max-width: 620px) { .set-tabs .brand span { display: none; } }

/* Projects tab — solid graphite pill */
.set-tabs nav a.tab-projects { color: #FFFFFF; font-weight: 600; background: var(--accent); }
.set-tabs nav a.tab-projects:hover { color: #FFFFFF; background: #2B2D33; }
.set-tabs nav a.tab-projects.active::after { background: #FFFFFF; }

/* ── Sheet — the frosted pane ────────────────────────────────────────────── */
main { display: block; padding: calc(56px + clamp(20px, 3.5vh, 44px)) clamp(10px, 2.5vw, 40px) 60px; }
.sheet {
  position: relative;
  max-width: var(--sheet-max);
  margin: 0 auto clamp(28px, 5vh, 64px);
  scroll-margin-top: 72px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08) 45%, rgba(250, 251, 253, 0.12));
  backdrop-filter: blur(var(--frost)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--frost)) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  border-radius: var(--r-xl);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(23, 24, 27, 0.05),
    0 24px 60px -24px rgba(23, 24, 27, 0.22);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sheet, .set-tabs { background: #FAFBFC; }
}

/* Inner frame — the working area. Zone gutter lives between the two borders. */
.sheet-inner {
  position: relative;
  margin: var(--gutter);
  border: 1px solid var(--line);
  border-radius: calc(var(--r-xl) - 13px);
  min-height: 200px;
  display: flex; flex-direction: column;
}

/* Zone tick labels (populated by drafting.js) */
.zones { position: absolute; pointer-events: none; font-family: var(--mono); font-size: 8.5px; color: var(--ink-ghost); letter-spacing: 0.08em; }
.zones.top    { top: 0;    left: var(--gutter); right: var(--gutter); height: var(--gutter); }
.zones.bottom { bottom: 0; left: var(--gutter); right: var(--gutter); height: var(--gutter); }
.zones.left   { left: 0;   top: var(--gutter); bottom: var(--gutter); width: var(--gutter); }
.zones.right  { right: 0;  top: var(--gutter); bottom: var(--gutter); width: var(--gutter); }
.zones span { position: absolute; display: flex; align-items: center; justify-content: center; }
.zones.top span, .zones.bottom span { top: 0; height: 100%; transform: translateX(-50%); }
.zones.left span, .zones.right span { left: 0; width: 100%; transform: translateY(50%); }
.zones .tick { position: absolute; background: var(--ink-ghost); }
.zones.top .tick, .zones.bottom .tick { width: 1px; height: 5px; transform: none; }
.zones.top .tick { bottom: 0; } .zones.bottom .tick { top: 0; }
.zones.left .tick, .zones.right .tick { height: 1px; width: 5px; }
.zones.left .tick { right: 0; } .zones.right .tick { left: 0; }
@media (max-width: 720px) { .zones { display: none; } }

/* Content pad inside inner frame */
.sheet-body { padding: var(--pad); flex: 1; position: relative; }
.sheet-body.tight { padding: clamp(20px, 3vw, 40px) var(--pad); }
.sheet-body.compact { padding: clamp(18px, 2.6vw, 36px) var(--pad); }

/* Sheet header strip */
.sheet-head {
  display: flex; align-items: stretch; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--r-xl) - 14px) calc(var(--r-xl) - 14px) 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.sheet-head > div { padding: 10px 16px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sheet-head > div + div { border-left: 1px solid var(--line-soft); }
.sheet-head .grow { flex: 1; }
.sheet-head b { color: var(--ink); font-weight: 500; }
.sheet-head .no { color: var(--accent); font-weight: 600; }
@media (max-width: 720px) { .hide-sm { display: none !important; } }

/* Project number cell in sheet heads */
.sheet-head .pno-cell { background: var(--accent-soft); border-right: 1px solid var(--line); border-top-left-radius: calc(var(--r-xl) - 14px); }
.sheet-head .pno-cell b {
  font-family: var(--cond); font-size: 19px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--accent);
}

/* ── Title block ─────────────────────────────────────────────────────────── */
.titleblock {
  border-top: 1px solid var(--line);
  border-radius: 0 0 calc(var(--r-xl) - 14px) calc(var(--r-xl) - 14px);
  background: linear-gradient(180deg, rgba(23, 24, 27, 0.025), rgba(23, 24, 27, 0.05));
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 2fr) repeat(3, minmax(90px, 0.7fr));
  font-family: var(--mono);
}
.tb-cell {
  border-right: 1px solid var(--line-soft);
  padding: 9px 14px 10px;
  min-width: 0;
}
.tb-cell:last-child { border-right: 0; }
.tb-cell .k { font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 3px; }
.tb-cell .v { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cell .v.big { font-family: var(--cond); font-size: 17px; font-weight: 600; letter-spacing: 0.08em; }
.tb-cell .v .sig { font-family: var(--script); font-size: 19px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.tb-cell.tol { font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); line-height: 1.7; }
.tb-cell.tol b { color: var(--ink-dim); font-weight: 500; }
@media (max-width: 940px) {
  /* minmax(0,1fr) — not 1fr — so the three cells actually shrink to share the
     row instead of blowing the titleblock past the sheet edge on phones. */
  .titleblock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb-cell { padding: 8px 10px 9px; }
  .tb-cell.tol { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); border-right: 0; }
  /* Title gets its own full-width row so the long drawing name never collides
     with Drawn / DWG NO; those two drop below and sit in a 3-up row alongside
     Rev / Sheet. */
  .tb-cell:nth-child(2) { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .tb-cell:nth-child(2) .v.big { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.12; }
}

/* Third-angle projection symbol */
.tap { display: inline-flex; align-items: center; gap: 7px; margin-top: 5px; }
.tap .cone { width: 22px; height: 12px; border: 1px solid var(--ink-dim); clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 78%); background: transparent; }
.tap .circ { width: 12px; height: 12px; border: 1px solid var(--ink-dim); border-radius: 50%; position: relative; }
.tap .circ::after { content: ""; position: absolute; inset: 3px; border: 1px solid var(--ink-dim); border-radius: 50%; }

/* ── Display type — gunmetal gradient, silver-render feel ────────────────── */
.giant {
  font-family: var(--cond);
  font-weight: 600;
  font-size: clamp(64px, 10.5vw, 148px);
  line-height: 0.9;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
}
.giant, .h-sheet, .cs-title {
  background: linear-gradient(180deg, #1B1D21 30%, #3A3F47 72%, #767E8A 108%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.giant .red, .h-sheet .red, .cs-title .red { -webkit-text-fill-color: var(--accent); }
.h-sheet {
  font-family: var(--cond); font-weight: 600; text-transform: uppercase;
  font-size: clamp(34px, 4.6vw, 58px); line-height: 0.94; letter-spacing: 0.01em;
}
.h-sub {
  font-family: var(--cond); font-weight: 500; text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 28px); line-height: 1.05; letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.lede { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.65; color: var(--ink-dim); max-width: 58ch; }
.lede strong, .body-copy strong { font-weight: 600; color: var(--ink); }
.body-copy { font-size: 15.5px; line-height: 1.7; color: var(--ink-dim); }
.body-copy p { margin: 0 0 14px; }

/* Callout label */
.calltag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.calltag::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.calltag.ok { color: var(--ok); }
.calltag.ok::before { background: var(--ok); }
.calltag.warm { color: var(--stamp); }
.calltag.warm::before { background: var(--stamp); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--frame); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.55); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(23, 24, 27, 0.06);
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 13px 20px; cursor: pointer; text-decoration: none;
  transition: background calc(0.18s / var(--speed)) ease, color calc(0.18s / var(--speed)) ease, border-color calc(0.18s / var(--speed)) ease, box-shadow calc(0.18s / var(--speed)) ease;
}
.btn:hover { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; box-shadow: 0 1px 2px rgba(23, 24, 27, 0.2), 0 10px 24px -10px rgba(23, 24, 27, 0.45); }
.btn.primary:hover { background: #2B2D33; border-color: #2B2D33; color: #FFFFFF; }
.btn .arr { font-family: var(--sans); transition: transform calc(0.18s / var(--speed)) ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ── Tables (index / bom / contact / rev) ────────────────────────────────── */
.dwg-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  font-family: var(--mono);
}
.dwg-table th {
  text-align: left; font-size: 9px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); padding: 8px 14px;
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.dwg-table td {
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding: 11px 14px;
  font-size: 11.5px; letter-spacing: 0.05em; color: var(--ink-dim);
  vertical-align: top;
}
.dwg-table th:last-child, .dwg-table td:last-child { border-right: 0; }
.dwg-table tr:last-child td { border-bottom: 0; }
.dwg-table td b { color: var(--ink); font-weight: 500; }
.dwg-table .num { color: var(--accent); font-weight: 600; white-space: nowrap; }
.dwg-table tr.group td {
  background: var(--paper-2); color: var(--ink); font-weight: 600;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
}
.dwg-table.dense td { padding: 7px 12px; }
.dwg-table.dense th { padding: 6px 12px; }

tr[data-href] { cursor: pointer; }

/* Row-link tables: whole row inverts on hover */
.dwg-table.rows a { text-decoration: none; }
.dwg-table.rows tbody tr { cursor: pointer; }
.dwg-table.rows tbody tr:hover td { background: var(--ink); color: rgba(255, 255, 255, 0.75); }
.dwg-table.rows tbody tr:hover td .num,
.dwg-table.rows tbody tr:hover td b { color: #FFFFFF; }
.dwg-table.rows tbody tr:hover td .goarr { color: #FFFFFF; }

/* Indented project rows in the cover index */
.dwg-table td.indent { padding-left: 28px; }
.dwg-table tr.sec-row td { background: var(--accent-soft); }
.dwg-table tr.sec-row td b { color: var(--accent); letter-spacing: 0.14em; }
.dwg-table td.pno { font-family: var(--cond); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; }
.contact-tbl td .goarr { color: var(--accent); font-weight: 600; }

/* ── Figures / image slots ───────────────────────────────────────────────── */
.fig { position: relative; }
.fig .fig-frame {
  position: relative; border: 1px solid var(--line); background: var(--paper-2);
  border-radius: var(--r-md);
  overflow: hidden;
}
.fig image-slot { display: block; width: 100%; height: 100%; --is-bg: transparent; }
.fig .fig-cap {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); padding: 9px 2px 0;
}
.fig .fig-cap b { color: var(--ink); font-weight: 500; }
.fig .fig-cap .figno { color: var(--accent); font-weight: 600; }
/* Registration cross-marks at figure corners */
.fig .reg { position: absolute; width: 13px; height: 13px; z-index: 2; pointer-events: none; }
.fig .reg::before, .fig .reg::after { content: ""; position: absolute; background: var(--ink-ghost); }
.fig .reg::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.fig .reg::after  { top: 50%; left: 0; right: 0; height: 1px; }
.fig .reg.tl { top: -6.5px; left: -6.5px; } .fig .reg.tr { top: -6.5px; right: -6.5px; }
.fig .reg.bl { bottom: -6.5px; left: -6.5px; } .fig .reg.br { bottom: -6.5px; right: -6.5px; }

/* ── Dimension callouts ──────────────────────────────────────────────────── */
.dim { position: relative; font-family: var(--mono); pointer-events: none; }
body.hide-dims .dim, body.hide-dims .leader { display: none !important; }
.dim.h { height: 26px; }
.dim.h .ext { position: absolute; top: -8px; bottom: 8px; width: 1px; background: var(--ink-ghost); }
.dim.h .ext.l { left: 0; } .dim.h .ext.r { right: 0; }
.dim.h .dline { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink-dim); transform-origin: left center; }
.dim.h .dline::before, .dim.h .dline::after {
  content: ""; position: absolute; top: -3.5px; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.dim.h .dline::before { left: 0; border-right: 9px solid var(--ink-dim); }
.dim.h .dline::after  { right: 0; border-left: 9px solid var(--ink-dim); }
.dim .dval {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--paper-solid); border-radius: 5px; padding: 0 9px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.dim.v { width: 26px; position: absolute; }
.dim.v .ext { position: absolute; left: 8px; right: -8px; height: 1px; background: var(--ink-ghost); }
.dim.v .ext.t { top: 0; } .dim.v .ext.b { bottom: 0; }
.dim.v .dline { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--ink-dim); transform-origin: center top; }
.dim.v .dline::before, .dim.v .dline::after {
  content: ""; position: absolute; left: -3.5px; border-left: 4px solid transparent; border-right: 4px solid transparent;
}
.dim.v .dline::before { top: 0; border-bottom: 9px solid var(--ink-dim); }
.dim.v .dline::after  { bottom: 0; border-top: 9px solid var(--ink-dim); }
.dim.v .dval { transform: translate(-50%, -50%) rotate(-90deg); }

/* Leader note */
.leader {
  position: absolute; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-dim); pointer-events: none; white-space: nowrap;
}
.leader .ln { position: absolute; background: var(--ink-dim); }
.leader .dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ── Stamps ──────────────────────────────────────────────────────────────── */
.stamp {
  position: absolute; z-index: 5;
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  color: var(--stamp);
  border: 3px solid var(--stamp); border-radius: var(--r-sm);
  outline: 1.5px solid var(--stamp); outline-offset: 3px;
  padding: 10px 18px 11px;
  font-size: clamp(17px, 1.8vw, 23px); letter-spacing: 0.14em; line-height: 1.15;
  text-align: center;
  transform: rotate(var(--tilt, -7deg));
  opacity: 0.85;
  mix-blend-mode: multiply;
  pointer-events: none;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='r'><feTurbulence type='fractalNoise' baseFrequency='0.35' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.62 0.4'/></filter><rect width='100%25' height='100%25' fill='white'/><rect width='100%25' height='100%25' filter='url(%23r)'/></svg>");
  mask-size: 120px;
}
.stamp small { display: block; font-family: var(--mono); font-weight: 500; font-size: 9px; letter-spacing: 0.26em; margin-top: 4px; }
body.hide-stamps .stamp { display: none !important; }
.stamp.ok { color: var(--ok); border-color: var(--ok); outline-color: var(--ok); }
/* Thunk-in on reveal */
.stamp.thunk { opacity: 0; transform: rotate(var(--tilt, -7deg)) scale(1.7); }
.stamp.thunk.in {
  opacity: 0.85; transform: rotate(var(--tilt, -7deg)) scale(1);
  transition: opacity calc(0.28s / var(--speed)) cubic-bezier(0.34, 1.4, 0.64, 1), transform calc(0.28s / var(--speed)) cubic-bezier(0.34, 1.4, 0.64, 1);
}
/* Inline stamp — sits in flow */
.stamp.inline { position: static; display: inline-block; }
.stamp-row { display: flex; justify-content: flex-end; padding: 44px 6px 6px; }

/* Rev flag */
.revflag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 0; height: 0; position: relative; margin: 0 4px;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 16px solid var(--accent);
  vertical-align: -2px;
}
.revflag i {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  font-style: normal; font-family: var(--mono); font-size: 8.5px; font-weight: 600; color: #FFFFFF;
  line-height: 1;
}
.revcloud { outline: 1.5px dashed var(--accent-line); outline-offset: 7px; border-radius: 6px; }

/* ── Hatching ────────────────────────────────────────────────────────────── */
.hatch { background-image: repeating-linear-gradient(45deg, var(--ink-ghost) 0 1px, transparent 1px 7px); }
.hatch-red { background-image: repeating-linear-gradient(45deg, var(--accent-line) 0 1px, transparent 1px 7px); }
.hatch-ok { background-image: repeating-linear-gradient(45deg, var(--ok-line) 0 1px, transparent 1px 7px); }
.hatch-warm { background-image: repeating-linear-gradient(45deg, var(--warm-line) 0 1px, transparent 1px 7px); }
body.hide-hatch .hatch, body.hide-hatch .hatch-red,
body.hide-hatch .hatch-ok, body.hide-hatch .hatch-warm { background-image: none !important; }

/* ── General notes list ──────────────────────────────────────────────────── */
.gnotes { counter-reset: gn; list-style: none; margin: 0; padding: 0; max-width: 62ch; }
.gnotes li {
  counter-increment: gn; position: relative;
  padding: 15px 0 15px 52px; border-bottom: 1px solid var(--line-soft);
  font-size: 15.5px; line-height: 1.62; color: var(--ink-dim);
}
.gnotes li:first-child { border-top: 1px solid var(--line-soft); }
.gnotes li::before {
  content: counter(gn) ".";
  position: absolute; left: 2px; top: 15px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.05em;
}
.gnotes strong { color: var(--ink); font-weight: 600; }
.gnotes.cols { max-width: none; columns: 2; column-gap: 44px; }
.gnotes.cols li { break-inside: avoid; padding: 11px 0 11px 38px; font-size: 14px; line-height: 1.55; }
.gnotes.cols li::before { top: 11px; font-size: 11px; }
@media (max-width: 760px) { .gnotes.cols { columns: 1; } }

/* ── Spec strip ──────────────────────────────────────────────────────────── */
.specs { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: rgba(255, 255, 255, 0.3); }
.specs .sp { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.specs .sp:last-child { border-bottom: 0; }
.specs .sp .k { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 4px; }
.specs .sp .v { font-family: var(--cond); font-size: 21px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; color: #4A505A; }
.specs .sp .v em { font-style: normal; color: var(--accent); }
.specs.cols { grid-template-columns: repeat(4, 1fr); }
.specs.cols .sp { border-bottom: 0; border-right: 1px solid var(--line-soft); }
.specs.cols .sp:last-child { border-right: 0; }
@media (max-width: 860px) {
  .specs.cols { grid-template-columns: 1fr 1fr; }
  .specs.cols .sp { border-bottom: 1px solid var(--line-soft); }
  .specs.cols .sp:nth-child(even) { border-right: 0; }
  .specs.cols .sp:nth-last-child(-n+2) { border-bottom: 0; }
}
.specs.dense .sp { padding: 8px 12px; }
.specs.dense .sp .v { font-size: 17px; }
.specs.cols.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 860px) { .specs.cols.five { grid-template-columns: 1fr 1fr; } }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 5px 9px;
  background: rgba(255, 255, 255, 0.5);
}

/* ── Reveal animations ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .r { opacity: 0; transform: translateY(10px); transition: opacity calc(0.45s / var(--speed)) cubic-bezier(0.16, 1, 0.3, 1), transform calc(0.45s / var(--speed)) cubic-bezier(0.16, 1, 0.3, 1); }
  .r.in { opacity: 1; transform: none; }
  .dim.h .dline { transform: scaleX(0); transition: transform calc(0.55s / var(--speed)) cubic-bezier(0.16, 1, 0.3, 1) 0.1s; }
  .dim.v .dline { transform: scaleY(0); transition: transform calc(0.55s / var(--speed)) cubic-bezier(0.16, 1, 0.3, 1) 0.1s; }
  .dim .dval { opacity: 0; transition: opacity calc(0.35s / var(--speed)) ease 0.32s; }
  .dim.in .dline { transform: none; }
  .dim.in .dval { opacity: 1; }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.setfoot {
  max-width: var(--sheet-max); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 4px 10px;
}

/* ── Clickable sheets ────────────────────────────────────────────────────── */
a.sheet { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: outline-color calc(0.25s / var(--speed)) ease, box-shadow calc(0.25s / var(--speed)) ease; }
a.sheet:hover {
  outline: 1.5px solid var(--ink);
  outline-offset: -1.5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(23, 24, 27, 0.06),
    0 32px 70px -26px rgba(23, 24, 27, 0.32);
}
.open-tag { color: #FFFFFF !important; font-weight: 600; display: flex; align-items: center; gap: 8px; background: var(--accent); padding: 0 16px; border-top-right-radius: calc(var(--r-xl) - 14px); }
a.sheet:hover .open-tag { background: #2B2D33; }
.open-tag .arr { transition: transform calc(0.2s / var(--speed)) ease; display: inline-block; }
a.sheet:hover .open-tag .arr { transform: translateX(4px); }

/* Landing pad above the titleblock on clickable sheets */
.open-land { height: 42px; border-top: 1px solid var(--line); background: var(--accent-soft); }
@media print { .open-land { display: none; } }

/* Sticky OPEN chip — graphite pill riding the viewport bottom */
.open-chip {
  position: sticky; bottom: 18px; z-index: 7;
  display: flex; justify-content: center;
  /* -14px is a deliberate slight nestle into the titleblock's own cell
     padding (~9-10px), not an overlap into its text. Used to be -56px,
     relying on the (now-removed) .open-land spacer to absorb the rest —
     that dependency is why removing .open-land caused the chip to cover
     the titleblock; this value is self-contained, no spacer needed. */
  margin: 10px 0 -14px;
  pointer-events: none;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.open-chip.show { opacity: 1; transform: none; }
.open-chip span {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #FFFFFF;
  border-radius: 999px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 10px 18px;
  box-shadow: 0 1px 2px rgba(23, 24, 27, 0.2), 0 10px 26px -8px rgba(23, 24, 27, 0.45);
  transition: background calc(0.2s / var(--speed)) ease;
}
a.sheet:hover .open-chip span { background: #2B2D33; }
@media print { .open-chip { display: none; } }

/* ── Feature-sheet layout ────────────────────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(22px, 3vw, 48px); align-items: center; }
.feature-grid .f-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.feature-grid .f-media { display: grid; gap: 18px; align-self: center; min-width: 0; }
.feature-grid .fig-frame { aspect-ratio: 16 / 9; }
.feature-grid.flip .f-copy { order: 2; }
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid.flip .f-copy { order: 0; }
}

/* Status band */
.statusband { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: rgba(255, 255, 255, 0.3); }
.statusband .band { width: 34px; border-right: 1px solid var(--line-soft); flex: none; }
.statusband .txt { padding: 10px 14px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); line-height: 1.8; }
.statusband .txt b { color: var(--ok); font-weight: 600; }
.statusband.warm .txt b { color: var(--stamp); }

/* ── Section rail ────────────────────────────────────────────────────────── */
.rail {
  position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 48;
  display: flex; flex-direction: column; gap: 2px;
}
.rail a {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 5px 2px; text-decoration: none;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}
.rail a b { font-weight: 500; font-variant-numeric: tabular-nums; }
.rail a .tick { width: 12px; height: 1px; background: currentColor; transition: width 0.25s ease; }
.rail a .lbl { opacity: 0; transform: translateX(4px); transition: opacity 0.25s ease, transform 0.25s ease; }
.rail:hover a .lbl { opacity: 1; transform: none; }
.rail a.active { color: var(--ink); }
.rail a.active .tick { width: 26px; height: 2px; }
@media (max-width: 1540px) { .rail { display: none; } }

/* ── Section divider — binder tab between sheet groups ───────────────────── */
.divider {
  position: relative;
  max-width: var(--sheet-max);
  margin: 0 auto clamp(28px, 5vh, 64px);
  scroll-margin-top: 72px;
  display: flex; align-items: stretch;
  background: rgba(252, 253, 254, 0.10);
  backdrop-filter: blur(var(--frost)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--frost)) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(23, 24, 27, 0.05), 0 18px 44px -20px rgba(23, 24, 27, 0.22);
}
.div-tab {
  display: flex; align-items: center; padding: 16px 20px;
  background: var(--accent); color: #FFFFFF;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.22em;
  white-space: nowrap;
}
.div-body { flex: 1; display: flex; align-items: center; gap: 18px; padding: 12px 20px; flex-wrap: wrap; min-width: 0; }
.div-title {
  font-family: var(--cond); font-weight: 600; text-transform: uppercase;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1; letter-spacing: 0.02em;
  color: var(--ink);
}
.div-count { color: var(--ink-faint); }
.div-links { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.div-links a {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: var(--r-xs); padding: 6px 10px;
  background: rgba(255, 255, 255, 0.5);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.div-links a b { color: var(--accent); font-weight: 600; }
.div-links a:hover { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
.div-links a:hover b { color: #FFFFFF; }
@media (max-width: 900px) { .div-links { display: none; } }

/* ── Minis (P-03/04/05 cards) ────────────────────────────────────────────── */
.mini-head .pno { font-family: var(--cond); font-size: 15px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); }
.mini-head .grow { flex: 1; }
.mini .fig + .fig { margin-top: 12px; }

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .set-tabs, #xh-v, #xh-h, #tweaks-mount, #backdrop, .rail { display: none !important; }
  body {
    --desk: #fff;
    --paper: #FFFFFF;
    --paper-2: #F2F3F5;
    background: #fff;
  }
  .sheet, .divider {
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: #FFFFFF; border: 2px solid var(--frame); outline: none; box-shadow: none;
  }
  .giant, .h-sheet, .cs-title { background: none; -webkit-text-fill-color: currentColor; color: var(--ink); }
  main { padding: 0; }
  .sheet { box-shadow: none !important; margin: 0 auto 0; page-break-after: always; max-width: 100%; }
  .r { opacity: 1 !important; transform: none !important; }
  .dim .dline { transform: none !important; } .dim .dval { opacity: 1 !important; }
  .stamp.thunk { opacity: 0.85; transform: rotate(var(--tilt, -7deg)); }
}

/* ═══ SITE INTEGRATION APPENDIX ═══════════════════════════════════════════
   Rules the live site needs on top of the design-session stylesheet:
   published-media tags inside fig-frames, the pending-media placeholder,
   and a native-button reset so .dm-toggle can be an accessible <button>. */

/* Published media (plain img / video / youtube iframe) — fills its frame.
   Frames keep their designed aspect-ratios; crops get tuned per-image later. */
.fig .fig-frame > img,
.fig .fig-frame > video,
.fig .fig-frame > iframe {
  display: block; width: 100%; height: 100%; border: 0; background: var(--paper-2);
}
.fig .fig-frame > img,
.fig .fig-frame > video { object-fit: cover; }

/* Empty / pending-media placeholder — used where an asset isn't shot yet. */
.fig .fig-frame > .slot-ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; height: 100%; padding: 16px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); line-height: 1.8;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 9px, var(--line-soft) 9px, var(--line-soft) 10px),
    var(--paper-2);
}

/* .dm-toggle ships as a <button> for keyboard/screen-reader access */
button.dm-toggle {
  appearance: none; -webkit-appearance: none;
  background: none; border: 0; padding: 0 0 0 4px; margin: 0;
  font: inherit; color: inherit;
}
