/* app.css: design tokens (light + dark) and shared pieces, each page's styles, and at the end the role layer that
   gives Anvil components (Button, Label, TextBox, notifications, dialogs, RepeatingPanel grids) the same look.
   Restyle the app by changing the tokens at the top (both the light and the dark blocks). */

/* core.css: design tokens + the shared components. Restyle an app mostly by changing the tokens below
   (colours, fonts, radius, shadow); fonts are loaded in web/head.html. Light and dark are both required. */
:root {
  --c-bg: #ffffff;          /* page */
  --c-surface: #ffffff;     /* cards, menus, inputs */
  --c-surface-2: #f3f3f1;   /* subtle fills, hovers */
  --c-ink: #0a0a0a;         /* text */
  --c-muted: #555555;       /* secondary text */
  --c-faint: #686866;       /* hints, placeholders (4.5:1 on every surface) */
  --c-line: #e3e3e0;        /* borders */
  --c-brand: #0a0a0a;       /* primary buttons, links, focus */
  --c-brand-ink: #ffffff;   /* text on brand */
  --c-brand-soft: #f0f0ee;  /* brand tints */
  --c-accent: #ff4f1f;      /* signal orange */
  --c-accent-soft: #ffe9e1;
  --c-accent-text: #c2380f; /* the accent as small text (4.5:1) */
  --c-on-status: #fff;      /* text on good/bad/warn fills */
  --c-good: #13804b; --c-good-soft: #e2f3ea;
  --c-warn: #9a5b00; --c-warn-soft: #fbf0dc;
  --c-bad: #c7341f;  --c-bad-soft: #fbe6e2;
  --radius: 4px; --radius-sm: 3px;
  --shadow: none;
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .14);
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --maxw: 1160px;
  --header-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #0b0b0b; --c-surface: #121212; --c-surface-2: #1b1b1b; --c-ink: #f2f2f0; --c-muted: #a6a6a2; --c-faint: #8f8f8a;
    --c-line: #2a2a28; --c-brand: #f2f2f0; --c-brand-ink: #0b0b0b; --c-brand-soft: #1f1f1d; --c-accent: #ff6a3d; --c-accent-soft: #33190f; --c-accent-text: #ff7a52; --c-on-status: #0b0b0b;
    --c-good: #5fd19b; --c-good-soft: #13251b; --c-warn: #f0b34f; --c-warn-soft: #2a2010; --c-bad: #ff8a75; --c-bad-soft: #321a16;
    --shadow: none; --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c-bg: #0b0b0b; --c-surface: #121212; --c-surface-2: #1b1b1b; --c-ink: #f2f2f0; --c-muted: #a6a6a2; --c-faint: #8f8f8a;
  --c-line: #2a2a28; --c-brand: #f2f2f0; --c-brand-ink: #0b0b0b; --c-brand-soft: #1f1f1d; --c-accent: #ff6a3d; --c-accent-soft: #33190f; --c-accent-text: #ff7a52; --c-on-status: #0b0b0b;
  --c-good: #5fd19b; --c-good-soft: #13251b; --c-warn: #f0b34f; --c-warn-soft: #2a2010; --c-bad: #ff8a75; --c-bad-soft: #321a16;
  --shadow: none; --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6); color-scheme: dark;
}

/* Design kit: motion tokens, browser surfaces, wrapping, press feedback, reduced motion (APP_MAKER/design/kit.css). */
/* design-kit:start */
:root {
  /* easing: never ease-in on UI */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* entering, exiting, most UI */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* moving across the screen */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* sheets, drawers */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);      /* one authored entrance */
  /* durations: UI stays under 300ms, exits faster than entrances */
  --dur-press: 140ms; --dur-fast: 180ms; --dur-base: 220ms; --dur-slow: 320ms; --dur-hero: 640ms;
  /* 4px spacing scale */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --measure: 65ch;
}

/* browser surfaces: the parts nobody draws */
::selection { background: color-mix(in srgb, var(--c-brand) 26%, transparent); color: inherit; }
html {
  accent-color: var(--c-brand); caret-color: var(--c-brand);
  scrollbar-color: color-mix(in srgb, var(--c-ink) 26%, transparent) transparent;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { text-underline-offset: .2em; text-decoration-thickness: from-font; }
h1, h2, h3, h4, [role="heading"], .anvil-role-page-title { text-wrap: balance; }
p, li, dd, blockquote, figcaption { text-wrap: pretty; }
td, th, time, output, progress, .num, .tabular, [data-num] { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-brand) 60%, transparent); outline-offset: 2px; }

/* press feedback: pressable things answer the moment they're pressed */
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn, .kit-press) {
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease,
              border-color var(--dur-fast) ease, color var(--dur-fast) ease, opacity var(--dur-fast) ease,
              box-shadow var(--dur-fast) ease;
}
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn, .kit-press):active:not(:disabled) { transform: scale(.97); }

/* entrances: content is visible by default; these only add the arrival */
@keyframes kit-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes kit-pop { from { opacity: 0; transform: scale(.96); } }
@keyframes kit-fade { from { opacity: 0; } }
.kit-in { animation: kit-in var(--dur-slow) var(--ease-out) both; }
.kit-stagger > * { animation: kit-in var(--dur-slow) var(--ease-out) both; }
.kit-stagger > :nth-child(2) { animation-delay: 40ms; } .kit-stagger > :nth-child(3) { animation-delay: 80ms; }
.kit-stagger > :nth-child(4) { animation-delay: 120ms; } .kit-stagger > :nth-child(5) { animation-delay: 160ms; }
.kit-stagger > :nth-child(n+6) { animation-delay: 200ms; }

/* reduced motion = fewer and gentler, not none: movement goes, short fades that confirm a state stay */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kit-in, .kit-stagger > * { animation-name: kit-fade; animation-delay: 0ms !important; }
  :is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn, .kit-press):active:not(:disabled) { transform: none; }
}
/* design-kit:end */

/* The app owns the page (not Anvil's theme). */
html, body { background: var(--c-bg) !important; color: var(--c-ink); }
body { margin: 0; font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.ui-modal-open { overflow: hidden; }

.ui, .ui *, .ui *::before, .ui *::after { box-sizing: border-box; }
.ui { font: 16px/1.55 var(--font-body); color: var(--c-ink); }
.ui h1, .ui h2, .ui h3, .ui h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.015em; font-weight: 700; color: var(--c-ink); }
.ui h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.ui h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.ui h3 { font-size: 1.2rem; }
.ui h4 { font-size: 1rem; }
.ui p { margin: 0 0 .8em; }
.ui :is(p, ul, ol, blockquote, figure) + :is(h2, h3) { margin-top: 1.4em; }  /* more space above a heading than below it */
.ui a { color: var(--c-brand); text-underline-offset: 3px; }
.ui [hidden] { display: none !important; }
.ui img { max-width: 100%; }
.ui .muted { color: var(--c-muted); }
.ui .faint { color: var(--c-faint); }
.ui .small { font-size: .875rem; }
.ui-ic, .ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* layout */
.ui-wrap { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 72px; }
.ui-narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.ui-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ui-row.end { justify-content: flex-end; }
.ui-row.between { justify-content: space-between; }
.ui-row.top { align-items: flex-start; }
.ui-spacer { flex: 1; }
.ui-stack > * + * { margin-top: 14px; }
.ui-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ui-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ui-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ui-page-head h1 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.ui-page-head p { margin: 6px 0 0; }

/* cards */
.ui-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.ui-card.flat { box-shadow: none; }
.ui-card.tight { padding: 14px 16px; }
.ui-card > :last-child { margin-bottom: 0; }

/* buttons */
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { font: 600 .95rem/1.2 var(--font-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; min-height: 44px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink);
  cursor: pointer; text-decoration: none; white-space: nowrap; }  /* transitions + press scale: design kit */
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):hover { border-color: var(--c-ink); }
:is(.ui-btn.primary, .anvil-role-btn.anvil-role-btn-primary > button, a.anvil-role-btn.anvil-role-btn-primary) { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-brand-ink); }
:is(.ui-btn.primary, .anvil-role-btn.anvil-role-btn-primary > button, a.anvil-role-btn.anvil-role-btn-primary):hover { opacity: .92; }
:is(.ui-btn.ghost, .anvil-role-btn.anvil-role-btn-ghost > button, a.anvil-role-btn.anvil-role-btn-ghost) { background: transparent; border-color: transparent; color: var(--c-muted); }
:is(.ui-btn.ghost, .anvil-role-btn.anvil-role-btn-ghost > button, a.anvil-role-btn.anvil-role-btn-ghost):hover { background: var(--c-surface-2); color: var(--c-ink); }
:is(.ui-btn.danger, .anvil-role-btn.anvil-role-btn-danger > button, a.anvil-role-btn.anvil-role-btn-danger) { color: var(--c-bad); }
:is(.ui-btn.danger, .anvil-role-btn.anvil-role-btn-danger > button, a.anvil-role-btn.anvil-role-btn-danger):hover { border-color: var(--c-bad); }
:is(.ui-btn.danger.solid, .anvil-role-btn.anvil-role-btn-danger.anvil-role-btn-solid > button, a.anvil-role-btn.anvil-role-btn-danger.anvil-role-btn-solid) { background: var(--c-bad); border-color: var(--c-bad); color: var(--c-on-status); }
:is(.ui-btn.sm, .anvil-role-btn.anvil-role-btn-sm > button, a.anvil-role-btn.anvil-role-btn-sm) { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
:is(.ui-btn.lg, .anvil-role-btn.anvil-role-btn-lg > button, a.anvil-role-btn.anvil-role-btn-lg) { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
:is(.ui-btn.icon, .anvil-role-btn.anvil-role-btn-icon > button, a.anvil-role-btn.anvil-role-btn-icon) { width: 40px; min-height: 40px; padding: 0; }
:is(.ui-btn.block, .anvil-role-btn.anvil-role-btn-block > button, a.anvil-role-btn.anvil-role-btn-block) { width: 100%; }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):disabled { opacity: .5; cursor: not-allowed; transform: none; }
:is(.ui-btn.is-busy, .anvil-role-btn.anvil-role-btn-is-busy > button, a.anvil-role-btn.anvil-role-btn-is-busy) { position: relative; color: transparent !important; }
:is(.ui-btn.is-busy, .anvil-role-btn.anvil-role-btn-is-busy > button, a.anvil-role-btn.anvil-role-btn-is-busy)::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor;
  border-color: var(--c-muted) transparent var(--c-muted) transparent; animation: ui-spin .8s linear infinite; }
:is(.ui-btn.primary.is-busy, .anvil-role-btn.anvil-role-btn-primary.anvil-role-btn-is-busy > button, a.anvil-role-btn.anvil-role-btn-primary.anvil-role-btn-is-busy)::after { border-color: var(--c-brand-ink) transparent var(--c-brand-ink) transparent; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
.ui :focus-visible { outline: 3px solid color-mix(in srgb, var(--c-brand) 55%, transparent); outline-offset: 2px; }

/* forms */
.ui-field { display: block; }
.ui-field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.ui-field > span em { font-style: normal; font-weight: 400; color: var(--c-muted); }
.ui input[type=text], .ui input[type=email], .ui input[type=password], .ui input[type=search], .ui input[type=number], .ui input[type=url],
.ui input[type=tel], .ui input[type=date], .ui input[type=time], .ui input[type=datetime-local], .ui select, .ui textarea {
  font: inherit; font-size: 1rem; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 11px 13px; width: 100%; min-height: 46px; margin: 0; box-shadow: none; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.ui textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
/* tick boxes and radios keep the focus ring above; typed-in fields swap it for the border + glow */
.ui input:not([type=checkbox]):not([type=radio]):focus, .ui select:focus, .ui textarea:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-brand-soft); }
.ui ::placeholder { color: var(--c-faint); }
.ui-hint { font-size: .85rem; color: var(--c-muted); margin: 6px 0 0; }
.ui-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.ui-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--c-brand); flex: none; }
.ui-error { background: var(--c-bad-soft); color: var(--c-bad); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }
.ui-note { background: var(--c-brand-soft); color: var(--c-ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }
.ui-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ui-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ui-choice span { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; background: var(--c-surface); }
.ui-choice input:checked + span { border-color: var(--c-brand); background: var(--c-brand-soft); }
.ui-choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c-brand) 55%, transparent); }

/* small pieces */
.ui-badge { display: inline-flex; align-items: center; gap: 5px; font: 600 .75rem/1.3 var(--font-body); padding: 4px 10px; border-radius: 999px;
  background: var(--c-surface-2); color: var(--c-muted); white-space: nowrap; }
