/* Zasiłki.co.uk — single stylesheet, no external fonts or requests */
:root {
  --c-primary: #1d5566;
  --c-primary-dark: #143e4b;
  --c-primary-tint: #e6f0f2;
  --c-accent: #f0b45a;
  --c-accent-tint: #fdf3e2;
  --c-accent-ink: #7a4710;
  --c-bg: #fbfaf7;
  --c-surface: #ffffff;
  --c-text: #1b2427;
  --c-muted: #4f5d61;
  --c-border: #d8e2e4;
  --c-link: #155a8a;
  --c-link-visited: #5b3f8c;
  --c-focus: #ffbf47;
  --c-ok-tint: #e8f3ec;
  --c-ok: #24613a;
  --c-violet-tint: #efedf8;
  --c-violet: #4a3f8c;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --measure: 70ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
.wrap { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.narrow { max-width: 760px; padding-block: 1.5rem 4rem; }

a { color: var(--c-link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-primary-dark); text-decoration-thickness: 2px; }
a:visited { color: var(--c-link-visited); }
:focus-visible {
  outline: 3px solid var(--c-text);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--c-focus);
  border-radius: 4px;
}
main:focus { outline: none; }

.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: 1rem; top: -100px; z-index: 10;
  background: var(--c-text); color: #fff; padding: 0.75rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Header */
.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--c-text); font-weight: 750; font-size: 1.25rem; letter-spacing: -0.01em; min-height: 44px; }
.brand:visited { color: var(--c-text); }
.brand-tld { color: var(--c-muted); font-weight: 500; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.85rem;
  border-radius: 999px; text-decoration: none; color: var(--c-text); font-weight: 560; font-size: 0.98rem;
}
.site-nav a:visited { color: var(--c-text); }
.site-nav a:hover { background: var(--c-primary-tint); color: var(--c-primary-dark); }
.site-nav a[aria-current="page"] { background: var(--c-primary); color: #fff; }

/* Typography */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; color: #10242b; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.85rem); margin: 0.25rem 0 0.9rem; font-weight: 780; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); margin: 2.8rem 0 0.8rem; font-weight: 740; }
h3 { font-size: 1.22rem; margin: 2rem 0 0.5rem; font-weight: 700; }
h4 { font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }
li::marker { color: var(--c-primary); }
strong { font-weight: 680; }
code { font-size: 0.92em; background: var(--c-primary-tint); padding: 0.05em 0.35em; border-radius: 4px; }
.lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.27rem); color: #2e3b3f; max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--c-primary); margin: 0 0 0.25rem; }
.note { color: var(--c-muted); font-size: 0.95rem; }

/* Breadcrumbs */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; padding: 0; margin: 1.25rem 0 0.75rem; font-size: 0.92rem; color: var(--c-muted); }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.5rem; color: var(--c-muted); }

