/* ==========================================================================
   Carl Silva portfolio: shared stylesheet (used by every page)
   Sections: 1 Fonts, 2 Colors and sizes, 3 Base, 4 Layout, 5 Sidebar,
             6 Contact form, 7 Buttons, 8 Page header band, 9 Project cards,
             10 Display preferences panel, 11 Preference modes, 12 Narrow screens,
             13 Gallery pages (landing, project galleries, search, image viewer)
   ========================================================================== */

/* 1. FONTS ----------------------------------------------------------------
   Inter (SIL Open Font License, see assets/fonts/OFL.txt). One variable file
   covers every weight from light (300) to bold (700). Latin characters only. */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter/Inter-Variable.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap; /* show text right away in a fallback font, swap when loaded */
}

/* 2. COLORS AND SIZES -------------------------------------------------------
   Every color lives here, so a change is made in one place.
   Contrast ratios are against white unless noted (WCAG 2.2 AA needs 4.5:1 for
   text and 3:1 for borders and icons). */
:root {
  --text: #000000;          /* all text, 21:1 */
  --bg: #ffffff;            /* page background */
  --band: #e7ece2;          /* page header band; black text on it is 17.5:1 */
  --sage: #b2ccb3;          /* brand sage: highlights and decoration */
  --btn-fill: #b3c6b1;      /* button fill; black text on it is 11.6:1 */
  --btn-outline: #7d9d79;   /* button outline, 2px; 3.0:1 against white */
  --link-active: #667c67;   /* hover / current-page link text, 4.5:1 */
  --placeholder: #767676;   /* placeholder text on white fields, 4.5:1 */
  --field-border: #949494;  /* text field border, 3.0:1 */
  --error: #b3261e;         /* error text, 6.5:1 */
  --thumb: #d9d9d9;         /* only used by the high-contrast mode now: images, screenshots and thumbnails have NO fill behind them */
  --radius: 12px;           /* design rule 2026-11-13: images, screenshots, thumbnails and buttons all use a 12px corner radius */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.10);        /* design rule: every image, screenshot and thumbnail rests on this soft shadow */
  --shadow-lift: 0 8px 18px rgba(0, 0, 0, 0.2);   /* and deepens to this while lifted on hover (pages other than project pages) */

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar-w: clamp(15rem, 20.5vw, 21rem);
}

/* 3. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem; /* keeps focused items from hiding at the very top edge */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  font-optical-sizing: auto;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, p, ul { margin-top: 0; }

/* Links: black and underlined by default. Hover, keyboard focus and the current
   page turn sage-green and thicken the underline (underline = not color alone). */
a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover, a:focus-visible, a[aria-current="page"] {
  color: var(--link-active);
  text-decoration-thickness: 2px;
}

/* One clear keyboard focus ring everywhere: 2px black with a white gap. */
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Text for screen readers only (used for the invisible form labels). */
.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;
}

/* "Skip to main content": hidden until a keyboard user tabs to it. */
.skip {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 100;
  display: inline-flex; align-items: center; min-height: 2.75rem; box-sizing: border-box;   /* 2026-11-17: was 43 px high; 44 px */
  padding: 0.6rem 1rem; background: #000; color: #fff; border-radius: 6px;
}
.skip:focus { top: 0.5rem; color: #fff; }

/* 4. LAYOUT -----------------------------------------------------------------
   Two columns: sidebar (left) and page content (right). */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* 5. SIDEBAR ----------------------------------------------------------------
   The sidebar scrolls with the page until its bottom reaches the bottom of the
   window, then stays put. Scrolling back up, it moves up again at the top.
   (js/site.js sets "top" to a negative number equal to how much taller the
   sidebar is than the window. If it fits, top is 0 and it simply stays fixed.)
   No border, no inner scrollbar.

   Type and spacing shrink with window height, down to a 13px floor. Everything
   inside is sized in "em", so it all scales together. */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  font-size: clamp(0.8125rem, 1.45vh, 1rem);   /* 2026-11-17: the old 0.35rem offset kept this at 16px in any window over about 720px high, so the sidebar (about 1047px tall at 16px) set the page height and Home scrolled */
  padding: 1.5em 1.5em 1.75em;
}

.logo { display: block; width: clamp(4.5rem, 16vh, 8rem); margin: 0 auto; }
.logo img { display: block; width: 100%; height: auto; }

.name {
  margin: 0.6em 0 2em; /* more air between the name and Details */
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.side-section { margin: 0 0 1.75em; }
.side-section h2 { margin: 0 0 0.35em; font-size: 1em; font-weight: 700; }
.side-section ul { list-style: none; margin: 0; padding: 0; }
.side-section li { margin: 0.15em 0; font-size: 0.9375em; line-height: 1.35; }
.side-link { display: inline-block; margin-top: 0.9em; font-size: 0.9375em; } /* space above View Full Resume */
/* Two links under the tool list, stacked. Padding keeps each at least 24px tall (WCAG 2.5.8 target size). */
.side-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15em; margin-top: 0.9em; }
.side-links .side-link { margin: 0; padding: 0.2em 0; }

/* 6. CONTACT FORM -------------------------------------------------------------
   No visible labels (to save space). Each field has an invisible label for
   screen readers, a placeholder, and a name tooltip on hover and keyboard focus. */
.field { position: relative; margin: 0 0 0.45em; }

.field input,
.field textarea {
  display: block; width: 100%;
  font: inherit; font-size: 0.9375em; color: var(--text);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 4px;
}
.field input { height: 2.3em; padding: 0 0.6em; }
.field textarea { height: 5.6em; padding: 0.5em 0.6em; resize: none; margin-bottom: 1.1em; } /* space before Send Message */
.field ::placeholder { color: var(--placeholder); opacity: 1; }

.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid #000; outline-offset: 1px; }
.field [aria-invalid="true"] { border: 2px solid var(--error); }

/* Tooltip: sits directly above the field (no gap) so the pointer can move onto
   it without it vanishing. Esc hides it (see js/site.js). */
.field[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: 0; bottom: 100%; z-index: 5;
  padding: 0.2em 0.55em;
  font-size: max(12px, 0.8em); line-height: 1.3;
  color: #fff; background: #000; border-radius: 4px 4px 0 0;
  opacity: 0; visibility: hidden;
  transition: opacity 0.15s ease 0.4s, visibility 0s linear 0.55s;
}
.field[data-tip]:hover::after,
.field[data-tip]:focus-within::after {
  opacity: 1; visibility: visible;
}
.field[data-tip]:focus-within::after { transition-delay: 0s; }
.field[data-tip-off]::after { opacity: 0 !important; visibility: hidden !important; }

/* Messages under a field: errors in red text, hints in black. Empty = no space. */
.msg { margin: 0 0 0.4em; font-size: 0.8125em; line-height: 1.3; }
.msg:empty { display: none; }
.msg.error { color: var(--error); font-weight: 500; }

/* Spam trap: invisible to people, tempting to bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 7. BUTTONS ------------------------------------------------------------------
   Filled swaps to outlined (and back) on hover, press, or keyboard focus.
   Both states have a 2px border, so nothing shifts. */
