/* Smile Business - one design system for every page (marketing, sign-in, dashboards).
   Smile Corp's navy and gold, built on layered surfaces, a 4px spacing grid and one radius scale,
   so everything lines up. Class names are the ones the page scripts already use. */
:root {
  --bg: #060d19; --bg-2: #0a1424; --surface: #0d192c; --surface-2: #112038; --surface-3: #172a47; --surface-4: #1d3355;
  --card: var(--surface); --card-2: var(--surface-2); --card-3: var(--surface-3);
  --gold: #f2c200; --gold-2: #ffd84d; --gold-3: #ffe58a; --ink: #1a1400;
  --gold-soft: rgba(242,194,0,.12); --gold-line: rgba(242,194,0,.36); --gold-glow: rgba(242,194,0,.28);
  --text: #f4f7fc; --text-2: #c9d4e3; --muted: #8b9cb4; --faint: #5f7290;
  --line: rgba(160,186,224,.10); --line-2: rgba(160,186,224,.18); --line-3: rgba(160,186,224,.28);
  --ok: #4ade80; --ok-soft: rgba(74,222,128,.12); --warn: #fcd34d; --warn-soft: rgba(252,211,77,.12);
  --bad: #f87171; --bad-soft: rgba(248,113,113,.12); --blue: #60a5fa; --blue-soft: rgba(96,165,250,.13);
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 1px 2px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.22);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.05) inset, 0 30px 80px rgba(0,0,0,.55);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font: 14.5px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--gold); color: var(--ink); }
a { color: var(--gold); text-decoration: none; } a:hover { color: var(--gold-2); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .45em; font-family: var(--display); letter-spacing: -.02em; font-weight: 800; color: var(--text); }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 16px; letter-spacing: -.01em; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .stack { display: grid; gap: 14px; }
code { background: var(--surface-3); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: var(--r-xs); font: 12.5px ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--gold-3); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); font-family: var(--display); letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.brand img.mark { display: block; box-shadow: 0 4px 14px var(--gold-glow); }
.brand b { color: var(--gold); font-weight: 800; }

/* ---------- buttons */
.btn { --bh: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--bh); padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); color: var(--text); font: 600 14px/1 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, var(--shadow-sm); transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.btn:hover { border-color: var(--line-3); background: linear-gradient(180deg, var(--surface-4), var(--surface-3)); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg.i { width: 16px; height: 16px; }
.btn-primary, .btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: rgba(255,216,77,.6); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 6px 18px -6px var(--gold-glow); }
.btn-primary:hover, .btn-gold:hover { background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); border-color: var(--gold-2); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 26px -8px var(--gold-glow); }
.btn-danger { background: var(--bad-soft); border-color: rgba(248,113,113,.35); color: #fecaca; box-shadow: none; }
.btn-danger:hover { background: rgba(248,113,113,.2); border-color: var(--bad); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; } .btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-sm { --bh: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; } .btn-lg { --bh: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--gold); padding: 0; font: inherit; cursor: pointer; }

/* ---------- forms */
.field { display: grid; gap: 7px; min-width: 0; } .field > span { font-weight: 600; font-size: 13px; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12.5px; }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 10px; font: 14.5px var(--font); color: var(--text);
  background: var(--bg-2); box-shadow: 0 1px 2px rgba(0,0,0,.25) inset; transition: border-color .15s, box-shadow .15s, background .15s; }
textarea.input { line-height: 1.5; resize: vertical; }
select.input { appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9cb4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.input::placeholder { color: var(--faint); } select.input option { background: var(--surface-2); color: var(--text); }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); background: var(--surface); }
.input:disabled { opacity: .55; cursor: not-allowed; }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 16px; height: 16px; margin: 0; flex: none; cursor: pointer; }
label.row { cursor: pointer; }
.error { color: var(--bad); font-size: 13px; min-height: 0; margin: 0; } .error:empty { display: none; }
.ok-text { color: var(--ok); font-size: 13.5px; margin: 0; }

