/* =====================================================================
   Team Divine · CSPC Digital Clearance
   Every colour comes from a variable, so one theme = one block below.
   Light: ocean (default), forest, sunset   ·   Dark: midnight, charcoal, forest
   ===================================================================== */
:root, html[data-theme="light-ocean"] {
  --heading:#0b1f4b; --text:#1a2233; --muted:#5b6578; --line:#d9e0ee;
  --surface:#fff; --surface-2:#f0f5ff; --field-bg:#fff; --field-line:#c5cee0; --nav-bg:#fff; --nav-hover:#e8effc;
  --brand:#1556c0; --brand-d:#0f44a0; --brand-ink:#fff; --accent:#fba01c; --accent-d:#e58d0c; --accent-ink:#1a1200; --link:#1556c0;
  --ok:#13795b; --ok-bg:#dff5ea; --warn:#9a5b00; --warn-bg:#fff3d6; --bad:#b42318; --bad-bg:#fde4e1; --info:#2d4a8a; --info-bg:#e8eefb; --neutral-bg:#eef0f4; --neutral:#3d4556;
  --ov1:rgba(8,24,70,.35); --ov2:rgba(8,24,70,.5); --foot-bg:rgba(8,24,70,.85); --shadow:0 8px 24px rgba(0,0,0,.18); color-scheme:light;
}
html[data-theme="light-forest"] {
  --heading:#0f3d28; --text:#16241c; --muted:#456055; --line:#a6d2b5; --surface:#d9f2e1; --surface-2:#c4e8d1; --field-bg:#f1fbf4; --field-line:#8fc3a2; --nav-bg:#cdeed8; --nav-hover:#b6e3c5;   /* boxes are GREEN in this theme */
  --brand:#1f7a4d; --brand-d:#17613c; --brand-ink:#fff; --accent:#f2b01e; --accent-d:#d99a0d; --accent-ink:#1d1500; --link:#1a7046;
  --ov1:rgba(6,40,24,.4); --ov2:rgba(6,40,24,.55); --foot-bg:rgba(6,40,24,.88);
}
html[data-theme="light-sunset"] {
  --heading:#4a1230; --text:#2a1721; --muted:#69505b; --line:#eeb3cb; --surface:#ffe1ec; --surface-2:#ffcfe0; --field-bg:#fff2f7; --field-line:#e5a3bd; --nav-bg:#ffd8e6; --nav-hover:#ffc3d9;   /* boxes are PINK in this theme */
  --brand:#b0306a; --brand-d:#8e2655; --brand-ink:#fff; --accent:#f5a623; --accent-d:#dd9112; --accent-ink:#241500; --link:#a02a60;
  --ov1:rgba(60,10,35,.4); --ov2:rgba(60,10,35,.55); --foot-bg:rgba(60,10,35,.88);
}
html[data-theme="dark-midnight"] {
  --heading:#f1f5ff; --text:#e6ebf7; --muted:#a3aecb; --line:#2c3858; --surface:#161e33; --surface-2:#1d2744; --field-bg:#0f1626; --field-line:#3a4870; --nav-bg:#121a2e; --nav-hover:#1f2a48;
  --brand:#5b9bff; --brand-d:#7bb0ff; --brand-ink:#04122e; --accent:#fbb040; --accent-d:#ffc062; --accent-ink:#1a1200; --link:#8ab8ff;
  --ok:#5fd3a3; --ok-bg:#103a2d; --warn:#f5c060; --warn-bg:#3b2f10; --bad:#ff8f85; --bad-bg:#431a1c; --info:#a6bcf0; --info-bg:#1d2c52; --neutral-bg:#252f4a; --neutral:#c4cde6;
  --ov1:rgba(4,8,22,.72); --ov2:rgba(4,8,22,.84); --foot-bg:rgba(4,8,22,.92); --shadow:0 8px 24px rgba(0,0,0,.5); color-scheme:dark;
}
html[data-theme="dark-charcoal"] {
  --heading:#fff; --text:#ececec; --muted:#a4a8b0; --line:#3a3d43; --surface:#1f2023; --surface-2:#2a2c30; --field-bg:#151618; --field-line:#4a4e56; --nav-bg:#18191b; --nav-hover:#2a2c30;
  --brand:#2dd4bf; --brand-d:#5eead4; --brand-ink:#04211d; --accent:#f59e0b; --accent-d:#fbb83a; --accent-ink:#1a1100; --link:#5eead4;
  --ok:#6ee7b7; --ok-bg:#12372b; --warn:#fbbf24; --warn-bg:#3a2e0c; --bad:#fb9a90; --bad-bg:#43191a; --info:#a5c4f5; --info-bg:#22304d; --neutral-bg:#2d3035; --neutral:#c7cad0;
  --ov1:rgba(0,0,0,.7); --ov2:rgba(0,0,0,.82); --foot-bg:rgba(0,0,0,.92); --shadow:0 8px 24px rgba(0,0,0,.55); color-scheme:dark;
}
html[data-theme="dark-forest"] {
  --heading:#f0fff5; --text:#e4f0e8; --muted:#9db8a9; --line:#2b4034; --surface:#14211a; --surface-2:#1b2c22; --field-bg:#0d1711; --field-line:#3a5645; --nav-bg:#101b15; --nav-hover:#1d3126;
  --brand:#4ade80; --brand-d:#86efac; --brand-ink:#052e16; --accent:#facc15; --accent-d:#fde047; --accent-ink:#1d1700; --link:#86efac;
  --ok:#86efac; --ok-bg:#133a24; --warn:#fcd34d; --warn-bg:#3a3010; --bad:#fca5a5; --bad-bg:#431c1c; --info:#a3c9f5; --info-bg:#1c3050; --neutral-bg:#243428; --neutral:#c3d6ca;
  --ov1:rgba(2,14,8,.72); --ov2:rgba(2,14,8,.84); --foot-bg:rgba(2,14,8,.92); --shadow:0 8px 24px rgba(0,0,0,.55); color-scheme:dark;
}

