/* =========================================================
   Check the Price — design system
   Editorial / forensic ledger. Warm paper, ink, one accent.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* surface */
  --paper:      #FBF9F4;
  --paper-2:    #F4F1E8;
  --paper-3:    #EDE9DE;
  --ink:        #14140F;
  --ink-2:      #45453C;
  --ink-3:      #6B6B60;
  --line:       #DED8CA;
  --line-2:     #EBE6DA;

  /* accent */
  --accent:     #0E4F3C;
  --accent-2:   #16715A;
  --accent-dim: #DCE8E2;
  --warn:       #A63D2F;
  --warn-dim:   #F4E3DE;

  /* type */
  --serif: "Instrument Serif", "Newsreader", "Iowan Old Style", Georgia,
           "Songti SC", "Noto Serif TC", "Nanum Myeongjo", "Noto Serif KR", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
           "PingFang SC", "Noto Sans TC", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* metrics */
  --rail: 1240px;
  --read: 720px;
  --r: 2px;
  --shadow-s: 0 1px 2px rgba(20,20,15,.04), 0 1px 12px rgba(20,20,15,.03);
  --shadow-m: 0 2px 6px rgba(20,20,15,.05), 0 18px 48px -24px rgba(20,20,15,.22);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

/* paper grain — very subtle, sells the "document" feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .028;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: #CFE3DA; color: var(--ink); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ---------------- layout ---------------- */
.wrap { width: min(var(--rail), calc(100% - 56px)); margin-inline: auto; }
.narrow { width: min(var(--read), calc(100% - 56px)); margin-inline: auto; }

@media (max-width: 640px) {
  .wrap, .narrow { width: calc(100% - 36px); }
}

section { position: relative; }

/* ---------------- typography ---------------- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -.015em; }

.display {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.05vw, 4.2rem);
  line-height: .98;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.display em, .h1 em, .h2 em { font-style: italic; }

.h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.022em;
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.h3 {
  font-family: var(--serif);
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: -.012em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow--accent { color: var(--accent); }
.eyebrow--light { color: rgba(251,249,244,.66); }

.lede {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 54ch;
}

.mono { font-family: var(--mono); font-size: .84em; letter-spacing: -.01em; }
.small { font-size: .86rem; color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }

.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.prose a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: .5px;
  transition: border-color .18s;
}
.prose a:hover { border-color: var(--accent); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.1em; }
.prose li { margin-bottom: .45em; }

/* ---------------- header ---------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251,249,244,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.site-head__in {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  align-self: center;
  flex: none;
}
.brand__sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  display: none;
}

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  font-size: 13.5px;
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
  transition: color .16s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .24s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.lang { display: flex; gap: 12px; align-items: center; padding-left: 22px; border-left: 1px solid var(--line); }
.lang a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-3);
  transition: color .16s;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { color: var(--ink); font-weight: 500; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 0;
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .lang { padding-left: 0; border-left: 0; order: 3; }
  .site-head__in { gap: 16px; }
  .site-head.is-open .nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 18px;
    margin: 0;
  }
  .site-head.is-open .nav a {
    padding: 13px 28px;
    font-size: 15px;
    border-bottom: 1px solid var(--line-2);
  }
  .site-head.is-open .nav a::after { display: none; }
}

/* ---------------- hero ---------------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%; left: 42%;
  width: 780px; height: 780px;
  background: radial-gradient(circle, rgba(22,113,90,.42) 0%, rgba(22,113,90,0) 66%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(251,249,244,.045) 0 1px, transparent 1px 25%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 78%);
}
.hero__in {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  padding: clamp(64px, 9vw, 116px) 0 clamp(56px, 8vw, 104px);
}
.hero .display { color: var(--paper); }
.hero .lede { color: rgba(251,249,244,.66); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(251,249,244,.16);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(251,249,244,.5);
}
.hero-meta b { color: rgba(251,249,244,.9); font-weight: 500; }

/* the "receipt" card */
.receipt {
  background: var(--paper);
  color: var(--ink);
  padding: 28px 26px 22px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.55);
  position: relative;
  border-radius: var(--r);
}
.receipt::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.receipt__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.receipt__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}
.receipt__row:last-of-type { border-bottom: 0; }
.receipt__label { font-size: 13px; color: var(--ink-3); }
.receipt__val { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.receipt__val--warn { color: var(--warn); }
.receipt__delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  background: var(--warn-dim);
  color: var(--warn);
  padding: 3px 7px;
  border-radius: 20px;
  font-weight: 500;
}
.receipt__foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.7;
}

