/* Masque — Acuity
   A dark instrument room with one illuminated panel, lit in the colour of whichever
   disguise is currently up. See DESIGN.md.
   GSAP is vendored into site/vendor/ and served from this origin: no external requests,
   which is the product's own claim and the first thing a privacy-minded visitor checks. */

:root {
  /* The room has hue now. A neutral grey shares nothing with the six app interfaces it
     frames, which is why the page read as drab standing next to its own product. */
  --room: #0d0b14; /* deep indigo-plum */
  --charcoal: #16131f;
  --housing: #2a2438;
  --grey: #a79fb8; /* 7.7:1 on room */
  --quiet: #8f86a3; /* 5.7:1 on room, the floor */
  --chart: #f5f3f7;
  --ink: #14101c;

  /* Duochrome: red means exposed, green means protected. Never emphasis. Both are
     retuned for the indigo base, and both stay out of the [data-app] scope below so
     that identity colour and risk colour never share a section. */
  --red: #f2635a; /* 6.2:1 on room */
  --green: #3dd68c; /* 10.4:1 on room */
  --on-green: #06150d;

  /* The mask's own colour. This is the resting hue, used wherever no disguise is
     in play; [data-app] overrides it per face, and reel.js sets it on the morph as each
     disguise slides up. Everything that glows reads from here. */
  --accent: #8b7bf7;

  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --wrap: min(1180px, 100% - 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* A ghost button's only edge. --housing on --room is 1.31:1, which made the secondary
     actions read as loose text; this is 3.37:1, the same value prefers-contrast uses. */
  --edge: #6b6083;

  /* Dark in every OS appearance. Without this a light-mode OS draws white scrollbars and
     native controls on an indigo page. */
  color-scheme: dark;
}

/* The fixed header is ~76px with its fade. Anchor jumps used to land section headings
   underneath it. */
html {
  scroll-padding-top: 5rem;
  /* Links in the header glide to their section. The reduced-motion block turns it off. */
  scroll-behavior: smooth;
}

/* With Lenis driving the wheel (reel.js), the browser's own smoothing would fight it. */
html.is-gliding {
  scroll-behavior: auto;
}

/* Selected text is the mask's purple, not the browser's blue. A fixed colour, not
   --accent: the highlight stays purple whichever disguise the page has taken on. White on
   #6f5fe8 is about 5:1. */
::selection {
  background: #6f5fe8;
  color: #fff;
}

/* Set by reel.js when the hero is scrolled away: the logo's loops stop repainting. */
.hero.is-away .mq,
.hero.is-away .mq * {
  animation-play-state: paused;
}

/* Read by screen readers, not drawn. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* One hue per disguise, taken from each brand's own mark. The three near-blues are
   pulled apart deliberately — GitHub lifted, Outlook pushed to cyan — because Docs,
   Outlook and GitHub blue are nearly the same colour on a dark ground.
   `data-app` already exists on both the morph layers and the cards (reel.js), so this
   needs no new markup. */
[data-app="notion"] {
  --accent: #c79a6b; /* warm stone — Notion itself is monochrome */
}
[data-app="slack"] {
  --accent: #e01e5a;
}
[data-app="github"] {
  --accent: #6e9bf7;
}
[data-app="docs"] {
  --accent: #4285f4;
}
[data-app="gmail"] {
  --accent: #ea4335;
}
[data-app="outlook"] {
  --accent: #38bdf8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--room);
  color: var(--grey);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* One wash, in the mask's own violet, falling from the top. There were three (violet,
   cyan and pink in three corners), which is the aurora every dark landing page has; the
   colour on this page belongs to the disguises, and the ground should not compete.
   `position: fixed` on purpose: the layer is painted once and composited, so it costs
   nothing per scrolled frame — a scrolling gradient this large would repaint constantly. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* Every stop fades to its *own* hue at zero alpha, never to the `transparent` keyword.
     `transparent` is rgba(0,0,0,0), so a violet fading to it interpolates through
     transparent black and leaves a dark ring just before it disappears — which reads as a
     hard edge on a dark page. This is what the banding was. */
  background: radial-gradient(
    90% 60% at 50% 0%,
    rgba(139, 123, 247, 0.12),
    rgba(139, 123, 247, 0) 70%
  );
}

/* Dither. Even with clean interpolation, 8-bit colour cannot express a smooth ramp across
   very dark values — the steps land far enough apart to read as concentric rings. A faint
   noise layer scatters those steps below the threshold where the eye joins them into a
   band. Inline SVG as a data URI, so it costs no request and the CSP allows it. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3 {
  color: var(--chart);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  max-width: 68ch;
}

a {
  color: inherit;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* Narrow is a measure, not a column. As a centred 72ch box its headings started at x=402
   at 1440 while every other section starts at 122 — an indent that reads as subordinate.
   The paragraphs already cap themselves at 68ch; the block itself stays on the grid. */
.narrow {
  max-width: none;
}

.label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}

/* Monospace appears only on measured values, never to make prose look technical. */
.notation {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  padding: 0.75rem 1rem;
  background: var(--chart);
  color: var(--ink);
  font-weight: 600;
}

.skip:focus {
  left: 0;
}

/* Chart White, not duochrome: a focus ring must not borrow meaning that carries. */
:focus-visible {
  outline: 2px solid var(--chart);
  outline-offset: 3px;
}

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: var(--wrap);
  padding: 0.875rem 0;
}

/* The mask matters as much as the gradient. The fill faded out but backdrop-filter does
   not fade with it — it blurred at full strength to the bottom of the box and stopped, so a
   hard line of blur crossed every card that scrolled under the header. Masking the whole
   layer fades the blur and the tint together: a scroll edge, not a divider. The fill fades
   to the room's own hue at zero alpha; `transparent` would pass through black. */
.topbar::before {
  content: "";
  position: absolute;
  inset: -0.875rem -50vw;
  z-index: -1;
  background: linear-gradient(var(--room) 55%, rgb(13 11 20 / 0));
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  pointer-events: none;
}

/* margin-right: auto lives on the wordmark, not on the nav. On the nav it only worked
   while the nav was visible; below 960px the nav is hidden and "Install free" collapsed in
   beside the wordmark instead of sitting at the right edge. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 34px;
  color: var(--chart);
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.topbar .wordmark {
  margin-right: auto;
}

/* The word is set in the logo's own italic serif, first letter in the live colour, so the
   top bar is the hero lockup laid on its side. Georgia is a system face: nothing loads. */
.wordmark .word {
  display: inline-block;
  font: italic 400 1.3em/1 Georgia, "Iowan Old Style", "Times New Roman", serif;
  letter-spacing: -0.015em;
}

.wordmark .word::first-letter {
  color: var(--live-accent, var(--accent));
}

/* ---------- the mark ----------
   A mask that takes the colour of whatever it is disguised as. --a is that colour.
   Registered so it interpolates — an unregistered custom property can only jump. */
@property --a {
  syntax: "<color>";
  inherits: true;
  initial-value: #8b7bf7;
}

.mark {
  /* reel.js sets --live-accent on the header while the morph is pinned; otherwise the
     resting violet. The header sits outside #morph, so it cannot read the section's
     --accent. Not on <html>: a custom property there restyles all ~4,900 elements, 23ms
     each time the disguise changed mid-scroll. */
  --rest: var(--live-accent, var(--accent));
  --a: var(--rest);
  flex: 0 0 auto;
  width: 38px;
  height: 18px;
  overflow: visible;
  transition: --a 600ms cubic-bezier(0.22, 1, 0.36, 1);
  /* One settle on load: a single sweep through all six disguises, decelerating, home on
     the resting colour. It runs once and never loops. */
  animation: mark-settle 1200ms 300ms;
  animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
}

.footer .mark {
  width: 44px;
  height: 21px;
}

.mark-facets {
  fill: var(--a);
}

/* The hover flush runs on the path, a different element from the load settle, so
   hovering never restarts the settle. It is keyed to a class app.js latches on mouseenter
   and clears on animationend: keyed to :hover it was cut off when the pointer left, and
   the colour snapped back mid-sweep. */
