
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --green: #2D7A3A;
    --green-light: #EAF3DE;
    --green-mid: #2D7A3A;
    --header-h: 64px;
    --text: #1A1A1A;
    --text-secondary: #6B6B6B;
    --border: #E2E2DE;
    --bg: #F8F8F6;
    --white: #ffffff;
    --font-serif: 'DM Serif Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
  }

  /* Layout */
  /* Nav and content sit close together and are centered as one group */
  .page-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: max-content minmax(0, 720px);
    justify-content: center;
    gap: 0 3rem;
    align-items: start;
  }

  .content {
    max-width: 720px;
    min-width: 0;
    padding: 3.5rem 0 8rem;
  }

  /* Sticky TOC */
  .toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    padding: 2rem 0 2rem;
    font-size: 13px;
  }

  .toc-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
  }

  .toc a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.3rem 0;
    border-left: 2px solid var(--border);
    padding-left: 0.75rem;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1.4;
  }

  .toc a:hover,
  .toc a.active {
    color: var(--green);
    border-left-color: var(--green);
  }

  .toc a.active { font-weight: 500; }

  /* Hero */
  .hero {
    border-bottom: 1px solid var(--border);
    padding-bottom: 2.25rem;
    margin-bottom: 0;
  }


  h1 {
    font-family: var(--font-serif);
    font-size: 3.25rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 560px;
    margin-bottom: 2.5rem;
  }


  /* Hero: title bands over a full-bleed image, client called out below */
  .hero-visual {
    position: relative;
    margin-top: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    container-type: inline-size;
    min-height: 277px;
    padding: 1.25rem 0 4rem;
  }

  /* The image fills the frame as a backdrop; the text sets the frame's height */
  .hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 78% center;
  }

  .hero-titles {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    gap: 8px;
    max-width: 90%;
    font-family: 'Poppins', var(--font-sans);
  }

  /* The title is one stacked lockup: each line is a black band, the lines sit close together,
     and the first and last bands carry extra black at the top and bottom of the whole lockup */
  .hero-titles h1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    max-width: 100%;
    font-family: 'Poppins', var(--font-sans);
    font-weight: 600;
    font-size: 1.9rem;
    font-size: min(1.9rem, 5cqw);
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--white);
    margin: 0;
  }

  .hero-titles h1 .band {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    background: #000;
    color: var(--white);
    /* Each band hugs its line. The black is the same 0.5em on the right, above the caps of the
       first line and below the baseline of the last; the left margin is a fixed 1.25em. */
    padding: 0.05em 0.5em 0.05em 1.25em;
  }

  /* The first band also carries 0.225em below its baseline, so the black under the end of line one
     matches the rest; the second band pulls up by the extra so the line spacing does not change */
  .hero-titles h1 .band:first-child { padding-top: 0.225em; padding-bottom: 0.225em; }
  .hero-titles h1 .band:last-child { padding-bottom: 0.225em; }
  .hero-titles h1 .band + .band { margin-top: calc(-0.175em - 1px); }

  /* Black backing bar with the white box lifted above its top edge and offset from its right and bottom */
  .hero-titles .hero-subtitle {
    --lift: 4px;
    --offset: 10px;
    background: #000;
    margin: 0;
    width: min(36rem, 78cqw);
    max-width: none;
    padding: 0 var(--offset) var(--offset) 1.5rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text);
  }

  .hero-titles .hero-subtitle span {
    display: block;
    position: relative;
    top: calc(var(--lift) * -1);
    margin-bottom: calc(var(--lift) * -1);
    background: var(--white);
    border: 2px solid #000;
    padding: 0.6rem 1rem;
    text-wrap: balance;
  }

  .hero-client {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.75rem 0;
  }

  .hero-client-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
  }

  /* At a glance */
  .glance {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .glance-item {
    background: var(--white);
    padding: 1.1rem 1.25rem;
  }

  .glance-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
  }

  .glance-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.45;
  }

  /* Sections */
  .section {
    padding: 2.25rem 0;
    border-bottom: 1px solid var(--border);
  }

  /* Same space above every divider, whatever the last element is */
  .section > :last-child { margin-bottom: 0; }

  .section:last-child {
    border-bottom: none;
  }

  h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.9rem;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
  }

  h3 {
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text);
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.01em;
  }

  h3:first-child { margin-top: 0; }

  p {
    color: var(--text);
    margin-bottom: 1.1rem;
  }

  p:last-child { margin-bottom: 0; }

  /* Blockquote */
  blockquote {
    border-left: 3px solid var(--green);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: var(--green-light);
    border-radius: 0 6px 6px 0;
  }

  blockquote p {
    font-size: inherit;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-style: italic;
  }

  blockquote cite {
    font-size: 13px;
    font-style: normal;
    color: var(--text-secondary);
    font-weight: 500;
  }

  /* Ordered list steps */
  ol.steps {
    counter-reset: steps;
    list-style: none;
    margin: 1.25rem 0;
  }

  ol.steps li {
    counter-increment: steps;
    display: flex;
    gap: 1rem;
    margin-bottom: 0.85rem;
    color: var(--text);
    align-items: flex-start;
  }

  ol.steps li::before {
    content: counter(steps);
    min-width: 26px;
    height: 26px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
  }

  /* Bullet list */
  ul.bullets {
    list-style: none;
    margin: 1rem 0;
  }

  ul.bullets li {
    padding: 0.5rem 0 0.5rem 1.25rem;
    position: relative;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }

  ul.bullets li:last-child { border-bottom: none; }

  ul.bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    /* Center the dot on the first line of text: top padding plus half the line height, less half the dot */
    top: calc(0.5rem + 0.875em - 3px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
  }

  /* User type cards */
  .user-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
  }

  .user-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
  }

  .user-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--green-mid);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
  }

  .user-card p {
    font-size: 16px;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
  }

  /* Stats row: kept for layout, now used for outcome cards */
  /* Persona icons: same box for both, so the titles line up across cards */
  .user-card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
  }

  .user-card-icon {
    width: 44px;
    height: 40px;
    flex: none;
    color: var(--green-mid);
  }

  .user-card-head .user-card-title { margin-bottom: 0; }

  .stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
  }

  .stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: left;
  }

  .stat-number {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--green);
    line-height: 1;
    margin-bottom: 0.4rem;
  }

  .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.35;
  }

  /* Qualitative outcome cards */
  .outcome-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
  }

  .outcome-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.4rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .outcome-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(45, 122, 58, 0.1);
  }

  .outcome-card-icon {
    font-size: 1.3rem;
    line-height: 1;
    margin-bottom: 0.25rem;
  }

  .outcome-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-mid);
    letter-spacing: -0.01em;
  }

  .outcome-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
  }

  /* Image placeholder */
  .img-placeholder {
    background: var(--white);
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    margin: 2rem 0 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    min-height: 300px;
  }

  .img-placeholder.tall { min-height: 420px; }
  .img-placeholder.short { min-height: 200px; }

  .img-placeholder-icon {
    width: 40px;
    height: 40px;
    border: 1.5px dashed var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .img-placeholder-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--border);
  }

  .img-placeholder-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
  }


  .img-placeholder-slot {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.7;
  }

  .img-placeholder-hint {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.45;
    max-width: 36ch;
    padding: 0 1rem;
  }

  .img-placeholder.inline { margin: 0 0 0.4rem; min-height: 160px; }
  .img-placeholder.phone {
    width: 100%;
    max-width: 220px;
    min-height: 0;
    aspect-ratio: 9 / 19;
    margin: 0 auto 0.5rem;
    border-radius: 16px;
  }

  /* Annotated screenshots: image and numbered key share one frame */
  .figure-frame {
    margin: 2rem 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  /* No bottom padding: the cropped edge sits flush on the divider */
  .figure-media { padding: 1rem 1rem 0; }

  .figure-media img {
    display: block;
    width: 100%;
    max-width: 699px;
    height: auto;
    margin: 0 auto;
  }

  /* Back-to-back figures read as a pair */
  .figure-frame + .figure-frame { margin-top: 1rem; }

  .fig-key {
    list-style: none;
    margin: 0;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 0.65rem;
    counter-reset: fk;
  }

  .fig-key li {
    counter-increment: fk;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
  }

  .fig-key li::before {
    content: counter(fk);
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: #AF13C9;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  @media (max-width: 600px) {
    .figure-media { padding: 0.5rem 0.5rem 0; }
    .fig-key { padding: 0.9rem 1rem; }
  }

  /* Device / channel diagram: key and drawing share one frame; the key stays at a fixed size */
  .diagram {
    max-width: 640px;
    margin: 2rem auto 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .diagram-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 3rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .legend-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .legend-icon { width: 28px; height: 28px; flex: none; }

  .legend-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #1A2233;
  }

  .legend-sub {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    color: #5F6E85;
  }

  .diagram-svg {
    display: block;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    padding: 1.25rem 1.25rem 1.5rem;
    font-family: var(--font-sans);
  }

  .diagram-svg .d-fridge { font-size: 26px; font-weight: 600; fill: #1A2233; }
  .diagram-svg .d-label  { font-size: 28px; font-weight: 600; fill: #fff; }

  @media (max-width: 600px) {
    /* Key stacks on phones, left aligned inside the frame */
    .diagram-legend { flex-direction: column; align-items: flex-start; gap: 0.7rem; padding: 0.9rem 1rem; }
    .diagram-svg { padding: 0.9rem 0.75rem 1.1rem; }
    /* Labels grow in drawing units so they stay near 15px as the drawing narrows */
    .diagram-svg .d-fridge { font-size: 42px; }
    .diagram-svg .d-label  { font-size: 38px; }
    .diagram-svg .d-link { stroke-width: 6; stroke-dasharray: 16 12; }
    .diagram-svg .d-box { stroke-width: 5; }
  }

  /* Product photos: white backgrounds blend into the page */
  .product-pair {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    align-items: flex-start;
    margin: 1.5rem 0;
  }

  .product-item {
    flex: 1 1 220px;
    text-align: center;
  }

  .product-frame {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-frame img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    mix-blend-mode: multiply;
  }

  .product-caption {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0.5rem 0 0;
  }

  /* Product screenshots */
  .shot {
    display: block;
    width: 100%;
    max-width: 742px;
    height: auto;
    margin: 2rem 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  /* Mobile screens: three across on desktop, a swipeable strip on phones */
  .phone-row {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0 0.75rem;
    align-items: flex-start;
  }

  .phone-item { flex: 1; min-width: 0; text-align: center; }

  .phone-shot {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 16px;
  }

  .phone-caption {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0.5rem 0 0;
  }

  @media (max-width: 600px) {
    /* Three screens side by side, scaled to fit the width of the page */
    .phone-row {
      gap: 8px;
      margin-left: -1rem;
      margin-right: -1rem;
    }
    .phone-item { flex: 1 1 0; min-width: 0; }
    .phone-shot { max-width: none; border-radius: 10px; }
    .phone-caption { font-size: 12px; }
  }

  /* Tenor embed under the Problem heading */
  .gif-embed {
    max-width: 420px;
    margin: 1.25rem 0 1.5rem;
  }

  .section-lede {
    font-style: italic;
    color: var(--text-secondary);
  }

  .img-caption {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    padding-left: 0.25rem;
  }

  .img-caption-center {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
  }

  /* Flow path */
  .flow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 500;
  }

  .flow-step {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-size: 15px;
    color: var(--text);
    white-space: nowrap;
  }

  .flow-arrow {
    color: var(--text-secondary);
    font-size: 15px;
    flex-shrink: 0;
  }

  /* Collaborators */
  .collab-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .collab-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }

  .collab-item:last-child { border-bottom: none; }

  .collab-role {
    font-size: 17px;
    font-weight: 600;
    color: var(--green-mid);
    flex: 0 0 190px;
    line-height: 1.4;
  }

  .collab-desc {
    font-size: 17px;
    color: var(--text);
    line-height: 1.6;
  }

  @media (max-width: 480px) {
    .collab-item { flex-direction: column; gap: 0.25rem; }
    .collab-role { flex: 0 0 auto; }
  }

  /* Footer */
  .footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    font-size: 16px;
    color: var(--text-secondary);
  }

  strong { font-weight: 600; }

  /* ── Scroll-triggered entrance animations ── */
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal.no-transition,
  .reveal-stagger.no-transition > * {
    transition: none !important;
  }

  /* Staggered children */
  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: none; }

  /* Blockquote slides in from left */
  blockquote.reveal {
    transform: translateX(-16px);
  }
  blockquote.reveal.visible {
    transform: translateX(0);
  }

  /* Flow steps sequential highlight */
  .flow-step {
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  }
  .flow-step.highlighted {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green-mid);
  }

  /* Stat cards hover lift */
  .stat-card {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(45, 122, 58, 0.12);
  }

  /* User cards hover lift */
  .user-card {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  }

  /* Defined terms: dotted underline tooltip */
  .term {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--green);
    text-underline-offset: 3px;
    cursor: help;
    position: relative;
    white-space: nowrap;
    font-weight: 600;
  }

  .term-tooltip {
    position: fixed;
    z-index: 1000;
    background: var(--text);
    color: #fff;
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    max-width: min(260px, calc(100vw - 24px));
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(4px) scale(0.97);
    transition: opacity 0.15s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .term-tooltip.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .term-tooltip .tip-word {
    display: block;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9debb0;
    margin-bottom: 0.2rem;
  }

  @media (max-width: 860px) {
    .page-grid { grid-template-columns: minmax(0, 1fr); }
    .toc { display: none; }
    .content { width: 100%; margin: 0 auto; padding: 2.5rem 0 5rem; }
    h1 { font-size: 2.25rem; }
    .glance { grid-template-columns: 1fr; }
    .user-cards { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .outcome-cards { grid-template-columns: 1fr; }
  }

  @media (max-width: 600px) {
    /* Bands stay layered over the image; the frame grows with the text */
    .hero-titles { max-width: 100%; gap: 8px; }
    .hero-titles h1 { font-size: min(1.35rem, 5.5cqw); }
    .hero-titles .hero-subtitle {
      width: 92cqw;
      font-size: 0.86rem;
      line-height: 1.4;
      --lift: 4px;
      --offset: 6px;
      padding: 0 var(--offset) var(--offset) 1rem;
    }
    .hero-titles .hero-subtitle span {
      padding: 0.45rem 0.75rem;
      border-width: 2px;
    }
    .hero-visual {
      margin-left: -2rem;
      margin-right: -2rem;
      border: 0;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      min-height: 212px;
      padding: 0.75rem 0 3rem;
    }
  }


  /* Sticky site header */
  html { scroll-padding-top: calc(var(--header-h) + 1rem); }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(248, 248, 246, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
  }

  .site-header-inner {
    position: relative;
    height: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }

  /* Two-line wordmark: "sam" in italic serif over tracked capitals; sam is never larger than GENSBURG */
  .site-logo {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    line-height: 1;
    color: var(--text);
    text-decoration: none;
  }

  .site-logo .logo-first {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.01em;
  }

  .site-logo .logo-last {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.1575em;
    margin-right: -0.1575em;
    text-transform: uppercase;
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .site-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
  }

  .site-nav a:hover,
  .site-nav a[aria-current] { color: var(--text); }

  .site-nav a.site-cta {
    color: var(--white);
    background: var(--green);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    transition: background 0.15s;
  }

  .site-nav a.site-cta:hover { background: #245F2E; color: var(--white); }

  .site-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
  }

  .site-menu-btn .cross { display: none; }
  .site-menu-btn[aria-expanded="true"] .bars { display: none; }
  .site-menu-btn[aria-expanded="true"] .cross { display: inline; }

  .site-menu-btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
  }

  /* Collapse to logo and menu button on small screens */
  @media (max-width: 860px) {
    :root { --header-h: 56px; }
    /* Fully opaque, so a heading that scrolls under the header is completely hidden */
    .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
    .site-header-inner { padding: 0 2rem; }
    .site-logo .logo-first, .site-logo .logo-last { font-size: 13px; }
    .site-menu-btn { display: inline-flex; }
    .site-nav {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 0.5rem 2rem 1.25rem;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
    }
    .site-nav.open { display: flex; }
    .site-nav a {
      font-size: 17px;
      padding: 0.85rem 0;
      border-bottom: 1px solid var(--border);
    }
    .site-nav a.site-cta {
      margin-top: 1rem;
      padding: 0.8rem 1.1rem;
      text-align: center;
      border-bottom: 0;
    }
  }

  /* Section label in the header (phones): replaces the wordmark once the hero has scrolled away */
  .site-slot { display: flex; align-items: center; }
  .site-ctx { display: none; }
  .site-jump { display: none; }

  @media (max-width: 860px) {
    .site-slot {
      display: grid;
      align-items: center;
      height: 100%;
      min-width: 0;
      overflow: hidden;
    }
    .site-slot > * { grid-area: 1 / 1; }

    .site-logo,
    .site-ctx {
      transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, visibility 0s linear 0s;
    }

    .site-ctx {
      display: flex;
      align-items: center;
      transform: translateY(100%);
      opacity: 0;
      visibility: hidden;
      transition-property: transform, opacity, visibility;
      transition-delay: 0s, 0s, 0.25s;
    }

    .site-slot[data-ctx="on"] .site-logo {
      transform: translateY(-100%);
      opacity: 0;
      visibility: hidden;
      transition-delay: 0s, 0s, 0.25s;
    }

    .site-slot[data-ctx="on"] .site-ctx {
      transform: none;
      opacity: 1;
      visibility: visible;
      transition-delay: 0s;
    }

    .site-ctx-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      min-height: 44px;
      margin: 0;
      padding: 0;
      font: inherit;
      font-size: 16px;
      font-weight: 600;
      color: var(--text);
      background: none;
      border: 0;
      border-radius: 8px;
      cursor: pointer;
      max-width: 100%;
    }

    .site-ctx-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

    .ctx-clip {
      display: inline-grid;
      overflow: hidden;
      height: 1.5em;
      line-height: 1.5;
      text-align: left;
    }
    /* The label and its chevron are one item, so they slide in and out together */
    .ctx-item {
      grid-area: 1 / 1;
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      white-space: nowrap;
    }

    .ctx-chev { flex: none; color: var(--text-secondary); transition: transform 0.2s ease; }
    .site-ctx-btn[aria-expanded="true"] .ctx-chev { transform: rotate(180deg); }

    .site-jump {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      display: none;
      flex-direction: column;
      max-height: calc(100vh - var(--header-h));
      max-height: calc(100dvh - var(--header-h));
      overflow-y: auto;
      padding: 0.25rem 2rem 1.25rem;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
    }
    .site-jump.open { display: flex; }

    .site-jump a {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.8rem 0;
      font-size: 17px;
      color: var(--text-secondary);
      text-decoration: none;
      border-bottom: 1px solid var(--border);
    }
    .site-jump a:last-child { border-bottom: 0; }
    .site-jump a.jump-home { font-weight: 600; color: var(--text); }
    /* Current section: green, semibold, and a thin tall bar 10px to the left of the word */
    .site-jump a[aria-current] { position: relative; color: var(--green); font-weight: 600; }
    .site-jump a[aria-current]::after {
      content: "";
      position: absolute;
      left: -13px;
      top: 10px;
      bottom: 10px;
      width: 3px;
      border-radius: 2px;
      background: var(--green);
    }

  }

  /* Reduced motion: crossfade instead of sliding */
  @media (max-width: 860px) and (prefers-reduced-motion: reduce) {
    .site-slot .site-logo,
    .site-slot .site-ctx {
      transform: none !important;
      transition: opacity 0.2s ease, visibility 0s linear 0.2s !important;
    }
    .site-slot[data-ctx="on"] .site-ctx { transition: opacity 0.2s ease !important; }
    .ctx-chev { transition: none !important; }
  }

  /* One micro-label style: same size, weight and tracking; color varies by role */
  .toc-label,
  .glance-label,
  .user-card-title,
  .hero-client-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  /* Keyboard focus */
  a:focus-visible,
  .term:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
    border-radius: 2px;
  }

  /* Respect reduced-motion settings */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
    }
    .reveal,
    .reveal-stagger > * {
      opacity: 1 !important;
      transform: none !important;
    }
  }