/* Hero */
.hero { background: linear-gradient(180deg, #ffffff 0%, var(--c-bg) 100%); border-bottom: 1px solid var(--c-border); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding-block: 3rem 3.25rem; }
.hero-art svg { width: 100%; max-width: 380px; display: block; margin-left: auto; }
.home-content { padding-block: 2rem 4rem; }
.home-content > h2:first-child { margin-top: 0.5rem; }
.home-content > p, .home-content > ul { max-width: var(--measure); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 1.25rem 0 2.5rem; }
.card {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.card:hover { border-color: var(--c-primary); box-shadow: 0 10px 28px -14px rgba(20, 62, 75, .45); }
@media (prefers-reduced-motion: no-preference) { .card:hover { transform: translateY(-2px); } }
.card:focus-within { box-shadow: 0 0 0 3px var(--c-text), 0 0 0 7px var(--c-focus); }
.card-icon { color: var(--c-primary); background: var(--c-primary-tint); width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 0.9rem; }
.card h3 { margin: 0 0 0.5rem; font-size: 1.28rem; }
.card-link { color: inherit; text-decoration: none; }
.card-link:visited { color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-link:focus-visible { outline: none; box-shadow: none; }
.card p { color: #33444a; }
.card ul { font-size: 0.96rem; color: #33444a; padding-left: 1.2rem; }
.card-more { margin-top: auto; font-weight: 650; color: var(--c-primary); }

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-template-areas: "head head" "body toc" "related related";
  column-gap: 3.5rem;
  padding-bottom: 4rem;
}
.article-head { grid-area: head; max-width: 860px; }
.toc { grid-area: toc; }
.prose { grid-area: body; max-width: var(--measure); min-width: 0; }
.related { grid-area: related; }
.toc-details { position: sticky; top: 1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.toc summary { font-weight: 700; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.toc ol { margin: 0.6rem 0 0; padding-left: 1.3rem; font-size: 0.95rem; }
.toc li { margin-bottom: 0.45rem; line-height: 1.35; }
.toc a { text-decoration: none; color: var(--c-text); }
.toc a:hover { color: var(--c-link); text-decoration: underline; }

.facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 1.25rem 0 1.5rem; padding: 0.85rem 1.1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; font-size: 0.95rem; }
.facts div { display: flex; gap: 0.4rem; }
.facts dt { color: var(--c-muted); }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; font-weight: 620; }

.prose h2 { padding-top: 0.25rem; border-top: 1px solid var(--c-border); padding-top: 1.75rem; }
.prose > h2:first-child { border-top: 0; padding-top: 0; margin-top: 1.25rem; }

/* Tables */
.table-wrap { margin: 1.25rem 0 1.5rem; overflow-x: auto; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface); }
.table-wrap:focus-visible { outline: 3px solid var(--c-text); box-shadow: 0 0 0 6px var(--c-focus); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
caption { text-align: left; font-weight: 650; padding: 0.8rem 1rem 0.2rem; color: var(--c-text); }
th, td { padding: 0.65rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-border); }
thead th { background: var(--c-primary-tint); color: #10242b; font-weight: 680; border-bottom: 2px solid #b9cfd4; }
tbody th { font-weight: 560; }
tbody tr:last-child > * { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .table-wrap { border: 0; background: transparent; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap caption { display: block; padding: 0 0 0.5rem; }
  .table-wrap tr { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; margin-bottom: 0.75rem; padding: 0.35rem 0; }
  .table-wrap tbody th { background: var(--c-primary-tint); border-radius: 11px 11px 0 0; margin-top: -0.35rem; font-weight: 680; }
  .table-wrap td { display: flex; justify-content: space-between; gap: 1rem; text-align: right; border-bottom: 1px dashed var(--c-border); }
  .table-wrap td::before { content: attr(data-label); text-align: left; color: var(--c-muted); font-weight: 560; flex: 1 1 50%; }
  .table-wrap td.num { white-space: normal; }
  .table-wrap tr > *:last-child { border-bottom: 0; }
}

/* Callouts */
.callout { border-radius: 12px; padding: 1rem 1.2rem 0.4rem; margin: 1.5rem 0; border-left: 5px solid; }
.callout-title { font-weight: 720; margin-bottom: 0.35rem; }
.callout-info { background: var(--c-primary-tint); border-color: var(--c-primary); }
.callout-warning { background: var(--c-accent-tint); border-color: #c9832a; }
.callout-warning .callout-title { color: var(--c-accent-ink); }
.callout-example { background: var(--c-surface); border: 1px solid var(--c-border); border-left: 5px solid #6a8f98; }
.callout-region { background: var(--c-violet-tint); border-color: var(--c-violet); }
.callout-change { background: var(--c-ok-tint); border-color: var(--c-ok); }
.callout .table-wrap { background: var(--c-surface); }

/* FAQ */
.faq { border-top: 1px solid var(--c-border); }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--c-primary); flex: none; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary h3 { margin: 0; font-size: 1.08rem; }
.faq-answer { padding: 0 0 0.75rem; }

/* Sources, disclaimer, related */
.sources { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; padding: 1rem 1.25rem 0.25rem; font-size: 0.97rem; }
.sources li { margin-bottom: 0.55rem; }
.disclaimer { margin-top: 2.5rem; padding: 1rem 1.2rem; background: #f1f3f1; border-radius: 12px; font-size: 0.95rem; color: #2f3b3e; }
.disclaimer p { margin: 0; }
.related { margin-top: 3rem; border-top: 1px solid var(--c-border); }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.related li { margin: 0; }
.related a { display: block; height: 100%; padding: 1.1rem 1.25rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); text-decoration: none; color: var(--c-text); }
.related a:hover { border-color: var(--c-primary); }
.related-title { display: block; font-weight: 700; color: var(--c-link); margin-bottom: 0.25rem; }
.related-desc { display: block; color: var(--c-muted); font-size: 0.95rem; }

/* Steps / misc blocks on home */
.steps ol { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.steps li { counter-increment: s; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.1rem 3.6rem; position: relative; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 1.1rem; top: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--c-accent); color: #3d2306; font-weight: 750; display: grid; place-items: center; }

.error-links { font-size: 1.1rem; }
.error-links li { margin-bottom: 0.6rem; }

/* Footer */
.site-footer { background: #11313b; color: #dbe7ea; padding-block: 2.75rem 2.25rem; font-size: 0.95rem; }
.site-footer a { color: #ffffff; }
.site-footer a:visited { color: #e5dcf7; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 750; font-size: 1.1rem; color: #fff; }
.footer-heading { font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.footer-small { color: #b8cbd0; font-size: 0.88rem; }
.site-footer :focus-visible { outline-color: #fff; }

/* Responsive */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "toc" "body" "related"; }
  .toc-details { position: static; max-height: none; margin-bottom: 0.5rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 1.0rem; }
  .wrap { width: min(100% - 2rem, 1180px); }
  .hero-inner { grid-template-columns: 1fr; padding-block: 2rem 2.25rem; }
  .hero-art { display: none; }
  .cards, .related ul, .steps ol { grid-template-columns: 1fr; }
  .header-inner { padding-block: 0.6rem; }
  .site-nav { width: 100%; }
  .site-nav ul { gap: 0.35rem; }
  .site-nav a { padding: 0.35rem 0.8rem; border: 1px solid var(--c-border); font-size: 0.95rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .facts { flex-direction: column; gap: 0.3rem; }
}
@media print {
  .site-header, .site-footer, .toc, .related, .skip-link { display: none; }
  body { background: #fff; }
  .callout, .table-wrap { break-inside: avoid; }
}