.mark-facets.is-flushing {
  animation: mark-flush 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stops spaced unevenly so the sweep decelerates; warm and cool alternate so neighbouring
   hues never smear into each other (Docs and GitHub are both blue). */
@keyframes mark-settle {
  0% { --a: var(--rest); }
  10% { --a: #e01e5a; }
  22% { --a: #38bdf8; }
  35% { --a: #c79a6b; }
  49% { --a: #6e9bf7; }
  64% { --a: #ea4335; }
  80% { --a: #4285f4; }
  100% { --a: var(--rest); }
}

/* Three hues, not six: six in 700ms is ~100ms each, which reads as flicker. */
@keyframes mark-flush {
  0% { --a: var(--rest); }
  35% { --a: #e01e5a; }
  65% { --a: #38bdf8; }
  100% { --a: var(--rest); }
}

@media (prefers-reduced-motion: reduce) {
  .mark,
  .mark-facets,
  .mark-facets.is-flushing {
    animation: none;
  }

  .mark {
    transition: none;
  }
}

/* The static mark, for the legal pages: a background on the existing span, so the pages
   that carry `.wordmark-dot` in their top bar and footer need no inline SVG. The box has
   the mask's own proportions (120 x 56), so nothing is letterboxed. */
.wordmark-dot {
  width: 38px;
  height: 18px;
  background: url("mark.svg") center / contain no-repeat;
}

/* The footer carries the same wordmark at the close of the page, where it can be larger
   without crowding the nav beside it. */
.footer .wordmark {
  font-size: 1.25rem;
}

.footer .wordmark-dot {
  width: 44px;
  height: 21px;
}

/* ---------- the lockup ----------
   The logo, performed once in the hero: mask stacked over the word. Everything is sized in
   em, so font-size on .mq scales the whole thing. The base styles ARE the final frame, so
   with animations off the logo simply sits there.

   Nothing is blurred, tilted, or scaled as a bitmap. The mask changes size inside its own
   SVG (.mq-size), so it is redrawn as vectors on every frame; scaling the element instead
   made the browser stretch a picture of it, and it went soft.

   One score, every delay measured from page load:
     0.15s  the outline draws outward from the brow
     1.00s  colour floods in from the centre
     1.60s  the eyes open
     2.05s  it blinks, twice
     3.00s  it lifts to its place; the word rises from behind an edge, letter by letter
     4.20s  a sheen crosses the mask, and a violet wave runs through the letters
     then   idle: it floats, blinks now and then, and the sheen returns every 7s

   The per-letter delay is set with :nth-child rather than an inline style: the page's
   Content-Security-Policy is `style-src 'self'`, which blocks style attributes. */
.mq {
  --word: var(--chart);
  --hi: #a99cff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 1.75rem -0.2em; /* the word's own side padding, pulled back to the column edge */
  /* Smaller than the headline: at 4rem the lockup and a 3.5rem h1 competed, and the page
     had no single largest thing. The logo signs the hero; the promise leads it. */
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1;
  transition: opacity 0.4s ease;
}

/* The beat before the logo performs again (app.js swaps it for a fresh copy). */
.mq.is-leaving {
  opacity: 0;
}

.mq-rise,
.mq-float {
  display: block;
}

.mq-rise {
  animation: mq-rise 1.2s cubic-bezier(0.3, 1.2, 0.4, 1) 3s both;
}

.mq-float {
  animation: mq-float 6s ease-in-out 4.6s infinite alternate;
}

.mq-mask {
  display: block;
  width: 2.9em;
  height: 1.36em;
  overflow: visible;
}

.mq-mask * {
  transform-box: fill-box;
  transform-origin: center;
}

.mq-size {
  animation: mq-size 1.2s cubic-bezier(0.3, 1.2, 0.4, 1) 3s both;
}

.mq-flood {
  animation: mq-flood 0.85s cubic-bezier(0.3, 0, 0.2, 1) 1s both;
}

/* Three animations on one property: the later one in the list wins while it is running,
   so the eyes open, then blink twice, then fall into the slow idle blink. */
.mq-hole {
  animation:
    mq-open 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) 1.6s both,
    mq-blink2 0.9s ease-in-out 2.05s,
    mq-blink 5.5s ease-in-out 6.2s infinite;
}

.mq-line {
  fill: none;
  stroke: #e2dcff;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  animation:
    mq-draw 1.15s cubic-bezier(0.6, 0, 0.3, 1) 0.15s both,
    mq-linefade 0.7s ease 1.3s both;
}

/* A highlight along the top edge: the outline again, nudged down and clipped to the mask. */
.mq-rim {
  fill: none;
  stroke: rgb(255 255 255 / 0.5);
  stroke-width: 1.5;
}

.mq-sheen {
  transform: translateX(-90px) skewX(-18deg);
  animation: mq-sheen 7s cubic-bezier(0.4, 0, 0.2, 1) 4.2s infinite backwards;
}

/* The word waits below this box's bottom edge and rises through it: a hard edge, no fade.
   The negative margin closes the gap the line box leaves above the capitals. */
.mq-word {
  display: block;
  overflow: hidden;
  margin-top: -0.16em;
  padding: 0.1em 0.2em 0.26em;
  font: italic 400 1em/1 Georgia, "Iowan Old Style", "Times New Roman", serif;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.mq-word span {
  --d: 0s;
  display: inline-block;
  color: var(--word);
  animation:
    mq-letter 0.95s cubic-bezier(0.2, 0.9, 0.25, 1) calc(3.15s + var(--d) * 9) both,
    mq-wave 7s ease-in-out calc(4.4s + var(--d) * 7) infinite backwards;
}

.mq-word span:first-child {
  --word: #9d8ffa;
  --hi: #e2dcff;
}

.mq-word span:nth-child(2) { --d: 10ms; }
.mq-word span:nth-child(3) { --d: 20ms; }
.mq-word span:nth-child(4) { --d: 30ms; }
.mq-word span:nth-child(5) { --d: 40ms; }
.mq-word span:nth-child(6) { --d: 50ms; }

@keyframes mq-draw {
  from { stroke-dasharray: 0 1; stroke-dashoffset: 0; }
  to { stroke-dasharray: 1 0; stroke-dashoffset: 0.5; }
}
@keyframes mq-linefade { from { opacity: 1; } }
@keyframes mq-flood { from { transform: scale(0); } }
@keyframes mq-open { from { transform: scaleY(0); } }
@keyframes mq-blink2 {
  0%, 36%, 64%, 100% { transform: none; }
  18%, 82% { transform: scaleY(0.06); }
}
@keyframes mq-blink {
  0%, 93%, 100% { transform: none; }
  96.5% { transform: scaleY(0.06); }
}
@keyframes mq-rise { from { transform: translateY(0.56em); } }
@keyframes mq-size { from { transform: scale(1.38); } }
@keyframes mq-float { to { transform: translateY(-0.05em); } }
@keyframes mq-letter { from { transform: translateY(135%); } }
@keyframes mq-wave {
  0%, 12%, 100% { color: var(--word); }
  6% { color: var(--hi); }
}
@keyframes mq-sheen {
  0% { transform: translateX(-90px) skewX(-18deg); }
  16%, 100% { transform: translateX(90px) skewX(-18deg); }
}

/* The page-wide reduced-motion rule shortens durations but leaves delays in place, which
   would hide the word for three seconds and then snap it in. Off entirely: the finished logo. */
@media (prefers-reduced-motion: reduce) {
  .mq,
  .mq * {
    animation: none !important;
  }
}

.topbar nav {
  display: flex;
  gap: 1.5rem;
  font-size: 1rem;
}

.topbar nav a,
.footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  text-decoration: none;
}

/* Fingers, not pointers: 44px is the floor for anything tapped. */
@media (pointer: coarse) {
  .topbar nav a,
  .footer nav a {
    min-height: 44px;
  }
}

.topbar nav a:hover,
.footer nav a:hover {
  color: var(--chart);
}

/* ---------- buttons ---------- */

/* Not green. Green means protected on this page, and spending it on "Install free" was
   what made the whole site read as one green tool. The primary action is simply the
   brightest thing on a dark page; colour comes from the accent it emits. */
.btn {
  display: inline-block;
  padding: 0.875rem 1.625rem;
  border: 1px solid var(--chart);
  border-radius: 8px;
  background: var(--chart);
  color: var(--ink);
  font: 600 1rem/1 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), box-shadow 0.24s var(--ease),
    border-color 0.18s var(--ease), transform 0.1s var(--ease);
}

.btn:hover {
  background: #fff;
  border-color: #fff;
}

/* The press is felt on the way down: a small give, 100ms, from the centre. A 1px drop was
   too slight to register as the control taking the press. */
.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: none;
  border-color: var(--edge);
  color: var(--chart);
}

.btn-ghost:hover {
  background: none;
  border-color: color-mix(in srgb, var(--accent) 60%, var(--edge));
}

/* Paid plans cannot be bought yet. Visibly unavailable, still focusable so the line under
   the tiers that says why is read out, and no hover or press response — a control that
   reacts and then does nothing is worse than one that plainly says it is off. */
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn[aria-disabled="true"]:hover,
.btn[aria-disabled="true"]:active {
  transform: none;
  box-shadow: none;
}

.btn:not(.btn-ghost)[aria-disabled="true"]:hover {
  background: var(--chart);
  border-color: var(--chart);
}

.btn-ghost[aria-disabled="true"]:hover {
  border-color: var(--edge);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

@media (pointer: coarse) {
  .btn-sm {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--chart);
  text-underline-offset: 4px;
}

@media (pointer: coarse) {
  .textlink {
    min-height: 44px;
  }
}

/* ================= HERO ================= */

.hero {
  position: relative;
  display: grid;
  /* Near-even columns and a capped headline, so the authored two-line lockup holds. At
     0.82fr with a 72px h1 the copy column was 454px against a 623px second line, and the
     headline broke into four ragged lines: "Use AI / at work. / Look like you / aren't."
     Sized with ~10% slack over Segoe UI, because SF on a Mac sets wider. */
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  width: var(--wrap);
  margin-inline: auto;
  min-height: 100dvh;
  /* A short foot: the morph stage below already clears the header with its own 88px. */
  padding: 7rem 0 2rem;
}

/* The six-hue aurora that used to sit here is gone. Spreading all six accents across the
   whole hero washed colour behind the headline as well as the panel, which made the top of
   the page look lit from everywhere and nowhere. The panel now supplies its own light and
   nothing else does — the glow belongs to the object that is emitting it. */

.hero h1 {
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lede {
  margin-top: 1.5rem;
  max-width: 42ch;
  color: var(--chart);
  font-size: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* ---------- shared: an app drawn at its real width, scaled to its stage ----------
   reel.js measures the stage and sets --lw (the width the app is laid out at), --s (the
   scale that fits it) and --lh. Laid out wide and scaled, an app reflows as it would in a
   window; squeezed into the stage's own pixels it would collapse to its phone layout.
   A transform, not `zoom`: Chrome resolves percentages under zoom against the page. */
.fit-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--lw, 100%);
  height: var(--lh, 100%);
  transform: scale(var(--s, 1));
  transform-origin: 0 0;
}

.fit-canvas[hidden] {
  display: none;
}

/* ---------- shared: the wipe ----------
   A disguise is revealed behind a slanted line that crosses the screen, the same lean as
   the sheen that crosses the mask in the logo. --p is where the line is on its way in,
   --q on its way out; both run from -6% to 106% so the slant clears each side.
   Nothing travels: the app underneath and the disguise stay where they are and only the
   boundary moves, which is what the extension does. A crossfade showed two texts at once,
   and sliding panels moved a page that, in the product, never moves. */
/* Registered as non-inheriting: reel.js writes these every frame of a wipe, and an
   inheriting variable restyles the whole disguise inside (~2ms a frame). Only the clip
   reads them. */
@property --p {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: -6%;
}

@property --q {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: -6%;
}

.wipe {
  --p: -6%;
  --q: -6%;
  clip-path: polygon(
    calc(var(--q) + 6%) 0,
    calc(var(--p) + 6%) 0,
    calc(var(--p) - 6%) 100%,
    calc(var(--q) - 6%) 100%
  );
}

/* The line itself, in the colour of the disguise arriving behind it. */
.wipe-edge {
  --e: -6%;
  position: absolute;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transform: translateX(var(--e));
}

.wipe-edge.is-moving {
  opacity: 1;
}

.wipe-edge line {
  stroke: var(--accent);
  stroke-width: 2;
}

/* The arriving app is a sheet laid over the old one, so its edge throws a little shade
   ahead of it: two soft strokes just past the line, fading out. Thickness, not a glow —
   black, never the accent, and on the far side of the line only. The arriving app is
   always on the left of the line, both ways the line travels. */
.wipe-edge .edge-shade {
  stroke: #000;
  stroke-width: 14;
  stroke-opacity: 0.1;
}

.wipe-edge .edge-shade + .edge-shade {
  stroke-width: 6;
  stroke-opacity: 0.16;
}

/* ---------- the film ---------- */

.film {
  min-width: 0;
}

/* #212121 is ChatGPT's own grey, shown for the instant before the first frame paints.
   No glow: the panel used to throw its accent colour onto the page around it, which made
   every panel on the site the same lit rectangle. The edge is one hairline. */
.film-stage {
  position: relative;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  border-radius: 14px;
  background: #212121;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chart) 10%, transparent);
}

@media (max-width: 620px) {
  .film-stage {
    aspect-ratio: 4 / 5;
  }
}

.film-site,
.film-mask,
.film-mount {
  position: absolute;
  inset: 0;
}

.film-site[hidden],
.film-mount[hidden] {
  display: none;
}

/* Set larger than the recreation's own 15px: the canvas is scaled down to the stage, and
   at 15px the conversation fell under 10px on screen and left the top third empty. */
.film-site {
  font-size: 21px;
}

@media (max-width: 620px) {
  .film-site {
    font-size: 16px;
  }
}

/* A chat sits at its latest message, so when the thread is taller than the window it is
   the top that goes, not the reply being written. */
.film-site .gpt-thread {
  justify-content: flex-end;
}

/* The reply arrives a word at a time. reel.js wraps the words; with no script they are
   simply all there. */
.gpt-stream .w {
  opacity: 0;
}

.gpt-stream .w.is-in {
  opacity: 1;
}

.film-mask {
  z-index: 10;
}

/* Under the stage: which scene is playing, and the two controls. */
.film-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.film-scenes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-right: auto;
}

.film-scene,
.film-ctl {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--quiet);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.film-scene:hover,
.film-ctl:hover {
  background: var(--charcoal);
  color: var(--chart);
}

.film-scene.is-on {
  background: var(--charcoal);
  color: var(--grey);
}

/* Inside the playing scene, the name on screen right now is the lit one: the chat app
   until the line crosses, the disguise after. */
.film-scene.is-on .film-from,
.film-scene.is-on.is-covered .film-to {
  color: var(--chart);
}

.film-scene.is-on.is-covered .film-from {
  color: var(--quiet);
}

/* How far through its scene the film is. Scaled, so it never lays anything out. */
.film-scene.is-on::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--prog, 0));
  transform-origin: 0 50%;
}

.film-ctl {
  background: var(--charcoal);
  color: var(--grey);
}

.film-ctl[hidden] {
  display: none;
}

.film-ctl-icon {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.film-ctl svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.film-ctl[aria-pressed="true"] {
  color: var(--chart);
}

.film-ctl[aria-pressed="false"] .snd-on,
.film-ctl[aria-pressed="true"] .snd-off,
.film-ctl .ico-play,
.film-ctl.is-paused .ico-pause {
  display: none;
}

.film-ctl.is-paused .ico-play {
  display: inline;
}

@media (pointer: coarse) {
  .film-scene,
  .film-ctl {
    min-height: 44px;
  }

  .film-ctl-icon {
    width: 44px;
  }
}

/* On a phone the three full names wrapped onto three rows. Each chip keeps only the name
   of its disguise, and the five controls sit on one line. */
@media (max-width: 620px) {
  .film-bar,
  .film-scenes {
    gap: 4px;
  }

  .film-scene {
    padding: 0 10px;
  }

  .film-from,
  .film-as,
  .film-ctl span {
    display: none;
  }

  .film-scene.is-on .film-to {
    color: var(--chart);
  }

  .film-ctl {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
}

/* The morph's title, inside its pinned stage: it stays over the frame while the disguises
   cross. Larger than body copy and smaller than a heading. */
.interstitial {
  flex: none;
  max-width: 46ch;
  margin: 0 auto 8px;
  color: var(--chart);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}

/* ================= THE MORPH ================= */
/* One screen. GSAP pins the section, and the scroll draws each disguise across the last
   behind the slanted line (.wipe, above). */

.morph-stage {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  width: var(--wrap);
  margin-inline: auto;
  padding: 88px 0 32px;
}

/* The same object as the film and the face stage: a dark panel with one hairline. */
.morph-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #212121;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chart) 10%, transparent);
}

.morph-layer {
  position: absolute;
  inset: 0;
}

.morph-layer.is-base {
  z-index: 1;
}

/* The theme stylesheets set .dsg-root { height: 100% }, so the shadow host needs a
   definite height or every disguise collapses to nothing. */
.morph-mount,
.card-mount {
  display: block;
  height: 100%;
}

.morph-cap,
.card-foot {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 24px;
}

.cap-logo,
.card-logo {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--chart);
}

.cap-name,
.card-name {
  color: var(--chart);
  font-weight: 620;
}

.cap-note,
.card-note {
  color: var(--quiet);
  font-size: 0.875rem;
}

/* ================= THE SIX FACES ================= */
/* One face at a time, large enough to read. Six thumbnails at 0.3 scale were six things
   nobody could read; one at near full size is the product itself. */

/* Heading left, the paragraph beside it, so the head fills the width instead of leaving
   half the screen empty beside a 62ch column. */

.face-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.face-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--charcoal);
  color: var(--grey);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.face-pick:hover {
  background: var(--housing);
  color: var(--chart);
}

/* The chosen one takes its own app's colour, as the section's accent does. */
.face-pick[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 24%, var(--charcoal));
  color: var(--chart);
}

.face-logo {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

/* The face is laid out at an app's real width (--lw, set by reel.js) and scaled down to the
   stage, so it reflows as the app would. `zoom` was tried for the old cards and resolves
   percentages against the page in Chrome; a transform does not. */
.face-stage {
  position: relative;
  margin-top: 1rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #212121;
}

@media (max-width: 620px) {
  .face-stage {
    aspect-ratio: 3 / 4;
  }
}

.face-mount {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--lw, 1280px);
  height: var(--lh, 720px);
  transform: scale(var(--s, 1));
  transform-origin: 0 0;
}

.face-mount[hidden] {
  display: none;
}

.face-caption {
  margin-top: 1rem;
  max-width: 70ch;
}

.face-caption strong {
  font-weight: 650;
}

/* Sentence case without editing the data. `text-transform: capitalize` would give
   "Mail Thread"; ::first-letter capitalises only the first, which is what a label wants. */
.cap-note::first-letter,
.card-note::first-letter {
  text-transform: uppercase;
}

.nominative {
  margin-top: 1.75rem;
  max-width: 74ch;
  font-size: 0.875rem;
  color: var(--quiet);
}

/* ---------- the ChatGPT recreation ---------- */

.gpt {
  display: flex;
  height: 100%;
  background: #212121;
  color: #ececec;
  font: 15px/1.6 var(--sans);
}

.gpt-rail {
  flex: 0 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  background: #171717;
}

.sprite {
  position: absolute;
}

.gpt-mark {
  width: 28px;
  height: 28px;
  color: #ececec;
}

.film-mk {
  flex: none;
  width: 16px;
  height: 16px;
}

.gpt-ico {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #2f2f2f;
}

.gpt-avatar {
  margin-top: auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #8b5cf6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.gpt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gpt-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
}

.gpt-model {
  color: #ececec;
  font-weight: 600;
}

.gpt-model b {
  color: #9b9b9b;
  font-weight: 400;
}

.gpt-seg {
  display: flex;
  gap: 2px;
  margin-inline: auto;
  padding: 3px;
  border-radius: 999px;
  background: #2f2f2f;
}

.gpt-seg i {
  padding: 0.25rem 1.125rem;
  border-radius: 999px;
  color: #b4b4b4;
  font-style: normal;
  font-size: 0.875rem;
}

.gpt-seg i.is-on {
  background: #424242;
  color: #fff;
}

.gpt-upgrade {
  color: #ececec;
  font-size: 0.875rem;
  font-weight: 500;
}

.gpt-thread {
  flex: 1;
  overflow: hidden;
  padding: 0.5rem clamp(1rem, 7%, 5rem);
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.gpt-turn p {
  margin: 0;
  max-width: none;
}

.gpt-turn p + p,
.gpt-turn ul {
  margin-top: 0.625rem;
}

.gpt-you {
  align-self: flex-end;
  max-width: 68%;
  padding: 0.625rem 1rem;
  border-radius: 20px;
  background: #303030;
}

.gpt-ai {
  align-self: flex-start;
  max-width: 94%;
}

.gpt-ai ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.3rem;
}

.gpt-composer {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 clamp(1rem, 7%, 5rem) 1.25rem;
  padding: 0.875rem 1.125rem;
  border-radius: 999px;
  background: #303030;
  color: #9b9b9b;
}

.gpt-plus {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #424242;
  color: #ececec;
  font-size: 15px;
}

/* Claude and Gemini, for the film. The same skeleton in each app's own greys and shapes:
   Claude's warm ground, serif replies and squared composer; Gemini's near-black, its
   one-sharp-corner bubble. Their colours are theirs, as #212121 is ChatGPT's. */
.gpt.is-claude {
  background: #262624;
  color: #eeece2;
}

.is-claude .gpt-rail {
  background: #1f1e1d;
}

.is-claude .gpt-ico,
.is-claude .gpt-composer {
  background: #30302e;
}

.is-claude .gpt-avatar {
  background: #c2c0b6;
  color: #262624;
}

.is-claude .gpt-upgrade,
.is-gemini .gpt-upgrade {
  margin-left: auto;
}

.is-claude .gpt-you {
  border-radius: 12px;
  background: #141413;
}

.is-claude .gpt-ai {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

.is-claude .gpt-composer {
  border-radius: 16px;
}

.gpt.is-gemini {
  background: #131314;
  color: #e3e3e3;
}

.is-gemini .gpt-rail,
.is-gemini .gpt-composer {
  background: #1e1f20;
}

.is-gemini .gpt-ico {
  background: #282a2c;
}

.is-gemini .gpt-avatar {
  background: #0b57d0;
}

.is-gemini .gpt-you {
  border-radius: 20px 4px 20px 20px;
  background: #282a2c;
}

/* Static fallback: if GSAP never initialises, or motion is reduced. Real alternative
   layouts, not the sections with their motion removed. */

.morph.is-static .morph-stage {
  height: auto;
  display: grid;
  gap: 1.25rem;
  padding-block: 3rem;
}

.morph.is-static .morph-frame {
  position: static;
  display: grid;
  gap: 0.75rem;
  height: auto;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

/* Capped: seven panels at 66vh stacked to 4,278px at 900px tall — almost five screens of
   panels for a section that is one screen when it moves. */
.morph.is-static .morph-layer {
  position: relative;
  inset: auto;
  height: min(66vh, 520px);
  min-height: 360px;
  clip-path: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chart) 10%, transparent);
}

.morph.is-static .wipe-edge {
  display: none;
}

/* Each stacked panel carries its own name (reel.js), so the single moving caption that
   used to sit under the last one — still saying "ChatGPT" — goes. */
.morph.is-static .layer-cap {
  margin-bottom: 1.25rem;
}

.morph.is-static #morphCap {
  display: none;
}

