/* ============================================================
   Pay Rules — editorial design system
   Rules: light only. No gradients, no shadows, no emoji icons,
   no stock imagery. Tables are the hero element.
   ============================================================ */

:root {
  --paper:      #FAF7F2;
  --paper-deep: #F3EEE5;
  --ink:        #1C1813;
  --ink-soft:   #5A5245;
  --accent:     #1E5941;
  --accent-ink: #14402E;
  --rule:       #DED7CB;
  --rule-dark:  #C9C0AF;
  --warn-bg:    #F7ECD8;
  --warn-ink:   #7A5A18;
  --banned:     #8C2F1B;

  --serif-display: "Newsreader", Georgia, serif;
  --serif-body:    "Source Serif 4", Georgia, serif;
  --grotesk:       "Archivo", Arial, sans-serif;

  --measure: 42rem;
  --wide:    64rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 1.0625rem;              /* 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container       { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.container-wide  { max-width: var(--wide);    margin: 0 auto; padding: 0 1.25rem; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 3px double var(--rule-dark);
  padding: 1.1rem 0 0.9rem;
}
.masthead-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.wordmark {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.masthead nav {
  font-family: var(--grotesk);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.masthead nav a { color: var(--ink-soft); text-decoration: none; }
.masthead nav a:hover,
.masthead nav a[aria-current="page"] { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- article header ---------- */

.article-head { padding: 3rem 0 1.5rem; }
.kicker {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 0.9rem;
}
.standfirst {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36rem;
}
.byline {
  font-family: var(--grotesk);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
}
.byline a { color: inherit; }

/* ---------- verdict box ---------- */

.verdict {
  border: 2px solid var(--accent);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  background: #fff;
}
.verdict-label {
  font-family: var(--grotesk);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.verdict p { margin: 0; font-size: 1.05rem; }
.verdict p + p { margin-top: 0.6rem; }

/* ---------- body copy ---------- */

article h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 2.6rem 0 0.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
article h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.12rem;
  margin: 1.8rem 0 0.6rem;
}
article p  { margin-bottom: 1rem; }
article ul, article ol { margin: 0 0 1rem 1.3rem; }
article li { margin-bottom: 0.45rem; }
article a  { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
article a:hover { color: var(--ink); }
strong { font-weight: 600; }

/* ---------- verified chip ---------- */

.verified {
  display: inline-block;
  font-family: var(--grotesk);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--accent-ink);
  background: var(--paper-deep);
  border: 1px solid var(--rule-dark);
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--rule-dark); background: #fff; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  line-height: 1.45;
}
caption {
  text-align: left;
  font-family: var(--grotesk);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 0.7rem 0.9rem 0.4rem;
}
th {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border-bottom: 2px solid var(--rule-dark);
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
}
td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
td.banned  { color: var(--banned); font-weight: 600; white-space: nowrap; }
td.allowed { color: var(--accent-ink); font-weight: 600; white-space: nowrap; }
td .src { font-size: 0.8rem; font-family: var(--grotesk); }

/* ---------- notes & warnings ---------- */

.note {
  border-left: 3px solid var(--accent);
  background: #fff;
  padding: 0.9rem 1.1rem;
  margin: 1.4rem 0;
  font-size: 0.97rem;
}
.warn {
  border-left: 3px solid var(--warn-ink);
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 0.9rem 1.1rem;
  margin: 1.4rem 0;
  font-size: 0.97rem;
}

/* ---------- changelog ---------- */

.changelog {
  margin: 3rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 3px double var(--rule-dark);
  font-family: var(--grotesk);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.changelog h2 {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  padding: 0;
  margin: 0 0 0.5rem;
}
.changelog ul { list-style: none; margin: 0; }
.changelog li { margin-bottom: 0.3rem; }
.changelog time { color: var(--ink); font-weight: 600; }

/* ---------- front page (broadsheet) ---------- */

.front-tagline {
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--grotesk);
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding: 0.55rem 0;
}
.front-tagline p { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.front-tagline a { color: var(--accent-ink); }

.front { padding-top: 2.2rem; }

.front-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0 2.5rem;
}

.lead { padding-right: 2.5rem; border-right: 1px solid var(--rule-dark); }

.lead-headline {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0.2rem 0 1rem;
}
.lead-headline a { color: var(--ink); text-decoration: none; }
.lead-headline a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; }

.lead-standfirst {
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 1.4rem;
}

