:root {
  --paper: #0B0B0C;
  --surface: #151517;
  --ink: #EDEDED;
  --muted: #A8A8AE;
  --rule: #2A2A30;
  --tint: #1E1E22;
  --brand: #E8B54A;
  --brand-2: #E8B54A;
  --on-brand: #0B0B0C;
  --gold: #E8B54A;
  --on-gold: #0B0B0C;
  --track: #2E2E34;
  --stamp: #F2766B;
  --shadow: rgba(0, 0, 0, .6);
  --glow-a: rgba(232, 181, 74, .18);
  --glow-b: rgba(232, 181, 74, .08);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
a { color: var(--brand); text-underline-offset: .2em; }
::selection { background: var(--gold); color: var(--on-gold); }
input, select { caret-color: var(--brand); accent-color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 9; }

h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 75%; line-height: 1.02; letter-spacing: -.005em; }
h1 { font-size: clamp(2.6rem, 1.5rem + 4.4vw, 5rem); max-width: 18ch; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: 1.3rem; font-stretch: 87.5%; font-weight: 700; line-height: 1.2; }

/* Buttons */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 0;
  background: var(--brand);
  background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 60%, var(--brand-2)));  /* pure brand-2 end was 4.3:1 under white text */
  color: var(--on-brand); font: 700 1.0625rem/1 Inter, sans-serif; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 20px -10px var(--brand-2);
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.btn::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-110%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transition: transform .6s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px var(--brand-2); }
.btn:hover::after { transform: translateX(110%); }
.btn:active { transform: scale(.97); }
.btn svg { transition: transform .25s; }
.btn:hover svg { transform: translateX(3px); }

/* Page opener */
.lede { padding: 48px 0 32px; }
.intro { max-width: 60ch; color: var(--muted); font-size: 1.15rem; margin: 20px 0 0; }
.wrap .wrap { padding-left: 0; padding-right: 0; }
.chip { text-transform: none; font-family: inherit; }
h1, h2, h3 { font-family: Inter, system-ui, sans-serif; letter-spacing: -.02em; }
.big, .fig .v, .list .fact, .versus .v, .ring-txt b { font-family: "JetBrains Mono", monospace; letter-spacing: -.03em; }

/* Calculator list */
.list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 8px 24px; align-items: center;
  padding: 20px 22px; border-radius: 18px; border: 1px solid var(--rule); background: var(--surface);
  color: var(--ink); text-decoration: none;
  transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s;
}
.list a:hover { transform: translateY(-2px); border-color: var(--brand-2); box-shadow: 0 14px 30px -20px var(--shadow); }
.list p { margin: 4px 0 0; color: var(--muted); }
.list .fact { font-weight: 800; font-stretch: 75%; font-size: 1.6rem; text-align: right; }
.list .go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--brand); transition: background-color .3s, color .3s, transform .3s; }
.list a:hover .go { background: var(--brand); color: var(--on-brand); transform: rotate(-45deg); }
@media (max-width: 600px) {
  .list a { grid-template-columns: minmax(0, 1fr) 40px; }
  .list .fact { grid-row: 2; text-align: left; font-size: 1.3rem; }
  .list .go { grid-row: 1 / span 2; grid-column: 2; }
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.timeline time, .timeline .when { font-weight: 700; font-stretch: 87.5%; }
.timeline p { margin: 0; max-width: 62ch; }
.timeline .open { color: var(--muted); }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; } }

/* Calculator layout */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; padding-bottom: 64px; }
@media (min-width: 881px) { .calc > :last-child { position: sticky; top: 24px; } }
@media (max-width: 880px) { .calc { grid-template-columns: 1fr; gap: 36px; } }

