/*
 * Curvinha DS v2 ("Casinha"), the web layer. Every web surface (admin, site)
 * styles its components from this file; the React components in ../src only
 * put these classes on the right elements. Colors, radii, spacing, fonts and
 * motion are the generated --cv-* variables (tokens.css); never a hex here.
 * Source design: the approved board (direction A), ds.css + screens/a.
 *
 * Rules the components carry:
 * - at most one primary (.cv-btn) and one secondary per view;
 * - on touch (pointer: coarse) every control is at least 44 x 44 px;
 * - badges hug their text; the App Store button always shows the Apple logo;
 * - verdicts never by color alone (word + glyph + pattern).
 */
/* Generated by packages/brand/gen.mjs from packages/brand/tokens.json. Don't edit: change the JSON and run `node packages/brand/gen.mjs`. */
:root {
  color-scheme: light;
  --cv-canvas: #F2F2F2;
  --cv-surface: #FAFAFA;
  --cv-raised: #FFFFFF;
  --cv-sunken: #E8E8E8;
  --cv-ink: #161616;
  --cv-text: #2B2B2B;
  --cv-text-2: #4A4A4A;
  --cv-text-3: #5E5E5E;
  --cv-olive: #6F7B40;
  --cv-olive-ink: #4A5526;
  --cv-olive-deep: #3F4A38;
  --cv-olive-tint: #E7EACF;
  --cv-sage: #AEB679;
  --cv-butter: #FFE17A;
  --cv-butter-deep: #F2BE2E;
  --cv-butter-tint: #FFF3C4;
  --cv-sky: #3E5A74;
  --cv-sky-tint: #E3EAF0;
  --cv-fit: #1F6B3F;
  --cv-fit-fill: #2E7D4A;
  --cv-fit-tint: #DDEEE2;
  --cv-tight: #7A5A0E;
  --cv-tight-fill: #D9A441;
  --cv-tight-tint: #F6EAC9;
  --cv-nofit: #A3301F;
  --cv-nofit-fill: #C23B2A;
  --cv-nofit-tint: #F6DEDA;
  --cv-hairline: #E4E4E4;
  --cv-border: #D4D4D4;
  --cv-control: #808080;
  --cv-focus: #4A5526;
  --cv-on-primary: #FAFAFA;
  --cv-on-butter: #161616;
  --cv-shadow-rgb: 22 22 22;
  --cv-e1: 0px 1px 2px 0px rgb(var(--cv-shadow-rgb) / 0.04), 0px 8px 24px -6px rgb(var(--cv-shadow-rgb) / 0.09);
  --cv-e2: 0px 14px 34px -14px rgb(var(--cv-shadow-rgb) / 0.3);
  --cv-e3: 0px -10px 40px -18px rgb(var(--cv-shadow-rgb) / 0.32);
  --cv-r-xs: 6px;
  --cv-r-sm: 10px;
  --cv-r-md: 14px;
  --cv-r-lg: 20px;
  --cv-r-xl: 28px;
  --cv-r-pill: 999px;
  --cv-s-1: 4px;
  --cv-s-2: 8px;
  --cv-s-3: 12px;
  --cv-s-4: 16px;
  --cv-s-5: 24px;
  --cv-s-6: 32px;
  --cv-s-7: 40px;
  --cv-s-8: 48px;
  --cv-s-9: 64px;
  --cv-font-display: "SF Pro Rounded", ui-rounded, "Nunito", system-ui, sans-serif;
  --cv-font-text: "Archivo", -apple-system, system-ui, sans-serif;
  --cv-font-ui: -apple-system, "SF Pro Text", "Archivo", system-ui, sans-serif;
  --cv-font-measure: "Barlow Semi Condensed", "Archivo", sans-serif;
  --cv-font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --cv-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --cv-ease-draw: cubic-bezier(0.77, 0, 0.175, 1);
  --cv-ease-spring-standard: linear(0, .046, .149, .272, .395, .507, .605, .688, .755, .81, .854, .888, .914, .935, .951, .963, .972, .979, .984, .988, .991, .994, .996, .998, 1);
  --cv-ease-spring-pop: linear(0, .07, .223, .399, .565, .705, .813, .893, .947, .981, 1.001, 1.011, 1.015, 1.015, 1.013, 1.01, 1.008, 1.005, 1.004, 1.002, 1.001, 1.001, 1);
  --cv-ease-spring-play: linear(0, .073, .239, .436, .626, .786, .907, .99, 1.039, 1.063, 1.068, 1.062, 1.05, 1.037, 1.024, 1.013, 1.005, 1, .997, .996, .995, .996, .998, 1);
  --cv-ease-spring-sheet: linear(0, .068, .214, .377, .53, .659, .761, .838, .894, .933, .96, .977, .988, .995, .998, 1, 1.001, 1.002, 1.001, 1);
  --cv-t-press: 120ms;
  --cv-t-fast: 150ms;
  --cv-t-base: 220ms;
  --cv-t-slow: 350ms;
  --cv-t-standard: 455ms;
  --cv-t-pop: 480ms;
  --cv-t-sheet: 640ms;
  --cv-t-play: 720ms;
  --cv-t-draw: 600ms;
}

/* Dark: the admin's .dark class, or data-theme="dark" */
.dark,
[data-theme="dark"] {
  color-scheme: dark;
  --cv-canvas: #121212;
  --cv-surface: #1B1B1B;
  --cv-raised: #242424;
  --cv-sunken: #0A0A0A;
  --cv-ink: #F2F2F2;
  --cv-text: #E6E6E6;
  --cv-text-2: #C2C2C2;
  --cv-text-3: #9C9C9C;
  --cv-olive: #AEB679;
  --cv-olive-ink: #C0C890;
  --cv-olive-deep: #DDE3B4;
  --cv-olive-tint: #2B2F1C;
  --cv-sage: #7F8A4E;
  --cv-butter: #FFE17A;
  --cv-butter-deep: #F2BE2E;
  --cv-butter-tint: #3A3015;
  --cv-sky: #A9C0D6;
  --cv-sky-tint: #1E2A35;
  --cv-fit: #74C98E;
  --cv-fit-fill: #4FA36A;
  --cv-fit-tint: #17301F;
  --cv-tight: #E6BA62;
  --cv-tight-fill: #D9A441;
  --cv-tight-tint: #3A2F17;
  --cv-nofit: #F29A87;
  --cv-nofit-fill: #E0664F;
  --cv-nofit-tint: #3D2320;
  --cv-hairline: #2A2A2A;
  --cv-border: #363636;
  --cv-control: #858585;
  --cv-focus: #C0C890;
  --cv-on-primary: #121212;
  --cv-on-butter: #161616;
  --cv-shadow-rgb: 0 0 0;
  --cv-e1: 0px 1px 2px 0px rgb(var(--cv-shadow-rgb) / 0.4);
  --cv-e2: 0px 14px 34px -14px rgb(var(--cv-shadow-rgb) / 0.7);
  --cv-e3: 0px -10px 40px -18px rgb(var(--cv-shadow-rgb) / 0.7);
}

