/* Generated from apps/web/src/styles.css by scripts/build-platform-brand.mjs: do not edit (docs/design.md). */
/* Portal — South Engineering brand: blue #0094DA, navy #272C6B. Light by default, dark follows the OS.
   Accessibility (WCAG 2.1 AA): text and controls use darker shades of the brand blue so that contrast is at
   least 4.5:1 (#0094DA on white is only 3.4:1); the original blue stays in the logo and decorations. */

:root {
  --brand: #006fa8;
  --brand-strong: #005f8f;
  /* Text on brand-coloured backgrounds. */
  --on-brand: #ffffff;
  --brand-logo: #0094da;
  --focus: #1d4ed8;
  --navy: #272c6b;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #e3e8f0;
  /* 1.4.11 Non-text contrast: the edge of a field (input, select, search box) is at least 3:1 on every surface. */
  --field-line: #7c859f;
  --text: #141a33;
  --muted: #5d6784;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --danger: #c02639;
  --danger-bg: #fde4e7;
  --info: #0369a1;
  --info-bg: #e0f2fe;
  --shadow: 0 1px 2px rgba(20, 26, 51, 0.06), 0 4px 16px rgba(20, 26, 51, 0.05);
  --radius: var(--r-lg);
  /* People tables: every other row, and the row under the pointer or the keyboard focus (text stays AA on both). */
  --row-alt: color-mix(in srgb, var(--brand) 5%, var(--surface));
  --row-hover: color-mix(in srgb, var(--brand) 7%, var(--surface));
  /* Solid status colours behind text in --on-solid (≥ 4.5:1 in both themes: they don't change with the theme). */
  --ok-solid: #15803d;
  --warn-solid: #b45309;
  --danger-solid: #c02639;
  --info-solid: #0369a1;
  --on-solid: #ffffff;
  /* Brand tints (backgrounds only: text on them stays --text or --brand). */
  --brand-tint: color-mix(in srgb, var(--brand) 10%, var(--surface));
  --brand-soft: color-mix(in srgb, var(--brand) 16%, var(--surface));
  /* The drafting grid (page headers, empty-state drawings): hairlines in the accent, minor every 16 px, major every 80. */
  --grid-minor: color-mix(in srgb, var(--brand) 6%, transparent);
  --grid-major: color-mix(in srgb, var(--brand) 11%, transparent);
  /* The secondary (navy) colour as text: readable on the page in both themes. */
  --navy-text: var(--navy);
  /* Categorical colours (event kinds, leave types, quick actions, chart series): AA as text on the page. */
  --cat-violet: #6d28d9;
  --cat-pink: #be185d;
  --cat-amber: #b45309;
  --cat-green: #15803d;
  --cat-teal: #0f766e;
  --cat-sky: #0369a1;
  --cat-slate: #64748b;
  --cat-lime: #4d7c0f;
  /* Data palette (charts, docs/design.md "Data"): five series colours in a fixed order, checked for colour-blind
     separation and >= 4:1 on the page and on cards; "other" collects what does not fit. Marks only, never text. */
  --data-1: #2a6fd0;
  --data-2: #c9561b;
  --data-3: #0f8a62;
  --data-4: #7a4fd0;
  --data-5: #c13b78;
  --data-other: var(--field-line);
  /* Decorations only (never text): ratings, TV and announcement gradients. */
  --rating: #f5b301;
  --accent-warm: #f7b955;
  --accent-rose: #f06f9c;
  --accent-violet: #8a6cf0;
  /* Home hero: a band from the secondary to the brand colour, white text on it. */
  --on-hero: #ffffff;
  --hero-1: var(--navy);
  --hero-2: color-mix(in srgb, var(--navy) 50%, var(--brand));
  --hero-3: var(--brand);
  /* TV, ticker and announcement previews: always the dark TV look. */
  --tv-bg: #050912;
  --tv-text: #f3f6fb;
  --tv-muted: #aab5c6;
  /* Paper: printed sheets, labels and logo previews keep white paper whatever the theme. */
  --paper: #ffffff;
  --paper-ink: #141a33;
  --paper-muted: #5d6784;
  --paper-line: #e3e8f0;
  --paper-rule: #94a3b8;
  --paper-band: #f1f5f9;
  --paper-dark: #141a2e;
  --paper-dark-muted: #c7cde0;
  /* Overlays and the shade at the edge of a scrolling strip. */
  --scrim: rgba(10, 14, 30, 0.45);
  --scroll-shade: rgba(10, 20, 40, 0.14);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="contrast"]) {
    --brand: #22a9ec;
    --brand-strong: #52bff5;
    --on-brand: #0b1020;
    --focus: #93c5fd;
    --bg: #0b1020;
    --surface: #141a2e;
    --surface-2: #1a2139;
    --line: #262f4b;
    --field-line: #6b7798;
    --text: #e9edf7;
    --muted: #9aa5c2;
    --ok: #4ade80;
    --ok-bg: rgba(34, 197, 94, 0.15);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, 0.14);
    --danger: #fb7185;
    --danger-bg: rgba(244, 63, 94, 0.15);
    --info: #7dd3fc;
    --info-bg: rgba(56, 189, 248, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --row-alt: color-mix(in srgb, var(--brand) 7%, var(--surface));
    --row-hover: color-mix(in srgb, var(--brand) 14%, var(--surface));
    --navy-text: #a5b4fc;
    --cat-violet: #c4b5fd;
    --cat-pink: #f9a8d4;
    --cat-amber: #fbbf24;
    --cat-green: #4ade80;
    --cat-teal: #5eead4;
    --cat-sky: #7dd3fc;
    --cat-slate: #94a3b8;
    --cat-lime: #a3e635;
    --data-1: #4b8fe8;
    --data-2: #e06a2c;
    --data-3: #1f9e72;
    --data-4: #9180ec;
    --data-5: #e0619a;
    --hero-1: color-mix(in srgb, var(--navy) 75%, #000000);
    --hero-2: color-mix(in srgb, var(--navy) 55%, var(--brand-logo));
    --hero-3: color-mix(in srgb, var(--brand-logo) 55%, #000000);
    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --sh-3: 0 12px 40px rgba(0, 0, 0, 0.45);
    --sh-up: 0 -4px 20px rgba(0, 0, 0, 0.3);
    --scroll-shade: rgba(0, 0, 0, 0.4);
    --shadow-ink: #000000;
    color-scheme: dark;
  }
}
  :root[data-theme="dark"] {
    --brand: #22a9ec;
    --brand-strong: #52bff5;
    --on-brand: #0b1020;
    --focus: #93c5fd;
    --bg: #0b1020;
    --surface: #141a2e;
    --surface-2: #1a2139;
    --line: #262f4b;
    --field-line: #6b7798;
    --text: #e9edf7;
    --muted: #9aa5c2;
    --ok: #4ade80;
    --ok-bg: rgba(34, 197, 94, 0.15);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, 0.14);
    --danger: #fb7185;
    --danger-bg: rgba(244, 63, 94, 0.15);
    --info: #7dd3fc;
    --info-bg: rgba(56, 189, 248, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --row-alt: color-mix(in srgb, var(--brand) 7%, var(--surface));
    --row-hover: color-mix(in srgb, var(--brand) 14%, var(--surface));
    --navy-text: #a5b4fc;
    --cat-violet: #c4b5fd;
    --cat-pink: #f9a8d4;
    --cat-amber: #fbbf24;
    --cat-green: #4ade80;
    --cat-teal: #5eead4;
    --cat-sky: #7dd3fc;
    --cat-slate: #94a3b8;
    --cat-lime: #a3e635;
    --data-1: #4b8fe8;
    --data-2: #e06a2c;
    --data-3: #1f9e72;
    --data-4: #9180ec;
    --data-5: #e0619a;
    --hero-1: color-mix(in srgb, var(--navy) 75%, #000000);
    --hero-2: color-mix(in srgb, var(--navy) 55%, var(--brand-logo));
    --hero-3: color-mix(in srgb, var(--brand-logo) 55%, #000000);
    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --sh-3: 0 12px 40px rgba(0, 0, 0, 0.45);
    --sh-up: 0 -4px 20px rgba(0, 0, 0, 0.3);
    --scroll-shade: rgba(0, 0, 0, 0.4);
    --shadow-ink: #000000;
    color-scheme: dark;
  }

/* ---------- Foundations: scales and personal preferences ----------
   Breakpoints in use: 480 (phone), 768 (tablet), 1024 (small laptop), 1280 (desktop).
   Personal preferences (Profilo → Accessibilità e aspetto) are attributes on <html>:
   data-theme (auto | light | dark | contrast), data-text (m | l | xl), data-font (default | readable),
   data-motion (auto | reduce). Text is in rem, so it also follows the browser's own font size. */
:root {
  --fs-2xs: 0.6875rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-ms: 0.875rem;
  --fs-md: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.0625rem;
  --fs-lead: 1.125rem;
  --fs-h4: 1.25rem;
  --fs-xl: 1.375rem;
  --fs-h3: 1.5rem;
  --fs-2xl: 1.75rem;
  --fs-h1: 2rem;
  --fs-3xl: 2.75rem;
  --fs-display: 3.5rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-heavy: 800;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 48px;
  /* One content width for every page (wider screens centre it), so no page sits in half the screen and no page is
     narrower than the next: tables, charts and the Home use a large screen, while 1600px keeps a row readable in one
     sweep of the eye. Fields stop at --field-max, they do not stretch to the measure. */
  --content-max: 1600px;
  /* A field never stretches across the wide measure: a title or a number 1500px wide reads as a bar, not a box. */
  --field-max: 48rem;
  /* The Configurazione sections' column, beside the page (SettingsShell). */
  --settings-rail: 14.5rem;
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(20, 26, 51, 0.06);
  --sh-2: var(--shadow);
  --sh-3: 0 12px 40px rgba(20, 26, 51, 0.16);
  --sh-up: 0 -4px 20px rgba(20, 26, 51, 0.08);
  /* Ink of the remaining hand-tuned shadows (mixed with transparency). */
  --shadow-ink: #141a33;
  --sh-brand: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent);
  --z-sticky: 10;
  --z-overlay: 50;
  --z-toast: 100;
  /* Interface motion stays within 200 ms; --dur-reveal only for decorative reveals (charts, rings). */
  --dur-fast: 0.12s;
  --dur-base: 0.18s;
  --dur-slow: 0.2s;
  --dur-reveal: 0.6s;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Inter Variable', system-ui, sans-serif;
  --tap: 32px;
}
@media (pointer: coarse) {
  :root {
    --tap: 44px;
  }
}
:root[data-text='l'] {
  font-size: 112.5%;
}
:root[data-text='xl'] {
  font-size: 125%;
}
:root[data-font='readable'] {
  --font: 'Atkinson Hyperlegible', 'Verdana', system-ui, sans-serif;
}
:root[data-font='readable'] body {
  letter-spacing: 0.02em;
  word-spacing: 0.06em;
  line-height: 1.65;
}

/* High contrast: black on white, strong borders, underlined links. */
:root[data-theme='contrast'] {
  --brand: #003f73;
  --brand-strong: #00264d;
  --on-brand: #ffffff;
  --brand-logo: #003f73;
  --focus: #b30000;
  --navy: #000000;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --line: #1a1a1a;
  --field-line: #1a1a1a;
  --text: #000000;
  --muted: #262626;
  --row-alt: #ebebeb;
  --row-hover: #dadada;
  --ok: #0a5c25;
  --ok-bg: #ffffff;
  --warn: #6b3200;
  --warn-bg: #ffffff;
  --danger: #8c0016;
  --danger-bg: #ffffff;
  --info: #00395c;
  --info-bg: #ffffff;
  --shadow: none;
  --sh-1: none;
  --sh-3: none;
  --sh-up: none;
  --sh-brand: none;
  --navy-text: #000000;
  --cat-violet: #4c1d95;
  --cat-pink: #831843;
  --cat-amber: #6b3200;
  --cat-green: #0a5c25;
  --cat-teal: #134e4a;
  --cat-sky: #00395c;
  --cat-slate: #262626;
  --cat-lime: #365314;
  --data-1: #0b4fa8;
  --data-2: #9a3a05;
  --data-3: #00704f;
  --data-4: #5b2fb0;
  --data-5: #8f1f55;
  --data-other: #595959;
  --hero-1: #000000;
  --hero-2: #000000;
  --hero-3: #003f73;
  --scroll-shade: rgba(0, 0, 0, 0.4);
  color-scheme: light;
}
:root[data-theme='contrast'] a,
:root[data-theme='contrast'] .link {
  text-decoration: underline;
}
/* Menu items, buttons and tiles are already clearly controls: no underline there. */
:root[data-theme='contrast'] :is(.nav-item, .nav-cta, .btn, .stat, .sidebar-user-link, .ch-card, .sidebar-brand) {
  text-decoration: none;
}
:root[data-theme='contrast'] .nav-item.is-active {
  outline: 2px solid var(--text);
}
:root[data-theme='contrast'] .card,
:root[data-theme='contrast'] .btn,
:root[data-theme='contrast'] .chip,
:root[data-theme='contrast'] .badge,
:root[data-theme='contrast'] input,
:root[data-theme='contrast'] select,
:root[data-theme='contrast'] textarea {
  border: 2px solid var(--line) !important;
  box-shadow: none !important;
}
:root[data-theme='contrast'] .sidebar {
  background: var(--surface) !important;
  border-right: 2px solid var(--line);
}
@media (prefers-contrast: more) {
  :root:not([data-theme]) {
    --line: #4a5470;
    --muted: #3d4663;
  }
}

/* The platform's own pages: entry page, public signup, sandbox (apps/api/src/platform/pages.ts; docs/design.md,
   "Marchio di piattaforma"). Served after tokens.css, the portal's own tokens: below, colours, radii, font sizes and
   weights are var(--…) only (scripts/check-design-tokens.mjs). Direction "disegno tecnico": one accent, quiet
   neutrals, the drafting grid behind the main headings, numbers in the foreground. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900; /* design-allow: the variable font's weight range, not a text weight */
  src: url(/api/platform/assets/inter.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The public pages keep the reading measure: the portal's --content-max (1600px) is for its working pages. */
:root {
  --pf-content-max: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body.pf {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01';
}
.pf h1,
.pf h2,
.pf h3,
.pf p,
.pf ul,
.pf ol,
.pf dl,
.pf dd,
.pf figure {
  margin: 0;
}
.pf ul,
.pf ol {
  padding: 0;
  list-style: none;
}
.pf a {
  color: var(--brand);
  text-underline-offset: 3px;
}
.pf a:hover {
  color: var(--brand-strong);
}
.pf :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.pf-muted {
  color: var(--muted);
}
.pf-small {
  font-size: var(--fs-sm);
}
.pf-center {
  text-align: center;
}
.pf-nowrap {
  white-space: nowrap;
}
.pf-skip {
  position: absolute;
  left: var(--sp-3);
  top: -100px;
  z-index: var(--z-toast);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: var(--fw-semibold);
}
.pf-skip:focus {
  top: var(--sp-3);
}

/* ---------- Icons ---------- */
.pf-icon {
  width: 22px;
  height: 22px;
  flex: none;
}
.pf-icon-sm {
  width: 18px;
  height: 18px;
}
.pf-icon-xs {
  width: 14px;
  height: 14px;
}
.pf-icon-lg {
  width: 32px;
  height: 32px;
}

/* ---------- Top bar and footer ---------- */
.pf-top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.pf-top-in,
.pf-foot-in {
  width: 100%;
  max-width: var(--pf-content-max);
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
}
.pf-brand {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
}
.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}
.brand-logo .logo-tile {
  fill: var(--brand-strong);
}
.brand-logo .logo-glyph {
  fill: var(--on-brand);
}
.brand-logo .logo-glyph-line,
.brand-logo .logo-grid {
  stroke: var(--on-brand);
}
.brand-logo .logo-ink {
  fill: var(--text);
}
.pf-tag {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--warn);
  color: var(--warn);
  background: var(--warn-bg);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
}
.pf-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.pf-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.pf-foot-in {
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-5);
  gap: var(--sp-1) var(--sp-5);
}
.pf-foot-brand strong {
  color: var(--text);
}
.pf-legal {
  margin-left: auto;
}

/* ---------- The page: one stack, one measure ---------- */
.pf-main {
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-5) var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.pf-main:focus {
  outline: none;
}
.pf-narrow {
  max-width: 44rem;
}
.pf-wide,
.pf-split {
  max-width: var(--pf-content-max);
}
@media (max-width: 480px) {
  .pf-main {
    padding: var(--sp-5) var(--sp-4) var(--sp-7);
  }
  .pf-top-in,
  .pf-foot-in {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }
  .pf-legal {
    margin-left: 0;
  }
}

.pf-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}
@media (max-width: 480px) {
  .pf-card {
    padding: var(--sp-5) var(--sp-4);
  }
}

