/* michaelmorale.com — Plan Set. Shared tokens, the page shell and components used by more than one page type.
   Every page links this file plus its own: cover.css, sheet.css, project.css, notes.css, family.css or 404.css.
   Mobile first. Breakpoints: 720px (tablet), 1180px (wide: desktop artboard), 1440px.
   Theme: tokens on :root; night set via prefers-color-scheme or [data-theme="dark"].
   Widgets (css/widgets/*.css) use only these tokens, scoped under .w-NAME. */

/* ------------------------------------------------------------------ tokens */
/* Metric-matched stand-in for Archivo Narrow while it loads, so the one-line name
   does not wrap in a wider fallback and then jump when the web font arrives. */
@font-face {
  font-family: "Archivo Narrow Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  size-adjust: 82%;
}

:root {
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-narrow: "Archivo Narrow", "Arial Narrow", "Archivo Narrow Fallback", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  /* day set */
  --ground: #DDD5C4;
  --sheet: #F4EFE4;
  --panel: #F8F4EB;
  --hover: #E9E2D2;
  --ink: #262521;
  --ink-2: #57544C;
  --line: #BDB4A2;
  --pending: #857C6B;
  --shadow: rgba(38, 37, 33, .5);
  --accent: #A5231C;
  --on-accent: #F4EFE4;
  --accent-face: #F2786A;
  --face: #1E1D1A;
  --face-ink: #F4EFE4;
  --face-ink-2: #D9D1C0;
  --tile-well: #1E1D1A;
  --tile: #34322D;
  --tile-top: #3C3A34;
  --tile-ink: #F4EFE4;

  --sheet-m: 8px;
  --sheet-pad: 6px;
  --frame-pad: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0C1015;
    --sheet: #121920;
    --panel: #161F28;
    --hover: #1E2A35;
    --ink: #D8DEE3;
    --ink-2: #9CA8B2;
    --line: #34414D;
    --pending: #6E7C88;
    --shadow: rgba(0, 0, 0, .6);
    --accent: #F2786A;
    --on-accent: #0C1015;
    --accent-face: #F2786A;
    --face: #06090C;
    --face-ink: #E4E9ED;
    --face-ink-2: #AAB5BE;
    --tile-well: #06090C;
    --tile: #1F2A34;
    --tile-top: #26323D;
    --tile-ink: #E4E9ED;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .only-light { display: none; }
  :root:not([data-theme="light"]) .only-dark { display: inline; }
}