/* A light island inside a dark page */
[data-theme="light"] {
  color-scheme: light;
  --cv-canvas: #F2F2F2;
  --cv-surface: #FAFAFA;
  --cv-raised: #FFFFFF;
  --cv-sunken: #E8E8E8;
  --cv-ink: #161616;
  --cv-text: #2B2B2B;
  --cv-text-2: #4A4A4A;
  --cv-text-3: #5E5E5E;
  --cv-olive: #6F7B40;
  --cv-olive-ink: #4A5526;
  --cv-olive-deep: #3F4A38;
  --cv-olive-tint: #E7EACF;
  --cv-sage: #AEB679;
  --cv-butter: #FFE17A;
  --cv-butter-deep: #F2BE2E;
  --cv-butter-tint: #FFF3C4;
  --cv-sky: #3E5A74;
  --cv-sky-tint: #E3EAF0;
  --cv-fit: #1F6B3F;
  --cv-fit-fill: #2E7D4A;
  --cv-fit-tint: #DDEEE2;
  --cv-tight: #7A5A0E;
  --cv-tight-fill: #D9A441;
  --cv-tight-tint: #F6EAC9;
  --cv-nofit: #A3301F;
  --cv-nofit-fill: #C23B2A;
  --cv-nofit-tint: #F6DEDA;
  --cv-hairline: #E4E4E4;
  --cv-border: #D4D4D4;
  --cv-control: #808080;
  --cv-focus: #4A5526;
  --cv-on-primary: #FAFAFA;
  --cv-on-butter: #161616;
  --cv-shadow-rgb: 22 22 22;
  --cv-e1: 0px 1px 2px 0px rgb(var(--cv-shadow-rgb) / 0.04), 0px 8px 24px -6px rgb(var(--cv-shadow-rgb) / 0.09);
  --cv-e2: 0px 14px 34px -14px rgb(var(--cv-shadow-rgb) / 0.3);
  --cv-e3: 0px -10px 40px -18px rgb(var(--cv-shadow-rgb) / 0.32);
}

/* data-theme="auto" follows the system (the site) */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    color-scheme: dark;
    --cv-canvas: #121212;
    --cv-surface: #1B1B1B;
    --cv-raised: #242424;
    --cv-sunken: #0A0A0A;
    --cv-ink: #F2F2F2;
    --cv-text: #E6E6E6;
    --cv-text-2: #C2C2C2;
    --cv-text-3: #9C9C9C;
    --cv-olive: #AEB679;
    --cv-olive-ink: #C0C890;
    --cv-olive-deep: #DDE3B4;
    --cv-olive-tint: #2B2F1C;
    --cv-sage: #7F8A4E;
    --cv-butter: #FFE17A;
    --cv-butter-deep: #F2BE2E;
    --cv-butter-tint: #3A3015;
    --cv-sky: #A9C0D6;
    --cv-sky-tint: #1E2A35;
    --cv-fit: #74C98E;
    --cv-fit-fill: #4FA36A;
    --cv-fit-tint: #17301F;
    --cv-tight: #E6BA62;
    --cv-tight-fill: #D9A441;
    --cv-tight-tint: #3A2F17;
    --cv-nofit: #F29A87;
    --cv-nofit-fill: #E0664F;
    --cv-nofit-tint: #3D2320;
    --cv-hairline: #2A2A2A;
    --cv-border: #363636;
    --cv-control: #858585;
    --cv-focus: #C0C890;
    --cv-on-primary: #121212;
    --cv-on-butter: #161616;
    --cv-shadow-rgb: 0 0 0;
    --cv-e1: 0px 1px 2px 0px rgb(var(--cv-shadow-rgb) / 0.4);
    --cv-e2: 0px 14px 34px -14px rgb(var(--cv-shadow-rgb) / 0.7);
    --cv-e3: 0px -10px 40px -18px rgb(var(--cv-shadow-rgb) / 0.7);
  }
}


@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-var.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/BarlowSemiCondensed-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@layer base {
  :where(body) {
    margin: 0;
    background: var(--cv-canvas);
    color: var(--cv-text);
    font-family: var(--cv-font-text);
    -webkit-font-smoothing: antialiased;
    caret-color: var(--cv-olive-ink);
  }
  ::selection {
    background: var(--cv-butter);
    color: var(--cv-on-butter);
  }
  :focus-visible {
    outline: 2.5px solid var(--cv-focus);
    outline-offset: 2px;
  }
  :where(*) {
    scrollbar-color: var(--cv-border) transparent;
  }
}