/* ---------- Headings, on the drafting grid ---------- */
.pf-head {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
}
.pf-head::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--sp-5)) 0 calc(-1 * var(--sp-3)) 40%;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-minor) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: right top;
  mask-image: linear-gradient(to left, black 0%, transparent 85%), linear-gradient(to bottom, black 40%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}
.pf-head.is-centered {
  align-items: center;
  text-align: center;
}
.pf-head.is-centered::before {
  display: none;
}
.pf h1 {
  font-size: var(--fs-h1);
  line-height: 1.15;
  font-weight: var(--fw-bold);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.pf h2 {
  font-size: var(--fs-h4);
  line-height: 1.3;
  font-weight: var(--fw-bold);
}
.pf-h3 {
  font-size: var(--fs-lg);
}
.pf-eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}
.pf-lead {
  max-width: 44rem;
  font-size: var(--fs-lead);
  color: var(--muted);
  text-wrap: pretty;
}
.pf-lead strong {
  color: var(--text);
}
@media (max-width: 480px) {
  .pf h1 {
    font-size: var(--fs-2xl);
  }
  .pf-lead {
    font-size: var(--fs-base);
  }
}

/* The drawings (line art on the grid, like the portal's empty states). */
.pf-drawing {
  width: 200px;
  height: 180px;
  padding: var(--sp-2);
  margin-bottom: var(--sp-2);
  border-radius: var(--r-md);
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px);
  background-size: 12px 12px;
  background-position: center;
  mask-image: radial-gradient(closest-side, black 72%, transparent 100%);
}
.pf-drawing svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pf-drawing .d-frame {
  fill: var(--surface);
  stroke: var(--brand);
  stroke-width: 2;
}
.pf-drawing .d-paper {
  fill: var(--surface-2);
  stroke: var(--brand);
  stroke-width: 1.5;
}
.pf-drawing .d-line {
  stroke: var(--brand);
  stroke-width: 2.5;
}
.pf-drawing .d-soft {
  stroke: var(--field-line);
  stroke-width: 2;
}
.pf-drawing .d-accent {
  fill: var(--brand);
}
.pf-drawing .d-on-accent {
  stroke: var(--on-brand);
  stroke-width: 3;
}
.pf-drawing .d-dim {
  stroke: var(--muted);
  stroke-width: 1.25;
}
.pf-drawing .d-cut {
  stroke: var(--danger);
  stroke-width: 3;
}
.pf-drawing .d-spin {
  stroke-dasharray: 22 78;
  transform-origin: 80px 70px;
}
@media (prefers-reduced-motion: no-preference) {
  .pf-drawing .d-spin {
    animation: pf-spin 1.6s linear infinite;
  }
  .pf-ready .pf-drawing {
    animation: pf-pop var(--dur-slow) var(--ease-spring) both;
  }
  .pf-ready .pf-drawing .d-accent {
    animation: pf-pop 0.4s var(--ease-spring) 0.15s both;
    transform-origin: 122px 36px;
  }
}
@keyframes pf-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pf-pop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
}