.ui-badge.brand { background: var(--c-brand-soft); color: var(--c-brand); }
.ui-badge.good { background: var(--c-good-soft); color: var(--c-good); }
.ui-badge.warn { background: var(--c-warn-soft); color: var(--c-warn); }
.ui-badge.bad { background: var(--c-bad-soft); color: var(--c-bad); }
.ui-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--c-surface-2); border-radius: 999px; border: 1px solid var(--c-line); }
.ui-seg button { font: 500 .85rem/1 var(--font-body); border: 0; background: none; color: var(--c-muted); padding: 8px 13px; border-radius: 999px; cursor: pointer; }
.ui-seg button.on { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.ui-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.ui-tabs a, .ui-tabs button { font: 600 .92rem/1 var(--font-body); border: 0; background: none; color: var(--c-muted); padding: 12px 14px; border-bottom: 2px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; margin-bottom: -1px; }
.ui-tabs .on { color: var(--c-ink); border-bottom-color: var(--c-brand); }
.ui-tabs .count { font-size: .75rem; background: var(--c-surface-2); border-radius: 999px; padding: 2px 7px; }
.ui-empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--c-line); border-radius: var(--radius); color: var(--c-muted); }
.ui-empty :is(.ui-ic, .ic) { width: 34px; height: 34px; color: var(--c-faint); margin-bottom: 8px; }
.ui-empty :is(h2, h3) { color: var(--c-ink); font-size: 1.15rem; margin-top: 0; }
.ui-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--c-brand-soft); color: var(--c-brand); font: 700 .85rem/1 var(--font-body); }
.ui-list { display: grid; gap: 10px; }
.ui-item { display: flex; gap: 14px; align-items: flex-start; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px 18px; }
.ui-item .grow { flex: 1; min-width: 0; }
.ui-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ui-item p { margin: 0; overflow-wrap: anywhere; }
.ui-skel { border-radius: var(--radius); background: linear-gradient(90deg, var(--c-surface-2), var(--c-surface), var(--c-surface-2)); background-size: 200% 100%;
  animation: ui-skel 1.4s linear infinite; min-height: 80px; }
@keyframes ui-skel { to { background-position: -200% 0; } }
.ui-stat { display: block; }
.ui-stat b { display: block; font: 800 2rem/1.1 var(--font-display); }
.ui-stat span { color: var(--c-muted); font-size: .9rem; }

/* header */
.ui-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--c-bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--c-line); }
.ui-header-in { max-width: var(--maxw); margin: 0 auto; height: var(--header-h); padding: 0 24px; display: flex; align-items: center; gap: 22px; }
.ui-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink) !important; font: 800 1.15rem/1 var(--font-display); letter-spacing: -.01em; }
.ui-brand img { width: 32px; height: 32px; border-radius: 9px; }
.ui-nav { display: flex; gap: 2px; }
.ui-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; color: var(--c-muted); text-decoration: none; font-weight: 600; font-size: .93rem; }
.ui-nav a:hover { color: var(--c-ink); background: var(--c-surface-2); }
.ui-nav a.on { color: var(--c-ink); background: var(--c-surface-2); }
.ui-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.ui-avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--c-brand); color: var(--c-brand-ink); font: 700 .85rem/1 var(--font-body); }
.ui-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 280px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; transform-origin: top right; animation: ui-pop var(--dur-fast) var(--ease-out); }
.ui-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--c-line); margin-bottom: 6px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.ui-menu > a, .ui-menu > button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); border: 0; background: none;
  font: 500 .95rem/1.2 var(--font-body); color: var(--c-ink); text-decoration: none; cursor: pointer; text-align: left; }
.ui-menu > a:hover, .ui-menu > button:hover { background: var(--c-surface-2); }
.ui-menu-block { padding: 8px 12px 10px; display: grid; gap: 8px; }
@keyframes ui-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* main + footer */
.ui-shell { min-height: 100vh; display: flex; flex-direction: column; }
.ui-main { flex: 1; }
.ui-shell.no-chrome .ui-header, .ui-shell.no-chrome .ui-footer, .ui-shell.no-chrome .ui-tabbar { display: none; }
.ui-footer { border-top: 1px solid var(--c-line); background: var(--c-surface); }
.ui-footer-in { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 40px; display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; align-items: start; }
.ui-footer-brand p { margin: 8px 0 0; }
.ui-footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; }
.ui-footer-links a, .ui-footer-links button { font: 500 .92rem/1.4 var(--font-body); color: var(--c-muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: none; }  /* 24px+ touch height */
.ui-footer-links a:hover, .ui-footer-links button:hover { color: var(--c-ink); }
.ui-footer-legal { grid-column: 1 / -1; margin: 0; }

/* phone tab bar (shown on small screens when signed in) */
.ui-tabbar { display: none; }
.ui-tabbar:empty { display: none !important; }

/* toasts + modals */
.ui-toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.ui-toast { display: flex; gap: 10px; align-items: center; background: var(--c-ink); color: var(--c-bg); padding: 13px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  font-weight: 500; animation: ui-pop var(--dur-base) var(--ease-out); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.ui-toast.error { background: var(--c-bad); color: var(--c-on-status); }
.ui-toast.ok { background: var(--c-good); color: var(--c-on-status); }
.ui-toast.out { opacity: 0; transform: translateY(8px); }
.ui-modal-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(10, 12, 20, .5); display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: ui-fade var(--dur-fast) ease; }
.ui-modal { position: relative; width: min(100%, 520px); background: var(--c-surface); border-radius: calc(var(--radius) + 4px); padding: 28px; box-shadow: var(--shadow-lg); animation: kit-pop var(--dur-base) var(--ease-out); outline: none; }
.ui-modal.wide { width: min(100%, 760px); }
.ui-modal h2 { padding-right: 40px; }
.ui-modal-x { position: absolute; top: 14px; right: 14px; }
@keyframes ui-fade { from { opacity: 0; } }

@media (max-width: 720px) {
  .ui-wrap { padding: 22px 16px 56px; }
  .ui-header-in { padding: 0 16px; gap: 12px; }
  .ui-nav { display: none; }
  .ui-brand span { font-size: 1.05rem; }
  .ui-header-right :is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { padding: 9px 13px; min-height: 40px; font-size: .9rem; }
  .ui-shell.signed-in .ui-tabbar { display: flex; position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; background: var(--c-surface); border-top: 1px solid var(--c-line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .ui-tabbar a { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--c-muted); text-decoration: none; font: 600 .75rem/1 var(--font-body); }
  .ui-tabbar a :is(.ui-ic, .ic) { width: 22px; height: 22px; }
  .ui-tabbar a.on { color: var(--c-brand); }
  .ui-shell.signed-in:has(.ui-tabbar:not(:empty)) .ui-footer { padding-bottom: 72px; }
  .ui-footer-in { grid-template-columns: 1fr; }
  .ui-footer-links { justify-content: flex-start; }
  .ui-grid.two { grid-template-columns: 1fr; }
  .ui-menu { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 6px); width: auto; }
  .ui-modal { padding: 24px 18px; }
}
@media (max-width: 380px) {
  .ui-header-right :is(.ui-btn.ghost, .anvil-role-btn.anvil-role-btn-ghost > button, a.anvil-role-btn.anvil-role-btn-ghost) { display: none; }
}
@media (prefers-reduced-motion: reduce) {  /* drop movement, keep the fades (design/README.md 6) */
  .ui-menu, .ui-toast, .ui-modal { animation-name: kit-fade; }
  .ui-toast.out { transform: none; }
  .ui-skel { animation: none; }
}



/* ---------------------------------------------------------------- Fillfox: Swiss minimal overrides */
.ui h1, .ui h2, .ui h3, .ui h4 { letter-spacing: -.025em; font-weight: 700; }
.ui .mono, .ui code { font-family: var(--font-mono); }
.ui code { font-size: .88em; background: var(--c-surface-2); padding: 1px 5px; border-radius: 3px; }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { border-radius: var(--radius); font-weight: 600; letter-spacing: -.005em; }
:is(.ui-btn.accent, .anvil-role-btn.anvil-role-btn-accent > button) { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
:is(.ui-btn.accent, .anvil-role-btn.anvil-role-btn-accent > button):hover { opacity: .92; }
.ui-card { border-radius: var(--radius); }
.ui-badge { border-radius: 3px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .01em; }
.ui-badge.accent { background: var(--c-accent-soft); color: var(--c-accent-text); }
.ui-seg, .ui-seg button, .ui-nav a, .ui-avatar-btn, .ui-avatar { border-radius: var(--radius); }
.ui-seg button.on { box-shadow: 0 0 0 1px var(--c-line); }
.ui-tabs .on { border-bottom-color: var(--c-accent); }
.ui-tabs .count { font-family: var(--font-mono); border-radius: 3px; }
.ui-header { background: color-mix(in srgb, var(--c-bg) 90%, transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }
.ui-brand { font-family: var(--font-display); letter-spacing: -.03em; }
.ui-brand img { border-radius: 4px; }
.ui-nav a.on { background: none; color: var(--c-ink); box-shadow: inset 0 -2px 0 var(--c-accent); border-radius: 0; }
.ui-stat b { font-family: var(--font-display); letter-spacing: -.03em; }
.ui-modal { border-radius: 6px; }
.ui-menu { border-radius: 6px; }
.ui-toast { border-radius: 4px; }
.ui-empty { border-radius: var(--radius); }
.ui input:not([type]) { font: inherit; font-size: 1rem; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-sm); padding: 11px 13px; width: 100%; min-height: 46px; }
.ui :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.ui input:focus, .ui select:focus, .ui textarea:focus { border-color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-ink); }
.ui .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ui-rule { border: 0; border-top: 1px solid var(--c-line); margin: 24px 0; }


/* ===== landing (from web/pages/landing.html) ===== */
.page-landing .ui-main { overflow-x: clip; }
/* Live-demo hero: headline row on top, then the product working across the full width:
   a question is typed, answered on a phone, and counted in the results, on one 9-second loop */
.lp-hero { position: relative; padding: 56px 0 48px; }
.lp-hero .ui-wrap { position: relative; z-index: 1; padding-top: 0; padding-bottom: 0; }
.lp-top { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: end; margin-bottom: 36px; }
.lp-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: .98; margin: 10px 0 0; }
.lp-hero h1 em { font-style: normal; color: var(--c-brand); }
.lp-lead { font-size: 1.12rem; color: var(--c-muted); max-width: 34em; margin-bottom: 22px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-proof { margin-top: 18px; display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--c-muted); font-size: .9rem; }
.lp-proof span { display: inline-flex; gap: 6px; align-items: center; }
.lp-proof .ui-ic { color: var(--c-good); }
.lp-demo { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr; align-items: stretch; border: 2px solid var(--c-ink); background: var(--c-surface); }
.lp-pane { padding: 22px 24px 26px; min-width: 0; position: relative; }
.lp-pane .lp-h { font: 600 .75rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); margin: 0 0 14px; display: flex; justify-content: space-between; }
.lp-pane .lp-h b { color: var(--c-accent); font-weight: 600; }
.lp-join { display: grid; place-items: center; border-left: 1px solid var(--c-line); border-right: 1px solid var(--c-line); color: var(--c-accent); background: var(--c-bg); }
.lp-join .ui-ic { width: 18px; height: 18px; }
.lp-doc .ln { font: .88rem/1.8 var(--font-mono); color: var(--c-faint); }
.lp-doc .ln i { font-style: normal; color: var(--c-accent); margin-right: 8px; }
/* design-ok: side-tab (a typing caret / the editor's block and rule markers / a form notice) */
.lp-type { font: 600 1.2rem/1.3 var(--font-body); color: var(--c-ink); white-space: nowrap; overflow: hidden; display: inline-block; vertical-align: bottom;
  border-right: 2px solid var(--c-accent); width: 0; animation: lp-type 9s steps(15) infinite, lp-caret .7s step-end infinite; }
@keyframes lp-type { 0%, 4% { width: 0; } 26%, 100% { width: 15ch; } }
@keyframes lp-caret { 50% { border-color: transparent; } }
.lp-guess { margin-top: 12px; display: inline-flex; gap: 6px; align-items: center; font: 600 .75rem var(--font-mono); background: var(--c-accent-soft); border: 1px solid color-mix(in srgb, var(--c-accent) 40%, transparent); padding: 5px 8px;
  opacity: 0; animation: lp-show 9s infinite; --at: 28%; }
