    /* B-SHELL-3: the marketing header is now the shared React island (public/header.bundled.js/.css,
       from packages/ui). The old public/_header.html + header.js + scripts/build-shared-header.js are
       DELETED. Some legacy .cc-marketing-* / .site-header-* rules remain below, interleaved with
       app-layout — harmless dead CSS (the island's header.bundled.css styles the header); a surgical
       cleanup is a safe follow-up (not bulk-removed here to avoid touching interleaved layout rules). */
    :root {
      /* Chrome-navy — the fixed brand chrome color behind the marketing header,
         the app-shell sidebar, and the auth-gate header. Named from the raw #002368
         that already existed verbatim in those places (ATLAS-HEADER-FIT promotion). */
      --cc-chrome: #002368;
      --bg: #003A8F;
      --bg-mid: #0f1f3d;
      --surface: #ffffff;
      --surface-2: #f7f8fa;
      --text: #1a1d24;
      --text-muted: #5c6270;
      --border: #dde1ea;
      --border-focus: #003A8F;
      --accent: #003A8F;
      --accent-hover: #002d70;
      --accent-light: #eff4ff;
      --result-bg: #f7f9ff;
      --result-border: #c3d3f5;
      --success: #0d7a3e;
      --success-bg: #d1fae5;
      --success-border: #6ee7b0;
      --warn: #92400e;
      --warn-bg: #fef3c7;
      --warn-border: #fcd34d;
      --danger: #991b1b;
      --danger-bg: #fee2e2;
      --danger-border: #fca5a5;
      --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08);
      --shadow-md: 0 4px 20px rgba(10, 22, 40, 0.14);
      --shadow-lg: 0 8px 40px rgba(10, 22, 40, 0.18);
      --radius: 7px;
      --radius-lg: 12px;
      --font-display: "DM Serif Display", Georgia, serif;
      --font-body: "DM Sans", system-ui, sans-serif;

      /* ============================================================
         ULTRAMARINE SEMANTIC TOKENS
         Added Day 14 Phase A2. Coexist with literal-name tokens above
         until Phase H grep confirms zero literal-name consumers.
         Values copied from design/ultramarine-mockup.html.
         ============================================================ */

      /* Brand */
      --cc-brand: #003A8F;
      --cc-brand-soft: #eff4ff;
      --cc-brand-tint: #eef3fb;
      --cc-brand-border: #d6e1f1;
      --cc-brand-on-brand: #ffffff;

      /* Brand alpha (production reality — not in mockup spec).
         Used for subtle brand-tinted backgrounds, hover states,
         focus glows. Per-alpha tokens preserve dark-mode correctness. */
      --cc-brand-a04: rgba(0, 58, 143, 0.04);
      --cc-brand-a06: rgba(0, 58, 143, 0.06);
      --cc-brand-a08: rgba(0, 58, 143, 0.08);
      --cc-brand-a10: rgba(0, 58, 143, 0.10);
      --cc-brand-a12: rgba(0, 58, 143, 0.12);
      --cc-brand-a15: rgba(0, 58, 143, 0.15);
      --cc-brand-a20: rgba(0, 58, 143, 0.20);

      /* Matters / Usage surfaces (Phase 4). Ultramarine-only; warm-gray page, hairline dividers,
         serif display numbers. The mockup's throwaway --ultra/--amber names map to these + the
         existing --cc-brand* / --cc-meter-low-* families. */
      --cc-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
      --cc-bg-warm: #f4f2ee;                 /* warm-gray pane/page tint */
      --cc-hairline: rgba(10, 22, 40, 0.06); /* softer than --cc-border, for pane dividers */
      --cc-track: #e7e5e0;                   /* meter + ring track */

      /* Surfaces */
      --cc-bg-page: #003A8F;
      --cc-bg-card: #ffffff;
      --cc-bg-input: #ffffff;
      --cc-bg-citation-from: #fafaf7;
      --cc-bg-citation-to: #f5f4ef;
      --cc-bg-subtle: #fafaf7;
      --cc-bg-muted: #f7f6f1;
      --cc-bg-overlay: rgba(255, 255, 255, 0.96);
      --cc-bg-tab-strip: #f5f4ef;

      /* Text */
      --cc-text-primary: #0a0a0a;
      --cc-text-body: #1a1a1a;
      --cc-text-secondary: #5a5a55;
      --cc-text-tertiary: #67665f;
      --cc-text-disabled: #a8a7a3;
      --cc-text-on-brand: #ffffff;

      /* Borders */
      --cc-border: rgba(10, 22, 40, 0.10);
      --cc-border-strong: rgba(10, 22, 40, 0.20);
      --cc-border-soft: #ececea;
      --cc-border-softer: #e3e2dc;

      /* States */
      --cc-success-bg: #e7f3ee;
      --cc-success-text: #0f6e56;
      --cc-success-border: #9ad9be;
      --cc-warning-bg: #fdf3df;
      --cc-warning-text: #a76b1c;
      --cc-warning-text-strong: #6b3f0e;
      --cc-warning-border: #f0d8a1;
      --cc-error-bg: #f6e9e7;
      --cc-error-text: #9c5454;
      --cc-error-border: #e0b6b6;
      --cc-user-bg: #e6f0fc;
      --cc-user-text: #1a4a8c;
      --cc-user-text-strong: #0e3a72;
      --cc-user-border: #c4daf3;

      /* Interaction */
      --cc-row-hover-bg: #f7f6f1;
      --cc-history-action-bg: #f4f3ee;

      /* Effects */
      --cc-shadow-card: 0 1px 3px rgba(10, 22, 40, 0.04);
      --cc-shadow-dropdown: 0 12px 32px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.05);
      --cc-shadow-overlay: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
      --cc-shadow-toast: 0 4px 12px rgba(0, 0, 0, 0.20);

      /* Focus ring */
      --cc-focus-ring: rgba(0, 58, 143, 0.10);

      /* Loading */
      --cc-loading-track: #eef3fb;

      /* Usage meter (production-only — not in mockup spec).
         Traffic-light states for free-tier citation usage. */
      --cc-meter-healthy-fill: #6b9e7d;
      --cc-meter-healthy-text: #2d5e3f;
      --cc-meter-low-fill: #ef9f27;
      --cc-meter-low-text: #854f0b;
      --cc-meter-critical-fill: #e24b4a;
      --cc-meter-critical-text: #a32d2d;

      /* ATLAS VIZ TOKENS — deep-canvas world + ultramarine heat ramp. Added FATHOM-1.
         The Atlas heat-map canvas is an intrinsically deep-navy world map; the ramp
         heats INTO the real brand (--cc-viz-heat-1 == --cc-brand #003A8F), so no
         re-derivation was needed. The canvas is theme-invariant (a heat ocean stays
         deep in light OR dark), so the dark-theme block below repeats these values. */
      --cc-viz-deep: #0f1f3d;
      --cc-viz-deep-line: #1c2f56;
      --cc-viz-land: #152648;
      --cc-viz-ring: rgba(141, 168, 214, 0.5);   /* min-visibility hairline on every court */
      --cc-viz-heat-0: #2a4580;                   /* FLOORED cold — clearly above the canvas */
      --cc-viz-heat-1: #003A8F;                   /* heats into the brand color */
      --cc-viz-heat-2: #3f77d4;
      --cc-viz-heat-3: #8fb8ff;
      --cc-viz-heat-4: #dcebff;
      --cc-viz-heat-5: #ffffff;
      --cc-viz-text-on-deep: #c9d6ef;
      --cc-viz-faint-on-deep: #6d7ea3;

    }

    :root[data-theme="dark"] {
      /* B-THEMES Phase 1: /themes.css (loaded BEFORE this sheet) is now the
         single authority for every shared color token in dark mode — the old
         Ultramarine-dark literals that shadowed it (same-specificity, later
         order) are DELETED so En Banc's values flow through. Only tokens
         unique to this sheet remain, re-pointed at contract roles so any
         dark theme resolves them correctly. */

      /* Matters / Usage surfaces — dark equivalents via contract roles */
      --cc-bg-warm: var(--cc-card-alt);
      --cc-track: rgba(255, 255, 255, 0.11);

      /* Surfaces unique to this sheet */
      --cc-bg-citation-from: var(--cc-card-raised);
      --cc-bg-citation-to: var(--cc-card-alt);
      --cc-bg-tab-strip: var(--cc-card-raised);

      /* States unique to this sheet */
      --cc-warning-text-strong: var(--cc-warning-text);
      --cc-user-text-strong: var(--cc-user-text);

      /* Interaction */
      --cc-row-hover-bg: var(--cc-card-hover);
      --cc-history-action-bg: var(--cc-card-hover);

      /* Loading */
      --cc-loading-track: var(--cc-card-raised);

      /* Usage meter (fill/text variants unique to this sheet) */
      --cc-meter-healthy-fill: var(--cc-meter-healthy);
      --cc-meter-healthy-text: var(--cc-meter-healthy);
      --cc-meter-low-fill: var(--cc-meter-low);
      --cc-meter-low-text: var(--cc-meter-low);
      --cc-meter-critical-fill: var(--cc-meter-critical);
      --cc-meter-critical-text: var(--cc-meter-critical);

      /* ATLAS VIZ TOKENS (dark) — intentionally identical to the light values: the
         deep-canvas world map is theme-invariant, so the heat ramp and canvas stay
         the same deep ultramarine in dark mode. Added FATHOM-1. */
      --cc-viz-deep: #0f1f3d;
      --cc-viz-deep-line: #1c2f56;
      --cc-viz-land: #152648;
      --cc-viz-ring: rgba(141, 168, 214, 0.5);
      --cc-viz-heat-0: #2a4580;
      --cc-viz-heat-1: #003A8F;
      --cc-viz-heat-2: #3f77d4;
      --cc-viz-heat-3: #8fb8ff;
      --cc-viz-heat-4: #dcebff;
      --cc-viz-heat-5: #ffffff;
      --cc-viz-text-on-deep: #c9d6ef;
      --cc-viz-faint-on-deep: #6d7ea3;
    }

    [data-theme="dark"] main#mainContent {
      background: var(--cc-bg-card);
    }

    [data-theme="dark"] .card {
      background: var(--cc-bg-card);
      border-color: var(--cc-border-soft);
    }

    [data-theme="dark"] .btn-primary,
    [data-theme="dark"] .cc-generate-btn {
      /* D-29: real primary buttons stay accent-filled with on-accent text
         (never light-blue text bleeding onto white pills). */
      background: var(--cc-accent-fill);
      color: var(--cc-on-accent);
    }

    [data-theme="dark"] .btn-primary:hover,
    [data-theme="dark"] .cc-generate-btn:hover {
      background: var(--cc-accent-fill-hover);
    }

    /* Hide Clerk footer attribution and dev-mode banner.
       Note: The "Secured by Clerk" attribution is required by Clerk's TOS
       on the free tier. Confirm your plan allows hiding before shipping. */
    .cl-internal-1dauvpw,
    .cl-footer,
    .cl-internal-b3fm6y,
    [data-clerk-element="footer"],
    .cl-internal-clerkBranding,
    div[class*="cl-internal-"][class*="footer"],
    div[class*="cl-internal-"][class*="Branding"],
    div[class*="cl-internal-"][class*="DevModeNotice"],
    div[class*="cl-internal-"][class*="developmentMode"] {
      display: none !important;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { min-height: 100%; }

    /* Screen reader only — visually hidden but available to assistive tech */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* Skip link — visible when focused (keyboard users) */
    .skip-link {
      position: absolute;
      top: -40px;
      left: 0;
      background: var(--cc-brand);
      color: var(--cc-text-on-brand);
      padding: 0.5rem 1rem;
      text-decoration: none;
      border-radius: 0 0 4px 0;
      z-index: 10000;
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 700;
    }

    @media (prefers-reduced-motion: no-preference) {
      .skip-link {
        transition: top 0.2s ease;
      }
    }

    .skip-link:focus {
      top: 0;
      outline: 2px solid var(--cc-text-on-brand);
      outline-offset: 2px;
    }

    /* Visually hidden but announced by screen readers */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* Keyboard focus — :focus-visible only (not mouse clicks) */
    :focus-visible {
      outline: 2px solid var(--cc-brand);
      outline-offset: 2px;
      border-radius: 4px;
    }

    button:focus-visible,
    .btn-primary:focus-visible,
    .btn-start-over:focus-visible {
      outline: 2px solid var(--cc-brand);
      outline-offset: 2px;
      box-shadow: 0 0 0 4px var(--cc-brand-a15);
    }

    input:focus-visible,
    textarea:focus-visible,
    select:focus-visible {
      outline: 2px solid var(--cc-brand);
      outline-offset: 1px;
    }

    button:focus:not(:focus-visible),
    a:focus:not(:focus-visible) {
      outline: none;
    }

    body {
      /* B-PRICE-FIX Block 3: this was the legacy app-shell 100vh grid
         (topnav/sidebar/main/right). No live page loads styles.css AND that
         shell — the SPA is client/index.html with its own styles; every
         consumer of this file is a static marketing/atlas page, where the
         100vh clamp + overflow:hidden collapsed <main> and clipped content
         under the footer on small viewports. Normal document flow. */
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      width: 100%;
      max-width: 100vw;
      overflow-x: hidden;
      font-family: var(--font-body);
      font-size: 1rem;
      line-height: 1.55;
      color: var(--cc-text-body);
      background: var(--cc-bg-page);
      background-image:
        radial-gradient(ellipse 80% 60% at 20% 0%, var(--cc-brand-a15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, var(--cc-brand-a08) 0%, transparent 50%);
      background-color: var(--cc-chrome); /* B-THEMES: chrome band behind header/footer */
      -webkit-font-smoothing: antialiased;
    }

    main#mainContent {
      flex: 1 0 auto; /* fills to the footer on short pages; grows freely on long ones */
      background: var(--cc-page);
      padding: 1.5rem 2rem;
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }

    .header-controls-logged-out,
    .header-controls-logged-in {
      display: none;
      align-items: center;
      gap: 14px;
    }

    body.header-state-logged-out .header-controls-logged-out {
      display: inline-flex;
    }

    body.header-state-free-healthy .header-controls-logged-in,
    body.header-state-free-low .header-controls-logged-in,
    body.header-state-free-critical .header-controls-logged-in,
    body.header-state-pro .header-controls-logged-in {
      display: inline-flex;
    }

    body.header-state-logged-out .header-controls-logged-in {
      display: inline-flex;
    }

    body.header-state-logged-out .header-controls-logged-in .site-header-history-wrap,
    body.header-state-logged-out .header-controls-logged-in .site-header-usage-meter,
    body.header-state-logged-out .header-controls-logged-in .site-header-tier-badge,
    body.header-state-logged-out .header-controls-logged-in .site-header-avatar-wrap {
      display: none !important;
    }

    .site-header-signin {
      height: 38px;
      padding: 0 16px;
      border: 1px solid var(--cc-brand-border);
      border-radius: 8px;
      background: var(--cc-bg-card);
      color: var(--cc-text-secondary);
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 600;
      line-height: 1;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

    .site-header-signin:hover {
      border-color: var(--cc-brand);
      color: var(--cc-brand);
      background: var(--cc-brand-soft);
    }

    .site-header-history {
      appearance: none;
      height: 38px;
      padding: 0 12px;
      border-radius: 8px;
      background: var(--cc-brand-tint);
      border: 0.5px solid var(--cc-brand-border);
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: var(--cc-brand);
      font-family: var(--font-body);
      cursor: pointer;
    }

    .site-header-history-wrap {
      display: inline-flex;
      align-items: center;
    }

    .site-header-history-icon {
      width: 13px;
      height: 13px;
      opacity: 0.65;
      flex-shrink: 0;
    }

    .site-header-history-count {
      display: none;
      font-size: 13px;
      font-weight: 600;
      line-height: 1;
      color: var(--cc-brand);
    }

    body.header-state-free-healthy .site-header-history-count--free-healthy,
    body.header-state-free-low .site-header-history-count--free-low,
    body.header-state-free-critical .site-header-history-count--free-critical,
    body.header-state-pro .site-header-history-count--pro {
      display: inline;
    }

    .site-history-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      right: 0;
      width: auto;
      min-width: 100%;
      margin-left: -8px;
      margin-right: -8px;
      background: var(--cc-bg-card);
      border: 0.5px solid var(--cc-border-soft);
      border-radius: 12px;
      box-shadow: var(--cc-shadow-dropdown);
      z-index: 1200;
      overflow: hidden;
      opacity: 0;
      transform: translateY(-4px);
      animation: siteHistoryDropdownIn 120ms ease-out forwards;
    }

    .site-history-dropdown[hidden] {
      display: none;
    }

    @keyframes siteHistoryDropdownIn {
      from {
        opacity: 0;
        transform: translateY(-4px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .site-history-dropdown {
        animation: none;
        opacity: 1;
        transform: none;
      }
    }

    .site-history-dropdown-head {
      padding: 9px 14px;
      background: var(--cc-bg-muted);
      border-bottom: 0.5px solid var(--cc-border-soft);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .site-history-dropdown-title {
      font-size: 12px;
      font-weight: 500;
      color: var(--cc-text-secondary);
      line-height: 1;
    }

    .site-history-dropdown-clear {
      border: none;
      background: transparent;
      color: var(--cc-text-disabled);
      font-size: 11px;
      font-weight: 500;
      font-family: var(--font-body);
      line-height: 1;
      cursor: pointer;
    }

    .site-history-row {
      padding: 9px 14px;
      border-bottom: 0.5px solid var(--cc-border-soft);
      cursor: default;
      transition: background 0.12s ease;
      position: relative;
      z-index: 1;
      background: var(--cc-bg-card);
    }

    .site-history-row:hover {
      background: var(--cc-brand-soft);
    }

    .site-history-row:last-of-type {
      border-bottom: none;
    }

    .site-history-citation {
      font-size: 12px;
      color: var(--cc-text-body);
      line-height: 1.3;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 5px;
    }

    .site-history-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .site-history-action-btn {
      border: 0.5px solid var(--cc-border-softer);
      border-radius: 4px;
      background: var(--cc-history-action-bg);
      color: var(--cc-text-secondary);
      font-size: 11px;
      font-weight: 500;
      font-family: var(--font-body);
      line-height: 1;
      padding: 2px 8px;
      cursor: pointer;
    }

    .site-history-dropdown-foot {
      padding: 8px 14px;
      background: var(--cc-bg-muted);
      border-top: 0.5px solid var(--cc-border-soft);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .site-history-dropdown-foot-left {
      font-size: 11px;
      color: var(--cc-text-disabled);
      line-height: 1;
    }

    .site-history-empty {
      padding: 14px 14px;
      font-size: 12px;
      color: var(--cc-text-disabled);
      font-style: italic;
      text-align: center;
    }

    .site-history-dropdown-view-all {
      border: none;
      background: transparent;
      color: var(--cc-brand);
      font-size: 11px;
      font-weight: 500;
      font-family: var(--font-body);
      line-height: 1;
      cursor: pointer;
    }

    .site-header-usage-meter {
      display: none;
      height: 34px;
      padding: 0 10px;
      border-radius: 8px;
      background: #ffffff;
      border: 1px solid var(--cc-border-strong);
      align-items: center;
      gap: 8px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    body.header-state-free-healthy .site-header-usage-meter,
    body.header-state-free-low .site-header-usage-meter,
    body.header-state-free-critical .site-header-usage-meter {
      display: inline-flex;
    }

    .site-header-usage-bar {
      width: 56px;
      height: 4px;
      border-radius: 2px;
      overflow: hidden;
      background: var(--cc-border-softer);
    }

    .site-header-usage-fill {
      width: 0%;
      height: 100%;
      border-radius: 2px;
      transform-origin: left center;
    }

    .site-header-usage-text {
      font-size: 12px;
      font-weight: 500;
      line-height: 1;
      white-space: nowrap;
    }

    body.header-state-free-healthy .site-header-usage-fill {
      background: var(--cc-meter-healthy-fill);
    }

    body.header-state-free-healthy .site-header-usage-text {
      color: var(--cc-meter-healthy-text);
    }

    body.header-state-free-low .site-header-usage-fill {
      background: var(--cc-meter-low-fill);
    }

    body.header-state-free-low .site-header-usage-text {
      color: var(--cc-meter-low-text);
    }

    body.header-state-free-critical .site-header-usage-fill {
      background: var(--cc-meter-critical-fill);
    }

    body.header-state-free-critical .site-header-usage-text {
      color: var(--cc-meter-critical-text);
    }

    .site-header-usage-fraction {
      display: none;
    }

    body.header-state-free-healthy .site-header-usage-fraction--free-healthy,
    body.header-state-free-low .site-header-usage-fraction--free-low,
    body.header-state-free-critical .site-header-usage-fraction--free-critical {
      display: inline;
    }

    .site-header-tier-badge {
      display: none;
      height: 38px;
      padding: 0 14px;
      border-radius: 8px;
      align-items: center;
      background: var(--cc-brand);
      color: var(--cc-text-on-brand);
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.04em;
      line-height: 1;
    }

    body.header-state-pro .site-header-tier-badge {
      display: inline-flex;
    }

    .site-header-avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: 0.5px solid var(--cc-brand-border);
      background: var(--cc-brand);
      color: var(--cc-text-on-brand);
      font-size: 11px;
      font-weight: 500;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-body);
      cursor: pointer;
    }

    .site-header-avatar-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
    }

    .cc-avatar-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--cc-error);
      color: #ffffff;
      font-size: 0.625rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1.5px solid var(--cc-brand);
      pointer-events: none;
      font-family: var(--font-body);
    }

    .cc-avatar-badge[hidden] {
      display: none;
    }

    .site-avatar-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      width: 240px;
      background: var(--cc-bg-card);
      border: 0.5px solid var(--cc-border-soft);
      border-radius: 12px;
      box-shadow: var(--cc-shadow-dropdown);
      z-index: 100;
      overflow: hidden;
      opacity: 0;
      transform: translateY(-4px);
      animation: siteAvatarDropdownIn 120ms ease-out forwards;
    }

    .site-avatar-dropdown[hidden] {
      display: none;
    }

    @keyframes siteAvatarDropdownIn {
      from {
        opacity: 0;
        transform: translateY(-4px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .site-avatar-dropdown {
        animation: none;
        opacity: 1;
        transform: none;
      }
    }

    .site-avatar-dropdown-head {
      padding: 12px 14px;
      background: var(--cc-bg-muted);
      border-bottom: 0.5px solid var(--cc-border-soft);
    }

    .site-avatar-dropdown-name {
      font-size: 13px;
      font-weight: 500;
      color: var(--cc-text-body);
      line-height: 1.2;
    }

    .site-avatar-dropdown-email {
      display: none;
      margin-top: 1px;
      font-size: 11px;
      color: var(--cc-text-disabled);
      line-height: 1.2;
    }

    body.header-state-free-healthy .site-avatar-dropdown-email--free,
    body.header-state-free-low .site-avatar-dropdown-email--free,
    body.header-state-free-critical .site-avatar-dropdown-email--free {
      display: block;
    }

    body.header-state-pro .site-avatar-dropdown-email--pro {
      display: block;
    }

    .site-avatar-plan-row {
      padding: 9px 14px;
      border-bottom: 0.5px solid var(--cc-border-soft);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .site-avatar-plan-left {
      font-size: 13px;
      color: var(--cc-text-body);
      line-height: 1;
    }

    .site-avatar-plan-right-upgrade {
      display: none;
      font-size: 12px;
      font-weight: 500;
      color: var(--cc-brand);
      line-height: 1;
      border: none;
      background: transparent;
      cursor: pointer;
      font-family: var(--font-body);
      padding: 0;
    }

    .site-avatar-plan-right-check {
      display: none;
      font-size: 12px;
      font-weight: 600;
      color: var(--cc-success-text);
      line-height: 1;
    }

    body.header-state-free-healthy .site-avatar-plan-left::after,
    body.header-state-free-low .site-avatar-plan-left::after,
    body.header-state-free-critical .site-avatar-plan-left::after {
      content: "Free plan";
    }

    body.header-state-pro .site-avatar-plan-left::after {
      content: "Pro plan";
    }

    body.header-state-free-healthy .site-avatar-plan-right-upgrade,
    body.header-state-free-low .site-avatar-plan-right-upgrade,
    body.header-state-free-critical .site-avatar-plan-right-upgrade {
      display: inline;
    }

    body.header-state-pro .site-avatar-plan-right-check {
      display: inline;
    }

    .site-avatar-menu-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      text-align: left;
      padding: 9px 14px;
      font-size: 13px;
      color: var(--cc-text-body);
      background: var(--cc-bg-card);
      border: none;
      border-bottom: 0.5px solid var(--cc-border-soft);
      cursor: pointer;
      font-family: var(--font-body);
      line-height: 1.2;
    }

    .cc-menu-notification-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--cc-error);
      flex-shrink: 0;
    }

    .cc-menu-notification-dot[hidden] {
      display: none;
    }

    .site-avatar-menu-row:last-child {
      border-bottom: none;
      color: var(--cc-text-body);
    }

    .site-avatar-menu-row:hover {
      background: var(--cc-brand-soft);
    }

    .site-avatar-menu-row:last-child:hover {
      background: var(--cc-error-bg);
      color: var(--cc-error-text);
    }

    .site-header-get-started {
      height: 38px;
      padding: 0 16px;
      border: none;
      border-radius: 8px;
      background: var(--cc-brand);
      color: var(--cc-text-on-brand);
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 500;
      line-height: 1;
      cursor: pointer;
    }

    @media (max-width: 640px) {
      .brand-right {
        flex-basis: 100%;
        justify-content: flex-end;
        gap: 6px;
      }

      .header-controls-logged-out,
      .header-controls-logged-in {
        gap: 6px;
      }

      /* Logged-out mobile */
      .site-header-signin {
        display: inline-flex;
        align-items: center;
        height: 38px;
        padding: 0 10px;
        border: 1px solid var(--cc-border);
        border-radius: 8px;
        background: var(--cc-bg-card);
        color: var(--cc-text-secondary);
        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
        cursor: pointer;
      }

      .site-header-get-started {
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
      }

      /* Logged-in mobile */
      .site-header-history {
        min-height: 38px;
        min-width: 52px;
        width: 52px;
        padding: 0 9px;
        justify-content: space-between;
      }

      .site-header-usage-meter {
        min-height: 38px;
        padding: 0 9px;
        width: auto;
      }

      .site-header-usage-bar {
        display: none;
      }

      .site-header-tier-badge {
        min-height: 38px;
        padding: 0 9px;
      }

      .site-header-avatar {
        width: 38px;
        height: 38px;
      }

      /* Mobile: fixed full-width sheet */
      .site-history-dropdown {
        position: fixed;
        top: 16px;
        left: 16px;
        right: 16px;
        width: calc(100vw - 32px);
        margin-left: 0;
        margin-right: 0;
        max-height: 70vh;
        overflow-y: auto;
      }

      .site-avatar-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: min(240px, calc(100vw - 32px));
      }

      /* Mobile tap comfort: minimum 38px targets for header / dropdown rows */
      .site-header-history,
      .site-header-get-started,
      .site-header-avatar,
      .site-history-dropdown-clear,
      .site-history-action-btn,
      .site-history-dropdown-view-all,
      .site-avatar-plan-right-upgrade,
      .site-avatar-menu-row {
        min-height: 38px;
      }

      .site-history-action-btn,
      .site-history-dropdown-clear,
      .site-history-dropdown-view-all {
        min-width: 32px;
      }
    }

    .card {
      width: 100%;
      background: transparent;
      border: none;
      border-radius: 0;
      box-shadow: none;
      padding: 0;
      margin: 0;
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }


    .feedback-panel {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 8px;
      padding: 8px 12px;
      background: var(--cc-bg-subtle);
      border: 0.5px solid var(--cc-border-soft);
      border-radius: 8px;
    }
    .feedback-panel[hidden] { display: none; }
    .feedback-btn.feedback-btn-selected {
      background: var(--cc-brand-soft);
      border-color: var(--cc-brand);
      color: var(--cc-brand);
    }
    .feedback-btn:disabled {
      cursor: default;
      opacity: 0.85;
    }
    .feedback-thanks-text {
      font-size: 13px;
      color: var(--cc-text-secondary);
      padding: 2px 4px;
    }
    .feedback-prompt {
      font-size: 12px;
      color: var(--cc-text-secondary);
      font-family: var(--font-body);
    }
    .feedback-actions {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: auto;
    }

    .cc-sidebar-toggle {
      display: none;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
      color: var(--cc-text-primary);
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
      border-radius: 8px;
      flex-shrink: 0;
    }


    .site-header-history-wrap {
      display: none !important;
    }

    #ccHistoryCard {
      flex: 0 0 auto;
    }

    .feedback-btn {
      width: 26px;
      height: 26px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      border: 0.5px solid var(--cc-border-soft);
      border-radius: 5px;
      color: var(--cc-text-secondary);
      cursor: pointer;
      transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    }
    .feedback-btn:hover {
      color: var(--cc-brand);
      border-color: var(--cc-brand);
      background: var(--cc-bg-card);
    }
    .feedback-btn-text {
      height: 26px;
      padding: 0 12px;
      background: transparent;
      border: 0.5px solid var(--cc-border-soft);
      border-radius: 5px;
      color: var(--cc-text-secondary);
      cursor: pointer;
      font-size: 11px;
      font-family: var(--font-body);
      transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    }
    .feedback-btn-text:hover {
      color: var(--cc-brand);
      border-color: var(--cc-brand);
      background: var(--cc-bg-card);
    }

    /* ── Fade-in micro-interactions ── */
    @keyframes citeclerkFadeIn {
      from { opacity: 0; transform: translateY(-4px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    @keyframes citeclerkFadeOut {
      from { opacity: 1; transform: translateY(0); }
      to   { opacity: 0; transform: translateY(-4px); }
    }

    /* ============================================================
       ULTRAMARINE ANIMATION SYSTEM (ported from mockup)
       ============================================================ */
    @keyframes ccDropdownIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes ccPageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes ccCitationReveal { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @keyframes ccSpinnerRotate { to { transform: rotate(360deg); } }
    @keyframes ccCheckIn { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
    @keyframes ccCheckOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.9); } }
    @keyframes ccSlideDown { from { opacity: 0; transform: translateY(-6px); max-height: 0; } to { opacity: 1; transform: translateY(0); max-height: 400px; } }
    @keyframes ccToastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes ccGateIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @keyframes ccLoadingBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

    .cc-dropdown { animation: ccDropdownIn 120ms ease-out forwards; }
    .cc-page-content { animation: ccPageIn 280ms cubic-bezier(0.2, 0, 0, 1) both; }
    .cc-citation-reveal { animation: ccCitationReveal 460ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both; }
    .cc-spinner { animation: ccSpinnerRotate 1.5s linear infinite; }
    .cc-check-in { animation: ccCheckIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
    .cc-check-out { animation: ccCheckOut 0.2s ease-in forwards; }
    .cc-slide-down { animation: ccSlideDown 220ms ease-out forwards; overflow: hidden; }
    .cc-toast-in { animation: ccToastIn 200ms ease-out forwards; }
    .cc-gate-in { animation: ccGateIn 240ms cubic-bezier(0.2, 0, 0, 1) forwards; }

    .cc-input-field { transition: border-color 0.25s ease, box-shadow 0.25s ease; }
    .cc-input-field:focus { border-color: var(--cc-brand) !important; box-shadow: 0 0 0 3px var(--cc-focus-ring); }
    .cc-hover-blue { transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease; }

    @media (prefers-reduced-motion: reduce) {
      .cc-dropdown, .cc-page-content, .cc-citation-reveal, .cc-slide-down, .cc-toast-in, .cc-check-in, .cc-check-out, .cc-gate-in {
        animation: none !important; opacity: 1 !important; transform: none !important;
      }
      .cc-spinner { animation: none !important; }
      .try-chips { transition: none !important; }
    }

    .fade-in {
      animation: none;
    }

    @media (prefers-reduced-motion: no-preference) {
      .fade-in {
        animation: citeclerkFadeIn 0.25s ease-out;
      }
    }

    .fade-out {
      animation: none;
    }

    @media (prefers-reduced-motion: no-preference) {
      .fade-out {
        animation: citeclerkFadeOut 0.2s ease-in forwards;
      }
    }

    .shortcite-screen {
      display: flex;
      flex-direction: column;
    }

    #shortciteInlinePanel {
      border-top: 1px solid var(--cc-border-soft);
      padding-top: 0.5rem;
    }
    #shortciteInlinePanel:not([hidden]) {
      margin-top: 0.5rem;
    }
    .shortcite-start-over-link {
      background: transparent;
      border: none;
      padding: 0;
      font-size: 12px;
      color: var(--cc-text-secondary);
      cursor: pointer;
      font-family: var(--font-body);
    }
    .shortcite-start-over-link:hover {
      color: var(--cc-text-body);
      text-decoration: underline;
    }
    #shortciteSubtitleCaseName {
      font-family: var(--font-display);
      font-style: italic;
      color: var(--cc-text-body);
    }

    .shortcite-close {
      padding: 0.25rem 0.55rem;
      font-family: var(--font-body);
      font-size: 0.7rem;
      font-weight: 500;
      color: var(--cc-text-secondary);
      background: transparent;
      border: 1px solid var(--cc-border);
      border-radius: 12px;
      cursor: pointer;
      flex-shrink: 0;
      transition: border-color 0.15s, color 0.15s;
    }

    .shortcite-close:hover {
      border-color: var(--cc-text-body);
      color: var(--cc-text-body);
    }

    .shortcite-inputs {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
    }

    @media (max-width: 480px) {
      .shortcite-inputs { grid-template-columns: 1fr; }
    }

    .shortcite-generate-btn {
      width: 100%;
      padding: 0.875rem 1.5rem;
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 700;
      color: var(--cc-text-on-brand);
      background: var(--cc-brand);
      border: none;
      border-radius: 12px;
      cursor: pointer;
      box-shadow: 0 2px 8px var(--cc-brand-a20), 0 1px 3px var(--cc-brand-a15);
      transition: all 0.2s ease;
      letter-spacing: 0.01em;
    }

    .shortcite-generate-btn:hover {
      background: var(--cc-brand);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px var(--cc-brand-a20), 0 2px 6px var(--cc-brand-a20);
    }

    .shortcite-generate-btn:active {
      transform: translateY(0);
    }

    .shortcite-reveal[hidden] {
      display: none;
    }

    .shortcite-reveal {
      display: block;
    }

    .shortcite-reveal.hiding {
      animation: citeclerkFadeOut 220ms cubic-bezier(0.4, 0, 1, 1) both;
    }

    @media (prefers-reduced-motion: reduce) {
      .shortcite-reveal.hiding {
        animation: none;
      }
    }

    .shortcite-paren-toggle[hidden] { display: none; }

    .shortcite-paren-grid {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 0.75rem;
    }

    .shortcite-woa-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-top: 0.75rem;
    }

    .shortcite-woa-grid .field {
      flex: 1 1 0;
      min-width: 0;
    }

    .shortcite-woa-grid #shortcite-field-woa-type { flex: 2 1 0; }
    .shortcite-woa-grid #shortcite-field-woa-lastname { flex: 1.5 1 0; }
    .shortcite-woa-grid #shortcite-field-woa-designation { flex: 0.5 1 auto; min-width: 5rem; }

    @media (max-width: 480px) {
      .shortcite-paren-grid { grid-template-columns: 1fr; }
      .shortcite-woa-grid { flex-direction: column; }
      .shortcite-woa-grid .field { flex: 1 1 100%; }
    }

    .shortcite-error {
      margin-top: 0.5rem;
      font-size: 0.72rem;
      color: var(--cc-error-text);
    }

    .shortcite-error[hidden] { display: none; }

    .brand {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 0.5rem;
    }

    .brand-left {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
    }

    .brand-right {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      justify-content: flex-end;
      min-width: 0;
      padding-right: 4px;
      margin-top: 2px;
    }

    .brand h1 {
      margin: 0;
      font-size: clamp(2.2rem, 5.5vw, 2.9rem);
    }

    h1 {
      font-family: var(--font-display);
      font-size: clamp(1.9rem, 5vw, 2.4rem);
      font-weight: 400;
      letter-spacing: -0.01em;
      line-height: 1;
      color: var(--cc-text-primary);
    }

    .subtitle {
      font-size: 13px;
      color: var(--cc-text-secondary);
      margin-bottom: 1.5rem;
      line-height: 1.4;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .field[hidden] { display: none !important; }

    label {
      font-size: 0.6875rem;
      font-weight: 600;
      text-transform: none;
      letter-spacing: 0.03em;
      opacity: 0.8;
      color: var(--cc-text-secondary);
    }


    /* Year range error sits on the filter row without .has-error; show when not [hidden]. */

    input[type="text"],
    input[type="number"],
    select {
      width: 100%;
      min-height: 2.25rem;
      padding: 0.5rem 0.75rem;
      font-family: var(--font-body);
      font-size: 0.9375rem;
      color: var(--cc-text-body);
      background: var(--cc-bg-card);
      border: 1px solid var(--cc-brand-a10);
      border-radius: 12px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--cc-brand-a04);
      transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
      appearance: none;
      -webkit-appearance: none;
    }

    input[type="text"]::placeholder, input[type="number"]::placeholder { color: var(--cc-ink-muted); }

    input[type="text"]:hover, input[type="number"]:hover, select:hover {
      border-color: var(--cc-brand-a20);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--cc-brand-a08);
    }

    input[type="text"]:focus, input[type="number"]:focus, select:focus {
      outline: none;
      border-color: var(--cc-brand);
      box-shadow: 0 0 0 4.5px rgba(0, 58, 143, 0.18), 0 2px 8px var(--cc-brand-a12);
    }

    input[type="text"]:disabled, input[type="number"]:disabled {
      background: var(--cc-bg-subtle);
      border-color: var(--cc-border);
      color: var(--cc-text-secondary);
      cursor: not-allowed;
      box-shadow: none;
      opacity: 0.75;
    }

    select:disabled {
      background: var(--cc-bg-subtle);
      border-color: var(--cc-border);
      color: var(--cc-text-secondary);
      cursor: not-allowed;
      box-shadow: none;
      opacity: 0.75;
    }

    select:disabled:hover {
      border-color: var(--cc-border);
    }

    input[type="text"]:disabled::placeholder, input[type="number"]:disabled::placeholder {
      color: var(--cc-ink-muted);
      opacity: 0.8;
    }

    input[type="text"]:disabled:hover, input[type="number"]:disabled:hover {
      border-color: var(--cc-border);
    }

    input.auto-filled {
      background: var(--cc-card-raised);
      border-color: var(--cc-edge);
    }

    .select-wrapper {
      position: relative;
    }

    .select-wrapper::after {
      content: "";
      position: absolute;
      right: 0.75rem;
      top: 50%;
      transform: translateY(-50%);
      width: 0;
      height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 5px solid var(--cc-text-secondary);
      pointer-events: none;
    }

    .select-wrapper select { padding-right: 2rem; }

    .advanced-toggle-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }


    .case-info-toggle-label {
      flex: 0 0 auto;
    }

    /* Bare card — fields sit flush, no box (Rule / Restatement statute forms).
       Keeps inherited .disclosure-card margin-top so spacing under the radios survives. */
    .disclosure-card--bare {
      padding: 0;
      background: none;
      border: none;
      box-shadow: none;
    }
    #stFormRule .field > label,
    #stFormRestatement .field > label {
      display: inline-flex;
      align-items: center;
    }
    #stFormRule .field > label > svg,
    #stFormRestatement .field > label > svg {
      flex: 0 0 auto;
      margin-right: 0.4ch;
      opacity: 0.75;
    }

    .cc-additional-options-item {
      /* Each control row inside the box */
    }

    .cc-additional-options-label {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--cc-text-secondary);
      margin: 0;
    }

    .cc-additional-options-divider {
      border: none;
      border-top: 1px solid var(--cc-border-soft);
      margin: 0.875rem 0;
    }


    .cc-shortcite-form-footer {
      margin-top: 1rem;
    }


    /* ═══════════════════════════════════════════════════════════════════
       Doc Check Upload Page — Premium redesign (doccheck-upload-P1)
    ═══════════════════════════════════════════════════════════════════ */

    /* ── Drop area ── */
    #checkTabUpload {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    /* ===== Mobile Responsiveness ===== */

    /* ── Mode toggle ── */
    .cc-mode-toggle {
      display: inline-flex;
      background: var(--cc-bg-tab-strip);
      border: 1px solid var(--cc-border-soft);
      border-radius: 8px;
      padding: 3px;
      gap: 2px;
      margin-bottom: 1.25rem;
    }


    /* ── Doc Check P36b: split pane ────────────────────────────────── */

    /* Outer report wrapper — becomes the split pane container */
    /* Full-height chain: bulkCheckContainer → reportContainer → report card */
    #bulkCheckContainer {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    #reportContainer {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    /* ── P1: Brief document view ────────────────────────────────── */

    /* Report card header row (title + toggle button) */

    /* Responsive: collapse to single column below 860px */
    /* caution token fallbacks (in case not defined in :root) */
    :root {
      --cc-caution-bg: #fff7ed;
      --cc-caution-text: #c2410c;
      --cc-caution-border: #fed7aa;
      --cc-brand-on-brand: #ffffff;
      --cc-border-soft: #ececea;
    }


    /* Magic Cite: Case Information is hidden — Magic mode owns case-name input only; Manual mode owns parts-entry */

    /* Start Over button — appears on the result and advanced screens
       only (JS un-hides it there). Carries a `hidden` attribute by
       default; this is the CSS belt to that JS suspenders.
       mode-history / mode-bulk also hide it — those agree with this. */


    /* Magic Cite: hide divider above hidden Generate (mode row moved under case name; no longer adjacent to .divider). */

    .state-screen {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 2rem 1rem;
      gap: 1.25rem;
      text-align: center;
      min-height: 320px;
    }
    .state-icon {
      width: 40px;
      height: 40px;
    }
    .state-title {
      font-size: 15px;
      font-weight: 500;
      color: var(--cc-text-body);
      margin-bottom: 8px;
      font-family: var(--font-body);
    }
    .state-body {
      font-size: 13px;
      color: var(--cc-text-secondary);
      max-width: 360px;
      font-family: var(--font-body);
    }
    .state-text-link {
      background: transparent;
      border: none;
      padding: 8px;
      font-size: 13px;
      color: var(--cc-brand);
      cursor: pointer;
      font-family: var(--font-body);
    }
    .state-text-link:hover {
      color: var(--cc-brand-hover);
    }
    .loading-progress-track {
      width: 200px;
      height: 3px;
      background: var(--cc-loading-track);
      border-radius: 2px;
      overflow: hidden;
      position: relative;
    }
    .loading-progress-bar {
      width: 60%;
      height: 100%;
      background: var(--cc-brand);
      border-radius: 2px;
      animation: ccLoadingBar 1.6s ease-in-out infinite;
    }
    .loading-dots {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: center;
      margin-bottom: 4px;
    }
    .loading-dot {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--cc-brand);
      display: inline-block;
      animation: ccLoadingDotPulse 1.4s ease-in-out infinite;
    }
    .loading-dot-a { animation-delay: 0s; }
    .loading-dot-b { animation-delay: 0.2s; }
    .loading-dot-c { animation-delay: 0.4s; }
    @keyframes ccLoadingDotPulse {
      0%, 80%, 100% { opacity: 0.25; }
      40% { opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      .loading-dot { animation: none !important; opacity: 0.6 !important; }
    }

    /* Manual Cite: user already chose Manual via the tab; the mode buttons row is redundant
       and would let the user click Magic mid-Manual-flow. */

    /* ── Webpages source type: hide case-law-only UI (body.cite-type-webpage) ── */
    /* Webpage Additional Options box: hidden by default, shown only for webpages */
    #additionalOptionsSectionWebpage {
      display: none;
    }
    #additionalOptionsSectionStatute {
      display: none;
    }

    .cc-mode-card--webpage-placard {
      width: 100%;
      max-width: none;
      box-sizing: border-box;
      cursor: default;
      pointer-events: none;
      transition: none !important;
    }

    .cc-mode-card--webpage-placard:hover {
      border-color: var(--cc-brand);
      box-shadow: 0 0 0 3px var(--cc-brand-a10);
    }

    .cc-field-helper {
      display: block;
      margin-top: 0.25rem;
      font-size: 0.6875rem;
      line-height: 1.4;
      color: var(--cc-text-tertiary);
      font-family: var(--font-body);
    }

    /* Webpage short-cite (Indigo R34): no Weight of Authority */
    #shortciteInlinePanel.cc-shortcite-webpage #shortciteWoaSection {
      display: none !important;
    }
    #shortciteInlinePanel.cc-shortcite-webpage #shortcite-div-pincite-woa {
      display: none !important;
    }

    /* Webpage confirm — PDF URL hint (matches URL banner on same screen) */
    .pdf-hint-banner {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 1rem;
      padding: 10px 14px;
      background: var(--cc-bg-subtle);
      border: 1px solid var(--cc-border-soft);
      border-radius: 10px;
    }

    .pdf-hint-banner[hidden] {
      display: none !important;
    }

    /* ── Advanced Options rows ────────────────────────────────────────── */

    /* Divider */
    .cc-adv-divider {
      border: none;
      border-top: 1px solid var(--cc-border-soft);
      margin: 0.75rem 0;
    }

    /* Row 6: Reporter Preference full width */
    #reporterPref {
      margin: 0;
      padding: 0;
      background: transparent;
      border: none;
      border-top: 1px solid var(--cc-border-soft);
      padding-top: 0.75rem;
      margin-top: 0.25rem;
    }

    .woa-votecount-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.35rem;
    }
    .woa-votecount-row input[type="number"] {
      width: 4.5rem;
      min-width: 0;
      flex: 0 0 auto;
      -moz-appearance: textfield;
    }
    .woa-votecount-row input[type="number"]::-webkit-outer-spin-button,
    .woa-votecount-row input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    .woa-votecount-sep { color: var(--cc-text-secondary); }
    .woa-votecount-label { font-size: 0.875rem; color: var(--cc-text-secondary); }

    .ur-date-row {
      display: flex;
      flex-direction: row;
      gap: 0.35rem;
      align-items: stretch;
    }

    .ur-date-month { flex: 2 1 0; min-width: 0; }
    .ur-date-day   { flex: 1 1 0; min-width: 0; }
    .ur-date-year  { flex: 1.5 1 0; min-width: 0; }

    /* Required-field glow for unreported form — matches manual cite style */
    #unreportedForm:not([hidden]) #urDocket,
    #unreportedForm:not([hidden]) #urCourt,
    #unreportedForm:not([hidden]) #urDateMonth,
    #unreportedForm:not([hidden]) #urDateDay,
    #unreportedForm:not([hidden]) #urDateYear {
      border-color: var(--cc-brand);
      box-shadow: 0 0 0 3px var(--cc-brand-a12);
      background: var(--cc-bg-subtle);
    }

    .unreported-toggle-row {
      margin-bottom: 0.5rem;
    }
    .unreported-toggle-label {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.875rem;
      color: var(--cc-text-secondary);
      cursor: pointer;
      user-select: none;
    }
    .unreported-toggle-label input[type="checkbox"] {
      width: 1rem;
      height: 1rem;
      flex-shrink: 0;
      cursor: pointer;
      accent-color: var(--cc-brand);
    }
    .unreported-toggle-sub {
      font-size: 0.8em;
      color: var(--cc-text-tertiary);
    }
    .statute-type-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem 1rem;
      margin-bottom: 0.75rem;
    }
    .statute-type-option {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.875rem;
      color: var(--cc-text-secondary);
      cursor: pointer;
      user-select: none;
    }
    .statute-type-option input[type="radio"] {
      accent-color: var(--cc-brand);
      cursor: pointer;
    }
    .statute-type-sub {
      font-size: 0.8em;
      color: var(--cc-text-tertiary);
    }

    .parenthetical-toggle:not(.cc-add-btn) {
      display: flex;
      align-items: center;
      gap: 0.3rem;
      padding: 0.4rem 0;
      margin-top: 1rem;
      font-family: var(--font-body);
      font-size: 0.8125rem;
      font-weight: 500;
      color: var(--cc-brand);
      background: transparent;
      border: none;
      cursor: pointer;
      width: fit-content;
      text-align: left;
      letter-spacing: 0;
      transition: color 0.15s, text-decoration-color 0.15s;
      text-decoration: none;
    }

    .parenthetical-toggle:not(.cc-add-btn):hover {
      color: var(--cc-brand);
      text-decoration: underline;
      text-underline-offset: 3px;
      text-decoration-thickness: 1px;
    }

    .parenthetical-toggle:not(.cc-add-btn):active {
      color: var(--cc-brand);
    }

    .parenthetical-toggle:not(.cc-add-btn)[hidden] { display: none; }

    .cc-add-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 12px 16px;
      background: var(--cc-bg-card);
      border: 0.5px dashed var(--cc-border-strong);
      border-radius: 8px;
      cursor: pointer;
      font-family: var(--font-body);
      text-align: left;
      color: var(--cc-brand);
      transition: all 0.15s ease;
      margin-bottom: 0.5rem;
    }
    .cc-add-btn:hover {
      background: var(--cc-brand-soft);
      border-color: var(--cc-brand);
      border-style: solid;
    }
    .cc-add-btn .add-icon {
      flex-shrink: 0;
      color: var(--cc-brand);
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .cc-add-btn .add-content {
      display: flex;
      flex-direction: column;
      gap: 1px;
      align-items: flex-start;
    }
    .cc-add-btn .add-label {
      font-size: 13px;
      font-weight: 500;
      color: var(--cc-brand);
    }
    .cc-add-btn .add-subtitle {
      font-size: 11px;
      color: var(--cc-text-tertiary);
    }

    .reporter-pref-header {
      font-size: 13px;
      font-weight: 500;
      color: var(--cc-text-body);
      margin-bottom: 8px;
      font-family: var(--font-body);
    }
    .reporter-pref-option {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-size: 13px;
      color: var(--cc-text-body);
      font-family: var(--font-body);
    }
    .reporter-pref-radio {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 1.5px solid var(--cc-border-strong);
      background: var(--cc-bg-card);
      flex-shrink: 0;
      transition: border-color 0.12s ease, background 0.12s ease;
    }
    .reporter-pref-option[data-checked="true"] .reporter-pref-radio {
      border-color: var(--cc-brand);
    }
    .reporter-pref-option[data-checked="true"] .reporter-pref-radio::after {
      content: '';
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--cc-brand);
    }
    .reporter-pref-default {
      color: var(--cc-text-tertiary);
      margin-left: 4px;
    }

    #advancedScreen {
      display: flex;
      flex-direction: column;
      flex: 1;
    }

    .cc-advanced-chips-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 0;
    }


    #generateBtn,
    #generateShortcutHint,
    .advanced-screen-footer,
    .divider {
      display: none !important;
    }
    /* Ensure +Add buttons hide when [hidden] attribute is set.
       Without !important, the .cc-add-btn { display: flex } rule wins over the
       browser default [hidden] behavior. */
    .cc-add-btn[hidden] {
      display: none !important;
    }

    .add-icon {
      font-size: 1.125rem;
      line-height: 1;
      color: var(--cc-brand);
      font-weight: 400;
    }


    #caseName {
      font-size: 1.125rem;
      font-weight: 500;
      min-height: 3rem;
      padding: 0.85rem 1rem;
    }

    /* Insert-§ buttons: hidden by default; shown only in Magic mode on the
       source types where § is part of the typed citation. Never Manual
       (formatter adds § there), never Cases/Webpages. */
    #insertSectionBtn, #insertSectionBtnConst { display: none; }

    #field-stSlOrigSec, #field-secBkPage, #field-legBillSection {
      position: relative;
    }
    #field-stSlOrigSec #stSlOrigSec,
    #field-secBkPage #secBkPage,
    #field-legBillSection #legBillSection { padding-right: 4.5rem; }


    #caseName::placeholder {
      font-size: 1rem;
      font-weight: 400;
    }


    @media (max-width: 480px) {
      .tab-strip { flex-wrap: wrap; }
      .tab-btn { font-size: 0.72rem; padding: 0.35rem 0.6rem 0.35rem 0.45rem; }
    }

    .btn-primary {
      width: 100%;
      padding: 0.875rem 1.5rem;
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 700;
      color: var(--cc-text-on-brand);
      background: var(--cc-brand);
      border: none;
      border-radius: 12px;
      cursor: pointer;
      box-shadow: 0 2px 8px var(--cc-brand-a20), 0 1px 3px var(--cc-brand-a15);
      transition: all 0.2s ease;
      margin-bottom: 0;
      letter-spacing: 0.01em;
    }

    .btn-primary:hover {
      background: var(--cc-brand);
      box-shadow: 0 4px 12px var(--cc-brand-a20), 0 2px 6px var(--cc-brand-a20);
    }

    @media (prefers-reduced-motion: no-preference) {
      .btn-primary:hover {
        transform: translateY(-1px);
      }

      .btn-primary:active {
        transform: translateY(0);
      }
    }

    .btn-primary:focus-visible {
      outline: 2px solid var(--cc-brand);
      outline-offset: 2px;
    }

    .btn-primary:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    /* Metadata row */
    .cc-meta-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      padding: 10px 16px;
      gap: 0;
      border-bottom: 1px solid var(--cc-border-soft);
      background: var(--cc-bg-subtle);
      margin-top: 0;
    }

    .cc-meta-item {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 0 14px;
    }

    .cc-meta-item:first-child {
      padding-left: 0;
    }

    .cc-meta-item:last-child {
      padding-right: 0;
    }

    .cc-meta-label {
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.07em;
      color: var(--cc-text-tertiary);
      white-space: nowrap;
    }

    .cc-meta-divider {
      width: 1px;
      height: 18px;
      background: var(--cc-border-soft);
      flex-shrink: 0;
    }

    .cc-chip {
      display: inline-flex;
      align-items: center;
      padding: 3px 10px;
      border-radius: 100px;
      font-size: 0.75rem;
      font-weight: 600;
      font-family: var(--font-body);
      white-space: nowrap;
      line-height: 1.4;
    }


    .cc-chip--neutral {
      background: var(--cc-bg-muted);
      color: var(--cc-text-secondary);
      border: 1px solid var(--cc-border-softer);
    }

    /* Hide legacy inline confidence badge; status bar chip replaces it */
    #confidenceBadge,
    .confidence-badge {
      display: none !important;
    }
    #confidenceHelp,
    .confidence-help {
      display: none !important;
    }

    .feedback-panel {
      padding: 10px 16px;
      border-top: 1px solid var(--cc-border-soft);
      background: var(--cc-bg-card);
      margin-top: 0;
    }

    .candidates-list {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      padding: 0;
      margin-left: 0;
      margin-right: 0;
      margin-bottom: 1rem;
      box-sizing: border-box;
    }
    .candidates-continue-btn {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 24px;
      background: var(--cc-brand);
      color: var(--cc-brand-on-brand);
      border: none;
      border-radius: var(--radius);
      font-family: var(--font-body);
      font-size: 0.9375rem;
      font-weight: 600;
      cursor: pointer;
      letter-spacing: 0.01em;
      transition: background 0.15s, box-shadow 0.15s, transform 0.1s, opacity 0.15s;
    }
    .candidates-continue-btn:hover:not(:disabled) {
      background: #002d70;
      box-shadow: 0 4px 16px var(--cc-brand-a20);
    }
    .candidates-continue-btn:active:not(:disabled) {
      transform: translateY(1px);
    }
    .candidates-continue-btn:disabled {
      cursor: not-allowed;
      opacity: 0.45;
      box-shadow: none;
    }
    .candidate-card {
      position: relative;
      background: var(--cc-bg-card);
      border: 1.5px solid var(--cc-border-strong);
      border-radius: 10px;
      padding: 0.5rem 0.875rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      width: 100%;
      margin: 0;
      cursor: pointer;
      box-shadow: none;
      box-sizing: border-box;
      transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    }
    .candidate-card:hover {
      border-color: var(--cc-brand);
    }
    .candidate-card--selected {
      background: var(--cc-brand-a04);
      border-color: var(--cc-brand);
      box-shadow: 0 0 0 3px var(--cc-brand-a10);
    }
    .candidate-info {
      flex: 1;
      min-width: 0;
    }
    .candidate-case-name {
      font-family: var(--font-display);
      font-style: italic;
      font-size: 1rem;
      font-weight: 600;
      color: var(--cc-text-primary);
      margin: 0 0 0.375rem 0;
      line-height: 1.35;
    }
    /* Candidate row: same chip pattern as results .cc-meta-row; no bar background inside the card */
    .candidate-meta-row.cc-meta-row {
      padding: 0;
      margin-top: 0;
      border-bottom: none;
      background: transparent;
    }
    .candidate-meta-row .cc-meta-item:first-child {
      padding-left: 0;
    }
    .candidate-select-indicator {
      flex-shrink: 0;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 1.5px solid var(--cc-border-soft);
      background: transparent;
      color: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }
    .candidate-card--selected .candidate-select-indicator {
      background: var(--cc-brand);
      border-color: var(--cc-brand);
      color: #ffffff;
    }

    @media (max-width: 480px) {
      .candidate-card {
        padding: 0.5rem 0.875rem;
      }
      .candidate-meta-row.cc-meta-row {
        row-gap: 0.4rem;
      }
      .candidate-meta-row .cc-meta-item {
        padding: 0 8px;
      }
    }

    #result {
      min-height: 3.2rem;
      padding: 0;
      white-space: pre-wrap;
      word-break: break-word;
      width: 100%;
      background: transparent;
      border: none;
      border-radius: 0;
      box-shadow: none;
      transition: outline 0.15s;
      outline: none;
      font-family: var(--font-display);
      font-weight: 400 !important;
      font-size: 1.125rem;
      line-height: 1.65;
      color: var(--cc-text-primary);
    }

    /* Citation text — never bold */
    #result,
    .citation-output,
    .citation-output *,
    .cc-result-card .citation-output {
      font-weight: 400 !important;
      font-style: normal;
    }


    #result:focus {
      outline: 2px solid var(--cc-brand);
      outline-offset: 2px;
    }

    /* ── Mode toggle (iOS-style segmented control) ── */
    .tab-strip {
      display: none !important;
    }


    .tab-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.4rem 0.85rem;
      font-family: var(--font-body);
      font-size: 0.78rem;
      font-weight: 500;
      color: var(--cc-text-secondary);
      background: transparent;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      transition: color 0.15s, background 0.15s, box-shadow 0.15s;
      width: auto;
      margin: 0;
      letter-spacing: 0;
      box-shadow: none;
    }

    .tab-btn:hover {
      color: var(--cc-text-body);
      background: transparent;
      box-shadow: none;
    }

    .tab-btn.active {
      color: var(--cc-text-body);
      background: var(--cc-bg-card);
      font-weight: 600;
      box-shadow: 0 2px 4px rgba(10, 22, 40, 0.12), 0 1px 2px rgba(10, 22, 40, 0.08);
    }

    .tab-btn.active:hover {
      background: var(--cc-bg-card);
    }

    #modeManual {
      display: none !important;
    }


    .try-chips {
      display: flex;
      gap: 6px;
      align-items: center;
      margin-top: 0.25rem;
      margin-bottom: 16px;
      transition: opacity 180ms ease;
    }
    .try-chips[hidden] { display: none; }

    .modal {
      background: var(--cc-bg-card);
      border-radius: 14px;
      box-shadow: 0 20px 40px rgba(10, 22, 40, 0.25), 0 1px 3px var(--cc-border);
      padding: 1.25rem 1.5rem 1rem;
      width: 100%;
      max-width: 20rem;
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      text-align: center;
    }

    /* Extra left padding for the input to clear the type tag */
    #field-caseName .cite-type-input-wrap input[type="text"],
    #caseName {
      padding-left: 12px !important;
    }

    .cite-type-tag-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--cc-brand);
      white-space: nowrap;
      font-family: var(--font-body);
    }


    .cite-type-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 16px;
      font-size: 13px;
      font-family: var(--font-body);
      color: var(--cc-text-body);
      cursor: pointer;
      transition: background 0.12s ease;
    }

    .cite-type-option:not(.cite-type-option--soon):hover {
      background: var(--cc-brand-soft);
      color: var(--cc-brand);
    }

    .cite-type-option--selected {
      color: var(--cc-brand);
      font-weight: 600;
    }

    .cite-type-option--soon {
      color: var(--cc-text-disabled);
      cursor: default;
    }

    .cite-type-check {
      flex-shrink: 0;
      color: var(--cc-brand);
    }

    .cite-type-soon-badge {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--cc-text-disabled);
      background: var(--cc-bg-muted);
      border-radius: 4px;
      padding: 2px 6px;
      font-family: var(--font-body);
    }

    /* Compact navigation drawer — sidebar overlays main (viewport ≤1199px) */
    @media (max-width: 1199px) {
      html {
        background-color: var(--cc-chrome);
      }

      body {
        grid-template-columns: 1fr minmax(0, 360px);
        grid-template-rows: 58px 1fr;
        grid-template-areas:
          "topnav topnav"
          "main right";
      }

      .cc-marketing-nav-inner {
        padding: 0 2rem 0 1.4375rem;
        gap: 0.75rem;
      }

      .cc-marketing-nav-left {
        gap: 0.75rem;
      }

      .cc-marketing-logo-zone {
        width: auto;
        min-width: unset;
        padding: 0;
        justify-content: flex-start;
        gap: 0.5rem;
      }

      .cc-marketing-nav-left .cc-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        color: var(--cc-on-chrome);
        padding: 0;
      }

      .cc-marketing-links-zone {
        display: none;
      }


      .field label,
      .optional-grid label {
        letter-spacing: 0;
        font-size: 0.65rem;
      }


      main#mainContent {
        grid-area: main;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
      }

      .cc-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        color: var(--cc-text-primary);
        padding: 0;
      }


    }

    @media (max-width: 767px) {
      body {
        grid-template-columns: 1fr;
        grid-template-areas:
          "topnav"
          "main";
      }


      /* Mobile-only: hide top-nav links and usage meter, shrink logo, tighten logo zone */
      .cc-marketing-links,
      .cc-marketing-help,
      .cc-marketing-links-zone {
        display: none;
      }

      .cc-marketing-logo-svg {
        width: 90px;
        height: 26px;
      }

      .cc-marketing-logo-zone {
        width: auto;
        min-width: unset;
        padding: 0 0.75rem;
        justify-content: flex-start;
        gap: 0.5rem;
      }

      .cc-marketing-nav-right .site-header-usage-meter,
      .cc-marketing-nav-right .site-header-tier-badge {
        display: none !important;
      }
    }

    @media (max-width: 1024px) and (orientation: landscape) {
      html, body {
        background-color: var(--cc-chrome);
      }

      main#mainContent {
        background-color: var(--cc-page);
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
      }
    }

    /* ============================================================
       MOBILE RESPONSIVE RULES (Phase H final pass)
       Standard breakpoints: 480px (most common) + 380px (very narrow).
       ============================================================ */
    @media (max-width: 480px) {
      /* Try chips: wrap to multiple lines on narrow screens */
      .try-chips {
        flex-wrap: wrap;
        row-gap: 6px;
      }

    }

    @media (max-width: 380px) {
      /* Very narrow screens (iPhone SE 1st gen, old Androids) */

      /* Tab strip: smaller font/padding */
      .tab-btn {
        padding: 0.4rem 0.8rem;
        font-size: 12px;
      }

      /* Header at very narrow: shrink history button further */
      .site-header-history {
        min-width: 44px;
        width: 44px;
      }

    }