@layer components {
  /* Money and measures never break inside ("R$ 179,90", "86 cm"). */
  .cv-money {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .cv-tnum {
    font-variant-numeric: tabular-nums;
  }
  .cv-muted {
    color: var(--cv-text-3);
  }
  .cv-mono {
    font: 500 12.5px/1.3 var(--cv-font-mono);
    color: var(--cv-text-2);
  }
  .cv-link {
    color: var(--cv-olive-ink);
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
  }

  .cv-t-hero {
    font: 800 clamp(40px, 6vw, 76px)/1.02 var(--cv-font-display);
    letter-spacing: -0.03em;
    color: var(--cv-ink);
    text-wrap: balance;
  }
  .cv-t-display {
    font: 800 clamp(28px, 4vw, 34px)/1.1 var(--cv-font-display);
    letter-spacing: -0.02em;
    color: var(--cv-ink);
    text-wrap: balance;
  }
  .cv-t-title1 {
    font: 800 28px/1.15 var(--cv-font-display);
    letter-spacing: -0.015em;
    color: var(--cv-ink);
  }
  .cv-t-title2 {
    font: 750 22px/1.2 var(--cv-font-display);
    letter-spacing: -0.01em;
    color: var(--cv-ink);
  }
  .cv-t-title3 {
    font: 750 17px/1.25 var(--cv-font-display);
    color: var(--cv-ink);
  }
  .cv-t-body {
    font: 400 17px/1.5 var(--cv-font-text);
    color: var(--cv-text);
  }
  .cv-t-lede {
    font: 400 20px/1.5 var(--cv-font-text);
    color: var(--cv-text-2);
  }
  .cv-t-footnote {
    font: 400 13px/1.4 var(--cv-font-text);
    color: var(--cv-text-2);
  }
  .cv-t-caption {
    font: 500 12px/1.3 var(--cv-font-text);
    color: var(--cv-text-3);
  }
  .cv-t-number {
    font: 800 40px/1 var(--cv-font-display);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--cv-ink);
  }
  .cv-t-measure {
    font: 500 13px/1 var(--cv-font-measure);
    font-variant-numeric: tabular-nums;
    color: var(--cv-olive-ink);
  }
  .cv-second {
    color: var(--cv-text-3);
  }

  /* Primary: olive with a pressable bottom lip. Secondary: tinted fill, no
   * border. Text: the last resort for a third action. Destructive: plain red;
   * danger: filled red, only as the confirm of a destructive dialog. */
  .cv-btn {
    /* The app's primary green (Buttons.swift: DSColor.olive); olive-ink stays for
     * text, links and icons. On olive the on-primary off-white is 4.46:1, so light
     * takes pure white (raised) for 4.58:1; dark is on-primary on olive, 8.5:1. */
    --bg: var(--cv-olive);
    --fg: light-dark(var(--cv-raised), var(--cv-on-primary));
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 10px 24px;
    border-radius: var(--cv-r-pill);
    text-align: center;
    text-wrap: balance;
    text-decoration: none;
    font: 750 17px/1.15 var(--cv-font-display);
    letter-spacing: -0.005em;
    background: var(--bg);
    color: var(--fg);
    box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.18);
    transition:
      transform var(--cv-t-press) var(--cv-ease-out),
      box-shadow var(--cv-t-press) var(--cv-ease-out),
      background var(--cv-t-fast) var(--cv-ease-out);
  }
  .cv-btn:hover {
    background: color-mix(in oklab, var(--bg), black 6%);
  }
  .cv-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.18);
  }
  .cv-btn:disabled,
  .cv-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
  }
  .cv-btn svg {
    width: 1.1em;
    height: 1.1em;
    flex: none;
  }
  /* Tinted fill. In dark a light olive at 12% vanished into the canvas, so
   * dark gets a stronger tint (light-dark() follows the tokens' color-scheme). */
  .cv-btn--secondary {
    --bg: light-dark(
      color-mix(in oklab, var(--cv-olive-ink), transparent 88%),
      color-mix(in oklab, var(--cv-olive-ink), transparent 80%)
    );
    --fg: var(--cv-olive-ink);
    box-shadow: none;
  }
  .cv-btn--secondary:hover {
    background: light-dark(
      color-mix(in oklab, var(--cv-olive-ink), transparent 82%),
      color-mix(in oklab, var(--cv-olive-ink), transparent 74%)
    );
  }
  .cv-btn--text {
    --bg: transparent;
    --fg: var(--cv-olive-ink);
    box-shadow: none;
    padding-inline: 12px;
  }
  .cv-btn--text:hover {
    background: color-mix(in oklab, var(--cv-olive-ink), transparent 92%);
  }
  .cv-btn--destructive {
    --bg: transparent;
    --fg: var(--cv-nofit);
    box-shadow: none;
    padding-inline: 12px;
  }
  .cv-btn--destructive:hover {
    background: var(--cv-nofit-tint);
  }
  .cv-btn--text:active,
  .cv-btn--destructive:active {
    transform: scale(0.97);
    box-shadow: none;
  }
  .cv-btn--danger {
    --bg: var(--cv-nofit-fill);
    --fg: var(--cv-on-primary);
  }
  /* Butter: the one "look here" action on an olive band (the site's closing
   * band, the recommended plan). Ink on butter, 12:1. */
  .cv-btn--butter {
    --bg: var(--cv-butter);
    --fg: var(--cv-on-butter);
    box-shadow: inset 0 -3px 0 var(--cv-butter-deep);
  }
  .cv-btn--icon {
    --bg: transparent;
    --fg: var(--cv-text-2);
    width: 44px;
    min-height: 44px;
    padding: 0;
    box-shadow: none;
  }
  .cv-btn--icon:hover {
    background: var(--cv-sunken);
  }
  .cv-btn--icon.cv-btn--destructive {
    --fg: var(--cv-nofit);
  }
  .cv-btn--sm {
    min-height: 36px;
    padding: 0 14px;
    gap: 6px;
    font-size: 14px;
    box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.16);
  }
  /* Icon-only: always a 44 px circle with the glyph centered, any size. */
  .cv-btn--icon.cv-btn--sm {
    width: 44px;
    min-height: 44px;
    padding: 0;
  }
  .cv-btn--icon svg {
    width: 18px;
    height: 18px;
  }
  .cv-btn--sm:is(
    .cv-btn--secondary,
    .cv-btn--text,
    .cv-btn--destructive,
    .cv-btn--icon
  ) {
    box-shadow: none;
  }
  .cv-btn--block {
    width: 100%;
  }
  .cv-spin {
    width: 1em;
    height: 1em;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: cv-spin 0.7s linear infinite;
  }
  @keyframes cv-spin {
    to {
      transform: rotate(1turn);
    }
  }

  .cv-badge {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--cv-r-pill);
    font: 650 12px/1 var(--cv-font-ui);
    background: var(--cv-sunken);
    color: var(--cv-text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: none;
  }
  .cv-badge svg {
    width: 12px;
    height: 12px;
    flex: none;
  }
  .cv-badge--olive {
    background: var(--cv-olive-tint);
    color: var(--cv-olive-ink);
  }
  .cv-badge--butter {
    background: var(--cv-butter);
    color: var(--cv-on-butter);
  }
  .cv-badge--fit {
    background: var(--cv-fit-tint);
    color: var(--cv-fit);
  }
  .cv-badge--tight {
    background: var(--cv-tight-tint);
    color: var(--cv-tight);
  }
  .cv-badge--nofit {
    background: var(--cv-nofit-tint);
    color: var(--cv-nofit);
  }
  .cv-badge--sky {
    background: var(--cv-sky-tint);
    color: var(--cv-sky);
  }
  .cv-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    flex: none;
  }

  /* Status: a dot and a word, for table cells (ok / warn / err / info) */
  .cv-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 600 12.5px/1 var(--cv-font-text);
    color: var(--cv-text-2);
    white-space: nowrap;
  }
  .cv-status .cv-dot {
    width: 7px;
    height: 7px;
  }
  .cv-status--ok {
    color: var(--cv-fit);
  }
  .cv-status--warn {
    color: var(--cv-tight);
  }
  .cv-status--err {
    color: var(--cv-nofit);
  }
  .cv-status--info {
    color: var(--cv-sky);
  }

  /* Verdict: word + glyph + pattern, never color alone */
  .cv-verdict {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 700 15px/1 var(--cv-font-ui);
  }
  .cv-verdict .cv-sq {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: var(--cv-on-primary);
    flex: none;
  }
  .cv-verdict .cv-sq svg {
    width: 13px;
    height: 13px;
  }
  .cv-verdict--fit {
    color: var(--cv-fit);
  }
  .cv-verdict--fit .cv-sq {
    background: var(--cv-fit-fill);
  }
  .cv-verdict--tight {
    color: var(--cv-tight);
  }
  .cv-verdict--tight .cv-sq {
    background: repeating-linear-gradient(
      45deg,
      var(--cv-tight-fill) 0 3px,
      var(--cv-tight-tint) 3px 6px
    );
    box-shadow: inset 0 0 0 1.5px var(--cv-tight);
    color: var(--cv-on-butter);
  }
  .cv-verdict--nofit {
    color: var(--cv-nofit);
  }
  .cv-verdict--nofit .cv-sq {
    background: var(--cv-nofit-fill);
  }

  .cv-card {
    background: var(--cv-surface);
    border-radius: var(--cv-r-lg);
    padding: var(--cv-s-4);
    box-shadow: var(--cv-e1);
    min-width: 0;
  }
  .cv-card--flat {
    box-shadow: none;
    border: 1px solid var(--cv-hairline);
  }
  .cv-card--tint {
    background: var(--cv-olive-tint);
    box-shadow: none;
  }
  .cv-card--butter {
    background: var(--cv-butter-tint);
    box-shadow: none;
  }
  .cv-card--sky {
    background: var(--cv-sky-tint);
    box-shadow: none;
  }
  .cv-panel {
    background: var(--cv-surface);
    border-radius: var(--cv-r-md);
    box-shadow: var(--cv-e1);
    min-width: 0;
  }
  .cv-panel-h {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px 10px;
  }
  .cv-panel-h h2 {
    margin: 0;
    font: 750 16px/1.2 var(--cv-font-display);
    color: var(--cv-ink);
  }
  .cv-panel-h .cv-meta {
    margin-left: auto;
    color: var(--cv-text-3);
    font-size: 12.5px;
  }
  .cv-panel-b {
    padding: 0 16px 16px;
  }

  .cv-crumbs {
    font-size: 12.5px;
    color: var(--cv-text-3);
    margin-bottom: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
  }
  .cv-crumbs a {
    color: var(--cv-text-2);
    text-decoration: none;
  }
  .cv-crumbs a:hover {
    color: var(--cv-ink);
    text-decoration: underline;
  }
  .cv-page-head {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }
  .cv-page-head h1 {
    margin: 0;
    font: 800 28px/1.1 var(--cv-font-display);
    letter-spacing: -0.015em;
    color: var(--cv-ink);
    text-wrap: balance;
  }
  .cv-page-head p {
    margin: 4px 0 0;
    color: var(--cv-text-2);
    max-width: 70ch;
  }
  .cv-page-head .cv-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }

  .cv-stats {
    display: grid;
    grid-template-columns: repeat(var(--cv-stats-cols, 4), minmax(0, 1fr));
    gap: 12px;
  }
  @media (max-width: 1180px) {
    .cv-stats {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 767px) {
    .cv-stats {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  /* Flat: tiles inside a panel (a funnel), no card on card; 2 up on phone. */
  .cv-stats--flat .cv-stat {
    background: none;
    box-shadow: none;
    padding: 0;
  }
  @media (max-width: 767px) {
    .cv-stats--flat {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px 12px;
    }
  }
  .cv-stat {
    padding: 14px 16px;
    border-radius: var(--cv-r-md);
    background: var(--cv-surface);
    box-shadow: var(--cv-e1);
    min-width: 0;
  }
  .cv-stat-l {
    font: 500 12.5px/1.2 var(--cv-font-text);
    color: var(--cv-text-2);
  }
  .cv-stat-v {
    font: 800 26px/1.1 var(--cv-font-display);
    color: var(--cv-ink);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
  }
  .cv-stat-d {
    font: 500 12px/1.2 var(--cv-font-text);
    color: var(--cv-text-3);
    margin-top: 4px;
  }
  .cv-stat-d[data-tone="good"] {
    color: var(--cv-fit);
  }
  .cv-stat-d[data-tone="bad"] {
    color: var(--cv-nofit);
  }

  /* Meter: a thin share bar (costs, coverage) */
  .cv-meter {
    height: 8px;
    border-radius: var(--cv-r-pill);
    background: var(--cv-sunken);
    overflow: hidden;
    min-width: 60px;
  }
  .cv-meter > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--cv-olive);
    transform-origin: left;
    animation: cv-grow var(--cv-t-slow) var(--cv-ease-out) both;
  }
  .cv-meter[data-tone="fit"] > i {
    background: var(--cv-fit-fill);
  }
  .cv-meter[data-tone="tight"] > i {
    background: var(--cv-tight-fill);
  }
  .cv-meter[data-tone="nofit"] > i {
    background: var(--cv-nofit-fill);
  }
  @keyframes cv-grow {
    from {
      transform: scaleX(0);
    }
  }

  .cv-table-wrap {
    overflow-x: auto;
    min-width: 0;
  }
  .cv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font: 400 13.5px/1.35 var(--cv-font-text);
    color: var(--cv-text);
    font-variant-numeric: tabular-nums;
  }
  .cv-table th {
    text-align: left;
    font: 600 12.5px/1 var(--cv-font-text);
    color: var(--cv-text-3);
    padding: 10px 12px;
    border-bottom: 1px solid var(--cv-hairline);
    white-space: nowrap;
  }
  .cv-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--cv-hairline);
    vertical-align: middle;
  }
  .cv-table tr:last-child td {
    border-bottom: 0;
  }
  .cv-table :is(td, th):first-child {
    padding-left: 16px;
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--cv-surface);
  }
  .cv-table :is(td, th):last-child {
    padding-right: 16px;
  }
  .cv-table tbody tr:hover td {
    background: color-mix(in oklab, var(--cv-sunken), var(--cv-surface) 50%);
  }
  .cv-table tbody tr[data-href] {
    cursor: pointer;
  }
  .cv-table .cv-num {
    text-align: right;
  }
  .cv-table th button {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .cv-table th button:hover {
    color: var(--cv-ink);
  }
  .cv-table th button:focus-visible {
    outline: 2.5px solid var(--cv-focus);
    outline-offset: 2px;
    border-radius: 4px;
  }
  .cv-table th[aria-sort="ascending"],
  .cv-table th[aria-sort="descending"] {
    color: var(--cv-ink);
  }
  .cv-table th svg {
    width: 12px;
    height: 12px;
  }

  /* Under 1024 px a table becomes stacked cards: the first cell is the card's
   * title, every other cell reads "label: value". Never a squeezed table. */
  @media (max-width: 1023px) {
    .cv-table-wrap {
      overflow: visible;
    }
    .cv-table,
    .cv-table tbody,
    .cv-table tr,
    .cv-table td {
      display: block;
    }
    .cv-table thead {
      display: none;
    }
    .cv-table tbody {
      display: grid;
      gap: 10px;
    }
    /* Each row is the card, at the page margin: whatever holds the table
     * (a Panel, or an app's card marked .cv-table-host) drops its own
     * surface, border and inset, so it's never a card inside a card. That
     * rule sits outside the layers (end of file) so it beats an app's
     * utility classes on its card. */
    .cv-table tr {
      background: var(--cv-surface);
      border-radius: var(--cv-r-md);
      box-shadow: var(--cv-e1);
      padding: 6px 0;
    }

    .cv-table td,
    .cv-table td:first-child,
    .cv-table td:last-child {
      position: static;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 6px 14px;
      border: 0;
      background: none;
      text-align: right;
    }
    .cv-table td::before {
      content: attr(data-label);
      font: 500 12.5px/1.3 var(--cv-font-text);
      color: var(--cv-text-3);
      text-align: left;
      flex: none;
      max-width: 45%;
    }
    .cv-table td:first-child {
      justify-content: flex-start;
      text-align: left;
      font-weight: 650;
      color: var(--cv-ink);
      padding-block: 8px 6px;
    }
    .cv-table td:first-child::before {
      display: none;
    }
    .cv-table td:empty {
      display: none;
    }
    .cv-table tbody tr:hover td {
      background: none;
    }
  }
  .cv-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .cv-toolbar .cv-spacer {
    flex: 1;
  }
  .cv-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--cv-r-pill);
    border: 1px dashed var(--cv-control);
    color: var(--cv-text-2);
    background: transparent;
    font: 500 13px/1 var(--cv-font-text);
    cursor: pointer;
    transition: background var(--cv-t-fast) var(--cv-ease-out);
  }
  .cv-filter svg {
    width: 14px;
    height: 14px;
  }
  .cv-filter[aria-pressed="true"] {
    border-style: solid;
    border-color: transparent;
    background: var(--cv-olive-tint);
    color: var(--cv-olive-ink);
    font-weight: 600;
  }
  .cv-seg {
    display: inline-flex;
    padding: 3px;
    border-radius: var(--cv-r-pill);
    background: var(--cv-sunken);
    gap: 2px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
  }
  .cv-seg > button {
    flex: none;
    border: 0;
    background: transparent;
    padding: 0 14px;
    min-height: 30px;
    border-radius: var(--cv-r-pill);
    font: 600 13.5px/1 var(--cv-font-ui);
    color: var(--cv-text-2);
    cursor: pointer;
    white-space: nowrap;
    transition:
      background var(--cv-t-fast) var(--cv-ease-out),
      color var(--cv-t-fast);
  }
  .cv-seg
    > :is([aria-pressed="true"], [aria-checked="true"], [data-state="on"]) {
    background: var(--cv-raised);
    color: var(--cv-ink);
    box-shadow: var(--cv-e1);
  }
  .cv-views {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--cv-hairline);
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
  }
  /* On a phone the row scrolls: fade its end so a cut label reads as "more". */
  @media (max-width: 767px) {
    .cv-views {
      mask-image: linear-gradient(
        to right,
        black calc(100% - 28px),
        transparent
      );
      padding-right: 28px;
    }
  }
  .cv-views > button {
    flex: none;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    color: var(--cv-text-3);
    font: 600 13.5px/1 var(--cv-font-text);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .cv-views > button[aria-pressed="true"] {
    color: var(--cv-ink);
    border-bottom-color: var(--cv-olive-ink);
  }
  .cv-views .cv-n {
    font-weight: 500;
    color: var(--cv-text-3);
  }

  .cv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--cv-r-pill);
    font: 600 13px/1 var(--cv-font-ui);
    color: var(--cv-text);
    background: var(--cv-surface);
    border: 1px solid var(--cv-control);
    white-space: nowrap;
    flex: none;
    text-decoration: none;
  }
  :is(button, a).cv-chip {
    cursor: pointer;
    transition:
      background var(--cv-t-fast) var(--cv-ease-out),
      transform var(--cv-t-press) var(--cv-ease-out);
  }
  :is(button, a).cv-chip:active {
    transform: scale(0.96);
  }
  .cv-chip[aria-pressed="true"] {
    background: var(--cv-ink);
    color: var(--cv-canvas);
    border-color: var(--cv-ink);
  }
  .cv-chip--soft {
    border-color: transparent;
    background: var(--cv-sunken);
  }
  .cv-chip--lg {
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }
  .cv-chip-x {
    all: unset;
    cursor: pointer;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-right: -6px;
    border-radius: 50%;
    opacity: 0.6;
  }
  .cv-chip-x:hover {
    opacity: 1;
    background: color-mix(in oklab, currentColor, transparent 88%);
  }
  .cv-chip-x svg {
    width: 12px;
    height: 12px;
  }

  .cv-field {
    display: grid;
    gap: 6px;
  }
  .cv-field > label,
  .cv-label {
    font: 600 13px/1.2 var(--cv-font-ui);
    color: var(--cv-text-2);
  }
  .cv-hint {
    font-size: 12.5px;
    color: var(--cv-text-3);
  }
  .cv-input,
  .cv-textarea {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--cv-r-sm);
    border: 1px solid var(--cv-control);
    background: var(--cv-raised);
    font: 400 14px/1.3 var(--cv-font-ui);
    color: var(--cv-ink);
  }
  .cv-textarea {
    padding: 10px 12px;
    min-height: 76px;
    resize: vertical;
    line-height: 1.45;
  }
  .cv-input::placeholder,
  .cv-textarea::placeholder {
    color: var(--cv-text-3);
  }
  .cv-input:focus-visible,
  .cv-textarea:focus-visible {
    outline: 2.5px solid var(--cv-focus);
    outline-offset: 1px;
  }
  .cv-switch {
    width: 44px;
    height: 26px;
    border-radius: 99px;
    background: var(--cv-control);
    position: relative;
    border: 0;
    cursor: pointer;
    transition: background var(--cv-t-fast) var(--cv-ease-out);
    flex: none;
    padding: 0;
  }
  .cv-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--cv-raised);
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
    transition: transform var(--cv-t-pop) var(--cv-ease-spring-pop);
  }
  .cv-switch[aria-checked="true"] {
    background: var(--cv-olive-ink);
  }
  .cv-switch[aria-checked="true"]::after {
    transform: translateX(18px);
  }

  .cv-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font: 700 12px/1 var(--cv-font-display);
    background: var(--cv-olive-tint);
    color: var(--cv-olive-ink);
    flex: none;
  }

  .cv-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgb(var(--cv-shadow-rgb) / 0.38);
    animation: cv-fade var(--cv-t-base) var(--cv-ease-out) both;
  }
  .cv-overlay[data-state="closed"] {
    animation: cv-fade-out var(--cv-t-fast) var(--cv-ease-out) both;
  }
  .cv-dialog {
    position: fixed;
    z-index: 61;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: var(--cv-surface);
    border-radius: var(--cv-r-lg);
    box-shadow: var(--cv-e2);
    padding: 22px;
    display: grid;
    gap: 14px;
    animation: cv-dialog-in var(--cv-t-pop) var(--cv-ease-spring-pop) both;
  }
  .cv-dialog[data-state="closed"] {
    animation: cv-dialog-out var(--cv-t-fast) var(--cv-ease-out) both;
  }
  .cv-dialog-title {
    margin: 0;
    font: 750 20px/1.2 var(--cv-font-display);
    color: var(--cv-ink);
    padding-right: 36px;
  }
  .cv-dialog-desc {
    margin: -8px 0 0;
    color: var(--cv-text-2);
    font-size: 14px;
    line-height: 1.45;
  }
  .cv-dialog-x {
    position: absolute;
    top: 12px;
    right: 12px;
  }
  .cv-dialog-foot {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  .cv-diff {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font: 650 14px/1.3 var(--cv-font-mono);
    font-variant-numeric: tabular-nums;
  }
  .cv-diff s {
    color: var(--cv-nofit);
    text-decoration-thickness: 2px;
    overflow-wrap: anywhere;
  }
  .cv-diff ins {
    text-decoration: none;
    color: var(--cv-fit);
    background: var(--cv-fit-tint);
    padding: 4px 8px;
    border-radius: 8px;
    overflow-wrap: anywhere;
  }
  .cv-diff svg {
    width: 16px;
    height: 16px;
    color: var(--cv-text-3);
    flex: none;
  }
  .cv-callout {
    border-radius: var(--cv-r-sm);
    padding: 10px 12px;
    font-size: 13.5px;
    line-height: 1.45;
    background: var(--cv-sunken);
    color: var(--cv-text);
  }
  .cv-callout--warn {
    background: var(--cv-tight-tint);
  }
  .cv-callout--err {
    background: var(--cv-nofit-tint);
  }
  .cv-callout--err b,
  .cv-callout--err .cv-mono {
    color: var(--cv-nofit);
  }
  .cv-sheet {
    position: fixed;
    z-index: 61;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 92vw);
    background: var(--cv-surface);
    box-shadow: -18px 0 40px -24px rgb(var(--cv-shadow-rgb) / 0.35);
    padding: 20px;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 14px;
    animation: cv-sheet-side var(--cv-t-sheet) var(--cv-ease-spring-sheet) both;
  }
  .cv-sheet[data-state="closed"] {
    animation: cv-sheet-side-out var(--cv-t-base) var(--cv-ease-out) both;
  }
  @media (max-width: 767px) {
    .cv-sheet {
      top: auto;
      left: 0;
      width: auto;
      max-height: 88dvh;
      border-radius: var(--cv-r-xl) var(--cv-r-xl) 0 0;
      box-shadow: var(--cv-e3);
      padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
      animation-name: cv-sheet-up;
    }
    .cv-sheet[data-state="closed"] {
      animation-name: cv-sheet-up-out;
    }
    .cv-sheet::before {
      content: "";
      justify-self: center;
      width: 36px;
      height: 5px;
      border-radius: 99px;
      background: var(--cv-border);
    }
    .cv-dialog {
      top: auto;
      bottom: 0;
      translate: -50% 0;
      width: 100vw;
      max-height: 92dvh;
      border-radius: var(--cv-r-xl) var(--cv-r-xl) 0 0;
      padding-bottom: calc(22px + env(safe-area-inset-bottom));
      animation-name: cv-sheet-up;
    }
    .cv-dialog[data-state="closed"] {
      animation-name: cv-sheet-up-out;
    }
    .cv-dialog-foot {
      flex-direction: column-reverse;
    }
    .cv-dialog-foot .cv-btn {
      width: 100%;
    }
  }
  @keyframes cv-fade {
    from {
      opacity: 0;
    }
  }
  @keyframes cv-fade-out {
    to {
      opacity: 0;
    }
  }
  @keyframes cv-dialog-in {
    from {
      transform: scale(0.94);
      opacity: 0;
    }
  }
  @keyframes cv-dialog-out {
    to {
      transform: scale(0.97);
      opacity: 0;
    }
  }
  @keyframes cv-sheet-side {
    from {
      transform: translateX(100%);
    }
  }
  @keyframes cv-sheet-side-out {
    to {
      transform: translateX(100%);
    }
  }
  @keyframes cv-sheet-up {
    from {
      transform: translateY(100%);
    }
  }
  @keyframes cv-sheet-up-out {
    to {
      transform: translateY(100%);
    }
  }

  .cv-toasts {
    position: fixed;
    z-index: 70;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    translate: -50% 0;
    display: grid;
    gap: 8px;
    justify-items: center;
    width: max-content;
    max-width: calc(100vw - 32px);
    pointer-events: none;
  }
  .cv-toast {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 8px 8px 10px;
    border-radius: var(--cv-r-pill);
    background: var(--cv-ink);
    color: var(--cv-canvas);
    font: 600 14px/1.3 var(--cv-font-ui);
    box-shadow: var(--cv-e2);
    animation: cv-toast-in var(--cv-t-sheet) var(--cv-ease-spring-sheet) both;
  }
  .cv-toast > span:not(.cv-toast-ic) {
    padding-right: 8px;
  }
  .cv-toast-ic {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--cv-butter);
    color: var(--cv-on-butter);
    display: grid;
    place-items: center;
    flex: none;
  }
  .cv-toast-ic svg {
    width: 14px;
    height: 14px;
  }
  .cv-toast[data-tone="error"] .cv-toast-ic {
    background: var(--cv-nofit-fill);
    color: var(--cv-on-primary);
  }
  .cv-toast[data-tone="info"] .cv-toast-ic {
    background: var(--cv-sky-tint);
    color: var(--cv-sky);
  }
  /* The toast is inverse (ink), so its action is a butter pill with ink text:
   * readable in both themes. */
  .cv-toast .cv-btn {
    --bg: var(--cv-butter);
    --fg: var(--cv-on-butter);
    min-height: 32px;
  }
  .cv-toast .cv-btn--icon {
    --bg: transparent;
    --fg: var(--cv-canvas);
  }
  .cv-toast .cv-btn--icon:hover {
    background: color-mix(in oklab, var(--cv-canvas), transparent 85%);
  }
  @keyframes cv-toast-in {
    from {
      transform: translateY(24px) scale(0.96);
      opacity: 0;
    }
  }

  .cv-empty {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 10px;
    padding: 40px 24px;
  }
  .cv-empty h3 {
    margin: 0;
    font: 750 18px/1.25 var(--cv-font-display);
    color: var(--cv-ink);
    text-wrap: balance;
  }
  .cv-empty p {
    max-width: 42ch;
    margin: 0;
    color: var(--cv-text-2);
    font-size: 14px;
    line-height: 1.5;
  }
  .cv-empty .cv-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
  }
  .cv-empty--error {
    background: var(--cv-nofit-tint);
    border-radius: var(--cv-r-md);
  }
  .cv-empty--error h3 {
    color: var(--cv-nofit);
  }
  .cv-empty--error .cv-mono {
    color: var(--cv-nofit);
    max-width: 60ch;
    overflow-wrap: anywhere;
  }

  .cv-sharebar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px 20px;
    flex-wrap: wrap;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
    background: color-mix(in oklab, var(--cv-surface), transparent 6%);
    backdrop-filter: blur(16px);
    box-shadow: 0 -8px 24px -12px rgb(var(--cv-shadow-rgb) / 0.2);
  }
  .cv-sharebar-sum {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex: 1 1 220px;
  }
  .cv-sharebar-sum span {
    font: 700 17px/1.3 var(--cv-font-ui);
    color: var(--cv-ink);
  }
  .cv-sharebar-sum b {
    font: 750 22px/1.2 var(--cv-font-display);
    color: var(--cv-ink);
    font-variant-numeric: tabular-nums;
  }
  .cv-sharebar > :last-child:not(.cv-sharebar-sum) {
    flex: 1 1 260px;
  }

  .cv-tl-phase {
    margin: 22px 0 8px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
  }
  .cv-tl-phase h2 {
    margin: 0;
    font: 750 17px/1.2 var(--cv-font-display);
    color: var(--cv-ink);
  }
  .cv-tl-phase span {
    color: var(--cv-text-3);
    font-size: 12.5px;
  }
  .cv-tl {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .cv-tl-item {
    display: grid;
    grid-template-columns: 48px 28px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    position: relative;
  }
  .cv-tl-item::before {
    content: "";
    position: absolute;
    left: 71px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cv-hairline);
  }
  .cv-tl-t {
    font: 500 12.5px/28px var(--cv-font-text);
    color: var(--cv-text-3);
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .cv-tl-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--cv-surface);
    color: var(--cv-text-2);
    box-shadow: 0 0 0 1px var(--cv-border);
    position: relative;
    z-index: 1;
  }
  .cv-tl-dot svg {
    width: 14px;
    height: 14px;
  }
  .cv-tl-item[data-tone="good"] .cv-tl-dot {
    background: var(--cv-olive-tint);
    color: var(--cv-olive-ink);
    box-shadow: none;
  }
  .cv-tl-item[data-tone="money"] .cv-tl-dot {
    background: var(--cv-butter);
    color: var(--cv-on-butter);
    box-shadow: none;
  }
  .cv-tl-item[data-tone="bad"] .cv-tl-dot {
    background: var(--cv-nofit-tint);
    color: var(--cv-nofit);
    box-shadow: none;
  }
  .cv-tl-title {
    font: 650 14.5px/28px var(--cv-font-text);
    color: var(--cv-ink);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }
  .cv-tl-item[data-tone="bad"] .cv-tl-title {
    color: var(--cv-nofit);
  }
  .cv-tl-title a {
    font: 500 12.5px/1 var(--cv-font-text);
    color: var(--cv-olive-ink);
    text-decoration: none;
    display: inline-flex;
    gap: 4px;
    align-items: center;
  }
  .cv-tl-title a svg {
    width: 13px;
    height: 13px;
  }
  .cv-tl-sub {
    color: var(--cv-text-2);
    font-size: 13.5px;
    margin-top: -2px;
    overflow-wrap: anywhere;
  }
  .cv-tl-body > * {
    min-width: 0;
  }
  .cv-tl-body {
    margin-top: 10px;
    display: grid;
    gap: 8px;
  }
  .cv-tl-gap {
    display: grid;
    grid-template-columns: 48px 28px 1fr;
    gap: 10px;
  }
  .cv-tl-gap::before {
    content: "";
    grid-column: 2;
    justify-self: center;
    width: 2px;
    height: 26px;
    background: repeating-linear-gradient(
      to bottom,
      var(--cv-border) 0 4px,
      transparent 4px 8px
    );
  }
  .cv-tl-gap > * {
    font-size: 12px;
    color: var(--cv-text-3);
    align-self: center;
  }
  @media (max-width: 900px) {
    .cv-tl-item,
    .cv-tl-gap {
      grid-template-columns: 40px 24px minmax(0, 1fr);
      gap: 8px;
    }
    .cv-tl-item::before {
      left: 59px;
    }
    .cv-tl-dot {
      width: 24px;
      height: 24px;
    }
  }

  .cv-video {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    background: var(--cv-sunken);
    border: 0;
    padding: 0;
    cursor: pointer;
    text-align: left;
  }
  .cv-video img,
  .cv-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .cv-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 32px;
    padding: 8px 14px 8px 10px;
    border-radius: 99px;
    background: color-mix(in oklab, var(--cv-surface), transparent 8%);
    color: var(--cv-ink);
    font: 650 13px/1 var(--cv-font-text);
    transition: transform var(--cv-t-press) var(--cv-ease-out);
  }
  .cv-video:hover .cv-play {
    transform: scale(1.03);
  }
  .cv-play svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
  }
  .cv-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 560px;
  }
  .cv-strip figure {
    margin: 0;
    flex: 1 1 96px;
    min-width: 0;
  }
  .cv-strip img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: var(--cv-sunken);
  }
  .cv-strip figcaption {
    font: 500 11.5px/1.3 var(--cv-font-text);
    color: var(--cv-text-3);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
  }
  .cv-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 560px;
  }
  .cv-pair figure {
    margin: 0;
    position: relative;
  }
  .cv-pair img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: var(--cv-sunken);
  }
  .cv-pair figcaption {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 8px;
    border-radius: 99px;
    background: color-mix(in oklab, var(--cv-surface), transparent 8%);
    color: var(--cv-ink);
    font: 650 11.5px/1 var(--cv-font-text);
  }

  .cv-code {
    position: relative;
    border-radius: var(--cv-r-sm);
    background: var(--cv-sunken);
    min-width: 0;
  }
  .cv-code-copy {
    position: absolute;
    top: 0;
    right: 4px;
  }
  .cv-code-h {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 2px 84px 2px 12px;
    font: 600 12.5px/1.2 var(--cv-font-text);
    color: var(--cv-text-2);
  }
  summary.cv-code-h {
    cursor: pointer;
    list-style: none;
  }
  summary.cv-code-h::-webkit-details-marker {
    display: none;
  }
  summary.cv-code-h::before {
    content: "";
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 1.75px 1.75px 0;
    rotate: -45deg;
    transition: rotate var(--cv-t-fast) var(--cv-ease-out);
    margin-right: 2px;
  }
  details[open] > summary.cv-code-h::before {
    rotate: 45deg;
  }
  .cv-code pre {
    margin: 0;
    padding: 10px 12px 12px;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 500 12.5px/1.55 var(--cv-font-mono);
    color: var(--cv-text);
  }

  /* ---------- Mascot: packages/brand/curvinha/curvinha.css, written here by packages/brand/gen.mjs ---------- */
  .cv-curvinha {
    overflow: visible;
    display: block;
    flex: none;
  }
  .cv-curvinha .c-eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: cv-blink 5.2s infinite;
  }
  .cv-curvinha.mood-look .c-eyes {
    animation:
      cv-blink 5.2s infinite,
      cv-look 4s var(--cv-ease-out) infinite;
  }
  .cv-curvinha.mood-worried .c-eyes {
    transform: translateY(18px);
    animation: none;
  }
  .cv-curvinha .c-roof {
    transform-box: view-box;
    transform-origin: 512px 160px;
  }
  .cv-curvinha.mood-measure .c-roof {
    animation: cv-measure 1.6s var(--cv-ease-draw) infinite;
  }
  .cv-curvinha.mood-measure .c-ticks {
    animation: cv-ticks 1.6s linear infinite;
  }
  .cv-curvinha.mood-happy :is(.c-body, .c-roof) {
    animation: cv-hop 1.8s var(--cv-ease-spring-play) infinite;
  }
  .cv-curvinha.mood-scared .c-eyes-big {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(1.2);
    animation: cv-eye-pop 2.8s var(--cv-ease-spring-pop) infinite;
  }
  .cv-curvinha.mood-scared .c-eyes-big .c-eyes {
    animation: none;
  }
  .cv-curvinha.mood-scared .c-all {
    transform-box: view-box;
    transform-origin: 512px 900px;
    animation: cv-startle 2.8s var(--cv-ease-out) infinite;
  }
  @keyframes cv-blink {
    0%,
    94%,
    100% {
      transform: scaleY(1);
    }
    96% {
      transform: scaleY(0.1);
    }
  }
  @keyframes cv-look {
    0%,
    30% {
      translate: 0 0;
    }
    40%,
    60% {
      translate: -22px 0;
    }
    70%,
    90% {
      translate: 22px 0;
    }
    100% {
      translate: 0 0;
    }
  }
  @keyframes cv-measure {
    0%,
    100% {
      transform: scaleY(1);
    }
    50% {
      transform: scaleY(0.86) translateY(8px);
    }
  }
  @keyframes cv-ticks {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.35;
    }
  }
  @keyframes cv-hop {
    0%,
    60%,
    100% {
      transform: translateY(0);
    }
    20% {
      transform: translateY(-26px);
    }
  }
  @keyframes cv-eye-pop {
    0% {
      transform: scale(1);
    }
    8% {
      transform: scale(1.32);
    }
    16%,
    100% {
      transform: scale(1.2);
    }
  }
  @keyframes cv-startle {
    0%,
    3% {
      transform: none;
    }
    8% {
      transform: translateY(-34px);
    }
    13% {
      transform: translateY(0) rotate(-3deg);
    }
    17% {
      transform: rotate(3deg);
    }
    21% {
      transform: rotate(-2deg);
    }
    25%,
    100% {
      transform: none;
    }
  }
}