@keyframes lp-show { 0%, 28% { opacity: 0; transform: translateY(4px); } 32%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.lp-phone { margin: 0 auto; width: min(100%, 240px); border: 2px solid var(--c-ink); border-radius: 22px; padding: 18px 14px 16px; background: var(--c-bg); }
.lp-phone .cov { height: 6px; background: var(--c-accent); margin: -8px -4px 14px; }
.lp-phone .q { font: 700 1rem/1.2 var(--font-display); margin-bottom: 12px; }
.lp-stars { display: flex; gap: 6px; font-size: 1.8rem; line-height: 1; }
.lp-stars span { color: var(--c-line); animation: lp-star 9s infinite; }
.lp-stars span:nth-child(1) { animation-name: lp-s1; } .lp-stars span:nth-child(2) { animation-name: lp-s2; } .lp-stars span:nth-child(3) { animation-name: lp-s3; } .lp-stars span:nth-child(4) { animation-name: lp-s4; }
@keyframes lp-s1 { 0%, 40% { color: var(--c-line); } 42%, 97% { color: var(--c-accent); } }
@keyframes lp-s2 { 0%, 44% { color: var(--c-line); } 46%, 97% { color: var(--c-accent); } }
@keyframes lp-s3 { 0%, 48% { color: var(--c-line); } 50%, 97% { color: var(--c-accent); } }
@keyframes lp-s4 { 0%, 52% { color: var(--c-line); } 54%, 97% { color: var(--c-accent); } }
.lp-enter { margin-top: 14px; display: inline-flex; gap: 6px; align-items: center; background: var(--c-ink); color: var(--c-bg); font: 600 .78rem var(--font-body); padding: 7px 12px; animation: lp-press 9s infinite; }
@keyframes lp-press { 0%, 60% { transform: none; } 62% { transform: scale(.92); } 65%, 100% { transform: none; } }
.lp-fr { display: grid; grid-template-columns: 34px 1fr 34px; gap: 8px; align-items: center; font: .74rem var(--font-mono); margin-bottom: 8px; }
.lp-fr b { display: block; height: 14px; background: var(--c-ink); }
.lp-fr.worst b { background: var(--c-accent); }
.lp-fr.live b { animation: lp-grow 9s infinite; transform-origin: left; }
@keyframes lp-grow { 0%, 66% { transform: scaleX(.9); } 74%, 100% { transform: scaleX(1); } }
.lp-fr span:last-child { text-align: right; color: var(--c-muted); }
.lp-new { margin-top: 10px; font-size: .78rem; display: inline-flex; gap: 6px; align-items: center; opacity: 0; animation: lp-new 9s infinite; }
.lp-new::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-good); }
@keyframes lp-new { 0%, 68% { opacity: 0; } 72%, 96% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lp-type { animation: none; width: 15ch; } .lp-guess, .lp-new { animation: none; opacity: 1; }
  .lp-stars span, .lp-enter, .lp-fr.live b { animation: none; } .lp-stars span:not(:last-child) { color: var(--c-accent); }
}
.lp-section { padding: 56px 0; }
.lp-section .ui-wrap { padding-top: 0; padding-bottom: 0; }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.lp-head p { color: var(--c-muted); font-size: 1.08rem; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.lp-step { position: relative; padding-top: 58px; }
.lp-step::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; left: 22px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c-brand); color: var(--c-brand-ink); font: 800 .95rem/1 var(--font-display); }
.lp-feature .ui-ic { width: 26px; height: 26px; color: var(--c-brand); margin-bottom: 12px; }
.lp-feature h3 { margin-bottom: 6px; }
.lp-feature p { color: var(--c-muted); margin: 0; }
.lp-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.lp-faq details { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 4px 20px; }
.lp-faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--c-brand); font-size: 1.3rem; line-height: 1; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq details p { color: var(--c-muted); margin: 0 0 16px; }
.lp-band { background: var(--c-ink); color: var(--c-bg); border-radius: calc(var(--radius) + 8px); padding: 44px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lp-band h2 { color: var(--c-bg); margin: 0 0 6px; }
.lp-band p { margin: 0; opacity: .8; }
.lp-free { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.lp-free div { padding: 16px 18px; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.lp-free .ui-ic { color: var(--c-good); margin-top: 2px; }
.lp-free small { display: block; font-weight: 400; color: var(--c-muted); font-size: .85rem; margin-top: 2px; }
.lp-feature { border-radius: 0 !important; }
.lp-section .ui-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .lp-section .ui-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lp-section .ui-grid { grid-template-columns: 1fr; } }
.ui-grid .lp-feature .ui-ic { color: var(--c-accent); }
.lp-step::before { border-radius: 0 !important; font-family: var(--font-mono) !important; }
.lp-band { border-radius: 0 !important; }
.lp-hero::before { display: none; }
.lp-hero h1 em { font-style: normal; color: var(--c-accent); }
@media (max-width: 960px) { .lp-demo { grid-template-columns: 1fr; } .lp-join { border: 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); padding: 6px; } .lp-join .ui-ic { transform: rotate(90deg); } }
@media (max-width: 860px) {
  .lp-hero { padding-top: 32px; }
  .lp-top { grid-template-columns: 1fr; gap: 18px; margin-bottom: 26px; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-band { padding: 30px 22px; }
  .lp-section { padding: 40px 0; }
}
/* Watch section: the app's YouTube video. Click to play; nothing loads from YouTube before the click. */
.ytf .ytf-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; max-width: 1040px; margin: 0 auto; }
.ytf .ytf-copy h2 { margin: 6px 0 10px; }
.ytf .ytf-copy p { color: var(--c-muted); margin: 0 0 16px; }
.ytf .ytf-link { font-weight: 700; }
.ytf .ytf-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius, 16px); overflow: hidden; background: #000; border: 1px solid var(--c-line); box-shadow: var(--shadow-lg); }
.ytf .ytf-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytf .ytf-cover { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font: inherit; cursor: pointer; display: block; }
.ytf .ytf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-base) var(--ease-out), filter var(--dur-base) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ytf .ytf-cover:hover img { transform: scale(1.02); filter: brightness(.92); } }
.ytf .ytf-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); line-height: 0; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); transition: transform .2s; }
.ytf .ytf-cover:focus-visible .ytf-play { transform: translate(-50%, -50%) scale(1.08); }
.ytf .ytf-cover:focus-visible { outline: 3px solid var(--c-brand); outline-offset: -3px; }
.ytf .ytf-len { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .78rem; font-weight: 700; line-height: 1.3; padding: 3px 7px; border-radius: 5px; }
.ytf .ytf-note { font-size: .8rem; color: var(--c-muted); margin: 10px 2px 0; }
@media (max-width: 800px) { .ytf .ytf-in { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
@media (max-width: 480px) { .ytf .ytf-play svg { width: 56px; height: 40px; } }

/* ===== forms (from web/pages/forms.html) ===== */
.fm-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--c-line); margin-bottom: 30px; }
.fm-top > div { padding: 16px 18px; border-right: 1px solid var(--c-line); }
.fm-top > div:last-child { border-right: 0; }
.fm-top b { display: block; font: 700 1.9rem/1 var(--font-display); letter-spacing: -.03em; }
.fm-top > div > span { font: 500 .74rem/1.4 var(--font-mono); color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; }
.fm-sec { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 12px; border-bottom: 2px solid var(--c-ink); padding-bottom: 8px; }
.fm-sec h2 { margin: 0; font-size: 1.15rem; }
.fm-sec > span { font: .78rem var(--font-mono); color: var(--c-muted); }
.fm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0; border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.fm-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 14px; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  background: var(--c-surface); min-height: 190px; }
.fm-card::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--acc, var(--c-ink)); }
.fm-card:hover { background: var(--c-surface-2); }
.fm-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.25; }
.fm-card h3 a { color: inherit; text-decoration: none; }
.fm-card h3 a::after { content: ""; position: absolute; inset: 0; }
.fm-card .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-nums { display: flex; gap: 18px; margin-top: auto; align-items: flex-end; }
.fm-nums div b { display: block; font: 600 1.3rem/1 var(--font-mono); letter-spacing: -.02em; }
.fm-nums > div > span { font: .7rem var(--font-mono); color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }
.fm-nums .ff-spark { margin-left: auto; color: var(--acc, var(--c-ink)); }
.fm-acts { position: relative; z-index: 2; display: flex; gap: 4px; border-top: 1px solid var(--c-line); padding-top: 10px; margin: 2px -6px 0; }
.fm-acts .ui-btn { min-height: 32px; padding: 5px 10px; font-size: .82rem; }
.fm-empty { border: 1px dashed var(--c-muted); padding: 36px 24px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.fm-empty h3 { margin: 0 0 4px; }
.fm-new-tabs { display: flex; border: 1px solid var(--c-line); margin: 4px 0 18px; }
.fm-new-tabs button { flex: 1; font: 600 .86rem var(--font-body); padding: 11px 8px; border: 0; border-right: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.fm-new-tabs button:last-child { border-right: 0; }
.fm-new-tabs button.on { background: var(--c-ink); color: var(--c-bg); }
@media (max-width: 720px) { .fm-new-tabs { flex-wrap: wrap; } .fm-new-tabs button { flex: 1 1 33%; border-bottom: 1px solid var(--c-line); } .fm-new-tabs button span { font-size: .8rem; } }
.fm-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; }
.fm-tpl { text-align: left; font: inherit; color: inherit; border: 1px solid var(--c-line); background: var(--c-surface); padding: 12px 14px; cursor: pointer; display: grid; gap: 4px; }
.fm-tpl:hover { border-color: var(--c-ink); }
.fm-tpl b { font-size: .95rem; } .fm-tpl span { font-size: .82rem; color: var(--c-muted); }
.fm-tpl i { font: normal .68rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--c-faint); }
.fm-paste textarea { font-family: var(--font-mono) !important; font-size: .9rem !important; min-height: 210px !important; }
.fm-guess { max-height: 160px; overflow: auto; border: 1px solid var(--c-line); padding: 8px 10px; font-size: .85rem; display: grid; gap: 4px; }
.fm-guess div { display: flex; gap: 8px; align-items: center; }
.fm-guess .ui-badge { flex: none; }
@media (max-width: 720px) {
  .fm-top b { font-size: 1.45rem; } .fm-top > div { padding: 12px; }
  .fm-list { grid-template-columns: 1fr; }
  .fm-empty { grid-template-columns: 1fr; }
}

/* ===== templates (from web/pages/templates.html) ===== */
.tp-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tp-cats button { font: 600 .82rem var(--font-body); border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-muted); padding: 7px 12px; cursor: pointer; border-radius: 3px; }
.tp-cats button.on { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.tp-card { border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); background: var(--c-surface); display: flex; flex-direction: column; text-align: left; font: inherit; color: inherit; padding: 0; cursor: pointer; }
.tp-card:hover { background: var(--c-surface-2); }
.tp-thumb { height: 116px; background: var(--acc); position: relative; overflow: hidden; padding: 16px; }
.tp-thumb .sheet { position: absolute; left: 18px; right: 18px; top: 24px; bottom: -10px; background: var(--c-bg); padding: 12px 14px; display: grid; gap: 7px; align-content: start; }
.tp-thumb .sheet i { display: block; height: 6px; background: var(--c-line); }
.tp-thumb .sheet i.t { width: 60%; height: 9px; background: var(--c-ink); }
.tp-thumb .sheet i.b { width: 38%; height: 14px; background: var(--acc); margin-top: 4px; }
.tp-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.tp-body i { font: normal .68rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--c-faint); }
.tp-body b { font-size: 1.02rem; } .tp-body span { color: var(--c-muted); font-size: .88rem; }
.tp-ov { position: fixed; inset: 0; z-index: 950; background: var(--c-bg); overflow: auto; }
.tp-ov-bar { position: sticky; top: 0; z-index: 10; display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: var(--c-ink); color: var(--c-bg); flex-wrap: wrap; }
.tp-ov-bar b { font: 600 .82rem var(--font-mono); margin-right: auto; }
.tp-ov-bar .ui-btn { min-height: 34px; padding: 5px 12px; }
.tp-ov-bar .ui-btn.primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }

/* ===== results (from web/pages/results.html) ===== */
.rs-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--c-line); margin-bottom: 26px; }
.rs-kpis > div { padding: 14px 16px; border-right: 1px solid var(--c-line); }
.rs-kpis > div:last-child { border-right: 0; }
.rs-kpis b { display: block; font: 700 1.6rem/1 var(--font-mono); letter-spacing: -.03em; }
.rs-kpis > div > span { font: .75rem/1.3 var(--font-mono); color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }
.rs-grid { display: grid; grid-auto-flow: row dense; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.rs-q { padding: 18px 20px; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); background: var(--c-surface); min-width: 0; }
.rs-q.wide { grid-column: 1 / -1; }
.rs-q h3 { font-size: 1rem; margin: 0 0 2px; line-height: 1.3; }
.rs-q .sub { font: .72rem var(--font-mono); color: var(--c-muted); margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; }
.rs-n { font: 600 .72rem var(--font-mono); color: var(--c-accent); margin-right: 6px; }
.rs-bars { display: grid; gap: 7px; }
.rs-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: .88rem; align-items: baseline; }
.rs-bar > .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-bar > .v { font: 500 .8rem var(--font-mono); color: var(--c-muted); }
.rs-bar .track { grid-column: 1 / -1; height: 8px; background: var(--c-surface-2); }
.rs-bar .track i { display: block; height: 100%; background: var(--c-ink); }
.rs-bar.top .track i { background: var(--c-accent); }
.rs-bar.ok .track i { background: var(--c-good); }
.rs-big { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rs-big b { font: 700 2.4rem/1 var(--font-mono); letter-spacing: -.04em; }
.rs-big > span { color: var(--c-muted); font-size: .9rem; }
.rs-hist { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 6px; }
.rs-hist div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.rs-hist i { display: block; width: 100%; background: var(--c-ink); min-height: 1px; }
.rs-hist i.d { background: var(--c-bad); } .rs-hist i.p { background: var(--c-faint); } .rs-hist i.g { background: var(--c-good); }
.rs-hist span { font: .68rem var(--font-mono); color: var(--c-muted); }
.rs-nps { display: flex; height: 12px; margin: 10px 0 6px; }
.rs-nps i { display: block; height: 100%; }
.rs-legend { display: flex; gap: 14px; flex-wrap: wrap; font: .74rem var(--font-mono); color: var(--c-muted); }
.rs-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: 0; }
.rs-texts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.rs-texts li { padding: 8px 10px; background: var(--c-surface-2); font-size: .9rem; overflow-wrap: anywhere; }
.rs-texts li small { display: block; color: var(--c-faint); font: .7rem var(--font-mono); margin-top: 2px; }
.rs-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.rs-tools input[type=search] { max-width: 320px; }
.rs-table-wrap { overflow-x: auto; border: 1px solid var(--c-line); }
.rs-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.rs-table th, .rs-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-line); vertical-align: top; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-table th { font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); background: var(--c-surface-2); position: sticky; top: 0; }
.rs-table tbody tr { cursor: pointer; }
.rs-table tbody tr:hover { background: var(--c-surface-2); }
.rs-table td.num { font-family: var(--font-mono); }
.rs-funnel { display: grid; gap: 4px; }
.rs-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) 140px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
.rs-step .k { font: 600 .72rem var(--font-mono); color: var(--c-muted); }
.rs-step .lbl { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-step .bar { height: 12px; background: var(--c-surface-2); position: relative; }
.rs-step .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c-ink); }
.rs-step.worst .bar i { background: var(--c-accent); }
.rs-step .n { font: 500 .82rem var(--font-mono); text-align: right; }
.rs-step .n small { display: block; color: var(--c-bad); }
.rs-callout { border: 1px solid color-mix(in srgb, var(--c-accent) 35%, transparent); background: var(--c-accent-soft); padding: 14px 16px; margin-bottom: 18px; }
.rs-callout b { display: block; margin-bottom: 4px; }
.rs-detail dl { margin: 0; display: grid; gap: 12px; }
.rs-detail dt { font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.rs-detail dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.rs-detail img.sig { max-width: 280px; background: #fff; border: 1px solid var(--c-line); }
.rs-sig-typed { font: italic 500 1.6rem "Fraunces", Georgia, serif; }
.rs-ro { background: var(--c-surface-2); padding: 10px 14px; font-size: .9rem; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 900px) { .rs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rs-kpis > div:nth-child(3) { border-right: 0; } .rs-kpis > div:nth-child(-n+3) { border-bottom: 1px solid var(--c-line); } .rs-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .rs-step { grid-template-columns: 26px minmax(0, 1fr) 76px; gap: 8px; } .rs-kpis b { font-size: 1.25rem; } .rs-kpis > div { padding: 10px; } }

/* ===== f (from web/pages/f.html) ===== */
.page-f .ui-main { background: var(--c-bg); }
.ff-report .ui-choices { grid-template-columns: 1fr; }

/* ===== _ffr (from web/pages/_ffr.html) ===== */
.ffr { --a: #0a0a0a; --ai: #fff; --ff-font: var(--font-body); font-family: var(--ff-font); color: var(--c-ink); position: relative; min-height: 100%; }
.ffr *, .ffr *::before, .ffr *::after { box-sizing: border-box; }
.ffr-cover { height: 0; }
.ffr-cover.band { height: 128px; background: var(--a); position: relative; overflow: hidden; }
.ffr-cover.band::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(90deg, color-mix(in srgb, var(--ai) 18%, transparent) 1px, transparent 1px);
  background-size: 64px 100%; }
.ffr-cover.grid { height: 128px; background-color: color-mix(in srgb, var(--a) 7%, var(--c-bg));
  background-image: linear-gradient(color-mix(in srgb, var(--a) 30%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--a) 30%, transparent) 1px, transparent 1px);
  background-size: 24px 24px; border-bottom: 2px solid var(--a); }
.ffr-cover.dots { height: 128px; background-color: color-mix(in srgb, var(--a) 6%, var(--c-bg)); background-image: radial-gradient(var(--a) 1.6px, transparent 1.7px);
  background-size: 18px 18px; border-bottom: 2px solid var(--a); }
.ffr-in { max-width: 680px; margin: 0 auto; padding: 36px 24px 48px; }
.ffr.center .ffr-head, .ffr.center .ffr-end { text-align: center; }
.ffr-progress { position: sticky; top: 0; z-index: 5; height: 3px; background: var(--c-line); margin: -36px -24px 33px; }
.ffr-progress i { display: block; height: 100%; background: var(--a); width: 0; transition: width .3s; }
.ffr.embed .ffr-progress { margin-top: -24px; }
.ffr-head h1 { font-family: var(--ff-font); font-size: clamp(1.8rem, 4.6vw, 2.6rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 12px; font-weight: 700; }
.ffr.f-serif .ffr-head h1, .ffr.f-serif .ffr-q legend, .ffr.f-serif .ffr-q > label.ffr-lab, .ffr.f-serif .ffr-end h2 { font-weight: 600; letter-spacing: -.02em; }
.ffr-head .desc { color: var(--c-muted); font-size: 1.05rem; margin: 0 0 8px; }
.ffr-head .meta { font: 500 .78rem/1.3 var(--font-mono); color: var(--c-faint); margin: 10px 0 0; letter-spacing: .02em; }
/* design-ok: side-tab (a typing caret / the editor's block and rule markers / a form notice) */
.ffr-notice { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; background: var(--c-surface-2); padding: 10px 14px; border-left: 3px solid var(--a); margin: 18px 0 0; }
.ffr-notice button { font: inherit; font-weight: 600; background: none; border: 0; color: var(--c-ink); text-decoration: underline; cursor: pointer; padding: 0; }
.ffr-form { margin-top: 28px; }
.ffr-errors { border: 2px solid var(--c-bad); padding: 14px 16px; margin-bottom: 22px; }
.ffr-errors h2 { font-size: 1rem; margin: 0 0 6px; color: var(--c-bad); }
.ffr-errors ul { margin: 0; padding-left: 18px; }
.ffr-errors a { color: var(--c-ink); }
.ffr-b { margin: 0 0 30px; }
.ffr-b[hidden] { display: none !important; }
.ffr-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.ffr-q legend, .ffr-q > label.ffr-lab { display: block; padding: 0; font-weight: 600; font-size: 1.08rem; line-height: 1.35; margin: 0 0 10px; width: 100%; }
.ffr-n { display: inline-block; font: 600 .74rem/1 var(--font-mono); color: var(--a); margin-right: 8px; vertical-align: 2px; letter-spacing: .02em; }
.ffr.dark-accent .ffr-n { color: var(--c-ink); }
.ffr-req { font: 500 .75rem/1 var(--font-mono); color: var(--c-muted); margin-left: 6px; vertical-align: 2px; text-transform: lowercase; }
.ffr-help { color: var(--c-muted); font-size: .92rem; margin: -4px 0 10px; }
.ffr-err { color: var(--c-bad); font-size: .9rem; font-weight: 600; margin: 8px 0 0; display: flex; gap: 6px; align-items: center; }
.ffr-err::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; background: var(--c-bad); color: #fff; font: 700 .7rem/1 var(--font-mono); }
.ffr input[type=text], .ffr input[type=email], .ffr input[type=tel], .ffr input[type=url], .ffr input[type=number], .ffr input[type=date], .ffr input[type=time], .ffr select, .ffr textarea {
  font: inherit; font-size: 1.05rem; color: var(--c-ink); background: var(--c-surface); border: 1.5px solid var(--c-line); border-radius: 3px; padding: 12px 14px; width: 100%; min-height: 50px; margin: 0; }
.ffr textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.ffr input:focus, .ffr select:focus, .ffr textarea:focus { outline: none; border-color: var(--a); box-shadow: 0 0 0 1px var(--a); }
.ffr.dark-accent input:focus, .ffr.dark-accent select:focus, .ffr.dark-accent textarea:focus { border-color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-ink); }
.ffr [aria-invalid=true] { border-color: var(--c-bad) !important; }
.ffr :focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.ffr-count { font: .75rem/1 var(--font-mono); color: var(--c-faint); text-align: right; margin-top: 4px; }
.ffr-unit { display: flex; align-items: center; gap: 8px; }
.ffr-unit span { font: 500 .95rem var(--font-mono); color: var(--c-muted); }
.ffr-opts { display: grid; gap: 8px; }
.ffr-opts.cols { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ffr-opt { position: relative; display: block; }
.ffr-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ffr-opt > span { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--c-line); background: var(--c-surface); cursor: pointer; min-height: 50px; transition: border-color .12s, background .12s; }
.ffr-opt > span:hover { border-color: var(--c-ink); }
.ffr-opt kbd { flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; font: 600 .72rem/1 var(--font-mono); border: 1px solid var(--c-line); color: var(--c-muted); background: var(--c-bg); }
.ffr-opt .box { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--c-muted); display: inline-grid; place-items: center; }
.ffr-opt.radio .box { border-radius: 50%; }
.ffr-opt input:checked + span { border-color: var(--a); background: color-mix(in srgb, var(--a) 9%, var(--c-surface)); }
.ffr.dark-accent .ffr-opt input:checked + span { border-color: var(--c-ink); background: var(--c-surface-2); }
.ffr-opt input:checked + span .box { background: var(--a); border-color: var(--a); }
.ffr-opt input:checked + span .box::after { content: ""; width: 6px; height: 6px; background: var(--ai); border-radius: 50%; }
.ffr-opt.check input:checked + span .box::after { width: 9px; height: 5px; background: none; border-radius: 0; border: 2px solid var(--ai); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.ffr-opt input:checked + span kbd { background: var(--a); color: var(--ai); border-color: var(--a); }
.ffr-opt input:focus-visible + span { outline: 2px solid var(--a); outline-offset: 2px; }
.ffr-other { margin-top: 8px; }
.ffr-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 360px; }
.ffr-yn .ffr-opt > span { justify-content: center; font-weight: 600; }
.ffr-stars { display: flex; gap: 4px; flex-wrap: wrap; }
.ffr-stars label { cursor: pointer; position: relative; }
.ffr-stars input { position: absolute; opacity: 0; }
.ffr-stars svg { width: 40px; height: 40px; display: block; color: var(--c-line); transition: color .1s, transform .1s; }
.ffr-stars label.on svg { color: var(--a); }
.ffr.dark-accent .ffr-stars label.on svg { color: #f2b01e; }
@media (hover: hover) and (pointer: fine) { .ffr-stars label:hover svg { transform: scale(1.08); } }
.ffr-stars input:focus-visible + svg { outline: 2px solid var(--a); outline-offset: 2px; }
.ffr-scale { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; }
.ffr-scale label { position: relative; }
.ffr-scale input { position: absolute; opacity: 0; }
.ffr-scale span { display: grid; place-items: center; height: 48px; border: 1.5px solid var(--c-line); font: 600 1rem var(--font-mono); cursor: pointer; background: var(--c-surface); }
.ffr-scale span:hover { border-color: var(--c-ink); }
.ffr-scale input:checked + span { background: var(--a); border-color: var(--a); color: var(--ai); }
.ffr-scale input:focus-visible + span { outline: 2px solid var(--a); outline-offset: 2px; }
.ffr-ends { display: flex; justify-content: space-between; font-size: .84rem; color: var(--c-muted); margin-top: 6px; gap: 12px; }
.ffr-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ffr-rank li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 1.5px solid var(--c-line); background: var(--c-surface); }
.ffr-rank li b { font: 600 .8rem var(--font-mono); color: var(--a); width: 22px; }
.ffr-rank li span { flex: 1; }
.ffr-rank button, .ffr-mini { font: 600 .85rem var(--font-body); border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-ink); min-width: 36px; height: 36px; cursor: pointer; border-radius: 3px; }
.ffr-rank button:disabled { opacity: .3; cursor: default; }
.ffr-mini { padding: 0 12px; }
.ffr-drop { border: 1.5px dashed var(--c-muted); padding: 22px; text-align: center; background: var(--c-surface); display: block; cursor: pointer; }
.ffr-drop:hover, .ffr-drop.over { border-color: var(--a); background: color-mix(in srgb, var(--a) 6%, var(--c-surface)); }
.ffr-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ffr-drop:focus-within { outline: 2px solid var(--a); outline-offset: 2px; }
.ffr-files { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.ffr-files li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--c-surface-2); font-size: .92rem; }
.ffr-files li span { flex: 1; overflow-wrap: anywhere; }
.ffr-sig-tabs { display: flex; gap: 0; margin-bottom: 8px; }
.ffr-sig-tabs button { font: 600 .85rem var(--font-body); padding: 8px 14px; border: 1.5px solid var(--c-line); background: var(--c-surface); color: var(--c-muted); cursor: pointer; }
.ffr-sig-tabs button + button { border-left: 0; }
.ffr-sig-tabs button.on { color: var(--c-ink); border-color: var(--c-ink); }
.ffr-sig canvas { display: block; width: 100%; height: 170px; background: var(--c-surface); border: 1.5px solid var(--c-line); touch-action: none; cursor: crosshair; }
.ffr-sig .typed { font: italic 500 2rem/1.2 "Fraunces", Georgia, serif; min-height: 64px; padding: 10px 4px; border-bottom: 1.5px solid var(--c-ink); margin-top: 10px; color: var(--c-ink); }
.ffr-sig-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: .84rem; color: var(--c-muted); gap: 10px; }
.ffr-consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px; border: 1.5px solid var(--c-line); background: var(--c-surface); }
.ffr-consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--a); flex: none; }
.ffr-calc { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 18px; border: 2px solid var(--c-ink); }
.ffr-calc b { font: 700 1.6rem/1 var(--font-mono); letter-spacing: -.02em; }
.ffr-pay { border: 2px solid var(--c-ink); padding: 16px 18px; display: grid; gap: 12px; }
.ffr-pay-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ffr-pay-amt { font: 700 1.6rem/1 var(--font-mono); letter-spacing: -.02em; }
.ffr-pay a.ffr-btn { text-decoration: none; }
.ffr-pay .ffr-hint { display: block; }
.ffr-pay .ffr-consent { padding: 10px 12px; }
.ffr-heading { font-family: var(--ff-font); margin: 8px 0 4px; letter-spacing: -.02em; line-height: 1.15; }
h2.ffr-heading { font-size: 1.6rem; } h3.ffr-heading { font-size: 1.2rem; }
.ffr-page-title { font: 600 .78rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); padding-bottom: 10px; border-bottom: 1px solid var(--c-line); margin-bottom: 26px; }
.ffr-text { color: var(--c-ink); font-size: 1.02rem; }
.ffr-text a { color: inherit; }
.ffr hr { border: 0; border-top: 1px solid var(--c-line); margin: 6px 0; }
.ffr-img img { max-width: 100%; display: block; }
.ffr-nav { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.ffr-btn { font: 600 1.02rem/1 var(--ff-font); display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 3px; cursor: pointer;
  border: 1.5px solid var(--a); background: var(--a); color: var(--ai); transition: opacity .12s, transform .1s; }
.ffr-btn:hover { opacity: .9; } .ffr-btn:active { transform: translateY(1px); }
.ffr-btn.ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.ffr-btn:disabled { opacity: .5; cursor: wait; }
.ffr-btn svg { width: 18px; height: 18px; }
.ffr-hint { font: .78rem/1.2 var(--font-mono); color: var(--c-faint); }
.ffr-foot { margin-top: 48px; padding-top: 14px; border-top: 1px solid var(--c-line); display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .8rem; color: var(--c-faint); }
.ffr-foot a, .ffr-foot button { color: var(--c-muted); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ffr-foot .brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; color: var(--c-muted); }
.ffr-foot .brand img { width: 16px; height: 16px; border-radius: 3px; }
.ffr-end { padding: 30px 0 10px; }
.ffr-end .tick { width: 64px; height: 64px; display: grid; place-items: center; background: var(--a); color: var(--ai); margin-bottom: 22px; }
.ffr.center .ffr-end .tick { margin-left: auto; margin-right: auto; }
.ffr-end .tick svg { width: 32px; height: 32px; }
.ffr-end h2 { font-family: var(--ff-font); font-size: clamp(1.7rem, 4.4vw, 2.4rem); letter-spacing: -.03em; margin: 0 0 12px; line-height: 1.1; }
.ffr-end p { color: var(--c-muted); font-size: 1.05rem; }
.ffr-score { display: inline-flex; align-items: baseline; gap: 6px; font: 700 3rem/1 var(--font-mono); margin: 4px 0 18px; letter-spacing: -.04em; }
.ffr-score small { font-size: 1.1rem; color: var(--c-muted); font-weight: 500; }
.ffr-closed { padding: 60px 0; }
.ffr-preview-bar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px;
  background: var(--c-accent); color: #fff; font: 600 .8rem/1.2 var(--font-mono); text-align: center; }
/* one question at a time */
.ffr.focus .ffr-in { min-height: min(86vh, 760px); display: flex; flex-direction: column; }
.ffr.focus .ffr-form { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ffr.focus .ffr-q legend, .ffr.focus .ffr-q > label.ffr-lab { font-size: clamp(1.3rem, 3.2vw, 1.75rem); letter-spacing: -.02em; line-height: 1.25; margin-bottom: 16px; }
.ffr.focus .ffr-help { font-size: 1rem; margin-top: -8px; }
.ffr.focus .ffr-b { margin-bottom: 24px; }
.ffr.focus .step-in { animation: ffr-in .28s ease-out; }
@keyframes ffr-in { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 640px) {
  .ffr-in { padding: 26px 16px 40px; }
  .ffr-progress { margin: -26px -16px 23px; }
  .ffr-cover.band, .ffr-cover.grid, .ffr-cover.dots { height: 84px; }
  .ffr-scale { grid-template-columns: repeat(var(--nm, var(--n)), minmax(0, 1fr)); }
  .ffr-scale span { height: 44px; font-size: .9rem; }
  .ffr-stars svg { width: 36px; height: 36px; }
  .ffr-nav .ffr-btn { flex: 1; justify-content: center; }
  .ffr-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ffr.focus .step-in { animation-name: kit-fade; } }

/* ===== edit (from web/pages/edit.html) ===== */
.ed { --ed-w: 760px; }
.ed-bar { position: sticky; top: var(--header-h); z-index: 30; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.ed-bar-in { max-width: var(--maxw); margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-bar-in .ui-btn.sm { padding: 6px 10px; }
.ed-bar .ttl { font: 700 1.05rem/1.2 var(--font-display); letter-spacing: -.02em; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-save { font: .74rem var(--font-mono); color: var(--c-faint); min-width: 70px; }
.ed-save.bad { color: var(--c-bad); }
.ed-tabs { display: flex; gap: 0; border: 1px solid var(--c-line); }
.ed-tabs a { font: 600 .84rem/1 var(--font-body); padding: 9px 13px; text-decoration: none; color: var(--c-muted) !important; border-right: 1px solid var(--c-line); display: inline-flex; gap: 6px; align-items: center; }
.ed-tabs a:last-child { border-right: 0; }
.ed-tabs a.on { background: var(--c-ink); color: var(--c-bg) !important; }
.ed-tabs .ui-ic { width: 15px; height: 15px; }
.ed-body { max-width: var(--maxw); margin: 0 auto; padding: 26px 24px 120px; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 32px; align-items: start; }
.ed-canvas { max-width: var(--ed-w); width: 100%; }
.ui .ed-title { resize: none; overflow: hidden; font: 700 clamp(1.7rem, 3.8vw, 2.4rem)/1.1 var(--font-display) !important; letter-spacing: -.03em; border: 0 !important; padding: 4px 0 !important; background: none !important; box-shadow: none !important; min-height: 0 !important; }
.ui .ed-desc { border: 0 !important; padding: 4px 0 !important; background: none !important; box-shadow: none !important; min-height: 30px !important; color: var(--c-muted) !important; resize: none; overflow: hidden; }
.ed-blocks { margin-top: 18px; display: grid; gap: 0; }
/* design-ok: side-tab (a typing caret / the editor's block and rule markers / a form notice) */
.ed-b { position: relative; border: 1px solid transparent; border-left: 3px solid transparent; padding: 14px 14px 12px 46px; background: var(--c-bg); transition: border-color .12s; }
.ed-b:hover { border-color: var(--c-line); border-left-color: var(--c-line); }
.ed-b:focus-within, .ed-b.sel { border-color: var(--c-line); border-left-color: var(--c-accent); background: var(--c-surface); }
.ed-b.drop-before { box-shadow: inset 0 3px 0 var(--c-accent); }
.ed-b.drop-after { box-shadow: inset 0 -3px 0 var(--c-accent); }
.ed-b.flagged { border-left-color: var(--c-bad) !important; }
.ed-gut { position: absolute; left: 6px; top: 14px; display: grid; justify-items: center; gap: 4px; width: 32px; }
.ed-gut .n { font: 600 .75rem/1 var(--font-mono); color: var(--c-accent); }
.ed-gut .ty { color: var(--c-faint); display: grid; place-items: center; }
.ed-gut .ty .ui-ic { width: 16px; height: 16px; }
.ed-gut .drag { cursor: grab; color: var(--c-faint); border: 0; background: none; padding: 2px; opacity: 0; }
.ed-b:hover .drag, .ed-b:focus-within .drag { opacity: 1; }
.ed-b input.lab, .ed-b textarea.lab { font: 600 1.06rem/1.35 var(--font-body) !important; border: 0 !important; padding: 2px 0 !important; min-height: 0 !important; background: transparent !important; box-shadow: none !important; }
.ed-b textarea.lab { resize: none; overflow: hidden; min-height: 28px !important; }
.ed-b[data-type=heading] input.lab { font: 700 1.5rem/1.2 var(--font-display) !important; letter-spacing: -.02em; }
.ed-b[data-type=heading][data-size=h3] input.lab { font-size: 1.15rem !important; }
.ed-b[data-type=text] textarea.lab { font-weight: 400 !important; }
.ed-b input.help { font-size: .88rem !important; color: var(--c-muted) !important; border: 0 !important; padding: 2px 0 !important; min-height: 0 !important; background: transparent !important; box-shadow: none !important; }
.ed-b:not(:focus-within) input.help:placeholder-shown { display: none; }
.ed-mock { margin-top: 8px; display: grid; gap: 6px; }
.ed-fake { border: 1px dashed var(--c-line); padding: 10px 12px; color: var(--c-faint); font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.ed-fake input { border: 0 !important; padding: 0 !important; min-height: 0 !important; background: transparent !important; box-shadow: none !important; font-size: .9rem !important; color: var(--c-muted) !important; }
.ed-opt { display: flex; align-items: center; gap: 8px; }
.ed-opt .mk { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--c-muted); }
.ed-opt .mk.r { border-radius: 50%; }
.ed-opt input.ol { flex: 1; border: 0 !important; border-bottom: 1px solid transparent !important; border-radius: 0 !important; padding: 5px 2px !important; min-height: 0 !important; background: transparent !important; box-shadow: none !important; font-size: .95rem !important; }
.ed-opt input.ol:focus { border-bottom-color: var(--c-ink) !important; }
.ed-opt input.ov { width: 76px; flex: none; font: .8rem var(--font-mono) !important; padding: 4px 6px !important; min-height: 0 !important; }
.ed-opt .ok { border: 1px solid var(--c-line); background: var(--c-surface); width: 28px; height: 28px; cursor: pointer; color: var(--c-faint); display: grid; place-items: center; padding: 0; }
.ed-opt .ok.on { background: var(--c-good); border-color: var(--c-good); color: #fff; }
.ed-opt .x { border: 0; background: none; color: var(--c-faint); cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; opacity: 0; padding: 0; }
.ed-opt:hover .x, .ed-opt:focus-within .x { opacity: 1; }
.ed-linkbtn { font: 600 .82rem var(--font-body); color: var(--c-muted); background: none; border: 0; padding: 4px 0; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.ed-linkbtn:hover { color: var(--c-ink); }
.ed-linkbtn .ui-ic { width: 14px; height: 14px; }
.ed-b:not(:focus-within):not(.sel) .ed-props { display: none; }
.ed-props { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; align-items: center; font-size: .84rem; color: var(--c-muted); }
.ed-props label { display: inline-flex; align-items: center; gap: 6px; }
.ed-props input[type=number], .ed-props input[type=text], .ed-props select { width: auto !important; min-height: 32px !important; padding: 4px 8px !important; font-size: .85rem !important; }
.ed-props input[type=number] { width: 74px !important; }
.ed-props input.wide { width: 220px !important; }
.ed-props input[type=checkbox] { accent-color: var(--c-ink); width: 16px; height: 16px; }
.ed-formula { display: grid; gap: 6px; margin-top: 8px; }
.ed-paylink { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) 90px; gap: 8px; align-items: center; }
.ed-paylink span { font-weight: 600; color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-paylink input, .ed-paylink input.wide { width: 100% !important; }
@media (max-width: 720px) { .ed-paylink { grid-template-columns: 1fr 90px; } .ed-paylink span { grid-column: 1 / -1; } }
.ed-formula input { font-family: var(--font-mono) !important; }
.ed-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ed-chips button { font: .74rem var(--font-mono); border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-ink); padding: 3px 7px; cursor: pointer; border-radius: 3px; }
.ed-tools { display: flex; align-items: center; gap: 2px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--c-line); flex-wrap: wrap; }
.ed-b:not(:focus-within):not(.sel):not(:hover) .ed-tools { visibility: hidden; height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; }
.ed-tools .ui-btn { min-height: 30px; padding: 4px 9px; font-size: .8rem; }
.ed-tools .req { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 600; padding: 0 8px; cursor: pointer; }
.ed-tools .req input { accent-color: var(--c-ink); }
.ed-tools .key { font: .72rem var(--font-mono); color: var(--c-faint); margin-left: auto; padding: 0 4px; }
/* design-ok: side-tab (a typing caret / the editor's block and rule markers / a form notice) */
.ed-rule { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-size: .84rem; background: var(--c-surface-2); padding: 7px 10px; border-left: 2px solid var(--c-accent); }
.ed-rule .ui-ic { width: 15px; height: 15px; margin-top: 2px; color: var(--c-accent); }
.ed-rule button { margin-left: auto; }
.ed-ins { position: relative; height: 0; z-index: 3; }
.ed-ins button { position: absolute; left: 50%; top: -11px; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-muted); display: grid; place-items: center; cursor: pointer; opacity: 0; padding: 0; transition: opacity .12s; }
.ed-ins:hover button, .ed-ins button:focus { opacity: 1; }
.ed-ins button .ui-ic { width: 13px; height: 13px; }
.ed-blocks:hover .ed-ins button { opacity: .35; }
.ed-blocks .ed-ins button:hover { opacity: 1; }
.ed-new { margin-top: 10px; position: relative; padding-left: 46px; }
.ed-new::before { content: "+"; position: absolute; left: 18px; top: 10px; font: 600 1rem var(--font-mono); color: var(--c-faint); }
.ed-new input { border: 0 !important; border-bottom: 1px dashed var(--c-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 1.02rem !important; }
.ed-new input:focus { border-bottom-color: var(--c-ink) !important; }
.ed-new .hint { font: .74rem var(--font-mono); color: var(--c-faint); margin-top: 6px; }
.ed-menu { position: absolute; z-index: 80; width: 320px; max-height: 360px; overflow: auto; background: var(--c-surface); border: 1px solid var(--c-ink); box-shadow: var(--shadow-lg); padding: 6px; }
.ed-menu h6 { font: 600 .75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c-faint); margin: 8px 8px 4px; }
.ed-menu button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; border: 0; background: none; padding: 7px 8px; cursor: pointer; font: 500 .9rem var(--font-body); color: var(--c-ink); }
.ed-menu button small { color: var(--c-faint); margin-left: auto; font-size: .74rem; }
.ed-menu button.on, .ed-menu button:hover { background: var(--c-surface-2); }
.ed-menu button .ui-ic { width: 16px; height: 16px; color: var(--c-muted); }
.ed-side { position: sticky; top: calc(var(--header-h) + 76px); display: grid; gap: 14px; }
.ed-panel { border: 1px solid var(--c-line); background: var(--c-surface); }
.ed-panel h4 { font: 600 .75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--c-line); display: flex; justify-content: space-between; }
.ed-panel .in { padding: 12px 14px; }
.ed-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.ed-stats div { padding: 12px 14px; border-right: 1px solid var(--c-line); }
.ed-stats div:last-child { border-right: 0; }
.ed-stats b { display: block; font: 700 1.3rem/1 var(--font-mono); }
.ed-stats span { font: .66rem var(--font-mono); text-transform: uppercase; color: var(--c-muted); }
.ed-doc { list-style: none; margin: 0; padding: 0; display: grid; }
.ed-doc li { display: flex; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--c-line); font-size: .85rem; cursor: pointer; align-items: flex-start; }
.ed-doc li:last-child { border-bottom: 0; }
.ed-doc li i { flex: none; width: 8px; height: 8px; margin-top: 6px; }
.ed-doc li.block i { background: var(--c-bad); } .ed-doc li.warn i { background: var(--c-warn); } .ed-doc li.tip i { background: var(--c-faint); border-radius: 50%; }
.ed-doc .allgood { color: var(--c-good); cursor: default; }
.ed-keys { font: .76rem/1.7 var(--font-mono); color: var(--c-muted); }
.ed-keys kbd { font: inherit; border: 1px solid var(--c-line); padding: 0 4px; background: var(--c-surface-2); }
.ed-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ed-sec { border-top: 2px solid var(--c-ink); padding-top: 14px; margin-bottom: 30px; }
.ed-sec > h3 { font-size: 1.02rem; margin-bottom: 4px; }
.ed-sec > p.muted { font-size: .9rem; }
.ed-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ed-cards label { position: relative; }
.ed-cards input { position: absolute; opacity: 0; }
.ed-cards > label > span { display: grid; gap: 6px; padding: 12px; border: 1.5px solid var(--c-line); cursor: pointer; font-size: .85rem; font-weight: 600; background: var(--c-surface); min-height: 100%; }
.ed-cards > label > span em { font-style: normal; font-weight: 400; color: var(--c-muted); font-size: .78rem; }
.ed-cards input:checked + span { border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); }
.ed-cards input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.ed-cards .aa { display: block; border: 0; padding: 0; font-size: 1.6rem; line-height: 1; font-weight: 600; }
.ed-sw { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ed-sw button { width: 34px; height: 34px; border: 2px solid var(--c-bg); outline: 1px solid var(--c-line); cursor: pointer; padding: 0; }
.ed-sw button.on { outline: 2px solid var(--c-ink); }
.ed-sw input[type=color] { width: 40px; height: 36px; border: 1px solid var(--c-line); padding: 2px; background: var(--c-surface); cursor: pointer; }
.ed-prev { position: sticky; top: calc(var(--header-h) + 76px); border: 1px solid var(--c-line); height: min(76vh, 760px); overflow: auto; background: var(--c-bg); }
.ed-prev-h { font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.ed-field { display: grid; gap: 6px; margin-bottom: 14px; }
.ed-field > span { font-weight: 600; font-size: .88rem; }
.ed-field > span em { font-style: normal; font-weight: 400; color: var(--c-muted); }
.ed-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--c-line); cursor: pointer; }
.ed-toggle input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--c-ink); flex: none; }
.ed-toggle b { display: block; font-size: .95rem; }
.ed-toggle span { color: var(--c-muted); font-size: .86rem; }
.ed-end { border: 1px solid var(--c-line); padding: 14px; margin-bottom: 10px; background: var(--c-surface); display: grid; gap: 8px; }
.ed-end .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-link { display: flex; gap: 0; }
.ed-link input { border-right: 0 !important; border-radius: 0 !important; font-family: var(--font-mono) !important; font-size: .86rem !important; }
.ed-link .ui-btn { border-radius: 0; }
.ed-code { font: .78rem/1.5 var(--font-mono) !important; min-height: 120px !important; white-space: pre; }
.ed-qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ed-qr canvas, .ed-qr img { width: 132px; height: 132px; image-rendering: pixelated; border: 1px solid var(--c-line); background: #fff; padding: 6px; }
.ed-log { font: .76rem var(--font-mono); display: grid; gap: 2px; margin-top: 8px; }
.ed-log .okk { color: var(--c-good); } .ed-log .bad { color: var(--c-bad); }
.ed-team li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--c-line); font-size: .9rem; }
.ed-team { list-style: none; margin: 0 0 10px; padding: 0; }
.ed-overlay { position: fixed; inset: 0; z-index: 950; background: var(--c-bg); overflow: auto; }
.ed-overlay-bar { position: sticky; top: 0; z-index: 10; display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 14px; background: var(--c-ink); color: var(--c-bg); font: 600 .78rem var(--font-mono); }
.ed-overlay-bar .ui-btn { min-height: 32px; padding: 4px 12px; }
.ed-ro { background: var(--c-warn-soft); color: var(--c-warn); padding: 10px 14px; font-size: .9rem; margin-bottom: 16px; }
@media (max-width: 1180px) { .ed-bar .ttl, .ed-save { display: none; } }
@media (max-width: 1000px) {
  .ed-body { grid-template-columns: 1fr; }
  .ed-side { position: static; order: -1; }
  .ed-side .ed-keys-panel { display: none; }
  .ed-two { grid-template-columns: 1fr; }
  .ed-prev { position: static; height: 560px; }
}
@media (max-width: 720px) {
  .ed-bar-in { padding: 8px 12px; gap: 8px; }
  .ed-bar .ttl { display: none; }
  .ed-tabs { order: 5; width: 100%; }
  .ed-tabs a { flex: 1; justify-content: center; padding: 10px 4px; font-size: .8rem; }
  .ed-tabs a .lbl { display: none; }
  .ed-tabs a.on .lbl { display: inline; }
  .ed-body { padding: 16px 12px 110px; }
  .ed-b { padding: 12px 8px 10px 36px; }
  .ed-gut { left: 2px; width: 30px; }
  .ed-new { padding-left: 36px; }
  .ed-new::before { left: 12px; }
  .ed-tools .key { display: none; }
  .ed-menu { width: calc(100vw - 24px); left: 12px !important; }
  .ed-props input.wide { width: 100% !important; }
  .ed-opt .x { opacity: 1; }
}