* { box-sizing:border-box; }
body { margin:0; font-family:'Plus Jakarta Sans','Segoe UI',system-ui,sans-serif; color:var(--text); line-height:1.5; }
a { color:var(--link); }
.skip { position:absolute; left:-999px; } .skip:focus { left:8px; top:8px; background:var(--surface); color:var(--text); padding:.5rem 1rem; z-index:99; }
:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
[hidden] { display:none !important; }

/* ---------- logged-on pages: campus photo behind everything ---------- */
body.app { min-height:100vh; display:flex; flex-direction:column; background:linear-gradient(var(--ov1),var(--ov2)),url(/img/campus.jpg) center/cover fixed; }
.topbar { background:var(--nav-bg); border-bottom:4px solid var(--accent); box-shadow:0 2px 10px rgba(0,0,0,.25); position:sticky; top:0; z-index:30; }   /* stays at the top while the page scrolls */
html { scroll-padding-top:6rem; }
.topbar-in { max-width:1180px; margin:0 auto; padding:.5rem 1rem; display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.brand { display:flex; align-items:center; gap:.7rem; text-decoration:none; color:var(--heading); }
.brand img { height:46px; width:auto; }
.brand strong { display:block; font-size:1.05rem; line-height:1.1; } .brand small { color:var(--muted); font-size:.75rem; }
.topbar nav { display:flex; gap:.2rem; flex-wrap:wrap; flex:1; align-items:center; }
.topbar nav > a, .navgroup > summary { padding:.45rem .8rem; border-radius:8px; text-decoration:none; color:var(--heading); font-weight:600; font-size:.92rem; cursor:pointer; list-style:none; }
.topbar nav > a:hover, .navgroup > summary:hover, .navgroup[open] > summary { background:var(--nav-hover); }
.navgroup { position:relative; } .navgroup > summary::-webkit-details-marker { display:none; } .navgroup > summary::after { content:' ▾'; font-size:.75rem; }
.menu { position:absolute; top:calc(100% + 4px); left:0; min-width:190px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:.35rem; z-index:30; }
.menu a, .menu button { display:block; width:100%; text-align:left; padding:.5rem .7rem; border-radius:8px; text-decoration:none; color:var(--text); font:inherit; font-weight:600; font-size:.9rem; background:none; border:0; cursor:pointer; }
.menu a:hover, .menu button:hover { background:var(--nav-hover); } .menu .menu-h { margin:.4rem .7rem .1rem; font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; }
.menu button[aria-pressed="true"] { background:var(--nav-hover); outline:2px solid var(--brand); }
.dot { display:inline-block; width:18px; height:18px; border-radius:50%; vertical-align:-4px; margin-right:.5rem; background:linear-gradient(135deg,var(--d1) 50%,var(--d2) 50%); border:1px solid rgba(128,128,128,.5); }
.theme-menu { position:relative; } .theme-menu > summary { list-style:none; cursor:pointer; } .theme-menu > summary::-webkit-details-marker { display:none; } .theme-menu .menu { left:auto; right:0; min-width:210px; }
.who { display:flex; align-items:center; gap:.6rem; font-size:.9rem; color:var(--text); flex-wrap:wrap; }
.who form { margin:0; } .who .role { color:var(--muted); font-size:.75rem; display:block; }
.bell { position:relative; text-decoration:none; font-size:1.25rem; padding:.2rem .5rem; }
.bell .count { position:absolute; top:-4px; right:-2px; background:var(--bad); color:#fff; border-radius:99px; font-size:.68rem; font-weight:700; padding:0 .38rem; min-width:1.1rem; text-align:center; }
.container { width:100%; max-width:1180px; margin:0 auto; padding:1.25rem 1rem 2rem; flex:1; }
.foot { background:var(--foot-bg); color:#e6ecfa; text-align:center; padding:.9rem 1rem; font-size:.82rem; }

.panel { background:var(--surface); color:var(--text); border-radius:14px; padding:1.25rem 1.4rem; margin-bottom:1.1rem; box-shadow:var(--shadow); }
.panel h1, .panel h2 { margin:.1rem 0 .6rem; color:var(--heading); } .panel h1 { font-size:1.5rem; } .panel h2 { font-size:1.12rem; }
.row { display:flex; gap:1rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.muted { color:var(--muted); } small, .small { font-size:.85rem; }
.grid { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
.stat { background:var(--surface-2); border-radius:12px; padding:.9rem 1rem; } .stat b { display:block; font-size:1.8rem; color:var(--heading); }
details.help { margin:.4rem 0 .8rem; } details.help > summary { cursor:pointer; color:var(--link); font-weight:600; font-size:.9rem; } details.help > div { margin-top:.4rem; color:var(--muted); font-size:.9rem; }
.next { border-left:6px solid var(--brand); background:var(--surface-2); } .next.ok { border-color:var(--ok); } .next.warn { border-color:var(--accent); } .next.bad { border-color:var(--bad); }
.next h2 { margin-bottom:.2rem; } .next p { margin:.2rem 0 .6rem; }
.checks { list-style:none; margin:.3rem 0 0; padding:0; } .checks li { padding:.3rem 0; border-bottom:1px dashed var(--line); } .checks .done { color:var(--muted); text-decoration:line-through; }

.btn { display:inline-block; background:var(--accent); color:var(--accent-ink); border:0; border-radius:10px; padding:.6rem 1.1rem; font:inherit; font-weight:700; cursor:pointer; text-decoration:none; }
.btn:hover { background:var(--accent-d); } .btn[disabled] { opacity:.5; cursor:not-allowed; }
.btn-blue { background:var(--brand); color:var(--brand-ink); } .btn-blue:hover { background:var(--brand-d); }
.btn-ghost { background:transparent; border:1.5px solid var(--line); color:var(--heading); } .btn-ghost:hover { background:var(--nav-hover); }
.btn-danger { background:var(--bad); color:#fff; } .btn-sm { padding:.35rem .7rem; font-size:.85rem; }
form.inline { display:inline; margin:0; }

label { display:block; font-weight:600; color:var(--heading); margin:.8rem 0 .25rem; }
input, select, textarea { width:100%; padding:.65rem .8rem; border:1.5px solid var(--field-line); border-radius:10px; font:inherit; background:var(--field-bg); color:var(--text); }
input:focus, select:focus, textarea:focus { border-color:var(--brand); outline:2px solid var(--brand); outline-offset:0; }
input[type=checkbox], input[type=radio] { width:auto; accent-color:var(--brand); }
.field { margin-bottom:.4rem; } .field label { margin-top:.6rem; } .req { color:var(--bad); }
.hint { color:var(--muted); font-size:.82rem; margin-top:.2rem; }
.cols { display:grid; gap:0 1rem; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.cols3 { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); }
input.invalid, select.invalid, textarea.invalid { border-color:var(--bad); background:var(--bad-bg); }
.field-error { color:var(--bad); font-weight:600; font-size:.86rem; margin:.25rem 0 0; } .field-error::before { content:'⚠ '; }
.errors { background:var(--bad-bg); border:1px solid var(--bad); color:var(--bad); border-radius:10px; padding:.7rem 1rem; margin-bottom:1rem; }
.errors ul { margin:.3rem 0 0 1.1rem; padding:0; }
.flash { background:var(--ok-bg); border:1px solid var(--ok); color:var(--ok); padding:.7rem 1rem; border-radius:10px; font-weight:600; }
.pw-wrap { display:flex; gap:.4rem; } .pw-wrap input { flex:1; }
.checklist { list-style:none; margin:.4rem 0 0; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:.15rem .8rem; font-size:.85rem; color:var(--muted); }
.checklist li.ok { color:var(--ok); font-weight:600; }
.suggest { background:var(--info-bg); border:1px solid var(--info); border-radius:10px; padding:.6rem .9rem; margin:.4rem 0; } .suggest button { margin:.2rem .3rem .2rem 0; }
ol.steps { padding-left:1.2rem; } ol.steps li { margin:.3rem 0; }

table { width:100%; border-collapse:collapse; font-size:.93rem; }
th, td { text-align:left; padding:.6rem .55rem; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-size:.75rem; text-transform:uppercase; letter-spacing:.04em; }
.table-wrap { overflow-x:auto; } .empty { text-align:center; padding:2rem 1rem; color:var(--muted); }
.tabs { display:flex; gap:.4rem; margin:.3rem 0 .8rem; flex-wrap:wrap; }
.tabs a { padding:.35rem .8rem; border-radius:99px; background:var(--surface-2); text-decoration:none; font-weight:600; font-size:.86rem; color:var(--heading); }
.tabs a[aria-current] { background:var(--brand); color:var(--brand-ink); }
.filters { display:flex; gap:.6rem; flex-wrap:wrap; align-items:end; margin-bottom:1rem; } .filters .field { min-width:150px; flex:1; }

.badge { display:inline-block; padding:.12rem .6rem; border-radius:99px; font-size:.78rem; font-weight:700; white-space:nowrap; background:var(--neutral-bg); color:var(--neutral); }
.b-pending { background:var(--neutral-bg); color:var(--neutral); } .b-requested { background:var(--warn-bg); color:var(--warn); }
.b-cleared, .b-approved, .b-valid, .b-completed, .b-verified { background:var(--ok-bg); color:var(--ok); }
.b-rejected, .b-revoked, .b-cancelled, .b-on_hold { background:var(--bad-bg); color:var(--bad); }
.b-overdue { background:var(--bad); color:#fff; } .b-expired, .b-used, .b-in_progress, .b-sample { background:var(--info-bg); color:var(--info); } .b-unverified { background:var(--warn-bg); color:var(--warn); }
.locked { color:var(--muted); font-size:.85rem; }
.step { margin:1rem 0 .2rem; color:var(--heading); font-weight:700; font-size:.95rem; }
.bar { height:10px; background:var(--surface-2); border-radius:99px; overflow:hidden; border:1px solid var(--line); } .bar > i { display:block; height:100%; background:var(--ok); }
.notif { display:block; padding:.8rem 1rem; border-bottom:1px solid var(--line); text-decoration:none; color:inherit; }
.notif.unread { background:var(--surface-2); border-left:4px solid var(--accent); } .notif b { color:var(--heading); }
.qrbox { display:flex; gap:1.5rem; align-items:center; flex-wrap:wrap; } .qrbox img { width:220px; height:220px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.verdict { text-align:center; padding:1.6rem 1rem; border-radius:14px; margin-bottom:1rem; } .verdict h1 { margin:0; font-size:2.2rem; letter-spacing:.06em; }
.v-valid { background:var(--ok-bg); color:var(--ok); } .v-expired { background:var(--warn-bg); color:var(--warn); } .v-revoked, .v-invalid { background:var(--bad-bg); color:var(--bad); } .v-used { background:var(--info-bg); color:var(--info); }
dl.kv { display:grid; grid-template-columns:max-content 1fr; gap:.35rem 1.2rem; margin:0; } dl.kv dt { color:var(--muted); } dl.kv dd { margin:0; font-weight:600; }
.timeline { list-style:none; padding:0; margin:0; } .timeline li { border-left:4px solid var(--line); padding:.2rem 0 .9rem 1rem; }
.timeline li.s-cleared { border-color:var(--ok); } .timeline li.s-on_hold { border-color:var(--bad); } .timeline li.s-pending { border-color:var(--accent); }
.issue { background:var(--bad-bg); border-left:4px solid var(--bad); border-radius:8px; padding:.6rem .9rem; margin:.4rem 0; } .issue.resolved { background:var(--ok-bg); border-color:var(--ok); }
.bar-row { display:flex; justify-content:space-between; gap:1rem; padding:.3rem 0; border-bottom:1px dashed var(--line); }
.cred { background:var(--warn-bg); border:2px dashed var(--accent); border-radius:10px; padding:1rem; font-size:1.05rem; } .cred code, code { background:var(--surface-2); padding:.1rem .45rem; border-radius:6px; }
.cred code { font-size:1.2rem; }

/* ---------- login ---------- */
body.login { min-height:100vh; display:flex; flex-direction:column; background:linear-gradient(var(--ov1),var(--ov2)),url(/img/login-bg.jpg) center/cover fixed; }
.login-home { display:inline-block; margin:0 0 1rem -.35rem; padding:.4rem .8rem; border:1.5px solid var(--line); border-radius:10px; color:var(--heading); font-weight:700; font-size:.92rem; text-decoration:none; } .login-home:hover { background:var(--nav-hover); }   /* the theme chosen on the front page applies here automatically */
.login main { flex:1; display:grid; place-items:center; padding:2rem 1rem; }
.login-card { width:100%; max-width:520px; background:var(--surface); color:var(--text); border-radius:16px; border-top:6px solid var(--accent); padding:2.2rem 2.5rem 2.4rem; box-shadow:0 20px 50px rgba(0,0,0,.4); }
.login-card .eyebrow { color:var(--link); font-weight:700; font-size:1.1rem; margin:0; } .login-card h1 { margin:.1rem 0 .4rem; font-size:2.1rem; color:var(--heading); }
.login-card .sub { color:var(--text); margin:0 0 .8rem; font-size:1.05rem; }
.pill { display:inline-block; background:var(--info-bg); color:var(--info); font-weight:700; font-size:.88rem; padding:.25rem .8rem; border-radius:99px; margin-bottom:.6rem; }
.login-card label { margin-top:1rem; font-size:1.05rem; } .login-card input { padding:.9rem 1rem; font-size:1.05rem; border-radius:8px; }
.login-card .btn { width:100%; margin-top:1.6rem; padding:1rem; font-size:1.2rem; border-radius:8px; }
.login .foot { padding:1.2rem 1rem; font-size:.95rem; }

/* ---------- printable sheets: always light, so they print correctly ---------- */
body.sheet { background:#e9edf5; font-family:'Segoe UI',system-ui,sans-serif; color:#1a2233; }
.paper { max-width:820px; margin:1rem auto; background:#fff; color:#1a2233; padding:2rem 2.2rem; box-shadow:0 6px 24px rgba(0,0,0,.2); position:relative; }
.paper h1 { text-align:center; margin:.2rem 0; font-size:1.25rem; color:#0b1f4b; } .paper .head { text-align:center; border-bottom:3px double #0b1f4b; padding-bottom:.6rem; margin-bottom:.8rem; }
.paper .head img { height:70px; } .paper table { font-size:.88rem; } .paper th { background:#f0f4fb; color:#5b6578; } .paper th, .paper td { border-bottom-color:#d9e0ee; }
.paper .muted { color:#5b6578; } .paper code { background:#f0f4fb; } .paper .qrbox img { border-color:#d9e0ee; }
.watermark { position:absolute; inset:0; display:grid; place-items:center; font-size:4rem; font-weight:800; color:rgba(180,35,24,.12); transform:rotate(-25deg); pointer-events:none; text-align:center; }
.sigcell { font-size:.78rem; color:#333; } .sigcell b { display:block; font-size:.92rem; }

@media (max-width:760px) {
  .topbar nav { order:3; width:100%; } .menu { position:static; box-shadow:none; margin-top:.2rem; } .navgroup { width:100%; } .theme-menu .menu { position:absolute; }
  .topbar nav > a, .navgroup > summary { padding:.35rem .5rem; font-size:.85rem; } th, td { padding:.45rem .35rem; } dl.kv { grid-template-columns:1fr; } .login-card { padding:1.5rem 1.25rem; }
}
/* phones: the header is sticky, so keep it short: one row for logo + account buttons, one swipeable row for the menu */
@media (max-width:760px) {
  .topbar-in { padding:.35rem .6rem; gap:.2rem .5rem; }
  .brand { flex:1 1 0; min-width:0; gap:.5rem; } .brand img { height:34px; } .brand strong { font-size:.82rem; } .brand small { display:none; }
  .who { margin-left:auto; flex:none; gap:.1rem; flex-wrap:nowrap; } .who .theme-menu > summary { white-space:nowrap; padding:.35rem .55rem; } .bell { padding:.2rem .35rem; }
  .who .user-menu > summary { display:block; max-width:6.2rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:.35rem .4rem; }
  .topbar nav { order:3; flex:0 0 100%; flex-wrap:nowrap; overflow-x:auto; gap:.15rem; padding-bottom:.15rem; scrollbar-width:none; }
  .topbar nav::-webkit-scrollbar { display:none; }
  .topbar nav > a, .topbar nav .navgroup > summary { white-space:nowrap; flex:none; display:flex; align-items:center; min-height:38px; }
  .topbar nav .navgroup { width:auto; flex:none; }
  .topbar nav .menu { position:fixed; left:.6rem; right:.6rem; top:auto; min-width:0; margin-top:.3rem; box-shadow:var(--shadow); max-height:60vh; overflow-y:auto; }
}
@media print { body.app, body.sheet { background:#fff; } .topbar nav, .who, .foot, .no-print, .flash, .theme-menu { display:none !important; } .panel { box-shadow:none; } .paper { box-shadow:none; margin:0; max-width:none; padding:0; } }

/* ---------- public front page (views/home.ejs) ---------- */
body.lp { min-height:100vh; display:flex; flex-direction:column; background:var(--surface-2); color:var(--text); }
.lp-top { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; padding:.6rem 1.25rem; background:var(--nav-bg); border-bottom:4px solid var(--accent); position:sticky; top:0; z-index:20; }
.lp-top nav { display:flex; gap:.25rem; margin-left:auto; flex-wrap:wrap; } .lp-top nav a { padding:.4rem .75rem; border-radius:8px; text-decoration:none; color:var(--heading); font-weight:600; font-size:.92rem; } .lp-top nav a:hover { background:var(--nav-hover); }
.lp-actions { display:flex; align-items:center; gap:.6rem; }
body.lp main { flex:1; }
.lp-hero { position:relative; overflow:hidden; padding:2.2rem 1.25rem 2.4rem; color:#fff; background:linear-gradient(var(--ov1),var(--ov2)),url(/img/campus.jpg) center/cover; }
.lp-hero .eyebrow { font-weight:700; letter-spacing:.04em; margin:0 0 .5rem; color:#fff; opacity:.9; }
.lp-hero h1 { font-size:clamp(1.7rem,3.6vw,2.5rem); line-height:1.12; margin:.2rem 0 .8rem; color:#fff; }
.lp-hero .lead { max-width:56ch; margin:0 0 1.1rem; font-size:1rem; }
.lp-hero .lp-ghost { color:#fff; border-color:rgba(255,255,255,.7); } .lp-hero .lp-ghost:hover { background:rgba(255,255,255,.15); }
.lp-hero .btn { padding:.6rem 1.2rem; font-size:.95rem; }
.lp-section { max-width:1080px; margin:0 auto; padding:2rem 1.25rem .8rem; }
.lp-section h2, .lp-cta h2 { font-size:1.7rem; color:var(--heading); margin:0 0 .3rem; text-align:center; }
.lp-sub { text-align:center; color:var(--muted); margin:0 auto 1.6rem; max-width:60ch; }
.lp-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1rem; }
.lp-card { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:1.1rem 1.2rem; box-shadow:var(--shadow); }
.lp-card h3 { margin:0 0 .4rem; font-size:1.05rem; color:var(--heading); } .lp-card p { margin:0; color:var(--text); font-size:.95rem; }
.lp-steps { list-style:none; counter-reset:s; padding:0; margin:1.4rem 0 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:1rem; }
.lp-steps li { counter-increment:s; background:var(--surface); border:1px solid var(--line); border-top:5px solid var(--brand); border-radius:14px; padding:1rem 1.1rem; }
.lp-steps li::before { content:counter(s); display:inline-grid; place-items:center; width:2rem; height:2rem; border-radius:50%; background:var(--brand); color:var(--brand-ink); font-weight:800; margin-bottom:.4rem; }
.lp-steps b { display:block; color:var(--heading); } .lp-steps span { color:var(--muted); font-size:.93rem; }
.lp-team { display:flex; flex-wrap:wrap; justify-content:center; gap:2rem; margin-top:1rem; }
.lp-person { margin:0; text-align:center; width:200px; }
.lp-person img { width:200px; height:200px; object-fit:cover; border-radius:50%; border:5px solid var(--accent); box-shadow:var(--shadow); background:var(--surface); }
.lp-person figcaption { margin-top:.7rem; color:var(--heading); }
.lp-cta { text-align:center; margin:3rem auto 3rem; padding:2rem 1.25rem; max-width:720px; background:var(--surface); border-radius:16px; border-top:6px solid var(--accent); box-shadow:var(--shadow); }
.lp-cta p { color:var(--muted); }

/* ---------- front page motion (all of it is switched off for people who prefer reduced motion) ---------- */
.lp-hero-in { position:relative; z-index:1; max-width:1080px; margin:0 auto; display:grid; grid-template-columns:1.15fr .85fr; gap:2rem; align-items:center; }
.lp-blob { position:absolute; border-radius:50%; filter:blur(48px); opacity:.5; animation:lp-float 14s ease-in-out infinite; }
.lp-blob.b1 { width:320px; height:320px; background:var(--accent); top:-90px; left:-70px; }
.lp-blob.b2 { width:380px; height:380px; background:var(--brand); bottom:-140px; right:8%; animation-duration:18s; animation-delay:-5s; }
.lp-blob.b3 { width:220px; height:220px; background:#fff; top:30%; right:-60px; opacity:.22; animation-duration:22s; animation-delay:-9s; }
@keyframes lp-float { 0%,100% { transform:translate(0,0) scale(1); } 33% { transform:translate(40px,30px) scale(1.12); } 66% { transform:translate(-30px,50px) scale(.94); } }
.lp-swap { color:var(--accent); display:inline-block; transition:opacity .35s, transform .35s; } .lp-swap.out { opacity:0; transform:translateY(-.3em); }
.lp-hero-text > * { animation:lp-rise .8s both; } .lp-hero-text > :nth-child(2) { animation-delay:.1s; } .lp-hero-text > :nth-child(3) { animation-delay:.2s; } .lp-hero-text > :nth-child(4) { animation-delay:.3s; } .lp-hero-text > :nth-child(5) { animation-delay:.4s; }
@keyframes lp-rise { from { opacity:0; transform:translateY(22px); } to { opacity:1; transform:none; } }
.lp-demo { background:var(--surface); color:var(--text); border-radius:18px; padding:1.1rem 1.2rem 1.2rem; box-shadow:0 24px 60px rgba(0,0,0,.45); border-top:6px solid var(--accent); animation:lp-bob 6s ease-in-out infinite; }
@keyframes lp-bob { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-9px); } }
.lp-demo-head { display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-bottom:.7rem; color:var(--heading); font-size:.92rem; }
.lp-demo-state { font-size:.75rem; font-weight:700; padding:.15rem .6rem; border-radius:99px; background:var(--warn-bg); color:var(--warn); } .lp-demo.done .lp-demo-state { background:var(--ok-bg); color:var(--ok); }
.lp-demo-list { list-style:none; margin:0; padding:0; display:grid; gap:.4rem; }
.lp-demo-list li { display:flex; align-items:center; gap:.65rem; padding:.35rem .6rem; border-radius:10px; background:var(--surface-2); border:1px solid var(--line); transition:background .4s, border-color .4s, transform .4s; font-weight:600; font-size:.93rem; }
.lp-demo-list li i { width:1.35rem; height:1.35rem; border-radius:50%; border:2px solid var(--field-line); display:inline-grid; place-items:center; flex:none; transition:all .4s; font-style:normal; font-size:.8rem; color:transparent; }
.lp-demo-list li i::after { content:"✓"; } .lp-demo-list li em { margin-left:auto; font-style:normal; font-size:.72rem; color:var(--muted); font-weight:600; }
.lp-demo-list li.ok { background:var(--ok-bg); border-color:var(--ok); transform:translateX(4px); } .lp-demo-list li.ok i { background:var(--ok); border-color:var(--ok); color:#fff; }
.lp-demo-bar { height:8px; border-radius:99px; background:var(--neutral-bg); margin:.9rem 0 .7rem; overflow:hidden; } .lp-demo-bar span { display:block; height:100%; width:0; background:linear-gradient(90deg,var(--brand),var(--ok)); transition:width .6s; }
.lp-demo-done { display:flex; align-items:center; gap:.7rem; opacity:.25; transform:scale(.97); transition:opacity .5s, transform .5s; color:var(--heading); } .lp-demo.done .lp-demo-done { opacity:1; transform:none; }
.lp-demo-done small { display:block; color:var(--muted); }
.lp-qr { width:42px; height:42px; flex:none; border-radius:6px; background:conic-gradient(var(--heading) 25%,transparent 0 50%,var(--heading) 0 75%,transparent 0) 0 0/14px 14px, var(--surface-2); border:3px solid var(--heading); }
.lp-js .lp-reveal { opacity:0; transform:translateY(26px); transition:opacity .6s ease, transform .6s ease; } .lp-js .lp-reveal.in { opacity:1; transform:none; }   /* hidden only while the script is running, so the page never stays blank without it */
.lp-card.lp-reveal.in:hover { transform:translateY(-5px); transition-duration:.2s; }
.lp-person img { transition:transform .3s; } .lp-person:hover img { transform:scale(1.07) rotate(-2deg); }
@media (max-width:860px) { .lp-hero-in { grid-template-columns:1fr; } .lp-hero-text { text-align:center; } .lp-hero .lead { margin-inline:auto; } }
/* ---------- phones and small tablets ---------- */
html { -webkit-text-size-adjust:100%; }
@media (max-width:860px) { .lp-hero { padding:2.6rem 1rem 3rem; } .lp-hero-in { gap:1.6rem; } }
@media (max-width:700px) {
  .lp-top { padding:.5rem max(.9rem, env(safe-area-inset-right)) .4rem max(.9rem, env(safe-area-inset-left)); gap:.4rem .6rem; position:sticky; }
  .lp-top .brand img { width:36px; height:36px; } .lp-top .brand strong { font-size:.98rem; }
  .lp-actions { margin-left:auto; gap:.4rem; } .lp-actions .btn { padding:.5rem .95rem; min-height:40px; }
  .lp-top nav { display:flex; order:3; flex:0 0 100%; margin:0 -.2rem; padding:.1rem 0 .2rem; overflow-x:auto; flex-wrap:nowrap; justify-content:center; gap:.2rem; scrollbar-width:none; }
  .lp-top nav::-webkit-scrollbar { display:none; }
  .lp-top nav a { white-space:nowrap; padding:.5rem .85rem; min-height:40px; display:inline-flex; align-items:center; background:var(--surface-2); }
  .lp-hero h1 { font-size:clamp(1.75rem, 8.2vw, 2.3rem); }
  .lp-hero .lead { font-size:1rem; }
  .lp-hero-text p .btn { display:block; width:100%; text-align:center; margin:.45rem 0 0; padding:.85rem 1rem; }
  .lp-blob.b1 { width:200px; height:200px; } .lp-blob.b2 { width:240px; height:240px; } .lp-blob.b3 { display:none; }
  .lp-demo { padding:.9rem 1rem 1rem; border-radius:16px; } .lp-demo-list li { padding:.45rem .6rem; font-size:.9rem; }
  .lp-section { padding:2.2rem 1rem .5rem; } .lp-section h2, .lp-cta h2 { font-size:1.4rem; } .lp-sub { margin-bottom:1.1rem; font-size:.95rem; }
  .lp-grid { gap:.75rem; } .lp-card { padding:.9rem 1rem; }
  .lp-steps { grid-template-columns:repeat(2, 1fr); gap:.7rem; } .lp-steps li { padding:.8rem .8rem; } .lp-steps span { font-size:.85rem; }
  .lp-team { display:grid; grid-template-columns:repeat(3, 1fr); gap:.6rem; margin-top:.4rem; }
  .lp-person { width:auto; } .lp-person img { width:100%; max-width:120px; height:auto; aspect-ratio:1; border-width:3px; margin:0 auto; display:block; }
  .lp-person figcaption { font-size:.8rem; line-height:1.25; margin-top:.5rem; }
  .lp-cta { margin:2rem .9rem; padding:1.5rem 1rem; } .lp-cta .btn { display:block; width:100%; max-width:320px; margin:.6rem auto 0; padding:.85rem 1rem; }
  .foot { padding:.9rem max(1rem, env(safe-area-inset-right)) calc(.9rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
  .lp-section { scroll-margin-top:7.5rem; }
}
@media (max-width:420px) { .lp-top .brand small { display:none; } .lp-top .brand { gap:.5rem; } .lp-actions .btn { padding:.5rem .75rem; } .lp-actions summary.btn { padding:.5rem .65rem; } }
@media (max-width:360px) { .lp-top .brand small { display:none; } .lp-steps { grid-template-columns:1fr; } .lp-person figcaption { font-size:.74rem; } }
@media (hover:none) { .lp-card.lp-reveal.in:hover { transform:none; } .lp-person:hover img { transform:none; } }
@media (prefers-reduced-motion:reduce) { .lp-blob, .lp-demo, .lp-hero-text > * { animation:none !important; } .lp-js .lp-reveal { opacity:1; transform:none; transition:none; } .lp-swap, .lp-demo-list li, .lp-demo-bar span { transition:none; } }

/* ---------- home page: hidden Features section + sizes that follow the device ---------- */
.lp-section[hidden] { display:none; }
.lp-hero { min-height:clamp(420px, 78vh, 760px); display:flex; align-items:center; }   /* the banner fills the screen, so nothing below it peeks in */
.lp-hero-in { width:100%; }
img, video { max-width:100%; }
.lp-demo { width:100%; max-width:520px; margin-inline:auto; }

/* tablets (portrait and landscape) */
@media (min-width:701px) and (max-width:1024px) {
  .lp-hero-in { grid-template-columns:1fr; max-width:720px; text-align:center; }
  .lp-hero .lead { margin-inline:auto; }
  .lp-hero h1 { font-size:clamp(2.2rem, 6vw, 3rem); }
  .lp-grid { grid-template-columns:repeat(2, 1fr); }
  .lp-steps { grid-template-columns:repeat(2, 1fr); }
  .lp-top nav a { padding:.45rem .6rem; }
}
/* big monitors */
@media (min-width:1500px) {
  .lp-section, .lp-hero-in { max-width:1280px; }
  .lp-hero h1 { font-size:3.8rem; } .lp-hero .lead { font-size:1.25rem; max-width:60ch; }
}
/* phones held sideways: keep the banner short */
@media (max-height:520px) and (orientation:landscape) {
  .lp-hero { min-height:0; padding:1.4rem 1rem; }
  .lp-hero-in { grid-template-columns:1fr 1fr; gap:1rem; } .lp-hero-text { text-align:left; }
  .lp-top { position:static; }
}
/* small phones */
@media (max-width:700px) {
  .lp-hero { min-height:auto; padding-block:2rem; }
  .lp-section[id] { scroll-margin-top:7.5rem; }
}
@media (max-width:380px) { .lp-steps { grid-template-columns:1fr; } .lp-team { grid-template-columns:repeat(2, 1fr); } .lp-hero h1 { font-size:1.6rem; } }
