/* Anticode
   Brief
   - Subject: an AI app builder whose output never looks generated and ships secure.
   - Single job: get someone to describe an app in one sentence and watch it get built.
   - Only-this-subject detail: a red pen that strikes generic AI tells, and a real security scan of the generated code.
   - Lead reference: xAI, studied live on 2026-10-19: #0a0a0a ground, tone-only #1a1a1a cards at 16px, #222222 hairlines,
     cool body grey with white headings, 44px pills (white primary, filled #222 secondary), w450 display at -1.5%,
     and live self-playing demo tiles. A centred hero with an announcement pill, and a headline the red pen corrects ("AI made it." struck, "someone designed it." written in).
   - Font: Plus Jakarta Sans, one variable family for everything. System mono only for the code view.
   - Palette: ground, surface, raised, text, muted, line; action = the white pill; --pen = the blue pen (brand accent); --danger = errors and destructive actions
     (what was struck out, and the agent working right now); --ok = passed checks.
   - House curve: cubic-bezier(.2,0,0,1). Reveals expo-out, springs only when the mark snaps shut.
   - Signature: the Anticode mark is the build engine. Its halves pull apart while the agents work and snap shut when every check passes. */

:root {
  --ground: #141414;
  --surface: #1a1a1a;
  --raised: #222222;
  --text: #ffffff;
  --body: #d5dae3;
  --muted: #8d9299;
  /* dividers: none either, so sections are set apart by space alone; More contrast (below) draws them again */
  --line: transparent;
  --line-2: #323232;
  /* outlines: none unless more contrast is asked for (below). A raised surface shows its edge with a soft shadow, and a
     text field is set in with an inner one */
  --hair: transparent;
  --hair-2: transparent;
  --edge: 0 1px 2px rgba(0, 0, 0, 0.32), 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  --edge-in: inset 0 1px 3px rgba(0, 0, 0, 0.45), inset 0 0 0 100vmax rgba(255, 255, 255, 0.03);
  --action: #ffffff;
  --on-action: #0a0a0a;
  /* the main action button is flat in both themes: one solid colour, no bevel, no gradient, no drop shadow. Hover
     changes its brightness and a press its size, never its depth. (The shadows are empty, not "none", because
     some rules list them beside other shadows.) */
  --action-face: none;
  --action-lift: 0 0 #0000;
  --action-press: 0 0 #0000;
  --action-hover: brightness(0.96);
  /* buttons are plain pills: a flat fill of the text colour, no gradient, glass or shadow. The main button's fill is a
     little stronger. Mixed from --text, so each theme (and .ink) gets its own without re-declaring these */
  --btn2-face: color-mix(in srgb, var(--text) 9%, transparent);
  --btn2-ring: 0 0 #0000;
  --btn2-ring-hover: 0 0 #0000;
  --btn2-text: #e3e7ee;
  --btn1-face: color-mix(in srgb, var(--text) 16%, transparent);
  --btn1-ring: 0 0 #0000;
  --btn1-ring-hover: 0 0 #0000;
  --btn1-text: #ffffff;
  --btn-glass: none;
  /* Action buttons, after Linear's and Cursor's (the owner's ask, 2026-11-11; both measured from their live sites):
     flat full pills with no gradient, glow, outline or shadow. The main action is a near-white pill with near-black
     words; the quiet one is a faint fill a step up from the page. Selected tabs, chips and switches are not actions:
     they keep --btn1-face, a grey. */
  --btn-main: #e8e8e9; --btn-main-hover: #ffffff; --btn-main-text: #08090a;
  --btn-soft: color-mix(in srgb, var(--text) 7%, transparent); --btn-soft-hover: color-mix(in srgb, var(--text) 12%, transparent); --btn-soft-text: #f2f3f5;
  --pen: #4f8cff;
  --danger: #ff5a52;
  --ok: #3ddc97;
  --warn: #f5c451;
  --code-tag: #9cc4ff;
  --code-attr: #c7b8ff;
  --code-str: #ffc98a;

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --fs-0: 12.5px; --fs-1: 14px; --fs-2: 16.5px; --fs-3: 20px;
  --fs-4: clamp(30px, 4.2vw, 52px); --fs-5: clamp(42px, 6.6vw, 88px);

  --r-control: 9999px; --r-card: 21px; --r-menu: 16px; --r-panel: 29px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 120px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-snap: cubic-bezier(0.23, 1, 0.32, 1);
  --t-exit: 90ms; --t-1: 150ms; --t-2: 250ms; --t-3: 420ms; --t-4: 700ms;
  --stagger: 30ms;

  --col: 1180px;
  --bar-h: 56px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #f4f5f8; --surface: #ffffff; --raised: #e6e9ef; --text: #0a0a0a; --body: #2f2f2f; --muted: #575c65;
    --line: transparent; --line-2: #b9bfc9; --edge: 0 1px 2px rgba(30, 30, 30, 0.06), 0 6px 20px -8px rgba(30, 30, 30, 0.16); --edge-in: inset 0 1px 3px rgba(30, 30, 30, 0.12), inset 0 0 0 100vmax rgba(30, 30, 30, 0.025); --action: #0d0d0f; --on-action: #f7f7f8; --action-hover: brightness(1.25);
    --pen: #1d5fd6; --danger: #d92d20; --ok: #08744a; --code-tag: #1d5fd6; --code-attr: #7a3fd6; --code-str: #a65a00; --field-dot: #3f5fe0; color-scheme: light; --btn2-text: #181818; --btn1-text: #12306b; --btn-main: #111214; --btn-main-hover: #000000; --btn-main-text: #ffffff; --btn-soft-text: #181818;
  }
}
:root[data-theme="light"] {
  --ground: #f4f5f8; --surface: #ffffff; --raised: #e6e9ef; --text: #0a0a0a; --body: #2f2f2f; --muted: #575c65;
  --line: transparent; --line-2: #b9bfc9; --edge: 0 1px 2px rgba(30, 30, 30, 0.06), 0 6px 20px -8px rgba(30, 30, 30, 0.16); --edge-in: inset 0 1px 3px rgba(30, 30, 30, 0.12), inset 0 0 0 100vmax rgba(30, 30, 30, 0.025); --action: #0d0d0f; --on-action: #f7f7f8; --action-hover: brightness(1.25);
  --pen: #1d5fd6; --danger: #d92d20; --ok: #08744a; --code-tag: #1d5fd6; --code-attr: #7a3fd6; --code-str: #a65a00; --field-dot: #3f5fe0; color-scheme: light; --btn2-text: #181818; --btn1-text: #12306b; --btn-main: #111214; --btn-main-hover: #000000; --btn-main-text: #ffffff; --btn-soft-text: #181818;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--body); font: 400 var(--fs-2)/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
:where(button) { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 500; color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }
/* Text boxes show no outline while you type in them: the caret says where the text goes. The Focus outline setting's
   Always (data-focus, below) brings it back. Checkboxes, radios, buttons and links keep theirs. */
:root:not([data-focus="always"]) :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"]), textarea, [contenteditable]:not([contenteditable="false"])):focus { outline: none !important; }
::selection { background: var(--pen); color: #fff; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--col); margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.num { font-variant-numeric: tabular-nums; }
.label { font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: var(--r-control); background: var(--btn-main); color: var(--btn-main-text); box-shadow: var(--btn1-ring); font-weight: 600; }
.skip:focus { top: 12px; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
svg.i-lg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 0.95; /* a 20px drawing at 32px: a 1.5px line */ stroke-linecap: round; stroke-linejoin: round; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 40px; padding: 0 18px; border-radius: 9999px; font-size: var(--fs-1); font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-1) var(--ease), color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease), opacity var(--t-1) var(--ease), filter var(--t-1) var(--ease), translate var(--t-exit) var(--ease); }
/* The two action buttons, flat. A finger gets the full 44px; a pointer gets Linear's 40px. */
@media (pointer: coarse) { .btn { min-height: 44px; } }
.btn-primary, .insp-btn:not(.insp-quiet), .send-btn:not(:disabled) { background: var(--btn-main); color: var(--btn-main-text); box-shadow: none; }
.btn-primary:not(:disabled):hover, .insp-btn:not(.insp-quiet):not(:disabled):hover, .send-btn:not(:disabled):hover { background: var(--btn-main-hover); }
@media (prefers-reduced-motion: reduce) { .btn-primary:active, .insp-btn:active, .send-btn:active { translate: none; } }
.btn-quiet, .btn-dark { background: var(--btn-soft); color: var(--btn-soft-text); box-shadow: none; }
.btn-quiet:not(:disabled):hover, .btn-dark:not(:disabled):hover { background: var(--btn-soft-hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }
/* The gradient buttons of 2026-11-08 are gone. Their tokens stay, as the flat faces, for the few rules elsewhere that
   still name them (the homepage, the pages, the desk): a face each, its hover, and no edge. */
:root { --btn-grad-1: var(--btn-main); --btn-grad-1h: var(--btn-main-hover); --btn-grad-2: var(--btn-soft); --btn-grad-2h: var(--btn-soft-hover);
  --btn-grad-edge: 0 0 #0000; --btn-grad-edge-h: 0 0 #0000; }
/* the one call to sign up in every page's header (class "aurora", from the aurora shader button it used to be). Since
   2026-11-11 it is the main button, like every other; the label is a span, so settings.js swaps only the words */
.aurora { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border: 0; border-radius: 9999px;
  background: var(--btn-main); color: var(--btn-main-text); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none;
  cursor: pointer; transition: background-color var(--t-1) var(--ease); }
.aurora:hover { background: var(--btn-main-hover); }
.aurora canvas { display: none; }
.aurora:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
@media (pointer: coarse) { .aurora { height: 44px; } }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }

.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: var(--r-control); font-size: 13.5px; font-weight: 500; color: var(--muted); background: var(--raised);
  transition: color var(--t-1) var(--ease), background-color var(--t-1) var(--ease); }