:root[data-theme="dark"] {
  --ground: #0C1015;
  --sheet: #121920;
  --panel: #161F28;
  --hover: #1E2A35;
  --ink: #D8DEE3;
  --ink-2: #9CA8B2;
  --line: #34414D;
  --pending: #6E7C88;
  --shadow: rgba(0, 0, 0, .6);
  --accent: #F2786A;
  --on-accent: #0C1015;
  --accent-face: #F2786A;
  --face: #06090C;
  --face-ink: #E4E9ED;
  --face-ink-2: #AAB5BE;
  --tile-well: #06090C;
  --tile: #1F2A34;
  --tile-top: #26323D;
  --tile-ink: #E4E9ED;
  color-scheme: dark;
}
.only-dark { display: none; }
:root[data-theme="dark"] .only-light { display: none; }
:root[data-theme="dark"] .only-dark { display: inline; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 12px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
svg.ico { flex: none; display: inline-block; vertical-align: middle; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button[aria-disabled="true"] { cursor: not-allowed; }
kbd { font-family: var(--font-mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main:focus { outline: none; }


.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* JS-only controls: invisible until site.js adds .js (noscript.css removes them entirely) */
html:not(.js) .js-only { visibility: hidden; }

.skip {
  position: absolute; left: 8px; top: -200px; z-index: 10;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 12px 16px; background: var(--ink); color: var(--sheet);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-decoration: none;
}
.skip:focus { top: 8px; color: var(--sheet); }

/* svg paint helpers (presentation via classes keeps the markup CSP-clean) */
.s-ink { stroke: var(--ink); }
.s-ink2 { stroke: var(--ink-2); }
.s-line { stroke: var(--line); }
.s-acc { stroke: var(--accent); }
.s-pend { stroke: var(--pending); }
.s-cur { stroke: currentColor; }
.f-none { fill: none; }
.f-ink { fill: var(--ink); }
.f-ink2 { fill: var(--ink-2); }
.f-sheet { fill: var(--sheet); }
.f-panel { fill: var(--panel); }
.f-acc { fill: var(--accent); }
.f-face { fill: var(--face); }
.f-face-ink { fill: var(--face-ink); }
.f-face-ink2 { fill: var(--face-ink-2); }
.f-face-acc { fill: var(--accent-face); }
.t-mono { font-family: var(--font-mono); }
.t-narrow { font-family: var(--font-narrow); }
.c-ink2 { color: var(--ink-2); }

/* shared type */
.lbl, .sheet-label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 400; line-height: 1.4;
  letter-spacing: .1em; color: var(--ink-2);
}
.sheet-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.rule-h {
  display: inline-block; padding-bottom: 5px; border-bottom: 2px solid var(--ink);
  font-family: var(--font-narrow); font-weight: 700; font-size: 17px; letter-spacing: .14em; line-height: 1.2;
}
.stamp {
  display: inline-block; transform: rotate(-2deg);
  padding: 3px 9px; border: 2px solid var(--accent); color: var(--accent);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; line-height: 1.3;
}
.chip {
  display: inline-block; padding: 5px 8px; border: 1px solid var(--ink);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; line-height: 1.35;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; line-height: 1.2;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn:hover { background: var(--hover); color: var(--ink); }
.btn-sm { border-width: 1px; letter-spacing: .08em; font-weight: 500; }
.cta {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 52px; padding: 0 20px; border: 2px solid var(--ink); background: var(--ink); color: var(--sheet);
  font-family: var(--font-narrow); font-weight: 700; font-size: 18px; letter-spacing: .08em; text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.cta:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lay {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--font-narrow); font-weight: 700; font-size: 15px; letter-spacing: .08em; line-height: 1.1;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.lay:hover { background: var(--hover); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
}
.icon-btn:hover { background: var(--hover); }
.icon-btn .moon-fill { fill: none; }
.icon-btn[aria-pressed="true"] .moon-fill { fill: currentColor; }

/* ------------------------------------------------------------------ page frame */
.wrap { max-width: 1488px; margin-inline: auto; }
main { display: flex; flex-direction: column; gap: 14px; }

/* top bar: brand, sheet index, LinkedIn + set toggle. Phone: the six sheets sit in a 3 x 2 grid under the brand. */
.topbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 10px;
  padding: 8px 8px 8px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.monogram {
  position: relative; flex: none; width: 36px; height: 36px; border: 1.5px solid currentColor; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; line-height: 1;
}
.monogram span:first-child { padding-bottom: 3px; }
.monogram span:last-child { padding-top: 3px; }
.monogram::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; }
.brand-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-name { font-family: var(--font-narrow); font-size: 17px; font-weight: 700; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.brand-sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-2); line-height: 1; white-space: nowrap; }
.topbar-end { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 6px; }
@media (max-width: 719px) {
  .brand-sub-set { display: none; } /* "PORTFOLIO · 6 SHEETS" leaves room for LINKEDIN */
}
@media (max-width: 374px) {
  /* LINKEDIN stays in the bar: the subline goes and MICHAEL / MORALE stacks beside the monogram */
  .brand-sub { display: none; }
  .brand-name { white-space: normal; line-height: 1.05; }
}
.top-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-decoration: none;
}
.theme-btn { gap: 8px; }
.theme-btn-text { display: none; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; line-height: 1; }

.sheet-index { grid-column: 1 / -1; grid-row: 2; margin-top: 8px; }
.sheet-index ul {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 2px solid var(--ink);
}
.sheet-index li { display: flex; min-width: 0; }
.tab {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 52px; padding: 6px 2px; background: var(--sheet); text-align: center; text-decoration: none; color: var(--ink);
  transition: background-color .16s ease, box-shadow .16s ease;
}
.tab:hover { background: var(--hover); color: var(--ink); }
.tab-id { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.tab-title {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink-2); text-transform: uppercase; line-height: 1.2;
}
.tab-lock { flex: none; }
/* the sheet you are on: filled like a picked tab, with the red-pencil underline.
   aria-current is "page" on a sheet page and "true" on a project page (its parent sheet) */
.tab[aria-current] { background: var(--hover); box-shadow: inset 0 -3px 0 var(--accent); }
.tab[aria-current] .tab-title { color: var(--ink); font-weight: 600; }

/* sheets: drafting paper on the ground, a 2px frame inside */
.sheet {
  position: relative; margin: 0 var(--sheet-m); padding: var(--sheet-pad);
  background: var(--sheet); border: 1px solid var(--line); box-shadow: 0 20px 36px -28px var(--shadow);
}
.frame { border: 2px solid var(--ink); }
.grid-ref { display: none; }

/* breadcrumb, on the ground above a sheet */
.crumbs { margin: 0 var(--sheet-m); padding: 0 2px; }
.crumbs ol {
  display: flex; flex-wrap: wrap; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}
.crumbs li { display: flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "›"; padding: 0 8px; color: var(--ink-2); }
.crumb { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); font-weight: 600; }
.crumb:hover { color: var(--accent); }
.crumb-cur { color: var(--ink); font-weight: 600; padding: 12px 0; }

/* sheet title block: sheet label, name and intro, then a small title block (sheet pages, notes, family) */
.sh-head { display: flex; flex-direction: column; border-bottom: 2px solid var(--ink); }
.sh-main { padding: 18px var(--frame-pad) 20px; min-width: 0; }
.sh-title {
  margin-top: 16px; font-family: var(--font-narrow); font-weight: 700; line-height: .9; letter-spacing: -.005em;
  text-transform: uppercase; font-size: clamp(44px, 13vw, 96px); overflow-wrap: anywhere;
}
.sh-intro { margin-top: 14px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 680px; text-wrap: pretty; }
.sh-tb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.sh-tb-cell { padding: 10px var(--frame-pad) 12px; border-bottom: 1px solid var(--ink); min-width: 0; }
.sh-tb-cell:nth-child(odd) { border-right: 1px solid var(--ink); }
.sh-tb-cell:nth-last-child(-n+2) { border-bottom: 0; }
.sh-tb-val { margin-top: 4px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; line-height: 1.35; }
.sh-tb-id { margin-top: 4px; font-family: var(--font-narrow); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.01em; }

/* split-flap tiles (shared by the cover strip and the Flipboard widget) */
.flap-board {
  --flap-h: 36px;
  display: grid; grid-template-columns: repeat(var(--flap-cols, 12), minmax(0, 1fr)); gap: 3px;
  padding: 6px; background: var(--tile-well);
}
.strip-board { --flap-cols: 12; }
.flap-board--14 { --flap-cols: 14; --flap-h: 38px; }
.flap-tile {
  position: relative; display: block; height: var(--flap-h); overflow: hidden; border-radius: 2px;
  background: var(--tile); color: var(--tile-ink);
  font-family: var(--font-narrow); font-weight: 700; font-size: calc(var(--flap-h) * .6); line-height: 1;
}
.flap-ch { position: absolute; left: 0; right: 0; top: 0; height: var(--flap-h); display: flex; align-items: center; justify-content: center; }
.flap-top {
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--flap-h) / 2); overflow: hidden;
  background: var(--tile-top); transform-origin: 50% 100%; transform: perspective(200px) rotateX(-90deg);
}
.flap-seam { position: absolute; left: 0; right: 0; top: calc(var(--flap-h) / 2 - 1px); height: 1.5px; background: var(--tile-well); }