/* ===== auth ===== */
.au-wrap { min-height: calc(100vh - var(--header-h) - 160px); display: grid; place-items: center; padding: 40px 16px 64px; }
.au-card { width: min(100%, 440px); padding: 30px; }
.au-card h1 { font-size: 1.8rem; margin-bottom: 4px; }
.au-card .ui-seg { width: 100%; margin: 18px 0 20px; }
.au-card .ui-seg button { flex: 1; padding: 10px; }
.au-pw { position: relative; }
.au-pw input { padding-right: 70px; }
.au-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: .9rem; flex-wrap: wrap; }
.au-links a { cursor: pointer; }
.au-card .lk-consent, .au-card [class*="consent"] { font-size: .9rem; }
.au-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--c-muted); font-size: .85rem; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.au-google svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 480px) { .au-card { padding: 24px 18px; } }

/* ===== home ===== */
.hm-add { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 10px; align-items: start; margin-bottom: 22px; }
.hm-add textarea { min-height: 46px; height: 46px; }
@media (max-width: 720px) { .hm-add { grid-template-columns: 1fr; } .hm-add textarea { height: 90px; } }

/* ===== profile ===== */
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.pf-head .ui-avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.pf-head h1 { margin: 0; font-size: 1.8rem; }
.pf-links { display: grid; gap: 4px; }
.pf-links button, .pf-links a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: var(--radius-sm); border: 0; background: none;
  font: 500 .97rem/1.2 var(--font-body); color: var(--c-ink); cursor: pointer; text-decoration: none; text-align: left; width: 100%; }
