/* ─────────────────────────────────────────────────────────────────────────────
   Blanks 2045: the design language (2026-11-20, from the founder's 18 references).
   Loaded LAST on the agency side. Spec: notes/DESIGN-2045-2026-11-20.md.
   Base = calm porcelain neutrals + black + cobalt. The aurora gradient is ONLY for AI moments.
   ───────────────────────────────────────────────────────────────────────────── */
@font-face { font-family: 'Geist Variable'; src: url(/static/geist.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url(/static/newsreader.woff2) format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; } /* free (OFL) look-alike of Anthropic Serif, for page headlines (founder 2026-11-23) */

:root {
  /* surfaces: porcelain, layered */
  --fx-canvas: #eceef1;            /* the world the window floats on */
  --fx-window: #f7f8fa;            /* the app window */
  --fx-glass: rgba(255, 255, 255, 0.72);
  --fx-glass-strong: rgba(255, 255, 255, 0.88);
  --fx-card: #ffffff;
  --fx-sunk: #f1f2f5;              /* inputs, wells */
  --fx-line: rgba(14, 18, 27, 0.07);
  --fx-line-2: rgba(14, 18, 27, 0.12);
  --fx-line-3: rgba(14, 18, 27, 0.2);
  /* ink */
  --fx-ink: #0b0d12; --fx-ink-2: #3d424d; --fx-ink-3: #737885; --fx-ink-4: #737885; /* = ink-3: one light grey for all quiet text (founder 2026-11-22) */ --fx-ink-hover: #23262e;
  /* brand */
  --fx-cobalt: #3478f7; --fx-cobalt-deep: #1f5fd6; --fx-cobalt-soft: #eaf1ff;
  /* AI only: the aurora */
  --fx-aurora: linear-gradient(110deg, #3478f7 0%, #7b6cf6 38%, #e27ad6 68%, #ffb38a 100%);
  --fx-aurora-soft: radial-gradient(120% 90% at 0% 0%, rgba(52, 120, 247, .16), transparent 55%), radial-gradient(90% 80% at 100% 0%, rgba(226, 122, 214, .12), transparent 60%), radial-gradient(90% 90% at 60% 100%, rgba(255, 179, 138, .14), transparent 60%);
  /* status (dots only, never big fills) + the ONE error red (error text, destructive actions) */
  --fx-live: #22a06b; --fx-wait: #f2994a; --fx-stalled: #b3b8c2;
  --fx-bad: #c4342d; --fx-bad-soft: #fbeeed;
  /* shape */
  --fx-r-window: 28px; --fx-r-card: 22px; --fx-r-inner: 14px; --fx-r-pill: 999px;
  --fx-shadow-hair: 0 0 0 1px var(--fx-line-2), 0 1px 2px rgba(14, 18, 27, .05);   /* controls: buttons, chips, inputs */
  --fx-shadow-lift: 0 0 0 1px var(--fx-line-2), 0 4px 12px -6px rgba(14, 18, 27, .25);  /* control hover */
  --fx-shadow-ink: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px -8px rgba(11, 13, 18, .6);  /* the black primary */
  --fx-shadow-card: 0 0 0 1px var(--fx-line), 0 1px 2px rgba(14, 18, 27, .04), 0 18px 40px -24px rgba(14, 18, 27, .22);
  --fx-shadow-float: 0 0 0 1px var(--fx-line), 0 2px 6px rgba(14, 18, 27, .05), 0 40px 80px -32px rgba(14, 18, 27, .35);
  --fx-shadow-window: 0 0 0 1px rgba(14, 18, 27, .06), 0 30px 90px -40px rgba(14, 18, 27, .35);
  /* type */
  --fx-sans: 'Geist Variable', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --fx-serif: 'Newsreader', ui-serif, Georgia, serif;  /* ONE accent word per headline, italic */
  --fx-mono: ui-monospace, 'SF Mono', Consolas, monospace;
  /* ONE type scale (px): 12 13 14 15 16 18 22 28 36 46; heroes clamp to 46. Every page title = --fx-t-title. */
  --fx-t-12: 12px; --fx-t-13: 13px; --fx-t-14: 14px; --fx-t-15: 15px; --fx-t-16: 16px; --fx-t-18: 18px; --fx-t-22: 22px; --fx-t-28: 28px; --fx-t-36: 36px; --fx-t-46: 46px;
  --fx-t-title: clamp(28px, 2.6vw, 36px);
  /* ONE button height scale: 30 (small) / 38 (default) / 46 (large, auth) */
  --fx-h-sm: 30px; --fx-h: 38px; --fx-h-lg: 46px;
  /* motion */
  --fx-ease: cubic-bezier(.2, .8, .2, 1); --fx-fast: 160ms; --fx-med: 260ms;
}

/* ── the world + the window ── */
body.agency-body { background: var(--fx-canvas); }
body.agency-body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: var(--fx-aurora-soft); opacity: .9;
}
.fx-window { position: relative; z-index: 1; background: var(--fx-window); border-radius: var(--fx-r-window); box-shadow: var(--fx-shadow-window); }

/* ── primitives ── */
.fx-card { background: var(--fx-card); border-radius: var(--fx-r-card); box-shadow: var(--fx-shadow-card); }
.fx-glass { background: var(--fx-glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-radius: var(--fx-r-card); box-shadow: var(--fx-shadow-float); }
.fx-sunk { background: var(--fx-sunk); border-radius: var(--fx-r-inner); }
.fx-eyebrow { font: 500 12px/1.3 var(--fx-sans); letter-spacing: .02em; color: var(--fx-ink-3); }

/* Editorial headline: muted first line, ink second line, one italic serif accent. */
.fx-hero { font: 400 clamp(30px, 3.4vw, 46px)/1.08 var(--fx-sans); letter-spacing: -.035em; color: var(--fx-ink); margin: 0; }
.fx-hero .muted, .fx-hero .fx-dim { color: var(--fx-ink-4); }
.fx-accent { font-family: var(--fx-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.fx-inline { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; vertical-align: -.12em; margin: 0 .08em; border-radius: 30%; background: var(--fx-card); box-shadow: var(--fx-shadow-card); font-size: .62em; }

/* Plain text tabs: All · Needs you · Running */
.fx-tabs { display: flex; gap: 22px; border: 0; }
.fx-tabs button, .fx-tabs a { all: unset; cursor: pointer; font: 500 14px/1 var(--fx-sans); color: var(--fx-ink-3); padding: 8px 0; position: relative; }
.fx-tabs .on { color: var(--fx-ink); }
.fx-tabs .on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--fx-ink); }
.fx-tabs b { font-weight: 500; color: var(--fx-ink-4); margin-left: 4px; }

/* Status dot + label: "● Active · day 41" */
.fx-status { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--fx-sans); color: var(--fx-ink-3); }
.fx-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--fx-stalled); }
.fx-status.live::before { background: var(--fx-live); } .fx-status.wait::before { background: var(--fx-wait); } .fx-status.ai::before { background: var(--fx-aurora); }