/* ---------- bands ---------- */

/* Was a flat 7rem top and bottom, which put 14rem of dead ground between every pair of
   sections — most visible between the decoy demo and Pricing. Scales with the viewport
   now, and neighbouring bands no longer both pay full price. */
/* Consecutive bands each pay this, so the number is doubled at every seam — 7rem a side
   put 14rem of empty ground between sections and the page read as mostly nothing. */
/* On the DESIGN.md scale: 48px a side makes the 96px seam the system specifies (56px on
   narrow screens, below). It was a vh clamp, which gave an off-scale 40.5px at 900px tall
   and a different rhythm on every screen height. */
.band {
  padding: 48px 0;
}

/* ---------- glass ----------
   Only the header, which is the one surface with changing content behind it. The tiers and
   the SOS button used to blur too, but all they sit over is the static room — the blur cost
   a re-composite and showed nothing — and the tiers moved while blurred, which is exactly
   what this block said never to do. They keep the *look* (translucency, a lit top edge). */
.glass,
.topbar::before {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* Transparency off: fall back to solid surfaces rather than blurred ones. */
@media (prefers-reduced-transparency: reduce) {
  .glass,
  .topbar::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Every section opens the same way: the heading on the left, what it means on the right,
   their first lines level. A heading over a 62ch paragraph left the right half of the
   screen empty at the top of every section. Bottom-aligned, a short heading beside a long
   lede sat low and the space above it joined the seam: 300px of nothing over Pricing. */
.band-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-bottom: 32px;
}

.band-head p {
  max-width: 52ch;
}

.band-lede {
  display: grid;
  gap: 12px;
}

@media (max-width: 800px) {
  .band-head {
    grid-template-columns: minmax(0, 1fr);
  }
}

.band h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.narrow p {
  margin-top: 1rem;
}

.narrow p + p,
.narrow p + .keys,
.narrow .keys + p {
  margin-top: 1.25rem;
}

/* ---------- sos ---------- */

/* Demonstration left, argument right. The demo is the wider column because it is the
   thing being claimed; the prose is support. */
.sos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .sos-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Copy first on narrow screens: the demo means nothing before you know what it is. */
  .sos-demo {
    order: 2;
  }
}