.chip:hover span { color: var(--text); }
.chip input:checked + span { background: var(--btn1-face); -webkit-backdrop-filter: var(--btn-glass); backdrop-filter: var(--btn-glass); color: var(--btn1-text); box-shadow: var(--btn1-ring); }
.chip input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

.mark { display: block; overflow: visible; }
.mark path { fill: currentColor; transform-box: fill-box; transform-origin: 50% 50%; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .mark { width: 24px; height: 27px; }
.brand-word { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.brand:hover .mk-a { transform: translate(1.5%, -3%); }
.brand:hover .mk-b { transform: translate(-1.5%, 3%); }
.brand .mark path { transition: transform var(--t-3) var(--ease-spring); }

.engine { --s: 0; --r: 0deg; position: relative; display: grid; place-items: center; color: var(--text); }
.engine .mark { width: 100%; height: auto; }
.engine .mk-a { transform: translate(calc(var(--s) * 0.5px), calc(var(--s) * -1px)) rotate(var(--r)); transition: transform var(--t-4) var(--ease-reveal), fill var(--t-3) var(--ease); }
.engine .mk-b { transform: translate(calc(var(--s) * -0.5px), calc(var(--s) * 1px)) rotate(var(--r)); transition: transform var(--t-4) var(--ease-reveal), fill var(--t-3) var(--ease); }
.engine-ring { position: absolute; inset: 6%; border-radius: 50%; border: 1.5px solid var(--ok); opacity: 0; pointer-events: none; }
.engine[data-state="split"] { --s: 70; --r: -10deg; }
.engine[data-state="work"] { --s: 34; }
.engine[data-state="work"] .mk-a { animation: mk-a 1.5s var(--ease) infinite alternate; }
.engine[data-state="work"] .mk-b { fill: var(--pen); animation: mk-b 1.5s var(--ease) infinite alternate; }
.engine[data-state="done"] { --s: 0; }
.engine[data-state="done"] .mk-a, .engine[data-state="done"] .mk-b { transition: transform var(--t-4) var(--ease-spring), fill var(--t-3) var(--ease); }
.engine[data-state="done"] .engine-ring { animation: ring 1100ms var(--ease-reveal) 380ms both; }
.engine[data-state="fail"] { --s: 18; }
.engine[data-state="fail"] .mk-b { fill: var(--warn); }
@keyframes mk-a { from { transform: translate(17px, -34px) rotate(0deg); } to { transform: translate(24px, -48px) rotate(-5deg); } }
@keyframes mk-b { from { transform: translate(-17px, 34px) rotate(0deg); } to { transform: translate(-24px, 48px) rotate(-5deg); } }
@keyframes ring { from { opacity: 0.7; transform: scale(0.82); } to { opacity: 0; transform: scale(1.25); } }

/* shared controls: press, morphing arrows, gliding highlight, split pill, menus */
.btn, .announce, .chip span, .seg button, .mob-tabs button, .tile, .menu button, .result .chips button { transition-property: background-color, color, box-shadow, opacity, scale; transition-duration: var(--t-1); transition-timing-function: var(--ease); }
.btn:active, .announce:active { scale: 0.985; }
.btn-icon:active, .seg button:active, .split-more:active, .chip:active span { scale: 0.94; }
.tile:active { scale: 0.992; }

.arw path { transform-box: fill-box; transition: opacity var(--t-1) var(--ease), transform 240ms var(--ease-reveal); }
.arw .shaft { opacity: 0; transform: scaleX(0.3); transform-origin: 100% 50%; }
:is(.btn, .announce):is(:hover, :focus-visible) .arw .shaft { opacity: 1; transform: none; }
:is(.btn, .announce):is(:hover, :focus-visible) .arw .head { transform: translateX(1.5px); }
.send:hover svg, .announce:hover svg { transform: none; }
/* disclosure: the set's chevron (icons.js right) instead of the browser's triangle; it turns down when open and
   stays still on hover or focus */
details > summary:not(.btn) { list-style: none; }
details > summary:not(.btn)::-webkit-details-marker { display: none; }
details > summary:not(.btn)::before { content: ""; display: inline-block; flex: none; align-self: center; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.25 5.5l3.5 4.5-3.5 4.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.25 5.5l3.5 4.5-3.5 4.5'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 240ms var(--ease-reveal); }
details[open] > summary:not(.btn)::before { transform: rotate(90deg); }
.explore .explore-ic { width: 14px; height: 14px; margin-left: 2px; vertical-align: -2px; }

.nav, .menu { position: relative; }
.nav a, .menu button { position: relative; z-index: 1; }
.hl { position: absolute; left: 0; top: 0; z-index: 0; border-radius: var(--r-control); background: color-mix(in srgb, var(--text) 7%, transparent); opacity: 0; pointer-events: none;
  transition: opacity 120ms var(--ease), transform 280ms var(--ease-reveal), width 280ms var(--ease-reveal), height 280ms var(--ease-reveal); }
.menu .hl { border-radius: 10px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.hl.on { opacity: 1; }
.hl.no-move { transition: opacity 120ms var(--ease); }

.split { position: relative; display: inline-flex; }
/* pressing either half shrinks the pill as one piece, so no gap opens between the halves */
.split { transition: scale var(--t-1) var(--ease); }
.split > .btn:active { scale: none; translate: none; }
.split:has(> .btn:active) { scale: 0.985; }
.split-main { border-radius: var(--r-control) 0 0 var(--r-control); padding-right: 12px; }
.split-more { border-radius: 0 var(--r-control) var(--r-control) 0; padding: 0 12px 0 9px; }
/* the chevron flips the way a page turns edge-on: its point slides through the middle, so it lies flat for a moment
   and opens the other way, rather than spinning round. Up while the pointer is on it or its menu is open. Where
   a browser can't animate a path (Safari) it folds by squashing instead. */
.chev { width: 16px; height: 16px; transform-origin: 50% 50%; }
@supports (d: path("M0 0")) {
  .chev path { d: path("M6 8l4 4 4-4"); transition: d 160ms cubic-bezier(0.4, 0, 0.2, 1); }
  .split-more[aria-expanded="true"] .chev path { d: path("M6 12l4-4 4 4"); }
  @media (hover: hover) { .split-more:hover .chev path { d: path("M6 12l4-4 4 4"); } }
}
@supports not (d: path("M0 0")) {
  .chev { transition: transform 160ms cubic-bezier(0.4, 0, 0.2, 1); }
  .split-more[aria-expanded="true"] .chev { transform: scaleY(-1); }
  @media (hover: hover) { .split-more:hover .chev { transform: scaleY(-1); } }
}
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 130; display: grid; width: min(272px, calc(100vw - 32px)); padding: 8px; border-radius: 16px; background: var(--ground);
  box-shadow: 0 0 0 1px var(--hair), 0 16px 48px -8px rgba(0, 0, 0, 0.55); }
.menu.pop { --origin: top right; transition: opacity var(--t-exit) linear, transform var(--t-exit) linear, visibility 0s linear var(--t-exit); }
.menu.pop { transform-origin: var(--origin, top right); }
.menu.pop:not(.is-open) { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(0.95); }
.menu.pop.is-open { transition: opacity var(--t-1) var(--ease-reveal), transform var(--t-1) var(--ease-reveal), visibility 0s; }
.menu-label { padding: 6px 10px 8px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.menu button { display: grid; gap: 2px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; }
.menu b { font-size: 14px; font-weight: 500; color: var(--text); }
.menu span { font-size: 12.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  .engine[data-state="work"] .mk-a, .engine[data-state="work"] .mk-b { animation: none; }
}


/* toasts (status messages, optional action) */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 200; translate: -50% 0; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px);
  padding: 10px 18px; border-radius: var(--r-control); background: var(--text); color: var(--ground); font-size: 14px; font-weight: 500; box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.5); }
.toast[hidden] { display: none; }
.toast:not([hidden]) { animation: toast-in var(--t-2) var(--ease-reveal); }
.toast button { margin-right: -8px; padding: 5px 12px; border-radius: var(--r-control); font-weight: 600; background: color-mix(in srgb, var(--ground) 12%, transparent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } }

/* Anticode Partners: the referral-cookie choice, shown only where consent comes first (public/ref-consent.js) */
.refc { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 400; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: 720px; margin: 0 auto; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--hair-2), 0 18px 50px -20px rgba(0, 0, 0, 0.6); font-size: 14px; line-height: 1.5; color: var(--body); }
.refc p { margin: 0; flex: 1 1 320px; }
.refc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.refc-acts { display: flex; gap: 8px; }

