/* ============================================================
   MailOver — Color tokens
   Coral accent on a clean neutral canvas. Light is the default
   surface for both the app and the marketing site; the app also
   ships a dark theme (scope: .founder-preview.dark).
   ============================================================ */

.founder-preview {
  /* ---- Brand ---- */
  --color-accent: #e5563a;          /* coral — the one brand action color */
  --color-accent-hover: #d04a30;    /* pressed / hover coral */
  --color-accent-soft: #fef2f0;     /* tint behind badges & soft pills */
  --color-archive: #9c27b0;         /* Material Purple 500 — archive affordance */

  /* Brand gradient (logo mark + hero accents): purple → pink → orange */
  --color-grad-purple: #6b2bd9;
  --color-grad-pink: #ec4899;
  --color-grad-orange: #f97316;
  --gradient-brand: linear-gradient(90deg, #6b2bd9 0%, #ec4899 55%, #f97316 100%); /* @kind color */
  /* "Processing" gradient used on the email-pulse FAB & buttons */
  --gradient-process: linear-gradient(135deg, #3a3a3a, #e5563a); /* @kind color */

  /* ---- Neutral surfaces (light) ---- */
  --color-bg: #ffffff;              /* app/card background */
  --color-card: #ffffff;
  --color-page-bg: #f0f0f0;         /* desktop page behind the app card */
  --color-site-bg: #fafafa;         /* marketing site background */
  --color-border: #e5e5e5;
  --color-hover: #f5f5f5;
  --color-input-bg: #ffffff;
  --color-input-border: #d4d4d4;
  --color-divider: rgba(0, 0, 0, 0.06);
  --color-overlay: rgba(0, 0, 0, 0.05);
  --color-summary-panel: #faf8f6;   /* warm off-white for AI summary blocks */
  --color-sidebar-from: #ffffff;
  --color-sidebar-to: #fafafa;

  /* ---- Text (light) ---- */
  --color-text: #111111;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-on-accent: #ffffff;       /* text/icon on coral fills */

  /* ---- Status / categories ---- */
  --color-danger: #ef4444;          /* delete / error (red-500) */
  --color-danger-soft: rgba(239, 68, 68, 0.15);
  --color-success: #22c55e;         /* financial / done */
  --color-warning: #f59e0b;         /* impersonation banner / deliveries */
  --color-info: #3b82f6;            /* newsletter / info */

  /* ---- Semantic aliases (use these in components) ---- */
  --surface-app: var(--color-bg);
  --surface-card: var(--color-card);
  --surface-page: var(--color-page-bg);
  --surface-hover: var(--color-hover);
  --surface-summary: var(--color-summary-panel);
  --border-default: var(--color-border);
  --border-input: var(--color-input-border);
  --text-body: var(--color-text);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-muted);
  --action-primary: var(--color-accent);
  --action-primary-hover: var(--color-accent-hover);
}

/* ---- Dark theme (app only) ---- */
.founder-preview.dark {
  --color-bg: #141414;
  --color-card: #1e1e1e;
  --color-page-bg: #111111;
  --color-border: #2a2a2a;
  --color-hover: #4a4a4a;
  --color-input-bg: #1a1a1a;
  --color-input-border: #3a3a3a;
  --color-divider: rgba(255, 255, 255, 0.1);
  --color-overlay: rgba(255, 255, 255, 0.05);
  --color-summary-panel: #1e1a16;
  --color-sidebar-from: #2a2a2a;
  --color-sidebar-to: #1a1a1a;

  --color-text: #ffffff;
  --color-text-secondary: #9ca3af;
  --color-text-muted: #6b7280;

  --color-accent-soft: rgba(229, 86, 58, 0.15);
}

/* ============================================================
   MailOver — Typography tokens
   Inter everywhere in the product UI. Exo 2 is the display/brand
   voice on the marketing site (headlines, hero). System mono for
   the rare code/monospace use.
   ============================================================ */

.founder-preview {
  /* ---- Families ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  --font-display: "Exo 2", "Inter", -apple-system, sans-serif; /* marketing headlines */
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* ---- Weights ---- */
  --weight-light: 300;     /* wordmark / "MailOver" lockup */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ---- Type scale (product UI is compact: 12–16px) ---- */
  --text-2xs: 10px;   /* badges, account labels */
  --text-xs: 12px;    /* dates, captions, meta */
  --text-sm: 13px;    /* rows, tabs, body-dense */
  --text-base: 14px;  /* default app body */
  --text-md: 15px;    /* marketing body */
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-display: 56px; /* hero headline */

  /* ---- Line heights ---- */
  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-normal: 1.6;
  --leading-relaxed: 1.7;

  /* ---- Letter spacing ---- */
  --tracking-wordmark: 0.25em;  /* "MAILOVER" lockup */
  --tracking-label: 0.06em;     /* uppercase eyebrows / footer headings */
  --tracking-tight: -0.02em;    /* large display headlines */

  /* ---- Semantic roles ---- */
  --text-row: var(--text-sm);
  --text-row-meta: var(--text-xs);
  --text-tab: var(--text-sm);
}

/* ============================================================
   MailOver — Spacing, radius, layout tokens
   A 4px base grid. Rows are tight (40px tall); cards are roomy.
   ============================================================ */

.founder-preview {
  /* ---- Spacing scale (4px base) ---- */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 20px;
  --space-7: 24px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 48px;
  --space-12: 64px;

  /* ---- Radii ---- */
  --radius-xs: 4px;     /* checkboxes, chips, small badges */
  --radius-sm: 6px;     /* inputs, menu items, list-row hover */
  --radius-md: 8px;     /* buttons, popovers */
  --radius-lg: 10px;    /* CTA buttons, sidebar items */
  --radius-xl: 16px;    /* marketing cards, glass nav */
  --radius-pill: 9999px;/* status filters, account pills, badges */

  /* ---- Layout ---- */
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 64px;
  --row-height: 40px;       /* email / action-item row */
  --topbar-height: 56px;
  --content-max: 768px;     /* centered inbox column (max-w-3xl) */
  --site-max: 1200px;       /* marketing content width */
  --tap-target: 44px;       /* minimum touch target */
}

/* ============================================================
   MailOver — Shadows, blur, motion
   Soft, low-contrast shadows. Glassmorphism only on the marketing
   nav. Motion is quick and gentle; one playful spring on the FAB.
   ============================================================ */

.founder-preview {
  /* ---- Shadows ---- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.06);    /* glass nav, soft cards */
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.08);  /* marketing mockup cards */
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.1);     /* dropdown menus, popovers */
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);   /* modals */
  --shadow-glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5);

  /* ---- Glass (marketing nav / mobile menu) ---- */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(20px) saturate(1.8); /* @kind other */

  /* ---- Borders ---- */
  --border-width: 1px;
  --border-accent-bar: 3px;   /* left bar on AI summary panels */

  /* ---- Motion ---- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1); /* @kind other */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* @kind other */ /* FAB pop / slide-up */
  --duration-fast: 0.15s; /* @kind other */
  --duration-base: 0.2s; /* @kind other */
  --duration-slow: 0.3s; /* @kind other */
  --duration-fade: 0.7s; /* @kind other */ /* marketing scroll fade-in */

  /* ---- Focus ring ---- */
  --focus-ring: 0 0 0 3px rgba(229, 86, 58, 0.35);
}