/* Taller than it was: the copy column runs to ~710px and a 16/11 demo stopped near 560,
   leaving a slab of empty ground under the left column. Closer heights, less dead space. */
.sos-screen {
  position: relative;
  aspect-ratio: 16 / 12;
  overflow: hidden;
  border-radius: 14px;
  background: #212121;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chart) 10%, transparent);
}

.sos-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* The invitation to shake, and the count of swipes the detector has seen so far. */
.sos-try {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--grey);
  font-size: 1rem;
}

.sos-try[hidden] {
  display: none;
}

.shake-meter {
  display: inline-flex;
  gap: 6px;
}

.shake-meter i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--housing);
  transition: background-color 0.12s ease, transform 0.12s ease;
}

.shake-meter i.is-on {
  background: var(--accent);
  transform: scale(1.25);
}

/* A mouse gesture means nothing on a touch screen. */
@media (pointer: coarse) {
  .sos-try {
    display: none;
  }
}

.sos-fire {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--housing);
  border-radius: 8px;
  background: color-mix(in srgb, var(--charcoal) 65%, transparent);
  color: var(--chart);
  font: 600 0.875rem/1 var(--sans);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), box-shadow 0.22s var(--ease),
    transform 0.1s var(--ease);
}

/* Nothing on the page says "this one is interactive" — a demo nobody presses demonstrates
   nothing. A ring pulses out of the button until it is used, then stops for good: an
   attention cue that keeps pulsing after it has worked is just noise.
   Only opacity and transform animate, so this runs on the compositor and costs no layout. */