.btn {
  display: inline-block;
  padding: 0.55em 1.1em;
  font: inherit; font-weight: 700; line-height: 1.2;
  color: var(--text); text-decoration: none; cursor: pointer;
  background: var(--btn-fill);
  border: 2px solid var(--btn-fill);
  border-radius: var(--radius);
}
.btn:hover, .btn:active, .btn:focus-visible {
  background: #fff;
  border-color: var(--btn-outline);
  color: var(--text);
}
.btn--outline { background: #fff; border-color: var(--btn-outline); }
.btn--outline:hover, .btn--outline:active, .btn--outline:focus-visible {
  background: var(--btn-fill); border-color: var(--btn-fill);
}

/* 7b. BACK BUTTON (Carl, 2026-11-15) -------------------------------------------
   A round button with only the sideways U-turn arrow: opaque white fill (like the Tools carousel arrows, so it stays legible over images),
   2px green stroke (--btn-outline, the pull tab's stroke), 2.75rem (44px) round, the same target size as the other icon buttons.
   Two placements, switched by whether the pull tab is showing:
   - 60em and up on Project and Resume pages (permanent sidebar, NO pull tab): the button sits directly under the header band at the left.
     It lives in .back-slot, a zero-height sticky box placed right after the band, so it starts under the band and then follows the page as it scrolls.
   - Pull tab showing (below 60em, and Gallery pages at every width): the button is fixed in the left margin just ABOVE the pull tab
     (the tab is at top: 40vh and 5.5rem tall), so the tab never covers it. Resizing the window moves it between the two spots with no reload. */
.back-fab {
  position: fixed; z-index: 50; top: calc(40vh - 3.5rem); left: 0.5rem;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  color: #000; background: #fff; border: 2px solid var(--btn-outline); border-radius: 50%;
  text-decoration: none; box-shadow: var(--shadow);
}
.back-fab:hover, .back-fab:focus-visible { background: var(--btn-fill); border-color: var(--btn-outline); color: #000; text-decoration: none; }
.back-fab:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
@media (min-width: 60.01em) {
  .back-slot { position: sticky; top: 0.75rem; height: 0; z-index: 50; }
  .back-slot .back-fab { position: absolute; top: 0.75rem; left: 0.5rem; }
  /* (The 3.5rem left margin that the project gallery pages had here at 60em and wider is gone: since 2026-11-16 23:46 their Back arrow sits beside the hamburger at every width, section 107.) */
}
html[data-contrast="high"] .back-fab { border: 2px solid #000; box-shadow: none; }
html[data-contrast="high"] .back-fab:hover, html[data-contrast="high"] .back-fab:focus-visible { background: #000; color: #fff; }

/* 8. PAGE HEADER BAND ---------------------------------------------------------- */
.band {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 6vw, 5.5rem);
  text-align: center;
  background: var(--band);
}
.band h1 { margin: 0 0 0.3em; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.15; }
.band .band-h2 { margin: 0 0 1em; font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 500; line-height: 1.3; }
.band .band-sub { margin: 0.2em 0; }
/* Even line lengths (2026-11-15): header titles and subtitles balance their lines at every screen width, so a long first line is never followed by a one-or-two-word last line. Browsers without text-wrap: balance fall back to normal wrapping. */
.band h1, .band .band-h2, .band .band-sub { text-wrap: balance; }
/* Home: a shorter band (less padding, tighter spacing) so the project thumbnails fit above the fold. */
.band--resume, .band--jump { padding-bottom: clamp(3rem, 6vw, 4.75rem); }   /* extra room between the subheading and the folder tabs */
.band--compact { padding: clamp(0.9rem, 2.2vw, 1.5rem) clamp(1.25rem, 6vw, 5.5rem); }
.band--compact h1 { margin-bottom: 0.15em; }
.band--compact .band-h2 { margin-bottom: 0.5em; }

/* 9. PROJECT CARDS (Home) ------------------------------------------------------
   Three across. When the content area gets narrow (measured on the area itself,
   not the whole window, so the sidebar is accounted for) they switch straight to
   ONE column. There is no two-across step, so there is never a lone orphan card.
   Titles reserve two lines so every thumbnail lines up in a row. */
.cards-wrap { container-type: inline-size; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2.25rem);
  margin: 0;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem) 6rem; /* extra bottom room for the fixed buttons */
  list-style: none;
}
.card { display: block; color: var(--text); text-decoration: none; }
.card h2 {
  display: flex; align-items: flex-end; justify-content: center;
  min-height: 2.6em;                 /* room for two lines of title */
  margin: 0 0 0.7rem; font-size: 1.0625rem; font-weight: 600; text-align: center; line-height: 1.3;
}
.thumb {
  display: grid; place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  color: #444; font-size: 0.8125rem;
}
/* A real screenshot inside a thumbnail: shown whole (not cropped). No fill behind it (design rule 2026-11-13). */
.thumb--shot img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Card labels never underline or change color on hover (design rule: still clickable; the keyboard focus ring below is kept). */
a.card:hover, a.card:focus-visible { color: var(--text); text-decoration: none; }
a.card:focus-visible { outline: 2px solid #000; outline-offset: 6px; border-radius: 16px; }
.card--pending .thumb:not(.thumb--shot) { border: 2px dashed var(--field-border); background: #fff; }

@container (max-width: 44rem) {
  .cards { grid-template-columns: minmax(0, 1fr); max-width: 30rem; margin-inline: auto; }
  .card h2 { min-height: 0; }
}

/* 9a. HOME QUADRANT: four project cards in a 2 x 2 grid, every thumbnail 16:9. The thumbnails are sized from the window HEIGHT as well as the width, so the whole Home page fits on one
   screen with no scrolling (--tw is the thumbnail width; 28rem is the band, card titles, gaps and top and bottom spacing together; measured at about 27.5rem on 2026-11-17, it was 24rem before).
   2026-11-13: thumbnails are 16:9 and sized exactly like the Gallery landing (Carl: "this is how I want the Home thumbnails to look"): as large as the window allows with no scrolling. */
.cards--quad {
  --tw: clamp(11rem, min(calc((100dvh - 28rem) / 2 * 16 / 9), calc((100cqw - 2.5rem - 2 * clamp(1.25rem, 5vw, 4rem)) / 2)), 40rem);   /* the smaller of: fits the window height, fits the width */
  grid-template-columns: repeat(2, max(var(--tw), 21.5rem)); justify-content: center;   /* a column only needs to fit the longest title (21.5rem); same as the Gallery landing */
  gap: 1.25rem clamp(0.5rem, 2vw, 2rem);
  padding: 1.75rem clamp(1.25rem, 5vw, 4rem) 3.5rem;
}
.cards--quad .card h2 { margin-bottom: 0.6rem; }   /* keeps the two-line title reserve so thumbnails line up */
.thumb--home { aspect-ratio: 16 / 9; width: var(--tw); margin-inline: auto; }
.thumb--home img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The placeholder card (no page yet): same shape, dashed outline, no fill, no shadow. */
.card--pending .thumb--home { border: 2px dashed var(--field-border); box-shadow: none; text-align: center; padding: 1rem; font-size: 0.9375rem; }
@container (max-width: 44rem) {
  .cards--quad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .thumb--home { width: 100%; }
}
@container (max-width: 26rem) {
  .cards--quad { grid-template-columns: minmax(0, 1fr); max-width: 22rem; margin-inline: auto; }
}

/* 9b. CASE STUDY PAGES (Project page; reused by every project) -----------------
   Layout: two buttons, then stacked sections. Each section = a text column
   (heading plus titled narratives) and an image column. Number of sections and
   narratives is free; copy the pattern in project.html. */
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 1.5rem; padding: 2rem clamp(1.25rem, 5vw, 4rem) 0.5rem; }
.btn--wide { min-width: min(16rem, 100%); padding: 0.7em 1.25em; text-align: center; }

.case-wrap { container-type: inline-size; }
.case { max-width: 68rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem) 7rem; }
.case-section { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 2rem clamp(2rem, 5vw, 4.5rem); align-items: start; padding: clamp(1.5rem, 4vw, 3rem) 0; }
.case-section h2 { margin: 0 0 1.25rem; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.narrative { margin: 0 0 1.5rem; }
.narrative h3 { margin: 0 0 0.4rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.narrative p, .narrative ul { margin: 0 0 0.6rem; }
.narrative ul { padding-left: 1.25rem; }
.narrative li { margin: 0.2rem 0; }

/* Data tables: light rules, left-aligned, readable at small widths. */
.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data caption { text-align: left; font-weight: 500; padding-bottom: 0.35rem; }
.data th, .data td { padding: 0.4rem 0.6rem 0.4rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid #d0d0d0; }
.data thead th { border-bottom: 2px solid var(--text); font-weight: 600; }
/* Wide tables (4+ columns): the wrapper scrolls sideways on narrow screens instead of widening the page.
   tabindex="0" in the HTML lets keyboard users scroll it; the focus ring below shows where they are. */
.table-scroll { overflow-x: auto; max-width: 100%; position: relative; }
.table-scroll:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.table-scroll .data { min-width: 30rem; font-size: 0.875rem; }


/* Image column. A screenshot is a button that opens the full-size viewer. */
.shot { margin: 0; }
.shot-btn { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; aspect-ratio: var(--ar, 9 / 20); }
.shot-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot-btn:focus-visible { outline: 2px solid #000; outline-offset: 4px; }
.shot--pending .shot-pending { display: grid; place-items: center; padding: 1rem; text-align: center; border: 2px dashed var(--field-border); border-radius: var(--radius); background: #fff; color: #444; font-size: 0.875rem; aspect-ratio: var(--ar, 9 / 20); }
.shot figcaption { margin-top: 0.5rem; font-size: 0.8125rem; color: #444; }

/* Wide case sections (single column) and a grid of project-page figures */
.case-section--wide { grid-template-columns: minmax(0, 1fr); }
.case-section--wide .shot { max-width: none; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; }
.shot-grid .shot { max-width: none; }
.case-note { max-width: 68rem; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 4rem) 6rem; font-size: 0.875rem; color: #444; }

@container (max-width: 44rem) {
  .case-section { grid-template-columns: minmax(0, 1fr); }
  .shot { max-width: 24rem; }
}

/* Back to top: fixed at the bottom right. The display preferences button sits to its left. */
.to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: grid; place-items: center; width: 44px; height: 44px; color: var(--text); background: #fff; border: 2px solid var(--btn-outline); border-radius: 50%; text-decoration: none; }
.to-top:hover, .to-top:focus-visible { background: var(--btn-fill); border-color: var(--btn-fill); color: var(--text); }
.to-top svg { width: 22px; height: 22px; }


/* 10. DISPLAY PREFERENCES -------------------------------------------------------
   Fixed at the bottom right, next to the back-to-top button slot. The panel
   slides open to the LEFT, away from the back-to-top button. */
.prefs {
  position: fixed; right: calc(1rem + 44px + 0.75rem); bottom: 1rem; z-index: 50;
  display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 0.5rem;
}
.prefs-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: var(--text); background: #fff; cursor: pointer;
  border: 2px solid var(--btn-outline); border-radius: 50%;
}
.prefs-btn:hover, .prefs-btn[aria-expanded="true"] { background: var(--btn-fill); border-color: var(--btn-fill); }
.prefs-btn svg { width: 26px; height: 26px; }

.prefs-panel {
  width: min(19rem, calc(100vw - 8rem));
  padding: 1rem;
  font-size: 0.9375rem;
  background: #fff; border: 2px solid var(--btn-outline); border-radius: 12px;
  /* closed: invisible, shifted toward the button, and not focusable */
  opacity: 0; visibility: hidden; transform: translateX(1rem);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.prefs.open .prefs-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.prefs-panel h2 { margin: 0 0 0.6rem; font-size: 1rem; font-weight: 700; }
.prefs-panel fieldset { margin: 0 0 0.7rem; padding: 0; border: 0; }
.prefs-panel legend { padding: 0; margin: 0 0 0.3rem; font-weight: 500; }

/* Text size choices look like three small buttons but are real radio buttons. */
.size-choices { display: flex; gap: 0.4rem; }
.size-choices label { flex: 1; }
.size-choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.size-choices span {
  display: block; padding: 0.4rem 0; text-align: center; cursor: pointer;
  background: #fff; border: 2px solid var(--btn-outline); border-radius: 6px;
}
.size-choices input:checked + span { background: var(--btn-fill); border-color: var(--btn-fill); }
.size-choices input:focus-visible + span { outline: 2px solid #000; outline-offset: 2px; }

.toggle { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.55rem; cursor: pointer; }
.toggle input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--link-active); }

.prefs-panel .btn { margin-top: 0.3rem; padding: 0.4em 0.9em; font-size: 0.9375rem; }

/* 11. PREFERENCE MODES ------------------------------------------------------------
   These switch on when a visitor changes the panel (js/site.js sets the
   data-* attributes on <html>). */

/* Text size: everything is in rem, so this scales the whole page. */
html[data-text="125"] { font-size: 125%; }
html[data-text="150"] { font-size: 150%; }

/* Extra spacing: the WCAG 1.4.12 text-spacing values. */
html[data-spacing="wide"] body { line-height: 1.8; letter-spacing: 0.12em; word-spacing: 0.16em; }
html[data-spacing="wide"] p { margin-bottom: 2em; }

/* High contrast: pure black on white, strong borders, no tints. */
html[data-contrast="high"] {
  --band: #ffffff; --thumb: #ffffff; --placeholder: #595959;
  --field-border: #000000; --link-active: #000000; --btn-outline: #000000; --btn-fill: #000000;
}
html[data-contrast="high"] .band { border-bottom: 3px solid #000; }
html[data-contrast="high"] .btn { color: #fff; }
html[data-contrast="high"] .btn:hover, html[data-contrast="high"] .btn:active, html[data-contrast="high"] .btn:focus-visible { color: #000; }
html[data-contrast="high"] .thumb { border: 2px solid #000; }
html[data-contrast="high"] .to-top:hover, html[data-contrast="high"] .to-top:focus-visible,
html[data-contrast="high"] .shot-btn { border: 2px solid #000; }
html[data-contrast="high"] .prefs-btn:hover, html[data-contrast="high"] .prefs-btn[aria-expanded="true"] { color: #fff; }
html[data-contrast="high"] .size-choices input:checked + span { color: #fff; }

/* Reduce motion: switched on by the panel, or automatically by the visitor's
   system setting. */
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after {
  transition: none !important; animation: none !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* 12. WHEN THERE IS NO ROOM FOR THE SIDEBAR (pull-out) ---------------------------
   Below 60em (about 960px at normal text size; it grows if a visitor enlarges
   text) the sidebar leaves the page and becomes a drawer that slides in from the
   left. A pull tab on the left edge opens and closes it. What stays on the page
   is only the logo and name, centered on white above the header band.
   js/site.js handles opening, Esc, the dark scrim and keyboard focus. */
.topbrand, .pull-tab, .scrim { display: none; }

/* The wiggle itself (defined here, outside the media query, so section 13 can reuse it at any width). */
@keyframes tab-nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(0.7rem); }
  50% { transform: translateX(0); }
  70% { transform: translateX(0.4rem); }
}

@media (max-width: 60em) {
  :root { --drawer-w: min(20rem, 85vw); }

  .layout { grid-template-columns: minmax(0, 1fr); }

  /* logo + name above the header band */
  .topbrand { display: block; padding: 1.25rem 1rem 1.1rem; text-align: center; background: #fff; }
  .topbrand .logo { width: 5.5rem; }
  .topbrand .name { margin: 0.5em 0 0; }

  /* the sidebar becomes the drawer; its logo and name stay at the top of it, as on the desktop (2026-11-16 22:18) */
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
    width: var(--drawer-w); max-width: none;
    margin: 0; padding: 1.75rem 1.5rem 2rem;
    overflow-y: auto;                 /* a small phone may need to scroll inside the drawer */
    font-size: 1rem;
    background: #fff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%); visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .drawer-open .sidebar { transform: none; visibility: visible; transition-delay: 0s; }

  /* dark layer behind the open drawer; clicking it closes the drawer */
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.4);
           opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
  .drawer-open .scrim { opacity: 1; visibility: visible; transition-delay: 0s; }

  /* pull tab, on the left edge; rides along with the drawer when it opens */
  .pull-tab {
    display: grid; place-items: center; position: fixed; z-index: 70;
    top: 40vh; left: 0; width: 2.75rem; height: 5.5rem; padding: 0;
    color: var(--text); background: var(--btn-fill); cursor: pointer;
    border: 2px solid var(--btn-outline); border-left: 0; border-radius: 0 12px 12px 0;
    transition: left 0.25s ease;
  }
  .pull-tab:hover, .pull-tab:focus-visible { background: #fff; }
  .pull-tab svg { width: 1.5rem; height: 1.5rem; transition: transform 0.25s ease; }
  .drawer-open .pull-tab { left: var(--drawer-w); }
  .drawer-open .pull-tab svg { transform: rotate(180deg); }

  /* wiggle: runs on page load and when scrolling back to the top (see js/site.js) */
  .pull-tab.nudge { animation: tab-nudge 0.9s ease; }

  html[data-contrast="high"] .pull-tab { color: #fff; }
  html[data-contrast="high"] .pull-tab:hover, html[data-contrast="high"] .pull-tab:focus-visible { color: #000; }
}

@media (max-width: 35em) {
  /* Small phones: the preferences panel opens upward instead of sideways. */
  .prefs { flex-direction: column-reverse; align-items: flex-end; }
  .prefs-panel { width: min(19rem, calc(100vw - 2rem)); transform: translateY(1rem); }
}

/* 13. GALLERY PAGES ---------------------------------------------------------------
   Three pages: gallery.html (landing: one card per project gallery) and one page per
   project (gallery-aloha.html, gallery-midjourney.html). Behavior lives in js/gallery.js.
   Design decisions are logged in docs/BUILD-LOG.md. */

/* 13a. Cards on the landing page lift a little on hover (thumbnails only, not the label). */
.cards--lift .card .thumb { transition: transform 0.18s ease, box-shadow 0.18s ease; }
html[data-motion="reduce"] .cards--lift a.card:hover .thumb { transform: none; }
@media (hover: hover) {
  .cards--lift a.card:hover .thumb { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}

/* 13b. Pull-out sidebar at EVERY width (project gallery pages have no header band).
   These rules mirror section 12 but are not wrapped in a media query; they apply when
   <html class="drawer-always">. The pull tab, scrim and sliding are identical. */
.drawer-always { --drawer-w: min(20rem, 85vw); }
.drawer-always .layout { grid-template-columns: minmax(0, 1fr); }
.drawer-always .sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  width: var(--drawer-w); max-width: none;
  margin: 0; padding: 1.75rem 1.5rem 2rem;
  overflow-y: auto; font-size: 1rem; background: #fff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(-100%); visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.drawer-always.drawer-open .sidebar { transform: none; visibility: visible; transition-delay: 0s; }
.drawer-always .scrim {
  display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.4);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.drawer-always.drawer-open .scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer-always .pull-tab {
  display: grid; place-items: center; position: fixed; z-index: 70;
  top: 40vh; left: 0; width: 2.75rem; height: 5.5rem; padding: 0;
  color: var(--text); background: var(--btn-fill); cursor: pointer;
  border: 2px solid var(--btn-outline); border-left: 0; border-radius: 0 12px 12px 0;
  transition: left 0.25s ease;
}
.drawer-always .pull-tab:hover, .drawer-always .pull-tab:focus-visible { background: #fff; }
.drawer-always .pull-tab svg { width: 1.5rem; height: 1.5rem; transition: transform 0.25s ease; }
.drawer-always.drawer-open .pull-tab { left: var(--drawer-w); }
.drawer-always.drawer-open .pull-tab svg { transform: rotate(180deg); }
.drawer-always .pull-tab.nudge { animation: tab-nudge 0.9s ease; }
html[data-contrast="high"].drawer-always .pull-tab { color: #fff; }
html[data-contrast="high"].drawer-always .pull-tab:hover, html[data-contrast="high"].drawer-always .pull-tab:focus-visible { color: #000; }

/* 13c. Project gallery page: logo + name at the left, search at the right, then the
   breadcrumb title, then the sections. No header band. */
.gmain { container-type: inline-size; width: 100%; max-width: 90rem; margin: 0 auto; padding: 1.25rem clamp(1rem, 2.5vw, 2rem) 7rem; }
.gtop { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem 1.5rem; }
.drawer-always .gtop .topbrand { display: block; padding: 0; text-align: center; background: none; }
.gtop .topbrand .logo { width: 4.5rem; }
.gtop .topbrand .name { margin: 0.45em 0 0; font-size: 1rem; }

/* Heading row: breadcrumb title (left), Last Updated (right), thin rule below. */
.gheading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--field-border); }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1em 0.6em; margin: 0; padding: 0; list-style: none; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; line-height: 1.2; }
.crumbs h1 { margin: 0; font-size: inherit; }
/* The ">" between the crumbs is decoration; the second declaration tells screen readers to skip it where supported. */
.crumbs li { display: flex; align-items: baseline; } /* keeps the ">" on the same line as the title */
.crumbs li + li::before { content: ">"; content: ">" / ""; margin-right: 0.6em; font-weight: 500; }
.updated { margin: 0; font-size: 0.9375rem; }

/* Sections and thumbnails. A section with no images disappears (the :has rule). */
.gsection { padding-top: 2.25rem; }
.gsection:not(:has(.gthumb)) { display: none; }
.gsection h2 { scroll-margin-top: 1rem; margin: 0 0 0.9rem; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.gthumbs { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
/* Screens: true shape (set by --ar), fixed width (17.5rem, about 70% of a 390px phone), so four across at 1440px.
   Other images: 16:9 tiles, three across, cropped to fill. */
.gthumbs .is-screen { flex: 0 0 min(17.5rem, calc((100% - 1.25rem) / 2)); }
.gthumbs .is-wide, .gthumbs .is-doc { flex: 0 0 calc((100% - 2.5rem) / 3); }
.gthumbs .is-full { flex: 0 0 100%; }   /* one tile across the whole row (the Make.com scenario pipeline) */
@container (max-width: 44rem) { .gthumbs .is-wide, .gthumbs .is-doc { flex-basis: calc((100% - 1.25rem) / 2); } .gthumbs .is-full { flex-basis: 100%; } }

.gthumb {
  display: block; width: 100%; padding: 0; cursor: zoom-in;
  border: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.is-screen .gthumb { aspect-ratio: var(--ar, 390 / 844); }
.is-wide .gthumb { aspect-ratio: 16 / 9; }
/* is-doc: pages, cards and screenshots shown uncropped at their own shape (--ar set on the <li>) */
.is-doc .gthumb { aspect-ratio: var(--ar, 4 / 3); }
.gthumbs { align-items: flex-start; }
.gthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gthumb:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
/* Lift on hover only for mouse-type pointers, and never when motion is reduced. */
@media (hover: hover) { .gthumb:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); } }
html[data-motion="reduce"] .gthumb:hover { transform: none; }
@media (prefers-reduced-motion: reduce) { .gthumb:hover { transform: none; } }

/* 13d. Search: magnifier, text field, clear (X). Results list opens under the field. */
.gsearch { position: relative; flex: 0 1 28rem; min-width: min(100%, 16rem); }
.gs-box { display: flex; align-items: center; gap: 0.5rem; height: 2.75rem; padding: 0 0.4rem 0 0.75rem; background: #fff; border: 1px solid var(--field-border); border-radius: 10px; }
.gs-box:focus-within { border-color: var(--btn-outline); outline: 2px solid #000; outline-offset: 2px; }
.gs-icon { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; color: var(--text); }
.gs-input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; font: inherit; font-size: 1rem; color: var(--text); background: transparent; border: 0; outline: 0; }
.gs-input::placeholder { color: var(--placeholder); opacity: 1; }
.gs-clear { flex: 0 0 auto; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; color: var(--text); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.gs-clear[hidden] { display: none; }
.gs-clear:hover { background: var(--band); }
.gs-clear:focus-visible { outline: 2px solid #000; outline-offset: 1px; }
.gs-clear svg { width: 1rem; height: 1rem; }

.gs-panel { position: absolute; top: calc(100% + 0.3rem); left: 0; right: 0; z-index: 75; /* above the pull tab (70) */ max-height: 16rem; overflow-y: auto; background: #fff; border: 1px solid var(--field-border); border-radius: 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.gs-panel[hidden], .gs-list[hidden], .gs-empty[hidden] { display: none; }
.gs-list { margin: 0; padding: 0.25rem; list-style: none; }
.gs-opt { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.6rem; border-radius: 8px; cursor: pointer; }
.gs-opt[hidden] { display: none; }   /* the picker and gallery search hide non-matching options with the hidden attribute; display:flex above would otherwise override it (2026-11-15, found by the other chat) */
.gs-opt:hover { background: var(--band); }
.gs-opt[aria-selected="true"] { background: var(--band); outline: 2px solid #000; outline-offset: -2px; }
.gs-opt img { flex: 0 0 auto; width: 4.5rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.gs-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.gs-label { font-size: 0.9375rem; font-weight: 500; }
.gs-sub { font-size: 0.875rem; color: #3d3d3d; } /* 8.9:1 on the band color */
.gs-empty { margin: 0; padding: 0.9rem 1rem; font-size: 0.9375rem; }

/* 13e. Full-size image viewer with annotation (a native <dialog> filled in by js/gallery.js).
   Sizes itself to the image: a tall phone screen makes a narrow viewer, a wide image a wide one.
   Clicking outside it, Esc, or the "Close" link closes it. */
html:has(.gview[open]) { overflow: hidden; } /* page behind does not scroll */
.gview { max-width: 94vw; max-height: 94vh; max-height: 94dvh; padding: 0; color: var(--text); background: #fff; border: 2px solid var(--field-border); border-radius: 14px; overflow: hidden; }
.gview::backdrop { background: rgba(0, 0, 0, 0.6); } /* dim layer: 60% black */
.gv-card { display: flex; flex-direction: column; width: min-content; /* as wide as the image, so the caption wraps to it */ min-width: min(20rem, 92vw); max-height: calc(94vh - 4px); max-height: calc(94dvh - 4px); }
.gv-stage {
  position: relative; z-index: 1; /* sits above the caption, so its shadow falls onto the caption and never onto the image */
  display: flex; justify-content: center; flex: 0 1 auto; min-height: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); /* Carl's design: X 0, Y 4, blur 10, spread 0, black at 25% */
}
.gv-img { display: block; width: auto; height: auto; max-width: min(92vw, 70rem); max-height: calc(94vh - 16rem); max-height: calc(94dvh - 16rem); object-fit: contain; }
.gv-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: #000; background: #fff; border: 2px solid #000; border-radius: 50%; cursor: pointer;
}
.gv-prev { left: 0.5rem; }
.gv-next { right: 0.5rem; }
.gv-nav:hover, .gv-nav:focus-visible { background: var(--btn-fill); }
.gv-nav[aria-disabled="true"] { opacity: 0.45; cursor: default; background: #fff; }
.gv-nav svg { width: 22px; height: 22px; }

.gv-caption { flex: 0 0 auto; padding: 1rem 1.25rem 0.75rem; }
.gv-caption--tab { background: var(--band); } /* annotation tab in header-band green: only the categories Carl named (persona set, empathy maps, matrix and trace, paper wireframes and journeys), set by data-captab in the gallery HTML (2026-11-13) */
.gv-text { max-height: 9rem; overflow-y: auto; }
.gv-title { margin: 0 0 0.4rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; outline: none; }
.gv-note { margin: 0 0 0.75rem; font-size: 0.9375rem; }
.gv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 1rem; font-size: 0.875rem; color: #444; }
.gv-link { padding: 0.35rem 0.1rem; font: inherit; color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; background: none; border: 0; cursor: pointer; }
.gv-link:hover, .gv-link:focus-visible { color: var(--link-active); text-decoration-thickness: 2px; }
.gv-link[hidden] { display: none; }
.gv-close { margin-left: auto; }
/* Paired-image link: its own row above the date line, two lines, left-aligned. */
.gv-pair { order: -1; flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 0.35rem; text-align: left; }

html[data-contrast="high"] .gthumb, html[data-contrast="high"] .gs-box { border: 2px solid #000; }
html[data-contrast="high"] .gv-stage { border-bottom: 2px solid #000; } /* a shadow is not enough contrast on its own */
html[data-contrast="high"] .gv-nav:hover, html[data-contrast="high"] .gv-nav:focus-visible { background: #000; color: #fff; }
html[data-contrast="high"] .gs-clear:hover { background: #000; color: #fff; }

/* 13f. "View" links, tall-image viewer and Before/After rows (2026-11-15, Website case study).
   .view-link opens the image viewer from a table cell. .gv-stage.is-tall lets a full-page wireframe scroll inside the viewer.
   .gpair is one full-width Before (left) / After (right) row on the Website gallery; each side is a normal .gthumb button. */
.view-link { display: inline-block; padding: 0.25rem 0; font-weight: 400; color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.view-link:hover { color: var(--link-active); text-decoration-thickness: 2px; }
.view-link:focus-visible { outline: 2px solid #000; outline-offset: 3px; border-radius: 2px; }
.view-row { display: block; margin-top: 0.15rem; }
td.view-cell { white-space: nowrap; }
.gv-nav[hidden] { display: none; }
.gv-scroll { display: flex; justify-content: center; min-width: 0; min-height: 0; }
.gv-scroll.is-tall { display: block; overflow-y: auto; max-height: calc(94vh - 12rem); max-height: calc(94dvh - 12rem); }
.gv-scroll.is-tall .gv-img { margin: 0 auto; max-width: none; max-height: none; width: min(92vw, 60rem); }
.gv-scroll.is-tall:focus-visible { outline: 2px solid #000; outline-offset: -4px; }
.gv-count { font-variant-numeric: tabular-nums; }
.gpairs { display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.gpair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.gpair-side { min-width: 0; }
.gpair-side .gthumb { aspect-ratio: var(--ar, 3 / 2); }
.gpair-tag { display: inline-block; margin: 0 0 0.5rem; padding: 0.15rem 0.75rem; font-size: 0.8125rem; font-weight: 600; line-height: 1.5; color: #000; background: var(--band); border: 1px solid var(--btn-outline); border-radius: 999px; }
.gpair-name { margin: 0 0 0.75rem; font-size: 0.9375rem; font-weight: 600; }
@media (max-width: 40em) { .gpair { grid-template-columns: minmax(0, 1fr); } }
html[data-contrast="high"] .gpair-tag { border-color: #000; background: #fff; }

/* 14. RESUME PAGE ---------------------------------------------------------------
   Layout from the Resume wireframe: header band, "View Portfolio" button, then
   Education (2 columns), Experience (1 column), Licenses & Certifications
   (2 columns), Skills (5 across), and the button again. Items are plain list
   entries, so adding or removing one never changes the layout: copy or delete
   one <li class="ritem"> in resume.html.
   The columns switch by the width of the content area (container query), the
   same way the cards and case studies do, so large text sizes reflow too. */
.resume-wrap { container-type: inline-size; }
.resume { max-width: 68rem; margin: 0 auto; padding: clamp(0.5rem, 2vw, 1.5rem) clamp(1.25rem, 5vw, 4rem) 1rem; }
.cta-row--end { padding-top: 2.75rem; padding-bottom: 6rem; }   /* space above the button; room below for the fixed back-to-top button */

.rsection { padding: clamp(1.5rem, 4vw, 2.75rem) 0 0; }
.rsection h2 { margin: 0 0 1.5rem; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.rsection h3.rsub { margin: 2rem 0 1rem; font-size: 1.0625rem; font-weight: 600; }
#r-tools.rsub { margin-top: 3.25rem; }   /* 2026-11-13 (Carl): Tools by suite lowered a little (about 20px) to separate it from the skills pills */

/* Two-column lists (Education, Licenses & Certifications, tools by suite). */
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem clamp(2rem, 5vw, 4.5rem); margin: 0; padding: 0; list-style: none; }
/* One-column list (Experience): full-width text under each job. */
.rstack { display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; }

.ritem h3 { margin: 0 0 0.25rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.ritem p { margin: 0 0 0.3rem; }
.ritem .rmeta { color: #444; font-size: 0.9375rem; }   /* #444 on white = 9.7:1 */
.ritem ul { margin: 0.35rem 0 0; padding-left: 1.25rem; }
.ritem li { margin: 0.2rem 0; }
.ritem--pending h3, .ritem--pending p { font-style: italic; color: #444; }

/* Skills: pills in the header-band green (black text on it is 17.5:1); they wrap to as many rows as needed. */
.skills { display: flex; flex-wrap: wrap; gap: 0.65rem 0.6rem; margin: 0; padding: 0; list-style: none; }
.skills li { padding: 0.4rem 1rem; font-size: 0.9375rem; line-height: 1.3; background: var(--band); border-radius: 999px; }
.skills .is-pending { font-style: italic; color: #444; }
html[data-contrast="high"] .skills li { border: 2px solid #000; }

@container (max-width: 44rem) { .rgrid { grid-template-columns: minmax(0, 1fr); } }

/* "View certificate" link under a credential. */
.ritem .rlink { margin: 0.4rem 0 0; font-size: 0.9375rem; }

/* Tools by suite: the main app icon at the left of the name, centered against the text block; a suite with several apps has an
   icon carousel beneath (js/carousel.js). A tool or app with no icon file yet shows a dashed square.
   Main icons are square files; the page rounds them with --radius and adds the shared soft shadow. Make's own module icons are
   round (transparent corners), so they get a matching drop-shadow instead of a square one. */
.tool-head { display: flex; align-items: center; gap: 1rem; }
.ritem--tool .ritem-text { min-width: 0; }
.tool-icon { flex: 0 0 3rem; width: 3rem; height: 3rem; border-radius: var(--radius); object-fit: contain; }
img.tool-icon { box-shadow: var(--shadow); }
img.tool-icon--round { box-shadow: none; border-radius: 0; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15)); }   /* transparent artwork keeps its own shape */
.tool-icon--pending { border: 2px dashed var(--field-border); }
html[data-contrast="high"] img.tool-icon--round { filter: none; }

/* Icon carousel: ONE carousel under the whole Tools by suite list (every application, in suite order). No background, no scroll bar.
   Chevron buttons are small see-through circles (white at 70%, thin dark ring) over the first and last visible icons. */
.icar { position: relative; margin-top: 3.75rem; }   /* clear space between the Tools list and the carousel; 2026-11-13 (Carl): moved down 12px so the gap above equals the gap below (60px each, with .cta-row--end) */
.icar-track { display: flex; gap: 0.25rem; margin: 0; padding: 0.4rem 0 0.5rem; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -ms-overflow-style: none; }
.icar-track::-webkit-scrollbar { display: none; }
.icar-track:focus-visible { outline: 2px solid #000; outline-offset: 2px; border-radius: var(--radius); }
.icar-item { flex: 0 0 5rem; text-align: center; font-size: 0.8125rem; line-height: 1.25; }
.icar-item .tool-icon { display: block; width: 2.5rem; height: 2.5rem; margin: 0 auto 0.4rem; }
.icar-btn {
  position: absolute; top: 0.9rem; z-index: 2; display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0;
  color: #000; background: rgba(255, 255, 255, 0.7); border: 1.5px solid rgba(0, 0, 0, 0.75); border-radius: 50%; cursor: pointer;
}
.icar-btn[hidden] { display: none; }
.icar-prev { left: 0; } .icar-next { right: 0; }
.icar-btn:hover, .icar-btn:focus-visible { background: rgba(179, 198, 177, 0.9); }
.icar-btn:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
html[data-contrast="high"] .icar-btn { background: #fff; border-color: #000; }

/* Project picker (Resume): a centered search field, about as wide as two of the old tabs, straddling the bottom edge of the header band.
   It reuses the Gallery search look (.gs-box, .gs-panel, .gs-opt); the list opens under it and is filtered as you type (js/project-picker.js). */
.ppick { position: relative; z-index: 76; width: min(calc(100% - 2.5rem), 36rem); margin: -1.375rem auto 0; }
/* Fix 2026-11-15: while the drawer is open (below 60em) the field must sit under the drawer (60) and its dark layer (55), not over them. */
.drawer-open .ppick { z-index: auto; }
.ppick .gs-box { box-shadow: var(--shadow); }
.ppick-links { margin: 0.5rem 0 0; padding: 0; list-style: none; text-align: center; }
html[data-contrast="high"] .ppick .gs-box { box-shadow: none; }
.ppick + .resume-wrap .resume { padding-top: 2.75rem; }   /* space between the picker and Education */

/* Single-column stack of wide screenshots (Midjourney result strips) so prompt text stays legible. */
.shot-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.shot-stack .shot { max-width: none; }

/* Stack of figures sharing one column of a two-column case section (Phase 1: persona set, then Leah's card). */
.shot-col { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.shot-col .shot { max-width: none; }
/* "View all" link under a phase's images; one per phase. */
.view-all { margin: 0.75rem 0 0; font-size: 1rem; }
.case-section > .view-all { grid-column: 1 / -1; }

/* ---- Make.com case study: module icons and tall settings screenshots ---- */
/* .mod-icon: 36px round tool icon beside a module name in the roles table; decorative (alt=""), the name is in text.
   .mod-icon--cap: 22px version in a figure caption. */
.mod-icon { width: 36px; height: 36px; vertical-align: middle; margin-right: 0.5rem; border-radius: 50%; }
.mod-icon--cap { width: 22px; height: 22px; margin-right: 0.25rem; }
/* .shot-grid--tall: settings screenshots are tall panels, so keep each column about 26rem wide and top-aligned. */
.shot-grid--tall { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); align-items: start; }
/* .shot-pair (2026-11-15): two same-size screenshots side by side, left-aligned, each at most 26rem wide; they stack when the column is narrow. */
.shot-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 26rem)); gap: 1.25rem; justify-content: start; align-items: start; margin-top: 1.75rem; }
.shot-pair .shot { max-width: none; }

/* .shot-pair--equal (2026-11-16): two cropped images side by side at equal height (width shares follow each image's aspect ratio); stacks on narrow screens. */
.shot-pair--equal { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; justify-content: center; }
.shot-pair--equal .shot { flex: var(--n, 1) 1 18rem; min-width: 0; max-width: none; }
.shot-pair--equal .shot-btn { aspect-ratio: auto; }
.shot-pair--equal .shot-btn img { height: auto; }
.shot-pair--center { max-width: 46rem; margin-inline: auto; }
@media (min-width: 40em) { .shot-pair--equal { flex-wrap: nowrap; } .shot-pair--equal .shot { flex-basis: 0; } }

/* Case-study spacing (2026-11-15): a paragraph or figure that follows a table, and a figure that follows text, get real separation; a figure that ends a narrative leaves room before the next heading. */
.case-section .narrative > table.data + p,
.case-section .narrative > .table-scroll + p { margin-top: 1.25rem; }
.case-section .narrative > .shot { margin: 1.75rem 0 0; }
.case-section .narrative > table.data + .shot,
.case-section .narrative > .table-scroll + .shot { margin-top: 1.75rem; }
.case-section .narrative:has(> .shot:last-child) { margin-bottom: 2.75rem; }
.case-section .narrative > p + .table-scroll,
.case-section .narrative > p + table.data { margin-top: 1rem; }
.case-section .narrative > .table-scroll + .table-scroll { margin-top: 1.75rem; }
.case-section .narrative > p + .shot-grid,
.case-section .narrative > p + .scroll-stack { margin-top: 1rem; }
.case-section .shot-pair { margin-top: 1.75rem; }
/* .mod-cell: icon + module name on one line inside a row-header cell (stops the name wrapping under the icon). */
.mod-cell { display: inline-flex; align-items: center; gap: 0.5rem; }
.mod-cell .mod-icon { margin-right: 0; flex: 0 0 auto; }
/* .mod-icon--free: the scheduled Webhook icon keeps its clock badge outside the circle, so no round clipping. */
.mod-icon--free { border-radius: 0; }

/* .shot--float: a screenshot pair with a transparent background and a baked-in rounded corner and soft shadow, so the
   screens sit on the page itself (no grey tile, no clipping). Used by the first-draft versus final pairs. */
.shot--float .shot-btn { background: transparent; border-radius: 0; overflow: visible; box-shadow: none; }
.shot--float .shot-btn img { object-fit: contain; }
html[data-contrast="high"] .shot--float .shot-btn { border: 0; }


/* High contrast: no soft shadows anywhere (the 2px black borders carry the edge instead). */
html[data-contrast="high"] { --shadow: none; --shadow-lift: none; }

/* Button text is bold site wide: .btn (above), the text-size choices, and the viewer's Close / link-style buttons. */
.size-choices span, button.gv-link { font-weight: 700; }

/* The fixed display-preferences wrapper spans the width of its hidden panel and was covering the
   Make.com home thumbnail, so clicks on it never reached the link. Only the button (and the open panel) take clicks. */
.prefs { pointer-events: none; }
.prefs-btn, .prefs.open .prefs-panel { pointer-events: auto; }


/* .scroll-stack: a vertical stack of screenshots inside its own scroll box (Make.com final configuration, Midjourney drift sequences).
   The page keeps scrolling normally when the pointer is off the box; wheel or touch inside it scrolls the stack, and
   when the stack reaches its end the page scrolls on. tabindex="0" in the HTML lets keyboard users scroll it; the ring below shows focus.
   The padding leaves room for the images' drop shadows, which would otherwise be clipped by the box. */
.scroll-stack {
  display: flex; flex-direction: column; gap: 1.5rem;
  max-width: 34rem; max-height: min(42rem, 80vh); margin-inline: auto; padding: 0.75rem 1rem 1rem;
  overflow-y: auto; scrollbar-gutter: stable;
  border: 1px solid #d0d0d0; border-radius: var(--radius);
}
.scroll-stack:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.scroll-stack .shot { max-width: none; flex: 0 0 auto; }
.scroll-stack-note { margin: 0 0 0.5rem; font-size: 0.8125rem; color: #444; text-align: center; }
html[data-contrast="high"] .scroll-stack { border: 2px solid #000; }

/* Drift sequences (Midjourney): the screenshot stacks sit in wide scroll boxes, with generous space between a caption and the
   next image, and between a caption and the next title. Joseph's tall screenshots are capped in width so each one is easier to take in. */
.scroll-stack--wide { max-width: none; max-height: min(44rem, 80vh); gap: 2.5rem; }
.scroll-stack--wide .shot-stack { gap: 2.5rem; margin-bottom: 0; }
.scroll-stack--wide h3 { margin: 0 0 1rem; }
.scroll-stack--wide .shot-stack + h3 { margin-top: 3.25rem; }
.scroll-stack--wide .shot figcaption { margin-top: 0.75rem; }
.scroll-stack--figs .shot { width: 100%; max-width: 48rem; margin-inline: auto; }

/* Gallery landing: the same 2 x 2 quadrant as Home, with 16:9 thumbnails sized from the width (not the window height). */
.cards--quad-free { --tw: clamp(13rem, min(calc((100dvh - 28rem) / 2 * 16 / 9), calc((100cqw - 2.5rem - 2 * clamp(1.25rem, 5vw, 4rem)) / 2)), 40rem);
  grid-template-columns: repeat(2, max(var(--tw), 21.5rem)); }   /* 2026-11-13 (Carl): bigger thumbnails. The column only needs to fit the longest title (21.5rem), not thumbnail + 6rem */   /* same idea as Home: as large as fits with no scrolling */
@container (max-width: 44rem) { .cards--quad-free { grid-template-columns: repeat(2, minmax(0, 1fr)); } }   /* narrow: columns follow the width again */
@container (max-width: 26rem) { .cards--quad-free { grid-template-columns: minmax(0, 1fr); } }
.thumb--wide { aspect-ratio: 16 / 9; width: var(--tw); margin-inline: auto; }
.thumb--wide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb--pending { display: grid; place-items: center; border: 2px dashed var(--field-border); border-radius: var(--radius); color: var(--placeholder); font-size: 0.9375rem; }   /* image not supplied yet */
@container (max-width: 44rem) { .thumb--wide { width: 100%; } }
/* First Draft screens: the original designs have a smaller corner, so an 8px radius keeps their corners from being cut off (Carl will audit). */
.gsection[aria-labelledby="s-firstdraft"] .gthumb { border-radius: 8px; }

/* .shot-row: a row of phone-sized screenshots (9:20) on the project page. Each screen is 10 to 13rem wide and the row
   wraps, so four screens sit on one line in a wide section. .shot-row--2 keeps exactly two side by side in a
   half-width column. Added 2026-11-14 for the ALOHA Phase 5, 6 and 9 sections. */
.shot-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 13rem)); gap: 1.25rem; align-items: start; justify-content: start; }
.shot-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot-row .shot { max-width: none; }

/* Digital wireframes (Menu, Item page): square corners, no radius, on the project page and in the gallery (Carl, 2026-11-16; it was 8px from 2026-11-14). */
.shot--wire .shot-btn { border-radius: 0; }
.gsection[aria-labelledby="s-digital"] .gthumb { border-radius: 0; }

/* Three wireframe callout slides side by side; wraps to fewer columns on narrow screens. */
.shot-row--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }

/* Wireframe callouts (2026-11-15): stacked one under another, no background, no shadow, no card (Carl). */
.shot-stack { display: grid; gap: 2.5rem; justify-items: start; }
/* Wireframes carry a title above each one: three grey-block screens stacked with nothing between
   them read as one long dark band (Carl, 2026-11-28). The label sits close to the screen it names
   and well clear of the one above, so the stack breaks into three. */
.shot-stack--labeled { gap: 0; }
.shot-stack--labeled > .stack-label { margin: 3rem 0 0.5rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.shot-stack--labeled > .stack-label:first-child { margin-top: 0; }
.shot--bare { width: 100%; max-width: 40rem; }
.shot--bare .shot-btn { box-shadow: none; border-radius: 0; background: none; overflow: visible; }
.shot--bare img { display: block; width: 100%; height: auto; }

/* Phase 9 board (2026-11-15): Home and Menu Categories stacked left, Item Customization spanning both rows in the centre, Added to Basket and Order Confirmation stacked right.
   Everything is sized in em and the board's font-size follows the page width, so the arrows stay lined up with the screens at any width. No captions (Carl).
   Arrows (decorative, aria-hidden): straight between screens in the same column, gently curved to and from the tall Item Customization screen. Colour --link-active (4.5:1 on white).
   Narrow container (under 34rem): one column in flow order with straight down arrows. */
.hifi-wrap { container-type: inline-size; }   /* the board scales to the width of this wrapper */
.hifi-board { --hx: 5em; --hy: 3.5em; font-size: clamp(0.5rem, calc(100cqw / 49), 1rem);
  display: grid; align-items: start; justify-content: start;
  grid-template-columns: 13em var(--hx) 13em var(--hx) 13em; grid-template-rows: auto var(--hy) auto;
  grid-template-areas: "home a2 item a3 basket" "a1 a2 item a3 a4" "menu a2 item a3 order"; }
.hifi-board__home { grid-area: home; } .hifi-board__menu { grid-area: menu; } .hifi-board__item { grid-area: item; align-self: center; }
.hifi-board__basket { grid-area: basket; } .hifi-board__order { grid-area: order; }
.hifi-board .shot { max-width: none; margin: 0; }
.hifi-arrow { color: var(--btn-outline); line-height: 0; }   /* logo green #7D9D79 (Carl, 2026-11-16) */
.hifi-arrow svg { display: block; }
.hifi-arrow--a1 { grid-area: a1; } .hifi-arrow--a2 { grid-area: a2; } .hifi-arrow--a3 { grid-area: a3; } .hifi-arrow--a4 { grid-area: a4; }
.hifi-arrow .a-straight { display: none; }
.hifi-arrow--a1 .a-straight, .hifi-arrow--a4 .a-straight { display: block; }
html[data-contrast="high"] .hifi-arrow { color: #000; }
@container (max-width: 34rem) {
  .hifi-board { font-size: 1rem; grid-template-columns: 13em; grid-template-rows: none;
    grid-template-areas: "home" "a1" "menu" "a2" "item" "a3" "basket" "a4" "order"; }
  .hifi-board__item { align-self: start; }
  .hifi-arrow .a-curve { display: none; }
  .hifi-arrow .a-straight { display: block; }
}

/* Sidebar pull tab (Carl, 2026-11-14): outlined at rest, filled on hover and keyboard focus (was the reverse).
   In high-contrast mode: black outline and black icon at rest, black fill with a white icon on hover. */
.pull-tab, .drawer-always .pull-tab { background: #fff; transition: left 0.25s ease, background-color 0.15s ease; }
.pull-tab:hover, .pull-tab:focus-visible, .drawer-always .pull-tab:hover, .drawer-always .pull-tab:focus-visible { background: var(--btn-fill); }
html[data-contrast="high"] .pull-tab, html[data-contrast="high"].drawer-always .pull-tab { color: #000; }
html[data-contrast="high"] .pull-tab:hover, html[data-contrast="high"] .pull-tab:focus-visible,
html[data-contrast="high"].drawer-always .pull-tab:hover, html[data-contrast="high"].drawer-always .pull-tab:focus-visible { color: #fff; }

/* 99. LEFT GUTTER WHILE THE PULL TAB IS SHOWING (Carl's build review, 2026-11-15; REMOVED 2026-11-16 23:23, see section 107) ---------------------
   The 3.5rem left gutter and the 3.5rem band padding below 60em are gone: the Back button moved into the top bar (section 107), so nothing floats over the left edge any more.
   Original reason, kept for the record:
   Below 60em the pull tab (2.75rem wide) and the back button are fixed on the left edge and would sit on top of the first letters of text,
   table rows and buttons. So every content container keeps a 3.5rem left gutter (tab 2.75rem plus the button's 0.5rem inset) until the permanent
   sidebar returns at 60em. The header bands get the same gutter on both sides so their centered text stays centered. Placed last so it wins over the base padding rules. */
@media (max-width: 60em) {
  .cards--quad { justify-content: safe center; }   /* if the two fixed-width columns are wider than the box, start at the gutter instead of overflowing equally to the left under the pull tab */
  .ppick { width: auto; max-width: 36rem; margin-left: max(1.25rem, calc(50% - 18rem)); margin-right: max(1.25rem, calc(50% - 18rem)); }
}

/* 100. GALLERY LANDING WITH THREE CARDS, AND CASE-STUDY BEFORE/AFTER HEADINGS (2026-11-15) ---------------
   The Portfolio Website case study no longer has a gallery, so the Gallery landing shows three cards. The third card spans both columns and sits centered under the first two,
   at the width of one column, so the grid has no empty slot. In the narrow layouts (columns follow the width, or one column) it matches those columns. */
.cards--three > li:last-child { grid-column: 1 / -1; justify-self: center; width: max(var(--tw), 21.5rem); }
@container (max-width: 44rem) { .cards--three > li:last-child { width: calc(50% - 0.625rem); } }
@container (max-width: 26rem) { .cards--three > li:last-child { width: 100%; } }
/* h4 inside a case-study narrative (the Before and After pairs on the Portfolio Website page): one step under the h3, with room above it. */
.narrative h4 { margin: 2rem 0 0.4rem; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.narrative h4 + .shot-grid, .narrative h4 + .shot-pair { margin-top: 0.75rem; }
.narrative h4 + .shot-grid + p, .narrative h4 + .shot-pair + p { margin-top: 1rem; }
/* Decision log: keep each date on one line. */
.data--log tbody th[scope="row"] { white-space: nowrap; }

/* 101. GALLERY LANDING: ROOM FOR THE BACK BUTTON AT 60em AND UP (2026-11-15) ---------------------------
   The Project Galleries page used to fix its back button over the permanent sidebar. It now sits under the header band like the other pages, so the first card
   keeps a 4rem left margin (and starts at it rather than overflowing to the left) on mid-width windows (60em to 80em) where the card grid reaches the left edge. */
@media (min-width: 60.01em) and (max-width: 80em) {
  .cards--quad-free { padding-left: 4rem; justify-content: safe center; }
}

/* 102. PORTFOLIO WEBSITE PAGE: CENTERED IMAGES, VIEWED LINKS, PACKED COLLAGES (2026-11-15) -------------------------
   - View links stay in the active color (the hover color) once opened, so a visitor keeps their place. js/site.js adds .is-viewed from localStorage.
   - .page-website (the <main> of project-website.html): images are centered on desktop (60em and up); their captions center under them.
   - .collage: a packed set of thumbnails (Accessibility Built In and Contrast Ratios). Each row is built so its tiles share one height and fill the width:
     every tile's flex-grow is its width-to-height ratio (--ar), so heights match. Tiles open the image viewer on the whole set (data-set, data-index). */
.view-link.is-viewed { color: var(--link-active); text-decoration-thickness: 2px; }
html[data-contrast="high"] .view-link.is-viewed { color: #000; text-decoration-thickness: 3px; }

.collage { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0 0; }
.collage-row { display: flex; gap: 0.75rem; align-items: flex-start; }
.collage-tile { display: block; flex: var(--ar) 1 0; min-width: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); line-height: 0; cursor: zoom-in; }
.collage-tile img { display: block; width: 100%; height: auto; }
.collage-tile:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
html[data-contrast="high"] .collage-tile { border: 2px solid #000; box-shadow: none; }
@media (max-width: 40em) {
  .collage-row { flex-wrap: wrap; }
  .collage-tile { flex: 1 1 calc(var(--ar) * 7rem); }
}

@media (min-width: 60em) {
  .page-website .case-section .narrative > .shot,
  .page-website .case-section--wide > .shot,
  .page-website .case-section--wide .shot-grid > .shot,
  .page-website .case-section--wide .shot-pair > .shot { margin-left: auto; margin-right: auto; }
  .page-website .shot-pair { justify-content: center; }
  .page-website .shot figcaption { text-align: center; }
  .page-website .shot-stack .shot { margin-left: auto; margin-right: auto; }
}

/* Gallery sets: the first image of a set stands for the whole set, with a pill that gives the count. The other images of the set sit in hidden list items
   (the viewer reads them, the grid does not show them). */
.gthumb-pill { position: absolute; right: 0.5rem; bottom: 0.5rem; padding: 0.2rem 0.65rem; font-size: 0.8125rem; font-weight: 600; line-height: 1.3; color: #000; background: #fff; border: 2px solid var(--btn-outline); border-radius: 999px; pointer-events: none; }
.gthumb--set { position: relative; }
html[data-contrast="high"] .gthumb-pill { border-color: #000; }

/* 103. WEBSITE GALLERY: PACKED COLLAGES (2026-11-16) ---------------------------------------------------------------
   Accessibility Built In and Contrast Ratios in gallery-website.html are collages that fill the width. Each row is built so its tiles share one height:
   a tile's flex-grow is its width-to-height ratio (--n). Every tile is still a .gthumb button, so the gallery viewer opens it with the arrows and the counter
   over the whole gallery, in the same order as before. The tiles use the full-size image, since a thumbnail would be stretched in a wide tile. */
.gcollage { display: flex; flex-direction: column; gap: 0.75rem; }
.gcollage-row { display: flex; gap: 0.75rem; align-items: flex-start; margin: 0; padding: 0; list-style: none; }
.gcollage-item { flex: var(--n) 1 0; min-width: 0; }
.gcollage-item .gthumb { width: 100%; aspect-ratio: var(--ar); }
@media (max-width: 40em) {
  .gcollage-row { flex-wrap: wrap; }
  .gcollage-item { flex: 1 1 calc(var(--n) * 7rem); }
}

/* 101. MOBILE TOP NAVIGATION WITH A HAMBURGER MENU (Next Step, 2026-11-16) -------------------------------
   Below 60em, on every page that is not a project gallery (<html class="drawer-always"> keeps its pull tab), the logo and name become a sticky top bar and
   a hamburger button opens the same sidebar drawer. The pull tab is hidden there. The button is a sibling of <main> (main is made inert while the drawer
   is open), fixed at the top right; while the drawer is open it moves to the drawer's top right corner and shows an X. Placed last so it wins. */
.menu-btn { display: none; }
@media (max-width: 60em) {
  html:not(.drawer-always) { scroll-padding-top: 4.75rem; }              /* anchors and focused elements stop below the bar */
  html:not(.drawer-always) .pull-tab { display: none; }
  html:not(.drawer-always) .topbrand {
    display: flex; align-items: center; gap: 0.75rem; position: sticky; top: 0; z-index: 40;
    padding: 0.4rem 4.25rem 0.4rem 1rem; text-align: left; background: #fff;
    box-shadow: 0 1px 0 var(--field-border), 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  html:not(.drawer-always) .topbrand .logo { width: 2.75rem; flex: none; }
  html:not(.drawer-always) .topbrand .name { margin: 0; }
  html:not(.drawer-always) .back-fab { top: 4.75rem; }                   /* just under the bar */
  html:not(.drawer-always) .menu-btn {
    display: grid; place-items: center; position: fixed; z-index: 70; top: 0.4rem; right: 0.75rem;
    width: 2.75rem; height: 2.75rem; padding: 0; cursor: pointer;
    color: #000; background: #fff; border: 2px solid var(--btn-outline); border-radius: 12px;
  }
  html:not(.drawer-always) .menu-btn:hover, html:not(.drawer-always) .menu-btn:focus-visible { background: var(--btn-fill); }
  html:not(.drawer-always) .menu-btn:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
  .menu-btn svg { width: 1.5rem; height: 1.5rem; }
  .menu-btn .ico-x { display: none; }
  .drawer-open:not(.drawer-always) .menu-btn { right: auto; left: calc(var(--drawer-w) - 3.5rem); }
  .drawer-open:not(.drawer-always) .menu-btn .ico-bars { display: none; }
  .drawer-open:not(.drawer-always) .menu-btn .ico-x { display: block; }
  html[data-contrast="high"]:not(.drawer-always) .menu-btn { border-color: #000; }
  html[data-contrast="high"]:not(.drawer-always) .menu-btn:hover, html[data-contrast="high"]:not(.drawer-always) .menu-btn:focus-visible { background: #000; color: #fff; }
}

/* 102. HAMBURGER MENU ON THE PROJECT GALLERY PAGES (Carl, 2026-11-16 12:58) --------------------------------
   Gallery pages (<html class="drawer-always">) have no permanent sidebar at any width, so the hamburger shows at every width, fixed at the top right
   like on the other pages, and the pull tab is hidden. The title row leaves room on the right so the search field never sits under the button. */
.drawer-always .pull-tab { display: none; }
.drawer-always .menu-btn {
  display: grid; place-items: center; position: fixed; z-index: 70; top: 0.75rem; right: 0.75rem;
  width: 2.75rem; height: 2.75rem; padding: 0; cursor: pointer;
  color: #000; background: #fff; border: 2px solid var(--btn-outline); border-radius: 12px;
}
.drawer-always .menu-btn:hover, .drawer-always .menu-btn:focus-visible { background: var(--btn-fill); }
.drawer-always .menu-btn:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.drawer-always .menu-btn svg { width: 1.5rem; height: 1.5rem; }
.drawer-always .menu-btn .ico-x { display: none; }
.drawer-always.drawer-open .menu-btn { right: auto; left: calc(var(--drawer-w) - 3.5rem); }
.drawer-always.drawer-open .menu-btn .ico-bars { display: none; }
.drawer-always.drawer-open .menu-btn .ico-x { display: block; }
.drawer-always .gtop { padding-right: 6.5rem; }   /* room for the hamburger and, beside it, the Back arrow (section 107) */
.drawer-always .back-fab { top: 4.75rem; }
html[data-contrast="high"].drawer-always .menu-btn { border-color: #000; }
html[data-contrast="high"].drawer-always .menu-btn:hover, html[data-contrast="high"].drawer-always .menu-btn:focus-visible { background: #000; color: #fff; }

/* 104. PHONE FIXES (Mobile round, 2026-11-16) ------------------------------------------------------------------
   Found by the phone audit (360, 390 and 430 px wide, portrait and landscape). Plain defects only; no change to the look of the desktop layout.
   - The drawer is a fixed box with top 0 and bottom 0, but .sidebar has align-self: start for the sticky desktop sidebar, and that made the fixed box as tall as its content
     instead of as tall as the screen. In landscape the lower part (Send Message) sat below the screen and could not be scrolled to. align-self: stretch fixes it; the drawer's own scrollbar then works.
   - Targets under 44 px in the drawer, the preferences panel, the image viewer, the gallery search and the case-study links are raised to 44 px.
     Where a text link is raised, negative margin takes back the extra height so the page layout does not move.
   - The preferences panel at 360 px stuck out 16 px on the left; it now ends at the same right margin as the button row.
   - The Resume project picker (z-index 76) covered the preferences and back-to-top buttons when it scrolled behind them; those two sit above it now (not while the drawer is open). */
@media (max-width: 60em) {
  .sidebar { align-self: stretch; overscroll-behavior: contain; }
  .sidebar .side-link, .sidebar .side-links .side-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0; margin: 0; }
  .sidebar .side-links { margin-top: 0.4rem; gap: 0; }
  .sidebar .side-section { margin-bottom: 1.25rem; }
  .sidebar .field input { height: 2.75rem; font-size: 1rem; }   /* 16 px: phones do not zoom the page on focus */
  .sidebar .field textarea { font-size: 1rem; }
  .sidebar .btn { min-height: 2.75rem; }
  .logo, .topbrand a.logo { min-height: 2.75rem; }
  .gs-box { height: 3rem; }
  .gs-clear { width: 2.75rem; height: 2.75rem; }
  .gv-link { min-height: 2.75rem; padding-left: 0.5rem; padding-right: 0.5rem; }
  .view-link { padding: 0.8rem 0.25rem; margin: -0.55rem 0; }
  .view-all a, .rlink a, .ppick-links a { display: inline-block; padding: 0.8rem 0.25rem; margin: -0.8rem -0.25rem; }
  .crumbs a { display: inline-block; padding: 0.55rem 0.25rem; margin: -0.55rem -0.25rem; }
  .prefs-panel .btn, .prefs-panel .prefs-reset { min-height: 2.75rem; min-width: 2.75rem; }
  .size-choices span { display: grid; place-items: center; min-height: 2.75rem; padding: 0; }
  .toggle { min-height: 2.75rem; margin-bottom: 0; }
  .prefs-panel { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
  html:not(.drawer-open) .prefs, html:not(.drawer-open) .to-top { z-index: 77; }
}
.drawer-always .sidebar { align-self: stretch; overscroll-behavior: contain; }
.drawer-always .sidebar .side-link, .drawer-always .sidebar .side-links .side-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0; margin: 0; }
.drawer-always .sidebar .side-links { margin-top: 0.4rem; gap: 0; }
.drawer-always .sidebar .side-section { margin-bottom: 1.25rem; }
.drawer-always .sidebar .field input { height: 2.75rem; font-size: 1rem; }
.drawer-always .sidebar .field textarea { font-size: 1rem; }
.drawer-always .sidebar .btn { min-height: 2.75rem; }
@media (max-width: 35em) {
  .prefs-panel { margin-right: calc(-1 * (44px + 0.75rem)); max-height: calc(100vh - 6rem); max-height: calc(100dvh - 6rem); }
}
@media (max-width: 60em) {
  .icar-btn { width: 2.75rem; height: 2.75rem; top: 0.525rem; }   /* Tools carousel arrows: 32 px to 44 px, same center line */
}
@media (max-width: 60em) {
  .view-link { min-width: 2.75rem; }   /* the short "View" link in table cells was 40 px wide */
}

/* 105. HOME PAGE AND DRAWER ON PHONES (Carl, 2026-11-16 22:18) ---------------------------------------------------
   1. Top bar: the logo sits at the left edge with "Carl Silva" right beside it; the hamburger stays at the right. (The base .logo rule centers with auto margins, which
      pushed the logo and name toward the middle of the bar.)
   2. Home header band: the bold subtitle gets a wider box (the band's 3.5rem left gutter was only for the old pull tab, which the top bar replaced) and, on phones, a size that
      scales with the screen (14 px floor, 16 px cap) so it sets as two lines at 360, 390 and 430 px wide.
   3. Home Projects (not the Gallery landing, which shares the .cards--quad class): one column, 16:9 thumbnails as wide as the screen allows (desktop's are about 459 px wide at a 1440 x 900 window; a phone cannot fit that, so they
      fill the width up to that size). The page scrolls.
   4. Drawer: the site logo and "Carl Silva" show above Details, centered, in the desktop layout (the two rules that hid them were removed above). */
@media (max-width: 60em) {
  html:not(.drawer-always) .topbrand { justify-content: flex-start; }
  html:not(.drawer-always) .topbrand .logo { margin: 0; }
  html:not(.drawer-always) .topbrand .name { text-align: left; }

  .band--compact { padding-left: 0.75rem; padding-right: 0.75rem; }
  .cards--quad:not(.cards--quad-free) { grid-template-columns: minmax(0, 1fr); max-width: none; margin-inline: 0; justify-content: stretch;
                 gap: 1.5rem; padding: 1.25rem 1rem 4.5rem; }
  .cards--quad:not(.cards--quad-free) .card { width: 100%; max-width: 28.75rem; margin-inline: auto; }
  .cards--quad:not(.cards--quad-free) .card h2 { min-height: 0; margin-bottom: 0.5rem; }
  .cards--quad:not(.cards--quad-free) .thumb--home { width: 100%; }
}
@media (max-width: 35em) {
  .band--compact .band-h2 { margin-inline: -0.25rem; font-size: clamp(0.875rem, 3.85vw, 1rem); }
}

/* 106. HEADER-BAND SUBTITLES, STACKED GALLERY CARDS, ALOHA PHASE 9, LOG SCROLL WINDOWS (Carl, 2026-11-16 22:52) -----------------------
   1. Every header band on phones: the subtitle lines (.band-h2 and .band-sub) use almost the full screen width, so they set in as few lines as possible. The band keeps its 3.5rem side
      padding (the Back button floats over the left edge and the title stays clear of it); only the subtitle lines reach out to 0.75rem from each edge. Home's band is already 0.75rem.
   2. Gallery landing on phones: one column, 16:9 thumbnails as wide as the screen allows up to 28.75rem, like Home. It keeps its 3.5rem left margin for the Back button.
   3. ALOHA Phase 9 board, one-column layout (container under 34rem): the screens are centered. They were left-aligned in the box.
   4. Log tables with data-rows (Website case study Decision Log and Defect Log): a box that shows the header and the first four rows and scrolls inside itself. js/site.js sets max-height
      from the measured row heights (never more than 80% of the window height); without JavaScript the full table shows. */
@media (max-width: 60em) {
  .cards--quad.cards--quad-free { grid-template-columns: minmax(0, 1fr); max-width: none; margin-inline: 0; justify-content: stretch; gap: 1.5rem; padding: 1.25rem 1rem 4.5rem; }
  .cards--quad.cards--quad-free > li, .cards--three > li:last-child { width: 100%; max-width: 28.75rem; margin-inline: auto; justify-self: stretch; }
  .cards--quad.cards--quad-free .card h2 { min-height: 0; margin-bottom: 0.5rem; }
  .cards--quad.cards--quad-free .thumb--wide { width: 100%; }
}
@container (max-width: 34rem) {
  .hifi-board { justify-content: center; }
}
.scroll-stack-note + .table-scroll { margin-top: 0.25rem; }
.case-section .narrative > .scroll-stack-note + .table-scroll { margin-top: 0.25rem; }
.table-scroll--rows { overflow: auto; border: 1px solid #d0d0d0; border-radius: var(--radius); padding: 0 0.75rem; scrollbar-gutter: stable; }
.table-scroll--rows .data { border-collapse: separate; border-spacing: 0; }
.table-scroll--rows .data thead th { position: sticky; top: 0; z-index: 1; background: #fff; }
html[data-contrast="high"] .table-scroll--rows { border: 2px solid #000; }

/* 107. BACK ARROW IN THE TOP BAR (Carl, 2026-11-16 23:23; extended to the project gallery pages at every width 23:46) -----------------------------
   The Back button is no longer a round white button floating over the left edge. It is just the arrow (no fill, no outline), directly left of the hamburger, in the same 44 px target.
   - Below 60em on every page that has the button (Project, Resume, Gallery landing and the four project galleries): the arrow sits in the top bar, left of the hamburger. With nothing floating
     at the left edge, the 3.5rem left gutter and the 3.5rem band padding are gone (section 99), so content, bands and cards use the full width.
   - Top-bar pages: the arrow is at the bar's height, and the bar's right padding leaves room so "Carl Silva" never runs under it.
   - Project gallery pages (no bar; the hamburger is fixed at the top right) at EVERY width, including 60em and wider: the arrow is fixed beside the hamburger. It has no fill, so a soft
     white halo keeps it readable over thumbnails; the title row keeps room on the right for both buttons. The gallery's old 3.5rem left margin at 60em and wider is gone.
   - Keyboard focus keeps the black 2px outline. Hover shows no fill either (the fill is what Carl asked to remove). High contrast mode keeps its 2px black outline (Carl, 23:46: leave it).
   - Project, Resume and Gallery landing at 60em and wider (permanent sidebar, no hamburger) are unchanged: the round button under the header band. */
.drawer-always .back-fab {
  top: 0.75rem; right: 3.75rem; left: auto; width: 2.75rem; height: 2.75rem;
  background: transparent; border: 0; border-radius: 12px; box-shadow: none;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 3px #fff);
}
html[data-contrast="high"].drawer-always .back-fab { border: 2px solid #000; }
@media (max-width: 60em) {
  .band { padding-left: 0.75rem; padding-right: 0.75rem; }
  html:not(.drawer-always) .topbrand { padding-right: 7rem; }
  html:not(.drawer-always) .back-fab {
    top: 0.4rem; right: 3.75rem; left: auto; width: 2.75rem; height: 2.75rem;
    background: transparent; border: 0; border-radius: 12px; box-shadow: none;
  }
  html[data-contrast="high"] .back-fab { border: 2px solid #000; }
}

/* 108. LANDSCAPE PHONE IMAGE VIEWER (Carl, 2026-11-17: "improve the landscape image viewer") ----------------------------------------------------
   In a landscape phone (about 360 to 430 px high) the caption and buttons below the image used 16rem of the height, so the image was about 110 px high (156 x 111 at 844 x 390).
   Here the caption sits beside the image instead of under it, so the image can use the full height of the viewer. Portrait phones and all wider, taller windows are unchanged. */
@media (orientation: landscape) and (max-height: 32rem) {
  .gview { max-width: 96vw; }
  .gv-card { flex-direction: row; width: auto; min-width: 0; max-width: 96vw; }
  .gv-stage { flex: 0 1 auto; min-width: 0; box-shadow: 4px 0 10px rgba(0, 0, 0, 0.25); }
  .gv-img { max-width: 62vw; max-height: calc(94vh - 4px); max-height: calc(94dvh - 4px); }
  .gv-caption { flex: 0 0 14rem; max-width: 14rem; max-height: calc(94dvh - 4px); overflow-y: auto; padding: 0.75rem 1rem; }
  .gv-text { max-height: none; }
  .gv-scroll.is-tall { max-height: calc(94vh - 4px); max-height: calc(94dvh - 4px); }
  .gv-scroll.is-tall .gv-img { width: min(62vw, 60rem); }
}

/* 109. FOOTER (Carl, 2026-11-20: "Add this line to the footer of all my pages, centered. Try to keep the home page from needing to scroll") ---------------------------------
   The pages had no footer. One centered line sits under the main column (under the whole page width on phones and on the four project galleries, where the sidebar is a drawer).
   The grid gets a second row that is only as tall as the footer; the first row takes the rest, so short pages still fill the window.
   Home and Gallery landing: the card block's bottom space (was 3.5rem) is cut to 0.75rem because the footer (about 2.5rem) now supplies the rest, so the thumbnail budget (28rem) is unchanged
   and those two pages keep fitting the window. Below 44em the footer keeps 4.5rem under the text so the fixed Back to top and Display preferences buttons never cover the line. */
.layout { grid-template-rows: 1fr auto; }
@media (min-width: 60.0625em) { html:not(.drawer-always) .sidebar { grid-row: 1 / span 2; } }   /* the sidebar's height must count for both rows, or it plus the footer would be taller than the window */
.site-foot { grid-column: -2 / -1; padding: 0.5rem 1rem 0.75rem; text-align: center; font-size: 0.875rem; line-height: 1.5; }
.site-foot p { margin: 0; text-wrap: balance; }
.site-foot span { white-space: nowrap; }
.cards--quad { padding-bottom: 0.75rem; }
@media (max-width: 44em) { .site-foot { padding-bottom: 4.5rem; } }

/* 110. "IN PROGRESS" TAG on a Home thumbnail (Carl, 2026-11-21): the Dashboards case study is published while unfinished, so its thumbnail says so. Real text (not part of the image), filled like the site's buttons (black bold text on the filled color),
   bottom right of the thumbnail. The .thumb box already clips and has no fill; the tag is the only thing on top of the image. */
.thumb--home { position: relative; }
.thumb-tag { position: absolute; right: 0.75rem; bottom: 0.75rem; padding: 0.3rem 0.75rem; border: 1px solid var(--btn-outline); border-radius: var(--radius); background: var(--btn-fill); color: #000; font-size: 0.875rem; font-weight: 700; line-height: 1.3; }
html[data-contrast="high"] .thumb-tag { border: 2px solid #000; }

/* 111. IMAGE VIEWER ZOOM (Carl, 2026-11-22: "add a zoom feature, a magnifier with a plus or minus, and/or two magnifiers (+/-) in the caption box") -----------------
   js/site.js section 21 adds the two buttons (.gv-zoomctl) to the caption line of every image viewer and the zoom on the picture itself.
   Buttons are 44 px, black icon on white, black 2 px outline, filled with the button color on hover or focus, like the viewer's arrows. */
.gv-zoomctl { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.gv-zoomctl + .gv-close { margin-left: 0; }
.gv-zbtn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #000; background: #fff; border: 2px solid #000; border-radius: 50%; cursor: pointer; }
.gv-zbtn svg { width: 24px; height: 24px; }
.gv-zbtn:hover, .gv-zbtn:focus-visible { background: var(--btn-fill); }
.gv-zbtn[aria-disabled="true"] { opacity: 0.45; cursor: default; background: #fff; }
.gv-zlevel { min-width: 3.1rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; color: #000; }
/* the picture: a magnifier with + (or - at the top level) on a mouse; no browser pinch or double-tap zoom, the viewer handles those */
.gv-scroll { touch-action: pan-x pan-y; }
.gv-scroll .gv-img { cursor: zoom-in; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='13' cy='13' r='9' fill='%23fff' fill-opacity='.85' stroke='%23000' stroke-width='3'/%3E%3Cpath d='M20 20l9 9' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M8.5 13h9M13 8.5v9' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 13 13, zoom-in; }
.gv-scroll.zoom-max .gv-img { cursor: zoom-out; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='13' cy='13' r='9' fill='%23fff' fill-opacity='.85' stroke='%23000' stroke-width='3'/%3E%3Cpath d='M20 20l9 9' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M8.5 13h9' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 13 13, zoom-out; }
.gv-scroll.is-dragging .gv-img { cursor: grabbing; }
.gv-scroll.is-zoomed { display: block; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.gv-scroll.is-zoomed:focus-visible { outline: 2px solid #000; outline-offset: -4px; }
.gv-scroll.is-zoomed .gv-img { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
html[data-contrast="high"] .gv-zbtn:hover, html[data-contrast="high"] .gv-zbtn:focus-visible { background: #000; color: #fff; }
/* In a landscape phone the caption is a side column. The two zoom buttons make the caption line taller, so the title and note scroll inside it and the date, counter, zoom buttons and Close stay in view (without this Close was pushed below the column on a long annotation). */
@media (orientation: landscape) and (max-height: 32rem) {
  .gv-caption { display: flex; flex-direction: column; overflow: hidden; }
  .gv-text { flex: 1 1 auto; min-height: 3rem; overflow-y: auto; }
  .gv-meta { flex: 0 0 auto; }
  .gv-zoomctl { margin-left: 0; }
  .gv-zlevel { min-width: 2.7rem; }
}

/* 112. SPACING BETWEEN BLOCKS ON THE DASHBOARDS PAGE (Carl, 2026-11-24: some phases had a little too much space between them; tables and lists stacked with no or almost no space) ---------------
   Tables that follow a table, and lists that follow a table, got no space (the existing rules cover only a paragraph or a figure after a table, and two table-scroll boxes).
   The space between phases is reduced a little on this page only (about 96 px between the end of one phase and the next heading on a wide window; it was 120 px). */
.case-section .narrative > table.data + table.data,
.case-section .narrative > table.data + .table-scroll,
.case-section .narrative > .table-scroll + table.data { margin-top: 1.75rem; }
.case-section .narrative > table.data + ul,
.case-section .narrative > .table-scroll + ul { margin-top: 1rem; }
.page-dashboards .case-section { padding: clamp(1.25rem, 3vw, 2.25rem) 0; }

/* 113. DEVICE BAND (Carl, 2026-11-25): the two supplied-device frames on the Dashboards page.
   The band is tinted the same flat tan-gray that is baked into the two images, so the image
   edges disappear into the band and only the device and its shadow read. Side by side from
   40em, stacked below it (the .shot-pair grid already does this). Caption #444 on #E6E2DD is
   7.5:1. Used by project-dashboards.html only. */
.device-band { margin-top: 1.75rem; padding: 1.5rem clamp(1rem, 3vw, 2rem) 1.25rem; background: #E6E2DD; }
.device-band .shot-pair { margin-top: 0; justify-content: center; }
/* The device shadow is already painted into each image, so the site's figure shadow and corner
   radius are dropped here on purpose: with them the image reads as a card sitting on the band
   instead of a device standing on it. */
.device-band .shot-btn { background: transparent; box-shadow: none; border-radius: 0; }
.device-band .device-note { margin: 1.75rem 0 0; font-size: 0.8125rem; color: #444; }

/* 114. SPACING AROUND FIGURE, TABLE AND MEDIA BLOCKS, ALL PAGES (Carl, 2026-11-25).
   A figure group has no bottom margin of its own and a table supplies none, so prose could sit
   0 to 16 px from the block it introduces and read as one lump. Every page now uses the same
   28 px between prose and a media or data block, in both directions, and between two such blocks.
   A heading keeps its tight 6 to 12 px, because a heading labels the block under it. Scoped to
   direct children of .narrative so figures inside a pair or row are not touched. */
.narrative > :is(p, ul, ol, dl, blockquote) + :is(table.data, .table-scroll, .shot-pair, .shot-stack, .shot-grid, .shot-row, .device-band, figure),
.narrative > :is(table.data, .table-scroll, .shot-pair, .shot-stack, .shot-grid, .shot-row, .device-band, figure) + :is(p, ul, ol, dl, blockquote, table.data, .table-scroll, .shot-pair, .shot-stack, .shot-grid, .shot-row, .device-band, figure),
.case-section .narrative > :is(p, ul, ol, dl, blockquote) + :is(table.data, .table-scroll, .shot-pair, .shot-stack, .shot-grid, .shot-row, .device-band, figure),
.case-section .narrative > :is(table.data, .table-scroll, .shot-pair, .shot-stack, .shot-grid, .shot-row, .device-band, figure) + :is(p, ul, ol, dl, blockquote, table.data, .table-scroll, .shot-pair, .shot-stack, .shot-grid, .shot-row, .device-band, figure) { margin-top: 1.75rem; }

/* 115. SCENARIO JOURNEY, DASHBOARDS PAGE (Carl, 2026-11-25, reworked 2026-11-27): a scenario's
   screens are one set, shown one at a time inside a wall-unit frame that does not move. Carl,
   2026-11-27: "the black bezel without the mount, to frame the dashboard screens ... where the
   screens change within the bezel(s)." So the frame is the padding box of .jrn-device and only the
   screens scroll inside it; nothing about the frame is repeated per screen. The artwork is the same
   generator that drew the supplied-device images, minus the bracket and the drop shadow, with the
   screen punched out: assets/images/dashboards/hub-device-frame.webp, 1734 x 1251 around a
   1600 x 1117 screen. The padding is that bezel as a share of the frame's own width (67 / 1734 =
   3.8639%), and percentage padding resolves against width on all four sides, so the artwork and the
   screen stay in register at any size. Native scroll with x snap does the rest: touch swipe,
   trackpad and wheel come free, the track is keyboard focusable (Left and Right page it), and with
   JavaScript off it is still a scrollable region. The chevrons and the "Screen 2 of 5" counter
   follow the Tools carousel on the Resume page (section 753, .icar). */
/* The scenario heading and its note belong to the screen labels under them, not to the section
   above, so the block sits well clear of what precedes it and close to the first label
   (Carl, 2026-11-27). */
/* A scenario is a focal point of this case study, so its heading is sized between the phase
   heading and an ordinary subsection heading, and the section stands well clear of the one
   above it: a title must never sit closer to the previous section's content than to its own
   (Carl, 2026-11-28). */
.case-section .narrative--scenario { margin-top: 4rem; }
.narrative--scenario > h3 { margin-bottom: 0.5rem; font-size: 1.25rem; font-weight: 700; }
.jrn { margin-top: 0.75rem; }
.jrn-device { padding: 3.8639%; background: url(../assets/images/dashboards/hub-device-frame.webp) no-repeat center / 100% 100%; }
.jrn-device img { display: block; width: 100%; height: auto; }
/* .shot-btn carries aspect-ratio: var(--ar, 9 / 20) for figures that declare their shape; inside
   the frame the screen sets its own height, so that is cleared. */
.jrn-device .shot-btn { display: block; width: 100%; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; aspect-ratio: auto; cursor: zoom-in; }
.jrn-device .shot-btn img { height: auto; object-fit: contain; }
.jrn-device .shot-btn:focus-visible { outline: 3px solid #000; outline-offset: -3px; }
/* A scenario with a single screen is framed too, but needs no track, counter or chevrons. */
.jrn-device--solo { margin-top: 1.75rem; }
.jrn-device--solo .shot-btn { border-radius: 1%; overflow: hidden; }
/* The frame art has rounded screen corners (16 of 1734), so the track clips to match and a
   dark screen does not show square corners through them. */
.jrn-track { border-radius: 1%; display: flex; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.jrn-track::-webkit-scrollbar { display: none; }
.jrn-track:focus-visible { outline: 3px solid #000; outline-offset: -3px; }
.jrn-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
/* The labels and texts sit above the frame. With the script off they simply stack, in order, and
   the whole set is readable. With it on they share one grid cell, so the frame and the chevrons
   hold still whatever the length of the text, and the active one sits at the foot of that cell,
   directly above the device it describes. */
.jrn-text > h4 { margin: 0 0 0.375rem; }
.jrn-text > p { margin: 0 0 1.75rem; }
.jrn-js .jrn-texts { display: grid; margin-bottom: 1.75rem; }
.jrn-js .jrn-text { grid-area: 1 / 1; align-self: end; visibility: hidden; }
.jrn-js .jrn-text.is-active { visibility: visible; }
.jrn-js .jrn-text > p { margin-bottom: 0; }
/* The note that introduces the swipe, directly under the scenario heading. */
.jrn-intro { font-size: 0.8125rem; color: #444; }   /* 9.7:1 on white */
.jrn-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.jrn-bar[hidden] { display: none; }
.jrn-count { margin: 0; font-size: 0.8125rem; color: #444; }   /* 9.7:1 on white */
.jrn-nav { display: flex; gap: 0.5rem; }
.jrn-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid #767676; border-radius: 50%; background: #fff; color: inherit; cursor: pointer; }
.jrn-btn:hover, .jrn-btn:focus-visible { background: rgba(179, 198, 177, 0.9); }
.jrn-btn:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.jrn-btn[disabled] { opacity: 0.35; cursor: default; }
.jrn-btn[disabled]:hover { background: #fff; }
html[data-contrast="high"] .jrn-btn { background: #fff; border-color: #000; }
/* A heading labels the block under it, so a device band straight after one keeps the page's
   12 px heading-to-media gap instead of the 28 px block gap. */
.narrative > :is(h2, h3, h4) + .device-band { margin-top: 0.75rem; }