/* ══════════════════════════════════════════════════════════════
   Extracted from index.html inline <style> block — Day 27.
   Kept at END OF FILE to preserve original source order / cascade.
   The inline block previously loaded after styles.css; keeping it
   last here preserves every same-specificity tie.
   ══════════════════════════════════════════════════════════════ */

/* Rule / Restatement fields use the default input shape, consistent
   with Code and Session Law. The former oversized required-field
   recipe (3rem / brand halo / bg-subtle fill) was removed for
   cross-form visual consistency. Error states fall through to the
   generic .field.has-error rule, same as the other statute forms. */

/* ── Source type tab colors — professional style ── */

/* [Day 34 P25] Per-type active colors. Unselected state uses brand-blue
   border for all types (set on .cc-source-type-btn base rule above).
   Only the active/selected state uses the type's specific color. */


/* Day 35 Magic Cite Layout Polish — scoped to Magic Cite only.
   Guide / Expert / Check / History layouts unchanged. */


/* Day 36 — Hide the "All" source type button in Guide Cite and Expert Cite.
   All is conceptually equivalent to Magic Cite, which has its own sidebar
   entry. Guide and Expert are type-specific modes; All has no role there. */


    /* ── Global footer ── */
    .cc-global-footer {
      background: var(--cc-chrome);
      font-family: 'DM Sans', system-ui, sans-serif;
      padding: 0;
      margin-top: auto;
      width: 100%;
    }
    .cc-global-footer-inner {
      display: grid;
      grid-template-columns: 1.6fr 1fr 1fr 1fr;
      gap: 24px;
      max-width: 1280px;
      margin: 0 auto;
      padding: 16px 40px 10px;
      border-bottom: 1px solid var(--cc-on-chrome-line);
    }
    .cc-gf-brand {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
    }
    .cc-gf-logo-link {
      display: inline-block;
      text-decoration: none;
      margin-bottom: 5px;
    }
    .cc-gf-logo-svg {
      width: 160px;
      height: auto;
      display: block;
      color: var(--cc-on-chrome);
    }
    /* The footer partial's inline SVG hardcodes fill="white" (attribute);
       the CSS fill property wins over the presentation attribute, so the
       logo follows the chrome-text role in every theme. */
    .cc-gf-logo-svg g {
      fill: currentColor;
    }
    /* Tagline tucked directly under the logo, centered to the logo's width (160px). */
    .cc-gf-tagline {
      font-size: 12px;
      color: var(--cc-on-chrome-soft);
      line-height: 1.4;
      margin: 0;
      width: 160px;
      max-width: 160px;
      text-align: center;
    }
    .cc-gf-col-heading {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: var(--cc-on-chrome-faint);
      margin: 0 0 7px;
      padding: 0;
    }
    .cc-gf-link {
      display: block;
      font-size: 13px;
      color: var(--cc-on-chrome-soft);
      text-decoration: none;
      margin-bottom: 4px;
      transition: color 0.15s;
    }
    .cc-gf-link:hover {
      color: var(--cc-on-chrome);
    }
    /* "Terms · Privacy" — two independent anchors on one row. */
    .cc-gf-legal-row {
      display: flex;
      align-items: baseline;
      gap: 6px;
      margin-bottom: 4px;
    }
    .cc-gf-link--inline {
      display: inline;
      margin-bottom: 0;
    }
    .cc-gf-sep {
      font-size: 13px;
      line-height: 1;
      color: var(--cc-on-chrome-faint);
    }
    .cc-global-footer a:focus-visible,
    .cc-gf-logo-link:focus-visible {
      outline: 2px solid var(--cc-on-chrome);
      outline-offset: 3px;
      border-radius: 3px;
    }
    .cc-global-footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      max-width: 1280px;
      margin: 0 auto;
      padding: 8px 40px 10px;
      flex-wrap: wrap;
      gap: 8px;
    }
    .cc-gf-copy {
      font-size: 11px;
      color: var(--cc-on-chrome-faint);
      font-family: 'DM Sans', system-ui, sans-serif;
    }
    .cc-gf-disclaimer {
      font-size: 11px;
      color: var(--cc-on-chrome-faint);
      font-family: 'DM Sans', system-ui, sans-serif;
      text-align: right;
    }
    @media (max-width: 700px) {
      .cc-global-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 20px 24px;
        padding: 22px 24px 16px;
      }
      .cc-gf-brand {
        grid-column: 1 / -1;
        align-items: center;
      }
      .cc-global-footer-bottom {
        padding: 16px 24px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
      }
      .cc-gf-disclaimer {
        text-align: left;
      }
    }
    @media (max-width: 480px) {
      .cc-global-footer-inner {
        grid-template-columns: 1fr;
        padding: 20px 20px 16px;
      }
    }

/* B-PREMIUM-3 WS2.4 (the top-left strip): island hydration can collapse the
   band for a frame — during it the page's splat layer peeked at y=0 in
   captures. Reserve the mount's height so the band can never collapse. */
#cc-header-root { min-height: 64px; }