/* Three pulses, started by reel.js once the button is fully on screen. It used to pulse
   forever from page load — an attention loop that kept asking long after it was seen. */
.sos-fire::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid color-mix(in srgb, var(--accent) 75%, transparent);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.sos-fire.is-inviting::after {
  animation: sos-invite 2.6s var(--ease) 3;
}

@keyframes sos-invite {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  65%,
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

/* Used once — the cue has done its job. */
.sos-fire.is-used::after,
.sos-fire:hover::after,
.sos-fire:focus-visible::after {
  animation: none;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sos-fire::after {
    animation: none;
  }
}

.sos-fire:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--housing));
}

/* The button stays neutral in both states. "Stand down" re-exposes the conversation, so
   green on it claimed the opposite of what it does. The green moved to the readout. */
.sos-fire:active {
  transform: scale(0.97);
}

.sos-fire kbd {
  padding: 0.125rem 0.375rem;
  border-bottom-width: 1px;
  font-size: 0.75rem;
}

.sos-fire .on-keys {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.sos-fire .on-touch {
  display: none;
}

/* No keyboard, no key combo: on touch the button names the result instead. */
@media (pointer: coarse) {
  .sos-fire {
    min-height: 44px;
  }

  .sos-fire .on-keys {
    display: none;
  }

  .sos-fire .on-touch {
    display: inline;
  }
}

/* Sans, not notation — this is a sentence. Green only while the decoy is up, because then
   the screen genuinely is protected. */
.sos-state {
  margin-top: 12px;
  color: var(--quiet);
  font-size: 0.875rem;
}

.sos-state.is-safe {
  color: var(--green);
}

.sos-copy h2 + p {
  margin-top: 1.25rem;
}

.sos-copy .keys {
  margin-top: 1.75rem;
}

.sos-copy .keys + p {
  margin-top: 1.75rem;
}

/* Two columns that line up: the keys, then what they do. Space separates the rows; the
   ruled lines between them were a table drawn around three sentences. */
.keys {
  display: grid;
  gap: 16px;
}

.key-row {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  color: var(--chart);
}

.key-combo {
  display: inline-flex;
  gap: 6px;
}

@media (max-width: 480px) {
  .key-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

/* Keycaps are the one drawn object the page keeps: this product is operated by them. */
kbd {
  padding: 4px 8px;
  border: 1px solid var(--housing);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--charcoal);
  color: var(--chart);
  font: 600 0.75rem/1.4 var(--mono);
}

/* A gesture, not a key: same cap, the page's own type. */
kbd.gesture {
  font-family: var(--sans);
  font-size: 0.875rem;
}

/* ---------- the panel ---------- */

/* Controls left, the disguise right. The panel is the taller column, so the stage stays in
   view beside it (sticky) while you work down the settings. */
.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.panel-demo {
  position: sticky;
  top: 96px;
}

.panel {
  display: grid;
  gap: 12px;
}

.panel-group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 20px;
  border: 0;
  border-radius: 14px;
  background: var(--charcoal);
}

.panel-group legend {
  float: left; /* lets the legend sit inside the padding like any heading */
  width: 100%;
  padding: 0;
  color: var(--chart);
  font-weight: 600;
}

.panel-group legend + * {
  clear: both;
}

/* Which settings need Pro: quiet text, as in the extension's own panel. */
.pro {
  margin-left: 6px;
  color: var(--quiet);
  font-size: 0.75rem;
  font-weight: 500;
}

.panel-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel-field {
  display: grid;
  gap: 6px;
  color: var(--grey);
  font-size: 0.875rem;
}

.panel-field input,
.panel-field select,
.panel-group textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--housing);
  border-radius: 8px;
  background: var(--room);
  color: var(--chart);
  font: 1rem/1.4 var(--sans);
  transition: border-color 0.18s var(--ease);
}

.panel-group textarea {
  font: 0.875rem/1.5 var(--mono);
  resize: vertical;
}

.panel-field input:hover,
.panel-field select:hover,
.panel-group textarea:hover {
  border-color: var(--edge);
}

