:root {
  --paper: #f3ecdf;
  --paper-2: #fffaf2;
  --ink: #1c1612;
  --muted: #5e564c;
  --line: #ddcfb8;
  --mtn: #f0b400;
  --mtn-ink: #1a1400;
  --airtel: #d0121a;
  --good: #0d6a45;
  --shadow: 0 18px 40px rgba(48, 32, 12, 0.08);
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(240, 180, 0, 0.18), transparent 50%),
    radial-gradient(900px 380px at 110% 0%, rgba(208, 18, 26, 0.08), transparent 46%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}
a { color: #8d1d16; }
a:hover { color: #5c100c; }
img { max-width: 100%; }

.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.rule {
  height: 8px;
  background: linear-gradient(90deg, var(--mtn) 0 50%, var(--airtel) 50% 100%);
}

.mast { padding: 1.4rem 0 0.4rem; text-align: center; }
.kicker {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.brand {
  display: inline-block;
  margin: 0.15rem 0;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 680;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.dateline { margin: 0.35rem 0 0.8rem; color: var(--muted); }
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
}
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.25em; }

.mast-actions { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; margin: 0.9rem 0 0.2rem; }
button, .btn {
  appearance: none;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fffaf2;
  font: 700 1rem/1 var(--sans);
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  border-radius: 999px;
}
button.secondary, a.btn.secondary { background: transparent; color: var(--ink); }
button:hover, .btn:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.6; cursor: progress; }
#fetch-status { min-height: 1.3rem; margin: 0; color: var(--muted); font-size: 0.95rem; }
#fetch-status.ok { color: var(--good); }
#fetch-status.bad { color: var(--airtel); }

main { padding-bottom: 3rem; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 640; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0.2rem 0 0.6rem; }
h2 { font-size: 1.7rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0.6rem 0; }
.lede { font-size: 1.18rem; max-width: 68ch; }

.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  margin: 1rem 0;
}
.calc-grid { display: grid; gap: 0.8rem; }
@media (min-width: 800px) {
  .calc-grid { grid-template-columns: 1.1fr 1fr auto; align-items: end; }
}
label { display: block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
input, select {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.75rem 0.8rem;
  border: 1.5px solid var(--ink);
  background: white;
  font: 600 1.05rem/1.2 var(--sans);
  color: var(--ink);
}
.results { display: grid; gap: 0.8rem; margin-top: 1rem; }
@media (min-width: 800px) { .results { grid-template-columns: 1fr 1fr; } }
.quote { border: 1px solid var(--line); background: white; padding: 1rem; }
.quote.mtn { border-top: 8px solid var(--mtn); }
.quote.airtel { border-top: 8px solid var(--airtel); }
.quote header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--good);
  color: white;
  padding: 0.2rem 0.45rem;
}
.big { font-family: var(--serif); font-size: 2rem; margin: 0.2rem 0; }
dl.breakdown { margin: 0.4rem 0 0; }
dl.breakdown div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: 0.35rem 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; }

.table-wrap { overflow-x: auto; border: 1px solid var(--ink); background: white; margin: 0.8rem 0 1.2rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
th, td { padding: 0.55rem 0.65rem; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th {
  position: sticky;
  top: 0;
  background: var(--ink);
  color: #fffaf2;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
tr:nth-child(even) td { background: #fbf6ee; }
.cheaper { background: #e7f6ee !important; }

.cards { display: grid; gap: 0.8rem; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: white; border: 1px solid var(--line); padding: 1rem; }
.card h3 { margin-top: 0; }
ol.steps, ul.clean { padding-left: 1.1rem; }
.note {
  background: #fff4cc;
  border-left: 6px solid var(--mtn);
  padding: 0.8rem 1rem;
}
.note.airtel { background: #fff0f0; border-left-color: var(--airtel); }
.faq details { background: white; border: 1px solid var(--line); padding: 0.7rem 0.9rem; margin: 0.45rem 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.crumbs { color: var(--muted); font-size: 0.92rem; }
.crumbs a { color: var(--muted); }

.ad-slot { margin: 1rem 0; text-align: center; }
.ad-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.ad-slot ins { margin: 0 auto; }

.site-footer {
  border-top: 3px solid var(--ink);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer a { color: var(--ink); }
.foot-grid { display: grid; gap: 1rem; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.25rem 0; }

@media print {
  .rule, .nav, .mast-actions, .ad-slot, .site-footer, button { display: none !important; }
  body { background: white; }
  .panel, .quote, .card { box-shadow: none; }
}
