/* Holland Career Test — design system
   Editorial, light, one accent (indigo). Inter with tabular figures.
   Spacing on a 4/8px scale; 1px neutral borders; radius 6–8px; no gradients,
   no glassmorphism, no decorative shadows. */

:root {
  --paper: #f7f7f4;
  --surface: #ffffff;
  --ink: #17191c;
  --ink-2: #41464e;
  --muted: #686e77;
  --line: #e2e3de;
  --line-strong: #c6c8c0;
  --green: #3f4aa5;
  --green-dark: #323d85;
  --green-soft: #eceef8;
  --green-faint: #f5f6fb;
  --track: #e7e8e2;
  --track-other: #c3c7c0;
  --warn-bg: #fbf7ec;
  --warn-line: #e7dab6;
  --radius: 8px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--green-soft); }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--green);
  flex: none;
}
header.site nav { display: flex; gap: 4px; }
header.site nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
header.site nav a:hover { color: var(--ink); background: var(--paper); }

/* ---------- Layout & type ---------- */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 16px 16px;
}
main.main-narrow { max-width: 800px; }

h1 {
  font-size: clamp(1.8rem, 4.6vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 12px;
}
h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.014em;
  font-weight: 700;
  margin: 40px 0 12px;
}
h3 {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.006em;
  margin: 24px 0 8px;
}
p { margin: 0 0 12px; }
.prose { max-width: 68ch; }
.lede {
  font-size: 1.09rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0;
}
.small { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }

/* ---------- Hero ---------- */

.hero { padding: 36px 0 26px; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 12px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex: none;
}
.trust-row a { font-weight: 550; }

/* ---------- Calculator layout ---------- */

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px;
  align-items: start;
  margin-top: 4px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h2, .card h3 { margin-top: 0; }

/* ---------- Form controls ---------- */

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
label.field-label, .field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.field-help { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }

input[type="number"], input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  appearance: none;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus {
  border-color: var(--green);
  outline: 2px solid rgba(11, 110, 79, 0.25);
  outline-offset: 0;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2341464e' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Money input with ₹ prefix */
.input-money { position: relative; }
.input-money .prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 550;
  pointer-events: none;
}
.input-money input { padding-left: 30px; font-weight: 600; }

/* CTC slider */
.slider-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--track);
  margin: 0;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--green);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--green);
  cursor: pointer;
}
input[type="range"]:focus-visible { outline-offset: 4px; }
.slider-scale {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--muted); margin-top: 6px;
}