/* ---------- Forms ---------- */
.pf-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}
.pf-signup-form {
  gap: var(--sp-5);
}
.pf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.pf-field label {
  font-size: var(--fs-ms);
  font-weight: var(--fw-semibold);
}
.pf-field input,
.pf-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font: inherit;
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.pf-field input:hover,
.pf-field select:hover {
  border-color: var(--brand);
}
.pf-field input:focus-visible,
.pf-field select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--brand);
}
.pf-field.has-error input,
.pf-field.has-error select {
  border: 2px solid var(--danger);
}
.pf-field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--danger);
  font-size: var(--fs-ms);
  font-weight: var(--fw-semibold);
}
.pf-hint {
  color: var(--muted);
  font-size: var(--fs-sm);
}
.pf-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4) var(--sp-5);
}
@media (min-width: 720px) {
  .pf-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.pf-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Buttons ---------- */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.pf .pf-btn-primary {
  background: var(--brand-strong);
  color: var(--on-brand);
  box-shadow: var(--sh-brand);
}
.pf .pf-btn-primary:hover {
  background: var(--brand);
  color: var(--on-brand);
}
.pf .pf-btn-secondary {
  background: var(--brand-tint);
  color: var(--brand-strong);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
}
.pf .pf-btn-secondary:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.pf .pf-btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.pf .pf-btn-ghost:hover {
  border-color: var(--brand);
  color: var(--text);
}
.pf-btn:active {
  transform: translateY(1px);
}
.pf-btn-block {
  width: 100%;
}
.pf-btn-lg {
  min-height: 52px;
  padding: 12px 28px;
  font-size: var(--fs-lg);
}
.pf-btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: var(--fs-sm);
}
.pf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
}
.pf-actions.is-centered {
  justify-content: center;
}