/* detail callout bubble: number over sheet */
.bubble {
  position: relative; flex: none; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); line-height: 1; background: var(--sheet); color: var(--ink);
}
.bubble::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; }
.bubble-n { font-size: 15px; font-weight: 600; padding-bottom: 5px; }
.bubble-s { font-size: 12px; font-weight: 500; letter-spacing: -.03em; padding-top: 5px; }

/* site plan drawing (the cover shows all of it, zone sheets an enlarged part) */
.siteplan { position: relative; width: 100%; border: 1px solid var(--line); background: var(--sheet); }
.siteplan-svg { width: 100%; height: auto; }
/* Callouts are links laid over the drawing. --x/--y are plan units (the 680 x 520 viewBox); a zone sheet
   sets --vx/--vy/--vw/--vh to its crop so the same numbers land in the same place. */
.callout {
  --x: 0; --y: 0; --sz: 52;
  position: absolute;
  left: calc((var(--x) - var(--vx, 0)) / var(--vw, 680) * 100%);
  top: calc((var(--y) - var(--vy, 0)) / var(--vh, 520) * 100%);
  width: max(52px, calc(var(--sz) / var(--vw, 680) * 100%)); aspect-ratio: 1; min-height: 0; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: visible;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--sheet); color: var(--ink);
  font-family: var(--font-mono); line-height: 1; text-decoration: none;
  transition: transform .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease;
}
.callout::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; }
.callout-n { font-size: 16px; font-weight: 600; padding-bottom: 5px; }
/* The sheet line sits high in the lower half (3px above it; 3px below keeps the number where it is), and the ring
   never drops below 52px, so the corners of "E-201" stay inside the ring at every size. */
