/* ===========================================================
   Thought Ignite — CLB Calculator page
   =========================================================== */
.clb-hero { background: radial-gradient(900px 500px at 90% -20%, #1c4a3c 0%, var(--forest) 60%, #0c2820 100%); padding: clamp(2.6rem, 6vw, 4.2rem) 0 clamp(7rem, 12vw, 9rem); position: relative; overflow: hidden; }
.clb-hero h1 { color: var(--ivory); margin-bottom: 0.3em; }
.clb-hero .lede { color: var(--sage); font-size: 1.1rem; max-width: 44rem; }
.crumbs { font-size: 0.82rem; color: var(--sage); margin-bottom: 1.2rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.verified { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; font-size: 0.85rem; color: var(--ivory); background: rgba(246,245,240,0.08); border: 1px solid var(--rule-dark); border-radius: 999px; padding: 0.4rem 0.9rem; }
.verified svg { width: 16px; height: 16px; color: var(--gold); }

.calc-wrap { margin-top: clamp(-6.5rem, -10vw, -5rem); position: relative; z-index: 2; padding-top: 0; }
.calc { background: #fff; border-radius: 20px; box-shadow: 0 2px 4px rgba(17,53,43,0.05), 0 40px 80px -40px rgba(17,53,43,0.45); border: 1px solid rgba(17,53,43,0.08); display: grid; grid-template-columns: 1fr; overflow: hidden; }
@media (min-width: 940px) { .calc { grid-template-columns: 0.95fr 1.05fr; } }
.calc-in { padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1.3rem; align-content: start; min-width: 0; }
.calc-out { background: linear-gradient(160deg, #143d31, var(--forest) 60%); color: var(--ivory); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1.3rem; align-content: start; min-width: 0; position: relative; overflow: hidden; }
.calc h2 { font-size: 1.25rem; margin: 0; }
.calc-out h2 { color: var(--ivory); }
.step-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #b9771a; }
.calc-out .step-label { color: var(--gold); }

.test-tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ivory-dim); border-radius: 12px; padding: 4px; }
.test-tabs button { position: relative; z-index: 1; font: 600 0.92rem var(--sans); border: 0; background: transparent; color: var(--ink); padding: 0.7rem 0.4rem; border-radius: 9px; cursor: pointer; transition: color 0.25s ease; }
.test-tabs button[aria-selected="true"] { color: var(--ivory); }
.test-tabs .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); background: var(--forest); border-radius: 9px; transition: transform 0.35s cubic-bezier(.2,.7,.3,1); box-shadow: 0 6px 14px -6px rgba(17,53,43,0.6); }
.test-note { font-size: 0.85rem; color: var(--warm-grey); margin: 0; }

.score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
@media (max-width: 420px) { .score-grid { grid-template-columns: 1fr; } }
.score-field { display: grid; gap: 0.35rem; }
.score-field label { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.45rem; }
.score-field label svg { width: 18px; height: 18px; color: var(--forest); }
.score-field select, .score-field input { font: 600 1.05rem var(--sans); color: var(--ink); background: var(--ivory); border: 1.5px solid var(--rule); border-radius: 10px; padding: 0.65rem 0.75rem; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.score-field select:focus, .score-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,163,60,0.25); }
.example-flag { font-size: 0.78rem; background: #fde9c8; color: #8a5a10; padding: 0.15rem 0.55rem; border-radius: 6px; font-weight: 700; justify-self: start; }

.target-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.target-row span { font-weight: 600; font-size: 0.9rem; margin-right: 0.3rem; }
.chip-btn { font: 600 0.88rem var(--sans); border: 1.5px solid var(--rule); background: #fff; color: var(--ink); border-radius: 999px; padding: 0.4rem 0.9rem; cursor: pointer; transition: all 0.2s ease; }
.chip-btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--forest); }
.chip-btn:focus-visible, .test-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Results */
.overall { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.overall-num { font-family: var(--serif); font-weight: 900; font-size: clamp(3.4rem, 8vw, 4.6rem); line-height: 0.9; color: var(--gold); font-variant-numeric: tabular-nums; text-shadow: 0 0 30px rgba(232,163,60,0.35); }
.overall-num small { font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--sage); letter-spacing: 0.1em; display: block; margin-bottom: 0.25rem; text-shadow: none; }
.overall p { margin: 0; color: var(--sage); max-width: 22rem; font-size: 0.95rem; }
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
@media (max-width: 480px) { .gauges { grid-template-columns: repeat(2, 1fr); } }
.gauge { text-align: center; display: grid; justify-items: center; gap: 0.25rem; }
.gauge svg { width: 100%; max-width: 92px; aspect-ratio: 1; overflow: visible; }
.gauge .track { fill: none; stroke: rgba(246,245,240,0.12); stroke-width: 8; }
.gauge .arc { fill: none; stroke-width: 8; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.3,1), stroke 0.4s ease; }
.gauge .num { font-family: var(--serif); font-weight: 900; font-size: 26px; fill: var(--ivory); }
.gauge .cap { font-size: 8px; font-weight: 700; letter-spacing: 0.12em; fill: var(--sage); }
.gauge b { font-size: 0.82rem; color: var(--ivory); font-weight: 600; }
.gauge.lowest b::after { content: " · lowest"; color: var(--gold); font-weight: 700; }

