/* Pay Raise Calculator — styles */

:root {
  --blue: #1D4ED8;
  --blue-dark: #1E40AF;
  --blue-light: #DBEAFE;
  --green: #16A34A;
  --green-bg: #DCFCE7;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --yellow: #CA8A04;
  --yellow-bg: #FEF3C7;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #64748B;
  --line: #E2E8F0;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.04);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}
.container.narrow { max-width: 760px; }

/* HEADER */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}
.brand-logo {
  width: 28px; height: 28px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.brand-name { font-size: .95rem; }
.meta-updated { font-size: .8rem; color: var(--ink-3); }

/* CALC SECTION */
.calc-section { padding: 1.25rem 0 1.5rem; }
h1 {
  margin: .25rem 0 .25rem;
  font-size: 1.6rem;
  letter-spacing: -.01em;
}
.lede {
  margin: 0 0 1rem;
  color: var(--ink-2);
  font-size: .98rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 980px) {
  .calc-grid {
    grid-template-columns: 360px 1fr;
    align-items: start;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  min-height: 100px;
}

/* INPUTS */
.inputs .field { margin-bottom: .85rem; }
.inputs .field:last-child { margin-bottom: 0; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-bottom: .85rem;
}
.field-row .field { margin-bottom: 0; }

label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: .35rem;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
}

.money-input {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 .65rem;
  height: 42px;
  transition: border-color .15s, background-color .15s;
}
.money-input:focus-within {
  border-color: var(--blue);
  background: #fff;
}
.money-input .prefix,
.money-input .suffix {
  color: var(--ink-3);
  font-weight: 600;
  font-size: .95rem;
  flex-shrink: 0;
}
.money-input .prefix { margin-right: .35rem; }
.money-input .suffix { margin-left: .35rem; }
.money-input input {
  border: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  font: inherit;
  color: inherit;
  outline: none;
  font-variant-numeric: tabular-nums;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 1.7rem 0 .65rem;
  height: 42px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%2364748B' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right .55rem center;
}
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.hint { font-size: .78rem; color: var(--ink-3); margin-top: .3rem; min-height: 1em; }

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  height: 42px;
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-weight: 500;
  font-size: .85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg-btn.active {
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.seg-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.inflation-row {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  color: var(--ink-2);
  padding: .65rem .7rem;
  background: var(--bg);
  border-radius: 8px;
  margin-top: .25rem;
  flex-wrap: wrap;
}
.inflation-row input {
  width: 56px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 .35rem;
  font: inherit;
  font-size: .85rem;
  background: #fff;
  color: var(--ink);
  text-align: right;
}
.inflation-row .cpi-asof { color: var(--ink-3); font-size: .75rem; margin-left: auto; }
.link-btn {
  background: transparent;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 .25rem;
}

/* OUTPUTS */
.outputs {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}
@media (min-width: 720px) {
  .outputs { grid-template-columns: repeat(3, 1fr); }
}

.out-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
.card-title {
  margin: 0 0 .3rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-3);
  font-weight: 600;
}
.big-number {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  margin: .1rem 0 .4rem;
  color: var(--ink);
}
.big-number.positive { color: var(--green); }
.sub-line {
  font-size: .9rem;
  color: var(--ink-2);
  margin-bottom: .8rem;
}
.sub-line .positive { color: var(--green); font-weight: 600; }
.sub-line .dot { color: var(--ink-3); margin: 0 .35rem; }

.breakdown {
  width: 100%;
  font-size: .82rem;
  border-collapse: collapse;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}
.breakdown th {
  text-align: right;
  font-weight: 500;
  color: var(--ink-3);
  padding: .25rem .35rem;
  border-bottom: 1px solid var(--line);
}
.breakdown th:first-child { text-align: left; }
.breakdown td {
  padding: .25rem .35rem;
  text-align: right;
  border-bottom: 1px solid #F1F5F9;
}
.breakdown td:first-child { text-align: left; color: var(--ink-2); text-transform: capitalize; }
.breakdown td.inc { color: var(--green); font-weight: 600; }

.detail-list {
  margin: 0 0 .6rem;
  padding: 0;
  font-size: .85rem;
}
.detail-list > div {
  display: flex;
  justify-content: space-between;
  padding: .25rem 0;
  border-bottom: 1px solid #F1F5F9;
}
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--ink-3); margin: 0; }
.detail-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.fineprint { margin: .4rem 0 0; font-size: .75rem; color: var(--ink-3); line-height: 1.4; }

