/* HotelPreShift design system
   Palette from the mark: Night Navy, Shift Teal, Sunrise. The chrome carries the brand; the working canvas stays quiet.
   One aurora per page (the 2px line under the header, the glow on the sign-in page). AI shows up as one chip, only where the model did work. */
/* Manrope (SIL Open Font License), self-hosted: no third-party font requests from a staff phone */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/static/fonts/manrope-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/static/fonts/manrope-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
:root {
  --navy: #0E2538;
  --navy-2: #143652;
  --navy-3: #1E4A6B;
  --teal: #1FA8A3;
  --teal-deep: #0C7C78;
  --teal-soft: #E3F5F4;
  --sun: #F4A261;
  --sun-soft: #FDEFE2;
  --brand: var(--teal-deep);          /* kept for templates that reference --brand: links, primary actions */
  --ink: #15232E;
  --muted: #5E6B78;
  --line: #DCE3EA;
  --line-strong: #C7D1DB;
  --bg: #F2F5F8;
  --card: #FFFFFF;
  --good: #1B8A5A;
  --good-soft: #E4F4EC;
  --warn: #B9770E;
  --warn-soft: #FBF0DC;
  --bad: #C8372D;
  --bad-soft: #FBE9E7;
  --info: #2B6CB0;
  --info-soft: #E6EFFA;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px -18px rgba(14, 37, 56, .35);
  --focus: 0 0 0 3px rgba(31, 168, 163, .45);
  --aurora: linear-gradient(90deg, var(--teal) 0%, #6CC5B8 45%, var(--sun) 100%);
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.5;
  font-feature-settings: "tnum" 1, "cv11" 1; }
body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; color: var(--navy); letter-spacing: -0.015em; font-weight: 800; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .75rem; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
strong { font-weight: 700; }

/* ---------- chrome */
.topbar { background: linear-gradient(100deg, var(--navy) 0%, var(--navy-2) 70%, #1A4360 100%); color: #fff; padding: 0 1rem; display: flex; align-items: center; gap: 1.25rem;
  min-height: 58px; position: relative; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--aurora); }
.topbar a { color: #fff; }
.topbar .brand { font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; gap: .6rem; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; }
.topbar .brand .mark { width: 30px; height: 30px; border-radius: 8px; flex: none; display: block; }
.topbar .brand img.orglogo { height: 26px; width: auto; background: #fff; border-radius: 6px; padding: 2px; }
.topbar .brand .sub { font-weight: 600; font-size: .78rem; color: rgba(255,255,255,.62); margin-left: .15rem; }
.topbar nav { display: flex; gap: .15rem; align-items: center; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; flex: 1; min-width: 0; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.78); padding: .35rem .6rem; border-radius: 999px; white-space: nowrap; text-decoration: none; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar nav a.on { color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 0 -2px 0 var(--teal); }
.topbar .spacer { flex: 0; }
.more-menu { position: relative; }
.more-menu summary { list-style: none; cursor: pointer; font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.78); padding: .35rem .6rem; border-radius: 999px; white-space: nowrap; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary::after { content: ""; display: inline-block; width: .4em; height: .4em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-.15em); margin-left: .45em; }
.more-menu summary:hover, .more-menu[open] summary { color: #fff; background: rgba(255,255,255,.08); }
.more-menu summary.on { color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 0 -2px 0 var(--teal); }
.more-menu .menu { position: absolute; top: calc(100% + .5rem); left: 0; background: var(--navy-2); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: .35rem;
  min-width: 11rem; box-shadow: 0 18px 40px -16px rgba(0,0,0,.6); z-index: 40; display: flex; flex-direction: column; gap: .1rem; }
.more-menu .menu a { display: block; border-radius: 8px; padding: .5rem .7rem; }
body.auth .topbar { display: none; }
.topbar .who { font-size: .82rem; color: rgba(255,255,255,.75); white-space: nowrap; display: flex; align-items: center; gap: .5rem; }
.topbar .who .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: var(--navy); font-weight: 800; font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; }
.topbar .who a { color: rgba(255,255,255,.9); }
main { max-width: 1120px; width: 100%; margin: 0 auto; padding: 1.25rem 1rem 2rem; flex: 1; }
main.narrow { max-width: 760px; }
main.wide { max-width: none; }
.footer { color: var(--muted); font-size: .8rem; padding: 1.25rem 1rem 1.5rem; display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.footer .mark { width: 18px; height: 18px; border-radius: 5px; vertical-align: middle; }
.footer strong { color: var(--navy); font-weight: 700; }

/* ---------- surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.card h2 { margin-bottom: .75rem; }
.card.plain { background: transparent; border: none; padding: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kpis { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1rem; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.kpi { background: var(--card); padding: .9rem 1rem; }
.kpi .n { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.badge.current, .badge.exempt, .badge.completed, .badge.published, .badge.closed.ok { background: var(--good-soft); color: var(--good); }
.badge.expiring, .badge.in_progress { background: var(--warn-soft); color: var(--warn); }
.badge.overdue, .badge.expired, .badge.failed { background: var(--bad-soft); color: var(--bad); }
.badge.not_started, .badge.draft { background: #EDF1F5; color: var(--muted); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.open { background: var(--bad-soft); color: var(--bad); } .badge.closed { background: #EDF1F5; color: var(--muted); }

/* the one AI marker: a four-point spark, used only where the model did the work */
.ai { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem .12rem .45rem; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  color: var(--teal-deep); background: var(--teal-soft); border: 1px solid #BFE6E3; vertical-align: middle; white-space: nowrap; }
.ai svg { width: .8rem; height: .8rem; fill: var(--teal); }
.ai.dark { color: #C9F1EE; background: rgba(31,168,163,.18); border-color: rgba(31,168,163,.45); }

/* ---------- controls */
.btn { display: inline-block; background: var(--teal-deep); color: #fff !important; border: 1px solid transparent; border-radius: 10px; padding: .62rem 1.05rem;
  font-size: .95rem; font-weight: 700; cursor: pointer; text-decoration: none !important; line-height: 1.2; font-family: inherit; letter-spacing: -0.005em;
  transition: background .15s ease, transform .05s ease; }
.btn:hover { background: #0A6B68; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--navy) !important; border-color: var(--line-strong); }
.btn.secondary:hover { background: #F6F8FA; border-color: var(--navy-3); }
.btn.navy { background: var(--navy); }
.btn.navy:hover { background: var(--navy-2); }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #A52D25; }
.btn.small { padding: .38rem .75rem; font-size: .85rem; border-radius: 8px; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .6rem 0 .25rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 1rem; background: #fff; color: var(--ink); font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--focus); }
input[type=file] { font-family: inherit; font-size: .9rem; }
textarea { min-height: 110px; }
select[multiple] { padding: .3rem; }
.row { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; font-size: .95rem; color: var(--ink); font-weight: 500; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--teal-deep); }
.flash { background: var(--teal-soft); border: 1px solid #BFE6E3; color: #0B5F5C; padding: .7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.error { background: var(--bad-soft); border: 1px solid #F3C2BD; color: #8A231B; padding: .7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .75rem; }
.progress { height: 8px; background: #E4E9EF; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal-deep); }

/* ---------- learning */
.course-card { display: flex; flex-direction: column; gap: .4rem; }
.course-card .title { font-weight: 800; font-size: 1.05rem; color: var(--navy); }
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li { display: flex; gap: .6rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.lesson-list li:last-child { border-bottom: none; }
.lesson-list .num { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #EDF1F5; color: var(--muted); display: inline-flex;
  align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; flex: none; }
.lesson-list .num.done { background: var(--good); color: #fff; }
.lesson-list .num.lock { background: #EDF1F5; color: #B0B7BF; }
.lesson-list .meta { color: var(--muted); font-size: .8rem; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; position: relative; }
.player video { width: 100%; display: block; max-height: 70vh; }
.overlay { position: absolute; inset: 0; background: rgba(14,37,56,.82); color: #fff; display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: .8rem; text-align: center; padding: 1rem; }
.overlay.show { display: flex; }
.blocks { display: flex; gap: .4rem; margin: .75rem 0; flex-wrap: wrap; }
.vblock { flex: 1 1 90px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .5rem; font-size: .8rem; background: #fff; cursor: pointer; }
.vblock .bar { height: 5px; background: #E4E9EF; border-radius: 999px; margin-top: .3rem; overflow: hidden; }
.vblock .bar span { display: block; height: 100%; background: var(--teal-deep); }
.vblock.done { border-color: var(--good); }
.vblock.done .bar span { background: var(--good); }
.vblock.active { box-shadow: 0 0 0 2px var(--teal) inset; }
.vblock.locked { opacity: .55; cursor: not-allowed; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .6rem 1rem;
  border-radius: 999px; font-size: .9rem; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; }
.pdf-pages { background: #E6EBF0; padding: .5rem; border-radius: var(--radius); max-height: 75vh; overflow: auto; }
.pdf-pages canvas { display: block; margin: 0 auto .5rem; max-width: 100%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pdf-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.question { border-top: 1px solid var(--line); padding: .9rem 0; }
.question .prompt { font-weight: 700; margin-bottom: .4rem; color: var(--navy); }
.option { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem 0; }
.option input { margin-top: .25rem; accent-color: var(--teal-deep); }
.option.correct { color: var(--good); font-weight: 700; }
.option.wrong { color: var(--bad); }
.cert-box { border: 2px solid var(--navy); border-radius: var(--radius); padding: 1rem; text-align: center; background: #fff; }
.score { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.score.pass { color: var(--good); }
.score.fail { color: var(--bad); }

/* ---------- sign-in: the one place the brand goes big */
.login-page { position: relative; }
body.auth { background: var(--navy); color: #fff; }
body.auth main { max-width: 1120px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding: 3rem 1.25rem 4rem; position: relative; z-index: 1; }
body.auth .aurora { position: fixed; left: -20vw; bottom: -45vh; width: 90vw; height: 90vh; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(31,168,163,.55), rgba(31,168,163,.12) 55%, transparent 72%); filter: blur(10px); }
body.auth .aurora.two { left: auto; right: -25vw; bottom: -55vh; width: 70vw; height: 70vh;
  background: radial-gradient(closest-side, rgba(244,162,97,.42), rgba(244,162,97,.08) 55%, transparent 72%); }
.hero { color: #fff; }
.hero .lockup { display: flex; align-items: center; gap: .8rem; margin-bottom: 2.2rem; }
.hero .lockup .mark { width: 44px; height: 44px; border-radius: 12px; }
.hero .lockup .name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.hero .lockup .name span { font-weight: 500; color: rgba(255,255,255,.7); }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: .98; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 1.2rem; max-width: 11ch; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero p { color: rgba(255,255,255,.76); font-size: 1.1rem; max-width: 44ch; margin-bottom: 1.6rem; }
.hero .proof { display: grid; grid-template-columns: repeat(3, auto); gap: 1.5rem; justify-content: start; margin-top: .5rem; }
.hero .proof div { border-left: 2px solid rgba(255,255,255,.18); padding-left: .8rem; }
.hero .proof b { display: block; color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.hero .proof span { color: rgba(255,255,255,.62); font-size: .82rem; }
.login { max-width: 460px; margin: 0 0 0 auto; width: 100%; color: var(--ink); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); border: none; padding: 1.5rem 1.5rem 1.25rem; }
.login h1 { font-size: 1.35rem; margin-bottom: .2rem; }
.login .org-pill { display: inline-flex; align-items: center; gap: .4rem; background: var(--teal-soft); color: var(--teal-deep); font-weight: 700; font-size: .82rem; padding: .2rem .65rem; border-radius: 999px; margin-bottom: .6rem; }
.tabs { display: flex; gap: .35rem; margin: .9rem 0 .5rem; background: #EEF2F6; padding: .25rem; border-radius: 12px; }
.tabs button { flex: 1; padding: .55rem; border: none; background: transparent; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--muted); font-family: inherit; font-size: .92rem; }
.tabs button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(14,37,56,.12); }
body.auth .footer { color: rgba(255,255,255,.55); position: relative; z-index: 1; }
body.auth .footer strong { color: rgba(255,255,255,.9); }

/* ---------- the day: home strip */
.today { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 60%, #1F4B6C 100%); color: #fff; border-radius: 18px; padding: 1.35rem 1.4rem 1.2rem; margin-bottom: 1.25rem;
  position: relative; overflow: hidden; }
.today::before { content: ""; position: absolute; right: -18%; top: -120%; width: 60%; height: 260%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(31,168,163,.38), transparent 70%); }
.today > * { position: relative; }
.today .greet { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; color: #fff; margin: 0; }
.today .where { color: rgba(255,255,255,.68); margin: .25rem 0 1rem; font-size: .95rem; }
.today .facts { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.today .facts a, .today .facts div { color: #fff; text-decoration: none; }
.today .facts b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.today .facts b.sun { color: var(--sun); }
.today .facts b.alert { color: #FFB4AB; }
.today .facts span { color: rgba(255,255,255,.66); font-size: .8rem; }
.ask { display: flex; gap: .5rem; align-items: stretch; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: .4rem .4rem .4rem .9rem; }
.ask .spark { width: 1.1rem; height: 1.1rem; fill: var(--teal); flex: none; align-self: center; }
.ask input { background: transparent; border: none; color: #fff; font-size: 1rem; padding: .55rem .2rem; flex: 1; min-width: 0; }
.ask input::placeholder { color: rgba(255,255,255,.58); }
.ask input:focus { box-shadow: none; }
.ask .btn { border-radius: 10px; background: var(--teal); color: var(--navy) !important; font-weight: 800; }
.ask .btn:hover { background: #2BBDB7; }
.today .ask-note { color: rgba(255,255,255,.6); font-size: .78rem; margin: .5rem 0 0 .2rem; }

/* ---------- tiles, chips, search */
.search-box { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
.search-box input { flex: 1; font-size: 1rem; padding: .7rem .85rem; }
.tiles { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 1rem; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius-sm); padding: .8rem .9rem; color: var(--ink);
  text-decoration: none !important; min-height: 84px; transition: border-color .15s ease, transform .15s ease; }
.tile:hover { border-color: var(--teal-deep); border-left-color: var(--teal-deep); transform: translateY(-1px); }
.tile .cat { font-size: .74rem; color: var(--muted); font-weight: 600; }
.tile .name { font-weight: 800; margin-top: .2rem; line-height: 1.25; color: var(--navy); }
.tile.report { background: var(--navy); border-color: var(--navy); border-left-color: var(--sun); color: #fff; }
.tile.report .cat { color: rgba(255,255,255,.72); }
.tile.report .name { color: #fff; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { display: inline-block; padding: .32rem .75rem; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none !important; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.filterbar { margin-bottom: .9rem; }
.filterbar-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filterbar-row select { width: auto; flex: 0 1 auto; padding: .45rem .6rem; font-size: .9rem; }
.filterbar-row input[type=search] { flex: 1 1 220px; padding: .45rem .7rem; font-size: .9rem; }
.chip.toggle { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: .35rem; }
.chip.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip.toggle .n { font-size: .74rem; font-weight: 700; color: var(--muted); background: #EEF2F6; border-radius: 999px; padding: 0 .4rem; }
.chip.toggle:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.toggle:has(input:checked) .n { background: rgba(255,255,255,.18); color: #fff; }
.chip.toggle:has(input:focus-visible) { box-shadow: var(--focus); }
.chip.toggle.sev-high::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--bad); }
.chip.toggle.sev-medium::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--warn); }
.chip.toggle.sev-low::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--good); }
.chip-sep { width: 1px; align-self: stretch; background: var(--line-strong); margin: 0 .25rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin-bottom: .75rem; }
.filters label { margin: 0 0 .2rem; }
.filters > div { min-width: 150px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: #EEF2F6; padding: .2rem .4rem; border-radius: 4px; word-break: break-all; }
.steps { padding-left: 1.4rem; margin: .5rem 0; }
.steps li { margin: .45rem 0; }
.donot { border-left: 4px solid var(--bad); padding: .6rem .9rem; background: var(--bad-soft); border-radius: var(--radius-sm); }
.donot ul { margin: .3rem 0 0 1rem; padding: 0; }
.contacts { border-left: 4px solid var(--navy); padding: .6rem .9rem; background: #E9F0F6; border-radius: var(--radius-sm); }
.contacts ul { margin: .3rem 0 0 1rem; padding: 0; }
.sev { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .3rem; }
.sev.high { background: var(--bad); } .sev.medium { background: var(--warn); } .sev.low { background: var(--good); }
.note { white-space: pre-wrap; background: #F6F8FA; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .9rem; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; margin: .25rem .5rem .25rem 0; background: #fff; }
.segmented a { padding: .38rem .85rem; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.segmented a.on { background: var(--navy); color: #fff; }
.more { font-weight: 700; font-size: .9rem; }

/* ---------- points and leaderboard */
.points-card { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1.25rem; align-items: center; background: linear-gradient(120deg, var(--navy-2), var(--teal-deep)); color: #fff;
  border-radius: var(--radius); padding: .95rem 1.15rem; margin: .5rem 0 1rem; text-decoration: none; }
.points-card:hover { text-decoration: none; filter: brightness(1.05); }
.points-card .pc-n { font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: #fff; }
.points-card .pc-l { font-size: .78rem; opacity: .82; }
.points-card .pc-rank { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.points-card .pc-rank strong { font-size: 1.1rem; }
.points-card .pc-badges { grid-column: 1 / -1; display: flex; gap: .4rem; align-items: center; font-size: 1.1rem; border-top: 1px solid rgba(255,255,255,.22); padding-top: .5rem; }
.points-card .pc-badges .pc-l { margin-left: auto; font-size: .82rem; }
.lb { width: 100%; border-collapse: collapse; }
.lb td, .lb th { padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lb tr.me td { background: var(--teal-soft); font-weight: 700; }
.lb .rank { width: 2.4rem; font-weight: 800; color: var(--muted); }
.lb .pts { text-align: right; font-weight: 800; white-space: nowrap; }
.lb .medal { font-size: 1.1rem; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.badge-tile { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .7rem; background: var(--card); }
.badge-tile.locked { opacity: .5; filter: grayscale(1); }
.badge-tile .ic { font-size: 1.6rem; }
.badge-tile .nm { font-weight: 800; font-size: .92rem; color: var(--navy); }
.badge-tile .ds { font-size: .78rem; color: var(--muted); }

/* ---------- print and small screens */
.print-only { display: none; }
@media print {
  .topbar, .footer, .no-print { display: none !important; }
  .print-only { display: block; }
  main { max-width: none; padding: 0; }
  .card { border: none; box-shadow: none; page-break-inside: avoid; }
  body { background: #fff; }
}
@media (max-width: 900px) {
  body.auth main { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1rem 3rem; }
  .login { margin: 0 auto; }
  .hero .proof { grid-template-columns: repeat(3, auto); gap: 1rem; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: .5rem .75rem .35rem; gap: .35rem .75rem; min-height: 0; }
  .topbar .brand { flex: 1; }
  .topbar .who { order: 2; }
  .topbar nav { order: 3; flex-basis: 100%; padding: .1rem 0 .3rem; margin: 0 -.75rem; padding-left: .75rem; padding-right: .75rem; }
  .topbar nav a { font-size: .86rem; padding: .3rem .55rem; }
  .topbar .brand .sub { display: none; }
  .more-menu summary { display: none; }
  .more-menu .menu { display: contents; }
  main { padding: 1rem .9rem 2rem; }
  h1 { font-size: 1.5rem; }
  th, td { padding: .45rem .35rem; }
  .today { padding: 1.1rem 1rem 1rem; border-radius: 16px; }
  .today .facts { gap: 1.1rem; }
  .hero .lockup { margin-bottom: 1.1rem; }
  .hero h1 { margin-bottom: .6rem; }
  .hero p, .hero .proof { display: none; }   /* on a phone the sign-in card stays above the fold; the brand moment is the headline */
  .login { padding: 1.25rem 1.1rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