.lead-table { border: 1px solid var(--rule-dark); background: #fff; max-width: 26rem; }
.lead-table table { width: 100%; }
.lead-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  border-top: 2px solid var(--rule-dark);
  font-size: 0.85rem;
}
.lead-more { font-family: var(--grotesk); font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.lead-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.rail-title {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 0.2rem;
}
.rail-item { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.rail-item:last-child { border-bottom: none; }
.rail-kicker {
  font-family: var(--grotesk);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.rail-item h3, .section-card h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}
.rail-item h3 a, .section-card h3 a { color: var(--ink); text-decoration: none; }
.rail-item h3 a:hover, .section-card h3 a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.rail-item p:not(.rail-kicker), .section-card p:not(.rail-kicker) {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.tool-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 3px double var(--rule-dark);
  border-bottom: 3px double var(--rule-dark);
  margin: 2.6rem 0;
  padding: 1.4rem 0;
}
.tool-band h2 { font-family: var(--serif-display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; margin: 0.15rem 0 0.35rem; }
.tool-band h2 a { color: var(--ink); text-decoration: none; }
.tool-band h2 a:hover { color: var(--accent-ink); }
.tool-band p:not(.kicker) { color: var(--ink-soft); font-size: 0.97rem; margin: 0; }
.btn-cta {
  font-family: var(--grotesk);
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  background: var(--accent);
  padding: 0.7rem 1.3rem;
  text-decoration: none;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--accent-ink); }

.section-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-bottom: 1rem;
}
.section-card { border-top: 2px solid var(--ink); padding-top: 0.8rem; }

@media (max-width: 52rem) {
  .front-grid { grid-template-columns: 1fr; }
  .lead { padding-right: 0; border-right: none; border-bottom: 1px solid var(--rule-dark); padding-bottom: 1.8rem; margin-bottom: 0.6rem; }
  .section-row { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* ---------- calculator ---------- */

.calc {
  background: #fff;
  border: 1px solid var(--rule-dark);
  padding: 1.5rem;
  margin: 1.6rem 0;
}
.calc fieldset { border: none; margin-bottom: 1.2rem; }
.calc legend {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.calc label {
  display: block;
  font-family: var(--grotesk);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.8rem 0 0.3rem;
}
.calc input[type="number"], .calc select {
  width: 100%;
  max-width: 16rem;
  font-family: var(--grotesk);
  font-size: 1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
}
.calc input:focus, .calc select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc .hint { font-family: var(--grotesk); font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.25rem; }

.calc-results { border-top: 2px solid var(--ink); margin-top: 1.4rem; padding-top: 1rem; }
.calc-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.97rem;
}
.calc-row .amt { font-family: var(--grotesk); font-weight: 600; white-space: nowrap; }
.calc-row.total {
  border-bottom: none;
  border-top: 2px solid var(--ink);
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.calc-row.total .amt { color: var(--accent-ink); font-size: 1.3rem; }
.calc-row.deduct .amt { color: var(--banned); }

/* ---------- footer ---------- */

.footer {
  margin-top: 4.5rem;
  border-top: 3px double var(--rule-dark);
  padding: 1.8rem 0 2.6rem;
  font-family: var(--grotesk);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.footer .container-wide p { margin-bottom: 0.5rem; max-width: 46rem; }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--accent-ink); }

/* ---------- answers page ---------- */

.qa-list { list-style: none; margin: 0.4rem 0 1.6rem; }
.qa-list li { border-bottom: 1px solid var(--rule); }
.qa-list li:first-child { border-top: 1px solid var(--rule); }
.qa-list a {
  display: block;
  padding: 0.7rem 0.2rem;
  font-family: var(--serif-body);
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}
.qa-list a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; background: #fff; }

/* ---------- related questions block ---------- */

.related {
  margin: 2.6rem 0 0;
  border-top: 2px solid var(--ink);
  padding-top: 0.9rem;
}
.related h2 {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: none;
  padding: 0;
  margin: 0 0 0.5rem;
}
.related ul { list-style: none; margin: 0; }
.related li { border-bottom: 1px solid var(--rule); }
.related a {
  display: block;
  padding: 0.55rem 0.2rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
}
.related a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- front page: common problems strip ---------- */

.problems-strip { margin: 0 0 2.4rem; }
.problems-title {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}
.problems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  list-style: none;
  margin: 0;
}
.problems-grid li { border-bottom: 1px solid var(--rule); }
.problems-grid a {
  display: block;
  padding: 0.65rem 0.2rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
}
.problems-grid a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; background: #fff; }
.problems-all { font-family: var(--grotesk); font-size: 0.8rem; padding-top: 0.7rem; }
.problems-all a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.problems-all a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 40rem) {
  .problems-grid { grid-template-columns: 1fr; }
}

/* ---------- utilities ---------- */

.small { font-size: 0.85rem; color: var(--ink-soft); }
hr { border: none; border-top: 1px solid var(--rule); margin: 2rem 0; }

@media (max-width: 40rem) {
  .article-head { padding-top: 2rem; }
  .calc { padding: 1.1rem; }
}
