/* Kenya Disability Rehabilitation and Therapy Hub (The Disability Hub): shared web styles.
   Colour tokens come from Graphics/BRAND.md (measured from the logo). Keep globals.css and
   public/assets/pcpwd.css in step: the base section below is identical in both files. */
:root {
  /* Brand tokens (BRAND.md) */
  --brand-primary: #00438F;        /* buttons, links, active navigation */
  --brand-primary-bright: #0073E1; /* icons, focus ring, decorative accents */
  --brand-navy: #012A5E;           /* headings, dark text */
  --brand-green: #0F9D08;          /* decorative only, never small text */
  --brand-green-text: #0B7D06;     /* green text, success */
  --brand-orange: #FD9101;         /* small highlights with navy text only */
  --brand-orange-text: #B45309;    /* orange text, warnings */
  --brand-error: #C40000;
  --brand-info: #00438F;
  --brand-success: #0B7D06;
  --brand-warning: #B45309;
  --tint-blue: #E8F1FB;
  --tint-green: #EAF6E8;
  --tint-orange: #FFF4E5;
  --tint-red: #FCEAEA;
  --page-bg: #F5F8FC;
  --surface: #FFFFFF;
  --text: #1F2937;
  --text-muted: #5B6576;
  --border: #DCE3EC;
  --border-strong: #B9C4D2;
  --disabled-fg: #9AA4B2;
  --disabled-bg: #EEF1F5;
  --focus: #0073E1;

  /* Older names used by existing markup, mapped onto the brand tokens. */
  --navy: var(--brand-navy); --primary: var(--brand-primary); --action: var(--brand-primary); --action-dark: var(--brand-navy);
  --action-tint: var(--tint-blue); --ink: var(--text); --muted: var(--text-muted); --line: var(--border); --bg: var(--page-bg);
  --card: var(--surface); --red: var(--brand-error); --orange: var(--brand-orange-text); --gold-tint: var(--tint-orange);

  --radius: 14px; --shadow: 0 2px 6px rgba(1, 42, 94, .06), 0 1px 1px rgba(1, 42, 94, .04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page-bg); color: var(--text); font: 15px/1.5 "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif; }
a { color: var(--brand-primary); text-underline-offset: 2px; }
a:hover { color: var(--brand-navy); }
h1, h2, h3 { color: var(--brand-navy); line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
img { max-width: 100%; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 12px; }
.muted { color: var(--text-muted); } .small { font-size: .85rem; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1.5px solid var(--brand-primary); background: var(--brand-primary); color: #fff; font: 600 15px/1.2 inherit; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
a:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
.btn.secondary { background: var(--surface); color: var(--brand-primary); }
.btn.secondary:hover { background: var(--tint-blue); color: var(--brand-navy); }
.btn.text { background: none; border-color: transparent; color: var(--brand-primary); }
.btn.text:hover { background: var(--tint-blue); color: var(--brand-navy); }
.btn.success { background: var(--brand-green-text); border-color: var(--brand-green-text); }
.btn.danger { background: var(--surface); color: var(--brand-error); border-color: var(--brand-error); }
.btn.danger:hover { background: var(--tint-red); }
.btn[disabled] { background: var(--disabled-bg); border-color: var(--border); color: var(--text-muted); cursor: not-allowed; }
label { display: block; font-weight: 600; color: var(--brand-navy); font-size: .88rem; margin: 10px 0 4px; }
label.btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; color: var(--text); background: var(--surface); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--brand-primary); }
textarea { min-height: 90px; }
/* Kenyan phone field: fixed flag and +254 in front of the number. */
.ke-tel { display: flex; align-items: stretch; width: 100%; }
.ke-tel .ke-cc { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--border-strong); border-right: 0; border-radius: 10px 0 0 10px; background: var(--page-bg); font-weight: 600; color: var(--text); white-space: nowrap; user-select: none; }
.ke-tel .ke-flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.ke-tel input { border-radius: 0 10px 10px 0; min-width: 0; flex: 1 1 auto; }
@media (min-width: 560px) { .grid > div:has(.ke-tel) { grid-column: span 2; } }
.ke-phones .ke-tel { margin: 0 0 6px; }
/* Pills always carry a word, so colour is never the only cue. */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--tint-green); color: var(--brand-green-text); }
.pill.warn { background: var(--tint-orange); color: var(--brand-orange-text); } .pill.bad { background: var(--tint-red); color: var(--brand-error); } .pill.off { background: var(--disabled-bg); color: var(--text-muted); }
.note { background: var(--tint-orange); border-left: 4px solid var(--brand-orange); border-radius: 12px; padding: 10px 12px; font-size: .9rem; color: var(--text); }
.ok { background: var(--tint-green); border-left: 4px solid var(--brand-green); border-radius: 12px; padding: 10px 12px; color: var(--text); }
.err { background: var(--tint-red); border-left: 4px solid var(--brand-error); color: #8A0000; border-radius: 12px; padding: 10px 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; margin: 0 0 8px; cursor: pointer; background: var(--surface); width: 100%; font: inherit; color: var(--text); text-align: left; }
.option:hover { border-color: var(--brand-primary); }
.option[aria-pressed="true"] { border-color: var(--brand-primary); background: var(--tint-blue); box-shadow: inset 4px 0 0 var(--brand-primary); }
.option strong { color: var(--brand-navy); }
.stat { font-size: 1.6rem; font-weight: 800; color: var(--brand-navy); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--brand-primary); color: #fff; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; color: #fff; }
footer { color: var(--text-muted); font-size: .8rem; padding: 24px 16px; text-align: center; }
@media (prefers-reduced-motion: no-preference) { .fade { animation: fade .25s ease-out; } @keyframes fade { from { opacity: 0; transform: translateY(4px); } } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* --- Static pages (advertise, sponsor, privacy) --------------------------------------------- */
.brand { background: var(--surface); border-bottom: 1px solid var(--border); }
.brand::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--brand-primary) 0 60%, var(--brand-green) 60% 85%, var(--brand-orange) 85%); }
.brand .inner { max-width: 720px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.brand a.home { display: inline-flex; border-radius: 8px; }
.brand img { display: block; height: 48px; width: auto; }
.brand .tag { color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--tint-blue), var(--surface) 70%); border: 1px solid var(--border); border-radius: 18px; padding: 24px 20px; margin: 0 0 16px; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 170px; height: 170px; border-radius: 50%; background: var(--tint-green); opacity: .8; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: var(--brand-navy); font-size: 1.6rem; }
footer .footer-logo { display: block; margin: 0 auto 8px; height: 40px; width: auto; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* Shown on payment pages while Paystack uses test keys. */
.test-banner { background: var(--gold-tint, #FFF4E5); border: 2px dashed #FD9101; border-radius: 12px; padding: 10px 12px; font-size: .92rem; margin: 0 0 12px; }
.test-banner strong { color: #B45309; }

/* Invoice page: who the invoice is from */
.inv-from { display: grid; gap: 2px; font-size: .85rem; color: var(--text-muted, #5B6576); border-bottom: 1px solid var(--border, #DCE3EC); padding-bottom: 10px; margin-bottom: 12px; }
.inv-from strong { color: var(--brand-navy, #012A5E); font-size: .95rem; }
