/*
Shared styles for the money calculators site. Class names:
.site-header  page header band (put .wrap inside)
.wrap         centred container, max 900px; use inside header, main and footer
.back         link back to the hub, shown above the H1
.card         white box for a section (use on <section>)
.cards        grid of hub cards (each child is a .card)
.grid         auto-fit grid of form fields
.row          one repeated input group (a debt, an income line); has a top border
label, input, select   styled globally; always pair label for= with input id=
button        primary button; button.secondary is the outline version
.err          error line (give it role="alert")
.note         small muted text
.out          result area (aria-live="polite")
.table-wrap   wrapper for a table so it scrolls on small screens
.cta          green call-to-action link
.howto        how-to text section (a .card)
.site-footer  footer band (put .wrap inside)
.bar          simple percent bar: <div class="bar"><span style="width:40%"></span></div>
*/
:root{--bg:#f6f8fb;--card:#fff;--ink:#1b2430;--muted:#51606f;--accent:#0b5cad;--line:#c9d3de}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.5}
.wrap{max-width:900px;margin:0 auto;padding:12px 16px}
.site-header{background:#fff;border-bottom:1px solid var(--line)}
.site-footer{border-top:1px solid var(--line);margin-top:24px}
h1{font-size:1.6rem;margin:.5rem 0}
h2{font-size:1.25rem;margin-top:0}
a{color:var(--accent)}
.back{display:inline-block;margin:4px 0}
.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:16px;margin:16px 0}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.cards .card{margin:0}
.cards h2{font-size:1.15rem}
label{display:block;font-weight:600;margin:8px 0 2px}
input,select{width:100%;padding:8px;font-size:1rem;border:1px solid #6b7a89;border-radius:4px;background:#fff;color:var(--ink)}
input:focus,select:focus,button:focus,a:focus{outline:3px solid #f2a900;outline-offset:2px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px 12px}
.row{border-top:1px solid var(--line);padding-top:8px;margin-top:8px}
button{background:var(--accent);color:#fff;border:0;border-radius:4px;padding:10px 16px;font-size:1rem;cursor:pointer;margin:8px 8px 0 0;min-height:44px}
button.secondary{background:#fff;color:var(--accent);border:2px solid var(--accent)}
.err{color:#a40000;font-weight:600;min-height:1.2em}
.note{color:var(--muted);font-size:.9rem}
table{border-collapse:collapse;width:100%}
th,td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--line)}
.table-wrap{overflow-x:auto}
.cta{display:inline-block;background:#1a7f37;color:#fff;text-decoration:none;font-weight:700;padding:12px 18px;border-radius:6px;margin:6px 8px 6px 0}
.bar{background:#e3e9f0;border-radius:4px;height:10px;min-width:80px}
.bar span{display:block;height:10px;background:var(--accent);border-radius:4px;max-width:100%}
.howto p{margin:.6em 0}
textarea{width:100%;padding:8px;font:.85rem/1.4 ui-monospace,Consolas,monospace;border:1px solid #6b7a89;border-radius:4px;background:#f6f8fb;color:var(--ink);resize:vertical}
textarea:focus{outline:3px solid #f2a900;outline-offset:2px}
@media (min-width:600px){h1{font-size:2rem}}