.inputs { margin: 0; }
.field { display: grid; gap: 6px; margin: 0 0 24px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; padding: 0; margin-bottom: 2px; }
.hint, .words { font-size: .875rem; color: var(--muted); margin: 0; }
.words:empty { display: none; }
input, select {
  font: inherit; font-size: 1.125rem; color: var(--ink);
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
input:hover, select:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--glow-a); }
input:invalid { border-color: var(--stamp); }
::placeholder { color: var(--muted); opacity: 1; }
.unit { position: relative; }
.unit input { padding-left: 34px; }
.unit::before { content: "₹"; position: absolute; left: 16px; top: 26px; transform: translateY(-50%); color: var(--muted); }
.unit.pct input, .unit.yrs input { padding-left: 16px; padding-right: 64px; }
.unit.pct::before, .unit.yrs::before { content: none; }
.unit.pct::after, .unit.yrs::after { position: absolute; right: 16px; top: 26px; transform: translateY(-50%); color: var(--muted); }
.unit.pct::after { content: "%"; }
.unit.yrs::after { content: "years"; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-note { margin: -12px 0 24px; }

/* Slider, added under number fields by app.js */
input.slider {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 44px; margin: -5px 0 -9px; padding: 0; border: 0;  /* 44px hit area, same footprint as the old 26px */ border-radius: 0; background: transparent; cursor: pointer;
}
input.slider:focus-visible { box-shadow: none; outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 8px; }
input.slider::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-2) calc(var(--p, 0) * 100%), var(--track) 0);
}
input.slider::-moz-range-track { height: 6px; border-radius: 99px; background: var(--track); }
input.slider::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--brand-2); }
input.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%;
  background: var(--surface); border: 4px solid var(--brand-2); box-shadow: 0 3px 10px var(--shadow);
  transition: transform .2s var(--ease-out);
}
input.slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 4px solid var(--brand-2); box-shadow: 0 3px 10px var(--shadow);
  transition: transform .2s var(--ease-out);
}
input.slider:hover::-webkit-slider-thumb, input.slider:active::-webkit-slider-thumb { transform: scale(1.2); }
input.slider:hover::-moz-range-thumb, input.slider:active::-moz-range-thumb { transform: scale(1.2); }

/* Pill picker with a sliding thumb (thumb added by app.js) */
.seg { position: relative; display: flex; padding: 4px; border-radius: 999px; background: var(--tint); }
.seg .thumb {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--gold); box-shadow: 0 6px 16px -8px var(--gold);
  transition: transform .4s var(--ease-out), opacity .2s;  /* width only changes on resize: snap it, no per-frame layout */
}
.seg label { flex: 1 1 0; min-width: 0; position: relative; z-index: 1; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; height: auto; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 11px 4px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: color .3s; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { color: var(--on-gold); }
.seg input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: -1px; }

details.more { margin: 0 0 22px; }
details.more > summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 9px 0; margin: -9px 0 7px; }

/* Result card */
.slip {
  position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 24px;
  padding: 28px 28px 24px; box-shadow: 0 30px 60px -36px var(--shadow);
}
.slip-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px dashed var(--rule); color: var(--muted); font-size: .95rem; }
.slip-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.big { display: block; font-weight: 800; font-stretch: 75%; font-size: clamp(2.8rem, 2rem + 3vw, 4.2rem); line-height: 1; margin: 4px 0 10px; }
.big-k { color: var(--muted); }
.gain { margin: 0; font-weight: 600; color: var(--brand); }
.stamp {
  position: absolute; right: 18px; top: 16px; transform: rotate(-7deg);
  color: var(--stamp); border: 3px double var(--stamp); border-radius: 8px;
  padding: 5px 10px 4px; font-weight: 800; font-stretch: 75%; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase;
  pointer-events: none;
  animation: stamp .32s cubic-bezier(.25, 1.6, .5, 1) .9s both;
}
@keyframes stamp { from { transform: rotate(-7deg) scale(1.9); opacity: 0; } }
@media (max-width: 480px) {
  .slip { padding: 22px 18px 18px; border-radius: 20px; }
  .stamp { position: static; display: inline-block; margin-bottom: 12px; }
}

/* Ring meter: one share of a whole, built by app.js */
.ring { position: relative; flex: none; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: var(--track); }
.ring .fill { stroke: var(--brand-2); stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.3, 1, .4, 1); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 0 18px; }
.ring-txt b { font-weight: 800; font-stretch: 75%; font-size: 1.7rem; line-height: 1; }
.ring-txt span { font-size: .75rem; line-height: 1.2; color: var(--muted); margin-top: 3px; }
.ring.sm { width: 112px; height: 112px; }
.ring.sm .ring-txt b { font-size: 1.4rem; }
@media (max-width: 480px) { .ring { width: 112px; height: 112px; } .ring-txt b { font-size: 1.4rem; } }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 0 10px 12px; border-bottom: 1px solid var(--rule); text-align: right; }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 0; }
.tbl thead th { font-weight: 600; color: var(--muted); font-size: .9rem; border-bottom-color: var(--ink); }
.tbl tr.total td { font-weight: 800; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.tbl tbody tr { transition: background-color .3s; }
.tbl tr.pick td { background: var(--tint); font-weight: 700; }
.tbl tr.pick td:first-child { box-shadow: inset 4px 0 0 var(--gold); padding-left: 10px; }
.tbl caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.scroll { overflow-x: auto; }
.after { margin-top: 28px; }

.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 480px) { .versus { grid-template-columns: 1fr; } }
.versus h2 { margin-bottom: 4px; font-size: 1.3rem; font-stretch: 87.5%; font-weight: 700; line-height: 1.2; }
.versus .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.versus .v { display: block; font-weight: 800; font-stretch: 75%; font-size: 2.2rem; line-height: 1.05; }
/* Inside the slip these are lines of the slip, not boxes: a box here reads as a card in a card */
.verdict { margin: 0 0 22px; font-weight: 700; font-size: 1.1rem; text-decoration: underline 3px var(--gold); text-underline-offset: .3em; text-decoration-skip-ink: none; }
.warn { margin: 16px 0 0; color: var(--stamp); font-weight: 600; }