/* ---------- badges, ticks */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font: 600 11.5px/1 var(--font); letter-spacing: .01em;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(74,222,128,.22); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(252,211,77,.22); }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: rgba(248,113,113,.22); }
.badge.gold { background: var(--gold-soft); color: var(--gold-2); border-color: var(--gold-line); }
.badge.navy { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.badge.blue { background: var(--blue-soft); color: var(--blue); border-color: rgba(96,165,250,.22); }
.badge.ok::before, .badge.warn::before, .badge.bad::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tick { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: linear-gradient(180deg, #4f9bff, #2563eb); color: #fff; font-size: 10px; font-weight: 900;
  vertical-align: 1px; margin-left: 6px; box-shadow: 0 0 0 2px rgba(37,99,235,.18); }
h1 .tick { width: 22px; height: 22px; font-size: 13px; vertical-align: 3px; }

/* ---------- cards, tables */
.card { background: linear-gradient(180deg, rgba(255,255,255,.012), transparent 40%), var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card-body { padding: 20px 22px; }
.card-head { min-height: 58px; padding: 14px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 15px; }
.card > p.muted.small { margin: 14px 22px 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: left; font: 600 11.5px/1 var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 12px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); white-space: nowrap; }
.tbl td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 22px; } .tbl th:last-child, .tbl td:last-child { padding-right: 22px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; } .tbl tbody tr:hover { background: rgba(160,186,224,.035); }
.tbl td .muted.small, .tbl td div.muted { margin-top: 2px; }
.tbl td > .row { flex-wrap: nowrap; }

/* ---------- feedback */
.toast { position: fixed; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px)); padding: 13px 16px 13px 14px;
  background: var(--surface-3); border: 1px solid var(--line-3); border-left: 3px solid var(--ok); color: var(--text); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 99; font-size: 14px; animation: toast-in .25s var(--ease); }
.toast.bad { border-left-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r); background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--text-2); font-size: 14px; line-height: 1.5; }
.notice > :last-child { margin-bottom: 0; }
.quote { white-space: pre-wrap; padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: 14px; } .kv > span:nth-child(odd) { color: var(--muted); }

/* ---------- modal */
.modal-back { position: fixed; inset: 0; background: rgba(3,8,16,.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .18s ease; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: pop .22s var(--ease); }
.modal.wide { max-width: 780px; }
.modal > .card-head { position: sticky; top: 0; z-index: 1; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.modal > .card-head [data-x] { width: 32px; padding: 0; }
.modal-foot { position: sticky; bottom: 0; padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; background: var(--surface); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.modal-foot:empty { display: none; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- tabs, steps, choices, meters */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); flex-wrap: wrap; }
.tabs .btn { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.tabs .btn:hover { color: var(--text); background: var(--surface-2); }
.tabs .btn.on { background: var(--surface-3); border-color: var(--line-2); color: var(--text); box-shadow: var(--shadow-sm); }
.steps { display: flex; gap: 6px; margin: 18px 0 2px; } .steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); } .steps i.on { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.choice { display: grid; gap: 10px; }
.choice label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; cursor: pointer; background: var(--bg-2); transition: border-color .15s, background .15s; }
.choice label:hover { border-color: var(--line-3); }
.choice label:has(input:checked) { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), transparent); box-shadow: 0 0 0 3px var(--gold-soft); }
.choice input { margin-top: 3px; }
.meter { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 12px; } .meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }

/* =====================================================================================
   Sign-in, sign-up, set-up, apply
   ===================================================================================== */
.auth-bg { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background-color: var(--bg); background-size: cover; background-position: center; isolation: isolate;
  background-image: radial-gradient(700px 480px at 85% 105%, rgba(96,165,250,.13), transparent 60%), radial-gradient(640px 420px at 8% -8%, rgba(242,194,0,.12), transparent 60%); }