.pf-links button:hover, .pf-links a:hover { background: var(--c-surface-2); }
@media (max-width: 720px) { .pf-grid { grid-template-columns: 1fr; } }

/* ===== admin ===== */
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.ad-fb { display: grid; gap: 10px; }
.ad-fb .ui-item { display: block; }
.ad-fb .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--c-muted); margin-bottom: 8px; }
.ad-fb .msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 10px; }
.ad-fb .ctx { font-size: .8rem; color: var(--c-faint); overflow-wrap: anywhere; margin-bottom: 10px; }
.ad-fb textarea { min-height: 60px; font-size: .92rem; }
.ad-users { width: 100%; border-collapse: collapse; font-size: .93rem; }
.ad-users th, .ad-users td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.ad-users th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.ad-users td.email { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .ad-users thead { display: none; }
  .ad-users tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
  .ad-users td { border: 0; padding: 0; }
  .ad-users td.joined { display: none; }
}

/* =====================================================================================================
   Anvil components: the same look through roles (prop:role='["btn", "btn-primary", "ic-wand"]').
   Button = .anvil-button wrapper > button; Link = a; TextBox = input; TextArea = textarea; DropDown = wrapper > select;
   RepeatingPanel = root > items container > item forms (grid rules go on "> div").
   ===================================================================================================== */

