/* Keeprate — design system
   No web fonts, no third-party CSS. Everything ships in one file. */

:root {
  --ink: #111315;
  --ink-2: #4b5359;
  --ink-3: #5f676e;
  --line: #e4e2dd;
  --line-strong: #d3d0c9;
  --bg: #fbfaf8;
  --card: #ffffff;
  --accent: #0d6f5f;
  --accent-dark: #0a5a4d;
  --accent-wash: #eef5f3;
  --pos: #0d6f5f;
  --neg: #a32a1d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 19, 21, 0.04), 0 8px 24px -12px rgba(17, 19, 21, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(13, 111, 95, 0.28); }
a:hover { border-bottom-color: var(--accent); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { margin: 2.4em 0 0.6em; }
.prose h3 { margin: 1.9em 0 0.45em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 248, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
}

.wordmark {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  border-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wordmark .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  font-size: 14.5px;
  color: var(--ink-2);
  border-bottom: 0;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- typography ---------- */

h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.021em; line-height: 1.16; font-weight: 680; }
h1 { font-size: clamp(30px, 4.6vw, 46px); margin: 0 0 18px; }
h2 { font-size: clamp(23px, 2.6vw, 29px); }
h3 { font-size: 19px; }
h4 { font-size: 17px; }

.eyebrow {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 30px;
}

.small { font-size: 14px; color: var(--ink-3); }
.muted { color: var(--ink-2); }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #f1efea;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink);
}

/* ---------- layout blocks ---------- */

.section { padding: 56px 0; }
.section-tight { padding: 34px 0; }
.section + .section { border-top: 1px solid var(--line); }

.hero { padding: 44px 0 0; }

/* A faint dot grid behind the opening paragraph. It gives the top of the page
   some texture without competing with the numbers, and because it lives on a
   pseudo-element the mask fades the pattern only, never the text. */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(17, 19, 21, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(#000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(#000 0%, #000 55%, transparent 100%);
}

/* A small sparkle in front of the eyebrow. It is generated content, so the
   language layer can replace the text inside .eyebrow without touching it. */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  vertical-align: -1px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 1c.7 5.4 2.6 7.3 8 8-5.4.7-7.3 2.6-8 8-.7-5.4-2.6-7.3-8-8 5.4-.7 7.3-2.6 8-8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 1c.7 5.4 2.6 7.3 8 8-5.4.7-7.3 2.6-8 8-.7-5.4-2.6-7.3-8-8 5.4-.7 7.3-2.6 8-8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Spot illustration: parcel, discount tag, receipt and shopping bag.
   It sits in reserved padding on the right instead of floating over the
   heading, so a long translated headline can never collide with it. Below
   the breakpoint the padding disappears and the art goes with it. */
@media (min-width: 1024px) {
  .hero > .wrap {
    position: relative;
    padding-right: 316px;
    /* Reserved space so the spot illustration can never spill out of the hero
       and sit on top of the calculator card, whatever the headline length. */
    min-height: 300px;
  }
  .hero > .wrap::after {
    content: "";
    position: absolute;
    top: -8px;
    right: 0;
    width: 292px;
    height: 268px;
    background: url("/assets/img/hero-art.svg") right top / contain no-repeat;
    pointer-events: none;
    animation: hero-float 9s ease-in-out infinite alternate;
  }
}

@keyframes hero-float {
  from { transform: translateY(0); }
  to { transform: translateY(-7px); }
}

/* ---------- calculator ---------- */

.calc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
}

.calc-inputs {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
  background: #fdfdfc;
}

.calc-results { padding: 26px 24px; min-width: 0; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.field .hint {
  display: block;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 5px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

input[type="number"], input[type="text"], select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237b838a' stroke-width='1.6' d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 111, 95, 0.14);
}

.input-affix {
  position: relative;
}
.input-affix .prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 16.5px;
  pointer-events: none;
}
.input-affix input { padding-left: 28px; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* market comparison */

.market-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.market-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 16px 14px;
  background: #fff;
}

.market-card.is-best {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.market-card .m-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.market-card .m-name {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.badge {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

.m-big {
  font-size: 36px;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.m-big.neg { color: var(--neg); }
.m-sub {
  font-size: 13.5px;
  color: var(--ink-3);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* breakdown table */

.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.breakdown th, .breakdown td {
  text-align: right;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.breakdown th {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 8px;
}
.breakdown th:first-child, .breakdown td:first-child { text-align: left; color: var(--ink-2); }
.breakdown tr.total td {
  border-bottom: 0;
  border-top: 2px solid var(--ink);
  font-weight: 680;
  color: var(--ink);
  padding-top: 9px;
}
.breakdown td.neg { color: var(--neg); }

.calc-foot {
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  background: #fcfcfb;
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}
.calc-foot a { border-bottom: 0; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- charts ---------- */

/* Unit economics. One row per marketplace and every row is exactly 100% of
   that marketplace's own list price, so the VAT slice on the German row shows
   up as space taken from everything else rather than as extra length. */
.ue { margin: 2px 0 12px; }

.ue-cap {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 9px;
}

.ue-row {
  display: grid;
  grid-template-columns: 88px 1fr 68px;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ue-name { font-size: 12.5px; font-weight: 620; color: var(--ink-2); }

.ue-track {
  display: flex;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  background: #f1efea;
  box-shadow: inset 0 0 0 1px rgba(17, 19, 21, 0.07);
}
.ue-track span { display: block; height: 100%; min-width: 2px; }
.ue-track .s-tax { background: #e3ddd1; }
.ue-track .s-referral { background: #0d6f5f; }
.ue-track .s-fba { background: #7fa8a0; }
.ue-track .s-cost { background: #8a8378; }
.ue-track .s-returns { background: #bfa06b; }
.ue-track .s-profit { background: #111315; }

.ue-out {
  font-size: 13px;
  text-align: right;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Negative profit means the costs overrun the list price. The bar saturates at
   100% and the figure turns red — there is no honest width left to draw. */
.ue-row.is-underwater .ue-track {
  box-shadow: inset 0 0 0 1px var(--neg), inset -4px 0 0 var(--neg);
}
.ue-row.is-underwater .ue-out { color: var(--neg); font-weight: 650; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 20px;
}
.legend i {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: baseline;
}
.legend .k-tax { background: #e3ddd1; }
.legend .k-referral { background: #0d6f5f; }
.legend .k-fba { background: #7fa8a0; }
.legend .k-cost { background: #8a8378; }
.legend .k-returns { background: #bfa06b; }
.legend .k-profit { background: #111315; }

/* Static illustrations sit in a bordered panel so they read as evidence
   rather than decoration. */

.chart {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 18px 20px 14px;
  margin: 26px 0;
}
.chart figcaption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.chart svg { width: 100%; height: auto; overflow: visible; }

.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-axis { stroke: var(--line-strong); stroke-width: 1.2; }
.ch-band { fill: #f6f4ef; }
.ch-cliff { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-us { stroke: var(--accent); stroke-width: 2.4; fill: none; }
.ch-de { stroke: #8a8378; stroke-width: 2.4; fill: none; }
.ch-dot-us { fill: var(--accent); }
.ch-dot-de { fill: #8a8378; }
.ch-tick { font-size: 11.5px; fill: var(--ink-3); }
.ch-note { font-size: 12px; fill: var(--ink); font-weight: 650; }

.ch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 8px;
}
.ch-legend i {
  display: inline-block;
  width: 16px; height: 3px;
  border-radius: 2px;
  margin-right: 7px;
  vertical-align: middle;
}
.ch-legend i.sw { width: 11px; height: 11px; border-radius: 2px; }
.ch-legend .k-us { background: var(--accent); }
.ch-legend .k-de { background: #8a8378; }
.ch-legend .k-ref { background: #0d6f5f; }
.ch-legend .k-kept { background: #cfdcd8; }
.ch-legend .k-tax { background: #e3ddd1; }

/* VAT split: identical total length in every row, so only the proportions
   move. That is the whole point of the chart. */
.vs-row {
  display: grid;
  grid-template-columns: 108px 1fr 62px;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.vs-name { font-size: 13px; color: var(--ink-2); }
.vs-track {
  display: flex;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  background: #f1efea;
  box-shadow: inset 0 0 0 1px rgba(17, 19, 21, 0.07);
}
.vs-track span { display: block; height: 100%; min-width: 2px; }
.vs-track .s-ref { background: #0d6f5f; }
.vs-track .s-kept { background: #cfdcd8; }
.vs-track .s-tax { background: #e3ddd1; }
.vs-val {
  font-size: 13px;
  text-align: right;
  font-weight: 620;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- related tools ---------- */

.related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.tile {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  background: #fff;
  border-bottom-width: 1px;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .t-kicker {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}

/* One line icon per destination, chosen by href. Keeping it in CSS means the
   markup stays a plain link and the seven pages do not each carry their own
   copy of the glyph. --tile-icon is set on the anchor, so the pseudo-element
   inside picks it up; the fallback covers any tile added later. */
.tile { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h7.5l10 10-7.5 7.5-10-10z'/%3E%3Ccircle cx='7' cy='7' r='1.3'/%3E%3C/svg%3E"); }

.tile .t-kicker { display: flex; align-items: center; gap: 7px; }
.tile .t-kicker::before {
  content: "";
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  background-color: var(--accent);
  -webkit-mask: var(--tile-icon) center / contain no-repeat;
  mask: var(--tile-icon) center / contain no-repeat;
}

a.tile[href="/"] { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2.5' width='16' height='19' rx='3'/%3E%3Cpath d='M8 7.5h8'/%3E%3Cpath d='M8 12.5h.01M12 12.5h.01M16 12.5h.01M8 17h.01M12 17h.01M16 17h.01'/%3E%3C/svg%3E"); }

a.tile[href="/referral-fees.html"] { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='15' rx='2.5'/%3E%3Cpath d='M3 10h18M9.5 10v9.5'/%3E%3C/svg%3E"); }

a.tile[href="/eu-vat-rates.html"] { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='7.5' r='2.4'/%3E%3Ccircle cx='16.5' cy='16.5' r='2.4'/%3E%3Cpath d='M18.5 5.5 5.5 18.5'/%3E%3C/svg%3E"); }

a.tile[href="/breakeven-price.html"] { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5 8.5 4H18a2 2 0 0 1 2 2v9.5L15.5 20H6a2 2 0 0 1-2-2z'/%3E%3Ccircle cx='8' cy='8' r='1.3'/%3E%3Cpath d='M14 15l-4-4'/%3E%3C/svg%3E"); }

a.tile[href="/methodology.html"] { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2.5'/%3E%3Cpath d='M9 4.5V3h6v1.5'/%3E%3Cpath d='M9 11h6M9 15h4'/%3E%3C/svg%3E"); }

a.tile[href="/why-your-margin-differs.html"] { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5V4M4 19.5h16'/%3E%3Cpath d='M8 15l3.5-4.5 3 3L19 7'/%3E%3C/svg%3E"); }

a.tile[href="/about.html"] { --tile-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.4'/%3E%3Cpath d='M5 20c0-3.6 3.1-5.8 7-5.8s7 2.2 7 5.8'/%3E%3C/svg%3E"); }
.tile .t-title { font-size: 16.5px; font-weight: 620; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; }
.tile .t-desc { font-size: 14px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }

/* ---------- data table ---------- */

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.data-table-wrap::-webkit-scrollbar { height: 8px; }
.data-table-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.data-table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fcfcfb;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
/* A 23-row table is hard to trace across; the hover row keeps the eye on one
   line without adding stripes that would fight the tier cells. */
.data-table tbody tr:hover td { background: #faf8f3; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .cat-en { font-weight: 560; color: var(--ink); }
.data-table .cat-de { display: block; font-size: 13px; color: var(--ink-3); }
/* The German subtitle is a cross-reference for readers of the English table;
 * a German reader already has the German name as the primary label. */
.data-table .cat-de[hidden] { display: none; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  padding: 16px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-size: 15.5px;
  color: var(--ink);
}
.callout p:last-child { margin-bottom: 0; }

.note-box {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------- language ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.lang-picker { display: flex; align-items: center; flex: 0 0 auto; }

.lang-picker select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235f676e' d='M0 0h10L5 6z'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 26px 6px 12px;
  cursor: pointer;
}
.lang-picker select:hover { color: var(--ink); border-color: var(--ink-3); }
.lang-picker select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.unit-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--ink-3);
}

/* English-only pages tell the reader why the switch did not change the body. */
.lang-notice {
  border-bottom: 1px solid var(--line);
  background: var(--accent-wash);
  font-size: 14px;
  color: var(--ink-2);
  padding: 11px 0;
}
.lang-notice[hidden] { display: none; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 48px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--ink-3);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--ink-2); border-bottom: 0; }
.site-footer a:hover { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-inputs { border-right: 0; border-bottom: 1px solid var(--line); }
  .related { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
}

/* The language picker claims a third slot in the header, so below this width
   the navigation drops to its own line instead of being squeezed. */
@media (max-width: 720px) {
  .site-header .wrap {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 9px;
    padding-bottom: 9px;
    min-height: 0;
  }
  .wordmark { order: 1; }
  .lang-picker { order: 2; margin-left: auto; }
  .site-nav { order: 3; width: 100%; gap: 16px; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .market-row { grid-template-columns: 1fr; }
  .m-big { font-size: 32px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 13.5px; }
  .wrap { padding: 0 16px; }
  .calc-inputs, .calc-results { padding: 20px 16px; }
  /* The label and figure columns would eat the bar at this width. */
  .ue-row { grid-template-columns: 64px 1fr 56px; gap: 8px; }
  .ue-name, .ue-out { font-size: 11.5px; }
  .vs-row { grid-template-columns: 74px 1fr 50px; gap: 8px; }
  .vs-name, .vs-val { font-size: 12px; }
  .chart { padding: 14px 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