.crs-box { background: rgba(246,245,240,0.07); border: 1px solid var(--rule-dark); border-radius: 14px; padding: 1rem 1.1rem; display: grid; gap: 0.6rem; }
.crs-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.crs-num { font-family: var(--serif); font-weight: 900; font-size: 2rem; color: var(--ivory); font-variant-numeric: tabular-nums; }
.crs-num small { font-family: var(--sans); font-size: 0.8rem; color: var(--sage); font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.85rem; color: var(--sage); cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 99px; background: rgba(246,245,240,0.2); position: relative; cursor: pointer; transition: background 0.2s ease; flex-shrink: 0; }
.toggle input::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: var(--ivory); transition: transform 0.2s ease; }
.toggle input:checked { background: var(--gold); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.elig { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.elig li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; color: var(--ivory); }
.elig .mk { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; transition: transform 0.3s ease, background 0.3s ease; }
.elig li.ok .mk { background: #2f8a5f; color: #fff; }
.elig li.no .mk { background: rgba(246,245,240,0.15); color: var(--sage); }
.elig li.no { color: var(--sage); }
.elig li.pop .mk { transform: scale(1.25); }

.gap-box { display: grid; gap: 0.45rem; font-size: 0.9rem; }
.gap-box .gap-row { display: flex; justify-content: space-between; gap: 0.8rem; border-bottom: 1px dashed var(--rule-dark); padding-bottom: 0.35rem; }
.gap-box .gap-row:last-child { border-bottom: 0; }
.gap-box .gap-row b { color: var(--gold); font-variant-numeric: tabular-nums; }
.gap-box .done { color: #7fd1a6; font-weight: 600; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.calc-actions .btn { padding: 0.75em 1.3em; }
.calc-disclaimer { font-size: 0.78rem; color: var(--sage); margin: 0; opacity: 0.9; }

/* Content */
.clb-content h2 { scroll-margin-top: 90px; }
.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2.4rem; }
.toc a { font-size: 0.88rem; font-weight: 600; border: 1.5px solid var(--rule); border-radius: 999px; padding: 0.4rem 0.95rem; color: var(--forest); background: #fff; transition: border-color 0.2s ease, background 0.2s ease; }
.toc a:hover { border-color: var(--gold); background: #fff8ec; }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(17,53,43,0.1); background: #fff; margin: 1.2rem 0 0.6rem; box-shadow: 0 12px 28px -20px rgba(17,53,43,0.3); }
table.clb-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; min-width: 520px; }
.clb-table th, .clb-table td { padding: 0.7rem 0.9rem; text-align: center; border-bottom: 1px solid rgba(17,53,43,0.08); }
.clb-table thead th { background: var(--forest); color: var(--ivory); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; }
.clb-table tbody th { font-family: var(--serif); font-weight: 900; color: var(--forest); text-align: left; }
.clb-table tbody tr:hover { background: #fbf6ec; }
.clb-table tr.hit { background: #fdf0d8; }
.clb-table tr.hit th { color: #b9771a; }
.table-note { font-size: 0.85rem; color: var(--warm-grey); margin: 0 0 2.6rem; }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin: 1.4rem 0 2.6rem; }
.tip { background: #fff; border: 1px solid rgba(17,53,43,0.08); border-radius: 14px; padding: 1.3rem 1.4rem; box-shadow: 0 12px 28px -22px rgba(17,53,43,0.35); }
.tip h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.tip p { margin: 0; color: var(--warm-grey); font-size: 0.93rem; }
.sources { font-size: 0.88rem; color: var(--warm-grey); }
.sources a { text-decoration: underline; color: var(--forest); }

@media (prefers-reduced-motion: reduce) { .gauge .arc, .test-tabs .pill, .elig .mk { transition: none; } }
