/* Fonts: Public Sans and JetBrains Mono, SIL Open Font License, self-hosted. */
@font-face { font-family: 'Public Sans Variable'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/public-sans-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans Variable'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/public-sans-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
/*
 * site.css
 * The stylesheet for halsworth.uk. Tokens first, then the page shell,
 * then page parts in the order they appear. See DESIGN.md.
 *
 * Created: 2026-11-04
 * Last modified: 2026-11-04
 */

:root {
  --paper: #ffffff;
  --panel: #f4f5f2;
  --panel-deep: #e7e9e3;
  --rule: #d8dbd3;
  --rule-strong: #a2a79c;
  --ink: #1e2320;
  --ink-soft: #4a524d;
  --brand: #42701c;
  --brand-deep: #2e5012;
  --graphite: #252a2c;
  --graphite-text: #d5d9d6;
  --ok: #2f7a35;
  --maint: #1f5a99;
  --maint-bg: #e8f0f9;
  --degraded: #8a5a00;
  --degraded-bg: #fbf1dd;
  --outage: #b3261e;
  --none: #c9ccc5;
  --sans: 'Public Sans Variable', 'Public Sans', Arial, Helvetica, sans-serif;
  --mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  --container: 1180px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: 'tnum' 0;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--brand-deep); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

h1, h2, h3, h4 { line-height: 1.25; font-weight: 650; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: 2.125rem; letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 1em; }

.mono { font-family: var(--mono); font-size: 0.92em; }
.small { font-size: 0.875rem; }
.muted { color: var(--ink-soft); }

.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;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: 8px; top: -60px; background: var(--paper); color: var(--brand); padding: 8px 12px; z-index: 10; border: 2px solid var(--brand); }
.skip-link:focus { top: 8px; }

