/* complex-router.css — Complex File Router, scoped under .cxr2 */
/* Tokens and base layout from afford.css, rescoped */
.cxr2 {
  --navy: #0A2540;
  --navy-deep: #061829;
  --navy-mid: #143256;
  --navy-light: #1E4470;
  --gold: #FFB800;
  --gold-soft: #FFC733;
  --blue: #2B7FFF;
  --blue-bright: #4A96FF;
  --white: #FFFFFF;
  --gray-400: #94A3B8;
  --green: #10B981;
  --green-soft: #34D399;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--white);
  background: radial-gradient(circle at 15% 0%, rgba(43,127,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 85% 100%, rgba(255,184,0,0.08) 0%, transparent 45%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: 12px;
  padding: 28px 24px 24px;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.cxr2 *, .cxr2 *::before, .cxr2 *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Title */
.cxr2-head { margin-bottom: 20px; }
.cxr2-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--white); }
.cxr2-sub { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* Two-column layout: inputs left, results right */
.cxr2-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 768px) { .cxr2-body { grid-template-columns: 1fr; } }
.cxr2-inputs { min-width: 0; }
.cxr2-results { position: sticky; top: 20px; min-width: 0; }

/* Section labels */
.cxr2-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.cxr2-group { margin-bottom: 14px; }

/* Pill buttons (concern + stage) */
.cxr2-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cxr2-pill { padding: 7px 12px; font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; background: transparent; color: var(--white); cursor: pointer; transition: background 0.15s, border-color 0.15s; font-family: inherit; }
.cxr2-pill:hover { border-color: rgba(255,255,255,0.3); }
.cxr2-pill.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* Checkboxes (flags) */
.cxr2-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.cxr2-check { display: flex; align-items: center; gap: 5px; font-size: 12px; cursor: pointer; color: rgba(255,255,255,0.8); }
.cxr2-check input { accent-color: var(--gold); width: 14px; height: 14px; cursor: pointer; }

/* Results panel */
.cxr2-res { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 20px 18px; }
.cxr2-res-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 8px; }

/* Start-here link */
.cxr2-start { margin-bottom: 16px; }
.cxr2-start a { color: var(--blue-bright); font-weight: 600; font-size: 15px; text-decoration: none; }
.cxr2-start a:hover { text-decoration: underline; }
.cxr2-start .cxr2-link-desc { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 2px; display: block; }

/* Then list */
.cxr2-then { margin-bottom: 16px; }
.cxr2-then-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 6px; }
.cxr2-then ol { list-style: decimal; padding-left: 18px; }
.cxr2-then li { margin-bottom: 8px; }
.cxr2-then a { color: var(--blue-bright); font-weight: 500; font-size: 13px; text-decoration: none; }
.cxr2-then a:hover { text-decoration: underline; }
.cxr2-then .cxr2-link-desc { font-size: 11px; color: rgba(255,255,255,0.55); display: block; margin-top: 1px; }

/* If-it-applies section */
.cxr2-flags { margin-bottom: 16px; }
.cxr2-flags:empty { display: none; }
.cxr2-flags-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-soft); margin-bottom: 6px; }
.cxr2-flags ul { list-style: none; padding-left: 0; }
.cxr2-flags li { margin-bottom: 6px; padding-left: 14px; position: relative; }
.cxr2-flags li::before { content: '+'; position: absolute; left: 0; color: var(--green-soft); font-weight: 700; }
.cxr2-flags a { color: var(--blue-bright); font-weight: 500; font-size: 13px; text-decoration: none; }
.cxr2-flags a:hover { text-decoration: underline; }
.cxr2-flags .cxr2-link-desc { font-size: 11px; color: rgba(255,255,255,0.55); display: block; margin-top: 1px; }

/* CTA button */
.cxr2-cta { display: block; text-align: center; margin-top: 14px; padding: 12px; background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%); color: var(--navy); border-radius: 8px; font-size: 13px; font-weight: 700; text-decoration: none; letter-spacing: 0.02em; transition: transform 0.1s; }
.cxr2-cta:hover { transform: scale(0.98); }