.panel-field input:focus-visible,
.panel-field select:focus-visible,
.panel-group textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

/* The key field reads as a keycap while it is waiting for one. */
#pnKey {
  font-family: var(--mono);
  font-size: 0.875rem;
  cursor: pointer;
}

#pnKey:focus {
  border-style: dashed;
}

.panel-group textarea[hidden],
.panel-hint[hidden] {
  display: none;
}

.panel-hint {
  color: var(--quiet);
  font-size: 0.875rem;
}

/* A native checkbox drawn as a switch: the knob travels, the track takes the accent. */
.panel-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  color: var(--chart);
  cursor: pointer;
}

.panel-switch input {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 20px;
  margin: 0;
  border-radius: 10px;
  background: var(--housing);
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.panel-switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--chart);
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.panel-switch input:checked {
  background: var(--accent);
}

.panel-switch input:checked::after {
  transform: translateX(16px);
}

.panel-switch input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.panel-switch input:active::after {
  width: 20px; /* the knob stretches under the press, as a real one gives */
}

.panel-switch input:checked:active::after {
  transform: translateX(12px);
}

.panel-sites {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.panel-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--quiet);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.panel-site:hover {
  background: var(--charcoal);
  color: var(--chart);
}

.panel-site[aria-pressed="true"] {
  background: var(--charcoal);
  color: var(--chart);
}

.panel-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #f6f8fc;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chart) 10%, transparent);
}

.panel-layers {
  position: absolute;
  inset: 0;
}

.panel-decoy {
  z-index: 2;
}

/* The idle clock: a line along the top edge that drains toward the decoy. */
.panel-idle {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transform-origin: 0 50%;
  transition: opacity 0.2s ease;
}

.panel-idle.is-on {
  opacity: 1;
}

.panel-state {
  margin-top: 12px;
  color: var(--quiet);
  font-size: 0.875rem;
}

.panel-state.is-safe {
  color: var(--green);
}

/* Shake needs a mouse and the key needs a keyboard. */
@media (pointer: coarse) {
  .panel .on-mouse,
  .panel .on-keys {
    display: none;
  }
}

/* Narrow: the stage first and pinned under the header, the settings scrolling beneath it,
   so every change is seen where it lands. */
@media (max-width: 900px) {
  .panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-demo {
    top: 64px;
    z-index: 5;
    order: -1;
    padding-bottom: 8px;
    background: var(--room);
  }

  .panel-stage {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 480px) {
  .panel-pair {
    grid-template-columns: 1fr;
  }
}

/* ---------- pricing ---------- */

/* Three flat surfaces, told apart by tone, not by borders, pills or a lifted card. The
   featured one is a step lighter and violet; nothing else marks it. */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

@media (max-width: 900px) {
  .tiers {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tier {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  border-radius: 14px;
  background: var(--charcoal);
}

.tier-feature {
  background: color-mix(in srgb, var(--accent) 16%, var(--charcoal));
}

.tier h3 {
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--chart);
}

.price {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem 0.5rem;
}

.was {
  color: var(--quiet);
  font-size: 1.25rem;
}

/* Bigger, tighter, and optically aligned: the number is the whole point of the card. */
.amount {
  color: var(--chart);
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.per {
  font-size: 1rem;
  color: var(--quiet);
}

.tier-note {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--grey);
}

/* A plain list in full ink. Ticks and a ruled top edge said "included" three times over;
   being in the list already says it. */
.feat {
  margin: 1.5rem 0 2rem;
  padding: 0 0 0 1.1rem;
  list-style: disc; /* nested in the tiers' list, it would default to hollow circles */
  display: grid;
  gap: 0.5rem;
  line-height: 1.5;
  color: var(--chart);
}

/* What Free lacks, in one sentence instead of three crossed-out rows. */
.feat-out {
  margin: -1rem 0 2rem;
  font-size: 1rem;
  color: var(--grey);
}

.tier .btn,
.tier .btn-ghost {
  margin-top: auto;
  text-align: center;
}

/* Why the two paid buttons are off. Referenced by their aria-describedby. */
.paid-soon {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--quiet);
}

.refund-line {
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* ---------- data ledger ---------- */

/* Two surfaces side by side, the same object as the pricing tiers. It was one outlined
   box ruled down the middle with a third rule above each note: a table drawn around two
   short lists. */
.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}

.ledger-col {
  padding: 32px 28px;
  border-radius: 14px;
  background: var(--charcoal);
}

.ledger h2 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: 0;
}

.ledger ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--chart);
}

.ledger li {
  padding-left: 20px;
  position: relative;
}

/* Green where nothing is collected: on this page green means protected. */
.ledger li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ledger-never li::before {
  background: var(--green);
}

.ledger-does li::before {
  background: var(--quiet);
}

.ledger .textlink {
  margin-top: 20px;
  font-size: 0.875rem;
}

/* ---------- install ---------- */

/* Two by two, so four steps fill the width instead of a narrow column beside an empty
   half. The number is a plain figure in the accent, not "01" in small grey. */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 4.5rem);
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.steps h3 {
  font-size: 1.25rem;
  font-weight: 650;
}

.steps p {
  margin-top: 0.5rem;
  max-width: 52ch;
}

/* A literal address to type, so monospace is right here. */
.steps code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--charcoal);
  color: var(--chart);
  font: 0.9375em var(--mono);
}

.steps strong,
.steps em {
  color: var(--chart);
  font-weight: 600;
  font-style: normal;
}

/* ---------- the close (index) ----------
   A sheet raised one tone from the room with its top corners rounded, so the page ends on
   an object, not on a rule with small text under it. Left: the logo at a size it never
   gets anywhere else. Right: every link on the page, in three columns that line up. */

.foot {
  margin-top: 56px;
  padding: 72px 0 32px;
  border-radius: 28px 28px 0 0;
  background: var(--charcoal);
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.foot-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: var(--chart);
  text-decoration: none;
}

.foot-logo .mark {
  width: 120px;
  height: 56px;
}

/* The lockup's own face and its violet first letter, as in the header. */
.foot-word {
  font: italic 400 clamp(3.5rem, 7vw, 5.5rem) / 0.95 Georgia, "Iowan Old Style",
    "Times New Roman", serif;
  letter-spacing: -0.02em;
}

.foot-word::first-letter {
  color: var(--accent);
}

.foot-line {
  margin-top: 20px;
  color: var(--chart);
  font-size: 1.25rem;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  padding-top: 12px;
}

.foot-col {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: start;
}

.foot-col h2 {
  margin-bottom: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--quiet);
}

.foot-col a {
  color: var(--chart);
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 0.16s var(--ease);
}

.foot-col a:hover {
  color: var(--accent);
}

@media (pointer: coarse) {
  .foot-col a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .foot-col {
    gap: 0;
  }
}

.foot-note {
  margin-top: 64px;
  max-width: 88ch;
  color: var(--quiet);
  font-size: 0.875rem;
  text-wrap: pretty;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 24px;
  color: var(--grey);
  font-size: 0.875rem;
}

.foot-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.foot-credit svg {
  width: 14px;
  height: 14px;
  fill: var(--accent);
}

@media (max-width: 800px) {
  .foot {
    padding-top: 48px;
    border-radius: 20px 20px 0 0;
  }

  .foot-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-logo .mark {
    width: 88px;
    height: 41px;
  }

  .foot-note {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .foot-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- footer (legal pages) ---------- */

.footer {
  border-top: 1px solid var(--housing);
  padding: 3rem 0 4rem;
}

/* Was a two-column `space-between` row with the wordmark on the left and the link column
   on the right. The links moved out to their own full-width row, which left this flex
   container with a single child: it shrank to its content against the left edge and the
   whole right half went empty. One child means one column — centred, so the footer reads
   as a deliberate close rather than a leftover. */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-note {
  margin-top: 0;
  /* Wider than the 62ch it had: centred text at a narrow measure in a 1180px container is
     what made it look squeezed. 92ch runs past the 75ch ideal for body prose, but this is
     a trademark disclaimer that gets scanned rather than read, and the extra width buys
     back three lines of dead footer. */
  max-width: 92ch;
  font-size: 0.875rem;
  text-wrap: pretty;
}

/* A single row across the bottom rather than a stacked column. Five short links read
   faster side by side, and stacking them left a tall empty channel beside the wordmark. */
.footer-links,
.footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center; /* centred to match the block above it */
  gap: 0.75rem 2rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--housing);
  font-size: 1rem;
}