/* a photo or video tile with its upload progress along the bottom (public/media-tray.js): the dashboard composer and the builder's change box */
.dm { position: relative; width: 72px; height: 72px; border-radius: 18px; overflow: hidden; background: var(--raised); box-shadow: inset 0 0 0 1px var(--hair), var(--edge); animation: dm-in var(--t-2) var(--ease-reveal) both; }
.dm img, .dm video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm.is-up img, .dm.is-up video { opacity: 0.55; }
.dm-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dm-kind { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 11px; font-weight: 500; line-height: 1.5; }
.dm-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.18); opacity: 0; }
.dm.is-up .dm-bar { opacity: 1; }
.dm-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 4%); background: var(--pen); transition: width var(--t-1) linear; }
.dm-x { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff; }
.dm-x .ic { width: 12px; height: 12px; }
.dm-x:hover { background: rgba(0, 0, 0, 0.82); }
.dm-x:focus-visible { outline: 2px solid var(--pen); outline-offset: 1px; }
@keyframes dm-in { from { opacity: 0; transform: scale(0.92); } }
@media (prefers-reduced-motion: reduce) { .dm { animation: none; } .dm-bar::after { transition: none; } }

/* Harder effort has no look of its own on the prompt box: no aura, no blue glow (the owner, 22 Nov 2026). */