/* ---------- App shell (admin) ----------
 * Desktop: 232 px grouped sidebar. Tablet (768 to 1180): 64 px icon rail.
 * Phone: a top bar and a drawer. */
@layer components {
  .cv-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .cv-shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    min-height: 100dvh;
    background: var(--cv-canvas);
    font: 400 14px/1.45 var(--cv-font-text);
    color: var(--cv-text);
  }
  .cv-side {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: color-mix(in oklab, var(--cv-canvas), var(--cv-sunken) 35%);
    border-right: 1px solid var(--cv-hairline);
  }
  .cv-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 10px;
    min-height: 44px;
    font: 800 17px/1 var(--cv-font-display);
    color: var(--cv-ink);
    text-decoration: none;
  }
  .cv-brand small {
    font: 500 13px/1 var(--cv-font-text);
    color: var(--cv-text-3);
  }
  .cv-nav {
    display: grid;
    gap: 2px;
  }
  .cv-nav-group {
    font: 600 11.5px/1 var(--cv-font-text);
    color: var(--cv-text-3);
    padding: 14px 10px 6px;
  }
  .cv-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: var(--cv-r-sm);
    color: var(--cv-text-2);
    text-decoration: none;
    font-weight: 500;
    transition:
      background var(--cv-t-fast) var(--cv-ease-out),
      color var(--cv-t-fast);
  }
  .cv-nav a:hover {
    background: var(--cv-sunken);
    color: var(--cv-ink);
  }
  .cv-nav a[aria-current="page"] {
    background: var(--cv-surface);
    color: var(--cv-ink);
    font-weight: 650;
    box-shadow: var(--cv-e1);
  }
  .cv-nav a[aria-current="page"] svg {
    color: var(--cv-olive-ink);
  }
  .cv-nav svg {
    width: 17px;
    height: 17px;
    flex: none;
  }
  .cv-count {
    margin-left: auto;
    font: 600 11.5px/1 var(--cv-font-text);
    color: var(--cv-text-3);
    font-variant-numeric: tabular-nums;
  }
  .cv-count--hot {
    background: var(--cv-nofit-tint);
    color: var(--cv-nofit);
    padding: 3px 6px;
    border-radius: 99px;
  }
  .cv-side-foot {
    margin-top: auto;
    padding-top: 16px;
    display: grid;
    gap: 8px;
  }
  .cv-env {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 600 12.5px/1.2 var(--cv-font-text);
    padding: 8px 10px;
    border-radius: var(--cv-r-sm);
    background: var(--cv-sky-tint);
    color: var(--cv-sky);
  }
  .cv-env svg {
    width: 16px;
    height: 16px;
    flex: none;
  }
  .cv-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--cv-text-2);
    min-width: 0;
  }
  .cv-me > span:not(.cv-avatar) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
  }
  .cv-main {
    min-width: 0;
    padding: 22px 32px 64px;
  }
  .cv-topbar {
    display: none;
  }
  .cv-topbar-tool {
    margin-left: auto;
  }
  /* The tool ends the foot's last row (the user line). */
  .cv-side-foot {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .cv-side-foot > * {
    grid-column: 1 / -1;
  }
  .cv-side-foot > :nth-last-child(2) {
    grid-column: 1;
  }
  .cv-side-foot > .cv-side-tool {
    grid-column: 2;
  }
  .cv-drawer {
    position: fixed;
    z-index: 61;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(80vw, 300px);
    overflow-y: auto;
    background: var(--cv-surface);
    box-shadow: var(--cv-e2);
    padding: 14px 12px calc(16px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: cv-drawer-in var(--cv-t-sheet) var(--cv-ease-spring-sheet) both;
  }
  .cv-drawer[data-state="closed"] {
    animation: cv-drawer-out var(--cv-t-base) var(--cv-ease-out) both;
  }
  .cv-drawer .cv-nav a {
    min-height: 44px;
  }
  @keyframes cv-drawer-in {
    from {
      transform: translateX(-100%);
    }
  }
  @keyframes cv-drawer-out {
    to {
      transform: translateX(-100%);
    }
  }

  @media (max-width: 1180px) and (min-width: 768px) {
    .cv-shell {
      grid-template-columns: 64px minmax(0, 1fr);
    }
    .cv-side {
      padding: 14px 8px;
      align-items: stretch;
    }
    .cv-side .cv-lbl,
    .cv-side .cv-nav-group,
    .cv-side .cv-count,
    .cv-side .cv-side-foot .cv-hide-rail {
      display: none;
    }
    .cv-side .cv-nav-group + a {
      margin-top: 12px;
    }
    .cv-side .cv-brand {
      justify-content: center;
      padding: 6px 0 10px;
    }
    .cv-side .cv-nav a {
      justify-content: center;
      min-height: 44px;
      padding: 0;
    }
    .cv-side .cv-env {
      justify-content: center;
      padding: 0;
      min-height: 44px;
    }
    .cv-side .cv-env span,
    .cv-side .cv-me > span:not(.cv-avatar) {
      display: none;
    }
    .cv-side .cv-side-foot {
      grid-template-columns: 1fr;
      justify-items: center;
    }
    .cv-side .cv-side-foot > * {
      grid-column: 1;
    }
    .cv-main {
      padding: 20px 24px 56px;
    }
  }
  @media (max-width: 767px) {
    .cv-shell {
      grid-template-columns: minmax(0, 1fr);
    }
    .cv-side {
      display: none;
    }
    .cv-topbar {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 56px;
      padding: 0 12px;
      position: sticky;
      top: 0;
      z-index: 30;
      background: color-mix(in oklab, var(--cv-canvas), transparent 8%);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--cv-hairline);
    }
    .cv-topbar .cv-brand {
      padding: 0 4px;
      font-size: 15px;
    }
    .cv-main {
      padding: 16px 16px 48px;
    }
    .cv-page-head h1 {
      font-size: 23px;
    }
  }
}