@media (min-width: 641px) {
  .content p, .fig-key li > span, .content li { text-wrap: pretty; }
  .keep-together { white-space: nowrap; }
}
.hero-titles { width:94%; max-width:94%; }
.hero-titles .hero-subtitle { width:max-content; max-width:100%; }
.hero-titles .hero-subtitle span { white-space:nowrap; padding:0.6rem 1rem; text-wrap:nowrap; }
@media(max-width:600px) { .hero-titles .hero-subtitle { font-size:clamp(9px, 2.65vw, 13.76px); padding-left:0.75rem; } .hero-titles .hero-subtitle span { padding-left:0.65rem; padding-right:0.85rem; } }
.va-user { display:flex; gap:1.5rem; align-items:center; margin:1.5rem 0; }
.va-user img { width:160px; height:160px; flex:none; border-radius:50%; }
.va-user ul { margin:0; }
.va-figure { margin:2rem 0 0; }
.va-figure img { display:block; width:100%; height:auto; }
.va-figure .figure-media { padding:1rem; background:white; }
.va-screen-group { display:grid; grid-template-columns: 33% 67%; align-items:start; }
.va-screen-crop { overflow:hidden; position:relative; }
.va-screen-crop img { width:303.03%; max-width:none; }
.va-screen-pair img { width:149.25%; max-width:none; margin-left:-49.25%; }
.va-screen-crop img, .va-screen-pair img { display:block; height:auto; }
.va-figure .fig-key { counter-reset:fk; }
.va-figure .fig-key li::before { background:#ff009d; }
@media(max-width:600px) { .va-user { align-items:flex-start; flex-direction:column; } .va-screen-group { grid-template-columns:1fr; gap:1rem; } .va-figure .figure-media { padding:0.5rem; } .va-screen-crop { width:49.25%; max-width:none; margin:0 auto; } .va-screen-pair { width:100%; overflow:hidden; } }

.review-change { background:#fff0b3; color:#1a1a1a; box-shadow:0 0 0 3px #fff0b3; border-radius:2px; }
.review-note { background:#fff6d6; border:1px solid #d8ba58; padding:1rem 1.25rem; border-radius:8px; margin-bottom:1.5rem; font-size:14px; }
.glance-item.review-added { background:#fff6d6; }
@media(min-width:641px) { .orphan-pair { white-space:nowrap; } .content p, .glance-value, .fig-key li, .bullets li, #tip-def { text-wrap:pretty; } }

/* Single-column layout: shared width and equal gutters for header and content. */
@media (max-width: 860px) {
  .page-grid, .site-header-inner { max-width:784px; padding-left:2rem; padding-right:2rem; margin-left:auto; margin-right:auto; }
}

@media (max-width: 860px) {
  .site-slot.site-menu-open[data-ctx="on"] .site-logo {
    transform:translateY(0); opacity:1; visibility:visible; transition-delay:0s;
  }
  .site-slot.site-menu-open[data-ctx="on"] .site-ctx {
    transform:translateY(100%); opacity:0; visibility:hidden; pointer-events:none; transition-delay:0s;
  }
}

.site-menu-backdrop { display:none; }
@media (max-width:860px) {
  .site-menu-backdrop { display:block; position:fixed; inset:0; z-index:49; background:rgba(0,0,0,0.38); opacity:0; visibility:hidden; pointer-events:none; transition:opacity 180ms ease, visibility 180ms ease; }
  .site-menu-backdrop.visible { opacity:1; visibility:visible; pointer-events:auto; }
  .site-nav a:not(.site-cta) { color:var(--text); }
  .site-nav a[aria-current="true"] { position:relative; color:var(--green); font-weight:600; }
  .site-nav a[aria-current="true"]::before { content:''; position:absolute; left:-0.85rem; top:0.65rem; bottom:0.65rem; width:3px; border-radius:3px; background:var(--green); }
}
@media (prefers-reduced-motion:reduce) { .site-menu-backdrop { transition:none; } }

.site-nav a[aria-current="true"] { font-weight:600; }

.site-nav a:not(.site-cta) { color:var(--text); }
.site-nav a[aria-current="true"] { color:var(--green); font-weight:600; }

/* Actual Inter Bold face for current navigation destinations. */
.site-nav a[aria-current="true"], .toc a.active,
.site-jump a[aria-current="true"], .site-ctx-btn { font-weight:700; }

.context-question { margin:1.25rem 0; padding:1rem 1.25rem; background:#fff6d6; border-left:3px solid #b18a22; border-radius:0 6px 6px 0; font-size:14px; }
.context-question p { margin-bottom:0.5rem; }

.work-main { max-width:1180px; margin:0 auto; padding:4.5rem 2rem 6rem; }
.work-intro { max-width:760px; margin-bottom:3rem; }
.work-intro h1 { font-size:clamp(2.5rem,5vw,4.5rem); font-weight:400; margin-bottom:1rem; }
.work-intro p { font-size:1.15rem; color:var(--text-secondary); max-width:620px; }
.work-eyebrow { color:var(--green); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.12em; margin-bottom:1rem; }
.work-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2rem; }
.work-card { display:block; text-decoration:none; color:var(--text); background:white; border:1px solid var(--border); border-radius:10px; overflow:hidden; transition:transform .18s,box-shadow .18s; }
.work-card:hover { transform:translateY(-4px); box-shadow:0 12px 28px #0000000d; }
.work-card:focus-visible { outline:3px solid var(--green); outline-offset:5px; }
.work-card img { display:block; width:100%; aspect-ratio:1.85; object-fit:cover; }
.work-card-copy { padding:1.5rem; }
.work-client { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:var(--text-secondary); margin-bottom:.5rem; }
.work-card h2 { margin-bottom:.75rem; font-size:1.9rem; }
.work-card p { font-size:16px; line-height:1.6; margin-bottom:1.25rem; }
.work-card-cta { font-size:14px; font-weight:600; color:var(--green); }
@media(max-width:700px) { .work-grid { grid-template-columns:1fr; gap:1.5rem; } .work-main { padding-top:2.75rem; } }
@media(prefers-reduced-motion:reduce) { .work-card { transition:none; } }

.portfolio-mode-switch { position:fixed; right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); z-index:100; display:flex; gap:4px; padding:5px; border:1px solid #c9cec7; border-radius:999px; background:#f8f8f6; box-shadow:0 3px 15px #0002; font:500 13px/1.3 Inter,system-ui,sans-serif; letter-spacing:normal; }
.portfolio-mode-switch a, .portfolio-mode-switch span { padding:9px 13px; border-radius:999px; text-decoration:none; color:#1a1a1a; }
.portfolio-mode-switch [aria-current] { background:#2d7a3a; color:white; font-weight:700; }
.portfolio-mode-switch a:focus-visible { outline:3px solid #2d7a3a; outline-offset:2px; }

.portfolio-mode-switch > a, .portfolio-mode-switch > span { display:inline-flex; align-items:center; gap:6px; }
.portfolio-mode-switch .mode-label { padding:0; border-radius:0; color:inherit; }
.portfolio-mode-switch .mode-icon { flex:none; }

.portfolio-mode-switch > a, .portfolio-mode-switch > span { width:44px; height:44px; padding:0; justify-content:center; box-sizing:border-box; }
.portfolio-mode-switch .mode-icon { display:block; }

/* Homepage thumbnails reserve a compact crop rather than the source image height. */
.work-card img { height:auto; }
@media(max-width:700px) {
 .work-card img { height:clamp(160px,48vw,240px); aspect-ratio:auto; object-fit:cover; }
}