/* Utility strip */
.utility { background: var(--graphite); color: var(--graphite-text); font-size: 0.875rem; }
.utility a { color: #ffffff; text-decoration: none; }
.utility a:hover { text-decoration: underline; color: #ffffff; }
.utility__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: 7px; padding-bottom: 7px; }
.utility p { margin: 0; }
.utility__sep { margin: 0 10px; color: #7f8783; }
.utility__phone { white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0.05em; background: var(--ok); }
.utility .dot--ok { background: #5fb85f; }
.utility .dot--maint { background: #6aa7e6; }
.utility .dot--degraded { background: #e0a530; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__name { display: flex; flex-direction: column; font-weight: 700; font-size: 1.3rem; line-height: 1.05; letter-spacing: -0.01em; }
.brand__sub { font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.98rem; border-bottom: 2px solid transparent; }
.nav__list a:hover { color: var(--brand-deep); border-bottom-color: var(--rule-strong); }
.nav__list a[aria-current="page"] { border-bottom-color: var(--brand); }
.nav-mobile { display: none; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.875rem; padding-top: 18px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: '/'; margin: 0 8px; color: var(--rule-strong); }
.breadcrumbs span[aria-current] { color: var(--ink-soft); }

/* Page head */
.page-head { padding-top: 22px; padding-bottom: 8px; }
.page-head h1 { max-width: 30ch; }
.page-head__intro { font-size: 1.1875rem; color: var(--ink-soft); max-width: 46em; }
.page-head__meta { font-size: 0.875rem; color: var(--ink-soft); }

/* Two columns */
.two-col { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 56px; padding-top: 16px; padding-bottom: 64px; }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.8em; padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }

.side { font-size: 0.95rem; }
.side__box { background: var(--panel); border-top: 3px solid var(--brand); padding: 20px 22px 8px; margin-bottom: 24px; }
.side__heading { font-size: 1rem; margin-bottom: 0.6em; }
.side__phone { font-size: 1.25rem; font-weight: 650; margin-bottom: 0.3em; }
.side__phone a { text-decoration: none; color: var(--ink); }
.side__small { font-size: 0.85rem; color: var(--ink-soft); }
.side__links ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.side__links li { border-bottom: 1px solid var(--rule); }
.side__links a { display: block; padding: 9px 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
.table-wrap:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 650; padding-bottom: 8px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
thead th { background: var(--panel); font-weight: 600; border-bottom: 1px solid var(--rule-strong); }
.spec th { width: 34%; font-weight: 600; }
.spec tr:nth-child(even) th, .spec tr:nth-child(even) td { background: #fafbf9; }

/* Buttons and links */
.button { display: inline-block; background: var(--brand); color: #ffffff; text-decoration: none; padding: 11px 18px; font-weight: 600; border-radius: 2px; }
.button:hover { background: var(--brand-deep); color: #ffffff; }
.more { font-weight: 600; }

/* Home */
.intro { padding-top: 48px; padding-bottom: 36px; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 56px; align-items: start; }
.intro__fault { background: var(--panel); border-top: 3px solid var(--graphite); padding: 20px 22px 6px; margin-top: 8px; font-size: 0.95rem; }
.intro__fault h2 { font-size: 1rem; margin-bottom: 0.5em; }
.intro__fault .side__phone { margin-bottom: 0.4em; }
.intro h1 { font-size: 2.375rem; max-width: 26ch; margin-bottom: 0.45em; }
.intro__text { font-size: 1.1875rem; max-width: 40em; color: var(--ink-soft); }
.intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 22px; }
.intro__phone { font-size: 1.125rem; margin: 0; }
.intro__phone a { font-weight: 650; color: var(--ink); text-decoration: none; }

.section { padding-top: 44px; padding-bottom: 44px; }
.section--panel { background: var(--panel); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 14px; }
.section__head h2 { margin: 0; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr) minmax(0, 2fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.row h3 { font-size: 1.125rem; margin: 0; }
.row p { margin: 0; color: var(--ink-soft); }
.row__link { text-align: right; font-weight: 600; white-space: nowrap; }

.home-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 1em; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.plain-list li:first-child { border-top: 1px solid var(--rule); }
.plain-list strong { display: block; font-weight: 600; }

.status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--ok); padding: 14px 18px; }
.status-strip--maint { border-left-color: var(--maint); }
.status-strip--degraded { border-left-color: var(--degraded); }
.status-strip p { margin: 0; }
.status-strip__state { font-weight: 650; }

.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.notice-list time { display: block; font-size: 0.85rem; color: var(--ink-soft); }

/* Diagrams */
.figure { margin: 1.5em 0 2em; padding: 18px; border: 1px solid var(--rule); background: #fbfbfa; }
.figure figcaption { font-size: 0.875rem; color: var(--ink-soft); margin-top: 10px; }
.figure svg { display: block; width: 100%; height: auto; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 14px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border: 1px solid var(--rule-strong); font-weight: 650; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }

/* Status page */
.status-banner { display: flex; align-items: center; gap: 12px; padding: 16px 20px; color: #ffffff; background: var(--ok); font-weight: 650; font-size: 1.125rem; margin: 8px 0 28px; }
.status-banner--maint { background: var(--maint); }
.status-banner--degraded { background: var(--degraded); }
.status-banner .dot { background: #ffffff; }
.maint-notice { border: 1px solid #b9cde4; border-left: 4px solid var(--maint); background: var(--maint-bg); padding: 16px 20px; margin: 0 0 20px; }
.maint-notice h3 { margin-bottom: 0.3em; }
.maint-notice__when { font-weight: 600; margin-bottom: 0.6em; }
.components { list-style: none; margin: 0 0 32px; padding: 0; border: 1px solid var(--rule); }
.component { padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.component:last-child { border-bottom: 0; }
.component__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.component__name { font-weight: 600; }
.component__state { color: var(--ok); font-weight: 600; font-size: 0.95rem; }
.component__state--maint { color: var(--maint); }
.component__state--degraded { color: var(--degraded); }
.bars { display: flex; gap: 2px; height: 30px; margin: 10px 0 6px; }
.bars span { flex: 1 1 0; min-width: 1px; background: var(--ok); border-radius: 1px; }
.bars .bar--none { background: var(--none); }
.bars .bar--maintenance { background: var(--maint); }
.bars .bar--degraded { background: #d39a2a; }
.bars .bar--outage { background: var(--outage); }
.bars__legend { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-soft); }
.updates, .prose .updates { list-style: none; padding: 0; margin: 0.6em 0 0; }
.updates li { padding: 8px 0 8px 14px; border-left: 2px solid var(--rule); margin-bottom: 4px; }
.updates__state { font-weight: 650; margin-right: 6px; }
.updates__time { display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
.history-day { border-top: 1px solid var(--rule-strong); padding: 16px 0 8px; }
.history-day h2 { font-size: 1rem; color: var(--ink-soft); font-weight: 600; margin-top: 0; }
.notice-item { margin-bottom: 18px; }
.notice-item h3 { font-size: 1.0625rem; margin: 0 0 0.2em; }
.notice-item__ref { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
.feeds { font-size: 0.9rem; color: var(--ink-soft); }

/* Company information */
.company-facts th { width: 38%; }
.status-wrap { max-width: 900px; }

/* Footer */
.site-footer { background: var(--graphite); color: var(--graphite-text); font-size: 0.9rem; margin-top: 0; }
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: #ffffff; text-decoration-thickness: 2px; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 40px; padding-bottom: 28px; }
.footer__name { display: flex; align-items: center; gap: 10px; font-weight: 650; color: #ffffff; font-size: 1rem; }
.footer__heading { font-size: 0.9rem; color: #ffffff; margin-bottom: 10px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 7px; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { text-decoration: underline; }
.footer__legal { border-top: 1px solid #3c4346; padding-top: 18px; padding-bottom: 28px; font-size: 0.82rem; color: #b9bfbb; }
.footer__legal p { margin-bottom: 0.5em; }

/* Narrower screens */
@media (max-width: 1020px) {
  .nav { display: none; }
  .nav-mobile { display: block; position: relative; }
  .nav-mobile summary { cursor: pointer; list-style: none; padding: 8px 14px; border: 1px solid var(--rule-strong); font-weight: 600; }
  .nav-mobile summary::-webkit-details-marker { display: none; }
  .nav-mobile summary::after { content: ' +'; }
  .nav-mobile[open] summary::after { content: ' \2212'; }
  .nav-mobile ul { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1px solid var(--rule-strong); list-style: none; margin: 0; padding: 6px 0; min-width: 220px; z-index: 5; }
  .nav-mobile a { display: block; padding: 9px 16px; color: var(--ink); text-decoration: none; }
  .nav-mobile a[aria-current="page"] { font-weight: 650; color: var(--brand-deep); }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home-split, .intro { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; }
  h1, .intro h1 { font-size: 1.75rem; }
  .page-head__intro, .intro__text { font-size: 1.0625rem; }
  .intro { padding-top: 32px; padding-bottom: 28px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .row__link { text-align: left; }
  .utility__inner { flex-direction: column; }
  .utility__sep { display: none; }
  .utility__email { display: none; }
  .brand__name { font-size: 1.15rem; }
  .spec th, .company-facts th { width: 42%; }
  .bars { gap: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .utility, .site-header nav, .nav-mobile, .site-footer .footer__top { display: none; }
}

/* Diagrams: the wide drawing on larger screens, the tall one on phones */
.diagram--tall { display: none !important; max-width: 340px; margin: 0 auto; }
@media (max-width: 720px) {
  .diagram--wide { display: none !important; }
  .diagram--tall { display: block !important; }
}

/* Rows used as page sections */
.h3-size { font-size: 1.125rem; margin: 0; }

/* Legal pages */
.clause { font-weight: 600; margin-right: 4px; font-variant-numeric: tabular-nums; }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; }
.field input, .field textarea { width: 100%; max-width: 32em; font: inherit; color: var(--ink); background: #ffffff; border: 1px solid var(--rule-strong); border-radius: 2px; padding: 9px 11px; }
.field textarea { max-width: 100%; }
button.button { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.enquiry__result { font-weight: 600; margin-top: 14px; min-height: 1.6em; }

/* Service desk */
.desk-body { background: var(--panel); }
.desk-bar { background: var(--graphite); color: var(--graphite-text); }
.desk-bar__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 10px 20px; }
.desk-bar__brand { display: inline-flex; align-items: center; gap: 10px; color: #ffffff; text-decoration: none; font-weight: 650; }
.desk-bar__brand:hover { color: #ffffff; }
.desk-bar__user { margin: 0; font-size: 0.9rem; }
.desk-bar__user[hidden] { display: none; }
.desk-signout { margin-left: 10px; font: inherit; font-size: 0.85rem; background: transparent; color: #ffffff; border: 1px solid #7f8783; padding: 3px 10px; cursor: pointer; }
.desk-main { padding: 24px 20px 64px; }
.desk-signin { max-width: 420px; margin: 40px auto; background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--brand); padding: 24px 28px 12px; }
.desk-signin h1 { font-size: 1.5rem; }
.desk-error { min-height: 1.6em; margin-top: 12px; color: var(--outage); font-weight: 600; }
.desk-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; max-width: 1240px; margin: 0 auto; }
.desk-nav ul { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--rule); }
.desk-nav a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.desk-nav li:last-child a { border-bottom: 0; }
.desk-nav a[aria-current="page"] { background: var(--panel-deep); font-weight: 650; border-left: 3px solid var(--brand); }
.desk-content { background: var(--paper); border: 1px solid var(--rule); padding: 20px 24px 28px; min-width: 0; font-size: 0.95rem; }
.desk-content h1 { font-size: 1.5rem; }
.desk-content h2 { font-size: 1.15rem; margin-top: 1.4em; }
.desk-content h3 { margin-top: 1.2em; }
.desk-note { background: #fbf6e8; border: 1px solid #e3d6ad; padding: 12px 18px 4px; margin-bottom: 20px; }
.desk-note h2 { margin-top: 0; font-size: 1rem; }
.desk-note ul { padding-left: 1.2em; }
.desk-list { list-style: none; padding: 0; margin: 0 0 1em; }
.desk-list li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.desk-record, .desk-mail { border-top: 2px solid var(--rule-strong); padding-top: 6px; margin-top: 28px; }
.desk-mail__head { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; font-size: 0.875rem; margin: 0 0 12px; color: var(--ink-soft); }
.desk-mail__head div { display: contents; }
.desk-mail__head dt { font-weight: 600; }
.desk-mail__head dd { margin: 0; }
.invoice tr:last-child td { font-weight: 650; border-top: 1px solid var(--rule-strong); }
@media (max-width: 720px) {
  .desk-layout { grid-template-columns: minmax(0, 1fr); }
  .desk-main { padding: 16px 12px 48px; }
  .desk-content { padding: 16px 14px 24px; }
  .desk-signin { margin: 16px auto; padding: 20px 18px 10px; }
}
.desk-content td .mono { white-space: nowrap; }
