/* ContainerDelivered.com
   Editorial design system, mobile-first. No frameworks, no webfonts,
   no external calls of any kind.
   Layout is designed at phone width (about 360px) first and scaled up:
   base styles below are the phone layout; min-width media queries add
   the desktop arrangement. Body text is 17px, tap targets are at least
   44px, and price tables turn into stacked rows on phones rather than
   shrinking.
   Type: serif display (Charter stack) for headlines and pull figures,
   system sans for body and data.
   Palette: cool paper, steel ink, petrol accent. One accent, one ink,
   one paper, neutrals derived from them. See STYLE_GUIDE.md at the
   experiment root. */

:root {
  --paper: #f6f5f0;
  --paper-deep: #eceae0;
  --ink: #20242a;
  --ink-soft: #454b52;
  --muted: #767c80;
  --line: #d8d5c9;
  --line-strong: #b3ae9d;
  --accent: #2e5f6e;        /* petrol */
  --accent-deep: #1d4350;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 72rem;
  --measure: 42rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 3px double var(--ink);
  background: var(--paper);
}
.masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1rem 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1.5rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  padding: 0.35rem 0;
}
.wordmark em { font-style: italic; color: var(--accent); }
.masthead nav { font-size: 0.95rem; display: flex; flex-wrap: wrap; }
.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-right: 1.3rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.masthead nav a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }
.dateline {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  flex-wrap: wrap;
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1rem 2.6rem;
}
article { max-width: var(--measure); }
article.wide { max-width: 100%; }
.kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
h1 {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}
h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 2.4rem 0 0.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: none; padding-top: 0; }
h3 { font-family: var(--serif); font-size: 1.15rem; margin: 1.7rem 0 0.4rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 40rem;
  margin-bottom: 1.4rem;
}
a { color: var(--accent-deep); }
strong { color: var(--ink); }
ul, ol { max-width: var(--measure); padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
.byline {
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  margin: 1.2rem 0 1.6rem;
  max-width: var(--measure);
}

/* ---------- Key figures ---------- */
.keyfig {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 1.6rem 0;
}
.keyfig div { background: #fff; padding: 0.9rem 1rem; }
.keyfig .n {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.05;
  display: block;
}
.keyfig .l { font-size: 0.85rem; color: var(--muted); display: block; margin-top: 0.35rem; }

/* ---------- Tables ----------
   Desktop: a normal table inside a scroll wrapper as a safety net.
   Phone (see the max-width block at the end): each row becomes a
   stacked card; every cell is labeled with its data-label so no
   column meaning is lost and nothing is squished. */
.tablewrap { overflow-x: auto; margin: 1.2rem 0 0.4rem; -webkit-overflow-scrolling: touch; }
table.prices {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}
table.prices caption {
  text-align: left;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0 0 0.5rem;
}
table.prices th {
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
}
table.prices td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  vertical-align: top;
}
table.prices tbody tr:nth-child(even) td { background: var(--paper); }
table.prices td.num, table.prices th.num { text-align: right; }
table.prices td.rate { font-weight: 700; }
table.prices .src { font-size: 0.85rem; color: var(--muted); }
.tablesource { font-size: 0.85rem; color: var(--muted); margin: 0.3rem 0 1.4rem; max-width: none; }

/* ---------- Notes, verdict ---------- */
.rule-note {
  border: 1px solid var(--line-strong);
  background: var(--paper-deep);
  padding: 1rem 1.1rem;
  margin: 1.6rem 0;
  max-width: var(--measure);
}
.rule-note p { margin: 0; }
.verdict {
  border-left: 4px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.1rem;
  margin: 1.6rem 0;
  max-width: var(--measure);
}
.verdict p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; margin: 0; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 3px double var(--ink);
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1rem 2.4rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
footer.site p { max-width: none; }
footer.site .fineprint { color: var(--muted); font-size: 0.84rem; }

/* ---------- Tablet and desktop ---------- */
@media (min-width: 700px) {
  .masthead-inner { padding: 1.1rem 1.25rem 0.9rem; }
  .wordmark { font-size: 1.9rem; }
  .masthead nav a { margin-right: 0; margin-left: 1.4rem; min-height: 0; }
  .dateline { padding-left: 1.25rem; padding-right: 1.25rem; }
  main { padding: 2.2rem 1.25rem 3rem; }
  h1 { font-size: 2.75rem; line-height: 1.08; }
  h2 { font-size: 1.65rem; }
  .lede { font-size: 1.3rem; }
  .keyfig { display: flex; flex-wrap: wrap; }
  .keyfig div { flex: 1 1 10rem; padding: 1rem 1.1rem; }
  .keyfig .n { font-size: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  .rule-note { padding: 1rem 1.25rem; }
}

/* ---------- Phone tables: stacked rows ----------
   Each price row becomes its own card. The first cell is the row's
   title; the rest render as label: value lines from data-label.
   Nothing scrolls sideways and no column is crushed. */
@media (max-width: 699px) {
  table.prices { background: transparent; font-size: 1rem; }
  table.prices caption { padding-bottom: 0.7rem; }
  table.prices thead { position: absolute; left: -9999px; top: -9999px; }
  table.prices tbody tr {
    display: block;
    background: #fff;
    border: 1px solid var(--line-strong);
    margin-bottom: 0.8rem;
    padding: 0.4rem 0.9rem 0.6rem;
  }
  table.prices tbody tr:nth-child(even) td { background: transparent; }
  table.prices td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: 0.45rem 0;
    text-align: right;
  }
  table.prices td:last-child { border-bottom: none; }
  table.prices td::before {
    content: attr(data-label);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    white-space: nowrap;
  }
  table.prices td.rowtitle {
    display: block;
    text-align: left;
    font-family: var(--serif);
    font-size: 1.12rem;
    font-weight: 700;
    padding-top: 0.55rem;
  }
  table.prices td.rowtitle::before { content: none; }
  table.prices td.num { text-align: right; }
}
