/* broadband.me.uk: plain, high-contrast, large-text styles. System fonts only, so nothing is loaded from third parties. */
:root {
  --bg: #ffffff;
  --surface: #f4f7f6;
  --surface-2: #e8efed;
  --text: #15201e;
  --muted: #4a5a57;
  --border: #c9d6d3;
  --brand: #0b5e55;
  --brand-strong: #07443d;
  --brand-tint: #e3f2ef;
  --link: #0a5a8a;
  --link-visited: #5b3a8c;
  --focus: #ffbf47;
  --yes-bg: #dff3e4; --yes-fg: #12522a;
  --no-bg: #fbe4e2;  --no-fg: #8a1f17;
  --some-bg: #fff2cc; --some-fg: #6b4a00;
  --unclear-bg: #e9ecef; --unclear-fg: #3a4248;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1514;
    --surface: #172120;
    --surface-2: #1f2c2a;
    --text: #e8efed;
    --muted: #a9b9b5;
    --border: #33443f;
    --brand: #4cc2b0;
    --brand-strong: #7fd8ca;
    --brand-tint: #15302c;
    --link: #8cc8f0;
    --link-visited: #c4a8ef;
    --yes-bg: #173a24; --yes-fg: #9be3b0;
    --no-bg: #44201d;  --no-fg: #ffb3ab;
    --some-bg: #3d3112; --some-fg: #ffd97a;
    --unclear-bg: #2a3034; --unclear-fg: #cdd5da;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--text); border-radius: 2px; }
main:focus { outline: none; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--focus); color: #000; padding: .6em 1em; font-weight: 700; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 820px; }
.section { margin-top: 3rem; }
.section-intro { color: var(--muted); max-width: 70ch; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text) !important; }
.brand-mark { color: var(--brand); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 1.2rem; }
.brand-tag { font-size: .85rem; color: var(--muted); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.site-nav a { display: block; padding: .45rem .75rem; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 1rem; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-strong); box-shadow: inset 0 -3px 0 var(--brand); }

/* Hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 2.5rem 0 2rem; }
.hero-small { padding: 2rem 0 1.5rem; }
.lede { font-size: 1.25rem; max-width: 62ch; color: var(--text); }
.hero-meta { color: var(--muted); font-size: 1rem; margin: 1.25rem 0 0; }
.hero-choices { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; max-width: 820px; }
@media (min-width: 640px) { .hero-choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem 3.25rem 1.25rem 1.25rem; background: var(--brand); color: #fff !important; text-decoration: none; border-radius: var(--radius); box-shadow: var(--shadow); }
.choice:hover { background: var(--brand-strong); }
@media (prefers-color-scheme: dark) { .choice { color: #0f1514 !important; } }
.choice-label { font-size: 1.35rem; font-weight: 800; }
.choice-detail { font-size: 1.05rem; opacity: .95; }
.choice-arrow { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-size: 1.75rem; }

.stat-row { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 760px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
.stat-row li { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: 1rem; color: var(--muted); }
.stat { display: block; font-size: 1.9rem; font-weight: 800; color: var(--brand-strong); line-height: 1.15; }

/* Key facts */
.key-facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .key-facts { grid-template-columns: 1fr 1fr; } }
.key-facts li { background: var(--brand-tint); border-left: 5px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; }
.key-facts strong { display: block; font-size: 1.1rem; margin-bottom: .25rem; }
.key-facts p { margin: 0; }