/* Long-form text */
.prose { padding: 56px 20px; border-top: 1px solid var(--rule); }
.prose > * { max-width: 68ch; }
.prose h2 { margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose .tbl { max-width: 560px; margin: 8px 0 20px; }

/* FAQ */
.faq { padding: 56px 20px 24px; border-top: 1px solid var(--rule); }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--rule); max-width: 820px; }
.faq details:first-of-type { border-top: 1px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 48px 18px 0; position: relative; font-weight: 600; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tint); color: var(--brand); font-size: 1.3rem;
  transition: transform .35s var(--ease-out), background-color .3s;
}
.faq details[open] summary::after { transform: rotate(135deg); background: var(--gold); color: var(--on-gold); }
.faq .ans { padding: 0 0 18px; max-width: 70ch; color: var(--muted); }
.faq .ans p { margin: 0 0 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* Skill worth calculator */
.seg.plain input:checked + span { background: var(--gold); color: var(--on-gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.chip {
  font: inherit; font-size: .95rem; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); transition: background-color .2s, border-color .2s;
}
.chip:hover { border-color: var(--brand-2); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 8px; border-radius: 99px; background: var(--gold); color: var(--on-gold); font-size: .8rem; }
.skills { margin: 0 0 24px; }
.sk { border: 0; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.sk legend { padding: 0; float: left; width: 100%; margin-bottom: 8px; }
.sk legend + * { clear: both; }
.sk-name { font-weight: 600; }
.sk-name small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.lvl span { padding: 12px 1px; font-size: .85rem; font-stretch: 87.5%; }
.lvl label:first-child input:checked + span { background: var(--surface); color: var(--muted); }  /* "No" is the resting state, not a pick */
.sk.cred { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.tick { display: flex; align-items: center; gap: 8px; flex: none; color: var(--muted); font-size: .9rem; }
.tick input { width: 22px; height: 22px; padding: 0; accent-color: var(--brand); }
.mine-h { font-weight: 600; }
.mine-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mine { font: inherit; font-size: .9rem; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--tint); color: var(--ink); cursor: pointer; }
.mine:hover { border-color: var(--stamp); }
.link-btn { justify-self: start; font: inherit; font-size: .95rem; padding: 10px 0; margin: -6px 0; border: 0; background: none; color: var(--brand); text-decoration: underline; cursor: pointer; }
.res h3 { margin: 32px 0 10px; }
.res .tbl td small, .cards small { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; }
.bar { display: inline-block; width: 56px; height: 8px; border-radius: 99px; vertical-align: middle; background: linear-gradient(90deg, var(--brand-2) calc(var(--m) * 100%), var(--track) 0); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cards li { padding: 14px 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.cards li.none { color: var(--muted); }
.cards .gain { display: block; margin-top: 6px; }
.kind { margin-left: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 10px; }
.btn.ghost { background: var(--tint); color: var(--brand); box-shadow: none; }
.worth-bar { display: none; }
@media (max-width: 880px) {
  .worth-bar:not([hidden]) {
    display: flex; justify-content: space-between; gap: 12px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 5;
    padding: 14px 18px; border-radius: 16px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700;
    box-shadow: 0 12px 30px -10px var(--shadow);
  }
  .worth-bar span:last-child { font-weight: 400; white-space: nowrap; }
  .worth-bar.away { display: none !important; }
  [data-worth] { padding-bottom: 96px; }
}
.print-only { display: none; }
@page { size: A4; margin: 14mm; }
@media print {
  :root { --ink: #000; --muted: #444; --rule: #bbb; --surface: #fff; --paper: #fff; --tint: #f2f2f2; --brand: #00695F; --brand-2: #00695F; --track: #ddd; }
  body { background: #fff; font-size: 11pt; }
  .top, .bottom, .faq, .lede, form.worth-in, .actions, .worth-bar, .skip, .res > .hint:first-of-type { display: none !important; }
  .calc { display: block; padding: 0; }
  .print-only { display: block; margin-bottom: 12px; }
  .print-only h2 { font-size: 20pt; }
  .slip { box-shadow: none; border-radius: 8px; padding: 14px 16px; }
  .big { font-size: 28pt; }
  .cards li, .tbl tr, .slip { break-inside: avoid; }
  .bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cards { gap: 6px; }
  a { color: #000; text-decoration: none; }
}
