/* UK Benefits Finder: large, calm and friendly. Forest green, warm cream and a marker yellow, light and dark. */
:root {
  --bg: #fbf6ec;
  --bg-2: #f4ecdc;
  --surface: #ffffff;
  --surface-2: #f5efe2;
  --text: #1b1b18;
  --muted: #55534b;
  --line: #e2d8c4;
  --brand: #27523e;
  --brand-2: #356c56;
  --brand-ink: #ffffff;
  --brand-soft: #e3f0e9;
  --mark: #e8aa33;
  --mark-soft: #fff4c7;
  --mark-ink: #1d3f30;
  --ok: #27523e;
  --ok-soft: #e3f0e9;
  --maybe: #7a4b00;
  --maybe-soft: #fff1cc;
  --err: #a32020;
  --head: #27523e;
  --foot: #163f31;
  --shadow: 0 1px 2px rgba(40, 35, 20, .06), 0 8px 24px rgba(40, 35, 20, .08);
  --shadow-lg: 0 2px 4px rgba(40, 35, 20, .06), 0 18px 40px rgba(40, 35, 20, .12);
  --radius: 20px;
  --font: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1511; --bg-2: #132019; --surface: #18231d; --surface-2: #1f2c25; --text: #f1eee5; --muted: #bdc4bb; --line: #2f3e35;
    --brand: #8fd6b3; --brand-2: #6cc49b; --brand-ink: #0c1f16; --brand-soft: #1c3529; --mark: #e8aa33; --mark-soft: #3b3313; --mark-ink: #1d3f30;
    --ok: #8fd6b3; --ok-soft: #1c3529; --maybe: #ffd27a; --maybe-soft: #382d12; --err: #ff9c9c; --head: #10281e; --foot: #0b1a13;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1511; --bg-2: #132019; --surface: #18231d; --surface-2: #1f2c25; --text: #f1eee5; --muted: #bdc4bb; --line: #2f3e35;
  --brand: #8fd6b3; --brand-2: #6cc49b; --brand-ink: #0c1f16; --brand-soft: #1c3529; --mark: #e8aa33; --mark-soft: #3b3313; --mark-ink: #1d3f30;
  --ok: #8fd6b3; --ok-soft: #1c3529; --maybe: #ffd27a; --maybe-soft: #382d12; --err: #ff9c9c; --head: #10281e; --foot: #0b1a13;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 19px/1.6 var(--font); }
a { color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.22; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.05rem, 7vw, 3.1rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.3em; }
li { margin-bottom: .35em; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.hint { display: block; font-weight: 400; font-size: .92rem; color: var(--muted); margin-top: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--mark); color: var(--mark-ink); padding: 10px 14px; z-index: 10; font-weight: 700; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 4px solid var(--mark); outline-offset: 2px; box-shadow: 0 0 0 7px #1b1b18; }
[hidden] { display: none !important; }

/* header */
.site-header { background: var(--head); color: #fff; position: relative; overflow: hidden; }
.site-header::after { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 216, 77, .12); pointer-events: none; }
.bar { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; padding-bottom: 14px; position: relative; z-index: 1; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font-weight: 700; font-size: 1.35rem; }
.logo img { width: 48px; height: 48px; display: block; }
.logo b { background: var(--mark); color: var(--mark-ink); padding: 0 7px; border-radius: 6px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; font: 700 .95rem var(--font); color: #fff; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.55); border-radius: 99px; padding: 8px 14px; min-height: 46px; cursor: pointer; white-space: nowrap; }
.theme-toggle:hover { background: rgba(255,255,255,.22); }
@media (max-width: 420px) { .logo { font-size: 1.12rem; gap: 9px; } .logo img { width: 38px; height: 38px; } .theme-toggle { padding: 7px 11px; font-size: .9rem; gap: 6px; } }
.nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nav a { text-align: center; padding: 11px 8px; border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 1rem; background: rgba(255,255,255,.1); color: #fff; border: 2px solid rgba(255,255,255,.4); }
.nav a:hover { background: rgba(255,255,255,.2); }
.nav a[aria-current="page"] { background: #fff; color: #27523e; border-color: #fff; }
@media (min-width: 760px) { .bar { flex-direction: row; align-items: center; } .topline { flex: 1; justify-content: flex-start; gap: 18px; } .topline .theme-toggle { order: 2; margin-left: auto; } .nav { grid-template-columns: auto auto; } .nav a { padding: 10px 18px; } }
.notice { background: var(--mark); color: var(--mark-ink); font-weight: 700; font-size: .95rem; padding: 10px 0; }

/* hero */
.hero { display: grid; gap: 10px; align-items: center; padding: 30px 0 10px; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.25fr .75fr; gap: 30px; padding-top: 44px; } }
.kicker { display: inline-block; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 5px 14px; border-radius: 99px; font-size: .92rem; margin-bottom: 14px; }
.lead { font-size: 1.14rem; }
.promise { list-style: none; padding: 0; margin: 0 0 20px; }
.promise li { position: relative; padding-left: 36px; font-weight: 700; margin-bottom: 8px; }
.promise li::before { content: ""; position: absolute; left: 0; top: .15em; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); }
.promise li::after { content: ""; position: absolute; left: 8px; top: .35em; width: 6px; height: 11px; border: solid var(--brand-ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.btn-start { width: 100%; }
@media (min-width: 560px) { .btn-start { width: auto; } }
.hero-art { display: none; justify-self: center; }
@media (min-width: 820px) { .hero-art { display: block; } }
.hero-art svg { width: 100%; max-width: 320px; height: auto; filter: drop-shadow(0 18px 30px rgba(29, 91, 69, .18)); }
.a-ring { fill: var(--brand-soft); }
.a-card { fill: var(--brand); }
.a-paper { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.a-head { fill: var(--text); opacity: .85; }
.a-line { fill: var(--line); }
.a-tick { fill: var(--brand); }
.a-tickmark { fill: none; stroke: var(--brand-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.a-coin { fill: var(--mark); stroke: #b98320; stroke-width: 3; }
.a-coin-in { fill: none; stroke: #b98320; stroke-width: 2; }
.a-pound { font: 700 36px var(--font); fill: #6b5100; }
.a-dot { fill: var(--mark); }
.a-dot2 { fill: var(--brand-2); opacity: .55; }
.chips { list-style: none; padding: 0; margin: 14px 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { margin: 0; background: var(--surface); border: 2px solid var(--line); border-radius: 99px; padding: 5px 13px; font-size: .9rem; font-weight: 700; color: var(--muted); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 20px 0; box-shadow: var(--shadow); }
.card.plain { background: var(--bg-2); box-shadow: none; border-style: solid; }

/* the step-by-step form */
.form { padding: 22px 20px 20px; border: 0; box-shadow: var(--shadow-lg); scroll-margin-top: 10px; position: relative; overflow: hidden; max-width: 760px; margin-left: auto; margin-right: auto; }
.form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: linear-gradient(90deg, var(--brand), var(--brand-2) 70%, var(--mark)); }
.progress p { margin: 4px 0 10px; font-weight: 700; color: var(--brand); }
.dots { list-style: none; padding: 0; margin: 0 0 22px; display: flex; gap: 6px; align-items: center; }
.dots li { margin: 0; flex: 1; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .95rem; transition: background .2s, color .2s; }
.dots li.done { background: var(--brand-soft); color: var(--brand); }
.dots li.now { background: var(--brand); color: var(--brand-ink); transform: scale(1.06); }
.step { border: 0; margin: 0; padding: 0; min-width: 0; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step { animation: none; } html { scroll-behavior: auto; } }
legend { font-size: 1.55rem; font-weight: 700; line-height: 1.25; padding: 0; margin-bottom: 16px; float: left; width: 100%; display: flex; align-items: center; gap: 14px; }
legend:focus { outline: none; }
legend + * { clear: both; }
.licon { flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.q { margin: 18px 0 8px; }
.ql { display: block; font-weight: 700; margin-bottom: 10px; font-size: 1.05rem; }
.pills { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .pills:not(.stack) { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.pills label { position: relative; display: block; }
.pills input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pills span { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); font-weight: 700; min-height: 60px; box-shadow: 0 1px 2px rgba(40,35,20,.05); transition: border-color .15s, background .15s; }
.pills label:hover span { border-color: var(--brand-2); }
.pills span::before { content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--muted); background: var(--surface); }
.pills input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.pills input:checked + span::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 45%, var(--surface) 50%); }
.pills input:focus-visible + span { outline: 4px solid var(--mark); outline-offset: 2px; }
.row { display: grid; gap: 4px 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row { grid-template-columns: 1fr 1fr; } }
.field { display: block; margin: 14px 0; }
.field > span:first-child { display: block; font-weight: 700; margin-bottom: 8px; font-size: 1.05rem; }
.field input, .field select { width: 100%; font: inherit; font-size: 1.15rem; padding: 12px 14px; border: 2px solid var(--muted); border-radius: 14px; background: var(--surface); color: var(--text); min-height: 60px; }
.field input:focus, .field select:focus { border-color: var(--brand); outline: 4px solid var(--mark); outline-offset: 1px; }
.small-field select { max-width: 160px; }
.money { position: relative; display: block; }
.money::before { content: "£"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: 1.15rem; color: var(--brand); }
.money input { padding-left: 34px; }
.check { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0; font-weight: 700; cursor: pointer; padding: 15px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px rgba(40,35,20,.05); }
.check:hover { border-color: var(--brand-2); }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.check input { width: 28px; height: 28px; margin: 0; flex: none; accent-color: var(--brand); }
.indent { margin-left: 8px; padding-left: 16px; border-left: 4px solid var(--brand-soft); }
.kids { display: grid; gap: 12px; }
.kid { background: var(--surface-2); border-radius: 16px; padding: 4px 14px; }
.err { background: var(--maybe-soft); color: var(--err); border-left: 6px solid var(--err); padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.stepnav { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 12px; }
@media (min-width: 560px) { .stepnav { flex-direction: row-reverse; justify-content: space-between; } .stepnav .btn { min-width: 210px; } }
.btn { font: 700 1.15rem var(--font); border-radius: 16px; padding: 14px 24px; border: 2px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; transition: transform .1s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.btn-main:hover { background: var(--brand-2); }
.btn-back, .btn-plain { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-back:hover, .btn-plain:hover { border-color: var(--brand-2); }
.btn-apply { background: var(--mark); color: var(--mark-ink); width: 100%; text-align: center; box-shadow: 0 4px 0 #b98320; }
.btn-apply:hover { background: #ffe27a; }
.linkbtn { font: inherit; color: var(--brand); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* results */
.results { scroll-margin-top: 10px; max-width: 760px; margin: 0 auto; }
.summary { box-shadow: var(--shadow-lg); border: 0; position: relative; overflow: hidden; }
.summary::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: linear-gradient(90deg, var(--brand), var(--brand-2) 70%, var(--mark)); }
.eyebrow { font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; margin: 6px 0 12px; }
.hero-total { background: linear-gradient(135deg, #27523e, #356c56); color: #fff; border-radius: 18px; padding: 20px; display: grid; gap: 2px; margin-bottom: 8px; position: relative; overflow: hidden; }
.hero-total::after { content: "£"; position: absolute; right: 14px; bottom: -34px; font-size: 9rem; font-weight: 700; color: rgba(255, 216, 77, .22); line-height: 1; }
.ht-label { font-weight: 700; opacity: .9; }
.ht-week { font-size: clamp(2.3rem, 10vw, 3.2rem); font-weight: 700; line-height: 1.1; color: #f2b949; }
.ht-week small { font-size: 1.1rem; color: #fff; }
.ht-year { font-size: 1.1rem; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 14px; }
.stat { border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.stat b { font-size: 2rem; line-height: 1; }
.stat.ok { background: var(--ok-soft); color: var(--ok); }
.stat.maybe { background: var(--maybe-soft); color: var(--maybe); }
.stat span { font-weight: 700; color: var(--text); }
.note { background: var(--maybe-soft); padding: 12px 14px; border-radius: 12px; }
.group { margin-top: 30px; }
.group > h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 12px; }
.gicon { width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.benefit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 14px 0; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.benefit::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--ok); }
.benefit.maybe::before { background: repeating-linear-gradient(180deg, var(--maybe) 0 10px, transparent 10px 16px); }
.bhead h3 { margin: 0 0 8px; font-size: 1.3rem; }
.lvl { display: inline-block; font-size: .9rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); }
.maybe .lvl { background: var(--maybe-soft); color: var(--maybe); }
.tag { display: block; font-size: .9rem; color: var(--muted); }
.amt { display: inline-block; font-size: 1.55rem; font-weight: 700; margin: 12px 0 8px; background: var(--mark-soft); padding: 6px 14px; border-radius: 12px; }
.amt-text { font-size: 1.12rem; }
.amt .sub { display: block; font-size: .95rem; font-weight: 400; color: var(--muted); }
.whyh { font-weight: 700; margin: 8px 0 4px; }
.why { margin: 0 0 10px; }
.bnote { background: var(--surface-2); padding: 10px 12px; border-radius: 12px; }
.bfoot { display: grid; gap: 12px; margin-top: 14px; }
.more { font-weight: 700; }
.src { font-size: .88rem; color: var(--muted); margin: 12px 0 0; }
.src a { color: var(--muted); }

/* guide pages */
.article { padding-top: 6px; max-width: 820px; }
.page-hero { background: var(--brand-soft); border-radius: 24px; padding: 4px 20px 10px; margin: 18px 0 8px; }
.page-hero .lead { margin-bottom: .8em; }
.article h2 { margin-top: 1.6em; padding-top: .2em; }
.article h2::after { content: ""; display: block; width: 52px; height: 5px; border-radius: 9px; background: var(--mark); margin-top: 8px; }
.crumbs { font-size: .95rem; color: var(--muted); margin: 18px 0 10px; }
.crumbs a { color: var(--muted); }
.facts { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin: 20px 0; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 6px solid var(--brand); }
.fact b { display: block; font-size: 1.3rem; color: var(--brand); line-height: 1.3; }
.fact span { color: var(--muted); font-size: .92rem; }
.table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: var(--shadow); margin: 10px 0 20px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 1rem; }
th { background: var(--brand); color: var(--brand-ink); }
tr:nth-child(odd) td { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td:last-child { font-weight: 700; }
.cta { background: linear-gradient(135deg, #27523e, #356c56); color: #fff; border-radius: var(--radius); padding: 24px; margin: 28px 0; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 216, 77, .2); }
.cta h2 { margin-top: 0; color: #fff; }
.cta h2::after { display: none; }
.cta a.btn { background: var(--mark); color: var(--mark-ink); width: 100%; position: relative; z-index: 1; box-shadow: 0 4px 0 #b98320; }
@media (min-width: 560px) { .cta a.btn { width: auto; } }
.list-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 640px) { .list-grid { grid-template-columns: 1fr 1fr; } }
.list-grid a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.list-grid a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.list-grid a b { color: var(--brand); display: block; margin-bottom: 4px; font-size: 1.12rem; text-decoration: underline; }

/* footer */
.site-footer { margin-top: 56px; padding: 32px 0 38px; background: var(--foot); color: #e9efe9; }
.site-footer a { color: #fff; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: #fff; }
.foot-brand img { border-radius: 10px; }
.foot-h { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: #f2b949; margin: 18px 0 10px; }
.foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-bottom: 20px; font-size: 1rem; }
@media (min-width: 760px) { .foot-nav { grid-template-columns: repeat(4, 1fr); } }
.site-footer p.small:not(.muted) { border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; }
.site-footer .muted { color: #b9c7bd; }

.install { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: 14px 14px 14px 16px; margin: 18px 0 4px; box-shadow: var(--shadow); position: relative; }
.install img { flex: none; width: 44px; height: 44px; }
.install-text { flex: 1; min-width: 0; }
.install-text p { margin: 0 0 10px; padding-right: 26px; }
.install-text p:last-child { margin-bottom: 0; }
.install-btn { min-height: 48px; }
.ios-share { display: inline-block; font-weight: 700; padding: 0 4px; border: 2px solid currentColor; border-radius: 6px; line-height: 1.2; }
.install-x { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: 0; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.install-x:hover { background: var(--brand-soft); }
@media print {
  .site-header, .notice, .form, .hero, .chips, .site-footer, .actions, .card.plain, .bfoot .more { display: none !important; }
  .benefit, .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; color: #000; font-size: 13pt; }
}