@media (max-width: 920px) {
  .hero__in { grid-template-columns: 1fr; padding: 56px 0 64px; }
  .receipt { max-width: 420px; }
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 15px 26px;
  border-radius: var(--r);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn--sm { padding: 10px 16px; font-size: 10px; letter-spacing: .1em; }
.btn__arrow { transition: transform .2s; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------------- sections ---------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--paper2 { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .h2 { color: var(--paper); }
.section--ink .lede { color: rgba(251,249,244,.6); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 26px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.section-head__text { max-width: 62ch; }
.section-head .h2 { margin-top: 14px; }
.section-head__link {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: color .18s, border-color .18s;
}
.section-head__link:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 18px; }
}

/* ---------------- cards / grid ---------------- */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid > * { background: var(--paper); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  transition: background .2s;
}
.card:hover { background: var(--paper-2); }
.card__idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-3);
  margin-bottom: 26px;
}
.card__title {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.14;
  letter-spacing: -.014em;
  margin-bottom: 10px;
}
.card__desc { font-size: 14px; color: var(--ink-3); line-height: 1.58; margin: 0 0 22px; }
.card__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.card:hover .card__foot { color: var(--accent); }

/* ---------------- tables ---------------- */
.table-wrap {
  border: 1px solid var(--line);
  background: var(--paper);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 620px;
}
table.data thead th {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-3);
  text-align: left;
  padding: 14px 18px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}
table.data thead th:hover { color: var(--ink); }
table.data thead th::after {
  content: "↕";
  opacity: .3;
  margin-left: 6px;
  font-size: 9px;
}
table.data thead th.no-sort::after { content: ""; }
table.data thead th.no-sort { cursor: default; }
table.data td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
  color: var(--ink-2);
}
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: var(--paper-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: nowrap; }
table.data .name { font-weight: 500; color: var(--ink); }
table.data .up { color: var(--warn); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
table.data .flat { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; }
table.data .unverified { color: var(--ink-3); font-style: italic; font-size: 12.5px; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
}
.pill--warn { background: var(--warn-dim); color: var(--warn); }
.pill--mute { background: var(--paper-3); color: var(--ink-3); }

/* ---------------- verification bar ---------------- */
.verify-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.verify-bar b { color: var(--ink); font-weight: 500; }
.verify-bar .sep { color: var(--line); }

/* ---------------- article ---------------- */
.article-head { padding: clamp(44px, 6vw, 76px) 0 30px; }
.article-head .h1 { margin: 18px 0 20px; max-width: 20ch; }
.article-head .lede { max-width: 60ch; }
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.byline b { color: var(--ink); font-weight: 500; }
.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  flex: none;
}

.keyfind {
  background: var(--paper-2);
  border-left: 2px solid var(--accent);
  padding: 26px 28px;
  margin: 36px 0;
}
.keyfind__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.keyfind p {
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.42;
  margin: 0;
  letter-spacing: -.01em;
}

.sources {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.sources ol {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
  counter-reset: src;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.7;
}
.sources li {
  counter-increment: src;
  padding-left: 26px;
  position: relative;
  margin-bottom: 9px;
}
.sources li::before {
  content: "[" counter(src) "]";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}
.sources a { border-bottom: 1px solid var(--line); }
.sources a:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------------- stat row ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 26px 22px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__num {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: 8px;
}
.stat__num em { font-style: italic; color: var(--accent); }
.stat__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.6;
}
@media (max-width: 780px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------------- diagram ---------------- */
.chartbox {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 22px 22px 14px;
}
.chartbox__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 16px;
}
.chartbox svg { width: 100%; height: auto; overflow: visible; }
.chart-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 16px; height: 3px; display: inline-block; }

/* ---------------- calculator ---------------- */
.calc {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  border: 1px solid var(--line);
  background: var(--paper);
}
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

.calc__form { padding: clamp(26px, 3.4vw, 40px); border-right: 1px solid var(--line); }
@media (max-width: 860px) { .calc__form { border-right: 0; border-bottom: 1px solid var(--line); } }

.field { margin-bottom: 22px; }
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 9px;
}
.field label b { color: var(--ink); font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 12px; }
.field input, .field select {
  width: 100%;
  font-family: var(--mono);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,79,60,.1);
}

.calc__out {
  padding: clamp(26px, 3.4vw, 40px);
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
}
.calc__big {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -.03em;
  margin: 8px 0 4px;
}
.calc__big em { font-style: italic; color: #7FC7AC; }
.calc__sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(251,249,244,.58);
}
.calc__lines { margin-top: 26px; border-top: 1px solid rgba(251,249,244,.16); }
.calc__line {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid rgba(251,249,244,.1);
  font-size: 13px;
  color: rgba(251,249,244,.70);
}
.calc__line b { font-family: var(--mono); color: var(--paper); font-weight: 500; font-size: 13.5px; }
.calc__note {
  margin-top: auto;
  padding-top: 22px;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(251,249,244,.55);
}

/* ---------------- CTA strip ---------------- */
.cta-strip {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(44px, 6vw, 74px) 0;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  right: -10%; top: -60%;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(22,113,90,.35), transparent 68%);
}
.cta-strip__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
}
.cta-strip .h2 { max-width: 24ch; }

/* ---------------- footer ---------------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 56px 0 34px;
  background: var(--paper-2);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col h4 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
  font-weight: 500;
}
.foot-col a, .foot-col span { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------------- misc ---------------- */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* email block on the contact page */
.mail-link {
  display: block;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(28px, 4vw, 48px) 0;
  transition: background .22s, padding-left .22s;
}
.mail-link:hover { background: var(--paper-2); padding-left: 12px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-3);
  border-radius: 20px;
}

