/* ==========================================================================
   Autonomyware — shared styles for account / marketing sub-pages
   (pricing, login, signup, dashboard, settings, billing, legal, cookies)
   Matches the homepage mockup design language: off-white "paper" base,
   single teal accent, Inter type. Full light + dark theming via data-theme
   on <html> (see theme.js) and prefers-color-scheme for "system".
   ========================================================================== */

:root {
  /* ---- Brand system (owner 2026-10-01) ----
     Fonts — main: Century Gothic Bold (AUTONOMYWARE wordmark only) + Inter;
             secondary: Fraunces (serif, 400–600) + Space Grotesk (400–600).
     The pages load only the web fonts a stylesheet applies (SHARED_HEAD_LINKS in
     src/worker/html-inject.mjs, checked by test/shared-head.test.mjs): Fraunces is not loaded
     until something uses --font-serif.
     Accents — primary Teal #1A7A9A; secondary Clay / Orange #DB5C34. */
  --font-logo: "Century Gothic", "URW Gothic", "Futura", sans-serif;
  --font-main: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --accent: #1A7A9A;

  /* ---- Light (default / off-white) ---- */
  --ink: #16181C;
  --ink-soft: #454A52;
  --muted: #7C818A;

  --paper: #E8EAE0;        /* page background */
  --paper-deep: #DFE2D5;   /* alternating band */
  --raised: #F2F4EC;       /* cards / panels */
  --raised-2: #FBFAF6;     /* inputs / elevated surfaces */
  --raised-hover: #EDEFE6;

  --line: rgba(22,24,28,0.12);
  --line-soft: rgba(22,24,28,0.07);
  --line-strong: rgba(22,24,28,0.20);

  --teal: #1A7A9A;
  --teal-deep: #0F5468;
  --teal-ink: #0C3B49;
  --teal-bright: #29A0C4;
  --teal-mist: #CFE2E4;
  --teal-wash: #E1EDEC;

  --clay: #DB5C34;
  --danger: #AA3623;       /* error TEXT: 4.6:1+ on every light surface and on --danger-wash (was #C0402A); buttons use --danger-fill */
  --danger-wash: rgba(192,64,42,0.10);
  --ok: #2F8F46;
  --ok-wash: rgba(47,143,70,0.12);

  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 12px;
  /* flat, Linear/Cursor style — minimal shadows; real elevation only on floating UI */
  --shadow-soft: 0 1px 2px rgba(22,24,28,0.05);
  --shadow-card: 0 1px 2px rgba(22,24,28,0.05);
  --shadow-pop: 0 18px 44px rgba(22,24,28,0.14);

  --maxw: 1280px;
  --nav-h: 68px;

  --page-glow: none;
}

/* ---- Dark theme — neutral charcoal (Cursor-like). Fully desaturated greys:
   NO tint, NO saturation. Teal + clay accents are identical to light mode.
   Surface ladder: #131314 page · #1A1A1B band · #202021 cards · #262628 raised. ---- */
:root[data-theme="dark"] {
  --ink: #ECECED;
  --ink-soft: #A6A7A9;
  --muted: #77787B;

  --paper: #131314;        /* page background */
  --paper-deep: #1A1A1B;   /* alternating band */
  --raised: #202021;       /* cards / panels */
  --raised-2: #262628;     /* inputs / elevated surfaces */
  --raised-hover: #2C2C2E;

  --line: rgba(255,255,255,0.10);
  --line-soft: rgba(255,255,255,0.055);
  --line-strong: rgba(255,255,255,0.18);

  --teal: #1A7A9A;
  --teal-deep: #5FC2DC;    /* lighter teal for accent TEXT on charcoal (still teal) */
  --teal-ink: #BFE9F4;
  --teal-bright: #29A0C4;
  --teal-mist: rgba(41,160,196,0.30);
  --teal-wash: rgba(41,160,196,0.12);

  --clay: #DB5C34;
  --danger: #EC7A61;       /* error TEXT on dark: 4.5:1+ on raised-2 and --danger-wash (was #E5654A) */
  --danger-wash: rgba(229,101,74,0.14);
  --ok: #4FB477;
  --ok-wash: rgba(79,180,119,0.14);

  --shadow-soft: none;
  --shadow-card: none;
  --shadow-pop: 0 18px 44px rgba(0,0,0,0.55);

  --page-glow: none;
}

/* ---- Dark theme (system, when not forced to light) — same neutral charcoal ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ECECED;
    --ink-soft: #A6A7A9;
    --muted: #77787B;

    --paper: #131314;
    --paper-deep: #1A1A1B;
    --raised: #202021;
    --raised-2: #262628;
    --raised-hover: #2C2C2E;

    --line: rgba(255,255,255,0.10);
    --line-soft: rgba(255,255,255,0.055);
    --line-strong: rgba(255,255,255,0.18);

    --teal: #1A7A9A;
    --teal-deep: #5FC2DC;
    --teal-ink: #BFE9F4;
    --teal-bright: #29A0C4;
    --teal-mist: rgba(41,160,196,0.30);
    --teal-wash: rgba(41,160,196,0.12);

    --clay: #DB5C34;
    --danger: #EC7A61;
    --danger-wash: rgba(229,101,74,0.14);
    --ok: #4FB477;
    --ok-wash: rgba(79,180,119,0.14);

    --shadow-soft: none;
    --shadow-card: none;
    --shadow-pop: 0 18px 44px rgba(0,0,0,0.55);

    --page-glow: none;
  }
}

/* Compatibility tokens for shared components carried over from the old site
   (cookie-consent.js / cookie-consent.css). Mapped to the new design tokens so
   they adapt to light/dark automatically (the referenced vars switch by theme). */