/* Buttons */
.fx-btn { display: inline-flex; align-items: center; gap: 8px; height: var(--fx-h); padding: 0 16px; border-radius: var(--fx-r-pill); border: 0; font: 500 14px/1 var(--fx-sans); cursor: pointer; background: var(--fx-card); color: var(--fx-ink); box-shadow: var(--fx-shadow-hair); transition: transform var(--fx-fast) var(--fx-ease), box-shadow var(--fx-fast); }
.fx-btn:hover { box-shadow: var(--fx-shadow-lift); }
.fx-btn:active { transform: translateY(1px); }
.fx-btn.primary:hover { background: var(--fx-ink-hover); }
.fx-btn.primary { background: var(--fx-ink); color: #fff; box-shadow: var(--fx-shadow-ink); }
.fx-btn.quiet { background: var(--fx-sunk); box-shadow: none; }
.fx-btn.sm { height: var(--fx-h-sm); padding: 0 12px; font-size: 13px; }

/* ── AI moments (the only place colour gets loud) ── */
.fx-ai-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--fx-r-pill); font: 600 12px/1 var(--fx-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--fx-ink); background: linear-gradient(var(--fx-card), var(--fx-card)) padding-box, var(--fx-aurora) border-box; border: 1px solid transparent; }
.fx-ai-text { background: var(--fx-aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* A glowing aurora edge for whatever the AI is working on or just made. */
.fx-ai-edge { position: relative; isolation: isolate; }
.fx-ai-edge::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: var(--fx-aurora); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: -1; }
.fx-ai-edge::after { content: ''; position: absolute; inset: 8% 6% -10%; border-radius: inherit; background: var(--fx-aurora); filter: blur(28px); opacity: .22; z-index: -2; }
.fx-ai-edge.working::after { animation: fx-breathe 2.4s var(--fx-ease) infinite; }
@keyframes fx-breathe { 0%, 100% { opacity: .14; } 50% { opacity: .34; } }
/* "50% of magic" progress */
.fx-magic { display: grid; grid-auto-flow: column; gap: 6px; }
.fx-magic i { height: 5px; border-radius: 3px; background: var(--fx-sunk); }
.fx-magic i.on { background: var(--fx-aurora); }

/* The composer: the AI is a sentence away, everywhere. */
.fx-composer { position: relative; background: var(--fx-card); border-radius: var(--fx-r-card); box-shadow: var(--fx-shadow-card); padding: 16px 16px 12px; transition: box-shadow var(--fx-med) var(--fx-ease); }
.fx-composer:focus-within { box-shadow: 0 0 0 1px rgba(52, 120, 247, .35), 0 0 0 6px rgba(52, 120, 247, .08), 0 24px 50px -28px rgba(52, 120, 247, .45); }
.fx-composer textarea, .fx-composer input { all: unset; display: block; width: 100%; font: 400 16px/1.5 var(--fx-sans); color: var(--fx-ink); min-height: 48px; }
.fx-composer ::placeholder { color: var(--fx-ink-4); }
.fx-composer .fx-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fx-composer .fx-send { margin-left: auto; width: var(--fx-h); height: var(--fx-h); border-radius: 50%; display: grid; place-items: center; background: var(--fx-ink); color: #fff; border: 0; cursor: pointer; }
.fx-chip { display: inline-flex; align-items: center; gap: 6px; height: var(--fx-h-sm); padding: 0 14px; border-radius: var(--fx-r-pill); background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line-2); font: 500 13px/1 var(--fx-sans); color: var(--fx-ink-2); cursor: pointer; border: 0; }
.fx-chip:hover { color: var(--fx-ink); box-shadow: var(--fx-shadow-lift); }
.fx-kbd { font: 500 12px/1 var(--fx-mono); color: var(--fx-ink-4); }

/* Dotted canvas (client place, workflows) */
.fx-dots { background-color: var(--fx-window); background-image: radial-gradient(rgba(14, 18, 27, .13) 1px, transparent 1.2px); background-size: 18px 18px; }
.fx-node-tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; font: 600 12px/1 var(--fx-sans); background: var(--fx-cobalt-soft); color: var(--fx-cobalt-deep); }
.fx-connector { stroke: rgba(14, 18, 27, .22); stroke-width: 1.2; stroke-dasharray: 2 5; fill: none; stroke-linecap: round; }