/* Anvil buttons: the wrapper is inline, the button inside resets Anvil's own padding and margins */
.anvil-role-btn { display: inline-block; }
.anvil-role-btn > button { margin: 0; }
.anvil-role-btn-block, .anvil-role-btn-block > button { display: flex; width: 100%; }
.anvil-role-btn-icon > button > span, .anvil-role-btn-icon > button .anvil-button-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* the round account button in the header */
.anvil-role-avatar > button { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--c-brand);
  color: var(--c-brand-ink); font: 700 .85rem/1 var(--font-body); padding: 0; margin: 0; }

/* text from Label components */
.anvil-role-menu-name { font-weight: 800; }
.anvil-role-menu-email { color: var(--c-muted); font-size: .875rem; }
.anvil-role-fine-print { color: var(--c-muted); font-size: .875rem; }
.anvil-label { padding: 0; margin: 0; }

/* notifications (state.toast) look like the old toasts */
.anvil-notification { background: var(--c-ink); color: var(--c-bg); border: 0; border-radius: 14px; box-shadow: var(--shadow-lg);
  font: 600 1rem/1.4 var(--font-body); }
.anvil-notification.anvil-role-ok { background: var(--c-good); color: var(--c-on-status); }
.anvil-notification.anvil-role-error { background: var(--c-bad); color: var(--c-on-status); }
.anvil-notification .anvil-notification-title { font-weight: 800; }

/* dialogs (alert / confirm with a Form inside) look like the old modals */
.anvil-modal-content { background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg); font: 16px/1.55 var(--font-body); }
.anvil-modal-header { border-bottom: 0; padding: 22px 26px 0; }
.anvil-modal-title { font: 800 1.6rem/1.1 var(--font-display); color: var(--c-ink); }
.anvil-modal-body { padding: 18px 26px 24px; }
.anvil-modal-footer { border-top: 0; padding: 0 26px 22px; }
.anvil-modal-header .anvil-close { color: var(--c-muted); opacity: 1; text-shadow: none; }
@media (max-width: 720px) { .anvil-modal-body { padding: 16px 18px 20px; } .anvil-modal-header { padding: 18px 18px 0; } }

/* ---- shared helpers for the component version */
.anvil-role-contents, .anvil-role-contents > div { display: contents; }
.anvil-role-page-title { font: 800 clamp(1.7rem, 3.4vw, 2.3rem)/1.08 var(--font-display); color: var(--c-ink); margin: 0; letter-spacing: -.005em; }
.anvil-role-sec-title { font: 800 1.6rem/1.08 var(--font-display); color: var(--c-ink); margin: 0; }
.anvil-role-card-title { font: 800 1.3rem/1.08 var(--font-display); color: var(--c-ink); margin: 4px 0 0; }
.anvil-role-faint { color: var(--c-faint); }
.anvil-role-sh-stars { color: #f0a500; letter-spacing: 1px; font-size: .95rem; }
.anvil-role-sh-stars.anvil-role-faint { color: var(--c-faint); letter-spacing: 0; }
.lp-signup { margin: 14px 0 0; }
@media (max-width: 720px) { .anvil-role-sh-shelf > div { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } }
.ui-empty > .ic { width: 34px; height: 34px; color: var(--c-faint); margin-bottom: 8px; }

/* ---- reading pages, dialogs, profile, admin (component version) */
.anvil-role-bk-title { font: 800 clamp(1.6rem, 3.6vw, 2.3rem)/1.08 var(--font-display); color: var(--c-ink); margin: 2px 0 6px; }
.anvil-role-bk-intro { color: var(--c-muted); margin: 0; }
.anvil-modal-content .ui h2.dlg-h, .anvil-role-dlg-title { font: 800 1.6rem/1.1 var(--font-display); color: var(--c-ink); margin: 0 0 .5em; padding-right: 36px; }
.anvil-modal-content .ui { font: 16px/1.55 var(--font-body); }
.anvil-role-seg > button { font: 800 .85rem/1 var(--font-body); border: 0; background: none; color: var(--c-muted); padding: 8px 13px; border-radius: 999px; cursor: pointer; margin: 0; box-shadow: none; }
.anvil-role-seg.anvil-role-on > button { background: var(--c-accent); color: #2b2350; }
.anvil-role-pf-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--c-brand-soft); color: var(--c-brand);
  font: 700 1.3rem/1 var(--font-body); }
.anvil-role-pf-title { font: 800 1.8rem/1.08 var(--font-display); color: var(--c-ink); }
.pf-pw { margin-top: 22px; }
.pf-more { margin-top: 16px; }
.anvil-role-strong { font-weight: 800; }
.anvil-role-stat-num { font: 800 2rem/1.1 var(--font-display); color: var(--c-ink); }
.ad-stat { text-decoration: none; color: inherit !important; }
.ad-stat span, .ad-stat .anvil-role-fine-print { color: var(--c-muted); font-size: .9rem; }
.anvil-role-ad-demo-line { margin-top: 18px; }
.ad-filter, .ad-search { margin-bottom: 16px; }
.ad-search .anvil-role-ad-search-box { max-width: 360px; }
.ad-table { display: grid; gap: 8px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--c-line); font-size: .93rem; }
.ad-users-head, .ad-user-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 90px 90px 90px; }
.ad-lib-head, .ad-lib-row { grid-template-columns: minmax(0, 3fr) 70px 70px 70px; }
.ad-users-head b, .ad-lib-head b { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.anvil-role-ad-email { overflow-wrap: anywhere; }
.ad-fb-actions { margin-top: 10px; }
@media (max-width: 720px) {
  .ad-users-head { display: none; }
  .ad-user-row { grid-template-columns: 1fr 1fr; }
  .ad-lib-head, .ad-lib-row { grid-template-columns: minmax(0, 1fr) 50px 50px 50px; }
}
.anvil-notification.alert-success, .anvil-notification.anvil-notification-success { background: var(--c-good); color: var(--c-on-status); }
.anvil-notification.alert-danger, .anvil-notification.anvil-notification-danger { background: var(--c-bad); color: var(--c-on-status); }

/* The open-source runtime (App Server 1.18) wraps named elements and components in <anvil-dropzone> tags; hosted Anvil
   has dropped them. Make them invisible to layout so child selectors and grids behave the same on both. */
anvil-dropzone { display: contents; }
/* Notifications on the open-source runtime (1.18): Bootstrap-style alerts. Same look as .anvil-notification above. */
[data-notify="container"].anvil-alert { background: var(--c-ink); color: var(--c-bg); border: 2.5px solid var(--c-line); border-radius: 14px;
  box-shadow: var(--shadow); font: 700 1rem/1.4 var(--font-body); padding: 12px 40px 12px 16px; }
[data-notify="container"].anvil-alert-success { background: var(--c-good); color: var(--c-on-status); }
[data-notify="container"].anvil-alert-danger { background: var(--c-bad); color: var(--c-on-status); }
[data-notify="container"].anvil-alert .anvil-close, [data-notify="container"].anvil-alert [data-notify="dismiss"] { color: inherit; opacity: .8; text-shadow: none; }
/* header: the guest buttons stay on one line, the logo never shrinks */
.ui-brand img { flex: none; }
.ui-header-right .ui-row { flex-wrap: nowrap; gap: 8px; }
@media (max-width: 480px) {
  .ui-brand span { font-size: .98rem; line-height: 1.05; }
  .ui-header-right .ui-btn { padding: 8px 11px; min-height: 38px; font-size: .86rem; }
}
.pf-pw { margin-top: 22px !important; }
/* Toast colours win over the plain rule above on both runtimes (hosted: anvil-role-ok/error; App Server 1.18: alert-success/danger). */
:is(.anvil-notification, [data-notify="container"]):is(.anvil-role-ok, .anvil-alert-success) { background: var(--c-good); color: var(--c-on-status); }
:is(.anvil-notification, [data-notify="container"]):is(.anvil-role-error, .anvil-alert-danger) { background: var(--c-bad); color: var(--c-on-status); }
/* Our dialogs: Anvil's normal alert is a 300 px "small" modal; give them the old modal's width. */

/* ---- template pages (component version) */
.lp-art-card { position: relative; display: grid; gap: 12px; padding: 22px; max-width: 460px; margin: 0 auto; }
.lp-art-bar { display: flex; gap: 6px; margin-bottom: 6px; }
.lp-art-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-line); display: block; }
.lp-art-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: var(--c-surface-2); }
.lp-art-row b { display: block; } .lp-art-row small { color: var(--c-muted); }
.anvil-role-item-list > div { display: grid; gap: 10px; }
.item-title { gap: 8px; }
.anvil-role-item-body { overflow-wrap: anywhere; margin-top: 2px; }
.anvil-role-initials { font: 700 .85rem/1 var(--font-body); color: inherit; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; }
.ui-tabbar .nav-link { display: grid; }
.ui-nav .nav-link.on, .ui-tabbar a.on { }
.anvil-role-dlg-title, .anvil-modal-content .ui h2.dlg-h { font: 700 1.5rem/1.15 var(--font-display); color: var(--c-ink); margin: 0 0 .5em; padding-right: 36px; }

.anvil-modal-content .ui-row.end { margin-top: 18px; }
.anvil-modal-content textarea { width: 100%; }
/* Our dialogs: Anvil's normal alert is a 300 px "small" modal; give them a comfortable width. */
.anvil-modal-dialog.anvil-role-app-dialog.anvil-modal-sm, .anvil-modal-dialog.anvil-role-app-dialog:not(.anvil-modal-lg) { width: min(calc(100vw - 24px), 540px); max-width: none; }
.anvil-modal-dialog.anvil-role-app-dialog.anvil-modal-lg { width: min(calc(100vw - 24px), 780px); max-width: none; }/* badges from Label components: prop:role='["badge"]' (+ "badge-brand", "badge-good", "badge-warn", "badge-bad") */
.anvil-role-badge { display: inline-flex; align-items: center; gap: 5px; font: 600 .75rem/1.3 var(--font-body); padding: 4px 10px; border-radius: 999px;
  background: var(--c-surface-2); color: var(--c-muted); white-space: nowrap; }