/* ---------- Messages ---------- */
.pf-alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}
.pf-alert > div:last-child {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}
.pf-alert-icon {
  display: flex;
}
.pf-alert-title,
.pf-alert h2 {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}
.pf-alert ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  list-style: disc;
  padding-left: var(--sp-5);
}
.pf-alert.is-info {
  background: var(--info-bg);
  border-color: color-mix(in srgb, var(--info) 35%, transparent);
}
.pf-alert.is-info .pf-alert-icon {
  color: var(--info);
}
.pf-alert.is-ok {
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}
.pf-alert.is-ok .pf-alert-icon {
  color: var(--ok);
}
.pf-alert.is-warn {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
}
.pf-alert.is-warn .pf-alert-icon {
  color: var(--warn);
}
.pf-alert.is-danger {
  background: var(--danger-bg);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}
.pf-alert.is-danger .pf-alert-icon,
.pf-alert.is-danger a {
  color: var(--danger);
}

/* ---------- Steps ---------- */
.pf-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}
.pf-steps li {
  position: relative;
  display: flex;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
}
.pf-steps li:last-child {
  padding-bottom: 0;
}
.pf-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 4px;
  border-left: 2px dashed var(--line);
}
.pf-step-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--field-line);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.pf-steps li > div {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pf-step-title {
  font-weight: var(--fw-semibold);
}
.pf-step-text {
  color: var(--muted);
  font-size: var(--fs-ms);
}
.pf-steps .is-current .pf-step-mark {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
}
.pf-steps .is-done .pf-step-mark {
  border-color: var(--ok-solid);
  background: var(--ok-solid);
  color: var(--on-solid);
}
.pf-steps .is-failed .pf-step-mark {
  border-color: var(--danger-solid);
  background: var(--danger-solid);
  color: var(--on-solid);
}
.pf-steps .is-todo .pf-step-title {
  color: var(--muted);
}

/* ---------- Entry page: the sign-in card and the product beside it ---------- */
.pf-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'side' 'hero';
  gap: var(--sp-6);
  align-items: stretch;
}
.pf-split-side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 960px) {
  .pf-main.pf-split {
    padding-top: var(--sp-8);
  }
  .pf-entry {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: 'hero side';
    gap: var(--sp-7);
    min-height: 560px;
  }
}
.pf-hero {
  grid-area: hero;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-8) var(--sp-7);
  border-radius: var(--r-lg);
  color: var(--on-hero);
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2) 60%, var(--hero-3));
}
.pf-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--on-hero) 16%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--on-hero) 16%, transparent) 1px, transparent 1px),
    linear-gradient(to right, color-mix(in srgb, var(--on-hero) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--on-hero) 6%, transparent) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: right top;
  mask-image: linear-gradient(to left, black 20%, transparent 100%);
}
.pf-hero .pf-eyebrow {
  color: var(--on-hero);
  opacity: 0.85;
}
.pf-hero-title {
  font-size: var(--fs-3xl);
  line-height: 1.08;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pf-points {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: auto;
}
.pf-points li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.pf-points .pf-icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--on-hero) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-hero) 28%, transparent);
}
.pf-point-title {
  font-weight: var(--fw-bold);
}
.pf-points p:not(.pf-point-title) {
  font-size: var(--fs-ms);
  opacity: 0.9;
}
@media (max-width: 959px) {
  .pf-hero {
    padding: var(--sp-6) var(--sp-5);
  }
  .pf-hero-title {
    font-size: var(--fs-2xl);
  }
}
.pf-signin {
  gap: var(--sp-4);
}
.pf-trial {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-start;
  margin-top: var(--sp-2);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--brand-tint);
}
.pf-orgs {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.pf-org {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 52px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}
.pf .pf-org {
  color: var(--text);
}
.pf-org:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.pf-org .pf-icon {
  color: var(--brand);
}
.pf-org-go {
  margin-left: auto;
}

/* ---------- Signup ---------- */
.pf-perks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.pf-perks li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-ms);
  color: var(--muted);
}
.pf-perks strong {
  color: var(--text);
}
.pf-perks .pf-icon {
  color: var(--brand);
}
.pf-section > h2,
.pf-section > legend {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
}
.pf-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-tint);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  color: var(--brand);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
fieldset.pf-card {
  margin: 0;
  min-inline-size: 0;
}
fieldset.pf-card > legend {
  float: left;
  width: 100%;
  padding: 0;
}
fieldset.pf-card > legend + * {
  clear: both;
}
.pf-plans-set.has-error {
  border: 2px solid var(--danger);
}
.pf-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--sp-5);
  padding-top: var(--sp-3);
}
.pf-plan {
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.pf-plan:hover {
  border-color: var(--brand);
}
.pf-plan.is-recommended {
  border: 2px solid color-mix(in srgb, var(--brand) 60%, var(--line));
}
.pf-plan:has(input:checked) {
  border: 2px solid var(--brand);
  background: linear-gradient(var(--brand-tint), var(--surface) 180px);
  box-shadow: 0 0 0 4px var(--brand-soft), var(--sh-2);
}
.pf-plan:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.pf-plan-badge {
  position: absolute;
  top: -13px;
  left: var(--sp-5);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px 3px 8px;
  border-radius: var(--r-pill);
  background: var(--brand-strong);
  color: var(--on-brand);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pf-plan-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.pf-plan-head input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--brand-strong);
}
.pf-plan-head input:focus-visible {
  outline: none;
}
.pf-plan-head label {
  cursor: pointer;
}
/* The whole card picks the plan (the label stretched over it); the radio stays the control people and screen readers use. */
.pf-plan-head label::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
}
.pf-plan-head label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pf-plan-name {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}
.pf-plan-desc {
  color: var(--muted);
  font-size: var(--fs-ms);
}
.pf-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--sp-2);
}
.pf-price-num {
  font-size: var(--fs-3xl);
  line-height: 1;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pf-price-per {
  color: var(--muted);
  font-size: var(--fs-sm);
}
.pf-price-year {
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.pf-save {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.pf-vat {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pf-plan-plus {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.pf-plan-plus-title,
.pf-plan-all-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pf-chips li {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.pf-plan-all {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
}
.pf-pkg-name {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.pf-mods {
  display: grid;
  gap: 2px;
}
.pf-mods li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
}
.pf-mods .pf-icon {
  color: var(--ok);
}
.pf-plan-extras {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.pf-plan-extras li {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
}

/* The comparison: every module of every plan; compact enough for three plans on a 320px phone, scrolls beyond. */
.pf-compare {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}
/* Positioned: the cells' screen-reader texts (absolute) stay inside the scrolling box, never widen the page. */
.pf-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.pf-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-ms);
}
.pf-compare-table th,
.pf-compare-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}
.pf-compare-table tbody tr:last-child > * {
  border-bottom: 0;
}
.pf-compare-table th[scope='row'],
.pf-compare-table thead th:first-child {
  text-align: left;
  font-weight: var(--fw-medium);
}
.pf-compare-table thead th {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  background: var(--surface-2);
}
.pf-compare-table .pf-group th {
  padding-top: var(--sp-4);
  text-align: left;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}
.pf-compare-table .pf-price-row th,
.pf-compare-table .pf-price-row td {
  font-size: var(--fs-md);
}
.pf-yes {
  display: inline-flex;
  color: var(--ok);
}
.pf-no {
  color: var(--muted);
}
@media (max-width: 600px) {
  .pf-compare-table th,
  .pf-compare-table td {
    padding: 8px 6px;
  }
  .pf-compare-table th[scope='row'],
  .pf-compare-table thead th:first-child {
    padding-left: var(--sp-3);
  }
  .pf-compare-table {
    font-size: var(--fs-sm);
  }
}

.pf-check {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-2) var(--sp-3);
}
.pf-check .pf-field-error {
  flex-basis: 100%;
}
.pf-check input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--brand-strong);
}
.pf-check label {
  flex: 1;
  min-width: 0;
}
.pf-check.has-error {
  padding: var(--sp-3);
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  background: var(--danger-bg);
  border-radius: var(--r-md);
}
.pf-confirm .pf-actions {
  padding-top: var(--sp-2);
}

/* ---------- After the form: messages, the ready page ---------- */
.pf-message {
  gap: var(--sp-5);
}
.pf-message .pf-steps {
  align-self: center;
  width: min(100%, 30rem);
}
.pf-chosen {
  text-align: center;
  color: var(--muted);
}
.pf-chosen strong {
  color: var(--text);
}
.pf-callout {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  background: var(--brand-tint);
  font-size: var(--fs-lg);
}
.pf-callout > div {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}
.pf-callout > .pf-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  color: var(--brand);
}
.pf-callout-title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: var(--brand-strong);
}
.pf-address {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  text-align: center;
}
.pf-address-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pf .pf-address-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: 100%;
  padding: var(--sp-3) var(--sp-5);
  border: 2px dashed var(--brand);
  border-radius: var(--r-md);
  color: var(--brand-strong);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.pf .pf-address-link:hover {
  background: var(--brand-tint);
}
@media (max-width: 480px) {
  .pf .pf-address-link {
    font-size: var(--fs-lead);
    padding: var(--sp-3);
  }
  .pf-callout {
    font-size: var(--fs-base);
    padding: var(--sp-4);
  }
}
.pf-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: var(--sp-3);
}
.pf-facts > div {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pf-facts dt {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.pf-facts dd {
  font-weight: var(--fw-semibold);
}
.pf-resend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-4);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

/* ---------- Sandbox (checkout and portal simulated: billing/sandboxPage.ts) ---------- */
.pf-sandbox .card {
  padding: var(--sp-5);
  border: 2px dashed color-mix(in srgb, var(--warn) 55%, var(--line));
  border-radius: var(--r-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.pf-sandbox .label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--muted);
}
.pf-sandbox .total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-2);
}
.pf-sandbox .total strong {
  font-size: var(--fs-3xl);
  line-height: 1.1;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.pf-sandbox .total span,
.pf-sandbox .muted {
  color: var(--muted);
}
.pf-sandbox caption {
  text-align: left;
  padding-bottom: var(--sp-1);
}
.pf-sandbox table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-md);
}
.pf-sandbox th,
.pf-sandbox td {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.pf-sandbox th {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--muted);
}
.pf-sandbox td code,
.pf-sandbox .row code {
  overflow-wrap: anywhere;
  font-size: var(--fs-sm);
}
.pf-sandbox .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pf-sandbox .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
}
.pf-sandbox .row code {
  color: var(--muted);
}
.pf-sandbox .badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border: 1px solid currentColor;
}
.pf-sandbox .badge.ok {
  color: var(--ok);
}
.pf-sandbox .badge.warn {
  color: var(--warn);
}
.pf-sandbox .badge.danger {
  color: var(--danger);
}
.pf-sandbox .badge.muted {
  color: var(--muted);
}
.pf-sandbox .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.pf-sandbox form {
  margin: 0;
}
.pf-sandbox button {
  font: inherit;
  font-weight: var(--fw-semibold);
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.pf-sandbox button.primary {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: var(--on-brand);
}
.pf-sandbox button:hover {
  border-color: var(--brand);
}

/* ---------- Themes and preferences ---------- */
@media (forced-colors: active) {
  .pf-head::before,
  .pf-hero::before,
  .pf-drawing {
    background-image: none;
  }
  .pf-plan:has(input:checked) {
    outline: 3px solid Highlight;
  }
}
@media (prefers-contrast: more) {
  .pf-head::before,
  .pf-hero::before {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pf *,
  .pf *::before,
  .pf *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .pf-head::before,
  .pf-hero::before,
  .pf-top,
  .pf-foot {
    display: none;
  }
}

/* ---------- Legal documents and the disclosure policy (legal/pages.ts): long text, read at a comfortable measure ---------- */
.pf-doc {
  gap: var(--sp-5);
}
.pf-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.pf-prose {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 72ch;
  overflow-wrap: anywhere;
}
.pf-prose h2 {
  margin-top: var(--sp-4);
}
.pf-prose h3,
.pf-prose h4 {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-top: var(--sp-3);
}
.pf-prose ul,
.pf-prose ol {
  padding-left: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.pf-prose ul {
  list-style: disc;
}
.pf-prose ol {
  list-style: decimal;
}
.pf-prose blockquote {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  border-left: 4px solid var(--warn-solid);
  background: var(--warn-bg);
  border-radius: var(--r-sm);
}
.pf-prose code {
  font-size: var(--fs-sm);
  padding: 0 var(--sp-1);
  border-radius: var(--r-xs);
  background: var(--surface-2);
}
.pf-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
}
/* The sheet of one AI feature on the AI statement (ai/statement.ts): a label over its text, side by side when wide. */
.pf-ai-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-1) var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pf-ai-sheet dt {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.pf-ai-sheet dd {
  margin-bottom: var(--sp-2);
}
@media (min-width: 720px) {
  .pf-ai-sheet {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  }
  .pf-ai-sheet dd {
    margin-bottom: 0;
  }
}
.pf-doc-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.pf-doc-list li {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.pf-versions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
}