/* Illustrated card top (onboarding, connect): pastel aurora wash + floating icons */
.fx-illus { position: relative; border-radius: var(--fx-r-card) var(--fx-r-card) 0 0; background: var(--fx-aurora-soft), #f4f6fb; min-height: 160px; overflow: hidden; }
.fx-orbit-icon { position: absolute; width: 40px; height: 40px; border-radius: 12px; background: var(--fx-card); box-shadow: var(--fx-shadow-card); display: grid; place-items: center; }
.fx-orbit-icon.far { filter: blur(1.5px); opacity: .6; transform: scale(.85); }

/* Avatar tiles: coloured initials (client identity) */
.fx-tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 600 15px/1 var(--fx-sans); color: #fff; background: var(--fx-ink); flex: none; }

@media (prefers-reduced-motion: reduce) { .fx-ai-edge.working::after { animation: none; } .fx-btn, .fx-composer { transition: none; } }

/* Visible keyboard focus on the plain tabs (all: unset removed the default ring). */
.fx-tabs button:focus-visible, .fx-tabs a:focus-visible { outline: 2px solid var(--fx-cobalt); outline-offset: 4px; border-radius: 6px; }

/* Icons: line icons with ONE stroke (1.6, overrides the 1.7 in agency-ui.js icon()); sizes 16 / 18 / 20 / 24 (12 only inside 22 px tags). */
.ico svg, .sh-ico svg { stroke-width: 1.6; }

/* Phone (<760): every control is at least 40 px tall (touch). The button scale becomes 40 / 40 / 46. */
@media (max-width: 759px) {
  :root { --fx-h-sm: 40px; --fx-h: 40px; }
  .fx-tabs button, .fx-tabs a { padding: 13px 0; }
}

/* ── One icon colour (founder, 2026-11-20: "the icons don't have the same colour across the board") ──
   Every line icon = the same ink as body text. Inside a black button = white. No blue, no light grey,
   no black tiles or gradient tiles behind icons. Status marks (.ck) and illustrations keep their own. */
body.agency-body :is(.ico, .sh-ico, .sh-me-dots, .pl-chev) { color: var(--fx-ink-2) !important; }
/* The marks in the AI picture (agency-settings.js MARKS, line style since 2026-11-22) follow the same ink; white on the dark "checking" badge. */
body.agency-body .fxs-mark { color: var(--fx-ink-2) !important; }
body.agency-body .fxs-keypill.checking .fxs-det .fxs-mark { color: #fff !important; }
body.agency-body :is(.fx-btn.primary, button.primary, a.btn.primary, .btn.primary, .fx-send, .cg-plus, .tag.res-ok, .tag.res-bad, .toast) :is(.ico, .sh-ico) { color: #fff !important; }
body.agency-body .ck :is(.ico) { color: inherit !important; }
body.agency-body .sh-new .sh-ico { background: none !important; box-shadow: none !important; }
body.agency-body .td-ask-mark { background: var(--fx-sunk) !important; box-shadow: none !important; }
body.agency-body .td-ask-mark .ico { color: var(--fx-ink-2) !important; }
body.agency-body .fx-orbit-icon.now .ico { color: var(--fx-ink) !important; }
body.agency-body .sh-setup-eyebrow svg { fill: none; }
body.agency-body .ico svg, body.agency-body .sh-ico svg { stroke: currentColor; }
body.agency-body :is(.ico, .sh-ico) svg { color: inherit !important; }
body.agency-body .sh-setup-eyebrow svg { color: var(--fx-ink-2); }
/* Icons on dark fills stay white: the phone bar's "+" and any dark tile. */
body.agency-body :is(.sh-new-dot, .sh-bar-new) .sh-ico, body.agency-body :is(.sh-new-dot, .sh-bar-new) .sh-ico svg { color: #fff !important; }

/* Inline field errors (UI audit #19): under the field, with aria-invalid on the field (agency-ui.js fieldErr). */
.field-err { display: block; margin-top: 4px; font: 500 12px/1.4 var(--fx-sans); color: var(--fx-bad); }
.field-err[hidden] { display: none; }
body.agency-body :is(input, textarea, select)[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--fx-bad) !important; border-color: var(--fx-bad) !important; }
body.agency-body .fxs-keypill:has([aria-invalid="true"]) { box-shadow: 0 0 0 1px var(--fx-bad); }
body.agency-body .pl-compose-in[aria-invalid="true"] { box-shadow: none !important; }

/* ── One font, one colour in every headline (founder, 2026-11-22) ──
   No italic serif word, no grey-then-black lines, no gradient text: Geist, one ink colour.
   Hierarchy comes from size and weight only. Covers agency, client and team pages (all load this file last). */
.fx-accent, h1 .fx-accent, h2 .fx-accent, .fx-hero .fx-accent, body.agency-body .sh-auth h1.fx-hero .fx-accent, .td-empty .fx-accent {
  font-family: inherit !important; font-style: normal !important; font-weight: inherit !important; letter-spacing: inherit !important; font-size: inherit !important; color: inherit !important;
}
.fx-hero, .fx-hero .muted, .fx-hero .fx-dim, .fx-hero span:not(.fx-inline):not(.fx-inline *), #wTitle, #wTitle .w-hi, #wTitle span { color: var(--fx-ink) !important; }
.fx-ai-text { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: var(--fx-ink) !important; }

/* ── Warm, Claude-like look everywhere (founder, 2026-11-23) ──────────────────────────────────────
   Free look-alikes only (Anthropic's own fonts are not licensed for us): page headlines in Newsreader
   (serif, upright, one colour), all other text in Geist. Warm ivory background, warm near-black ink,
   warm greys, ONE warm clay accent (replaces cobalt). The old --fx-cobalt* names now hold the clay accent,
   so every component follows. Same values on the agency side, client link, team page and website. */
:root {
  --fx-canvas: #f0eee6;            /* the world */
  --fx-window: #faf9f5;            /* the app window: ivory */
  --fx-card: #ffffff;
  --fx-glass: rgba(255, 254, 250, 0.78);
  --fx-glass-strong: rgba(255, 254, 250, 0.9);
  --fx-sunk: #f0eee6;
  --fx-line: rgba(31, 30, 29, 0.08);
  --fx-line-2: rgba(31, 30, 29, 0.13);
  --fx-line-3: rgba(31, 30, 29, 0.22);
  --fx-ink: #141413; --fx-ink-2: #3d3d3a; --fx-ink-3: #73726c; --fx-ink-4: #73726c; --fx-ink-hover: #2b2a27;
  --fx-cobalt: #c96442; --fx-cobalt-deep: #a8502f; --fx-cobalt-soft: #f5e8e1;   /* = the clay accent */
  --fx-aurora: linear-gradient(110deg, #c96442 0%, #d98a5f 45%, #e8b88a 80%, #f1d6b8 100%);
  --fx-aurora-soft: radial-gradient(120% 90% at 0% 0%, rgba(201, 100, 66, .10), transparent 55%), radial-gradient(90% 80% at 100% 0%, rgba(232, 184, 138, .14), transparent 60%), radial-gradient(90% 90% at 60% 100%, rgba(241, 214, 184, .16), transparent 60%);
  --fx-stalled: #b5b3ab;
  --fx-serif: 'Newsreader', ui-serif, Georgia, serif;
  --fx-shadow-card: 0 0 0 1px var(--fx-line), 0 1px 2px rgba(31, 30, 29, .04), 0 18px 40px -24px rgba(31, 30, 29, .18);
  --fx-shadow-float: 0 0 0 1px var(--fx-line), 0 2px 6px rgba(31, 30, 29, .05), 0 40px 80px -32px rgba(31, 30, 29, .28);
  --fx-shadow-window: 0 0 0 1px rgba(31, 30, 29, .06), 0 30px 90px -40px rgba(31, 30, 29, .28);
}
/* page headlines: the serif, upright, one colour (agency heroes, page titles, client welcome, team page) */
.fx-hero, h1.fx-hero, .page-head h1, .cg-title, .fxs-hero, #wTitle, .welcome h1, .t-title, .td-hero .fx-hero, .sh-auth h1 {
  font-family: var(--fx-serif) !important; font-weight: 400 !important; font-style: normal !important; letter-spacing: -0.02em !important; color: var(--fx-ink) !important;
}
.fx-hero *, #wTitle * { font-family: inherit !important; }
.fx-inline { font-family: var(--fx-sans) !important; }