.footer-links a,
.footer nav a {
  color: var(--grey);
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 0.16s var(--ease);
}

.footer-links a:hover,
.footer nav a:hover {
  color: var(--chart);
  text-decoration: underline;
}

/* The legal pages keep their nav inside .footer-inner, which is a flex row. Make that
   child span the full width so the links land in one row across the bottom there too. */
.footer-inner > nav {
  flex: 1 0 100%;
}

/* ---------- legal pages ---------- */

.legal {
  width: min(70ch, 100% - 3rem);
  margin: 6rem auto;
}

.legal h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.legal h2 {
  margin-top: 3rem;
  font-size: 1.125rem;
  font-weight: 650;
}

/* Sub-headings inside a section. Without this they inherit the browser default, which is
   *larger* than the h2 above them and carries no top margin — the hierarchy inverts and
   the heading collides with the paragraph before it. */
.legal h3 {
  margin-top: 2rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.legal h2 + p,
.legal h2 + ul,
.legal h3 + p,
.legal h3 + ul {
  margin-top: 0.875rem;
}

.legal p + p,
.legal ul + p,
.legal p + ul {
  margin-top: 1rem;
}

.legal ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.legal table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 1rem;
}

.legal td {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--housing);
  vertical-align: top;
}

.legal td:first-child {
  width: 40%;
  padding-right: 1.5rem;
}

.legal .updated {
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Build scaffolding. These and their markup are deleted at launch. */
.todo {
  padding: 0.0625rem 0.375rem;
  border: 1px dashed var(--red);
  border-radius: 2px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.notice {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--red);
  border-radius: 6px;
  font-size: 1rem;
}

.notice strong {
  color: var(--red);
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 6rem 0 3rem;
  }

  .lede {
    max-width: none;
  }

  .topbar nav {
    display: none;
  }

}

/* 28px a side: the 56px seam DESIGN.md sets for narrow screens. The hero's foot goes
   too: below it the morph stage already clears the header with its own 88px. */
@media (max-width: 860px) {
  .band {
    padding: 28px 0;
  }

  .hero {
    padding-bottom: 0;
  }
}

@media (max-width: 560px) {
  :root {
    --wrap: min(1180px, 100% - 2rem);
  }

  .chart-caption {
    grid-template-columns: 1fr;
  }

  input[type="range"] {
    height: 44px;
  }

  /* At 390px the model name, the Chat/Work switch and "Upgrade" did not fit on one row,
     and "Upgrade" was cut off at the edge. The switch is the least recognisable of the
     three, so it goes. */
  .gpt-seg {
    display: none;
  }

  .gpt-upgrade {
    margin-left: auto;
  }

  input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -11px;
  }

  input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }

  .ledger-col {
    padding: 1.5rem;
  }
}

/* Reduced motion is not "no feedback" — it is feedback without travel. Killing every
   transition outright also killed the button's press response, which is the one piece of
   motion that tells you the control registered you. So: transforms and scroll-driven
   motion go, colour and opacity stay. reel.js makes the same call and renders the morph
   as a static stack rather than a pinned scrub. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-property: opacity, background-color, border-color, color !important;
    transition-duration: 150ms !important;
  }

  /* Transitioning these is suppressed above; this stops them applying at all, so a press
     never jumps. (Cards no longer move on hover at all, so they need nothing here.) */
  .btn:active,
  .sos-fire:active {
    transform: none;
  }
}

/* Near-solid surfaces and borders that are actually visible. The duochrome stays intact:
   red and green still mean exposed and protected, they just sit on stronger ground. */
@media (prefers-contrast: more) {
  :root {
    --grey: #ded9e8;
    --quiet: #c8c1d6;
    --housing: #6b6083;
    --edge: #a79fb8;
  }

  .btn-ghost {
    border-color: var(--housing);
  }

  /* Surfaces told apart by tone alone lose their edges at high contrast; draw them. */
  .tier,
  .face-pick {
    border: 1px solid var(--housing);
  }
}

/* ---------- matte cards ----------
   Each section sits in its own near-black card, as on uiverse.io, but lit: the card takes
   the colour of what it shows (--accent, which the face picker and the panel set per app),
   as a glow in the top-left corner, a gradient edge, and a spotlight under the pointer. The
   cards are neutral black on the plum room, so they read as objects placed on it.

   Built to cost nothing while scrolling or pointing. The first version wrote the pointer
   position into CSS variables on the card, and custom properties inherit: every mouse move
   restyled the whole card, live app demo included, 6 to 11ms a move. Its edge was a masked
   pseudo-element and its hover a transitioned variable, so crossing a card mid-scroll
   repainted all of it for 0.4s. Now the edge is the border box of the card's own background
   (a transparent border with a gradient beneath), and the spotlight is a small element of
   its own (.card-spot, app.js) moved by transform and faded by opacity: compositor work,
   no restyle, no repaint. */
.band {
  padding: 10px 0;
}

.band > .wrap,
.start-card {
  position: relative;
  isolation: isolate;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid transparent;
  border-radius: 32px;
  background:
    radial-gradient(90% 60% at 0% 0%,
      color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%) padding-box,
    radial-gradient(70% 50% at 100% 100%,
      color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%) padding-box,
    linear-gradient(180deg, #17151b, #111014) padding-box,
    linear-gradient(150deg,
      color-mix(in srgb, var(--accent) 45%, rgb(255 255 255 / 0.2)),
      rgb(255 255 255 / 0.07) 28%,
      rgb(255 255 255 / 0.04) 70%,
      color-mix(in srgb, var(--accent) 22%, transparent)) border-box;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 30px 60px -30px rgb(0 0 0 / 0.7);
}

.card-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: 31px;
  pointer-events: none;
}

.card-spot {
  position: absolute;
  top: -320px;
  left: -320px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  will-change: transform, opacity;
}

.band > .wrap:hover .card-spot {
  opacity: 1;
}

.tier {
  border-radius: 20px;
  background: linear-gradient(180deg, #1d1b22, #18161c);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.tier-feature {
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, #1d1b22), #18161c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
}

@media (max-width: 860px) {
  .band > .wrap,
  .start-card {
    border-radius: 24px;
  }

  .card-glow {
    border-radius: 23px;
  }
}

/* ---------- the hero's dot field (field.js) ----------
   Full bleed behind the hero. The script keeps every dot clear of the text and the film. */
.hero-field {
  position: absolute;
  z-index: -1;
  top: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  height: 100%;
  pointer-events: none;
}

/* ---------- back to top ----------
   Sits centred in the right-hand gutter, which is empty from 1320px up, so it covers
   nothing. Narrower than that there is no gutter: app.js then shows it only while you scroll
   up, which is when you are travelling, not reading. Hidden over the hero and the footer. */
.to-top {
  position: fixed;
  z-index: 40;
  right: max(12px, calc((100vw - 1180px) / 4 - 22px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--chart);
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
    #16141b;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, rgb(255 255 255 / 0.08)),
    0 10px 30px -10px rgb(0 0 0 / 0.8);
  opacity: 0;
  visibility: hidden;
  translate: 0 10px;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease), visibility 0s 0.3s,
    box-shadow 0.2s;
}

.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease), box-shadow 0.2s;
}

.to-top:hover {
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 24px -4px color-mix(in srgb, var(--accent) 60%, transparent),
    0 10px 30px -10px rgb(0 0 0 / 0.8);
}

.to-top:active {
  scale: 0.94;
}