/* Segmented control (PF choice) */
fieldset.seg-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
fieldset.seg-fieldset legend {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  margin-bottom: 6px;
}
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segment { position: relative; }
.segment input {
  position: absolute;
  top: 10px; left: 10px;
  width: 1px; height: 1px;
  opacity: 0;
  margin: 0;
}
.segment label {
  display: block;
  height: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.segment label:hover { border-color: var(--muted); }
.segment .segment-title { display: block; font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.segment .segment-sub { display: block; font-size: 0.82rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.segment input:checked + label {
  border-color: var(--green);
  background: var(--green-faint);
  box-shadow: inset 0 0 0 1px var(--green);
}
.segment input:checked + label .segment-title { color: var(--green-dark); }
.segment input:focus-visible + label {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---------- Results ---------- */

.sticky-panel { position: sticky; top: 76px; }
.results-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.headline-figure {
  font-size: clamp(2.3rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
.headline-figure .per { font-size: 1.05rem; font-weight: 550; color: var(--muted); letter-spacing: 0; }
.headline-note { font-size: 0.92rem; color: var(--ink-2); margin: 6px 0 0; }
.headline-note strong { color: var(--green-dark); font-weight: 650; }
.verdict {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-2);
}
.verdict strong { color: var(--ink); }

.results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.result-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  background: var(--surface);
}
.result-box.winner {
  border-color: var(--green);
  background: var(--green-faint);
  box-shadow: inset 0 0 0 1px var(--green);
}
.result-box .regime-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.result-box .amount {
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 6px 0 2px;
}
.result-box .amount .per { font-size: 0.85rem; font-weight: 550; color: var(--muted); }
.result-box .tag {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  margin: 12px 0 10px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--track-other);
  transition: width 0.25s ease;
}
.result-box.winner .bar > span { background: var(--green); }
.result-box .tax-line { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ---------- Tables (payslip style) ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  background: var(--surface);
  font-size: 0.95rem;
}
th, td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th:first-child, td:first-child { text-align: left; }
thead th {
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding-top: 10px;
  padding-bottom: 10px;
}
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { white-space: nowrap; }
tr.sub td { color: var(--ink-2); }
tr.total td {
  font-weight: 700;
  color: var(--ink);
  background: var(--green-faint);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
tr.grand td {
  font-weight: 750;
  background: var(--green-soft);
}
td .indent { padding-left: 18px; color: var(--ink-2); }

/* ---------- Lists, notes, pager, grid ---------- */

ul.assumptions { padding-left: 20px; margin: 0 0 12px; max-width: 72ch; }
ul.assumptions li { margin: 7px 0; color: var(--ink-2); }
ul.assumptions li strong { color: var(--ink); }

.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.94rem;
  color: var(--ink-2);
  max-width: 72ch;
}
.note strong { color: var(--ink); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 28px 0 4px;
  flex-wrap: wrap;
}
.pager a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 550;
  font-size: 0.94rem;
  transition: border-color 0.15s ease;
}
.pager a:hover { border-color: var(--green); color: var(--green-dark); }

.ctc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.ctc-grid a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ctc-grid a:hover { border-color: var(--green); color: var(--green-dark); }
.ctc-grid a.current {
  border-color: var(--green);
  background: var(--green-faint);
  color: var(--green-dark);
  box-shadow: inset 0 0 0 1px var(--green);
}

/* Formula block on methodology */
.formula-step { margin: 0 0 14px; }
.formula-step:last-child { margin-bottom: 0; }
.formula-step .step-name { font-weight: 650; display: block; margin-bottom: 2px; }
.formula {
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: block;
  margin-top: 4px;
}

/* ---------- Footer ---------- */

footer.site {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 28px;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
footer.site nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 550;
}
footer.site nav a:hover { color: var(--green-dark); }
footer.site p { margin: 4px 0; max-width: 72ch; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
}
@media (max-width: 560px) {
  .hero { padding: 26px 0 20px; }
  .card { padding: 18px 16px; }
  .results { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; }
  table { font-size: 0.9rem; }
  th, td { padding: 8px 8px; }
  td .indent { padding-left: 10px; }
  .brand { font-size: 0.95rem; }
  header.site nav a { padding: 6px 6px; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Quiz ---------- */
.progress-wrap { margin: 4px 0 18px; }
.progress-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.progress-track { height: 8px; background: var(--track); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); width: 0%; transition: width .25s ease; }
.quiz-q { font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin: 6px 0 4px; }
.quiz-prompt { color: var(--muted); margin: 0 0 18px; }
.likert { display: grid; gap: 10px; }
.likert button {
  font: inherit; text-align: left; padding: 14px 16px; min-height: 52px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  cursor: pointer; color: var(--ink); font-weight: 600;
}
.likert button:hover { border-color: var(--green); background: var(--green-faint); }
.likert button[aria-checked="true"] { border-color: var(--green); background: var(--green-soft); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.btn {
  font: inherit; font-weight: 700; padding: 12px 22px; min-height: 48px; border-radius: var(--radius);
  border: 1px solid var(--green); background: var(--green); color: #fff; cursor: pointer;
}
.btn:hover { background: var(--green-dark); }
.btn.secondary { background: var(--surface); color: var(--green); }
.btn.secondary:hover { background: var(--green-faint); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.code-badge {
  display: inline-block; font-size: 2rem; font-weight: 800; letter-spacing: .35em; text-indent: .35em;
  background: var(--green-soft); color: var(--green-dark); border: 1px solid var(--green);
  padding: 10px 18px 10px 22px; border-radius: var(--radius); margin: 6px 0 10px;
}
.score-bars { display: grid; gap: 10px; margin: 14px 0; }
.score-row { display: grid; grid-template-columns: 128px 1fr 44px; align-items: center; gap: 12px; font-size: .95rem; }
.score-row .bar-track { height: 12px; background: var(--track); border-radius: 99px; overflow: hidden; }
.score-row .bar-fill { height: 100%; background: var(--track-other); }
.score-row.top .bar-fill { background: var(--green); }
.score-row .val { text-align: right; font-weight: 700; }
.type-cards { display: grid; gap: 14px; }
@media (min-width: 760px) { .type-cards { grid-template-columns: 1fr 1fr 1fr; } .likert { grid-template-columns: 1fr; } }
.chip-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li { background: var(--green-faint); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: .88rem; }
[hidden] { display: none !important; }