:root {
  --accent: var(--teal);
  --border-strong: var(--line-strong);
  --border-strong-hover: var(--teal);
  --input-border: var(--line);
  --panel-border: var(--line);
  --surface-hover: var(--raised-hover);
  --overlay-scrim: rgba(6,10,14,0.55);
  --shadow-color: rgba(22,24,28,0.14);
  --text-primary: var(--ink);
  --text-label: var(--ink);
  --text-muted: var(--muted);
  --copy-soft: var(--ink-soft);
  --cookie-banner-bg: var(--raised-2);
  --cookie-dialog-bg: var(--raised-2);
  --cookie-category-bg: var(--raised);
  --cookie-strong-bg: var(--raised);
  --cookie-strong-hover-bg: var(--raised-hover);
  --cookie-primary-bg: var(--teal);
  --cookie-primary-hover-bg: var(--teal-deep);
  --cookie-primary-text: #fff;
  --cookie-signal-bg: var(--teal-wash);
  --cookie-signal-border: var(--teal-mist);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
/* scrollbar-gutter keeps the vertical scrollbar space reserved on <html> (the
   root scroller). Horizontal bleed is contained here with overflow-x: clip
   rather than `overflow-x: hidden` on <body>: clip does not turn <body> into a
   separate scroll container, so the reserved gutter and the scrollbar stay on
   the same element and the full-width sticky nav/footer never shift on first
   paint. (overflow-x: hidden on body was the cause of the header "jump".) */
html { scroll-behavior: smooth; scrollbar-gutter: stable; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#demo { scroll-margin-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: var(--page-glow);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; }
::selection { background: var(--teal-mist); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.shell { width: min(var(--maxw), calc(100% - 48px)); margin-inline: auto; }
.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto;
  padding: 10px 16px; background: var(--teal); color: #fff; border-radius: 999px; z-index: 200;
}
main { flex: 1 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1.5px solid transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: none; }
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; width: 100%;
  font-size: 15px; font-weight: 600; background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--ink); transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.btn-secondary:hover { transform: translateY(-2px); opacity: .92; }
.is-featured .btn-secondary { background: var(--teal); border-color: var(--teal); color: #fff; }

/* small utility buttons used across dashboard */
.btn-subtle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--raised-2); color: var(--ink); border: 1px solid var(--line);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.btn-subtle:hover { border-color: var(--teal); color: var(--teal-deep); transform: translateY(-1px); }
.btn-save {
  min-height: 40px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--teal); color: #fff; border: 1px solid var(--teal);
}
.btn-save:hover { filter: brightness(1.06); }
.btn-cancel {
  min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: transparent; color: var(--ink-soft); border: 1px solid var(--line);
}
.btn-cancel:hover { color: var(--ink); border-color: var(--line-strong); }
.btn-danger { color: #fff !important; background: var(--danger-fill) !important; border-color: var(--danger-fill) !important; }
.btn-danger:hover { filter: brightness(1.05); }

/* ---------- Nav ---------- */
.nav-wrap {
  position: sticky; top: 0; z-index: 60; padding: 14px 0;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
:root[data-theme="dark"] .brand img { filter: invert(1) brightness(1.15); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: invert(1) brightness(1.15); } }
.brand-name { font-family: var(--font-logo); font-weight: 700; font-size: 22.5px; letter-spacing: 0.015em; line-height: 1; }
/* No "Open Beta" badge on the brand row (owner 2026-10-05: removed from the website). */
.nav-links { display: flex; gap: 26px; margin-left: auto; color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.nav-links a { transition: color .16s ease; }
.nav-links a:hover, .nav-links a.is-active { color: var(--teal-text); }
/* Solutions menu (owner 2026-11-09): the link opens the hub; hovering or focusing it shows the solution pages. */
.nav-drop { position: relative; display: inline-flex; align-items: center; }
.nav-drop-link { display: inline-flex; align-items: center; gap: 4px; }
.nav-drop-caret { width: 14px; height: 14px; transition: transform .16s ease; }
.nav-drop-menu {
  position: absolute; top: 100%; left: 50%; z-index: 70; display: grid; gap: 2px; width: 360px; padding: 8px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--raised); box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
/* A hover bridge over the gap between the link and the menu, so the pointer can travel into it. */
.nav-drop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu {
  opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .16s ease, transform .16s ease, visibility 0s;
}
.nav-drop:hover .nav-drop-caret, .nav-drop:focus-within .nav-drop-caret { transform: rotate(180deg); }
/* Escape dismissed it (header.js initSolutionsMenu): hidden until hover and focus have both left. The phone
   panel's inline list (the max-width: 900px block, later in this file) wins over this, so it never hides there. */
.nav-drop.is-dismissed .nav-drop-menu { opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: none; }
.nav-drop.is-dismissed .nav-drop-caret { transform: none; }
.nav-links .nav-drop-item { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.nav-links .nav-drop-item:hover, .nav-links .nav-drop-item.is-active { background: var(--raised-hover); color: var(--ink); }
.nav-drop-item b { display: block; font-size: 14px; font-weight: 600; }
.nav-drop-item span { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--ink-soft); }
.nav-drop-item.is-active b { color: var(--teal-deep); }
@media (prefers-reduced-motion: reduce) { .nav-drop-menu, .nav-drop-caret { transition: none; } }
/* account actions grouped + separated from the browse links by a hairline divider */
.nav-cta { display: flex; align-items: center; gap: 16px; margin-left: 0; order: 1; }
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; margin-left: auto; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--ink); }
/* Theme switch (owner 2026-10-19): frameless, styled like the hamburger. On wide screens it opens the account actions
   (it carries their hairline divider) left of "Log in" / the account menu; on phones it sits beside the hamburger. The
   icon is the effective theme: a sun when the page is light, a moon when it is dark (System follows the OS live). */
.nav-theme { position: relative; display: inline-flex; align-items: center; order: 1; padding-left: 14px; margin-right: -6px; border-left: 1px solid var(--line); }
.nav-theme-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.nav-theme-btn svg { width: 24px; height: 24px; }
.nav-theme-btn:focus-visible, .nav-theme-menu button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.nav-theme-moon { display: none; }
:root[data-theme="dark"] .nav-theme-sun { display: none; }
:root[data-theme="dark"] .nav-theme-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-theme-sun { display: none; }
  :root:not([data-theme="light"]) .nav-theme-moon { display: block; }
}
.nav-theme-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; display: grid; gap: 2px; min-width: 160px; padding: 6px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--raised); box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.nav-theme-menu[hidden] { display: none; }
.nav-theme-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink); font: 600 13.5px/1 var(--font-main); text-align: left; cursor: pointer;
}
.nav-theme-menu button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav-theme-menu button:hover { background: var(--raised-hover); }
.nav-theme-menu button[aria-checked="true"] { color: var(--teal-text); }

/* account dropdown */
.acct { position: relative; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px;
  border-radius: 999px; background: var(--raised); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: border-color .16s ease, background .16s ease;
}
.acct-btn:hover { border-color: var(--teal); }
.acct-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--teal);
}
.acct-caret { width: 12px; height: 12px; opacity: .6; }
.acct-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 240px;
  background: var(--raised-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-pop); padding: 8px; z-index: 80;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.acct.open .acct-menu { opacity: 1; visibility: visible; transform: none; }
.acct-menu-email { padding: 8px 12px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; word-break: break-all; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; color: var(--ink); background: transparent; border: 0;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--raised-hover); color: var(--teal-deep); }
.acct-logout { color: var(--danger) !important; margin-top: 4px; border-top: 1px solid var(--line-soft) !important; border-radius: 0 0 10px 10px !important; }

/* ---------- Footer ---------- */
.site-footer { flex: 0 0 auto; padding: 56px 0 36px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line-soft); margin-top: 80px; }
/* Link grid: five equal columns across the full width (three on tablets, two on phones). */
.foot-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px; padding-bottom: 48px; }
.foot-col-title { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; }
.foot-col ul, .foot-social { list-style: none; margin: 0; padding: 0; }
.foot-col li + li { margin-top: 10px; }
.foot-col a, .foot-link-btn {
  color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; line-height: 1.35;
  background: transparent; border: 0; padding: 0; cursor: pointer; text-align: left; transition: color .16s ease;
}
.foot-col a:hover, .foot-link-btn:hover, .foot-social a:hover { color: var(--teal-text); }
/* Bottom bar: social glyphs | imprint | NVIDIA Inception badge. */
.foot-bottom { display: grid; grid-template-columns: 1fr minmax(0, 560px) 1fr; align-items: center; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.foot-social { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-self: start; }
.foot-social a { display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink-soft); transition: color .16s ease; }
.foot-social svg { width: 18px; height: 18px; display: block; }
.foot-imprint { margin: 0; text-align: center; font-size: 12.5px; line-height: 1.55; }
/* The badge file carries its own clear space; the grid gap keeps neighbours further off. */
.foot-badge { justify-self: end; display: block; }
.foot-badge img { display: block; width: 116px; height: auto; }
/* Tablet / narrow laptop: icons and badge share the first row, imprint spans below. */
@media (max-width: 1199px) {
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-bottom { grid-template-columns: 1fr auto; grid-template-areas: "social badge" "imprint imprint"; row-gap: 18px; }
  .foot-social { grid-area: social; }
  .foot-badge { grid-area: badge; }
  .foot-imprint { grid-area: imprint; }
}