.to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------- the account (account.js) ----------
   Everything a signed-in visitor gets from the page: a control in the header, the
   profession prompt, one line of feedback. All of it floats over the room, so it is the
   pricing tiers' surface a step lighter, with a neutral shadow because it really is above
   the page. No colour of its own: the accent appears only on what is chosen. */

.acct-in {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  text-decoration: none;
}

.acct-in:hover {
  color: var(--chart);
}

/* Both have a display of their own, which would otherwise beat the hidden attribute. */
.acct-in[hidden],
.acct-btn[hidden] {
  display: none;
}

/* The initial and the plan. Rightmost in the header, so its menu opens straight below it. */
.acct-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px 4px 4px;
  border: 0;
  border-radius: 8px;
  background: #1d1b22;
  color: var(--grey);
  font: 500 0.875rem/1 var(--sans);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.1s var(--ease);
}

.acct-btn:hover {
  background: #26232d;
  color: var(--chart);
}

.acct-btn:active {
  transform: scale(0.97);
}

.acct-disc {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 34%, #1d1b22);
  color: var(--chart);
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (pointer: coarse) {
  .acct-in,
  .acct-btn {
    min-height: 44px;
  }
}

/* On a phone the header holds the wordmark, Install and this: the initial alone. */
@media (max-width: 560px) {
  .acct-btn {
    padding-right: 4px;
  }

  .acct-plan {
    display: none;
  }
}

/* A popover, so the browser handles Esc, a click outside and the top layer. It grows from
   its top right corner, which is where the button is, and leaves the same way. */
.acct-menu {
  position: fixed;
  /* Percentages, not vw: 100vw includes the scrollbar and put the menu 7px off the button. */
  inset: 4.25rem calc((100% - var(--wrap)) / 2) auto auto;
  width: min(18rem, 100vw - 2rem);
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #1d1b22;
  color: var(--grey);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 24px 48px -16px rgb(0 0 0 / 0.8);
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease),
    overlay 0.16s allow-discrete, display 0.16s allow-discrete;
}

.acct-menu:popover-open {
  opacity: 1;
  transform: none;
}

@starting-style {
  .acct-menu:popover-open {
    opacity: 0;
    transform: scale(0.96);
  }
}

.acct-menu p {
  padding: 0 8px;
  overflow-wrap: anywhere;
}

.acct-name {
  margin-top: 8px;
  color: var(--chart);
  font-weight: 600;
}

.acct-mail {
  font-size: 0.875rem;
  color: var(--quiet);
}

.acct-line {
  margin-top: 8px;
}

.acct-out {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--chart);
  font: 500 1rem/1 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}

.acct-out:hover {
  background: #2a2733;
}

/* A control that is waiting on the server says so without changing its words. */
.btn[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

/* ---------- Razorpay's checkout ----------
   Loaded by account.js when Buy is pressed. Its script builds an overlay and a frame and
   styles them through the DOM, which the CSP allows; two things it cannot do here:
   - This page is `color-scheme: dark` and Razorpay's form is light. A frame whose scheme
     differs from its page's is given an opaque canvas, so the whole screen went white
     behind the form instead of dimming. Saying the frame is light makes it see-through.
   - It injects a <style> for the rule below, which `style-src 'self'` refuses. */
.razorpay-checkout-frame {
  color-scheme: light;
}

.razorpay-container > iframe {
  min-height: 100% !important;
}

/* ---------- the profession prompt ----------
   A modal: it dims the page because nothing else can be done until it is answered. Five
   rows told apart by tone; the chosen one takes the accent. Sized to fit a 715px-tall
   screen without scrolling. */
.prof {
  width: min(32rem, 100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #1a181f;
  color: var(--grey);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 40px 80px -24px rgb(0 0 0 / 0.9);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
    overlay 0.22s allow-discrete, display 0.22s allow-discrete;
}

.prof[open] {
  opacity: 1;
  transform: none;
}

.prof::backdrop {
  background: rgb(13 11 20 / 0.78);
  opacity: 0;
  transition: opacity 0.22s var(--ease), overlay 0.22s allow-discrete, display 0.22s allow-discrete;
}

.prof[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .prof[open] {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }

  .prof[open]::backdrop {
    opacity: 0;
  }
}

.prof-form {
  padding: 32px;
}

.prof h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prof-lede {
  margin-top: 8px;
}

.prof-list {
  display: grid;
  gap: 4px;
  margin-top: 24px;
}

.prof-opt {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0 12px;
  align-items: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: #22202a;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}

.prof-opt:hover {
  background: #2a2733;
}

.prof-opt:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 24%, #22202a);
}

.prof-opt:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.prof-opt input {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.prof-name {
  color: var(--chart);
  font-weight: 600;
}

.prof-note {
  grid-column: 2;
  font-size: 0.875rem;
}

.prof-fine {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--quiet);
}

.prof-error {
  margin-top: 12px;
  color: var(--red);
}

.prof-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}

.prof-out {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--grey);
  font: 400 1rem/1 var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.prof-out:hover {
  color: var(--chart);
}

@media (max-width: 480px) {
  .prof-form {
    padding: 24px 20px;
  }
}

/* ---------- one line of feedback ---------- */
.flash {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: max-content;
  max-width: min(34rem, 100vw - 2rem);
  padding: 12px 16px;
  border-radius: 12px;
  background: #1d1b22;
  color: var(--chart);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1), 0 20px 40px -12px rgb(0 0 0 / 0.8);
  opacity: 0;
  visibility: hidden;
  translate: -50% 12px;
  transition: opacity 0.24s var(--ease), translate 0.24s var(--ease), visibility 0s 0.24s;
}

.flash.is-shown {
  opacity: 1;
  visibility: visible;
  translate: -50% 0;
  transition: opacity 0.24s var(--ease), translate 0.24s var(--ease);
}

/* ---------- /start ----------
   One job, so one card in the middle of the room, and it is the site's own: the lit card
   every section of the homepage sits in (its surface is the `.band > .wrap` rule above,
   shared, not copied). Everything inside is centred on one axis, which is where a sign-in
   is expected to be. The first version was a flatter box of its own with left-aligned
   text and a small button in the corner; it looked like a different site. */
.start {
  display: grid;
  place-items: center;
  width: var(--wrap);
  min-height: 100svh;
  margin-inline: auto;
  padding: 6rem 0 3.5rem;
}

.start-card {
  width: min(30rem, 100%);
  padding: clamp(32px, 6vw, 56px) clamp(24px, 6vw, 56px);
  text-align: center;
}

/* The mask, once, above whatever the card is saying. */
.start-mark {
  display: block;
  width: 72px;
  height: 34px;
  margin: 0 auto 24px;
  background: url("mark.svg") center / contain no-repeat;
}

/* Each state arrives the same way; under reduced motion the global rule makes it instant. */
.start-card > [data-when]:not([hidden]) {
  animation: start-in 0.4s var(--ease) both;
}

@keyframes start-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.start-card h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* The global `p` caps the measure but leaves the block against the left edge. */
.start-card p {
  max-width: 36ch;
  margin-inline: auto;
  text-wrap: pretty;
}

.start-card h1 + p,
.start-card p + p {
  margin-top: 12px;
}

/* One width for every primary action in the card, so the states do not jump about. */
.start-card .btn {
  min-width: min(100%, 17.5rem);
  margin-top: 32px;
}

.start-card kbd {
  margin-inline: 2px;
}

.start-fine {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--quiet);
}

.start-card .start-fine {
  max-width: 40ch;
  margin-top: 20px;
}

/* What the account now has. The dot is the page's one colour: green means protected,
   which is what linking has just done. */
.start-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--chart);
}

.start-status::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.start-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.start-actions .btn {
  margin-top: 0;
}

/* Google's own mark, in its own colours, on the page's light button. */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

@media (prefers-contrast: more) {
  .acct-btn,
  .acct-menu,
  .prof,
  .prof-opt,
  .flash,
  .start-card {
    border: 1px solid var(--housing);
  }
}