.auth-bg::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(160,186,224,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(160,186,224,.05) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); }
.auth-bg > div { width: 100%; display: grid; justify-items: center; }
.auth-card { position: relative; width: 100%; max-width: 440px; background: rgba(13,25,44,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 36px 38px 30px; animation: pop .3s var(--ease); }
.auth-card::before { content: ''; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.auth-card h1 { font-size: 25px; margin: 22px 0 8px; } .auth-card .sub { color: var(--text-2); margin: 0 0 22px; font-size: 14.5px; }
.auth-card form.stack { gap: 14px; }
.auth-card .btn-block { --bh: 44px; font-size: 15px; }
.org-logo { display: block; max-height: 64px; max-width: 280px; object-fit: contain; }
.who { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 13.5px var(--font); cursor: pointer; background: var(--surface-2); color: var(--text); }
.who:hover { border-color: var(--gold-line); }
.auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.auth-legal { color: var(--muted); font-size: 12.5px; text-align: center; margin: 22px 0 0; } .auth-legal a { color: var(--text-2); } .auth-legal a:hover { color: var(--gold); }

/* =====================================================================================
   Dashboards (organisation admin + Smile staff): sidebar, top bar, content
   ===================================================================================== */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 16px;
  background: linear-gradient(180deg, #08111f, #070e1a); border-right: 1px solid var(--line); color: var(--text-2); scrollbar-width: thin; }
.side > .brand { padding: 2px 8px; }
.side .org { display: block; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow-sm); }
.side .org b { font-size: 14px; } .side .org .tick { width: 15px; height: 15px; font-size: 9px; margin-left: 5px; vertical-align: 0; }
.side .org .row > div { overflow: hidden; } .side .org .row > div > b { white-space: nowrap; }
.side .org small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: grid; gap: 2px; }
.nav-title { font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 14px 12px 8px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 14px; text-decoration: none; position: relative; transition: background .12s, color .12s; }
.nav a svg.i { color: var(--faint); transition: color .12s; }
.nav a:hover { background: rgba(160,186,224,.06); color: var(--text); } .nav a:hover svg.i { color: var(--text-2); }
.nav a.on { background: linear-gradient(90deg, var(--gold-soft), rgba(242,194,0,.04)); color: var(--text); font-weight: 600; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav a.on svg.i { color: var(--gold); }
.nav a .badge { margin-left: auto; height: 20px; padding: 0 7px; font-size: 11px; background: var(--gold); color: var(--ink); border-color: var(--gold); }
.side .bottom { margin-top: auto; display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.side .bottom a { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-size: 13.5px; }
.side .bottom a:hover { background: rgba(160,186,224,.06); color: var(--text); }
.side .bottom a svg.i { color: var(--faint); width: 17px; height: 17px; }
.main { min-width: 0; padding: 0 36px 64px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; margin: 0 -36px 26px; padding: 0 36px;
  background: rgba(6,13,25,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.topbar .crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs svg.i { width: 14px; height: 14px; color: var(--faint); }
.topbar .spacer { flex: 1; }
.topbar .who-chip { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; }
.topbar .who-chip:hover { border-color: var(--line-3); color: var(--text); }
.main #page { max-width: 1240px; margin: 0 auto; } #page { animation: fade .25s ease; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head > div:first-child { min-width: 0; max-width: 760px; }
.page-head h1 { font-size: 27px; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.page-head > .row:empty { display: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; padding: 20px 22px; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }
.stat .n { font: 800 28px/1.1 var(--display); letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
#page > .card + .card, #page > .card + .notice, #page > .notice + .card { margin-top: 18px; }
.menu-btn { display: none; }

/* =====================================================================================
   Account page (top bar + content)
   ===================================================================================== */
.site-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; padding: 0 24px; max-width: 1180px; margin: 0 auto; }
.acct-top { position: sticky; top: 0; z-index: 20; background: rgba(6,13,25,.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.acct-top .site-top { max-width: 960px; }
.acct-main { max-width: 960px; margin: 0 auto; padding: 34px 24px 72px; }
.acct-main > .row:first-of-type h1 { font-size: 28px; }

/* =====================================================================================
   Marketing home
   ===================================================================================== */
.mk { background: var(--bg); overflow-x: hidden; font-size: 16px; }
.mk-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mk-nav { position: sticky; top: 0; z-index: 30; background: rgba(6,13,25,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.mk-nav.scrolled { border-bottom-color: var(--line); background: rgba(6,13,25,.9); }
.mk-nav .mk-wrap { display: flex; align-items: center; gap: 28px; height: 70px; }
.mk-links { display: flex; gap: 4px; }
.mk-links a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.mk-links a:hover { color: var(--text); background: rgba(160,186,224,.06); }
.mk-nav .mk-cta { margin-left: auto; display: flex; gap: 8px; }
.mk-hero { position: relative; padding: 76px 0 84px; isolation: isolate; }
.mk-hero::before { content: ''; position: absolute; inset: -70px 0 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(160,186,224,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(160,186,224,.055) 1px, transparent 1px); background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 25%, transparent 72%); mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 25%, transparent 72%); }
.mk-hero::after { content: ''; position: absolute; inset: -70px 0 0; z-index: -2; pointer-events: none;
  background: radial-gradient(620px 380px at 18% 8%, rgba(242,194,0,.16), transparent 65%), radial-gradient(700px 460px at 88% 30%, rgba(96,165,250,.14), transparent 65%); }
.mk-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.mk-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(13,25,44,.7); color: var(--text-2); font-size: 13px; font-weight: 500; }
.mk-pill b { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11.5px; font-weight: 700; }
.mk-hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.035em; margin: 22px 0 20px; }
.mk-hero h1 .hl { background: linear-gradient(100deg, var(--gold) 0%, var(--gold-3) 50%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-hero .lead { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 540px; margin: 0 0 30px; }
.mk-hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.mk-works { display: grid; gap: 12px; margin-top: 40px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.mk-works .prods { display: flex; gap: 8px; flex-wrap: wrap; text-transform: none; letter-spacing: 0; font-weight: 500; }
.prod-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(13,25,44,.6); color: var(--text-2); font-size: 13px; font-weight: 500; }
.prod-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--ink); }
.prod-ico svg.i { width: 14px; height: 14px; stroke-width: 2.2; }

/* the product mock */
.mock { position: relative; }
.mock-win { border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #0e1b30, #0a1526); box-shadow: 0 40px 100px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset; overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-4); } .mock-bar span { margin-left: 10px; height: 20px; flex: 1; max-width: 260px; border-radius: 6px; background: var(--surface-2); font-size: 11px; color: var(--faint); display: flex; align-items: center; padding: 0 10px; }
.mock-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 380px; }
.mock-side { border-right: 1px solid var(--line); padding: 14px 10px; display: grid; gap: 4px; align-content: start; }
.mock-side .ms { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; color: var(--muted); }
.mock-side .ms svg.i { width: 13px; height: 13px; } .mock-side .ms.on { background: var(--gold-soft); color: var(--text); } .mock-side .ms.on svg.i { color: var(--gold); }
.mock-main { padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.mock-h { display: flex; align-items: center; justify-content: space-between; } .mock-h b { font: 800 15px var(--display); } .mock-h .btn { --bh: 26px; font-size: 11px; padding: 0 10px; border-radius: 7px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-stats div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); } .mock-stats b { display: block; font: 800 17px var(--display); } .mock-stats span { font-size: 10.5px; color: var(--muted); }
.mock-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.mock-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.mock-row:last-child { border-bottom: none; } .mock-row .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: #fff; }
.mock-row small { display: block; color: var(--faint); font-size: 10px; } .mock-row .badge { height: 18px; font-size: 9.5px; padding: 0 7px; }
.mock-float { position: absolute; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(13,25,44,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 24px 60px -12px rgba(0,0,0,.7); }
.mock-signin { left: -60px; bottom: -40px; width: 226px; padding: 16px; display: grid; gap: 9px; animation: floaty 7s ease-in-out infinite; }
.mock-signin .brand { font-size: 12.5px; gap: 7px; } .mock-signin .brand .mark { width: 22px; height: 22px; border-radius: 6px; }
.mock-signin .f { height: 28px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 10.5px; color: var(--faint); display: flex; align-items: center; padding: 0 9px; }
.mock-signin .b { white-space: nowrap; height: 30px; border-radius: 8px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.mock-policy { right: -22px; top: -30px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; font-size: 11.5px; animation: floaty 8s ease-in-out -3s infinite; }
.mock-policy .tg { width: 30px; height: 17px; border-radius: 999px; background: var(--ok); position: relative; flex: none; } .mock-policy .tg::after { content: ''; position: absolute; right: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.mock-policy small { display: block; color: var(--muted); font-size: 10px; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

/* sections */
.mk-section { padding: 96px 0; position: relative; }
.mk-section.alt { background: linear-gradient(180deg, transparent, rgba(13,25,44,.5) 15%, rgba(13,25,44,.5) 85%, transparent); }
.mk-head { max-width: 660px; margin: 0 auto 52px; text-align: center; }
.mk-eyebrow { display: inline-block; color: var(--gold); font: 700 12px/1 var(--font); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px; }
.mk-head h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.03em; margin: 0 0 14px; }
.mk-head p { color: var(--text-2); font-size: 17px; margin: 0; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { grid-column: span 2; position: relative; padding: 26px; border-radius: var(--r-xl); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 50%), var(--surface); overflow: hidden; min-width: 0; transition: border-color .2s, transform .2s var(--ease); }
.tile:hover { border-color: var(--line-3); transform: translateY(-2px); }
.tile.w3 { grid-column: span 3; } .tile.w4 { grid-column: span 4; }
.tile .ti { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold); margin-bottom: 18px; }
.tile .ti svg.i { width: 20px; height: 20px; }
.tile h3 { font-size: 18px; margin: 0 0 8px; } .tile p { color: var(--muted); font-size: 14.5px; margin: 0; line-height: 1.6; }
.tile .demo { margin-top: 20px; }
.demo-toggles { display: grid; gap: 8px; }
.demo-toggles div { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 13px; color: var(--text-2); }
.demo-toggles i { width: 32px; height: 18px; border-radius: 999px; background: var(--surface-4); position: relative; flex: none; }
.demo-toggles i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #9fb0c8; }
.demo-toggles i.on { background: var(--ok); } .demo-toggles i.on::after { left: auto; right: 2px; background: #fff; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chips span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 12.5px; color: var(--text-2); }
.demo-chips span b { color: var(--gold); }
.demo-brand { border-radius: 14px; padding: 16px; background: linear-gradient(135deg, #0b3d91, #1fa2ff); display: grid; place-items: center; min-height: 128px; }
.demo-brand div { width: 70%; max-width: 220px; border-radius: 10px; background: rgba(13,25,44,.92); padding: 12px; display: grid; gap: 7px; }
.demo-brand b { font: 800 13px var(--display); } .demo-brand span { height: 22px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line-2); }
.demo-brand em { height: 24px; border-radius: 6px; background: #1a73e8; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step3 { padding: 28px 26px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); position: relative; }
.step3::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); font: 800 15px var(--display); margin-bottom: 18px; }
.step3 h3 { font-size: 17px; margin: 0 0 8px; } .step3 p { color: var(--muted); margin: 0; font-size: 14.5px; line-height: 1.6; }

/* plans */
.cycle { display: flex; justify-content: center; margin: -24px 0 36px; }
.cycle .tabs .btn { --bh: 36px; padding: 0 18px; }
.cycle .tabs .save { margin-left: 6px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 0; padding: 30px 28px 28px; border-radius: var(--r-xl); }
.plan.best { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(242,194,0,.07), transparent 40%), var(--surface); box-shadow: 0 0 0 1px var(--gold-line), 0 30px 80px -30px rgba(242,194,0,.35); }
.plan .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); height: 24px; padding: 0 12px; background: var(--gold); color: var(--ink); border-color: var(--gold); font-size: 11.5px; }
.plan h3 { font-size: 19px; margin: 0 0 6px; } .plan .blurb { color: var(--muted); font-size: 14px; min-height: 44px; margin: 0; }
.plan .price { font: 800 44px/1 var(--display); letter-spacing: -.03em; margin: 22px 0 6px; } .plan .price small { font: 600 15px var(--font); color: var(--muted); letter-spacing: 0; }
.plan .per { color: var(--muted); font-size: 13px; min-height: 20px; }
.plan ul { list-style: none; margin: 22px 0 26px; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; color: var(--text-2); font-size: 14.5px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.plan li svg.i { width: 18px; height: 18px; color: var(--gold); margin-top: 1px; stroke-width: 2.4; }
.plan li.off { color: var(--faint); } .plan li.off svg.i { color: var(--faint); }
.plan .btn { --bh: 46px; }
.free-band { margin-top: 28px; display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--r-lg); border: 1px solid var(--gold-line); background: linear-gradient(90deg, var(--gold-soft), transparent); }
.free-band .ti { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: var(--ink); flex: none; }
.free-band p { margin: 0; color: var(--text-2); } .free-band b { color: var(--text); } .free-band .btn { margin-left: auto; }

/* products row */
.prod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.prod-card { padding: 24px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 12px; align-content: start; transition: border-color .2s, transform .2s var(--ease); }
.prod-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.prod-card .prod-ico { width: 44px; height: 44px; border-radius: 12px; } .prod-card .prod-ico svg.i { width: 22px; height: 22px; }
.prod-card h3 { font-size: 17px; margin: 4px 0 0; } .prod-card p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.55; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 600; font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 18px; height: 18px; flex: none; transition: transform .2s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2c200' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); line-height: 1.65; font-size: 15px; }

/* final CTA + footer */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 64px 40px; text-align: center; border: 1px solid var(--gold-line);
  background: radial-gradient(600px 300px at 50% -20%, rgba(242,194,0,.22), transparent 70%), radial-gradient(500px 300px at 90% 120%, rgba(96,165,250,.16), transparent 70%), var(--surface); }
.cta-band h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; margin: 0 0 12px; } .cta-band p { color: var(--text-2); font-size: 17px; margin: 0 auto 28px; max-width: 560px; }
.cta-band .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mk-foot { border-top: 1px solid var(--line); margin-top: 96px; padding: 56px 0 36px; color: var(--muted); font-size: 14px; }
.mk-foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.mk-foot h4 { font: 700 12px/1 var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--text-2); margin: 6px 0 16px; }
.mk-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .mk-foot a { color: var(--muted); } .mk-foot a:hover { color: var(--text); }
.mk-foot .legal { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); } .reveal.in { opacity: 1; transform: none; }

/* =====================================================================================
   Phones and tablets
   ===================================================================================== */
@media (max-width: 1080px) {
  .mk-hero-grid { grid-template-columns: 1fr; gap: 64px; } .mock { max-width: 640px; margin: 0 auto; width: 100%; }
  .bento { grid-template-columns: repeat(2, 1fr); } .tile, .tile.w3, .tile.w4 { grid-column: span 1; } .tile.w4 { grid-column: span 2; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); } .mk-links { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 84vw); z-index: 60; transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 55; background: rgba(3,8,16,.6); backdrop-filter: blur(3px); }
  .main { padding: 0 16px 56px; } .topbar { margin: 0 -16px 20px; padding: 0 16px; height: 58px; }
  .menu-btn { display: inline-flex; --bh: 38px; width: 38px; padding: 0; }
  .topbar .who-chip > span:last-child { display: none; } .topbar .who-chip { padding: 0 4px; }
  .page-head { align-items: flex-start; } .page-head h1 { font-size: 23px; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } .steps3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv > span:nth-child(even) { margin-bottom: 10px; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .auth-bg { padding: 20px 12px; align-items: start; } .auth-card { padding: 28px 22px 24px; border-radius: 18px; }
  .card-body { padding: 18px; } .card-head { padding: 12px 18px; min-height: 52px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 18px; } .tbl th:last-child, .tbl td:last-child { padding-right: 18px; } .tbl td, .tbl th { padding-top: 11px; padding-bottom: 11px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; } .stat { padding: 16px; } .stat .n { font-size: 22px; }
  .mk { font-size: 15px; } .mk-nav .mk-wrap { height: 62px; gap: 12px; } .mk-nav .mk-cta .btn:not(:last-child) { display: none; }
  .mk-hero { padding: 40px 0 72px; } .mk-hero .lead { font-size: 16.5px; } .mk-hero .cta .btn { flex: 1; }
  .mock-body { grid-template-columns: 1fr; } .mock-side { display: none; } .mock-signin { left: -6px; bottom: -44px; width: 180px; } .mock-policy { right: -4px; top: -34px; }
  .mk-section { padding: 72px 0; } .mk-head { margin-bottom: 36px; }
  .bento, .prod-grid { grid-template-columns: 1fr; } .tile.w4 { grid-column: span 1; }
  .free-band { flex-direction: column; align-items: flex-start; } .free-band .btn { margin-left: 0; width: 100%; }
  .cta-band { padding: 44px 22px; border-radius: 22px; } .mk-foot-grid { grid-template-columns: 1fr 1fr; } .mk-foot-grid > div:first-child { grid-column: 1 / -1; }
  .modal-back { padding: 0; align-items: end; } .modal { max-height: 92vh; border-radius: 22px 22px 0 0; } .modal > .card-head { border-radius: 22px 22px 0 0; } .modal-foot { border-radius: 0; }
  .modal-foot .btn { flex: 1; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .acct-main { padding: 24px 16px 60px; } .site-top { padding: 0 16px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* Options side by side (the shop's tiers) are always the same height. */
.row > .choice { align-self: stretch; } .row > .choice > label { height: 100%; }
/* On/off settings (policies) are switches, not ticks. */
input[type=checkbox][data-p] { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 999px; cursor: pointer; flex: none; margin: 0;
  background: radial-gradient(circle at 11px 50%, #c5d1e2 7px, transparent 7.5px), var(--surface-4); border: 1px solid var(--line-2); transition: background-color .15s; }
input[type=checkbox][data-p]:checked { background: radial-gradient(circle at calc(100% - 11px) 50%, #fff 7px, transparent 7.5px), var(--ok); border-color: transparent; }
input[type=checkbox][data-p]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 640px) {
  /* home: the floating sign-in card is too cramped on a phone */
  .mock-signin { display: none; }
  /* account top bar: icon-only buttons, kept on one line with the logo */
  .acct-top .site-top .row { flex-wrap: nowrap; gap: 6px; }
  .acct-top .site-top .btn { font-size: 0; gap: 0; width: 36px; padding: 0; }
  .acct-top .site-top .btn svg.i { width: 17px; height: 17px; }
  /* account tables: each row stacks instead of squeezing into columns */
  .acct-main .tbl tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .acct-main .tbl tbody tr:last-child { border-bottom: none; }
  .acct-main .tbl td { display: block; padding: 0 !important; border: 0; text-align: left !important; }
  .acct-main .tbl td:first-child { flex: 1 1 100%; }
  .acct-main .tbl td:last-child:not(:first-child) { margin-left: auto; }
}
@media (max-width: 640px) {
  /* dashboard top bar: just the menu, where you are, help and your account */
  .topbar .crumbs > span, .topbar .crumbs > svg { display: none; }
  .topbar .btn-ghost { font-size: 0; gap: 0; width: 36px; padding: 0; }
  .topbar .btn-ghost svg.i { width: 18px; height: 18px; }
}
.topbar .btn, .topbar .who-chip { flex: none; } .topbar .who-chip .prod-ico { flex: none; }
/* A tick box and its words stay side by side, the box lined up with the first line. */
label.row { flex-wrap: nowrap; align-items: flex-start; gap: 10px; line-height: 1.45; }
label.row > input[type=checkbox], label.row > input[type=radio] { margin-top: 1px; }

/* ---------- an organisation's own look (sb.js applyLook / applyMemberLook) */
.auth-bg.branded::before { display: none; }
.auth-bg.align-left { justify-items: start; padding-left: max(24px, 7vw); }
.auth-bg.align-right { justify-items: end; padding-right: max(24px, 7vw); }
.auth-bg.align-left > div, .auth-bg.align-right > div { justify-items: stretch; }
.auth-card[data-shape=pill] .btn, .auth-card[data-shape=pill] .who { border-radius: 999px; }
.auth-card[data-shape=square] .btn, .auth-card[data-shape=square] .who, .auth-card[data-shape=square] .input { border-radius: 4px; }
.auth-card.light { --surface: #ffffff; --surface-2: #f1f4f9; --surface-3: #e8edf4; --surface-4: #dde4ee; --bg-2: #f6f8fb;
  --text: #0d1726; --text-2: #3b4b61; --muted: #64748b; --faint: #94a3b8; --line: rgba(15,23,42,.09); --line-2: rgba(15,23,42,.15); --line-3: rgba(15,23,42,.25);
  background: rgba(255,255,255,.97); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.auth-card.light .input { box-shadow: none; } .auth-card.light .input:focus { background: #fff; }
.auth-card.light .btn:not(.btn-primary):not(.btn-gold) { box-shadow: none; }
.auth-card.light code { color: #7a5c00; }
.auth-card .help-link { display: inline-flex; align-items: center; gap: 6px; }
.org-logo-sm { max-height: 34px; max-width: 200px; display: block; }
.look-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.look-preview { position: sticky; top: 88px; }
.look-section { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.look-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.look-section > h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font); font-weight: 700; }
.pick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pick-row label { flex: 1; min-width: 90px; display: grid; justify-items: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); cursor: pointer; font-size: 12.5px; color: var(--text-2); text-align: center; }
.pick-row label:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); color: var(--text); }
.pick-row input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { width: 44px; height: 36px; padding: 2px; border-radius: 9px; border: 1px solid var(--line-2); background: none; cursor: pointer; }
.pic-row { display: flex; align-items: center; gap: 12px; }
.pic-thumb { width: 64px; height: 44px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2) center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--faint); font-size: 11px; }
.pic-thumb.contain { background-size: contain; background-origin: content-box; padding: 4px; }
@media (max-width: 1100px) { .look-grid { grid-template-columns: 1fr; } .look-preview { position: static; } }
@media (max-width: 640px) { .auth-bg.align-left, .auth-bg.align-right { justify-items: center; padding-left: 12px; padding-right: 12px; } }

/* a logo made for a light background, shown on a dark page: on a soft white chip so it stays readable */
.org-logo-chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.94); }
.org-logo-chip .org-logo-sm { max-height: 28px; max-width: 180px; }
/* a light logo (white text): straight on the dark sidebar; one with its own background: as it is (sb.js fitLogoChip) */
.org-logo-chip.on-dark, .org-logo-chip.own-bg { background: none; padding: 2px 0; }
.org-logo-chip.own-bg .org-logo-sm { border-radius: 8px; }

/* ---------------------------------------------------------------- Policies page: top bar + rows that work on a phone */
.pol-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pol-scope { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); min-width: 0; }
.pol-scope span { white-space: nowrap; }
.pol-scope select { width: auto; max-width: 100%; min-width: 0; }
.pol-search { max-width: 340px; margin-bottom: 14px; }
.pol-list { display: grid; }
.pol-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 18px; padding: 14px 20px; border-top: 1px solid var(--line); }
.pol-item:first-child { border-top: 0; }
.pol-text { min-width: 0; }
.pol-text b { display: block; line-height: 1.35; }
.pol-text .small { margin-top: 3px; line-height: 1.5; }
.pol-ctl { min-width: 0; justify-self: end; }
.pol-item.is-field .pol-ctl { justify-self: stretch; max-width: 360px; width: 100%; }
@media (max-width: 640px) {
  .pol-bar { flex-direction: column; align-items: stretch; }
  .pol-bar .tabs { align-self: flex-start; }
  .pol-scope { flex-direction: column; align-items: stretch; gap: 6px; }
  .pol-scope select { width: 100%; }
  .pol-search { max-width: none; }
  .pol-item { padding: 14px 16px; }
  .pol-item.is-field { grid-template-columns: minmax(0, 1fr); }
  .pol-item.is-field .pol-ctl { max-width: none; }
  .pol-item.is-switch .pol-switch > span { display: none; }   /* the On/Off word: the switch says it */
}

/* Scrollbars in the dark theme (no white bars). */
* { scrollbar-width: thin; scrollbar-color: rgba(160,186,224,.22) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(160,186,224,.18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(160,186,224,.32); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