/* Lead form (collapsed under summary) */
.cxr2-lead { margin-top: 14px; }
.cxr2-lead summary { font-size: 11px; font-weight: 600; color: var(--blue-bright); cursor: pointer; letter-spacing: 0.03em; list-style: none; }
.cxr2-lead summary::-webkit-details-marker { display: none; }
.cxr2-lead summary::before { content: '+ '; }
.cxr2-lead[open] summary::before { content: '\2212  '; }
.cxr2-lead-form { padding-top: 12px; }
.cxr2-lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 480px) { .cxr2-lead-row { grid-template-columns: 1fr; } }
.cxr2-lead-field { margin-bottom: 8px; }
.cxr2-lead-input { width: 100%; padding: 8px 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; color: var(--white); font-size: 13px; font-family: inherit; outline: none; }
.cxr2-lead-input:focus { border-color: var(--blue); }
.cxr2-lead-input::placeholder { color: rgba(255,255,255,0.3); }
.cxr2-lead-submit { width: 100%; padding: 10px; background: var(--gold); color: var(--navy); border: none; border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; margin-top: 4px; }
.cxr2-lead-error { color: #f87171; font-size: 11px; margin-top: 4px; min-height: 16px; }
.cxr2-lead-success { color: var(--green-soft); font-size: 12px; font-weight: 600; }
.cxr2-hp { position: absolute; left: -9999px; }

/* Disclaimer */
.cxr2-disclaimer { font-size: 10px; color: rgba(255,255,255,0.55); margin-top: 12px; line-height: 1.5; }

/* Defensive resets — prevent theme/Divi from overriding tool internals */
.cxr2 details { background: transparent; border: none; padding: 0; margin: 0; }
.cxr2 summary { background: transparent; border: none; padding: 0; margin: 0; color: var(--blue-bright); font-size: 11px; font-weight: 600; }
.cxr2 button { background: transparent; border: 1px solid rgba(255,255,255,0.12); color: var(--white); font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1.45; }
.cxr2 button.cxr2-pill.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.cxr2 button.cxr2-lead-submit { background: var(--gold); color: var(--navy); border: none; font-size: 13px; font-weight: 700; }
/* Override vln-pages.css (.vlnPage.vlnPage a:not(…) !important) — specificity (0,6,2) beats (0,5,1) */
.vlnPage div.cxr2 a:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill),
.vlnPage div.cxr2 a:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill):link,
.vlnPage div.cxr2 a:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill):visited { color: #4A96FF !important; text-decoration: none !important; }
.vlnPage div.cxr2 a:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill):hover { color: #4A96FF !important; text-decoration: underline !important; }
.vlnPage div.cxr2 a.cxr2-cta:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill),
.vlnPage div.cxr2 a.cxr2-cta:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill):link,
.vlnPage div.cxr2 a.cxr2-cta:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill):visited { color: #0A2540 !important; text-decoration: none !important; background: linear-gradient(135deg, #FFB800 0%, #FFC733 100%) !important; }
.vlnPage div.cxr2 a.cxr2-cta:not(.vlnBtn):not(.vlnPill):not(.vlnJumpPill):hover { color: #0A2540 !important; text-decoration: none !important; }

/* id-level link override — vln-ui.css body.valn-ui #main-content :is(li,...) a
   has specificity (1,2,2) !important; double-ID (2,0,1) beats it */
#cxr2-tool #cxr2-output a { color: #4A96FF !important; text-decoration: none !important; }
#cxr2-tool #cxr2-output a:hover { text-decoration: underline !important; }
#cxr2-tool #cxr2-output a.cxr2-cta { color: #0A2540 !important; background: linear-gradient(135deg, #FFB800 0%, #FFC733 100%) !important; text-decoration: none !important; }

/* --- tool-theme-resets (from ~/sources/tool-theme-resets.css, TOOLID=cxr2-tool) --- */

/* bullet-section reset — site filter wraps bare ul in bullet-section-gray */
#cxr2-tool div[class*="bullet-section"] { background: transparent !important; padding: 0 !important; margin: 0 !important; border: none !important; border-radius: 0 !important; }
#cxr2-tool ul, #cxr2-tool li { background-color: transparent !important; }

/* vlnPage theme overrides — id specificity beats .vlnPage class rules */
#cxr2-tool summary::after { content: none; display: none; }
#cxr2-tool summary { display: block; justify-content: normal; }
#cxr2-tool details { background: transparent; border: none; overflow: visible; border-radius: 0; }
#cxr2-tool details > summary { background: transparent; }
#cxr2-tool details > :not(summary) { background: transparent; }
#cxr2-tool .cxr2-lead label { color: rgba(255,255,255,0.85); }
#cxr2-tool input:not([type="checkbox"]):not([type="radio"]) { background: rgba(255,255,255,0.06) !important; color: #fff !important; border: 1px solid rgba(255,255,255,0.12) !important; }
#cxr2-tool input::placeholder { color: rgba(255,255,255,0.55); opacity: 1; }
