/* Layout: a black starfield, four white pill buttons pinned to the corners, a glowing blue name pill
     top-centre, and the rotating planet as the only image on the page. Single dark look by choice. */
  :root {
    --bg: #04050a;
    --pill: #ffffff;
    --ink: #0b0d14;
    --fg: #f2f4fa;
    --muted: #8b91a3;
    --blue: #2f6bff;
    --on-blue: #ffffff;
    --glow: rgba(47, 107, 255, 0.75);
    /* thick acrylic pill, modelled on the reference "Glassy Button" */
    --glass-top: rgba(244, 245, 248, 0.94);
    --glass-bottom: rgba(226, 228, 234, 0.94);
    --glass-rim: rgba(255, 255, 255, 1);
    --glass-edge: rgba(255, 255, 255, 0.75);
    --glass-inset: rgba(20, 24, 40, 0.10);
    --glass-text: #0b0d14;
    --glass-shadow: rgba(0, 0, 0, 0.55);
    --glass-blue-top: rgba(92, 140, 255, 0.95);
    --glass-blue-bottom: rgba(38, 92, 245, 0.95);
    --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --edge: clamp(14px, 1.8vw, 24px);
    color-scheme: dark;
  }
  /* Day mode: same layout on white; buttons flip to black so they still read as objects */
  body.day {
    --bg: #ffffff;
    --pill: #0b0d14;
    --ink: #ffffff;
    --fg: #0b0d14;
    --muted: #6b7183;
    --glow: rgba(47, 107, 255, 0.45);
    --glass-shadow: rgba(30, 36, 60, 0.20);
    color-scheme: light;
  }
  html, body { height: 100%; }
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--mono);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
  }

  /* ---------- pill buttons ---------- */
  .pill {
    box-sizing: content-box;
    position: fixed;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 6px 12px;   /* same footprint as the section tag */
    border-radius: 999px;
    /* frosted glass: translucent fill, blurred backdrop, bright top edge, soft drop shadow */
    background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--glass-edge);
    box-shadow:
      inset 0 -2px 1px var(--glass-rim),         /* bright lower rim */
      inset 0 2px 3px var(--glass-inset),        /* shade under the top edge */
      inset 2px 0 3px -1px var(--glass-inset),
      inset -2px 0 3px -1px var(--glass-inset),
      0 2px 3px -1px rgba(0, 0, 0, 0.08),
      0 12px 26px -10px var(--glass-shadow);   /* soft lift */
    color: var(--glass-text);
    font: 400 12px/1 var(--mono);
    letter-spacing: 0.06em;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition:
      border-color .35s cubic-bezier(.2,.7,.2,1),
      color .35s cubic-bezier(.2,.7,.2,1),
      background-color .35s cubic-bezier(.2,.7,.2,1),
      box-shadow .35s cubic-bezier(.2,.7,.2,1),
      transform .35s cubic-bezier(.2,.7,.2,1);
  }
  .pill::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 45%);
    opacity: 0.6;
    pointer-events: none;
  }
  .pill.round { min-width: 50px; padding-inline: 10px; }
  .pill:hover, .pill:focus-visible {
    background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom));
    border-color: rgba(170, 200, 255, 0.7);
    color: var(--on-blue);
    box-shadow:
      inset 0 -2px 1px rgba(190, 212, 255, 0.9),
      inset 0 2px 3px rgba(0, 20, 90, 0.25),
      0 12px 26px -10px var(--glass-shadow),
      0 0 22px 3px var(--glow);
    transform: translateY(5px);
    outline: none;
  }
  .pill:active { transform: translateY(6px) scale(.97); }

  /* the back button only exists on inner pages */
  body:not(.paged) .tl { display: none; }
  body.paged .tl { animation: rise .4s cubic-bezier(.2,.7,.2,1); }
  .tl { top: calc(var(--edge) + env(safe-area-inset-top, 0px)); left: var(--edge); }
  .tr { top: calc(var(--edge) + env(safe-area-inset-top, 0px)); right: var(--edge); }
  .bl { bottom: calc(var(--edge) + env(safe-area-inset-bottom, 0px)); left: var(--edge); }
  .br { bottom: calc(var(--edge) + env(safe-area-inset-bottom, 0px)); right: var(--edge); }

  .bc { bottom: calc(var(--edge) + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); }
  .bc:hover, .bc:focus-visible { transform: translateX(-50%) translateY(5px); }
  .bc:active { transform: translateX(-50%) translateY(6px) scale(.97); }
  body { transition: background-color .5s ease; }

  .name {
    top: calc(var(--edge) + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    min-height: 40px;
    padding: 10px 21px;
    background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom));
    border-color: rgba(170, 200, 255, 0.7);
    color: var(--on-blue);
    box-shadow:
      inset 0 -2px 1px rgba(190, 212, 255, 0.9),
      inset 0 2px 3px rgba(0, 20, 90, 0.25),
      0 12px 26px -10px var(--glass-shadow),
      0 0 18px 2px var(--glow);
    font: 500 18px/1 var(--sans);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .name:hover, .name:focus-visible { transform: translateX(-50%) translateY(5px); box-shadow: 0 0 26px 6px var(--glow); }

  /* ---------- menu panel (opens from the bottom-right button) ---------- */
  .menu {
    position: fixed;
    z-index: 7;
    right: var(--edge);
    bottom: calc(var(--edge) + env(safe-area-inset-bottom, 0px) + 40px);
    width: min(260px, calc(100vw - 2 * var(--edge)));
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border-radius: 24px;
    background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--glass-edge);
    box-shadow:
      inset 0 -2px 1px var(--glass-rim),
      inset 0 2px 3px var(--glass-inset),
      0 24px 48px -16px var(--glass-shadow);
    transform-origin: 100% 100%;
    animation: menu-in .32s cubic-bezier(.2,.8,.2,1);
  }
  .menu[hidden] { display: none; }
  .menu-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--glass-text);
    font: 400 15px/1.1 var(--mono);
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
  }
  .menu-item span { font-size: 12px; color: #6b7183; letter-spacing: 0.04em; }
  .menu-item:hover, .menu-item:focus-visible {
    background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom));
    color: var(--on-blue);
    outline: none;
  }
  .menu-item:hover span, .menu-item:focus-visible span { color: rgba(255, 255, 255, 0.8); }
  .pill[aria-expanded="true"] {
    background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom));
    color: var(--on-blue);
    box-shadow: inset 0 -2px 1px rgba(190, 212, 255, 0.9), inset 0 2px 3px rgba(0, 20, 90, 0.25), 0 0 22px 3px var(--glow);
  }
  @keyframes menu-in { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }

  /* ---------- centre stage ---------- */
  #stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
  main {
    position: relative;
    z-index: 1;
    height: 100%;
    display: grid;
    place-items: center;
    padding-inline: 16px;
  }
  .stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 2vh, 22px);
    transform: translateY(-1vh);
  }
  .orbit {
    animation: sway 7s ease-in-out infinite;
    transform-origin: 50% 60%;
  }
  canvas {
    display: block;
    width: min(92vw, 640px);
    aspect-ratio: 1 / 0.66;
    max-width: 100%;
    cursor: grab;
    touch-action: none;
    filter: drop-shadow(0 0 26px var(--glow));
  }
  canvas.dragging { cursor: grabbing; }
  .caption {
    margin: 0;
    max-width: 34ch;
    text-align: center;
    color: var(--muted);
    font: 400 15px/1.25 var(--mono);
    letter-spacing: 0.06em;
    text-wrap: balance;
  }

  canvas.on-ring { cursor: pointer; }

  /* ---------- ring label + ring pages ---------- */
  .ring-tip {
    position: fixed;
    z-index: 6;
    left: 0; top: 0;
    pointer-events: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--blue);
    color: var(--on-blue);
    font: 400 14px/1 var(--mono);
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 0 18px 3px var(--glow);
    opacity: 0;
    transform: translate(-50%, -140%) scale(.92);
    transition: opacity .25s ease, transform .25s cubic-bezier(.2,.7,.2,1);
  }
  .ring-tip.show { opacity: 1; transform: translate(-50%, -175%) scale(1); }
  .page[hidden] { display: none; }
  .sr-links { position: absolute; top: 0; left: 0; }
  .sr-links a {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  body.paged main { visibility: hidden; }
  .page {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding-inline: 16px;
    text-align: center;
  }
  .page-inner {
    max-width: 40rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: rise .6s cubic-bezier(.2,.7,.2,1);
  }
  .eyebrow {
    font: 400 13px/1 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--blue);
  }
  .page h1 {
    margin: 0;
    color: var(--fg);
    font: 500 clamp(42px, 9vw, 92px)/0.95 var(--sans);
    letter-spacing: -0.03em;
    text-wrap: balance;
  }
  .page p {
    margin: 0;
    max-width: 44ch;
    color: var(--muted);
    font: 400 15px/1.55 var(--mono);
    letter-spacing: 0.02em;
    text-wrap: pretty;
  }
  .pill.inline { position: relative; margin-top: 8px; }
  /* page transition: a full-screen sheet of characters, shown only while switching pages */
  #warp { position: fixed; inset: 0; z-index: 40; width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; display: none; pointer-events: none; filter: none; }
  .ring-hero { position: relative; width: min(560px, 86vw); height: min(300px, 34vh); margin-bottom: -4px; }
  .ring-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: none; aspect-ratio: auto; max-width: none; cursor: default; touch-action: auto; }
  /* ---------- research: a card-file cabinet of stacked folders ---------- */
  .page.research { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; overflow: hidden; padding: 70px 16px 84px; text-align: left; }
  .page.research[hidden] { display: none; }
  .research-wrap {
    width: 100%;
    max-width: 1040px;
    height: 100%;
    max-height: 760px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: rise .6s cubic-bezier(.2,.7,.2,1);
  }
  /* centred title with the page excerpt right beneath it */
  .research-head {
    width: 100%;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 4px 20px;
    text-align: center;
  }
  /* small glass tag naming the section; it sits on the same top line as Back and About */
  /* each page keeps its moon name in its own markup; one shared tag at the top shows it, above every layer */
  .page > .tag { display: none; }
  .page-tag[hidden] { display: none; }
  .page-tag { animation: tagIn .4s cubic-bezier(.2,.7,.2,1); }
  @keyframes tagIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
  .page-tag {
    position: fixed;
    z-index: 5;
    top: calc(var(--edge) + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
  }
  .tag {
    box-sizing: content-box;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom));
    border: 1px solid rgba(170, 200, 255, 0.6);
    box-shadow: inset 0 -1px 1px rgba(190, 212, 255, 0.8), inset 0 1px 2px rgba(0, 20, 90, 0.25), 0 0 14px 1px var(--glow);
    color: var(--on-blue);
    font: 400 12px/1 var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .research-head p { max-width: 46ch; text-align: center; text-wrap: balance; }
  /* ---------- the system page scrolls: the catalogue first, then the story of how it was made ---------- */
  #system { overflow-y: auto; place-items: start center; align-items: start; padding-bottom: 110px; }
  #system { -webkit-mask-image: linear-gradient(transparent 0, #000 74px, #000 calc(100% - 78px), transparent 100%); mask-image: linear-gradient(transparent 0, #000 74px, #000 calc(100% - 78px), transparent 100%); }
  #system .research-wrap { height: auto; max-height: none; }
  #system .catalog { flex: none; height: auto; min-height: 0; max-height: none; }
  #system .catalog-grid { grid-auto-rows: 200px; overflow: visible; }
  .story-hint { margin: 22px 0 0; text-align: center; font: 400 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--muted); }
  .story { width: 100%; display: flex; flex-direction: column; gap: 84px; padding: 72px 0 0; }
  .story-sec { display: flex; flex-direction: column; gap: 18px; }
  .story-no { font: 400 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
  .story-sec h3 { margin: 0; color: var(--fg); font: 500 clamp(28px, 3.6vw, 44px)/1.05 var(--sans); letter-spacing: -0.03em; }
  .story-sec > p { margin: 0; max-width: 64ch; color: var(--muted); font: 400 14px/1.65 var(--mono); letter-spacing: 0.01em; }
  .story-sec a { color: var(--fg); text-underline-offset: 3px; }
  .story-sec a:hover { color: var(--blue); }
  .story-stats, .story-steps, .story-calc { display: grid; gap: 1px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(130, 165, 255, 0.28); background: rgba(130, 165, 255, 0.2); }
  .story-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .story-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .story-calc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-stats > div, .story-steps > div, .story-calc > div { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; background: rgba(9, 14, 42, 0.92); }
  body.day .story-stats > div, body.day .story-steps > div, body.day .story-calc > div { background: rgba(240, 244, 255, 0.96); }
  .story-stats b { color: var(--fg); font: 500 clamp(22px, 2.4vw, 30px)/1 var(--sans); letter-spacing: -0.02em; }
  .story-steps b { color: var(--fg); font: 500 20px/1 var(--sans); }
  .story-stats span, .story-steps span { color: var(--muted); font: 400 12px/1.5 var(--mono); }
  .story-calc .k { font: 400 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
  .story-calc code { align-self: flex-start; padding: 6px 9px 5px; background: #1f4fe0; color: #fff; font: 400 12.5px/1.3 var(--mono); }
  .story-calc p { margin: 0; color: var(--muted); font: 400 12.5px/1.6 var(--mono); }
  .story-table { overflow-x: auto; border-radius: 18px; border: 1px solid rgba(130, 165, 255, 0.28); background: rgba(9, 14, 42, 0.92); }
  body.day .story-table { background: rgba(240, 244, 255, 0.96); }
  .story-table table { width: 100%; min-width: 760px; border-collapse: collapse; font: 400 12.5px/1.5 var(--mono); }
  .story-table th { text-align: left; padding: 14px 16px 12px; font-weight: 400; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); border-bottom: 1px solid rgba(130, 165, 255, 0.28); }
  .story-table td { padding: 14px 16px; vertical-align: top; color: var(--muted); border-bottom: 1px solid rgba(130, 165, 255, 0.16); }
  .story-table tr:last-child td { border-bottom: 0; }
  .story-table td:first-child { color: var(--fg); font: 500 15px/1.3 var(--sans); white-space: nowrap; }
  .story-table td:nth-child(2), .story-table td:nth-child(3), .story-table td:nth-child(4) { white-space: nowrap; }
  .story-table td:last-child a { display: inline-block; background: #f2f4fa; color: #0b0d14; padding: 4px 7px 3px; text-decoration: none; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
  .story-table td:last-child em { display: block; margin-top: 8px; font-style: normal; font-size: 11.5px; max-width: 30ch; }
  .story-orbits { padding: 18px 18px 8px; border-radius: 18px; border: 1px solid rgba(130, 165, 255, 0.28); background: rgba(9, 14, 42, 0.92); }
  body.day .story-orbits { background: rgba(240, 244, 255, 0.96); }
  .story-orbits svg { display: block; width: 100%; height: auto; font-family: var(--mono); }
  .so-grid { stroke: rgba(130, 165, 255, 0.16); stroke-width: 1; }
  .so-tick { fill: var(--muted); font-size: 11px; text-anchor: middle; }
  .so-label { fill: var(--blue); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
  .so-planet { fill: #2a4bc4; }
  .so-ring0 { fill: rgba(80, 125, 255, 0.75); } .so-ring1 { fill: rgba(150, 180, 255, 0.6); }
  .so-moon { fill: var(--fg); }
  .so-lead { stroke: var(--muted); stroke-width: 1; }
  .so-name { fill: var(--fg); font-size: 11px; text-anchor: middle; }
  @media (max-width: 900px) {
    .story-stats, .story-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .story-calc { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 760px) { #system .catalog { height: auto; min-height: 0; } }
  /* the moon tag doubles as a quiet door to the system map */
  a.tag { text-decoration: none; cursor: pointer; transition: box-shadow .3s ease, transform .3s ease, filter .3s ease; }
  a.tag:hover, a.tag:focus-visible { outline: none; filter: brightness(1.12); box-shadow: inset 0 -1px 1px rgba(190, 212, 255, 0.8), inset 0 1px 2px rgba(0, 20, 90, 0.25), 0 0 22px 4px var(--glow); }
  /* in the system map, the card you point at stays bright while the others fade back */
  .cat-item { transition: background-color .25s ease, opacity .35s ease; }
  @media (hover: hover) { .catalog-grid:hover .cat-item:not(:hover) { opacity: 0.4; } }
  .research-head h2 {
    margin: 0;
    color: var(--fg);
    font: 500 clamp(30px, 4.2vw, 46px)/1 var(--sans);
    letter-spacing: -0.03em;
  }
  /* the research content lives in one box, like a card on a desk */
  .research-box {
    --box-bg: rgba(14, 22, 64, 0.55);
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;   /* fixed frame: the folders are sized to fit, never scrolled */
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 0 0;   /* folders run edge to edge: same width as the frame */
    border-radius: 22px;
    background: var(--box-bg);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(130, 165, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 40px -6px var(--glow);
  }
  body.day .research-box { --box-bg: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.22); }
  .research-head p { margin: 0; color: var(--muted); font: 400 14px/1.5 var(--mono); letter-spacing: 0.02em; }
  .cabinet { --tab-h: 46px; --tab-font: 19px; position: relative; width: 100%; flex: 1 1 auto; transition: height .5s cubic-bezier(.2,.8,.2,1); }
  .folder {
    position: absolute;
    left: 0; right: 0;
    color: var(--f-fg);
    pointer-events: none;   /* only the tab and body catch the pointer */
    transition: top .5s cubic-bezier(.2,.8,.2,1), height .5s cubic-bezier(.2,.8,.2,1);
  }
  .folder-body {
    position: absolute;
    inset: var(--tab-h) 0 0 0;
    background: var(--f-bg);
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 -8px 24px -12px rgba(0, 0, 0, 0.6);
  }
  .tab, .folder-body { pointer-events: auto; }
  .tab {
    position: absolute;
    top: 0;
    left: calc(var(--col) * 33.33%);
    width: 33.33%;
    height: var(--tab-h);
    display: flex;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
  }
  .tab svg { width: 34px; height: 100%; flex: none; fill: var(--f-bg); display: block; }
  .tab svg.r { transform: scaleX(-1); }
  .tab span {
    flex: 1;
    min-width: 0;
    display: block;
    line-height: var(--tab-h) !important;
    text-align: center;
    background: var(--f-bg);
    margin-inline: -1px;
    font: 500 min(var(--tab-font), 1.55vw + 4px)/1 var(--sans);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 2px;
  }
  .tab:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }
  .folder:first-child .tab { left: 0; }
  .folder-col0 .tab { left: 0; }
  .entry {
    position: absolute;
    top: calc(var(--tab-h) + 18px);
    left: 0; right: 0;
    display: grid;
    grid-template-columns: 1fr 2.4fr 1fr;
    gap: 16px;
    padding-inline: clamp(16px, 5%, 64px);
    font: 400 12px/1.5 var(--mono);
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity .3s ease;
  }
  .folder.open .entry { opacity: 1; transition-delay: .15s; pointer-events: auto; }
  .entry .date { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
  .open-folder { padding: 5px 8px 4px; border: 0; background: var(--f-fg); color: var(--f-bg); cursor: pointer; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; transition: opacity .2s ease; }
  .open-folder:hover, .open-folder:focus-visible { opacity: .82; outline: none; }
  /* the folder pulled out of the cabinet: it takes the whole screen in its own colour and scrolls like a page */
  .folder-view { position: fixed; inset: 0; z-index: 7; overflow-y: auto; overscroll-behavior: contain; background: var(--f-bg); color: var(--f-fg); animation: fvIn .4s cubic-bezier(.2,.7,.2,1); }
  .folder-view[hidden] { display: none; }
  @keyframes fvIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  /* a slim bar that stays at the top while you scroll: back, folder name, count */
  .fv-bar { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: calc(var(--edge) + env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 40px) 12px; background: var(--f-bg); border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
  .fv-close { justify-self: start; padding: 6px 10px 5px; border: 1px solid currentColor; background: none; color: inherit; cursor: pointer; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
  .fv-close:hover, .fv-close:focus-visible { background: var(--f-fg); color: var(--f-bg); outline: none; }
  .fv-tab { font: 500 15px/1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fv-count { justify-self: end; font: 400 12px/1 var(--mono); opacity: .7; white-space: nowrap; }
  .fv-sheet { max-width: 1120px; margin: 0 auto; padding: 34px clamp(16px, 4vw, 40px) 64px; }
  .fv-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
  .fv-id { font: 400 12px/1 var(--mono); opacity: .7; }
  .fv-head h3 { margin: 0; font: 500 clamp(32px, 5vw, 56px)/1 var(--sans); letter-spacing: -0.03em; }
  .folder-view .fv-note { margin: 0; max-width: 60ch; color: inherit; font: 400 13px/1.55 var(--mono); opacity: .85; }
  .fv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  /* small versions of the Clients / Services card */
  .fv-grid .fv-card { min-width: 0; height: auto; max-height: none; text-decoration: none; animation: rise .5s cubic-bezier(.2,.7,.2,1) backwards; }
  .fv-card .client-art { flex: none; height: 118px; min-height: 0; }
  .fv-card .client-info { padding: 12px 6px 6px; gap: 7px; }
  .fv-card .client-info h3 { font-size: 12px; }
  .fv-card .client-info ul { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
  .fv-card .client-info li::before { content: none; }
  @media (hover: hover) { .fv-grid:hover .fv-card:not(:hover) { opacity: 0.4; } }
  @media (max-width: 1000px) { .fv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 720px) {
    .fv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .fv-sheet { padding-top: 24px; }
    .fv-head { margin-bottom: 20px; }
    .fv-grid .fv-card { padding: 7px; }
    .fv-card .client-art { height: 78px; }
    .fv-card .client-info { padding: 9px 3px 3px; gap: 6px; }
    .fv-card .client-info h3 { font-size: 11px; letter-spacing: 0.05em; }
    .fv-card .client-info li span { padding: 4px 5px 3px; font-size: 10px; }
    .fv-card .service-no { font-size: 9.5px; }
  }
  @media (max-width: 420px) { .fv-tab { display: none; } .fv-bar { grid-template-columns: 1fr 1fr; } }
  .fv-grid .fv-card .client-info ul { display: flex; }   /* keep the label and time even on short screens */
  .entry .note { max-width: 34ch; white-space: pre-line; }
  .entry .date { text-align: right; }
  .entry { grid-template-columns: 0.55fr 1.7fr 2.1fr 0.6fr; }
  /* the posts filed under the open topic, lined up like an index */
  .entry-posts { list-style: none; margin: 0; padding: 0; max-height: calc(var(--content-h, 120px) - 30px); overflow: hidden; border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
  .entry-posts li { border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
  .entry-posts a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 5px 0 4px; color: inherit; text-decoration: none; font: 400 12px/1.35 var(--mono); }
  .entry-posts .pn { opacity: .55; }
  .entry-posts .pt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .entry-posts .pd { opacity: .6; font-size: 11px; }
  /* learn articles: a solid label (Guide, Tutorial, Workshop) in the folder's colours, then the reading time */
  .entry-posts a:has(.pk) { grid-template-columns: 26px minmax(0, 1fr) auto 48px; }
  .entry-posts .pk { background: var(--f-fg); color: var(--f-bg); padding: 3px 6px 2px; font: 400 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; align-self: center; }
  .entry-posts .pk + .pd { text-align: right; }
  .entry-posts a:hover .pt, .entry-posts a:focus-visible .pt { text-decoration: underline; text-underline-offset: 3px; }
  .entry-posts a:focus-visible { outline: none; }
  .entry .kind { display: block; margin-top: 10px; opacity: .65; }
  @media (max-width: 560px) {
    .tab svg { width: 14px; }
    .tab span { font-size: 12px; letter-spacing: -0.02em; }
    .entry { grid-template-columns: 1fr; gap: 6px; }
    .entry-posts { max-height: none; }
    .entry .date { text-align: left; align-items: center; flex-direction: row; justify-content: space-between; order: -1; }
  }

  /* ---------- clients: dark cards with character-drawn artwork ---------- */
  .client-row {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    padding: 6px 0 14px;
    scrollbar-width: none;
    cursor: grab;
  }
  .client-row::-webkit-scrollbar { display: none; }
  .client-row.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
  /* carousel controls: glass arrows either side of the page dots */
  .client-nav { flex: none; display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 4px; }
  .client-nav .pill { position: relative; min-width: 22px; font-size: 13px; }
  .client-nav .pill:disabled { opacity: 0.35; cursor: default; transform: none; }
  .client-nav .pill:disabled:hover { background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)); color: var(--glass-text); box-shadow: none; }
  .client-dots { display: flex; gap: 8px; }
  .client-dots button {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--muted); opacity: 0.45;
    transition: width .35s cubic-bezier(.2,.7,.2,1), opacity .35s, background-color .35s;
  }
  .client-dots button[aria-current="true"] { width: 26px; opacity: 1; background: var(--blue); box-shadow: 0 0 10px var(--glow); }
  .client-card {
    box-sizing: border-box;
    flex: 0 0 calc((100% - 36px) / 3);
    min-width: 248px;
    height: 100%;
    max-height: 560px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 3px;
    background: #101218;
    border: 1px solid rgba(255, 255, 255, 0.07);   /* flat card: a hairline edge, no drop shadow */
    animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards;
    transition: opacity .35s ease, border-color .35s ease;
  }
  .client-card:hover { border-color: rgba(130, 165, 255, 0.35); }
  .service-no { font: 400 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
  .client-info li.service-go { margin-top: 4px; }
  .client-info li.service-go::before { color: var(--blue); }
  .client-info li.service-go a { background: var(--blue); color: #fff; padding: 5px 7px 4px; text-decoration: none; transition: background .25s ease; }
  .client-info li.service-go a:hover, .client-info li.service-go a:focus-visible { background: #5a8bff; outline: none; }
  .client-card:nth-child(2) { animation-delay: .06s; }
  .client-card:nth-child(3) { animation-delay: .12s; }
  .client-art { position: relative; flex: 1 1 auto; min-height: 90px; background: #1f4fe0; overflow: hidden; }
  .client-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; filter: none; touch-action: auto; aspect-ratio: auto; max-width: none; }
  .client-info { flex: none; display: flex; flex-direction: column; gap: 9px; padding: 16px 8px 8px; }
  .client-info h3 {
    margin: 0;
    color: #f2f4fa;
    font: 500 14px/1.35 var(--mono);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-wrap: balance;
  }
  .client-info .client-sub { margin: 0; color: #8b91a3; font: 400 11px/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
  .client-info ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .client-info li { display: flex; align-items: center; gap: 9px; color: #c8cede; font: 400 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
  .client-info li::before { content: ">"; }
  .client-info li span { background: #f2f4fa; color: #0b0d14; padding: 5px 7px 4px; }
  @media (max-width: 760px) { .client-card { flex-basis: 100%; min-width: 0; } }

  /* ---------- services: three soft-blue program cards with lined lists ---------- */
  .service-row { max-height: 560px; }
  /* program cards in the site's own language: dark blue glass, mono lists, halftone corner, glass pill */
  .program {
    --card-bg: rgba(14, 22, 64, 0.55);
    --card-fg: #f2f4fa;
    --card-sub: #8b91a3;
    --card-line: rgba(130, 165, 255, 0.22);
    position: relative;
    box-sizing: border-box;
    flex: 0 0 calc((100% - 36px) / 3);
    min-width: 248px;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    padding: clamp(20px, 2.4vw, 30px);
    border-radius: 22px;
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(130, 165, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: var(--card-fg);
    overflow: hidden;
    transition: border-color .35s ease, box-shadow .35s ease;
    animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards;
  }
  .program::before {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    width: 70%;
    height: 60%;
    background-image: radial-gradient(circle, rgba(111, 150, 255, 0.55) 1.1px, transparent 1.6px);
    background-size: 7px 7px;
    -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 70%);
    pointer-events: none;
  }
  /* hover stays inside the card: a brighter edge, a slightly lighter glass and a stronger halftone, no outer shadow */
  .program { transition: border-color .35s ease, background-color .35s ease, opacity .35s ease; }
  /* like the rings on the homepage: the card you point at stays bright, the others fade back */
  @media (hover: hover) { .client-row:hover .client-card:not(:hover) { opacity: 0.38; } }
  .program::before { transition: opacity .35s ease; opacity: 0.7; }
  .program:hover { border-color: rgba(130, 165, 255, 0.55); background-color: rgba(24, 36, 96, 0.6); }
  .program:hover::before { opacity: 1; }
  body.day .program:hover { background-color: rgba(228, 236, 255, 0.95); }
  body.day .program { --card-bg: rgba(238, 243, 255, 0.85); --card-fg: #0b0d14; --card-sub: #5b6278; --card-line: rgba(47, 107, 255, 0.25); border-color: rgba(47, 107, 255, 0.22); }
  .program-no { position: relative; font: 400 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
  .program h3 { position: relative; margin: 14px 0 0; font: 500 clamp(26px, 2.7vw, 38px)/1.05 var(--sans); letter-spacing: -0.03em; text-wrap: balance; }
  .program .lede { position: relative; margin: auto 0 0; padding-top: 18px; font: 400 13px/1.5 var(--mono); letter-spacing: 0.02em; color: var(--card-sub); }
  .program ul { position: relative; list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--card-line); }
  .program li {
    display: flex;
    gap: 10px;
    padding: 7px 0 6px;
    border-bottom: 1px solid var(--card-line);
    font: 400 11px/1.3 var(--mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .program li::before { content: ">"; color: var(--blue); }
  .program-art { flex: 1 1 auto; min-height: 70px; margin-top: 18px; border-radius: 12px; }
  .program::before { display: none; }
  .program .lede { margin-top: 0; }
  .program .pill.program-btn { position: relative; align-self: flex-start; margin-top: 22px; }
  @media (max-width: 760px) {
    .program { flex-basis: 100%; min-width: 0; }
  }
  @media (max-height: 640px) { .client-info ul { display: none; } }

  /* ---------- 404: the home layout, with the sun in Saturn's place ---------- */
  .page.lost { display: grid; place-items: center; padding-inline: 16px; }
  .page.lost[hidden] { display: none; }
  .lost-stage { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 2vh, 18px); }
  #sun {
    width: min(78vw, 470px, 56vh);
    aspect-ratio: 1;
    cursor: default;
    touch-action: auto;
    filter: drop-shadow(0 0 22px rgba(110, 160, 255, 0.45));
    animation: sway 9s ease-in-out infinite;
  }
  .pill.lost-btn { position: relative; margin-top: 6px; }

  /* ---------- learn: a lesson index in one glass panel; each row shows the essential line, a quieter one beneath ---------- */
  .learn-list {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 540px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(14, 22, 64, 0.55);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(130, 165, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
  }
  body.day .learn-list { background: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.22); }
  .lesson {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 40px 46px minmax(0, 1fr) auto 64px;
    align-items: center;
    gap: 20px;
    padding: 0 clamp(18px, 2.6vw, 32px);
    border-bottom: 1px solid rgba(130, 165, 255, 0.18);
    color: var(--fg);
    transition: background-color .3s ease;
  }
  .lesson:last-child { border-bottom: 0; }
  .lesson:hover { background: rgba(47, 107, 255, 0.14); }
  .l-icon { position: relative; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; background: #1f4fe0; }
  .l-icon canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: none; aspect-ratio: auto; max-width: none; cursor: default; touch-action: auto; }
  .lesson .no { font: 400 12px/1 var(--mono); letter-spacing: 0.12em; color: var(--blue); }
  .lesson .what { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .lesson .what strong { font: 500 clamp(16px, 1.7vw, 22px)/1.15 var(--sans); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lesson .what span { font: 400 12px/1.4 var(--mono); letter-spacing: 0.02em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lesson .kind { background: #f2f4fa; color: #0b0d14; padding: 5px 8px 4px; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
  .lesson .time { justify-self: end; font: 400 12px/1 var(--mono); color: var(--muted); }
  @media (max-width: 640px) {
    .lesson { grid-template-columns: 22px 38px minmax(0, 1fr) auto; gap: 10px; }
    .l-icon { width: 38px; height: 38px; }
    .lesson .time { display: none; }
    .lesson .what strong, .lesson .what span { white-space: normal; }
    .lesson .what span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  }
  @media (max-height: 620px) { .lesson .what span { display: none; } .l-icon { width: 34px; height: 34px; } }

  /* ---------- about: a catalogue of the system, ink drawings on paper in a hairline grid ---------- */
  .catalog {
    --line: rgba(130, 165, 255, 0.22);
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 560px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(14, 22, 64, 0.55);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(130, 165, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: var(--fg);
    animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
  }
  body.day .catalog { background: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.22); --line: rgba(47, 107, 255, 0.2); }
  .catalog-bar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    font: 400 12px/1 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
  }
  .catalog-filters { display: flex; gap: 16px; flex-wrap: wrap; }
  .catalog-filters button {
    padding: 0 0 3px; border: 0; border-bottom: 1px solid transparent; background: none; cursor: pointer;
    font: 400 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg); opacity: 0.5;
    transition: opacity .2s ease, border-color .2s ease;
  }
  .catalog-filters button[aria-pressed="true"] { opacity: 1; border-bottom-color: var(--blue); }
  .catalog-filters button:hover, .catalog-filters button:focus-visible { opacity: 1; outline: none; }
  .catalog-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    overflow: hidden;
  }
  .cat-item {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 14px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--fg);
    text-decoration: none;
    transition: background-color .25s ease;
  }
  .cat-item.no-r { border-right: 0; }
  .cat-item:hover, .cat-item:focus-visible { background: rgba(47, 107, 255, 0.14); outline: none; }
  .cat-item.no-b { border-bottom: 0; }
  .cat-item[hidden] { display: none; }
  .cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 500 15px/1.2 var(--sans); letter-spacing: -0.01em; }
  .cat-top em { font: 400 11px/1 var(--mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
  .cat-art { position: relative; flex: 1 1 auto; min-height: 50px; }
  .cat-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; filter: none; cursor: inherit; touch-action: auto; aspect-ratio: auto; max-width: none; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
  .cat-item:hover .cat-art canvas { transform: translateY(-4px); }
  .cat-facts { font: 400 11px/1.4 var(--mono); letter-spacing: 0.03em; color: var(--muted); }
  .cat-info { display: none; }
  @media (max-width: 760px) {
    #system .catalog { max-height: none; }
    .catalog-grid { grid-template-columns: 1fr; grid-auto-rows: auto; overflow-y: auto; }
    .cat-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) 28px; grid-template-rows: auto auto 1fr; column-gap: 12px; min-height: 104px; border-right: 0; }
    .cat-art { grid-column: 1; grid-row: 1 / 4; min-height: 84px; }
    .cat-top { grid-column: 2; grid-row: 1; flex-direction: column; font-size: 15px; }
    .cat-facts { grid-column: 2; grid-row: 2; margin-top: 4px; }
    .cat-info { display: grid; place-items: center; grid-column: 3; grid-row: 1; width: 22px; height: 22px; border: 1px solid var(--blue); color: var(--blue); border-radius: 999px; font: 500 12px/1 var(--mono); }
    .cat-item:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
    .cat-item:last-child { border-bottom: 0; }
  }


  /* ---------- contact (Enceladus): a form on the left, the two departments on a dotted globe on the right ---------- */
  .page.contact { display: grid; place-items: center; padding: 70px 16px 84px; text-align: left; overflow: hidden; }
  .page.contact[hidden] { display: none; }
  .contact-wrap {
    width: 100%;
    max-width: 1120px;
    height: 100%;
    max-height: 700px;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    animation: rise .6s cubic-bezier(.2,.7,.2,1);
  }
  .contact-form { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
  .c-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  }
  .c-eyebrow::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--blue); box-shadow: 0 0 8px 1px var(--glow);
  }
  .contact-form h2 {
    margin: -4px 0 0;
    color: var(--fg);
    font: 500 clamp(34px, 4.6vw, 58px)/0.98 var(--sans);
    letter-spacing: -0.035em;
    text-wrap: balance;
  }
  .contact-form .lede { margin: 0; max-width: 44ch; color: var(--muted); font: 400 13.5px/1.55 var(--mono); letter-spacing: 0.02em; }
  /* department switch: two glass tiles; the chosen one turns blue and the globe flies there */
  .dept-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
  .dept-switch legend { padding: 0; margin-bottom: 8px; font: 500 12px/1 var(--mono); color: var(--fg); }
  .dept {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    padding: 12px 14px 12px 32px;
    border-radius: 14px;
    border: 1px solid rgba(130, 165, 255, 0.28);
    background: rgba(14, 22, 64, 0.55);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    color: var(--fg);
    text-align: left;
    cursor: pointer;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, color .3s ease;
  }
  .dept::before {
    content: ""; position: absolute; left: 14px; top: 17px;
    width: 8px; height: 8px; border-radius: 50%;
    border: 1px solid rgba(170, 200, 255, 0.7);
    transition: background .3s ease, box-shadow .3s ease;
  }
  .dept b { font: 500 16px/1 var(--sans); letter-spacing: -0.01em; }
  .dept span { font: 400 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); transition: color .3s ease; }
  .dept:hover { border-color: rgba(130, 165, 255, 0.55); }
  .dept[aria-pressed="true"] {
    background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom));
    border-color: rgba(170, 200, 255, 0.6);
    box-shadow: inset 0 -1px 1px rgba(190, 212, 255, 0.8), inset 0 1px 2px rgba(0, 20, 90, 0.25), 0 0 18px 0 var(--glow);
    color: #fff;
  }
  .dept[aria-pressed="true"] span { color: rgba(255, 255, 255, 0.78); }
  .dept[aria-pressed="true"]::before { background: #fff; border-color: #fff; box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.7); }
  body.day .dept { background: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.22); }
  body.day .dept::before { border-color: rgba(47, 107, 255, 0.6); }
  body.day .dept[aria-pressed="true"] { background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); }
  /* underlined fields, as in the reference */
  .c-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
  .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .field.wide { grid-column: 1 / -1; }
  .field label { font: 500 12px/1 var(--mono); color: var(--fg); }
  .field label em { font-style: normal; color: var(--muted); font-weight: 400; }
  .field input, .field textarea {
    width: 100%; box-sizing: border-box;
    padding: 8px 0 9px;
    border: 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 22%, transparent);
    border-radius: 0;
    background: transparent;
    color: var(--fg);
    font: 400 14px/1.4 var(--mono);
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease;
  }
  .field textarea { resize: none; height: 64px; }
  .field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.75; }
  .field input:focus, .field textarea:focus { border-bottom-color: var(--blue); box-shadow: 0 1px 0 0 var(--blue), 0 6px 12px -8px var(--glow); }
  .c-send { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
  .pill.c-submit { position: relative; cursor: pointer; font-family: var(--mono); }
  .c-to { display: flex; flex-direction: column; gap: 4px; font: 400 11px/1.2 var(--mono); color: var(--muted); letter-spacing: 0.04em; }
  .c-to b { font: 500 13px/1.2 var(--mono); color: var(--fg); letter-spacing: 0.01em; }
  .c-status { min-height: 1.4em; margin: -6px 0 0; font: 400 12px/1.4 var(--mono); color: var(--blue); }
  /* the globe sits in the same glass frame as the Research box, cropped at the edges */
  .globe-box {
    position: relative;
    min-width: 0; min-height: 0;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(14, 22, 64, 0.55);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(130, 165, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 40px -6px var(--glow);
  }
  body.day .globe-box { background: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.22); }
  /* soft fades so the title and the footer stay readable over the land */
  .globe-box::before, .globe-box::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
  .globe-box::before { top: 0; height: 170px; background: linear-gradient(180deg, rgba(9, 14, 42, 0.92) 30%, rgba(9, 14, 42, 0)); }
  .globe-box::after { bottom: 0; height: 64px; background: linear-gradient(0deg, rgba(9, 14, 42, 0.9), rgba(9, 14, 42, 0)); }
  body.day .globe-box::before { background: linear-gradient(180deg, rgba(240, 244, 255, 0.95) 30%, rgba(240, 244, 255, 0)); }
  body.day .globe-box::after { background: linear-gradient(0deg, rgba(240, 244, 255, 0.95), rgba(240, 244, 255, 0)); }
  #globe { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; max-width: none; cursor: grab; touch-action: none; }
  #globe.dragging { cursor: grabbing; }
  .globe-head { position: absolute; top: 22px; left: 24px; z-index: 1; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
  .globe-head h3 { margin: 2px 0 0; color: var(--fg); font: 500 24px/1 var(--sans); letter-spacing: -0.02em; }
  .globe-head p { margin: 0; color: var(--muted); font: 400 12px/1.3 var(--mono); letter-spacing: 0.03em; }
  .globe-head button {
    pointer-events: auto; align-self: flex-start; margin-top: 4px; padding: 0;
    border: 0; background: none; cursor: pointer;
    color: var(--fg); font: 400 12px/1.3 var(--mono); letter-spacing: 0.03em;
    border-bottom: 1px solid color-mix(in srgb, var(--fg) 30%, transparent);
  }
  .globe-head button:hover { color: var(--blue); border-color: var(--blue); }
  .globe-foot { z-index: 2; position: absolute; left: 24px; right: 24px; bottom: 18px; display: flex; justify-content: space-between; gap: 12px; font: 400 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); pointer-events: none; }
  /* the label above the chosen pin, a small white glass card like the ring tooltip */
  .globe-card {
    position: absolute; left: 0; top: 0; z-index: 2;
    display: flex; flex-direction: column; gap: 5px;
    padding: 9px 12px 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
    border: 1px solid var(--glass-edge);
    box-shadow: inset 0 -2px 1px var(--glass-rim), inset 0 2px 3px var(--glass-inset), 0 10px 22px -10px var(--glass-shadow);
    color: var(--glass-text);
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 18px));
    transition: opacity .3s ease;
  }
  .globe-card.below { transform: translate(-50%, 18px); }
  .globe-card b { font: 500 13px/1.1 var(--sans); }
  .globe-card span { font: 400 10.5px/1 var(--mono); letter-spacing: 0.03em; color: #5b6278; }
  @media (max-height: 760px) {
    .contact-form { gap: 13px; }
    .contact-form h2 { font-size: clamp(30px, 3.8vw, 44px); }
    .field textarea { height: 46px; }
  }
  @media (max-width: 820px) {
    .page.contact { place-items: start center; overflow-y: auto; padding-bottom: 96px; }
    .contact-wrap { height: auto; max-height: none; grid-template-columns: minmax(0, 1fr); }
    .globe-box { order: -1; height: 380px; }
  }
  @media (max-width: 480px) {
    .c-grid { grid-template-columns: minmax(0, 1fr); }
    .globe-box { height: 360px; }
  }

  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  @keyframes sway {
    0%, 100% { transform: translateY(0) rotate(-1.6deg); }
    50%      { transform: translateY(-9px) rotate(1.6deg); }
  }

  @media (max-width: 480px) {
    .name { font-size: 15px; min-height: 34px; padding: 8px 16px; }
    .caption { font-size: 13px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .orbit { animation: none; }
    .pill, .name { transition: background-color .2s, box-shadow .2s; }
    .pill:hover, .pill:focus-visible { transform: none; }
    .name:hover, .name:focus-visible { transform: translateX(-50%); }
    .page-inner, .menu, .client-card, .program, .learn-list, .catalog { animation: none; }
  }
  /* ---------- phones: a calm top and bottom edge, and nothing hidden under the corner buttons ---------- */
  @media (max-width: 640px) {
    /* soft bands of night behind the corner buttons, so content fades out before it reaches them */
    body.paged::before, body.paged::after { content: ""; position: fixed; left: 0; right: 0; z-index: 4; pointer-events: none; }
    body.paged::before { top: 0; height: calc(86px + env(safe-area-inset-top, 0px)); background: linear-gradient(180deg, var(--bg) 52%, transparent); }
    body.paged::after { bottom: 0; height: calc(96px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(0deg, var(--bg) 55%, transparent); }
    /* every page leaves room for the bottom buttons */
    .page.research { padding: calc(64px + env(safe-area-inset-top, 0px)) 14px calc(80px + env(safe-area-inset-bottom, 0px)); }
    .page.contact, #system { padding-top: calc(78px + env(safe-area-inset-top, 0px)); }
    /* a real spacer at the end of scrolling pages, so the last item can scroll clear of the bottom buttons */
    .contact-wrap::after, #system .research-wrap::after, #clients .research-wrap::after, #services .research-wrap::after { content: ""; display: block; flex: none; height: calc(96px + env(safe-area-inset-bottom, 0px)); grid-column: 1 / -1; }
    /* Clients and Services: the page scrolls and each card shows in full, nothing cropped */
    #clients, #services { overflow-y: auto; place-items: start center; align-items: start; }
    #clients .research-wrap, #services .research-wrap { height: auto; max-height: none; }
    #clients .client-row, #services .client-row { flex: none; height: auto; max-height: none; align-items: stretch; }
    #clients .client-card, #services .client-card { height: auto; max-height: none; }
    #clients .client-art, #services .client-art { flex: none; height: 210px; }
    #clients .client-info ul, #services .client-info ul { display: flex; }
    .client-nav { margin-top: 6px; }
    .research-head { padding-bottom: 14px; }
    .research-head h2 { font-size: 34px; }
  }
  /* the moon table becomes one small card per moon on phones */
  @media (max-width: 640px) {
    .story-table { overflow: visible; background: none; border: 0; }
    .story-table table { min-width: 0; display: block; }
    .story-table thead { display: none; }
    .story-table tbody { display: flex; flex-direction: column; gap: 10px; }
    .story-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 16px; border-radius: 16px; border: 1px solid rgba(130, 165, 255, 0.28); background: rgba(9, 14, 42, 0.92); }
    body.day .story-table tr { background: rgba(240, 244, 255, 0.96); }
    .story-table td { padding: 0; border: 0; white-space: normal !important; }
    .story-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
    .story-table td:first-child { grid-column: 1 / -1; font-size: 20px; }
    .story-table td:first-child::before { content: none; }
    .story-table td:nth-child(5), .story-table td:last-child { grid-column: 1 / -1; }
    .story-table td:last-child em { max-width: none; }
  }
  /* ---------- the article page: a printed blue sheet on black ---------- */
  .article-view { position: fixed; inset: 0; z-index: 8; overflow-y: auto; overscroll-behavior: contain; background: #000; padding: clamp(64px, 9vh, 96px) clamp(12px, 4vw, 48px) clamp(48px, 8vh, 96px); animation: fvIn .45s cubic-bezier(.2,.7,.2,1); }
  .article-view[hidden] { display: none; }
  .pill.av-back { position: fixed; z-index: 2; top: calc(var(--edge) + env(safe-area-inset-top, 0px)); left: var(--edge); cursor: pointer; font-family: var(--mono); }
  .av-sheet {
    --ink: #e8ebf1;
    position: relative; max-width: 980px; margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) clamp(20px, 4.4vw, 52px) clamp(28px, 4vw, 44px);
    background: #1f3bd6;
    background-image: radial-gradient(120% 90% at 50% 20%, rgba(255, 255, 255, 0.05), transparent 60%), radial-gradient(140% 120% at 50% 110%, rgba(0, 0, 40, 0.35), transparent 60%);
    color: var(--ink);
    box-shadow: 0 30px 80px -30px rgba(31, 59, 214, 0.55);
  }
  .av-title { margin: 0; max-width: 9.5em; font: 500 clamp(46px, 8.6vw, 112px)/0.9 var(--sans); letter-spacing: -0.045em; color: var(--ink); text-wrap: balance; }
  .av-meta { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 16px; margin: clamp(96px, 18vw, 230px) 0 clamp(22px, 3vw, 34px); }
  .av-l, .av-r { display: flex; flex-direction: column; gap: 3px; font: 400 10.5px/1.25 var(--mono); letter-spacing: 0.02em; }
  .av-l span:first-child { text-transform: uppercase; letter-spacing: 0.08em; }
  .av-r { text-align: right; }
  .av-c { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
  .av-c span { font: 400 clamp(15px, 1.6vw, 19px)/1 var(--mono); letter-spacing: 0.04em; }
  .av-c b { font: 500 clamp(15px, 1.6vw, 18px)/1.15 var(--sans); letter-spacing: -0.01em; }
  .av-body { columns: 2; column-gap: clamp(22px, 3.4vw, 40px); font: 500 clamp(13px, 1.25vw, 14.5px)/1.32 var(--sans); letter-spacing: -0.005em; hyphens: auto; -webkit-hyphens: auto; }
  .av-body p { margin: 0; color: var(--ink); max-width: none; font: inherit; }
  .av-body p + p { text-indent: 1.6em; }
  .av-body p:first-child::first-letter { font-weight: 600; }
  .av-foot { display: none; }
  .av-foot-off { display: flex; justify-content: space-between; gap: 12px; margin-top: clamp(28px, 4vw, 44px); padding-top: 12px; border-top: 1px solid rgba(232, 235, 241, 0.3); font: 400 10.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; opacity: .8; }
  body.day .article-view { background: #f2f3f6; }
  @media (max-width: 640px) {
    .article-view { padding: calc(64px + env(safe-area-inset-top, 0px)) 10px calc(40px + env(safe-area-inset-bottom, 0px)); }
    .av-meta { grid-template-columns: 1fr 1fr; grid-template-areas: "c c" "l r"; margin-top: 72px; gap: 18px 12px; }
    .av-c { grid-area: c; }
    .av-l { grid-area: l; } .av-r { grid-area: r; }
    .av-body { columns: 1; font-size: 15px; line-height: 1.4; }
    .av-foot { flex-wrap: wrap; }
  }
  /* blueprint touches: breadcrumb, bullet points and the ruled panel at the end */
  .av-crumb { display: none; }
  .av-crumb-off { display: flex; gap: 8px; margin-bottom: clamp(26px, 4vw, 44px); font: 400 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
  .av-crumb span:last-child { opacity: .6; }
  .av-crumb i { font-style: normal; opacity: .6; }
  .av-points { display: none; }
  .av-points-old { list-style: none; margin: 0 0 clamp(26px, 4vw, 40px); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px clamp(18px, 3vw, 34px); }
  .av-points li { display: flex; flex-direction: column; gap: 7px; }
  .av-points b { display: flex; align-items: center; gap: 9px; font: 600 12.5px/1.2 var(--mono); }
  .av-points b::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); }
  .av-points span { padding-left: 20px; font: 400 11.5px/1.45 var(--mono); opacity: .9; }
  .av-bp { display: none; }
  .av-bp-off { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: clamp(34px, 5vw, 56px); border: 1px solid rgba(232, 235, 241, 0.55);
    background-image: linear-gradient(rgba(232, 235, 241, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 235, 241, 0.07) 1px, transparent 1px); background-size: 22px 22px; }
  .bp-art { position: relative; min-height: 320px; border-right: 1px solid rgba(232, 235, 241, 0.55); }
  .bp-art canvas { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); display: block; filter: none; aspect-ratio: auto; max-width: none; cursor: default; touch-action: auto; }
  .bp-col { display: flex; flex-direction: column; }
  .bp-steps { list-style: none; margin: 0; padding: 0; }
  .bp-steps li { display: grid; grid-template-columns: 46px 1fr; border-bottom: 1px solid rgba(232, 235, 241, 0.55); font: 400 11.5px/1 var(--mono); }
  .bp-steps li span { padding: 11px 12px; border-right: 1px solid rgba(232, 235, 241, 0.55); }
  .bp-steps li em { padding: 11px 14px; }
  .bp-space { flex: 1 1 auto; min-height: 60px; border-bottom: 1px solid rgba(232, 235, 241, 0.55); }
  .av-bp .bp-tag { margin: 0; padding: 11px 14px; border-bottom: 1px solid rgba(232, 235, 241, 0.55); font: italic 400 11.5px/1.3 var(--mono); color: var(--ink); max-width: none; }
  .av-bp .bp-say { margin: 0; padding: 14px 14px 16px; border-bottom: 1px solid rgba(232, 235, 241, 0.55); font: 500 clamp(17px, 1.9vw, 22px)/1.18 var(--sans); letter-spacing: -0.01em; text-transform: uppercase; color: var(--ink); max-width: none; }
  .bp-foot { display: grid; grid-template-columns: 1fr auto; font: 400 11px/1 var(--mono); }
  .bp-foot span { padding: 11px 14px; }
  .bp-foot .bp-year { border-left: 1px solid rgba(232, 235, 241, 0.55); }
  @media (max-width: 640px) {
    .av-points { grid-template-columns: minmax(0, 1fr); }
    .av-bp { grid-template-columns: minmax(0, 1fr); }
    .bp-art { min-height: 220px; border-right: 0; border-bottom: 1px solid rgba(232, 235, 241, 0.55); }
    .bp-space { min-height: 24px; }
  }
  /* no "Written by" block: the meta line keeps only its two outer columns */
  .av-c { display: none; }
  .av-meta { grid-template-columns: 1fr 1fr; grid-template-areas: "l r"; }
  .av-l { grid-area: l; } .av-r { grid-area: r; }
  /* the folder code, like a file number, in the sheet's top right corner */
  .av-code i { font-style: normal; margin: 0 7px; opacity: .6; }
  .av-code { text-transform: uppercase; position: absolute; top: clamp(18px, 2.6vw, 30px); right: clamp(20px, 4.4vw, 52px); font: 400 11px/1 var(--mono); letter-spacing: 0.1em; color: var(--ink); opacity: .85; }
  /* the section label on the left is gone: only the reading time and word count remain, on the right */
  .av-l { visibility: hidden; }
  .av-kt { text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; }
  .av-kt i { font-style: normal; margin: 0 8px; opacity: .6; }
  /* ---------- members-only articles: visible to all, marked with a lock ---------- */
  svg.lock { width: 11px; height: 13px; flex: none; fill: currentColor; stroke: currentColor; }
  .entry-posts .pt svg.lock { width: 9px; height: 11px; margin-right: 7px; vertical-align: -1px; opacity: .85; }
  .fv-grid .fv-card.is-locked { position: relative; padding-bottom: 40px; }
  .fv-lock { position: absolute; left: 16px; bottom: 13px; display: inline-flex; align-items: center; gap: 7px; color: #f2f4fa; font: 400 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
  .fv-lock b { font-weight: 400; opacity: .75; }
  .fv-card.is-locked .client-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(4, 8, 30, 0.45)); pointer-events: none; }
  /* on the article page: the opening paragraph, then a fade into the members panel */
  .av-sheet.is-locked .av-body { columns: 1; max-width: 60ch; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
  .av-gate[hidden] { display: none; }
  .av-gate { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: 18px; padding: 18px 20px; border: 1px solid rgba(232, 235, 241, 0.45); }
  .av-gate-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #1f3bd6; }
  .av-gate-mark svg.lock { width: 14px; height: 17px; }
  .av-gate b { display: block; font: 500 18px/1.1 var(--sans); }
  .av-gate p { margin: 5px 0 0; max-width: 48ch; color: var(--ink); font: 400 12px/1.5 var(--mono); opacity: .85; }
  .pill.av-gate-btn { position: relative; }
  @media (max-width: 640px) { .av-gate { grid-template-columns: auto 1fr; } .pill.av-gate-btn { grid-column: 1 / -1; justify-self: start; } }
  .folder-view .fv-id { display: none; }
  /* temporary switch to compare the three sun styles */
  .sun-switch { display: inline-flex; gap: 0; margin-top: 6px; border: 1px solid rgba(130, 165, 255, 0.35); border-radius: 999px; padding: 3px; background: rgba(14, 22, 64, 0.55); }
  .sun-switch button { border: 0; background: none; color: var(--muted); padding: 6px 12px 5px; border-radius: 999px; cursor: pointer; font: 400 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; transition: background .25s ease, color .25s ease; }
  .sun-switch button:hover { color: var(--fg); }
  .sun-switch button[aria-pressed="true"] { background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); color: #fff; box-shadow: 0 0 12px var(--glow); }
  body.day .sun-switch { background: rgba(238, 243, 255, 0.85); }
  /* ---------- about: the studio, then meet the team (the page scrolls) ---------- */
  #about { overflow-y: auto; display: block; padding: 0 16px; -webkit-mask-image: linear-gradient(transparent 0, #000 74px, #000 calc(100% - 78px), transparent 100%); mask-image: linear-gradient(transparent 0, #000 74px, #000 calc(100% - 78px), transparent 100%); }
  #about[hidden] { display: none; }
  #about .page-inner { min-height: 100vh; min-height: 100dvh; margin: 0 auto; justify-content: center; }
  .about-hint { margin-top: 18px !important; font-size: 12px !important; letter-spacing: 0.08em !important; }
  .team { max-width: 1040px; margin: 0 auto; padding: 20px 0 140px; text-align: left; }
  .team-intro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding-top: 16px; margin-bottom: 70px; border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); }
  .team-intro h2 { margin: 0; color: var(--fg); font: 500 15px/1.3 var(--sans); }
  .team-intro p { margin: 0; color: var(--muted); font: 400 12px/1.55 var(--mono); max-width: none; }
  .team-intro p.lead { color: var(--fg); font: 400 17px/1.4 var(--sans); }
  .team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 30px; }
  .member { margin: 0; transition: opacity .35s ease; }
  .m-pic { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
  .m-pic canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: none; aspect-ratio: auto; max-width: none; cursor: default; touch-action: auto; }
  .member figcaption { display: flex; justify-content: space-between; gap: 10px; padding-top: 9px; }
  .member figcaption span { color: var(--fg); font: 400 13px/1.2 var(--sans); }
  .member figcaption em { font-style: normal; color: var(--muted); font: 400 12px/1.2 var(--sans); text-align: right; }
  @media (hover: hover) { .team-grid:hover .member:not(:hover) { opacity: 0.4; } }
  @media (max-width: 760px) {
    .team-intro { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 40px; }
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; }
    .member figcaption { flex-direction: column; gap: 3px; } .member figcaption em { text-align: left; }
  }
  .member figcaption em small { display: block; margin-top: 4px; font: 400 10.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; opacity: .75; }
  /* ---------- client portal sign-in (Calypso) ---------- */
  .login-wrap { width: 100%; max-width: 980px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: center; gap: clamp(20px, 5vw, 64px); animation: rise .6s cubic-bezier(.2,.7,.2,1); }
  .login-art { position: relative; aspect-ratio: 1; }
  .login-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: none; -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); aspect-ratio: auto; max-width: none; cursor: default; touch-action: auto; }
  .login-box { display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 3vw, 34px); border-radius: 22px; background: rgba(14, 22, 64, 0.55); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); border: 1px solid rgba(130, 165, 255, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 40px -6px var(--glow); }
  body.day .login-box { background: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.22); }
  .login-box h2 { margin: -4px 0 0; color: var(--fg); font: 500 clamp(30px, 3.6vw, 42px)/1 var(--sans); letter-spacing: -0.03em; }
  .login-box .lede { margin: 0; color: var(--muted); font: 400 13px/1.55 var(--mono); }
  .login-box .field label { display: flex; justify-content: space-between; }
  .l-forgot { color: var(--muted); font-weight: 400; text-decoration: none; }
  .l-forgot:hover { color: var(--blue); }
  .l-pass { position: relative; }
  .l-pass input { padding-right: 56px; }
  .l-pass button { position: absolute; right: 0; bottom: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
  .l-pass button:hover { color: var(--blue); }
  .l-remember { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 400 12px/1.3 var(--mono); cursor: pointer; }
  .l-remember input { accent-color: var(--blue); width: 15px; height: 15px; }
  .pill.l-submit { align-self: stretch; justify-content: center; margin-top: 4px; }
  .l-foot { margin: 0; color: var(--muted); font: 400 12px/1.4 var(--mono); }
  .l-foot a { color: var(--fg); }
  @media (max-width: 760px) {
    #login { overflow-y: auto; align-items: start; }
    .login-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .login-art { max-width: 220px; justify-self: center; width: 60%; margin-bottom: -10px; }
  }
  /* ---------- signed in ---------- */
  .pill.acct { top: calc(var(--edge) + env(safe-area-inset-top, 0px)); gap: 7px; padding: 2px 12px 2px 2px; text-decoration: none; }
  .menu-item[hidden] { display: none !important; }
  .pill.acct[hidden] { display: none; }
  .acct-av { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); color: #fff; font: 500 9.5px/1 var(--mono); letter-spacing: .04em; position: relative; }
  body[data-role="member"] .acct-av { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
  .acct-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @media (max-width: 640px) { .pill.acct { padding: 2px; } .acct-name { display: none; } }
  .toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--edge) + 44px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); color: #fff; font: 400 12.5px/1.3 var(--mono); box-shadow: 0 0 24px -6px var(--glow); animation: rise .4s cubic-bezier(.2,.7,.2,1); transition: opacity .4s ease; text-align: center; }
  .toast[hidden] { display: none; }
  .toast.out { opacity: 0; }
  /* locks open once you are signed in: the shackle lifts and turns blue */
  svg.lock path { transition: transform .4s ease; }
  body.signed-in svg.lock path { transform: translate(3.4px, -1.2px); }
  body.signed-in .entry-posts .pt svg.lock, body.signed-in .fv-lock { color: #8fb0ff; }
  body.signed-in .fv-card.is-locked .client-art::after { display: none; }
  .av-open { display: inline-block; margin-right: 10px; vertical-align: -2px; }
  @media (max-width: 640px) { .av-sheet .av-title { padding-top: 16px; } .av-code { left: 20px; text-align: right; line-height: 1.6; } }
  .av-open svg.lock { width: 11px; height: 13px; }
  .l-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px dashed color-mix(in srgb, var(--blue) 50%, transparent); }
  .l-demo span { width: 100%; color: var(--blue); font: 400 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
  .l-demo button { padding: 7px 12px; border-radius: 99px; border: 1px solid rgba(130, 165, 255, 0.35); background: none; color: var(--fg); font: 400 12px/1 var(--mono); cursor: pointer; }
  .l-demo button:hover { border-color: var(--blue); color: var(--blue); }
  /* ---------- client portal (Calypso): sidebar + tabs, glass cards, sample data ---------- */
  .page.portal { display: block; overflow-y: auto; padding: 72px 16px 96px; text-align: left; -webkit-overflow-scrolling: touch; }
  .page.portal[hidden] { display: none; }
  .pt-wrap { width: 100%; box-sizing: border-box; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; animation: rise .6s cubic-bezier(.2,.7,.2,1); }
  .portal .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pt-card, .pt-side { background: rgba(14, 22, 64, 0.55); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); border: 1px solid rgba(130, 165, 255, 0.24); border-radius: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10); }
  body.day .pt-card, body.day .pt-side { background: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.2); }
  .pt-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 22px; padding: 18px; }
  .pt-who { display: flex; align-items: center; gap: 11px; }
  .pt-who .pt-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); color: #fff; font: 500 12px/1 var(--mono); letter-spacing: .06em; box-shadow: 0 0 14px -2px var(--glow); }
  .pt-who b { display: block; color: var(--fg); font: 500 14px/1.2 var(--sans); }
  .pt-who span { color: var(--muted); font: 400 11px/1.3 var(--mono); }
  .pt-nav { display: flex; flex-direction: column; gap: 2px; }
  .pt-nav button { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 400 13px/1 var(--mono); text-align: left; cursor: pointer; transition: background .2s ease, color .2s ease; }
  .pt-nav button:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }
  .pt-nav button[aria-current="page"] { color: #fff; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); box-shadow: 0 0 16px -4px var(--glow); }
  .pt-nav em { font-style: normal; min-width: 18px; padding: 3px 5px; border-radius: 99px; background: color-mix(in srgb, var(--blue) 30%, transparent); color: var(--fg); font: 500 10px/1 var(--mono); text-align: center; }
  .pt-nav button[aria-current="page"] em { background: rgba(255,255,255,.25); color: #fff; }
  .pt-dept { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); }
  .pt-dept b { color: var(--fg); font: 500 13px/1.2 var(--sans); }
  .pt-dept > span:last-child { color: var(--muted); font: 400 11px/1.3 var(--mono); }
  .pt-out { color: var(--muted); font: 400 12px/1 var(--mono); text-decoration: none; }
  .pt-out:hover { color: var(--blue); }
  .pt-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
  .portal .pt-preview { max-width: none; margin: 0; align-self: flex-start; padding: 6px 10px; border: 1px dashed color-mix(in srgb, var(--blue) 60%, transparent); border-radius: 8px; color: var(--blue); font: 400 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
  .pt-tab { display: flex; flex-direction: column; gap: 16px; animation: rise .45s cubic-bezier(.2,.7,.2,1); }
  .pt-tab[hidden] { display: none; }
  .pt-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
  .pt-head h2 { margin: 0; color: var(--fg); font: 500 clamp(30px, 4vw, 50px)/1 var(--sans); letter-spacing: -0.035em; }
  .pt-head .lede { margin: 0; max-width: 56ch; color: var(--muted); font: 400 13px/1.55 var(--mono); }
  .pt-card { padding: 18px 20px; min-width: 0; }
  .pt-k { color: var(--muted); font: 400 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
  .pt-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .pt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .pt-stats .pt-card { display: flex; flex-direction: column; gap: 8px; }
  .pt-stats span { color: var(--muted); font: 400 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .pt-stats b { color: var(--fg); font: 500 30px/1 var(--sans); letter-spacing: -.03em; }
  .pt-stats em { font-style: normal; color: var(--muted); font: 400 11.5px/1.3 var(--mono); }
  .pt-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .pt-span { grid-column: 1 / -1; }
  .pt-grid > .pt-card, .pt-stack > .pt-card { display: flex; flex-direction: column; gap: 14px; }
  .pt-stack { display: flex; flex-direction: column; gap: 12px; }
  .pt-project h3 { margin: 6px 0 0; color: var(--fg); font: 500 22px/1.1 var(--sans); letter-spacing: -.02em; }
  .pt-project.is-done { opacity: .78; }
  .pt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); color: var(--fg); font: 400 11px/1 var(--mono); white-space: nowrap; }
  .pt-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
  .pt-chip.is-blue { border-color: color-mix(in srgb, var(--blue) 60%, transparent); }
  .pt-chip.is-blue::before { background: var(--blue); box-shadow: 0 0 8px 1px var(--glow); }
  .pt-chip.is-ok::before { background: #6fe0a8; }
  /* stage track: dots joined by a line; done = filled, now = glowing, later = outline */
  .pt-track { list-style: none; margin: 4px 0 0; padding: 0; display: flex; }
  .pt-track li { position: relative; flex: 1; padding-top: 20px; color: var(--muted); font: 400 11px/1.2 var(--mono); }
  .pt-track li::before { content: ""; position: absolute; left: 0; top: 4px; z-index: 1; width: 9px; height: 9px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--fg) 40%, transparent); background: var(--bg); }
  .pt-track li::after { content: ""; position: absolute; left: 11px; right: 2px; top: 8px; height: 1px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--fg) 35%, transparent) 0 2px, transparent 2px 6px); }
  .pt-track li:last-child { flex: 0 0 auto; }
  .pt-track li:last-child::after { display: none; }
  .pt-track li.done { color: var(--fg); }
  .pt-track li.done::before { background: var(--blue); border-color: var(--blue); }
  .pt-track li.done::after { background: var(--blue); }
  .pt-track li.now { color: var(--fg); font-weight: 500; }
  .pt-track li.now::before { background: #fff; border-color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 35%, transparent), 0 0 12px 2px var(--glow); animation: ptPulse 2.4s ease-in-out infinite; }
  body.day .pt-track li.now::before { background: var(--blue); border-color: var(--blue); }
  @keyframes ptPulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--blue) 12%, transparent), 0 0 16px 3px var(--glow); } }
  .pt-next p { margin: 0; color: var(--fg); font: 400 13px/1.4 var(--mono); }
  .pt-next b { display: block; color: var(--muted); font: 400 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
  .pt-meta { justify-content: flex-start; gap: 6px 18px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); color: var(--muted); font: 400 11.5px/1.2 var(--mono); }
  .pt-meta .pt-link { margin-left: auto; }
  .pt-link { padding: 0; border: 0; background: none; color: var(--fg); font: 400 12px/1.3 var(--mono); cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); white-space: nowrap; }
  .pt-link:hover { color: var(--blue); border-color: var(--blue); }
  .pt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .pt-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); }
  .pt-list li:first-child { border-top: 0; padding-top: 0; }
  .pt-list div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .pt-list b { color: var(--fg); font: 400 13px/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-list span { color: var(--muted); font: 400 11px/1.2 var(--mono); }
  .ft { flex: none; display: inline-grid; place-items: center; width: 34px; height: 22px; margin-right: 8px; border-radius: 5px; border: 1px solid color-mix(in srgb, var(--blue) 55%, transparent); color: var(--blue); font: 500 9.5px/1 var(--mono); font-style: normal; letter-spacing: .04em; vertical-align: middle; }
  .pt-list .ft { margin-right: 0; }
  .pt-new { font-style: normal; padding: 3px 6px; border-radius: 99px; background: var(--blue); color: #fff; font: 500 9.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
  .pt-quote { margin: 0; color: var(--fg); font: 400 17px/1.45 var(--sans); letter-spacing: -.005em; }
  .pt-quote cite { display: block; margin-top: 12px; color: var(--muted); font: 400 11px/1.2 var(--mono); font-style: normal; }
  .pt-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
  .pt-guides a { display: flex; flex-direction: column; gap: 10px; min-height: 120px; padding: 16px; border-radius: 14px; border: 1px solid rgba(130, 165, 255, 0.24); background: rgba(14, 22, 64, 0.55); text-decoration: none; transition: border-color .25s ease, transform .25s ease; }
  body.day .pt-guides a { background: rgba(238, 243, 255, 0.85); }
  .pt-guides.is-mini a { min-height: 0; background: color-mix(in srgb, var(--fg) 4%, transparent); }
  .pt-guides a:hover { border-color: var(--blue); transform: translateY(-2px); }
  .pt-guides span { color: var(--muted); font: 400 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
  .pt-guides b { flex: 1; color: var(--fg); font: 500 16px/1.2 var(--sans); }
  .pt-guides em { font-style: normal; color: var(--blue); font: 400 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
  .pt-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--blue) 60%, transparent); background: color-mix(in srgb, var(--blue) 6%, transparent); cursor: pointer; text-align: center; transition: background .2s ease; }
  .pt-drop:hover, .pt-drop.over { background: color-mix(in srgb, var(--blue) 14%, transparent); }
  .pt-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  .pt-drop b { color: var(--fg); font: 500 14px/1.2 var(--sans); }
  .pt-drop span { color: var(--muted); font: 400 11px/1.2 var(--mono); }
  .pt-table { padding: 6px 4px; overflow-x: auto; }
  .pt-table table { width: 100%; border-collapse: collapse; min-width: 620px; }
  .pt-table th { padding: 12px 16px; color: var(--muted); font: 400 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-align: left; }
  .pt-table td { padding: 13px 16px; border-top: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); font: 400 12.5px/1.3 var(--mono); white-space: nowrap; }
  .pt-table td:last-child { text-align: right; }
  .pt-table tbody tr:hover td { background: color-mix(in srgb, var(--blue) 7%, transparent); }
  .pt-review { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; align-items: start; }
  .pt-shot { display: flex; flex-direction: column; gap: 14px; }
  /* a wireframe of the homepage stands in for the real design file */
  .pt-mock { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; padding: 7% 8%; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: min-content; gap: 6% 4%; align-content: start; background: radial-gradient(color-mix(in srgb, var(--blue) 45%, transparent) 1px, transparent 1.4px) 0 0 / 9px 9px, color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); overflow: hidden; }
  .pt-mock i { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--fg) 30%, transparent); }
  .pt-mock i:first-child { width: 60%; background: var(--blue); }
  .pt-mock b { grid-column: 1 / -1; height: 26px; width: 70%; margin-top: 6%; border-radius: 4px; background: color-mix(in srgb, var(--fg) 85%, transparent); }
  .pt-mock span { grid-column: 1 / -1; height: 6px; width: 55%; border-radius: 3px; background: color-mix(in srgb, var(--fg) 30%, transparent); }
  .pt-mock span.short { width: 35%; }
  .pt-mock u { aspect-ratio: 1; margin-top: 10%; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--blue) 60%, transparent); background: color-mix(in srgb, var(--blue) 18%, transparent); }
  .pt-fb { display: flex; flex-direction: column; gap: 14px; }
  .pt-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pt-choice button { padding: 11px 8px; border-radius: 12px; border: 1px solid rgba(130, 165, 255, 0.3); background: none; color: var(--fg); font: 400 12.5px/1 var(--mono); cursor: pointer; transition: background .25s ease, border-color .25s ease; }
  .pt-choice button:hover { border-color: var(--blue); }
  .pt-choice button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); border-color: transparent; box-shadow: 0 0 16px -4px var(--glow); }
  .pt-fb textarea { height: 80px; }
  .pill.pt-send, .pt-compose .pill { position: relative; inset: auto; align-self: flex-start; cursor: pointer; font-family: var(--mono); }
  .portal .c-status { margin: -4px 0 0; max-width: none; font: 400 12px/1.4 var(--mono); color: var(--blue); }
  .portal .c-status:empty { display: none; }
  .pt-hist { list-style: none; margin: -6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .pt-hist li { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: 400 11.5px/1.3 var(--mono); }
  .pt-hist b { color: var(--fg); font-weight: 400; }
  .pt-chat { display: flex; flex-direction: column; gap: 16px; }
  .pt-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; max-height: 52vh; overflow-y: auto; }
  .pt-thread li { max-width: 72%; display: flex; flex-direction: column; gap: 6px; }
  .pt-thread li.me { align-self: flex-end; align-items: flex-end; }
  .pt-thread b { color: var(--muted); font: 400 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
  .pt-thread p { margin: 0; padding: 11px 14px; border-radius: 14px 14px 14px 4px; background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--fg); font: 400 13px/1.5 var(--mono); }
  .pt-thread li.me p { border-radius: 14px 14px 4px 14px; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); color: #fff; }
  .pt-thread time { color: var(--muted); font: 400 10.5px/1 var(--mono); }
  .pt-compose { display: flex; gap: 10px; align-items: center; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
  .pt-compose input { flex: 1; min-width: 0; padding: 10px 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); background: none; color: var(--fg); font: 400 13px/1.4 var(--mono); outline: none; }
  .pt-compose input:focus { border-bottom-color: var(--blue); }
  .pt-compose .pill { align-self: center; }
  /* new project request: a call to action, then a four-step form */
  .pt-new-btn { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer; border-style: dashed; border-color: color-mix(in srgb, var(--blue) 60%, transparent); transition: border-color .25s ease, background .25s ease; }
  .pt-new-btn:hover { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, rgba(14, 22, 64, 0.55)); }
  .pt-new-btn[hidden] { display: none; }
  .pt-plus { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); color: #fff; font: 400 22px/1 var(--sans); box-shadow: 0 0 16px -2px var(--glow); }
  .pt-new-btn > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 5px; }
  .pt-new-btn b { color: var(--fg); font: 500 18px/1.1 var(--sans); }
  .pt-new-btn em { font-style: normal; color: var(--muted); font: 400 12px/1.4 var(--mono); }
  .pt-arrow { color: var(--fg); font: 400 18px/1 var(--mono); }
  .pt-req { scroll-margin-top: 8px; display: flex; flex-direction: column; gap: 18px; animation: rise .45s cubic-bezier(.2,.7,.2,1); }
  .pt-req[hidden] { display: none; }
  .pt-step { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .pt-step[hidden] { display: none; }
  .pt-step legend { padding: 0; margin-bottom: 4px; color: var(--fg); font: 500 26px/1.1 var(--sans); letter-spacing: -.02em; }
  .portal .pt-hint { margin: -6px 0 0; max-width: none; color: var(--muted); font: 400 12px/1.5 var(--mono); }
  .pt-k em { font-style: normal; text-transform: none; letter-spacing: 0; }
  .pt-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pt-tiles label { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 14px 38px; border-radius: 14px; border: 1px solid rgba(130, 165, 255, 0.28); cursor: pointer; transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }
  .pt-tiles label:hover { border-color: var(--blue); }
  .pt-tiles input { position: absolute; left: 14px; top: 16px; width: 14px; height: 14px; margin: 0; accent-color: #fff; }
  .pt-tiles b { color: var(--fg); font: 500 15px/1.1 var(--sans); }
  .pt-tiles span { color: var(--muted); font: 400 11px/1.3 var(--mono); }
  .pt-tiles label:has(input:checked) { background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); border-color: transparent; box-shadow: 0 0 18px -4px var(--glow); }
  .pt-tiles label:has(input:checked) b, .pt-tiles label:has(input:checked) span { color: #fff; }
  .pt-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
  .pt-pills button { padding: 9px 13px; border-radius: 99px; border: 1px solid rgba(130, 165, 255, 0.3); background: none; color: var(--fg); font: 400 12px/1 var(--mono); cursor: pointer; transition: background .25s ease, border-color .25s ease; }
  .pt-pills button:hover { border-color: var(--blue); }
  .pt-pills button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); border-color: transparent; box-shadow: 0 0 14px -4px var(--glow); }
  .pt-req textarea { height: 84px; }
  .pt-sum { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; }
  .pt-sum dt { color: var(--muted); font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .pt-sum dd { margin: 0; color: var(--fg); font: 400 13px/1.4 var(--mono); overflow-wrap: anywhere; }
  .pt-req-nav { justify-content: flex-end; gap: 20px; }
  .pt-req-nav .pill { align-self: center; }
  .pt-project.is-new { border-color: color-mix(in srgb, var(--blue) 70%, transparent); box-shadow: 0 0 30px -10px var(--glow); }
  @media (max-width: 760px) {
    .pt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-sum { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .pt-sum dd { margin-bottom: 8px; }
  }
  /* two kinds of account: a business client and a member who subscribes to the library */
  #portal[data-role="member"] [data-for="client"], #portal[data-role="client"] [data-for="member"] { display: none !important; }
  #portal[data-role="member"] #ptProjects > .pt-project:not(.is-new) { display: none; }
  .pt-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
  .pt-role { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 99px; border: 1px solid rgba(130, 165, 255, 0.28); background: rgba(14, 22, 64, 0.55); }
  body.day .pt-role { background: rgba(238, 243, 255, 0.85); }
  .pt-role span { padding: 0 8px 0 10px; color: var(--muted); font: 400 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .pt-role button { padding: 7px 12px; border: 0; border-radius: 99px; background: none; color: var(--fg); font: 400 12px/1 var(--mono); cursor: pointer; }
  .pt-role button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); box-shadow: 0 0 14px -4px var(--glow); }
  .pt-who .pt-avatar.is-member { background: none; border: 1px solid var(--blue); color: var(--fg); }
  .pt-continue h3, .pt-upsell h3 { margin: 6px 0 0; color: var(--fg); font: 500 22px/1.15 var(--sans); letter-spacing: -.02em; }
  .pt-bar-progress { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--fg) 10%, transparent); overflow: hidden; }
  .pt-bar-progress i { display: block; height: 100%; background: var(--blue); box-shadow: 0 0 10px var(--glow); }
  .pt-meta .pt-link + .pt-link { margin-left: 0; }
  .pt-plan { display: flex; align-items: baseline; gap: 8px; }
  .pt-plan b { color: var(--fg); font: 500 40px/1 var(--sans); letter-spacing: -.03em; }
  .pt-plan span, .portal .pt-small, .pt-upsell p { margin: 0; max-width: none; color: var(--muted); font: 400 12px/1.5 var(--mono); }
  .pt-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .pt-perks li { position: relative; padding-left: 18px; color: var(--fg); font: 400 12.5px/1.3 var(--mono); }
  .pt-perks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 6px var(--glow); }
  .pt-card.pt-upsell { border-style: dashed; border-color: color-mix(in srgb, var(--blue) 60%, transparent); }
  .pt-form .c-grid { margin-top: 2px; }
  .pt-save { justify-content: flex-end; }
  .pt-save .c-status { margin: 0 auto 0 0 !important; }
  .pt-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); font: 500 12px/1 var(--mono); }
  .pt-logo::before { content: "MK"; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); font: 500 11px/1 var(--mono); }
  .pt-logo { font-size: 0; }
  .pt-logo .pt-link { font-size: 12px; }
  .pt-people { list-style: none; margin: 0; padding: 0; }
  .pt-people li, .pt-contact { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); }
  .pt-people li:first-child, .pt-contact { border-top: 0; }
  .pt-people div, .pt-contact div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .pt-people b, .pt-contact b { color: var(--fg); font: 500 14px/1.2 var(--sans); }
  .pt-people div span, .pt-contact div span { color: var(--muted); font: 400 11px/1.2 var(--mono); }
  .pt-people em { font-style: normal; color: var(--fg); font: 400 11.5px/1 var(--mono); padding: 5px 9px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent); white-space: nowrap; }
  .pt-avatar-s { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(130, 165, 255, 0.4); color: var(--fg); font: 500 10.5px/1 var(--mono); }
  .pt-avatar-s.is-studio { background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); border: 0; color: #fff; box-shadow: 0 0 12px -2px var(--glow); }
  .pt-kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .pt-kv li { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); }
  .pt-kv li:first-child { border-top: 0; }
  .pt-kv span { color: var(--muted); font: 400 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
  .pt-kv b { grid-row: 2; color: var(--fg); font: 400 13px/1.3 var(--mono); }
  .pt-kv em, .pt-kv .pt-link { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; color: var(--muted); font: 400 11.5px/1.2 var(--mono); }
  .pt-kv .pt-link { color: var(--fg); }
  .pt-toggles { display: flex; flex-direction: column; gap: 12px; }
  .pt-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--fg); font: 400 12.5px/1.3 var(--mono); cursor: pointer; }
  .pt-toggle span { order: -1; }
  .pt-toggle input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 34px; height: 20px; margin: 0; border-radius: 99px; background: color-mix(in srgb, var(--fg) 18%, transparent); cursor: pointer; transition: background .25s ease; }
  .pt-toggle input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s ease; }
  .pt-toggle input:checked { background: var(--blue); box-shadow: 0 0 10px -2px var(--glow); }
  .pt-toggle input:checked::after { transform: translateX(14px); }
  .pt-toggle input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  .pt-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .pt-plans label { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 14px 38px; border-radius: 14px; border: 1px solid rgba(130, 165, 255, 0.28); cursor: pointer; transition: background .25s ease, border-color .25s ease; }
  .pt-plans input { position: absolute; left: 14px; top: 16px; margin: 0; accent-color: #fff; }
  .pt-plans b { color: var(--fg); font: 500 16px/1.1 var(--sans); }
  .pt-plans span { color: var(--muted); font: 400 11.5px/1.3 var(--mono); }
  .pt-plans label:has(input:checked) { background: linear-gradient(180deg, var(--glass-blue-top), var(--glass-blue-bottom)); border-color: transparent; box-shadow: 0 0 18px -4px var(--glow); }
  .pt-plans label:has(input:checked) b, .pt-plans label:has(input:checked) span { color: #fff; }
  .pt-membership .pt-meta { gap: 6px 18px; }
  @media (max-width: 760px) {
    .pt-plans { grid-template-columns: minmax(0, 1fr); }
    .pt-role { width: 100%; justify-content: space-between; }
  }
  /* brand kit on the business profile */
  .pt-kit h3 { margin: 6px 0 0; color: var(--fg); font: 500 20px/1.2 var(--sans); letter-spacing: -.02em; }
  .pt-kit-grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 22px; }
  .pt-kit-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .pt-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pt-logos figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
  .pt-logos figure > span { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 10px; font: 400 15px/1 Georgia, serif; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
  .pt-logos .is-dark > span { background: #1E2A44; color: #F3E9DC; border: 1px solid rgba(130, 165, 255, 0.2); }
  .pt-logos .is-light > span { background: #F3E9DC; color: #1E2A44; }
  .pt-logos figcaption { color: var(--muted); font: 400 10.5px/1 var(--mono); }
  .pt-formats { display: flex; gap: 6px; }
  .pt-formats button { flex: 1; padding: 7px 0; border-radius: 8px; border: 1px solid rgba(130, 165, 255, 0.3); background: none; color: var(--fg); font: 400 11px/1 var(--mono); cursor: pointer; }
  .pt-formats button:hover { border-color: var(--blue); color: var(--blue); }
  .pt-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pt-swatches button { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; gap: 3px 10px; align-items: center; padding: 8px; border-radius: 10px; border: 1px solid rgba(130, 165, 255, 0.2); background: none; text-align: left; cursor: pointer; transition: border-color .2s ease; }
  .pt-swatches button:hover { border-color: var(--blue); }
  .pt-swatches i { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 7px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
  .pt-swatches b { color: var(--fg); font: 500 12.5px/1 var(--sans); }
  .pt-swatches span { color: var(--muted); font: 400 10.5px/1 var(--mono); }
  .pt-type { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .pt-type li { display: flex; align-items: center; gap: 12px; }
  .pt-type b { width: 44px; color: var(--fg); font-size: 28px; font-weight: 400; line-height: 1; }
  .pt-type div { display: flex; flex-direction: column; gap: 4px; }
  .pt-type span { color: var(--fg); font: 400 12.5px/1 var(--mono); }
  .pt-type em { font-style: normal; color: var(--muted); font: 400 10.5px/1.2 var(--mono); }
  .pt-kit-col > .pt-link, .pt-grid > .pt-card > .pt-link { align-self: flex-start; }
  @media (max-width: 980px) { .pt-kit-grid { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 980px) {
    .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-review { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 760px) {
    .page.portal { padding-top: 64px; }
    .pt-wrap { grid-template-columns: minmax(0, 1fr); }
    .pt-side { position: static; padding: 14px; gap: 14px; }
    .pt-nav { flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
    .pt-nav::-webkit-scrollbar { display: none; }
    .pt-nav button { flex: none; gap: 8px; }
    .pt-dept, .pt-out { display: none; }
    .pt-grid { grid-template-columns: minmax(0, 1fr); }
    .pt-thread li { max-width: 88%; }
    .pt-track li span { font-size: 10px; }
  }

  /* ---------- plain WordPress pages (legal notice, privacy policy...) inside the shell ---------- */
  .page.wp-content { display: block; overflow-y: auto; padding: 84px 16px 110px; text-align: left; }
  .page.wp-content[hidden] { display: none; }
  .wp-article { max-width: 760px; margin: 0 auto; padding: clamp(22px, 4vw, 44px); border-radius: 22px; background: rgba(14, 22, 64, 0.55); border: 1px solid rgba(130, 165, 255, 0.28); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); color: var(--fg); animation: rise .6s cubic-bezier(.2,.7,.2,1); }
  body.day .wp-article { background: rgba(238, 243, 255, 0.85); border-color: rgba(47, 107, 255, 0.22); }
  .wp-article h1 { margin: 0 0 18px; font: 500 clamp(30px, 4.4vw, 52px)/1 var(--sans); letter-spacing: -.035em; color: var(--fg); text-align: left; }
  .wp-article h2, .wp-article h3 { font: 500 20px/1.25 var(--sans); margin: 28px 0 8px; color: var(--fg); }
  .wp-article p, .wp-article li { max-width: 68ch; font: 400 14.5px/1.65 var(--sans); color: var(--fg); text-align: left; }
  .wp-article a { color: var(--blue); }
  .wp-article img { max-width: 100%; height: auto; border-radius: 12px; }
  .legal-links { position: fixed; z-index: 4; left: 50%; bottom: calc(var(--edge) + 44px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 14px; font: 400 10.5px/1 var(--mono); letter-spacing: .06em; opacity: .55; }
  .legal-links a { color: var(--muted); text-decoration: none; }
  .legal-links a:hover { color: var(--blue); opacity: 1; }
  body.paged .legal-links { display: none; }
  /* 1.2: media linked by Saturnio Library inside the article sheet */
  .av-cover { margin: 0 0 clamp(22px, 3vw, 34px); }
  .av-cover[hidden] { display: none; }
  .av-cover figure { margin: 0; }
  .av-cover img, .av-cover canvas, .av-cover video { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: cover; }
  .av-fig { margin: 0.9em 0; break-inside: avoid; }
  .av-fig img, .av-fig video, .av-fig canvas { display: block; width: 100%; height: auto; }
  .av-fig iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
  .av-body .av-fig figcaption, .av-cover figcaption, .av-gallery figcaption { margin-top: 6px; font: 400 10.5px/1.4 var(--mono); letter-spacing: .02em; text-indent: 0; opacity: .85; }
  .av-fig figcaption small, .av-cover figcaption small, .av-gallery figcaption small { opacity: .7; }
  .av-gallery { column-span: all; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 1.6em; }
  .av-gallery figure { margin: 0; } .av-gallery img, .av-gallery canvas { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
  .av-gallery iframe, .av-gallery video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
  .av-downloads { column-span: all; list-style: none; margin: 1.6em 0 0; padding: 12px 0 0; border-top: 1px solid rgba(232, 235, 241, 0.3); }
  .av-downloads li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; text-indent: 0; }
  .av-downloads a { color: var(--ink); font: 500 13px/1.3 var(--mono); text-decoration: underline; text-underline-offset: 3px; }
  .av-downloads span { font: 400 10.5px/1.3 var(--mono); opacity: .8; }
  .hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