.verdict-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .4rem;
}
.verdict-badge[data-band="above"] { background: var(--green-bg); color: var(--green); }
.verdict-badge[data-band="neutral"] { background: var(--yellow-bg); color: var(--yellow); }
.verdict-badge[data-band="below"] { background: var(--red-bg); color: var(--red); }
.verdict-icon { font-size: 1rem; }

#out-real-percent[data-band="above"] { color: var(--green); }
#out-real-percent[data-band="neutral"] { color: var(--yellow); }
#out-real-percent[data-band="below"] { color: var(--red); }

/* ACTIONS */
.actions-row {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .85rem;
  font: inherit;
  font-size: .85rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.action-status { font-size: .8rem; color: var(--green); }

/* ADVANCED ACCORDIONS */
.advanced { padding: 1.5rem 0; }
.accordion {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.accordion summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  margin-left: auto;
  color: var(--ink-3);
  font-size: 1.2rem;
}
.accordion[open] summary::after { content: "−"; }
.acc-title { font-weight: 600; font-size: 1rem; }
.acc-sub { color: var(--ink-3); font-size: .85rem; }
.acc-body {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.acc-fields {
  display: grid;
  gap: .8rem;
  margin-bottom: .9rem;
}
.acc-fields.stay-switch {
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 720px) {
  .acc-fields.stay-switch { grid-template-columns: repeat(4, 1fr); }
}
.acc-fields label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-2);
}
.acc-result {
  background: var(--bg);
  border-radius: 8px;
  padding: .9rem 1rem;
  font-size: .95rem;
  color: var(--ink);
}
.ss-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ss-table td { padding: .35rem .5rem; }
.ss-table td:last-child { text-align: right; font-weight: 600; }
.ss-table tr.ss-diff td {
  border-top: 1px solid var(--line);
  padding-top: .55rem;
  color: var(--green);
  font-size: 1.05rem;
}

.chart-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: .5rem;
}
.chart-wrap svg { display: block; max-width: 100%; height: auto; }

/* BENCHMARKS */
.benchmarks { padding: 1.5rem 0; }
.benchmarks h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.benchmark-table {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: .9rem;
  box-shadow: var(--shadow);
}
.benchmark-table caption { display: none; }
.benchmark-table th, .benchmark-table td {
  padding: .6rem .9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.benchmark-table th { background: var(--bg); color: var(--ink-2); font-weight: 600; }
.benchmark-table tr:last-child td { border-bottom: 0; }
.benchmark-table td:last-child { font-weight: 600; }

/* CONTENT */
.content { padding: 1.5rem 0 2rem; }
.content h2 { font-size: 1.25rem; margin: 1.6rem 0 .5rem; }
.content p, .content li { color: var(--ink-2); }
.content ol, .content ul { padding-left: 1.25rem; }
.content li { margin-bottom: .35rem; }
.definition-card {
  background: var(--blue-light);
  border-left: 3px solid var(--blue);
  padding: .9rem 1rem;
  border-radius: 8px;
  font-size: .95rem;
  margin: 1rem 0;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .8rem 1rem;
  margin-bottom: .5rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-size: 1.1rem; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: .5rem 0 0; font-size: .92rem; }

/* FOOTER */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
  margin-top: 2rem;
  font-size: .82rem;
  color: var(--ink-3);
}
.site-footer p { margin: .25rem 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; margin-right: .5rem; }
.site-footer a:hover { text-decoration: underline; color: var(--blue); }

/* AD SLOTS */
.ad-slot {
  border: 1px dashed #CBD5E1;
  background: var(--bg);
  color: var(--ink-3);
  font-size: 0.78rem;
  text-align: center;
  padding: 16px;
  min-height: 250px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot.ad-inline {
  min-height: 90px;
  margin: 1.5rem 0 0;
}

/* MOBILE TIGHTENING */
@media (max-width: 720px) {
  h1 { font-size: 1.4rem; }
  .big-number { font-size: 1.7rem; }
  .seg-btn { font-size: .8rem; }
  .actions-row .btn-ghost { font-size: .8rem; }
  .out-card { min-height: 0; }
}

/* PRINT */
@media print {
  .actions-row, .advanced summary::after, .site-footer a { display: none; }
  body { background: #fff; }
  .card, .accordion, .benchmark-table { box-shadow: none; border: 1px solid #ccc; }
}