.note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
  border-left: 1px solid var(--line);
  padding-left: 16px;
  margin: 28px 0;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- CJK adjustments ---------- */
/* No CJK webfont is loaded on purpose: system CJK faces are excellent on
   iOS/macOS/Android/Windows and a Noto KR/TC download costs ~1 MB per page,
   which alone would sink a Core Web Vitals score. These stacks pick the best
   serif available on each platform and degrade gracefully. */
/* Display sizes differ by script on purpose: German compounds need to fit a
   ~580px column, and CJK glyphs fill the em box, so an equal px value would
   read as very different masses. These are tuned to look like one design. */
:lang(de) .display { font-size: clamp(1.65rem, 4.3vw, 3.6rem); line-height: 1.04; }
:lang(ko) .display { font-size: clamp(1.7rem, 4.65vw, 3.9rem); }
:lang(zh-HK) .display { font-size: clamp(1.65rem, 4.55vw, 3.8rem); }

:lang(ko) .display, :lang(ko) .h1, :lang(ko) .h2, :lang(ko) .h3,
:lang(ko) .card__title, :lang(ko) .affbox__title {
  font-family: "AppleMyungjo", "Nanum Myeongjo", "Batang", "Noto Serif KR", serif;
  letter-spacing: 0;
  line-height: 1.18;
}
:lang(zh-HK) .display, :lang(zh-HK) .h1, :lang(zh-HK) .h2, :lang(zh-HK) .h3,
:lang(zh-HK) .card__title, :lang(zh-HK) .affbox__title,
:lang(zh-TW) .display, :lang(zh-TW) .h1, :lang(zh-TW) .h2, :lang(zh-TW) .h3 {
  font-family: "Songti TC", "Songti SC", "Noto Serif TC", "PMingLiU", serif;
  letter-spacing: 0;
  line-height: 1.22;
}
:lang(ko) .display, :lang(zh-HK) .display, :lang(zh-TW) .display { line-height: 1.14; }
:lang(ko) body, :lang(zh-HK) body { line-height: 1.78; }

/* ---------- affiliate callout ---------- */
.affbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 26px 28px;
}
.affbox__body { min-width: 0; flex: 1 1 340px; }
.affbox__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 9px;
}
.affbox__title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0 0 7px;
  color: var(--ink);
}
.affbox__note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
}
.affbox__note a { border-bottom: 1px solid var(--line); }
.affbox .btn { flex: 0 0 auto; }

/* the in-calculator variant sits on the dark panel */
.calc__out .affbox {
  background: rgba(251,249,244,.06);
  border-color: rgba(251,249,244,.18);
  border-left-color: #7FC7AC;
  margin-top: 22px;
  padding: 18px 20px;
}
.calc__out .affbox__label { color: #7FC7AC; }
.calc__out .affbox__title { color: var(--paper); font-size: 1.12rem; }
.calc__out .affbox__note { color: rgba(251,249,244,.62); }
.calc__out .affbox .btn {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.calc__out .affbox .btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

/* ---------- small-screen hardening ---------- */
@media (max-width: 420px) {
  .h1 { font-size: clamp(1.65rem, 7vw, 2.3rem); }
  .hero__in { padding: 44px 0 52px; }
  .receipt { padding: 22px 20px 18px; }
  .affbox { padding: 20px 18px; gap: 18px; }
  .affbox .btn { width: 100%; justify-content: center; }
  .stat { padding: 20px 16px 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  table.data { min-width: 540px; font-size: 13px; }
  table.data td, table.data thead th { padding: 12px 13px; }
}

/* long unbreakable strings (email address, URLs) must never widen the page */
.mail-link div, .prose a, .affbox__note, .sources li { overflow-wrap: anywhere; }

/* iOS Safari: keep tappable rows comfortable and kill the grey flash */
a, button, input, select { -webkit-tap-highlight-color: rgba(14,79,60,.08); }
@media (hover: none) {
  .card:hover { background: var(--paper); }
  table.data tbody tr:hover { background: transparent; }
}

/* ---------- language notice ----------
   Shown only when the visitor's browser language does not match the page they
   landed on. It is a fixed bar, not a modal: nothing is covered, nothing is
   blocked, and it adds zero layout shift because it sits outside the flow.
   Dismissal is remembered per language, so it never nags twice. */
.langbar {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(430px, calc(100vw - 32px));
  padding: 11px 10px 11px 16px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 8px 28px rgba(20, 20, 15, .14);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  animation: langbar-in .26s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes langbar-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.langbar__text { flex: 1 1 auto; }
.langbar__go {
  flex: 0 0 auto;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  white-space: nowrap;
}
.langbar__go:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.langbar__x {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.langbar__x:hover { color: var(--ink); border-color: var(--ink-3); }

@media (max-width: 520px) {
  .langbar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
    gap: 10px;
    padding: 10px 8px 10px 13px;
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .langbar { animation: none; }
}

@media print {
  .langbar { display: none; }
}