.callout { background: var(--some-bg); color: var(--text); border-left: 5px solid var(--some-fg); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; }
.callout p:last-child { margin-bottom: 0; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.filters[hidden] { display: none; }
.filter-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.filter-group legend, .filter-label { display: block; font-weight: 700; font-size: 1rem; margin-bottom: .4rem; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg label { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 2px solid var(--border); border-radius: 999px; background: var(--bg); cursor: pointer; font-size: 1rem; min-height: 44px; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); font-weight: 700; }
.check { display: flex; align-items: center; gap: .5rem; font-size: 1rem; min-height: 36px; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); margin: 0; }
select { font: inherit; font-size: 1rem; padding: .5rem 2rem .5rem .75rem; min-height: 44px; border: 2px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.filter-status { flex-basis: 100%; margin: 0; font-weight: 600; color: var(--muted); font-size: 1rem; }

/* Table */
.table-scroll { margin-top: 1rem; }
.tariff-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; }
.tariff-table th, .tariff-table td { text-align: left; vertical-align: top; padding: .85rem .75rem; border-bottom: 1px solid var(--border); }
.tariff-table thead th { font-size: .9rem; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--text); position: sticky; top: 0; background: var(--bg); }
.tariff-table tbody tr:hover { background: var(--surface); }
.tariff-table tbody th { font-weight: 400; }
.t-provider { display: block; font-weight: 800; font-size: 1.1rem; }
.t-package { display: block; color: var(--muted); }
.t-price { display: block; font-weight: 800; font-size: 1.35rem; white-space: nowrap; }
.t-price small, .card-price small { font-weight: 600; font-size: .7em; color: var(--muted); }
.t-speed { font-weight: 700; white-space: nowrap; }
.t-sub { display: block; font-size: .875rem; color: var(--muted); }
.t-more a { white-space: nowrap; font-weight: 600; }
.flag { display: inline-block; margin-top: .3rem; font-size: .8rem; font-weight: 700; padding: .1rem .5rem; border-radius: 6px; background: var(--some-bg); color: var(--some-fg); }
.no-results { padding: 1rem; background: var(--surface); border-radius: var(--radius); font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.badge-yes { background: var(--yes-bg); color: var(--yes-fg); }
.badge-no { background: var(--no-bg); color: var(--no-fg); }
.badge-some { background: var(--some-bg); color: var(--some-fg); }
.badge-unclear { background: var(--unclear-bg); color: var(--unclear-fg); }

/* Stacked rows on small screens */
@media (max-width: 899px) {
  .tariff-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tariff-table, .tariff-table tbody, .tariff-table tr, .tariff-table th, .tariff-table td { display: block; width: 100%; }
  .tariff-table tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; padding: .25rem 0; background: var(--bg); box-shadow: var(--shadow); }
  .tariff-table tr[hidden] { display: none; }
  .tariff-table tbody tr:hover { background: var(--bg); }
  .tariff-table th, .tariff-table td { border-bottom: 0; padding: .45rem 1rem; }
  .tariff-table tbody th { padding-top: .8rem; border-bottom: 1px solid var(--border); padding-bottom: .7rem; margin-bottom: .3rem; }
  .tariff-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; text-align: right; }
  .tariff-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; flex: none; }
  .tariff-table td > * { text-align: right; }
  .tariff-table td.t-more { justify-content: flex-end; padding-bottom: .8rem; }
  .tariff-table td.t-more::before { content: none; }
  .t-price { font-size: 1.25rem; }
}

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 980px) { .cards { grid-template-columns: 1fr 1fr; } }
.tariff-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); scroll-margin-top: 1rem; display: flex; flex-direction: column; }
.tariff-card[hidden] { display: none; }
.tariff-card:target { outline: 3px solid var(--brand); outline-offset: 2px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .9rem; margin-bottom: .9rem; }
.card-title { margin: 0; font-size: 1.3rem; }
.card-title span { display: block; font-weight: 500; color: var(--muted); font-size: 1.05rem; }
.card-price { margin: 0; font-size: 1.75rem; font-weight: 800; white-space: nowrap; color: var(--brand-strong); line-height: 1.1; text-align: right; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr; gap: .7rem 1.25rem; font-size: 1rem; }
@media (min-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } .facts .wide { grid-column: 1 / -1; } }
.facts dt { font-weight: 700; font-size: .875rem; color: var(--muted); text-transform: none; }
.facts dd { margin: .1rem 0 0; }
.dd-note { color: var(--muted); font-size: .95rem; }
.card-apply { margin-top: auto; padding-top: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.apply-phone { margin: 0; font-size: 1rem; }
.card-checked { margin: .9rem 0 0; font-size: .875rem; color: var(--muted); }

.button { display: inline-block; background: var(--brand); color: #fff !important; text-decoration: none; font-weight: 700; padding: .7rem 1.1rem; border-radius: 10px; min-height: 44px; line-height: 1.4; }
.button:hover { background: var(--brand-strong); }
@media (prefers-color-scheme: dark) { .button { color: #0f1514 !important; } }

.no-tariff { padding-left: 1.25rem; max-width: 80ch; }
.no-tariff li { margin-bottom: .5rem; }

/* Prose pages */
.prose { padding-top: 2rem; }
.section .prose { padding-top: 0; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .4rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; margin: 1rem 0 1.5rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface); }
.prose blockquote { margin: 1.25rem 0; padding: .75rem 1.25rem; border-left: 5px solid var(--brand); background: var(--brand-tint); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose details { border: 1px solid var(--border); border-radius: var(--radius); padding: .25rem 1rem; margin-bottom: .75rem; background: var(--bg); }
.prose summary { cursor: pointer; font-weight: 700; padding: .6rem 0; }
.prose details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: .75rem; }

/* Footer */
.site-footer { margin-top: 4rem; background: var(--surface); border-top: 1px solid var(--border); padding: 2.5rem 0; font-size: 1rem; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 1.5rem 2rem; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-title { font-weight: 800; margin-bottom: .5rem; }
.footer-links { list-style: none; padding: 0; margin: 0 0 1rem; }
.footer-links li { margin-bottom: .35rem; }
.footer-checked { color: var(--muted); margin: 0 0 .25rem; }

@media print {
  .site-nav, .filters, .skip-link, .hero-choices { display: none !important; }
  .tariff-card { break-inside: avoid; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---- Student sites ---- */
.theme-wired {
  --brand: #1d4ed8; --brand-strong: #1e3a8a; --brand-tint: #e6edfd;
}
.theme-wireless {
  --brand: #6d28d9; --brand-strong: #4c1d95; --brand-tint: #efe9fc;
}
@media (prefers-color-scheme: dark) {
  .theme-wired { --brand: #7aa2ff; --brand-strong: #a9c2ff; --brand-tint: #17233f; }
  .theme-wireless { --brand: #b394ff; --brand-strong: #cdb8ff; --brand-tint: #261b3d; }
}
.method-box { background: var(--brand-tint); border-radius: var(--radius); padding: 1.25rem 1.5rem; border-left: 5px solid var(--brand); }
.method-box h2 { font-size: 1.35rem; margin-bottom: .6rem; }
.method-box p:last-child { margin-bottom: 0; }
.method-sum { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.15rem; font-weight: 600; }
.method-sum span:not([aria-hidden]):not(.visually-hidden) { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .3rem .7rem; }
.method-sum strong { background: var(--brand); color: #fff; border-radius: 8px; padding: .3rem .7rem; }
@media (prefers-color-scheme: dark) { .method-sum strong { color: #0f1514; } }
.t-sub-strong { display: block; font-weight: 700; }
.t-pp { display: block; font-weight: 800; font-size: 1.2rem; color: var(--brand-strong); white-space: nowrap; }
.flag-term { background: var(--brand-tint); color: var(--brand-strong); }
.cost-breakdown { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 0 0 .9rem; }
.cost-breakdown caption { text-align: left; font-weight: 700; font-size: .875rem; color: var(--muted); padding-bottom: .35rem; }
.cost-breakdown th, .cost-breakdown td { padding: .4rem 0; border-bottom: 1px dashed var(--border); text-align: left; font-weight: 400; vertical-align: top; }
.cost-breakdown td { text-align: right; white-space: nowrap; padding-left: 1rem; }
.cost-breakdown tfoot th, .cost-breakdown tfoot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--text); padding-top: .55rem; font-size: 1.1rem; }
.pp-line { background: var(--brand-tint); border-radius: 8px; padding: .55rem .8rem; font-weight: 600; font-size: 1rem; }
.pp-line[hidden] { display: none; }
@media (max-width: 899px) { .tariff-table td.col-pp[hidden], .tariff-table th.col-pp[hidden] { display: none; } }