/* ---------- Settings that change how Anticode itself looks (public/prefs.js sets these on <html>) ---------- */
/* Interface size: everything scales together, as the browser's own zoom does */
:root[data-size="90"] { zoom: 0.9; }
:root[data-size="110"] { zoom: 1.1; }
:root[data-size="125"] { zoom: 1.25; }
:root[data-size="150"] { zoom: 1.5; }
/* Contrast: more, asked for here or by the device; secondary text and outlines move toward the text colour */
:root[data-contrast="more"] { --muted: #c0c5cc; --body: #eef0f4; --line: #3d424b; --line-2: #5d646f; --hair: var(--line); --hair-2: var(--line-2); }
:root[data-contrast="more"][data-theme="light"] { --muted: #3e3e3e; --body: #181818; --line: #a9aeb6; --line-2: #6f7682; --hair: var(--line); --hair-2: var(--line-2); }
@media (prefers-color-scheme: light) { :root[data-contrast="more"]:not([data-theme="dark"]) { --muted: #3e3e3e; --body: #181818; --line: #a9aeb6; --line-2: #6f7682; --hair: var(--line); --hair-2: var(--line-2); } }
@media (prefers-contrast: more) {
  :root:not([data-theme="light"]) { --muted: #c0c5cc; --body: #eef0f4; --line: #3d424b; --line-2: #5d646f; --hair: var(--line); --hair-2: var(--line-2); }
  :root[data-theme="light"] { --muted: #3e3e3e; --body: #181818; --line: #a9aeb6; --line-2: #6f7682; --hair: var(--line); --hair-2: var(--line-2); }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --muted: #3e3e3e; --body: #181818; --line: #a9aeb6; --line-2: #6f7682; --hair: var(--line); --hair-2: var(--line-2); } }
/* Motion: reduce, here as the device's setting does */
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after {
  animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
  transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
:root[data-scroll="smooth"] { scroll-behavior: smooth; }
/* Focus outline: always, not only from the keyboard */
:root[data-focus="always"] :focus { outline: 2px solid var(--text) !important; outline-offset: 2px; }
/* Links in running text are underlined, so they don't rely on colour */
:root[data-links="underline"] :where(p, li, small, td, label, figcaption, .settings-note) a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
:root[data-spacing="wide"] body { letter-spacing: 0.035em; word-spacing: 0.1em; }
/* Transparency: reduce makes the blurred bars and menus solid */
/* dots off: hide the live canvas, and the plain CSS grids (the rules beside each .has-field) come back */
:root[data-dots="off"] .bd-field { display: none; }

/* Dark mode: everything picked, chosen or switched on (tabs and their sliding pills, segmented pickers, filter and
   answer chips, toggles) is a neutral grey with a white label, not the main button's blue glass, and has no ring.
   The main action buttons (.btn-primary, Send and the like) keep the blue. Light mode is untouched. */
:root[data-theme="dark"] :is(.chip input:checked + span, .convo-q .chips button.is-picked, .cm-tabs a[aria-current], .dp-tabpill, .lib-tabs button[aria-selected="true"], .dash .tab-pill, .eng-tabs button[aria-selected="true"], .gr-filters button[aria-checked="true"], .mcp-tabs [role="tab"][aria-selected="true"], .edit-toggle[aria-pressed="true"], .achips button[aria-checked="true"], .build.ws .wtabs-pill, .build.ws .seg button[aria-selected="true"], .build.ws .seg button[aria-pressed="true"], .build.ws .wbar-mid .edit-toggle[aria-pressed="true"]), :root[data-theme="dark"] .pr-seg::before { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* the editor toggle rests on a 7% grey already, so switched on it takes a deeper one */
:root[data-theme="dark"] .build.ws .wbar-mid .edit-toggle[aria-pressed="true"] { background: color-mix(in srgb, var(--text) 18%, transparent); }
@supports not selector(:has(*)) { :root[data-theme="dark"] .pr-seg input:checked + label { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.chip input:checked + span, .convo-q .chips button.is-picked, .cm-tabs a[aria-current], .dp-tabpill, .lib-tabs button[aria-selected="true"], .dash .tab-pill, .eng-tabs button[aria-selected="true"], .gr-filters button[aria-checked="true"], .mcp-tabs [role="tab"][aria-selected="true"], .edit-toggle[aria-pressed="true"], .achips button[aria-checked="true"], .build.ws .wtabs-pill, .build.ws .seg button[aria-selected="true"], .build.ws .seg button[aria-pressed="true"], .build.ws .wbar-mid .edit-toggle[aria-pressed="true"]), :root:not([data-theme="light"]) .pr-seg::before { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root:not([data-theme="light"]) .build.ws .wbar-mid .edit-toggle[aria-pressed="true"] { background: color-mix(in srgb, var(--text) 18%, transparent); }
  @supports not selector(:has(*)) { :root:not([data-theme="light"]) .pr-seg input:checked + label { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } }
}

/* Dark mode, no blue on any button or control: the round Go buttons (the main and second buttons are flat
   grey fills mixed from --text everywhere), the live mic, switches when on (white track, dark
   knob) and checkbox and slider ticks. Brand accents (progress, glows, avatars, links) keep --pen. Light mode untouched. */
:root[data-theme="dark"] .eas-go { background: var(--btn-main); color: var(--btn-main-text); box-shadow: none; }
:root[data-theme="dark"] .eas-go:hover { background: var(--btn-main-hover); }
:root[data-theme="dark"] :is(.beta-go, .wsnav-beta-go) { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
:root[data-theme="dark"] :is(.beta-go:hover, .beta:hover .beta-go, .wsnav-beta-go:hover) { background: color-mix(in srgb, var(--text) 16%, transparent); }
:root[data-theme="dark"] #mic.is-live { color: var(--text); background: color-mix(in srgb, var(--text) 18%, transparent); }
:root[data-theme="dark"] .sr-switch:checked { background: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
:root[data-theme="dark"] .sr-switch:checked::before { background: var(--ground); }
:root[data-theme="dark"] .sr-switch:checked:hover { box-shadow: inset 0 0 0 1.5px var(--text), 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent); }
:root[data-theme="dark"] :is(.ads-check input, .co-terms input, .gr-check input, .gr-pick > input, .grow-scrub input[type=range], .pt-calc input[type="range"], .pt-check input, .sp-range) { accent-color: var(--text); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eas-go { background: var(--btn-main); color: var(--btn-main-text); box-shadow: none; }
  :root:not([data-theme="light"]) .eas-go:hover { background: var(--btn-main-hover); }
  :root:not([data-theme="light"]) :is(.beta-go, .wsnav-beta-go) { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
  :root:not([data-theme="light"]) :is(.beta-go:hover, .beta:hover .beta-go, .wsnav-beta-go:hover) { background: color-mix(in srgb, var(--text) 16%, transparent); }
  :root:not([data-theme="light"]) #mic.is-live { color: var(--text); background: color-mix(in srgb, var(--text) 18%, transparent); }
  :root:not([data-theme="light"]) .sr-switch:checked { background: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
  :root:not([data-theme="light"]) .sr-switch:checked::before { background: var(--ground); }
  :root:not([data-theme="light"]) .sr-switch:checked:hover { box-shadow: inset 0 0 0 1.5px var(--text), 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent); }
  :root:not([data-theme="light"]) :is(.ads-check input, .co-terms input, .gr-check input, .gr-pick > input, .grow-scrub input[type=range], .pt-calc input[type="range"], .pt-check input, .sp-range) { accent-color: var(--text); }
}

/* The glowing Anticode mark: what Anticode draws wherever another product would put a glowing dot (a "live" bead,
   a status light, a dot before a label). White, with a soft glow that breathes and a light that sweeps across it.
   Markup: <span class="ac-glowmark" aria-hidden="true"><i></i></span>; size it with font-size (the mark is 1em tall).
   The outer span carries the glow (a filter), the inner one the mark (a mask), since a mask would cut the glow off. */
.ac-glowmark { display: inline-block; flex: none; width: 0.89em; height: 1em; color: #ffffff;
  filter: drop-shadow(0 0 0.12em rgba(255, 255, 255, 0.85)) drop-shadow(0 0 0.45em rgba(255, 255, 255, 0.45)); }
.ac-glowmark > i { position: relative; display: block; width: 100%; height: 100%; overflow: hidden;
  -webkit-mask: url("/mark.svg") center / contain no-repeat; mask: url("/mark.svg") center / contain no-repeat; }
/* the sweep is a wide band slid across under the mask: a transform, so it never repaints */
.ac-glowmark > i::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 260%;
  background: linear-gradient(115deg, currentColor 0 38%, rgba(255, 255, 255, 0.5) 46%, currentColor 54% 100%); transform: translateX(-61.54%); }
@media (prefers-reduced-motion: no-preference) {
  .ac-glowmark { animation: ac-glow-breathe 3.2s ease-in-out infinite; }
  .ac-glowmark > i::after { animation: ac-glow-sweep 3.2s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
}
/* the glow breathes by fading and settling, both on the compositor; the glow itself (the filter) is drawn once */
@keyframes ac-glow-breathe { 50% { opacity: 0.8; scale: 0.94; } }
@keyframes ac-glow-sweep { 0%, 35% { transform: translateX(-61.54%); } 75%, 100% { transform: none; } }

/* Shapes that were drawn only by a hairline (now off unless More contrast is on) get a soft fill instead, so a card,
   chip, field or segmented control still reads as one thing. :where() keeps this at zero specificity: anything that
   already sets its own background keeps it. */
:where(.ads-notice, .ads-pack, .ads-seg, .ck-plus, .eas-n, .kbd, .dcomp-plus, .team-badge, .tabs, .field, .seg2, .gr-notice,
  .gr-auto, .gr-kind, .in-seg, .in-suggest button, .frame-label .pill, .run-row .tag, .stat, .onb-idea, .sr-items, .pr-plan,
  .edit-toggle, .insp-opt span, .regress-map, .insp, .wsnav-kbd, .ctable-wrap, .achips button, .cgh-sync) {
  background-color: color-mix(in srgb, var(--text) 5%, transparent); }

/* The scrollbar, everywhere (the owner, 14 Nov 2026: "create a custom scrolling bar", over a screenshot of the system's
   grey bar with its arrows): a thin rounded thumb in the text colour on an empty track, no arrows, a step brighter when
   pointed at or dragged. Chrome, Edge and Safari draw it from ::-webkit-scrollbar; Firefox, which has no such selector,
   from scrollbar-width and scrollbar-color (set only there: in Chrome those two would switch the drawn one off).
   A panel that hides its bar or draws its own (desk.css, chat-pills.css) still does. */
:root { --sb-thumb: color-mix(in srgb, var(--text) 18%, transparent); --sb-thumb-on: color-mix(in srgb, var(--text) 34%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { min-height: 40px; border: 3px solid transparent; border-radius: 999px; background: var(--sb-thumb) padding-box; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background-color: var(--sb-thumb-on); }
@supports not selector(::-webkit-scrollbar) {
  html, :where(*) { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
}
