:root {
  --page: #f7f7f7;
  --card: #ffffff;
  --ink: #242424;
  --muted: #68625d;
  --brown: #cd7b36;
  --brown-dark: #ae591c;
  --line: #e4e2df;
  --soft: #f1f1f1;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Plus Jakarta Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: min(var(--content), calc(100% - 2rem));
  margin-inline: auto;
}

/* No-JS header fallback (the shared header script replaces it) */
.site-header {
  position: relative;
  z-index: 20;
  background: rgba(247, 247, 247, 0.96);
}

.site-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: auto;
  display: block;
}

.brand-name {
  font-family: "Signika", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-nav a {
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.header-actions,
.sources-hero-actions,
.sources-final-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.button {
  min-height: 42px;
  padding: 0.72rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--brown);
  background: var(--brown);
  transform: translateY(-2px);
}

.button.is-brown {
  border-color: var(--brown);
  background: var(--brown);
}

.button.is-brown:hover,
.button.is-brown:focus-visible {
  border-color: var(--brown-dark);
  background: var(--brown-dark);
}

.button.is-light {
  color: var(--ink);
  border-color: #d7d4d1;
  background: #ffffff;
}

.button.is-light:hover,
.button.is-light:focus-visible {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.button.is-outline {
  color: #ffffff;
  border-color: #6b6661;
  background: transparent;
}

.button.is-outline:hover,
.button.is-outline:focus-visible {
  border-color: #ffffff;
  background: transparent;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--brown);
  font-family: "Signika", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.sources-hero {
  overflow: hidden;
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(4.25rem, 7vw, 6.25rem);
}

.sources-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.sources-hero h1 {
  max-width: 680px;
  margin: 0;
  font-family: "Signika", sans-serif;
  font-size: clamp(4rem, 6.8vw, 6.3rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.86;
  text-wrap: balance;
}

.sources-hero h1 span,
.sources-section-heading h2 span {
  color: var(--brown);
}

.sources-hero h1 span {
  display: block;
}

.sources-hero-description {
  max-width: 560px;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.sources-hero-note {
  margin: 1.2rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.sources-hero-note img {
  width: 18px;
  height: 18px;
}

.sources-hero-actions {
  margin-top: 1.8rem;
}

.sources-own {
  width: min(100%, 440px);
  margin-left: auto;
}

/* ---------- Section headings ---------- */

.sources-fair,
.sources-list,
.sources-math {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

.sources-section-heading {
  max-width: 820px;
  margin: 0 0 clamp(2.2rem, 4.5vw, 3.2rem);
}

.sources-section-heading h2,
.sources-method h2,
.sources-final h2 {
  margin: 0;
  font-family: "Signika", sans-serif;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

.sources-section-heading h2 {
  font-size: clamp(2.8rem, 5.2vw, 4.6rem);
}

.sources-section-heading > p:last-child:not(.eyebrow) {
  max-width: 660px;
  margin: 1.2rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Fairness notes ---------- */

.sources-fair {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.sources-fair-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.6vw, 2.2rem);
}

.sources-fair-grid article {
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.sources-fair-grid h3 {
  margin: 0 0 0.55rem;
  font-family: "Signika", sans-serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

.sources-fair-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.sources-fair-grid p a {
  color: var(--brown-dark);
  font-weight: 700;
}

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

.sources-jump {
  margin: 0 0 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sources-jump a {
  min-height: 36px;
  padding: 0.5rem 0.9rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.sources-jump a:hover,
.sources-jump a:focus-visible {
  border-color: var(--brown);
  color: var(--brown-dark);
}

.sources-group {
  scroll-margin-top: 1.5rem;
}

.sources-group + .sources-group {
  margin-top: clamp(2.2rem, 4vw, 3rem);
}

.sources-group-title {
  margin: 0 0 0.9rem;
  font-family: "Signika", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.sources-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.sources-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.sources-table th,
.sources-table td {
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.sources-table tbody tr:last-child th,
.sources-table tbody tr:last-child td {
  border-bottom: 0;
}

.sources-table thead th {
  padding-block: 0.85rem;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sources-table thead th:nth-child(1) { width: 3.6rem; }
.sources-table thead th:nth-child(2) { width: 16%; }
.sources-table thead th:nth-child(3) { width: 15%; }
.sources-table thead th:nth-child(4) { width: 11%; }
.sources-table thead th:nth-child(6) { width: 17%; }
.sources-table thead th:nth-child(7) { width: 7.4rem; }

.sources-table tbody tr {
  scroll-margin-top: 1.5rem;
}

.sources-table tbody tr:target th,
.sources-table tbody tr:target td {
  background: var(--soft);
}

.sources-table tbody tr:target .sources-num {
  color: #ffffff;
  background: var(--brown);
}

.sources-table tbody th strong {
  display: block;
  font-family: "Signika", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.sources-table tbody th span {
  margin-top: 0.15rem;
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.sources-table td {
  color: var(--muted);
}

.sources-table .sources-price {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.sources-num {
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--brown);
  border-radius: 50%;
  color: var(--brown-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.sources-links a,
.sources-plans a,
.sources-method a {
  color: var(--brown-dark);
  font-weight: 700;
  overflow-wrap: break-word;
}

.sources-sr {
  width: 1px;
  height: 1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sources-plans {
  margin: 0.7rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  list-style: none;
}

.sources-plans li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.1rem 0.8rem;
}

.sources-plans li b {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.sources-plans li a {
  grid-column: 1 / -1;
  font-size: 0.74rem;
}

/* ---------- Math ---------- */

.sources-math {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.sources-math-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.sources-math-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-variant-numeric: tabular-nums;
}

.sources-math-list li {
  padding: 0.95rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.4rem 1.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.5;
}

.sources-math-list span {
  color: var(--muted);
}

.sources-math-list b {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

/* ---------- Method ---------- */

.sources-method {
  padding: clamp(3.5rem, 6vw, 5rem) 0;
}

.sources-method-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.sources-method h2 {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
}

.sources-method-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.sources-method-copy p + p {
  margin-top: 0.9rem;
}

/* ---------- Final ---------- */

.sources-final {
  padding: 0 0 clamp(4rem, 8vw, 7rem);
}

.sources-final-card {
  min-height: 320px;
  padding: clamp(2.5rem, 6vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
}

.sources-final h2 {
  max-width: 760px;
  font-size: clamp(3rem, 5.6vw, 5.2rem);
}

.sources-final-card p:not(.eyebrow) {
  max-width: 620px;
  margin: 1rem 0 0;
  color: #c9c5c1;
  font-size: 0.82rem;
  line-height: 1.7;
}

.sources-final-actions {
  flex: 0 0 auto;
}

/* No-JS footer fallback (the shared header script replaces it) */
.site-footer {
  padding: 2.2rem 0 1.3rem;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-note {
  margin-top: 1.3rem;
  margin-bottom: 0;
  color: #8a837d;
  font-size: 0.62rem;
}

@media (max-width: 1100px) {
  .sources-fair-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .sources-hero-grid,
  .sources-math-grid,
  .sources-method-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .sources-own {
    margin: 0 auto;
  }

  /* Rows become cards: the number, then each field with its label */
  .sources-table,
  .sources-table tbody,
  .sources-table tr,
  .sources-table th,
  .sources-table td {
    display: block;
  }

  .sources-table thead {
    display: none;
  }

  .sources-table tbody tr {
    padding: 1.1rem 1.1rem 1.2rem 3.7rem;
    position: relative;
    border-bottom: 1px solid var(--line);
  }

  .sources-table tbody tr:last-child {
    border-bottom: 0;
  }

  .sources-table th,
  .sources-table td,
  .sources-table tbody tr:last-child th,
  .sources-table tbody tr:last-child td {
    padding: 0;
    border-bottom: 0;
  }

  .sources-table tbody tr:target {
    background: var(--soft);
  }

  .sources-table td + td,
  .sources-table th + td {
    margin-top: 0.55rem;
  }

  .sources-table .sources-num-cell {
    position: absolute;
    top: 1.05rem;
    left: 1.1rem;
  }

  .sources-table td[data-label]::before {
    content: attr(data-label);
    margin-bottom: 0.1rem;
    display: block;
    color: #8a837d;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .sources-table .sources-price {
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(var(--content), calc(100% - 1.25rem));
  }

  .brand-name,
  .header-actions .is-light {
    display: none;
  }

  .sources-hero {
    padding-top: 3.5rem;
  }

  .sources-hero h1 {
    font-size: clamp(3.3rem, 15vw, 5rem);
  }

  .sources-hero-actions,
  .sources-final-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sources-fair-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sources-math-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .sources-math-list b {
    text-align: left;
    white-space: normal;
  }

  .sources-final-card,
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .sources-final-actions {
    width: 100%;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