.anvil-role-badge.anvil-role-badge-brand { background: var(--c-brand-soft); color: var(--c-brand); }
.anvil-role-badge.anvil-role-badge-good { background: var(--c-good-soft); color: var(--c-good); }
.anvil-role-badge.anvil-role-badge-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.anvil-role-badge.anvil-role-badge-bad { background: var(--c-bad-soft); color: var(--c-bad); }
/* auth page parts made of components */
.anvil-role-au-title { font: 700 1.8rem/1.1 var(--font-display); margin-bottom: 4px; color: var(--c-ink); }
.anvil-role-au-sub { color: var(--c-muted); margin-bottom: 4px; }
.au-pw { position: relative; display: block; }
.au-pw input { padding-right: 70px; }
.anvil-role-au-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.anvil-role-au-show > button { border: 0; background: none; color: var(--c-muted); font: 600 .8rem/1 var(--font-body); padding: 8px; cursor: pointer; margin: 0; box-shadow: none; }
.anvil-role-au-google img, .anvil-role-au-google .anvil-component-icon { width: 18px; height: 18px; flex: none; }
.anvil-role-msg-error { background: var(--c-bad-soft); color: var(--c-bad); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }
.anvil-role-msg-note { background: var(--c-brand-soft); color: var(--c-ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }

/* Screen-reader-only text (Label role "sr", or class ui-sr): read out, not shown */
.anvil-role-sr, .ui-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Anvil's own notifications animate everything (transition: all): only fade and move (design kit) */
.anvil-notification, [data-notify="container"] { transition-property: opacity, transform !important; }
.au-card a { display: inline-block; padding: 3px 0; }  /* 24px+ touch height */
.anvil-notification .anvil-close, [data-notify="dismiss"] { min-width: 24px; min-height: 24px; }

/* =====================================================================================================
   Fillfox as native Anvil Forms: the pieces the Forms pages add on top of the page styles above
   (lists are RepeatingPanels, so grids sit on the panel's items container: .anvil-role-x > div).
   ===================================================================================================== */
.ui .anvil-label { margin: 0; }
.anvil-component-icon:empty { display: none; }
.anvil-role-inline, .anvil-role-inline > .anvil-label-text { display: inline; }
.anvil-role-page-title { font-weight: 700; letter-spacing: -.025em; }
.anvil-role-page-lead { color: var(--c-muted); margin-top: 6px; max-width: 46em; }
.anvil-role-strong { font-weight: 700; }
.anvil-role-faint { color: var(--c-faint); }
.anvil-role-badge { border-radius: 3px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .01em; }
.anvil-role-badge.anvil-role-badge-accent { background: var(--c-accent-soft); color: var(--c-accent-text); }
.anvil-role-badge.anvil-role-badge-good, .anvil-role-badge.anvil-role-badge-warn, .anvil-role-badge.anvil-role-badge-bad { font-weight: 600; }
:is(.anvil-role-btn.anvil-role-btn-accent > button) { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.anvil-role-seg.anvil-role-on > button { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); }
.ui-tabs .anvil-role-tab-count { display: inline-block; font: 500 .75rem/1.4 var(--font-mono); background: var(--c-surface-2); border-radius: 3px; padding: 1px 7px; }
.ui-tabs a.on { color: var(--c-ink); border-bottom-color: var(--c-accent); }
.ff-skel { height: 420px; }

/* landing: the features grid, icons as masks */
.lp-feature .ic { width: 26px; height: 26px; color: var(--c-accent); margin-bottom: 12px; }
.lp-proof .ic { color: var(--c-good); }
.lp-free .ic { color: var(--c-good); margin-top: 2px; flex: none; }
.lp-join .ic { width: 18px; height: 18px; }
.lp-guess .ic, .lp-enter .ic { width: 14px; height: 14px; }
@media (max-width: 960px) { .lp-join .ic { transform: rotate(90deg); } }

/* #forms: the dashboard */
.anvil-role-fm-big { font: 700 1.9rem/1 var(--font-display); letter-spacing: -.03em; }
.fm-top > div > span { display: block; margin-top: 4px; }
.anvil-role-fm-list > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.fm-cell, .fm-cell > .fm-card { height: 100%; }
.fm-card::before { display: none; }
.fm-swatch { width: 12px; height: 12px; flex: none; border-radius: 2px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-ink) 18%, transparent); }
.fm-card h3 .fm-title { color: inherit; text-decoration: none; }
.fm-card h3 .fm-title::after { content: ""; position: absolute; inset: 0; }
.fm-card .anvil-role-fm-meta { margin: 0; }
.anvil-role-fm-num { font: 600 1.3rem/1 var(--font-mono); letter-spacing: -.02em; }
.fm-nums span { font: .75rem var(--font-mono); color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }
.fm-nums .ff-spark-box { margin-left: auto; color: var(--c-ink); }
.fm-acts .anvil-role-btn > button, .fm-acts .ui-btn { min-height: 34px; padding: 5px 10px; font-size: .84rem; }
.fm-sec .anvil-role-fm-sec-n { font: .8rem var(--font-mono); color: var(--c-muted); }
.fm-empty h3 { margin: 0 0 4px; }
.fm-empty p { margin: 0; }
@media (max-width: 720px) { .anvil-role-fm-list > div { grid-template-columns: 1fr; } .anvil-role-fm-big { font-size: 1.45rem; } }

/* New form dialog */
.fm-new-tabs .anvil-role-fm-tab { flex: 1; display: flex; }
.fm-new-tabs .anvil-role-fm-tab > button { flex: 1; font: 600 .86rem var(--font-body); padding: 11px 8px; border: 0; border-right: 1px solid var(--c-line); border-radius: 0; background: var(--c-surface);
  color: var(--c-muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 44px; margin: 0; box-shadow: none; }
.fm-new-tabs .anvil-role-fm-tab:last-child > button { border-right: 0; }
.fm-new-tabs .anvil-role-fm-tab.anvil-role-on > button { background: var(--c-ink); color: var(--c-bg); }
@media (max-width: 720px) { .fm-new-tabs .anvil-role-fm-tab { flex: 1 1 33%; } .fm-new-tabs .anvil-role-fm-tab > button { border-bottom: 1px solid var(--c-line); font-size: .8rem; } }
.anvil-role-fm-tpls > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; }
.fm-tpl-cell, .fm-tpl-cell .fm-tpl { height: 100%; width: 100%; }
.fm-tpl { border-left-width: 1px; position: relative; padding-left: 30px; }
.fm-tpl-swatch { position: absolute; left: 12px; top: 15px; width: 10px; height: 10px; border-radius: 2px; }
.anvil-role-fm-tpl-cat { font: .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.anvil-role-fm-tpl-title { font-weight: 700; font-size: .95rem; }
.anvil-role-fm-tpl-desc { font-size: .84rem; color: var(--c-muted); }
.anvil-role-fm-paste-box textarea, .fm-paste textarea { font-family: var(--font-mono) !important; font-size: .9rem !important; min-height: 210px !important; }
.fm-guess-row { display: flex; gap: 8px; align-items: center; padding: 2px 0; }
.fm-guess-row .anvil-role-badge { flex: none; }
.fm-new-foot { margin-top: 14px; }

/* #templates */
.tp-cats .tp-cat { font: 600 .84rem var(--font-body); border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-muted); padding: 8px 12px; cursor: pointer; border-radius: 3px; min-height: 36px; }
.tp-cats .tp-cat.on { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.anvil-role-tp-grid > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.tp-cell, .tp-cell .tp-card { height: 100%; width: 100%; }
.tp-card .tp-thumb, .tp-card .tp-body, .tp-card .sheet, .tp-card .sheet i { display: block; }
.tp-card .sheet { display: grid; }
.anvil-role-tp-meta { font: .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.anvil-role-tp-title { font-weight: 700; font-size: 1.02rem; }
.anvil-role-tp-desc { color: var(--c-muted); font-size: .88rem; }
@media (hover: hover) and (pointer: fine) { .tp-card:hover, .fm-card:hover { background: var(--c-surface-2); } }
/* the try-out: a full-screen dialog */
.anvil-modal-dialog.anvil-role-tp-dialog, .modal-dialog.anvil-role-tp-dialog { width: 100vw; max-width: none; margin: 0; min-height: 100vh; }
.anvil-role-tp-dialog .anvil-modal-content, .anvil-role-tp-dialog .modal-content { border-radius: 0; border: 0; min-height: 100vh; background: var(--c-bg); }
.anvil-role-tp-dialog .anvil-modal-body, .anvil-role-tp-dialog .modal-body { padding: 0; }
.anvil-role-tp-dialog .anvil-modal-header, .anvil-role-tp-dialog .modal-header { display: none; }
.tp-try .tp-ov-bar .anvil-role-tp-ov-title { font: 600 .82rem var(--font-mono); margin-right: auto; color: var(--c-bg); }
.tp-try .tp-ov-bar .anvil-role-btn > button { min-height: 36px; padding: 5px 12px; }

/* #f: the public form */
.page-f .ffr-lock { background: var(--c-ink); color: var(--c-bg); }
.page-f .ffr-lock .ic { width: 22px; height: 22px; }
.anvil-role-ffr-closed-title { font: 700 1.6rem/1.2 var(--font-display); margin-bottom: 6px; }
.ff-reasons { display: grid; gap: 6px; }
.ff-reasons .radio, .ff-reasons label { margin: 0; }

/* #results */
.anvil-role-rs-kpi { font: 700 1.6rem/1 var(--font-mono); letter-spacing: -.03em; }
.rs-kpis > div > span { display: block; margin-top: 4px; }
.rs-sub-row { margin-top: 6px; }
.anvil-role-rs-grid > div { display: grid; grid-auto-flow: row dense; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.anvil-role-rs-grid > div > .wide { grid-column: 1 / -1; }
.rs-cell, .rs-cell > .rs-q { height: 100%; }
.rs-q-h .ic { width: 18px; height: 18px; margin-right: 6px; color: var(--c-accent); }
.anvil-role-rs-n { display: inline; font: 600 .75rem var(--font-mono); color: var(--c-accent-text); margin-right: 6px; }
.anvil-role-rs-sub { font: .75rem var(--font-mono); color: var(--c-muted); margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; }
.anvil-role-rs-big-b { font: 700 2.4rem/1 var(--font-mono); letter-spacing: -.04em; }
.anvil-role-rs-big-b.anvil-role-small { font-size: 1.2rem; }
.anvil-role-rs-big-s { color: var(--c-muted); font-size: .9rem; }
.rs-nps i.d { background: var(--c-bad); } .rs-nps i.p { background: var(--c-faint); } .rs-nps i.g { background: var(--c-good); }
.anvil-role-rs-legend { font: .78rem var(--font-mono); color: var(--c-muted); }
.anvil-role-rs-note { margin: 10px 0 6px; }
.anvil-role-rs-bars > div { display: grid; gap: 7px; }
.anvil-role-rs-bar-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anvil-role-rs-bar-v { font: 500 .8rem var(--font-mono); color: var(--c-muted); }
.anvil-role-rs-hist > div { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 6px; }
.anvil-role-rs-hist > div > * { flex: 1; height: 100%; min-width: 0; }
.rs-hcol { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.rs-hcol i { display: block; width: 100%; background: var(--c-ink); min-height: 1px; }
.rs-hcol i.d { background: var(--c-bad); } .rs-hcol i.p { background: var(--c-faint); } .rs-hcol i.g { background: var(--c-good); }
.rs-hcol span { font: .75rem var(--font-mono); color: var(--c-muted); }
.anvil-role-rs-texts > div { display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.rs-text { padding: 8px 10px; background: var(--c-surface-2); font-size: .9rem; overflow-wrap: anywhere; }
.anvil-role-rs-text-small { color: var(--c-muted); font: .75rem var(--font-mono); margin-top: 2px; }
.rs-tools .anvil-role-rs-search { max-width: 320px; flex: 1 1 200px; }
.rs-table-wrap { overflow-x: auto; border: 1px solid var(--c-line); }
.rs-table { min-width: 640px; font-size: .88rem; }
.anvil-role-rs-head > div, .anvil-role-rs-cells > div { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(120px, 1fr)); }
.anvil-role-rs-head > div { background: var(--c-surface-2); border-bottom: 1px solid var(--c-line); }
.anvil-role-rs-head .rs-td { font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.rs-td { padding: 9px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rs-tr { border-bottom: 1px solid var(--c-line); cursor: pointer; }
.rs-tr:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .rs-tr:hover { background: var(--c-surface-2); } }
.anvil-role-rs-funnel > div { display: grid; gap: 10px; }
.rs-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) 96px; gap: 12px; align-items: center; }
.anvil-role-rs-step-k { font: 600 .75rem var(--font-mono); color: var(--c-muted); }
.anvil-role-rs-step-lbl { font-size: .88rem; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-step-mid { min-width: 0; }
.rs-step .n { text-align: right; }
.anvil-role-rs-step-n { font: 500 .82rem var(--font-mono); }
.anvil-role-rs-step-lost { font: 500 .78rem var(--font-mono); color: var(--c-bad); }
.rs-funnel-note { margin-top: 14px; }
.anvil-role-rs-empty-title { font: 700 1.2rem/1.2 var(--font-display); color: var(--c-ink); }
.anvil-role-rs-dl > div { display: grid; gap: 12px; margin-top: 16px; }
.anvil-role-rs-dt { font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.rs-dd { margin-top: 2px; overflow-wrap: anywhere; white-space: pre-wrap; }
.rs-dd img.sig { max-width: 280px; background: #fff; border: 1px solid var(--c-line); }
.anvil-role-rs-sig-typed { font: italic 500 1.6rem "Fraunces", Georgia, serif; }
.rs-detail-acts { margin-top: 20px; }
@media (max-width: 900px) { .anvil-role-rs-grid > div { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .rs-step { grid-template-columns: 26px minmax(0, 1fr) 76px; gap: 8px; } .anvil-role-rs-kpi { font-size: 1.25rem; } }

/* admin: forms and reports */
.ad-form .meta, .ad-report .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.ad-form-title { margin: 0 0 8px; font-size: 1.05rem; }
.anvil-role-ad-msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 10px; }
.ad-report .ui-item { margin-top: 8px; }
.page-landing { overflow-x: clip; }
.anvil-role-ad-fb > div { display: grid; gap: 10px; }
.anvil-role-ad-fb > div > *, .ad-form-cell, .ad-form, .ad-report-cell, .ad-report { min-width: 0; max-width: 100%; }
.ad-form .meta > *, .ad-report .meta > *, .ad-form-title { min-width: 0; overflow-wrap: anywhere; }
.ad-search .anvil-role-ad-search-box { min-width: 0; flex: 1 1 180px; }

/* Labels render <div class="anvil-label"><span class="anvil-label-text">: the text takes the role's font and colour */
.anvil-label > .anvil-label-text { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.anvil-role-rs-n { margin-right: 8px; }
.rs-text .anvil-label, .rs-bar .anvil-label { line-height: 1.4; }
.anvil-role-rs-bars > div > * + * { margin-top: 0; }
