/* Salary cost calculator (/salary/). Builds on ../styles.css tokens, nav and footer. */

/* Chart series, dark-surface categorical steps (validated: adjacent CVD ΔE >= 8.4).
   Stack order bottom -> top must stay net, tax, employee, employer. */
:root {
  --s-net: #3987e5;
  --s-tax: #d95926;
  --s-emp: #199e70;
  --s-co: #c98500;
  --grid: #2c2c2a;
  --axis: #383835;
}

.nav { background: rgba(0, 0, 0, .9); }
.calc { padding-top: 108px; padding-bottom: 96px; }
.calc-head { max-width: 860px; }
.calc-title {
  margin-top: 20px;
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 800;
  line-height: 1.12;
  color: var(--white);
}
.calc-lede { max-width: 46em; margin-top: 20px; color: rgba(255, 255, 255, .72); }

.calc-meta { margin-top: 14px; font-size: 13px; color: var(--ash); }

/* Breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 28px; font-size: 13px; color: var(--ash); }
.crumbs li + li::before { content: "›"; margin-right: 10px; color: #666; }
.crumbs a:hover { color: var(--white); }

/* The worked example: the one-paragraph answer search engines and assistants quote. */
.answer {
  max-width: 60em;
  margin-top: 32px;
  padding: 18px 22px;
  border-left: 3px solid var(--red);
  background: var(--surface-1);
  color: var(--smoke);
}
.answer b { color: var(--white); font-variant-numeric: tabular-nums; }

/* ---------- Form ---------- */
.calc-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px 24px;
  align-items: end;
  margin-top: 32px;
  padding: 28px;
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 650; letter-spacing: .06em; color: var(--ash); }
.field input, .field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  background: var(--black);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 0;
  transition: border-color .2s;
}
.field select { appearance: none; background: var(--black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.field input:focus, .field select:focus { border-color: var(--gold); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--red-bright); }
.money-input { position: relative; }
.money-input span {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 600; color: var(--gold);
}
.field--salary { grid-column: 1 / -1; max-width: 420px; }
.field--salary input { height: 64px; padding-left: 40px; font-size: 28px; font-weight: 700; }

.note { margin-top: 14px; max-width: 70em; font-size: 13px; line-height: 1.7; color: var(--ash); }

/* ---------- Summary tiles ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}
.kpi { padding: 22px 24px; background: var(--black); }
.kpi p { font-size: 13px; font-weight: 650; letter-spacing: .06em; color: var(--ash); }
.kpi output {
  display: block; margin-top: 6px;
  font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums; color: var(--white);
}
.kpi--main { background: var(--surface-1); }
.kpi--main output { color: var(--gold); font-size: clamp(26px, 2.8vw, 38px); }

/* ---------- Panels ---------- */
.panel { margin-top: 48px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: 16px; }
.panel h2 { font-size: 20px; font-weight: 700; color: var(--white); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--smoke); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; }

.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--f-sans); font-size: 12px; fill: var(--ash); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:hover, .chart .hit:focus-visible { fill: rgba(255, 255, 255, .05); }
.chart .hit:focus-visible { stroke: var(--gold); stroke-width: 1.5; }
.tip {
  position: absolute; z-index: 2; min-width: 220px; padding: 12px 14px;
  font-size: 13px; line-height: 1.5; color: var(--smoke);
  background: #181818; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 12px 32px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.tip b { display: block; margin-bottom: 6px; color: var(--white); }
.tip dl { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 8px; align-items: center; }
.tip dt { width: 10px; height: 10px; border-radius: 2px; }
.tip dd { margin: 0; }
.tip dd.v { text-align: right; font-variant-numeric: tabular-nums; color: var(--white); }
.tip .sum { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); font-weight: 700; color: var(--white); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.months { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.months { min-width: 820px; }
.months th, .months td { padding: 10px 12px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }
.months th:first-child, .months td:first-child { text-align: left; }
.months thead th { font-size: 12px; font-weight: 650; letter-spacing: .06em; color: var(--ash); vertical-align: bottom; border-bottom-color: var(--line); }
.months td { color: var(--smoke); }
.months .total { font-weight: 700; color: var(--white); }
.months tfoot td { font-weight: 700; color: var(--white); border-top: 1px solid var(--line); border-bottom: 0; }
.months tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: 0; }

/* ---------- Reference content ---------- */
.prose h2 { margin-bottom: 16px; }
.prose h2 ~ h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; font-size: 16px; font-weight: 700; color: var(--white); }
.prose p, .steps li { max-width: 60em; }
.period { margin: 20px 0 8px; font-size: 13px; font-weight: 650; color: var(--ash); }
.rates-official th[scope="rowgroup"] { vertical-align: top; text-align: left; font-weight: 650; color: var(--smoke); }
.rates-official th, .rates-official td { text-align: left; }
.flag { color: var(--gold); font-weight: 700; cursor: help; }
.sources { margin-top: 10px; padding-left: 1.4em; list-style: decimal; font-size: 14px; }
.sources li { margin-top: 6px; color: var(--ash); }
.sources a { color: var(--smoke); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; overflow-wrap: anywhere; }
.sources a:hover { color: var(--gold); }
.steps { padding-left: 1.4em; list-style: decimal; }
.steps li { margin-top: 8px; color: var(--smoke); }
.faq-item { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.faq-item h3 { margin: 0 0 6px; }
.faq-item p { color: rgba(255, 255, 255, .78); }
.city-links { display: flex; flex-wrap: wrap; gap: 10px; }
.city-links a, .city-grid a { display: block; box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s, box-shadow .2s; }
.city-links a { padding: 8px 14px; font-size: 14px; }
.city-links a:hover, .city-grid a:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--gold); }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.city-grid a { padding: 18px 20px; }
.city-grid b { display: block; font-size: 20px; color: var(--white); }
.city-grid span { font-size: 13px; color: var(--ash); }
.compare { min-width: 680px; }
.compare a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
.compare a:hover { color: var(--gold); }

.footer-base { border-top: 0; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .calc { padding-top: 96px; }
  .calc-form { grid-template-columns: 1fr; padding: 20px; }
  .kpi { padding: 18px; }
}