.callout-s { font-size: 12px; font-weight: 500; letter-spacing: -.04em; padding: 3px 0; }
/* overflow stays visible (min-height: 0 stops aspect-ratio growing the circle), so user text spacing
   (WCAG 1.4.12) spills past the ring instead of cutting "E-201" to "E-" */
.callout-n, .callout-s { white-space: nowrap; }
.callout:hover { transform: translate(-50%, -50%) scale(1.06); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.callout:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; }
.callout.is-off { border-style: dashed; border-color: var(--ink-2); color: var(--ink-2); }
.callout.is-off:hover { border-style: solid; border-color: var(--accent); color: var(--on-accent); }
.callout[data-project="teal-tools"] { --x: 320; --y: 124; --sz: 64; }
.callout[data-project="build-it"] { --x: 350; --y: 400; }
.callout[data-project="family-screen-bank"] { --x: 444; --y: 112; }
.callout[data-project="flipboard"] { --x: 568; --y: 112; }
.callout[data-project="cold-plunge-timer"] { --x: 444; --y: 216; }
.callout[data-project="quickshot"] { --x: 568; --y: 216; }
.callout[data-project="kit-car-vents"] { --x: 444; --y: 386; }

/* site plan layers. Off: fade the shapes only; text in a layer drops to ink-2 so it stays readable */
.lyr > * { transition: opacity .24s ease; }
.lyr.is-off > :not(text) { opacity: .55; }
.lyr.is-off > text { fill: var(--ink-2); }
.lyr.is-off .dsh { stroke-dasharray: 5 4; }
.lyr-label { fill: var(--ink); }
.lyr-label.is-off { fill: var(--ink-2); }

/* drawing caption: bubble mark, rule-underlined title, scale note */
.plan-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.plan-caption-mark {
  display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px;
  border: 1.5px solid var(--ink); border-radius: 50%; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
}
.plan-caption-title { display: block; padding-bottom: 3px; border-bottom: 2px solid var(--ink); font-family: var(--font-narrow); font-weight: 700; font-size: 16px; letter-spacing: .1em; }
.plan-caption .lbl { display: block; margin-top: 4px; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em;
}

/* PREV / BACK TO SHEET / NEXT */
.pager {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
  margin-top: 28px; padding: 18px var(--frame-pad) 0; border-top: 1px solid var(--line);
}
.pager-link {
  display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 64px; padding: 10px 12px;
  border: 1.5px solid var(--ink); text-decoration: none; color: var(--ink);
  transition: background-color .16s ease, box-shadow .16s ease;
}
.pager-link:hover { background: var(--hover); color: var(--ink); }
.pager-k { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--ink-2); }
.pager-name { font-family: var(--font-narrow); font-size: 18px; font-weight: 700; line-height: 1.15; letter-spacing: .02em; overflow-wrap: anywhere; }
.pager-ref { white-space: nowrap; } /* "1 / A-101" never breaks at the hyphen */
.pager-note { font-size: 13px; line-height: 1.35; color: inherit; } /* NEXT SHEET: what is on it (site.json indexNote) */
.pager-prev { grid-column: 1; }
.pager-next { grid-column: 2; align-items: flex-end; text-align: right; }
.pager-up { grid-column: 1 / -1; grid-row: 2; }