/* Touch: every control is a 44 px target; desktop keeps the dense sizes. */
@media (pointer: coarse) {
  @layer components {
    .cv-btn--sm,
    .cv-filter,
    .cv-chip,
    .cv-seg > button,
    .cv-views > button,
    .cv-input {
      min-height: 44px;
    }
    .cv-chip-x {
      width: 44px;
      height: 44px;
      margin: -6px -12px -6px -8px;
    }
    .cv-switch {
      box-shadow: 0 0 0 9px transparent;
    }
    .cv-crumbs a {
      padding: 12px 0;
      margin: -12px 0;
    }
    .cv-play {
      min-height: 44px;
    }
    summary.cv-code-h {
      min-height: 44px;
    }
    .cv-table th button {
      min-height: 44px;
      min-width: 44px;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .cv-curvinha :is(.c-eyes, .c-eyes-big, .c-all, .c-body, .c-roof, .c-ticks) {
    animation: none !important;
  }
}

/* Stacked tables: the holder steps back (see .cv-table above). Unlayered on
 * purpose, to win over a Tailwind card's border, background and padding. */
@media (max-width: 1023px) {
  .cv-table-host,
  .cv-panel:has(.cv-table) {
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }
  .cv-panel:has(.cv-table) > .cv-panel-h {
    padding-inline: 0;
  }
}