/* ---------- Page hero (marketing sub-pages) ---------- */
.page-hero { text-align: center; padding: 84px 0 40px; }
.section-label { font-size: 12.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal-deep); }
.page-hero h1 { font-size: clamp(38px, 5.5vw, 62px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.03; margin-top: 14px; }
.page-hero .lede { max-width: 640px; margin: 20px auto 0; font-size: 18px; color: var(--ink-soft); }
/* Branded error pages (404.html, errors/*.html): the ways on, then the support line. */
.error-actions { margin-top: 28px; display: flex; gap: 12px 14px; justify-content: center; flex-wrap: wrap; }
.error-help { margin-top: 22px; font-size: 14.5px; color: var(--ink-soft); }
.error-help a { color: var(--teal-text); font-weight: 600; }

/* ---------- Pricing ---------- */
.pricing-section { padding: 20px 0 40px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.pricing-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.pricing-card.is-featured { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.pricing-card-hero { position: relative; padding: 30px 26px 24px; overflow: hidden; }
.pricing-card-hero-mesh { position: absolute; inset: 0; z-index: 0; opacity: 1; }
.mesh-plan-starter { background:
  radial-gradient(130% 120% at 0% 0%, var(--teal-wash), transparent 60%),
  radial-gradient(90% 90% at 100% 6%, rgba(41,160,196,0.09), transparent 60%); }
.mesh-plan-featured { background:
  radial-gradient(135% 140% at 100% 0%, var(--teal-mist), transparent 64%),
  radial-gradient(100% 100% at 0% 100%, var(--teal-wash), transparent 62%); }
.mesh-plan-enterprise { background:
  radial-gradient(130% 120% at 0% 0%, rgba(219,92,52,0.15), transparent 60%),
  radial-gradient(90% 90% at 100% 6%, rgba(219,92,52,0.07), transparent 62%); }
/* faded blueprint grid, tinted with the card's own accent (teal / orange) —
   echoes the homepage textures. Teal + orange render identically in both themes. */
.pricing-card-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .7;
  background-image:
    linear-gradient(rgba(26,122,154,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,122,154,0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(125% 110% at 0% 0%, #000 8%, transparent 72%);
  mask-image: radial-gradient(125% 110% at 0% 0%, #000 8%, transparent 72%);
}
.pricing-card.is-featured .pricing-card-hero::after {
  -webkit-mask-image: radial-gradient(125% 110% at 100% 0%, #000 8%, transparent 72%);
  mask-image: radial-gradient(125% 110% at 100% 0%, #000 8%, transparent 72%);
}
.pricing-card-hero:has(.mesh-plan-enterprise)::after {
  background-image:
    linear-gradient(rgba(219,92,52,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219,92,52,0.16) 1px, transparent 1px);
}
.pricing-card-head { position: relative; z-index: 1; }
.pricing-card-head h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; }
.pricing-desc { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; min-height: calc(2 * 1.55em); }
.pricing-card-body { display: flex; flex-direction: column; gap: 18px; padding: 4px 26px 28px; flex: 1; }
.pricing-amount { display: flex; align-items: baseline; gap: 6px; }
.pricing-amount .value { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; }
.pricing-amount .suffix { font-size: 15px; color: var(--muted); font-weight: 500; }
/* Checkout status line. Matches the .pricing-status class used in pricing.html
   (the old .pricing-card-status name is kept as an alias). Collapses fully when
   empty so the "What's included" divider stays aligned across all three cards. */
.pricing-status, .pricing-card-status { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; min-height: 0; }
.pricing-status:empty, .pricing-card-status:empty { display: none; }
.pricing-card-includes { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.pricing-includes-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pricing-features { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 11px; }
.pricing-features > li { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.pricing-features > li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%231A7A9A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Feature name on its own line above its one-liner (pricing mock v2, 2026-10-06) */
.pricing-features > li > b { display: block; color: var(--ink); font-weight: 600; }

/* Included-credits note under the feature list (same type/colour as features, no bullet) */
.pricing-includes-note { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* Nested capabilities under a feature (e.g. Forge -> Sculpting/PCBs/Mechanical) */

/* Billing period toggle */
.pricing-billing { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 4px 0 34px; }
.billing-switch { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.billing-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--teal); box-shadow: 0 6px 16px rgba(26,122,154,0.26); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.billing-switch[data-active="yearly"] .billing-thumb { transform: translateX(100%); }
.billing-opt { position: relative; z-index: 1; flex: 0 0 auto; min-width: 118px; text-align: center; border: 0; background: transparent; cursor: pointer; padding: 9px 22px; font: inherit; font-weight: 600; font-size: 14.5px; color: var(--ink-soft); border-radius: 999px; transition: color .2s ease; }
.billing-opt.is-active { color: #fff; }
.billing-opt:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .billing-thumb { transition: none; } }
.billing-hint { font-size: 13px; font-weight: 600; color: var(--teal-deep); }

/* "Save X%" badge in the price row (yearly only) */
.pricing-save { margin-left: auto; align-self: center; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: var(--teal-deep); background: var(--teal-wash); border: 1px solid color-mix(in srgb, var(--teal) 32%, transparent); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pricing-save[hidden] { display: none; }

/* Featured "Most popular" badge (absolute so it never shifts card content) */
.pricing-badge { position: absolute; top: 18px; right: 20px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--teal); padding: 5px 11px; border-radius: 999px; box-shadow: 0 6px 16px rgba(26,122,154,0.28); }

/* Footnote */
.pricing-footnote { margin: 26px auto 0; text-align: center; font-size: 13px; color: var(--muted); }
.pricing-credits-note { margin: 8px auto 0; max-width: 640px; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.5; }


/* ---------- Contact / consulting inquiry ---------- */
/* Same panel language as the homepage newsletter CTA, but a calmer background
   (single low-opacity teal glow, no clay) so it reads as a secondary section. */
#contact { scroll-margin-top: calc(var(--nav-h) + 16px); }
.contact-section { padding: 20px 0 64px; }
.contact-panel {
  position: relative; overflow: hidden; text-align: center; margin: 0 auto; max-width: 760px;
  padding: 48px 40px; border-radius: var(--radius-lg);
  background:
    radial-gradient(130% 130% at 6% 0%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 58%),
    var(--raised);
  border: 1px solid var(--line); box-shadow: var(--shadow-card); color: var(--ink);
}
.contact-panel > * { position: relative; }
.contact-panel h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 auto 10px; }
.contact-panel > p { max-width: 520px; margin: 0 auto 24px; color: var(--muted); font-size: 16px; }
.contact-form { display: grid; gap: 12px; max-width: 520px; margin: 0 auto; text-align: left; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--raised-2); color: var(--ink); font: inherit; outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.contact-form textarea { resize: vertical; min-height: 108px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.contact-form .btn { width: 100%; }
/* Visible labels and per-field errors (the inline script in pricing.html fills and links them). */
.contact-row { align-items: start; }
.contact-field { display: grid; gap: 6px; }
.contact-field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.contact-field-error { margin: 0; font-size: 12.5px; color: var(--danger); }
/* Each field keeps one line for its error (the script toggles [hidden]), so an error never
   pushes the form down; the line takes most of the gap to the next field. */
.contact-field-error { line-height: 1.4; min-height: 1.4em; }
.contact-field-error[hidden] { display: block; visibility: hidden; }
.contact-field { margin-bottom: -6px; }
.contact-form [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-wash); }
.contact-fineprint { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.contact-fineprint a { color: inherit; text-decoration: underline; }
/* Shared with the homepage newsletter widget (Turnstile holder + status line). */
.signup-turnstile { display: flex; justify-content: center; margin-top: 2px; }
.signup-turnstile:empty { display: none; }
/* Room for the longest message (one line, two on phones), so a message never moves the page. */
.signup-status { margin: 4px 0 0; font-size: 14px; line-height: 1.45; min-height: 1.45em; text-align: center; }
@media (max-width: 560px) { .signup-status { min-height: 2.9em; } }
.signup-status.is-error { color: var(--danger); }   /* --clay is 3.3:1 as text on the light cards */
.signup-status.is-ok { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) {
  .contact-row { grid-template-columns: 1fr; }
  .contact-panel { padding: 36px 22px; }
}

/* ---------- Auth (login / signup) ---------- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 56px 24px 40px; }
.auth-shell { width: 100%; max-width: 440px; }
.auth-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 34px 32px; }
.auth-card-header { text-align: center; margin-bottom: 26px; }
.auth-card-header h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.auth-card-header p { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }
.auth-form { display: grid; gap: 16px; }
.auth-status { display: none; }
.auth-status.is-visible { display: block; padding: 11px 14px; border-radius: 12px; font-size: 14px; background: var(--danger-wash); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.auth-field { display: grid; gap: 7px; }
.auth-field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input {
  width: 100%; min-height: 48px; padding: 0 15px; border-radius: 12px;
  background: var(--raised-2); border: 1px solid var(--line); color: var(--ink); font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-input.has-toggle { padding-right: 64px; }
.auth-input::placeholder { color: var(--muted); }
.auth-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
.auth-toggle { position: absolute; right: 8px; padding: 6px 10px; border-radius: 8px; background: transparent; border: 0; font-size: 13px; font-weight: 600; color: var(--teal-deep); }
.auth-toggle:hover { background: var(--raised-hover); }
/* The toggle keeps its "Show" label (its name is "Show password"); pressed, it is filled while the password shows. */
.auth-toggle[aria-pressed="true"] { background: var(--teal-wash); }
/* Each field keeps one line for its error, so an error never pushes the form down (no layout
   shift); the line sits in the gap to the next field. Invisible until auth.js adds .is-visible:
   signup's terms error ships its message in the HTML. */
.auth-field-error { font-size: 12.5px; color: var(--danger); line-height: 1.4; min-height: 1.4em; margin-top: -2px; }
.auth-field-error:not(.is-visible) { visibility: hidden; }
.auth-form > .auth-field:has(> .auth-field-error) { margin-bottom: -8px; }
.auth-consents > .auth-field-error { margin: -8px 0 -4px 30px; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.auth-links a { color: var(--teal-deep); font-weight: 600; }
.auth-links a:hover { color: var(--teal-text); }
.auth-linklike {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--teal-deep);
}
.auth-linklike:hover { color: var(--teal-text); }
.auth-hint { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }

/* Social login (Google / Apple). Outlined buttons + an "or" divider. Each is a
   plain top-level link to the account authority's OIDC start route on
   account-api, which 302s to the provider and returns with the session cookie. */
.auth-social { display: grid; gap: 10px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  /* Matches the password-field → Log in gap (form grid 16px + submit margin-top 4px). */
  margin: 20px 0; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--line);
}
.btn-social {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 12px 20px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--raised-2); color: var(--ink);
  font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-social:hover, .btn-social:focus-visible {
  background: var(--raised-hover); border-color: var(--muted); color: var(--ink);
}
.btn-social:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn-social svg { width: 18px; height: 18px; flex: 0 0 auto; }
/* Apple's mark is a solid glyph; tint it to the current text color for dark mode. */
.btn-social-apple svg { fill: currentColor; }
/* [hidden] must beat .btn-social's display:inline-flex so auth.js el.hidden and a static [hidden] actually hide the button. */
.btn-social[hidden] { display: none; }
.auth-consents { display: grid; gap: 12px; }
.auth-consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 13.5px; color: var(--ink-soft); }
.auth-consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--teal); }
.auth-consent a { color: var(--teal-deep); font-weight: 600; }
.auth-footer, .auth-alt { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.auth-footer a, .auth-alt a { color: var(--teal-deep); font-weight: 600; }

/* mockup shortcut — bypass the (non-functional) login to preview the signed-in pages */
.auth-bypass-label { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Dashboard ---------- */
.dash-shell { display: grid; grid-template-columns: 232px 1fr; gap: 34px; width: min(var(--maxw), calc(100% - 48px)); margin: 30px auto 0; align-items: start; }
.dash-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }
.dash-sidebar-heading { font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px; }
.dash-sidebar-nav { display: grid; gap: 3px; }
.dash-sidebar-link { padding: 9px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft); transition: background .14s ease, color .14s ease; }
.dash-sidebar-link:hover { background: var(--raised); color: var(--ink); }
.dash-sidebar-link[aria-current="page"] { background: var(--teal-wash); color: var(--teal-deep); font-weight: 600; }
.dash-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.dash-header h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.dash-header p { margin-top: 8px; color: var(--ink-soft); font-size: 15px; max-width: 560px; }
.dash-panel { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 24px 26px; }
.dash-panel-plain { background: var(--raised); }
.dash-panel-header { margin-bottom: 18px; }
.dash-panel-header h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.dash-panel-header p { margin-top: 6px; font-size: 14px; color: var(--ink-soft); }
.dash-section { }

.dash-rows { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dash-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 14px 18px; background: var(--raised-2); }
.dash-row + .dash-row { border-top: 1px solid var(--line-soft); }
/* display: grid above would override [hidden] (settings.js hides the current-password row of an
   account without a password). */
.dash-row[hidden] { display: none; }
.dash-row-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.dash-row-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-row-control-end { justify-content: flex-end; }
.dash-row-value { font-size: 14.5px; color: var(--ink-soft); }
.dash-row-hint { font-size: 12.5px; color: var(--muted); }
.dash-input, .dash-select {
  min-height: 42px; padding: 0 13px; border-radius: 10px; width: 100%; max-width: 340px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 14.5px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.dash-select { max-width: 220px; appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C818A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.dash-input:focus, .dash-select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
.dash-input::placeholder { color: var(--muted); }
/* Money input with a leading currency symbol (e.g. € / $), joined seamlessly to the field. */
.dash-input-money { display: flex; align-items: stretch; width: 100%; }
.dash-input-money .dash-input-affix { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--raised-2); color: var(--ink-soft); font-size: 14.5px; font-weight: 600; }
.dash-input-money .dash-input { flex: 1; min-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.dash-link { color: var(--teal-text); font-weight: 600; text-decoration: none; }
.dash-link:hover { text-decoration: underline; }
.dash-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: 15px; }
.dash-avatar-lg { width: 48px; height: 48px; font-size: 18px; }

.dash-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.dash-form-actions-billing { justify-content: flex-start; }
.dash-save-status { font-size: 13px; color: var(--muted); margin-right: auto; }

/* toggle switch */
.dash-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.dash-setting-row:last-of-type { border-bottom: 0; }
.dash-setting-copy h3 { font-size: 15px; font-weight: 600; }
.dash-setting-copy p { margin-top: 4px; font-size: 13.5px; color: var(--ink-soft); max-width: 460px; }
.dash-toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.dash-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dash-toggle .track { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .18s ease; }
.dash-toggle .thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform .18s ease; }
.dash-toggle input:checked ~ .track { background: var(--teal); }
.dash-toggle input:checked ~ .thumb { transform: translateX(20px); }
.dash-toggle input:focus-visible ~ .track { box-shadow: 0 0 0 3px var(--teal-wash); }

/* apps / plan */
.dash-plan { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0 18px; flex-wrap: wrap; }
.dash-plan-name { font-size: 16px; font-weight: 600; }
.dash-plan-head .dash-row-label { font-size: 15px; }
/* Tighten the gap under the billing "Current plan" heading so it matches the other
   panels (e.g. Usage → Included usage). .dash-plan is shared with the Apps page, so
   scope this to the billing plan panel only. */
.dash-panel[aria-labelledby="plan-heading"] .dash-plan { padding-top: 0; }
.dash-alert-box { padding: 14px 16px; border-radius: 12px; background: var(--teal-wash); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
/* The [hidden] attribute must win over the display:flex above, or an empty alert box renders. */
.dash-alert-box[hidden] { display: none; }
.dash-alert-message { font-size: 14px; color: var(--teal-ink); }

/* usage / billing */
.dash-usage { display: grid; gap: 12px; }
.dash-usage-head { display: flex; align-items: baseline; justify-content: space-between; }
.dash-usage-value { font-size: 14.5px; font-weight: 600; }
.dash-usage-bar { position: relative; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dash-usage-bar-fill { position: absolute; inset: 0; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); }
.dash-usage-balance { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-balance-line { display: flex; align-items: baseline; gap: 10px; }
.dash-balance { font-size: 14.5px; font-weight: 600; }
.dash-chip { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--raised-2); border: 1px solid var(--line); color: var(--ink-soft); }
.dash-chip.is-topup { background: var(--teal-wash); border-color: transparent; color: var(--teal-deep); }
.dash-pm-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; flex-wrap: wrap; }
.dash-pm-actions { display: flex; align-items: center; gap: 12px; }
.dash-pm-value { font-size: 14px; color: var(--ink-soft); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-field { display: grid; gap: 6px; }
.dash-field.span-2 { grid-column: 1 / -1; }
.dash-field label { font-size: 13.5px; font-weight: 600; }
.dash-label-with-tip { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.dash-tip { position: relative; display: inline-flex; align-items: center; }
.dash-tip-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin: 0; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); line-height: 0; cursor: help;
}
.dash-tip-btn svg { display: block; }
.dash-tip-btn:hover, .dash-tip-btn:focus-visible { color: var(--ink); border-color: var(--ink-soft); }
.dash-tip-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.dash-tip-bubble {
  display: none; position: absolute; z-index: 5; left: 0; bottom: calc(100% + 8px);
  width: max-content; max-width: 280px; padding: 8px 10px; border-radius: 8px;
  background: var(--ink); color: var(--raised); font-size: 12.5px; font-weight: 500;
  line-height: 1.45; text-align: left; white-space: normal;
}
.dash-tip:hover .dash-tip-bubble,
.dash-tip:focus-within .dash-tip-bubble { display: block; }
.dash-field .dash-input, .dash-field .dash-select { max-width: none; }

/* table */
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.dash-empty { text-align: center; color: var(--muted); padding: 20px 0; }

/* sessions */
.dash-sessions-card { display: block; padding: 0; }
.dash-session-head { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 12px; align-items: center; padding: 13px 18px; }
.dash-session-head { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--paper); border-bottom: 1px solid var(--line); }
.dash-session-device { font-weight: 600; color: var(--ink); }
.dash-session-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* danger */
.dash-panel .btn-danger { margin-top: 4px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px;
  background: rgba(6,10,14,0.55); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
}
/* Opening shows it at once (visibility 0s) so the script can move focus into it straight away; closing still fades. */
.modal-overlay.open { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
.modal {
  width: 100%; max-width: 480px; background: var(--raised-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 28px;
  transform: translateY(10px); transition: transform .2s ease;
}
.modal-overlay.open .modal { transform: none; }
.modal-title { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.modal-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.modal-error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.modal-close { position: absolute; top: 14px; right: 16px; background: transparent; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--ink); }

/* ---------- Checkout consent gate (EU pre-checkout) ---------- */
/* Above the cookie banner (z-index 1000), which would otherwise cover the order button on phones. */
.modal-overlay.checkout-consent { z-index: 1002; }
.checkout-consent .checkout-consent-modal { max-width: 480px; max-height: calc(100vh - 48px); overflow-y: auto; position: relative; }
.checkout-summary { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.checkout-summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.checkout-summary-plan { font-weight: 700; color: var(--ink); font-size: 15px; }
.checkout-summary-price { font-weight: 700; color: var(--ink); font-size: 15px; white-space: nowrap; }
.checkout-summary-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.checkout-consent-form { margin-top: 18px; display: grid; gap: 14px; }
.consent-buyer { border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; }
.consent-buyer legend { font-size: 13px; font-weight: 700; color: var(--ink); padding: 0 4px; }
.consent-radio { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.consent-radio input { margin: 0; flex: 0 0 auto; }
.consent-field { display: grid; gap: 6px; }
.consent-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); cursor: pointer; }
.consent-check input { margin: 2px 0 0; flex: 0 0 auto; width: 16px; height: 16px; }
.consent-check a { color: var(--teal-deep); text-decoration: underline; }
/* Inline "please accept" feedback: highlight the box and lift the text so the missing
   step is obvious without relying on colour alone (the error copy sits right below). */
.consent-check.is-invalid input { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 3px; }
.consent-check.is-invalid span { color: var(--ink); }

/* cookie settings rows */

/* ---------- Legal pages ---------- */
.legal { padding: 40px 0 20px; }
.legal-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 44px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--nav-h) + 24px); font-size: 13.5px; }
.legal-toc p { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.legal-toc a { display: block; padding: 6px 0; color: var(--ink-soft); border-left: 2px solid transparent; padding-left: 12px; margin-left: -12px; }
.legal-toc a:hover { color: var(--teal-deep); border-color: var(--teal); }
.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 40px 0 12px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 16px; font-weight: 700; margin: 22px 0 8px; }
.legal-content p, .legal-content li { color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.legal-content p { margin: 10px 0; }
.legal-content ul, .legal-content ol { padding-left: 22px; margin: 10px 0; display: grid; gap: 6px; }
.legal-content a { color: var(--teal-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.legal-meta { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.legal-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 18px 0; }
.legal-table-wrap { overflow-x: auto; margin: 16px 0; }
.legal-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-content th, .legal-content td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.legal-content th { background: var(--raised); font-weight: 700; color: var(--ink); }
.legal-content td { color: var(--ink-soft); line-height: 1.6; }
.legal-content code { font-size: 13px; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
  /* minmax(0, …): a bare 1fr track keeps its content's min-content width, so the one-row
     link strip below used to widen the whole dashboard past a phone (415 px at 375). */
  .dash-shell { grid-template-columns: minmax(0, 1fr); }
  .dash-sidebar { position: static; }
  .dash-sidebar-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
  .dash-sidebar-heading { padding: 0 12px 0 0; }
  .dash-sidebar-link { padding: 11px 12px; }
  .legal-wrap { grid-template-columns: 1fr; }
  .legal-toc { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Collapsed bar shows only brand + hamburger. The toggle expands a full-width
     panel containing the browse links AND the account actions (Log in / Sign up,
     or the account menu when signed in) so everything stays reachable on mobile. */
  .nav-links, .nav-cta { display: none; }
  /* the theme switch stays in the bar, directly left of the hamburger */
  .nav-theme { order: 0; margin-left: auto; margin-right: -10px; padding-left: 0; border-left: 0; }
  .nav-theme + .nav-toggle { margin-left: 0; }
  .nav-wrap.nav-open { background: var(--paper); }
  .nav-wrap.nav-open .nav { flex-wrap: wrap; }
  .nav-wrap.nav-open .nav-links,
  .nav-wrap.nav-open .nav-cta {
    display: flex; flex-direction: column; flex-basis: 100%; width: 100%;
    align-items: stretch; gap: 4px; margin: 0;
  }
  .nav-wrap.nav-open .nav-links { order: 3; padding: 8px 0 0; }
  .nav-wrap.nav-open .nav-cta { order: 4; padding: 10px 0 2px; border-left: 0; border-top: 1px solid var(--line-soft); }
  .nav-wrap.nav-open .nav-links a { padding: 10px 2px; }
  /* Phone menu: the Solutions pages are listed inline under their link, indented, titles only. */
  .nav-drop { display: block; }
  .nav-drop-caret { display: none; }
  .nav-drop-menu, .nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu {
    position: static; width: auto; margin: 0 0 4px; padding: 0 0 0 14px; border: 0; border-left: 1px solid var(--line); border-radius: 0;
    background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav-drop-menu::before { content: none; }
  .nav-wrap.nav-open .nav-links .nav-drop-item { padding: 8px 2px; background: transparent; }
  .nav-drop-item span { display: none; }
  .nav-drop-item b { font-weight: 500; color: var(--ink-soft); }
}
@media (max-width: 560px) {
  .dash-shell { width: calc(100% - 32px); margin-top: 20px; }
  .dash-sidebar-heading { flex-basis: 100%; padding: 0 0 4px; }
  .dash-sidebar-link { flex: 1 1 auto; padding: 11px 8px; text-align: center; }
  .dash-panel { padding: 20px 18px; }
  /* paired fields (Recharge threshold / target): a label that wraps must not push its input out of line */
  .dash-grid > .dash-field { align-content: end; }
  /* Invoices: five columns cannot fit a phone, so each row stacks into label/value lines
     (labels come from data-label, set in assets/dashboard/billing.js). */
  .dash-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dash-table, .dash-table tbody, .dash-table tr, .dash-table td { display: block; }
  .dash-table tr { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
  .dash-table tr:last-child { border-bottom: 0; }
  .dash-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 0; }
  .dash-table td[data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .dash-table td:not([data-label]) { display: block; }
  .dash-row { grid-template-columns: 1fr; gap: 8px; }
  .dash-setting-row { align-items: flex-start; }
  .foot-grid { grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 28px 20px; padding-bottom: 36px; }
  .foot-col-wide { grid-column: 1 / -1; }
  .foot-bottom { grid-template-columns: 1fr; grid-template-areas: "social" "imprint" "badge"; justify-items: center; gap: 18px; }
  .foot-social, .foot-badge { justify-self: center; }
  .foot-social { justify-content: center; }
}

/* ---------- Phone compliance (owner 2026-10-02) ----------
   Phone-only rules: nothing here applies above 560 px, so the laptop/desktop site
   is byte-for-byte the same design. On a 390 px phone the collapsed bar used to be
   brand (40 px mark + 22.5 px wordmark) + 22 px gap + 40 px hamburger
   inside a 48 px-padded shell = ~410 px, which pushed the hamburger 37 px past the
   edge and let the whole page scroll sideways (the root's overflow-x: clip does not
   stop a phone's layout viewport from growing with the content). The brand now
   shrinks to fit and the shell gutters tighten, so nothing exceeds the viewport. */
@media (max-width: 560px) {
  .shell { width: min(var(--maxw), calc(100% - 32px)); }
  .nav { gap: 12px; min-width: 0; }
  .brand { gap: 9px; min-width: 0; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 19px; }
  .nav-toggle { flex: 0 0 auto; padding: 8px 6px; }
  .nav-theme { flex: 0 0 auto; margin-right: -6px; }
  .nav-theme-btn { padding: 8px 6px; }
  .nav-wrap.nav-open .nav-cta .btn { width: 100%; }
  .nav-wrap.nav-open .acct { align-self: stretch; }
  .nav-wrap.nav-open .acct-menu { position: static; width: 100%; margin-top: 8px; }
  /* Legal pages: the cookie table's intrinsic width used to widen the whole column
     past the phone; the column now stays in the viewport and the table scrolls. */
  .legal-wrap > * { min-width: 0; }
  .legal-content { max-width: 100%; }
  .legal-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---------- Touch targets (2026-11-13) ----------
   Aim: 44 x 44 px, never under 24 px (WCAG 2.2 AA). Where a bigger box would change the
   design, an invisible hit area (padding + equal negative margin, or a pseudo-element) does
   the work, so the desktop layout looks exactly as before. */
/* Dashboard "i" buttons: the 16 px glyph stays; a 44 x 32 px hit area (taller would reach the select below). */
.dash-tip-btn { position: relative; }
.dash-tip-btn::after { content: ""; position: absolute; inset: -8px -14px; }
/* Auth pages: text links and link-styled buttons get a 42 px tall hit area without moving. */
/* (no display change here: it would override the [hidden] attribute on the alternate link button) */
.auth-links a, .auth-linklike { padding: 10px 0; margin: -10px 0; }
.auth-footer a, .auth-alt a, .auth-consent a { padding: 6px 0; }
.auth-consent input { width: 20px; height: 20px; margin-top: 1px; }
/* Checkout consent (pricing): bigger boxes, full-height rows, padded links in the statement. */
.consent-radio { min-height: 40px; }
.consent-radio input, .consent-check input { width: 20px; height: 20px; }
.consent-check input { margin-top: 0; }
.consent-check a { padding: 5px 0; }
/* The checkout dialog's message slot (pricing.html): the note and the error share one grid
   cell, so an error takes the note's place under the order button without resizing the dialog.
   The cell keeps room for the longest message: three lines, four on phones. */
.checkout-feedback { display: grid; margin-top: 16px; min-height: calc(3 * 1.5 * 13px); }
@media (max-width: 480px) { .checkout-feedback { min-height: calc(4 * 1.5 * 13px); } }
.checkout-feedback > * { grid-area: 1 / 1; margin: 0; line-height: 1.5; }
.checkout-feedback.has-error > .modal-note,
.checkout-feedback:not(.has-error) > .checkout-error { visibility: hidden; }
.checkout-error a { color: inherit; font-weight: 700; text-decoration: underline; }
/* Footer on phones and touch screens: each link is a 44 px row instead of a 16 px line. */
@media (max-width: 560px), (pointer: coarse) {
  .foot-col-title { margin-bottom: 4px; }
  .foot-col li + li { margin-top: 0; }
  .foot-col a, .foot-link-btn { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-social { gap: 0; }
  .foot-social a { width: 44px; height: 44px; }
}

/* The phone "try it on a laptop" notice (assets/header.js, AwPhoneNotice): a bottom
   sheet raised by the app-launch CTAs on phone-class devices only. */
/* z-index: above the cookie banner (1000), which shares the bottom of a phone screen with this sheet. */
.aw-phone-notice { position: fixed; inset: 0; z-index: 1002; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.aw-phone-notice[hidden] { display: none; }
.aw-phone-notice-backdrop { position: absolute; inset: 0; background: rgba(12, 24, 32, 0.42); opacity: 0; transition: opacity .22s ease; }
.aw-phone-notice-card {
  position: relative; width: min(100%, 460px); padding: 22px 22px 20px; border-radius: 22px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(16, 30, 40, 0.28);
  transform: translateY(24px); opacity: 0; transition: transform .26s cubic-bezier(.2,.7,.2,1), opacity .22s ease;
}
.aw-phone-notice.is-open .aw-phone-notice-backdrop { opacity: 1; }
.aw-phone-notice.is-open .aw-phone-notice-card { transform: none; opacity: 1; }
.aw-phone-notice-kicker { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep, var(--teal)); }
.aw-phone-notice-title { margin: 0 0 10px; font-size: 21px; line-height: 1.18; letter-spacing: -0.02em; }
.aw-phone-notice-body { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.aw-phone-notice-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 18px; }
.aw-phone-notice-link { text-align: center; font-size: 14.5px; font-weight: 600; color: var(--teal-text); padding: 8px; }
html.aw-phone-notice-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .aw-phone-notice-backdrop, .aw-phone-notice-card { transition: none; }
}

/* reduce initial-load flash of unstyled nav */
[data-nav]:empty { min-height: var(--nav-h); }

/* ==========================================================================
   Live-stack integration (worker-injected nav/footer + session.js/header.js/
   auth.js/assets/dashboard/*.js). Added when the mockup design became the
   live site so the new UI wires to the account backend.
   ========================================================================== */

/* Account menu is toggled by header.js via `.is-open` on [data-account-menu]. */
.acct-menu.is-open { opacity: 1; visibility: visible; transform: none; }

/* Prerelease "Soon" lock decoration (applyNavLock, production only). */
.nav-soon { opacity: .55; cursor: default; }
.nav-soon-badge { margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-deep); background: var(--teal-wash); padding: 2px 7px; border-radius: 999px; }

/* Nav auth-state gating. Pre-paint: the worker's AUTH_HINT_SCRIPT adds
   `aw-authed` to <html> from the readable aw_auth_hint cookie; session.js
   reconciles afterward. Guests see "Sign up" and, to its right, "Log in"
   (owner 2026-11-23); authed users see the account menu instead. */
.acct { display: none; }
html.aw-authed .acct { display: block; }
html.aw-authed .nav-guest,
html.aw-authed .nav-cta .nav-guest { display: none; }

/* Authed-only CTA (nav "Open app" button). Hidden by default so guests never see
   it; revealed once `aw-authed` is set pre-paint/by session.js. */
.nav-member { display: none; }
html.aw-authed .nav-member { display: inline-flex; }

/* Paying members only (owner 2026-11-23: "open app is removed from the website for
   users that have signed up and not paid"): every [data-paid-only] element (the nav's
   and the account menu's "Open app", the Apps page's launch link) stays hidden until
   session.js reads an active or grace subscription from /api/account/billing and sets
   `aw-paid` on <html>. Signed out, signed up without a plan, or not yet known: hidden. */
html:not(.aw-paid) [data-paid-only] { display: none !important; }

/* Signed in, the bar carries "Open app" and the account chip on top of the five links, which
   needs ~1060 px: between 901 and 1100 px "Open app" wrapped and the bar overflowed (63 px at
   920). Guests carry "Sign up" and "Log in" (owner 2026-11-23), which need 984 px: at 901 px
   the bar ran 83 px past its edge and the page scrolled sideways. Every visitor therefore gets
   the hamburger menu up to 1100 px: the same rules as the (max-width: 900px) block in
   "Responsive". */
.nav-cta .btn { white-space: nowrap; }
/* A long first name must not push the bar past 1101 px either (~85 px spare there). */
.acct-email { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1100px) {
  html .nav-toggle { display: inline-flex; }
  html .nav-links, html .nav-cta { display: none; }
  html .nav-theme { order: 0; margin-left: auto; margin-right: -10px; padding-left: 0; border-left: 0; }
  html .nav-theme + .nav-toggle { margin-left: 0; }
  html .nav-wrap.nav-open { background: var(--paper); }
  html .nav-wrap.nav-open .nav { flex-wrap: wrap; }
  html .nav-wrap.nav-open .nav-links,
  html .nav-wrap.nav-open .nav-cta {
    display: flex; flex-direction: column; flex-basis: 100%; width: 100%;
    align-items: stretch; gap: 4px; margin: 0;
  }
  html .nav-wrap.nav-open .nav-links { order: 3; padding: 8px 0 0; }
  html .nav-wrap.nav-open .nav-cta { order: 4; padding: 10px 0 2px; border-left: 0; border-top: 1px solid var(--line-soft); }
  html .nav-wrap.nav-open .nav-links a { padding: 10px 2px; }
  html .nav-drop { display: block; }
  html .nav-drop-caret { display: none; }
  html .nav-drop-menu, html .nav-drop:hover .nav-drop-menu, html .nav-drop:focus-within .nav-drop-menu {
    position: static; width: auto; margin: 0 0 4px; padding: 0 0 0 14px; border: 0; border-left: 1px solid var(--line); border-radius: 0;
    background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  html .nav-drop-menu::before { content: none; }
  html .nav-wrap.nav-open .nav-links .nav-drop-item { padding: 8px 2px; background: transparent; }
  html .nav-drop-item span { display: none; }
  html .nav-drop-item b { font-weight: 500; color: var(--ink-soft); }
}

/* Auth form status + field errors (auth.js toggles these classes). */
.auth-status.is-error {
  display: block; padding: 11px 14px; border-radius: 12px; font-size: 14px;
  background: var(--danger-wash); color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
}
.auth-status.is-success {
  display: block; padding: 11px 14px; border-radius: 12px; font-size: 14px;
  background: var(--ok-wash); color: var(--ok-text);
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
}
/* A link in a status (verify-email's "already confirmed" names the dashboard) keeps the status
   colour; links are undecorated site-wide, so underline it to read as one. */
.auth-status a { font-weight: 600; text-decoration: underline; }
/* A form-page message that appears after the page is drawn (auth.js setStatus) takes the place of
   the card heading instead of pushing the form down. The heading fades out (opacity, so screen
   readers still find it) and the message, opaque, sits over it. */
.auth-card { position: relative; }
.auth-status.is-floating { position: absolute; top: 28px; left: 24px; right: 24px; z-index: 2; box-shadow: var(--shadow-pop); }
.auth-card:has(.auth-status.is-floating) .auth-card-header { opacity: 0; }
.auth-status.is-floating.is-error { background: linear-gradient(var(--danger-wash), var(--danger-wash)), var(--raised); }
.auth-status.is-floating.is-success { background: linear-gradient(var(--ok-wash), var(--ok-wash)), var(--raised); }
/* verify-email and confirm-email-change: the status is the page's content and changes as the
   link is checked, so its box keeps room for the longest message from the start. */
.auth-status[data-status-reserved] { display: flex; align-items: center; min-height: calc(3 * 1.5em + 24px); font-size: 14px; line-height: 1.5; }
/* A long address in a status ("You're signed in as …") wraps instead of widening the card. */
.auth-status { overflow-wrap: anywhere; }
.auth-status[data-status-reserved]:not(.is-error):not(.is-success) { visibility: hidden; }
@media (max-width: 480px) { .auth-status[data-status-reserved] { min-height: calc(5 * 1.5em + 24px); } }
.auth-input.input-error { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-wash); }
.auth-field-error.is-visible { display: block; }
.auth-consent .checkbox-error { color: var(--danger); }
/* The [hidden] attribute must beat the author display rules above (.auth-field and
   .auth-consents are display:grid, .auth-links is display:flex), or hidden auth
   blocks — the login password reveal, the signup "sent" state — still render. */
.auth-field[hidden],
.auth-consents[hidden],
.auth-links[hidden] { display: none; }
/* verify-email and confirm-email-change wrap their button and links (confirm-email-change also
   its account hint) in one block that auth.js hides; the wrapper takes them out of .auth-form's
   grid, so it repeats the form's 16px gap. */
[data-verify-actions] { display: grid; gap: 16px; }
[data-verify-actions][hidden] { display: none; }
[data-email-change-actions] { display: grid; gap: 16px; }
[data-email-change-actions][hidden] { display: none; }
/* checkout/success.html: assets/checkout-success.mjs shows "Open EngineeringOS" and "Sign in"
   by clearing [hidden], which has to beat .btn's display:inline-flex to hide them at all. */
[data-checkout-actions] .btn[hidden] { display: none; }
/* checkout/success.html: the heading and message change as the payment is confirmed. They keep
   room for the longest state, so the buttons below never jump. */
.checkout-result h1 { min-height: calc(2 * 1.03em); }
.checkout-result [data-success-message] { min-height: calc(3 * 1.6em); line-height: 1.6; }
@media (max-width: 560px) {
  .checkout-result h1 { min-height: calc(3 * 1.03em); }
  .checkout-result [data-success-message] { min-height: calc(5 * 1.6em); }
}

/* ---------- Dashboard extras (live assets/dashboard/*.js output) ---------- */
.dash-save-status.is-visible { color: var(--ink-soft); }
.dash-password-error { color: var(--danger); }
/* Keeps its line while empty (settings.js toggles [hidden]), so an error does not push the form down. */
.dash-password-error { min-height: 1.5em; }
.dash-password-error[hidden] { display: block; visibility: hidden; }
.dash-password-submit { align-self: center; }
/* The welcome page's steps after the terms (dashboard/welcome.html, MR A3b). */
.dash-welcome-after { display: grid; gap: 22px; }
.dash-welcome-after[hidden] { display: none; }
.dash-welcome-after a.btn-save { display: inline-flex; align-items: center; }
.dash-setting-control { flex: 0 0 auto; }
.dash-theme-select { max-width: 200px; }
.dash-session-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 12px; align-items: center; padding: 13px 18px; background: var(--raised-2); border-top: 1px solid var(--line-soft); font-size: 14px; }
.dash-session-device { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.dash-session-icon { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.dash-session-created { color: var(--ink-soft); }
.dash-session-revoke { min-height: 34px; padding: 0 14px; }
.dash-session-empty, .dash-session-loading, .dash-session-error { padding: 16px 18px; color: var(--muted); font-size: 14px; background: var(--raised-2); }
.dash-session-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--raised-2); border-top: 1px solid var(--line); }
.dash-session-range { font-size: 13px; color: var(--muted); }
.dash-session-pager { display: flex; align-items: center; gap: 10px; }
.dash-session-page { font-size: 13px; color: var(--ink-soft); }
.dash-pager-btn { min-height: 34px; padding: 0 12px; }

/* Delete-account modal (assets/dashboard/settings.js toggles the [hidden] attribute) */
.dash-modal-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: var(--overlay-scrim); backdrop-filter: blur(4px); }
.dash-modal-overlay[hidden] { display: none; }
.dash-modal { width: 100%; max-width: 480px; background: var(--raised-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 28px; }
.dash-modal-title { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.dash-modal-body { margin-top: 12px; font-size: 14.5px; color: var(--ink-soft); }
.dash-modal-body ul { padding-left: 20px; display: grid; gap: 6px; margin: 12px 0; }
.dash-modal-body strong { color: var(--ink); }
.dash-modal-form { margin-top: 16px; display: grid; gap: 10px; }
.dash-modal-form .dash-row-label { font-weight: 600; }
.dash-modal-error { color: var(--danger); font-size: 13px; }
.dash-modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.dash-modal-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); }

/* ---------- Product Library hero (library.html; its sections have their own stylesheets) */
.lib-hero { padding: 54px 0 6px; }
.lib-hero .display { font-weight: 800; letter-spacing: -0.022em; line-height: 1.04; font-size: clamp(34px, 4.6vw, 60px); margin-top: 14px; }
.lib-lead { max-width: 720px; margin-top: 16px; color: var(--ink-soft); font-size: 19px; line-height: 1.55; }
/* Phones (owner 2026-11-09: "improve the phone use further"): a compact hero so the first cards are on the first
   screen, and the category tabs fade at the edge so it is clear they scroll sideways. */
@media (max-width: 560px) {
  .lib-hero { padding: 26px 0 0; }
  .lib-hero .display { font-size: clamp(28px, 8.4vw, 34px); margin-top: 10px; }
  .lib-lead { margin-top: 10px; font-size: 15px; line-height: 1.5; }
  .library-category-tabs { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); scroll-snap-type: x proximity; }
  .library-category-tabs button { scroll-snap-align: start; }
}

/* ==========================================================================
   WORLD LANGUAGE (2026-10-11) — the landing's "factory of autonomy" carried to every page.
   One system site-wide: the brand drafting grid (teal at the heart, clay towards the rim) as the
   page ground, headings in the brand display face, mono drafting labels, machined radii, and
   cross-page view transitions so moving between pages feels like moving through one place.
   The landing (html.lp) draws its own 3D floor and opts out of the CSS grid ground.
   ========================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
.nav-wrap { view-transition-name: site-nav; }
.site-footer { view-transition-name: site-footer; }
:root {
  --teal-bright: #2391B5;              /* brand Teal Bright (was #29A0C4) */
  --muted: #64635F;                    /* 4.95:1 on paper (was #7C818A, 3.22:1) */
  --teal-text: #146B88;                /* teal for TEXT only (brand Teal #1A7A9A, a step deeper): 4.58:1 on paper-deep, 4.95 paper, 5.43 raised, 5.76 raised-2 */
  --danger-fill: #C0402A;              /* danger button fill in both themes: white text 5.2:1 */
  --ok-text: #247237;                  /* success TEXT (--ok #2F8F46 stays for dots and fills): 4.6:1+ on paper-deep and --ok-wash */
  --font-display: "Century Gothic", "URW Gothic", "TeX Gyre Adventor", "Futura", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-sm: 4px;
  --grid-teal: rgba(26, 122, 154, .075);
  --grid-clay: rgba(219, 92, 52, .085);
}
html:not(.lp) body {
  background:
    linear-gradient(var(--grid-teal) 1px, transparent 1px) 0 0 / 40px 40px fixed,
    linear-gradient(90deg, var(--grid-teal) 1px, transparent 1px) 0 0 / 40px 40px fixed,
    linear-gradient(var(--grid-clay) 1px, transparent 1px) 0 0 / 200px 200px fixed,
    linear-gradient(90deg, var(--grid-clay) 1px, transparent 1px) 0 0 / 200px 200px fixed,
    var(--paper);
}
.page-hero h1, .lib-hero .display, html .post-top h1.display, html .hub-intro h1.display, .auth-card h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
}
.section-label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--teal-deep); }
.section-label::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--teal-bright); }
.page-hero { position: relative; }
/* machined plates with drafting corner marks on the key panels */
.pricing-card, .auth-card, .legal-content, .faq-item { position: relative; }
.pricing-card.is-featured::before, .auth-card::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 20px; height: 20px; pointer-events: none;
  border-left: 2px solid var(--teal-bright); border-top: 2px solid var(--teal-bright); border-radius: var(--radius) 0 0 0;
}
.pricing-card.is-featured::after, .auth-card::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 20px; height: 20px; pointer-events: none;
  border-right: 2px solid var(--clay); border-bottom: 2px solid var(--clay); border-radius: 0 0 var(--radius) 0;
}
.site-footer { border-top: 1px solid var(--line); box-shadow: inset 0 2px 0 -1px rgba(35, 145, 181, .35); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
/* Dark counterparts from the brand guidelines: Charcoal #131314 ground, White text, Teal Bright #2391B5 for
   accents on dark (the teal fill stays #1A7A9A so white button text keeps AA), Clay unchanged. */
:root[data-theme="dark"] {
  --ink: #FFFFFF;
  --ink-soft: #B4B6BA;
  --muted: #93959A;                    /* 4.65:1 on raised-hover, 5.43 on raised (was #8E9095, 4.37 on raised-hover) */
  --teal-text: #33A0C4;                /* teal for TEXT on dark (Teal Bright #2391B5, a step lighter): 5.01:1 on raised-2, 5.40 raised, 6.16 paper */
  --teal-deep: var(--teal-text);
  --teal-bright: #2391B5;
  --cookie-primary-hover-bg: #146B88;  /* the fill keeps white text at AA (was --teal-deep) */
  --ok-text: var(--ok);
  --grid-teal: rgba(35, 145, 181, .09);
  --grid-clay: rgba(219, 92, 52, .075);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #FFFFFF;
    --ink-soft: #B4B6BA;
    --muted: #93959A;
    --teal-text: #33A0C4;
    --teal-deep: var(--teal-text);
    --teal-bright: #2391B5;
    --cookie-primary-hover-bg: #146B88;
    --ok-text: var(--ok);
    --grid-teal: rgba(35, 145, 181, .09);
    --grid-clay: rgba(219, 92, 52, .075);
  }
}