/* title strips along the bottom of a sheet */
.title-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; border-top: 2px solid var(--ink); min-height: 56px; margin-top: 28px; }
.ts-name { display: none; align-items: center; padding: 8px 14px; font-family: var(--font-narrow); font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: .1em; }
.ts-cell { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; min-width: 0; }
.ts-cell + .ts-cell { border-left: 1px solid var(--ink); }
.ts-val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.ts-sheet { font-family: var(--font-narrow); font-weight: 700; font-size: 20px; line-height: 1; }

/* footer: one strip on every page */
.site-foot { margin-top: 14px; padding-bottom: 16px; }
.foot-strip {
  display: flex; flex-wrap: wrap; align-items: stretch; margin: 0 var(--sheet-m);
  border: 2px solid var(--ink); background: var(--sheet);
}
.foot-name {
  flex: 1 1 100%; display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-bottom: 1px solid var(--ink);
  font-family: var(--font-narrow); font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: .1em;
}
.foot-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-right: 1px solid var(--ink);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-decoration: none;
  transition: background-color .16s ease;
}
.foot-link:hover { background: var(--hover); color: var(--ink); }
.foot-sheet { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 14px; }
.foot-sheet-id { font-family: var(--font-narrow); font-weight: 700; font-size: 20px; line-height: 1; }
/* phone: three even rows (name / RFI / EMAIL · LINKEDIN · SHEET) instead of cells that wrap unevenly */
@media (max-width: 719px) {
  .foot-link { flex: 1 1 0; justify-content: center; padding: 0 10px; }
  .foot-link--rfi { flex-basis: 100%; justify-content: flex-start; padding: 0 14px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .foot-sheet { flex: none; margin-left: 0; padding: 0 10px 0 12px; }
}

/* ------------------------------------------------------------------ tablet (720px+) */
@media (min-width: 720px) {
  :root { --sheet-m: 16px; --sheet-pad: 12px; --frame-pad: 24px; }
  main { gap: 20px; }
  .topbar { padding: 10px 16px; }
  .brand-name { font-size: 19px; }
  .monogram { width: 38px; height: 38px; }
  .theme-btn { width: auto; padding: 0 12px; }
  .theme-btn-text { display: inline; }
  .sheet-index ul { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tab { min-height: 56px; }
  .tab-title { font-family: var(--font-narrow); font-size: 15px; font-weight: 600; letter-spacing: .07em; color: var(--ink); }
  .tab[aria-current] .tab-title { font-weight: 700; }

  .sh-main { padding: 26px var(--frame-pad) 26px; }
  .sh-intro { font-size: 17px; line-height: 1.6; }
  .sh-tb { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sh-tb-cell { border-bottom: 0; border-right: 1px solid var(--ink); }
  .sh-tb-cell:last-child { border-right: 0; }
  .sh-tb-id { font-size: 36px; }

  .pager { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; }
  .pager-next { grid-column: 3; }
  .pager-up { grid-column: 2; grid-row: 1; align-items: center; text-align: center; padding: 10px 20px; }

  .ts-name { display: flex; }
  .title-strip { grid-template-columns: minmax(0, 1fr) auto auto; }
  .title-strip .ts-cell:first-of-type { border-left: 1px solid var(--ink); }
  .ts-cell { padding: 8px 16px; }
  .ts-val { font-size: 13px; }
  .ts-sheet { font-size: 24px; }
  .ts-name { padding: 8px 24px; font-size: 16px; letter-spacing: .12em; }

  .site-foot { margin-top: 20px; padding-bottom: 24px; }
  .foot-name { flex: 1 1 auto; border-bottom: 0; border-right: 1px solid var(--ink); padding: 8px 24px; font-size: 16px; letter-spacing: .12em; }
  .foot-sheet { margin-left: 0; border-left: 0; padding: 0 16px; }
}

/* ------------------------------------------------------------------ wide (1180px+): desktop artboard */
@media (min-width: 1180px) {
  :root { --sheet-m: 16px; --sheet-pad: 18px; --frame-pad: 24px; }
  main { padding-top: 20px; } /* the artboard's 20px gap between the top bar and the first sheet */
  .topbar { display: flex; justify-content: space-between; gap: 16px; min-height: 64px; padding: 0 24px; }
  .sheet-index { margin-top: 0; }
  .sheet-index ul { display: flex; flex-wrap: nowrap; gap: 2px; background: transparent; border: 0; }
  .tab { flex-direction: row; align-items: baseline; gap: 7px; min-height: 44px; padding: 13px 9px; background: transparent; white-space: nowrap; }
  .tab:hover { background: transparent; box-shadow: inset 0 -2px 0 var(--ink); }
  .tab[aria-current] { background: transparent; box-shadow: inset 0 -3px 0 var(--accent); }
  .tab-lock { align-self: center; }
  .theme-btn { width: 44px; padding: 0; }
  .theme-btn-text { display: none; }
  .sheet { box-shadow: 0 28px 50px -36px var(--shadow); }
  .grid-ref { display: grid; position: absolute; font-family: var(--font-mono); font-size: 12px; line-height: 1; color: var(--ink-2); }
  .grid-ref span { display: flex; align-items: center; justify-content: center; }
  .grid-ref-top { left: 18px; right: 18px; top: 0; height: 18px; grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .grid-ref-top span + span { border-left: 1px solid var(--line); }
  .grid-ref-side { top: 18px; bottom: 18px; left: 0; width: 18px; grid-template-rows: repeat(6, minmax(0, 1fr)); }
  .grid-ref-side span + span { border-top: 1px solid var(--line); }

  .crumbs { margin-top: -8px; margin-bottom: -6px; }

  /* the title block moves to the right edge, like the cover's */
  .sh-head { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
  .sh-main { padding: 30px 44px 32px; }
  .sh-tb { display: flex; flex-direction: column; border-top: 0; border-left: 2px solid var(--ink); }
  .sh-tb-cell { padding: 12px 18px 14px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .sh-tb-cell:nth-child(odd) { border-right: 0; }
  .sh-tb-sheet { order: 9; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 0; }
  .sh-tb-cell:nth-last-child(-n+2):not(.sh-tb-sheet) { border-bottom: 1px solid var(--ink); }
  .sh-tb-cell:last-child { border-bottom: 2px solid var(--ink); }
  .sh-tb-id { font-size: 64px; line-height: .95; }

  .pager { padding: 22px 44px 0; }
}

/* 1180-1279px: the six tabs leave the brand about 240px, so the subline reads "PORTFOLIO · 6 SHEETS"
   (as on phones) instead of running under the first tab */
@media (min-width: 1180px) and (max-width: 1279px) {
  .brand-sub-set { display: none; }
}

@media (min-width: 1440px) {
  :root { --sheet-m: 24px; --frame-pad: 40px; }
  .topbar { gap: 24px; }
  .tab { padding: 13px 11px; }
  .theme-btn { width: auto; padding: 0 12px; }
  .theme-btn-text { display: inline; }
}

/* ------------------------------------------------------------------ forced colors */
@media (forced-colors: active) {
  /* fills and shadows are dropped in forced colors, so selected states use Highlight */
  .set-btn[aria-pressed="true"], .set-btn[aria-pressed="true"]:hover, .tab[aria-current] {
    forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText;
  }
  .tab[aria-current] .tab-title { color: HighlightText; }
}
@media (forced-colors: active) and (min-width: 1180px) {
  /* the 64px sheet id's text backplate is taller than its .95 line box and would cover the SHEET label */
  .sh-tb-sheet .sh-tb-id { margin-top: 12px; }
}

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .callout:hover { transform: translate(-50%, -50%); }
  .flap-top { display: none; }
}

/* ------------------------------------------------------------------ print */
@media print {
  :root { --ground: #fff; --sheet: #fff; --panel: #fff; --hover: #f2f2f2; --ink: #000; --ink-2: #333; --line: #999; --accent: #000; --on-accent: #fff; --shadow: transparent; }
  body { background: #fff; font-size: 11pt; }
  .skip, .topbar .topbar-end, .js-only, .strip-ctl .btn, .layers, [data-layers-all], .callout, .grid-ref, .sheet-index, .crumbs, .pager, .site-foot { display: none !important; }
  .sheet { box-shadow: none; border: 0; margin: 0 0 12pt; padding: 0; }
  .sheet, .fig-region, .dcard { break-inside: avoid-page; }
  a[href^="mailto:"]::after, a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .flap-board { background: #000; }
}