.founder-preview { font-family: var(--font-sans); color: var(--color-text); background: var(--color-site-bg); padding-bottom: 72px; }
.founder-shell { max-width: 1120px; padding: 0 24px; margin: auto; }
.founder-preview h1, .founder-preview h2 { font-family: var(--font-display); }
.founder-preview h2 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.inbox-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:12px; margin-top:48px; }
.inbox-heading p { font-size:13px; color:#666; }
.inbox-frame { margin-top:18px; }
.inbox-surface { background:white; border-radius:14px; padding:8px 14px 18px; width:100%; }
.inbox-tab-icon { width:24px; height:24px; flex-shrink:0; }
.inbox-tabs { display:flex; }
.inbox-tabs button { display:flex; align-items:center; justify-content:center; gap:10px; flex:1; background:none; border:0; border-bottom:2px solid transparent; padding:20px 5px; color:#777; font:inherit; font-size:20px; cursor:pointer; }
.inbox-tabs button[aria-selected=true] { color:#c6442b; border-bottom-color:#e5563a; }
.inbox-tabs button[data-tab=highlights][aria-selected=true] { color:#7741c7; border-bottom-color:#9160ee; }
.inbox-tabs button[data-tab=fyis][aria-selected=true] { color:#306bc5; border-bottom-color:#4a86ff; }
.inbox-filters { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 4px; }
.inbox-filters button { display:flex; gap:7px; padding:7px 13px; border-radius:999px; background:none; border:1px solid #e5e5e5; font:500 13px var(--font-sans); color:#666; cursor:pointer; }
.inbox-filters button[aria-pressed=true] { color:#b53f29; background:#fef2f0; border-color:#e9b2a6; }
.inbox-filters button span { color:#777; font-size:12px; }
.inbox-note { margin:8px 0 12px; font-size:12px; color:#737373; line-height:1.6; }
.inbox-item { border:0; }
.inbox-item summary { display:flex; align-items:center; gap:10px; padding:15px 4px; list-style:none; cursor:pointer; }
.inbox-item summary::-webkit-details-marker { display:none; }
.type-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.row-main { flex:1; min-width:0; }
.row-main strong { font-size:14px; font-weight:500; }
.row-meta { display:block; font-size:11px; color:#737373; margin-top:3px; }
.row-kind { font-size:11px; color:#737373; flex-shrink:0; }
.row-chevron { color:#888; }
.inbox-item[open] .row-chevron { transform:rotate(180deg); }
.email-comparison { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:6px 4px 22px; align-items:start; }
.original-email,.manual-reading { border:1px solid #e5e5e5; border-radius:12px; padding:18px 20px; min-width:0; }
.original-email { background:#fcfcfc; }
.email-comparison h3 { font:500 10px var(--font-sans); text-transform:uppercase; letter-spacing:.06em; color:#737373; }
.email-meta { display:grid; grid-template-columns:48px 1fr; gap:5px 12px; margin:14px 0; font-size:13px; }
.email-meta dt { color:#737373; }
.original-email p { font-size:15px; line-height:1.7; }
.readings { display:flex; flex-direction:column; gap:16px; min-width:0; }
.sample-fields { background:#faf8f6; border-left:3px solid #e5563a; border-radius:0 8px 8px 0; padding:16px 20px; }
.sample-fields dl { display:grid; gap:10px; margin-top:12px; }
.sample-fields dt { font-size:12px; color:#737373; }
.sample-fields dd,.manual-reading dd { font-size:14px; line-height:1.5; margin-top:3px; }
.field-disclaimer { font-size:11px; color:#737373; line-height:1.6; margin-top:12px; }
.manual-reading dl { margin-top:12px; }
.manual-reading dl > div { padding:10px 0; border-top:1px solid #eee; }
.manual-reading dt { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; font-size:11px; color:#737373; }
.evidence { font-size:10px; padding:3px 8px; border-radius:999px; background:#f5f5f5; }
.evidence.unknown { color:#826519; background:#fdf1d6; }
.category-row { display:flex; align-items:center; gap:14px; padding:14px 4px; font-size:14px; }
.category-symbol { color:#d85136; width:20px; text-align:center; }
.category-count { margin-left:auto; color:#777; font-size:12px; }
.lesson-list { list-style:none; }
.lesson-list li { display:flex; gap:12px; padding:14px 0; border-bottom:1px solid #eee; font-size:14px; line-height:1.5; }
.lesson-list li > span { color:#e5563a; }
.founder-preview button:focus-visible,.founder-preview summary:focus-visible { outline:3px solid #315fc1; outline-offset:3px; }
.founder-preview [hidden] { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
@media(max-width:700px) { .founder-preview h1 { font-size:34px!important; } .founder-shell { padding:0 18px; } .inbox-surface { padding:4px 10px 12px; } .inbox-tabs button { font-size:14px; gap:6px; } .inbox-tab-icon { width:20px; height:20px; } .email-comparison { grid-template-columns:1fr; } .inbox-item summary { flex-wrap:wrap; } .row-kind { margin-left:18px; } .row-main { flex-basis:calc(100% - 38px); } .row-chevron { margin-left:auto; } .original-email,.manual-reading,.sample-fields { padding:16px; } }

.inbox-tour-control { padding:8px 13px; border:1px solid #e5e5e5; border-radius:999px; background:#fff; color:#666; font:500 12px var(--font-sans); cursor:pointer; }
.inbox-tour-control:hover { color:#b53f29; border-color:#e9b2a6; }
.inbox-tabs button { transition:color .25s, border-color .25s; }
.tour-transition .inbox-item[open] .email-comparison,
.tour-transition #panel-categories:not([hidden]) { animation:inbox-frame-in .35s ease both; }
@keyframes inbox-frame-in { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { .tour-transition .email-comparison, .tour-transition #panel-categories { animation:none!important; } .inbox-tabs button { transition:none; } }

.inbox-tour-progress { height:3px; overflow:hidden; margin:0 0 5px; background:transparent; }
.inbox-tour-progress span { display:block; height:100%; background:#e5563a; transform:scaleX(0); transform-origin:left; }
.tour-playing.tour-transition .inbox-tour-progress span { animation:inbox-tour-progress 4.5s linear both; }
.tour-playing .tour-active-item > summary { background:#fef2f0; border-radius:8px; transition:background .3s; }
@keyframes inbox-tour-progress { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@media(prefers-reduced-motion:reduce) { .inbox-tour-progress { display:none; } .tour-playing .tour-active-item > summary { transition:none; } }
.category-panel { padding:10px 8px 24px; --category-accent:#8052ce; --category-tint:#f2edfc; }
.category-panel[data-category-panel=fyis] { --category-accent:#417bea; --category-tint:#edf3ff; }
.category-overview { display:flex; justify-content:space-between; gap:16px; padding:14px 4px 4px; font-size:13px; color:#666; }
.category-overview > span:last-child { color:#888; font-size:12px; }
.category-disclosure { padding:0 4px 18px; color:#8a8a8a; font-size:11px; }
.category-group { border:0; }
.category-group summary { display:flex; align-items:center; gap:14px; padding:19px 12px; margin:0 -4px; cursor:pointer; list-style:none; border-radius:10px; transition:background .3s ease; }
.category-group summary::-webkit-details-marker { display:none; }
.category-group summary:hover,.category-group[open] summary { background:#fafafa; }
.category-icon { display:flex; flex-shrink:0; }
.category-title { flex:1; font-size:15px; color:#262626; }
.category-badge { border-radius:999px; background:var(--category-tint); color:var(--category-accent); padding:3px 10px; font-size:11px; white-space:nowrap; }
.category-group .category-count { margin-left:4px; min-width:25px; text-align:right; font-size:13px; color:#999; }
.category-chevron { flex-shrink:0; color:#aaa; transition:transform .45s cubic-bezier(.22,1,.36,1); }
.category-group[open] .category-chevron { transform:rotate(90deg); }
.category-emails { margin:4px 10px 16px 22px; padding-left:24px; border-left:1px solid #e9e9e9; }
.category-email { display:flex; gap:12px; align-items:baseline; padding:13px 0; }
.category-unread { width:5px; height:5px; border-radius:50%; background:var(--category-accent); flex-shrink:0; }
.category-email > div { flex:1; min-width:0; }
.category-email-sender { font-size:11px; color:#8a8a8a; }
.category-email p { font-size:13px; line-height:1.55; color:#444; margin-top:2px; }
.category-email-time { font-size:11px; color:#999; flex-shrink:0; }
.inbox-surface { view-transition-name:founder-inbox; }
::view-transition-group(founder-inbox) { animation-duration:.55s; animation-timing-function:cubic-bezier(.22,1,.36,1); }
::view-transition-old(founder-inbox) { animation:inbox-fade-out .3s ease both; }
::view-transition-new(founder-inbox) { animation:inbox-fade-in .55s ease both; }
::view-transition-old(root),::view-transition-new(root) { animation:none; mix-blend-mode:normal; }
@keyframes inbox-fade-out { to { opacity:0; } }
@keyframes inbox-fade-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.tour-transition .inbox-item[open] .email-comparison,.tour-transition #panel-categories:not([hidden]) { animation:none; }
.tour-playing.tour-transition .inbox-tour-progress span { animation-duration:6s; }
@media(max-width:700px) { .category-panel { padding-inline:0; } .category-group summary { gap:8px; padding:17px 4px; } .category-title { font-size:14px; } .category-badge { padding:3px 7px; font-size:10px; } .category-emails { margin-left:12px; padding-left:15px; } }
@media(prefers-reduced-motion:reduce) { .inbox-surface { view-transition-name:none; } .category-chevron,.category-group summary { transition:none; } }
::view-transition { pointer-events:none; }

.action-checkbox { width:18px; height:18px; border:2px solid #ddd; border-radius:4px; flex-shrink:0; display:inline-block; }

.email-comparison > .manual-reading { grid-column:1 / -1; }

/* Animate the product controls themselves, without a timer bar or page snapshots. */
.inbox-surface { view-transition-name:none; }
.action-checkbox { position:relative; cursor:pointer; transition:background .3s ease,border-color .3s ease,box-shadow .3s ease; }
.action-checkbox::after { content:""; position:absolute; left:4px; top:1px; width:5px; height:9px; border:solid white; border-width:0 2px 2px 0; transform:rotate(45deg) scale(.5); opacity:0; transition:opacity .2s ease,transform .35s cubic-bezier(.22,1,.36,1); }
.action-completed .action-checkbox { background:#e5563a; border-color:#e5563a; }
.action-completed .action-checkbox::after { opacity:1; transform:rotate(45deg) scale(1); }
.row-main strong { transition:color .35s ease; }
.action-completed .row-main strong { color:#999; text-decoration:line-through; text-decoration-thickness:1px; }
.action-checkbox:focus-visible { outline:3px solid #315fc1; outline-offset:4px; }
@media(prefers-reduced-motion:reduce) { .action-checkbox,.action-checkbox::after,.row-main strong { transition:none; } }

.inbox-tour-control { display:inline-flex; align-items:center; gap:9px; min-height:44px; padding:6px 15px 6px 7px; border-color:#efd5cd; color:#ac402b; background:#fffaf8; transition:background .2s, border-color .2s, transform .2s; }
.tour-control-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#fce6df; color:#d65338; animation:tour-control-breathe 2.8s ease-in-out infinite; }
.tour-control-icon svg { width:18px; height:18px; overflow:visible; }
.tour-play-symbol,.tour-pause-symbol { transform-origin:12px 12px; transition:opacity .22s ease,transform .3s ease; }
.tour-play-symbol { opacity:1; transform:scale(1); }
.tour-pause-symbol { opacity:0; transform:scale(.65); }
.is-playing .tour-play-symbol { opacity:0; transform:scale(.65); }
.is-playing .tour-pause-symbol { opacity:1; transform:scale(1); }
.is-playing .tour-control-icon { animation-duration:3.6s; }
.inbox-tour-control:hover { background:#fff0e9; border-color:#e9b2a6; transform:translateY(-1px); }
.inbox-tour-control:active { transform:translateY(0); }
.inbox-tour-control:focus-visible { outline:3px solid #315fc1; outline-offset:3px; }
@keyframes tour-control-breathe { 0%,100% { box-shadow:0 0 0 0 rgba(229,86,58,0); } 50% { box-shadow:0 0 0 4px rgba(229,86,58,.1); } }
@media(prefers-reduced-motion:reduce) { .tour-control-icon { animation:none; } .inbox-tour-control,.tour-play-symbol,.tour-pause-symbol { transition:none; } }

/* Decision-boundary evaluation: explicitly separate the route test from product output. */
.decision-boundary { margin-top:72px; }
.decision-boundary-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:end; gap:20px; margin-bottom:22px; }
.decision-boundary-heading > div { max-width:620px; }
.decision-boundary-heading h2 { margin:8px 0 0; }
.decision-boundary-heading > p { max-width:440px; margin:0; color:var(--color-text-secondary); font-size:14px; line-height:1.65; }
.section-kicker,.case-label { color:var(--color-accent); font-size:10px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
.boundary-case { overflow:hidden; background:#fff; border:1px solid var(--color-border); border-radius:16px; box-shadow:var(--shadow-sm); }
.boundary-case-header { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:16px; padding:24px 26px; border-bottom:1px solid var(--color-divider); }
.boundary-case-header h3 { margin:7px 0 0; font-family:var(--font-display); font-size:20px; font-weight:600; line-height:1.35; }
.route-badge { flex-shrink:0; padding:6px 11px; border:1px solid #f0d098; border-radius:999px; background:#fff8e8; color:#795916; font-size:11px; font-weight:500; }
.boundary-grid { display:grid; grid-template-columns:repeat(3,1fr); }
.boundary-grid article { min-width:0; padding:24px 26px 26px; border-right:1px solid var(--color-divider); }
.boundary-grid article:last-child { border-right:0; }
.boundary-number { color:#c8c8c8; font:600 11px var(--font-mono); }
.boundary-grid h4,.route-review h4 { margin:9px 0 0; font-size:14px; font-weight:600; }
.boundary-grid p { margin:9px 0 0; color:var(--color-text-secondary); font-size:13px; line-height:1.65; }
.boundary-grid p strong { color:var(--color-text); font-weight:600; }
.counterfactual { display:grid; grid-template-columns:110px 1fr; gap:20px; margin:0 26px; padding:18px 0; border-top:1px solid var(--color-divider); }
.counterfactual > span { color:var(--color-accent); font-size:10px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
.counterfactual p { margin:0; color:var(--color-text-secondary); font-size:13px; line-height:1.7; }
.counterfactual strong { color:var(--color-text); font-weight:600; }
.route-review { margin-top:4px; padding:24px 26px 26px; background:var(--surface-summary); border-top:1px solid var(--color-divider); }
.route-review-copy { display:flex; flex-wrap:wrap; align-items:baseline; gap:7px 18px; }
.route-review-copy h4 { flex:1 1 300px; }
.route-review-copy p { flex-basis:100%; margin:0; color:var(--color-text-secondary); font-size:13px; line-height:1.6; }
.route-review fieldset { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 0; padding:0; border:0; }
.route-review label { position:relative; cursor:pointer; }
.route-review input { position:absolute; opacity:0; pointer-events:none; }
.route-review label span { display:block; padding:8px 13px; border:1px solid #dedbd8; border-radius:999px; background:#fff; color:#666; font-size:12px; font-weight:500; transition:background .2s,border-color .2s,color .2s; }
.route-review input:checked + span { border-color:#e9b2a6; background:var(--color-accent-soft); color:#a93e29; }
.route-review input:focus-visible + span { outline:3px solid #315fc1; outline-offset:3px; }
.review-action-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin-top:18px; }
.review-action-row p { flex:1 1 360px; margin:0; color:var(--color-text-secondary); font-size:12px; line-height:1.55; }
.review-action-row button { min-height:40px; padding:8px 14px; border:0; border-radius:8px; background:var(--color-accent); color:#fff; font:600 12px var(--font-sans); cursor:pointer; }
.review-action-row button:disabled { background:#ddd7d3; color:#87817d; cursor:not-allowed; }
.learned-rule { margin-top:18px; padding:16px 18px; border-left:3px solid var(--color-accent); border-radius:0 8px 8px 0; background:#fff; }
.learned-rule span { color:var(--color-text-muted); font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
.learned-rule p { margin:7px 0 0; font-size:13px; line-height:1.65; }
.review-disclaimer { margin:16px 0 0; color:var(--color-text-muted); font-size:11px; line-height:1.55; }
@media(max-width:760px) {
  .decision-boundary { margin-top:56px; }
  .boundary-grid { grid-template-columns:1fr; }
  .boundary-grid article { padding:20px; border-right:0; border-bottom:1px solid var(--color-divider); }
  .boundary-grid article:last-child { border-bottom:0; }
  .boundary-case-header,.route-review { padding:20px; }
  .counterfactual { grid-template-columns:1fr; gap:8px; margin:0 20px; }
  .review-action-row button { width:100%; }
}
@media(prefers-reduced-motion:reduce) { .route-review label span { transition:none; } }