/* Dark-mode accent text (MR !231 review 2026-10-18, Brand Basics: Teal #1A7A9A is the fill — white text on it keeps
   AA — and Teal Bright #2391B5 is the teal for dark backgrounds): every teal TEXT accent on dark is --teal-text, Teal
   Bright a step lighter, with each element's own decoration (contrast pass 2026-11-13: at least 5:1 on the Charcoal
   ground and on the raised cards and inputs). Light mode uses --teal-text, Teal a step deeper. */
:root[data-theme="dark"] :is(.nav-links a:hover, .nav-links a.is-active, .section-label, .backlink, .prose a.link, .faq-a a, .faq-help a, .hub-card .read, .auth-links a, .auth-alt a, .auth-footer a, .auth-consent a, .auth-linklike, .auth-toggle, .cookie-consent-copy a, .cookie-consent-copy a:visited, .pricing-tag, .nav-theme-menu button[aria-checked="true"]) { color: var(--teal-text); }
:root[data-theme="dark"] :is(.foot-col a:hover, .foot-link-btn:hover, .foot-social a:hover) { color: var(--teal-text); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.nav-links a:hover, .nav-links a.is-active, .section-label, .backlink, .prose a.link, .faq-a a, .faq-help a, .hub-card .read, .auth-links a, .auth-alt a, .auth-footer a, .auth-consent a, .auth-linklike, .auth-toggle, .cookie-consent-copy a, .cookie-consent-copy a:visited, .pricing-tag, .nav-theme-menu button[aria-checked="true"]) { color: var(--teal-text); }
  :root:not([data-theme="light"]) :is(.foot-col a:hover, .foot-link-btn:hover, .foot-social a:hover) { color: var(--teal-text); }
}
