/* AskMed web app (getaskmed.com/app). Layout and look from the approved mock
   (Ads/research/web-app-preview-2026-10-19/mock/full.html): computer = left sidebar, phone (≤ 820 px) = bottom tabs.
   Colors and fonts as the rest of the site (web.css): Georgia titles, the system font for text, #1259B5.
   The page's content policy allows no inline styles, so every look is a class here. */
:root {
  --p: #1259B5; --deep: #0A3880; --bg: #FBFCFE; --sub: #F5F7FC; --hi: #EDF4FF; --st: #E0E6EF; --t: #0D1221;
  --sec: #616E82; --mu: #4A5468; --or: #E07B1A; --tealbg: #E7F5F6; --teal: #0E6F76; --gold: #B7791F; --red: #C2362B;
  --green: #2E9E6A;
  --serif: Georgia, 'Gelasio', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--t); background: var(--bg); -webkit-text-size-adjust: 100%; }
body.wa { display: flex; overflow: hidden; height: 100vh; height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.ico.sm { width: 15px; height: 15px; }
.ico.xs { width: 13px; height: 13px; }
.ico.lg { width: 20px; height: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }

/* Boot (checking the account) */
.boot { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px; text-align: center; }
.boot img { width: 56px; height: 56px; border-radius: 14px; }
.boot p { margin: 0; color: var(--mu); font-size: 15px; max-width: 360px; line-height: 1.5; }
.boot .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--hi); border-top-color: var(--p); animation: spin .8s linear infinite; flex: 0 0 auto; }
.spin.sm { width: 16px; height: 16px; border-width: 2px; }
.spin.white { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sidebar (computer) */
.shell { display: flex; flex: 1; min-width: 0; height: 100%; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); } /* iPhone landscape: clear of the notch */
.side { width: 264px; flex: 0 0 264px; background: #fff; border-right: 1px solid var(--st); display: flex; flex-direction: column; padding: 16px 12px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-family: var(--serif); font-size: 21px; }
.brand b span, .mb b span { color: var(--p); }
.newq { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--p); color: #fff; border-radius: 999px; padding: 10px; font-weight: 700; font-size: 14px; margin-bottom: 12px; width: 100%; text-align: center; }
.newq:hover { background: #0F4E9F; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14.5px; color: var(--mu); font-weight: 500; }
.nav a:hover { background: var(--sub); }
.nav a.on { background: var(--hi); color: var(--deep); font-weight: 700; }
.nav .ic { width: 18px; display: inline-flex; justify-content: center; }
.maxtag { margin-left: auto; font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(90deg, #B7791F, #E0A43A); border-radius: 999px; padding: 2px 7px; letter-spacing: .3px; }
.nav .subnav a { padding-left: 38px; font-size: 14px; }
.lbl { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--sec); }
.recent { overflow-y: auto; min-height: 0; flex: 0 1 auto; }
.recent a { display: block; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--t); }
.recent a:hover { background: var(--sub); }
.recent .none { padding: 7px 10px; font-size: 13px; color: var(--sec); }
.acct { margin-top: auto; border: 1px solid var(--st); border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; }
.acct:hover { background: var(--sub); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--hi); color: var(--p); display: grid; place-items: center; font-weight: 700; flex: 0 0 34px; text-transform: uppercase; }
.acct .who { min-width: 0; flex: 1; }
.acct b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct small { display: block; color: var(--sec); font-size: 11.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro { margin-left: auto; font-size: 10px; font-weight: 800; color: #fff; background: var(--p); border-radius: 999px; padding: 3px 7px; flex: 0 0 auto; }

/* Main column */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; min-height: 0; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-bottom: 1px solid var(--st); background: var(--bg); min-height: 58px; }
.mob { display: none; }
.dsk { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--hi); color: var(--p); font-weight: 700; border-radius: 999px; padding: 7px 13px; font-size: 14px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
button.chip:hover { background: #E0ECFF; }
.chip img { width: 16px; height: 16px; border-radius: 4px; }
.tright { margin-left: auto; display: flex; gap: 16px; color: var(--sec); font-size: 14px; align-items: center; min-width: 0; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--sec); font-size: 14px; font-weight: 500; white-space: nowrap; }
.tbtn:hover { color: var(--t); }
.tbtn.on { color: var(--p); }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; -webkit-overflow-scrolling: touch; }
.c { max-width: 780px; margin: 0 auto; padding: 24px 26px 40px; min-width: 0; }

/* Text */
.disc { display: inline-flex; align-items: center; gap: 8px; background: var(--tealbg); color: var(--teal); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; max-width: 100%; text-align: left; line-height: 1.35; }
h1 { font-family: var(--serif); font-size: 36px; line-height: 1.12; margin: 18px 0 14px; letter-spacing: -.4px; overflow-wrap: anywhere; }
h1.qtitle { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; } /* a long question: 3 lines, then … */
h2 { color: var(--p); font-size: 20px; margin: 22px 0 6px; font-family: var(--sans); }
p, li { font-size: 16px; line-height: 1.62; overflow-wrap: anywhere; }
.c p { margin: 0 0 8px; }
ul.pts { padding: 0; padding-inline-start: 20px; margin: 0; }
ul.pts li { margin-bottom: 6px; }
ul.pts li::marker { color: var(--p); }
li.warn { font-weight: 600; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 6px; align-items: center; background: var(--hi); color: var(--p); font-weight: 700; border-radius: 999px; padding: 7px 13px; font-size: 13.5px; }
.ci { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: #E3EEFC; color: var(--p); font-size: 11.5px; font-weight: 700; margin-left: 3px; vertical-align: 2px; line-height: 1; }
button.ci:hover { background: #D3E3FA; }

/* Source cards */
.srcs { display: flex; gap: 10px; margin: 16px 0 4px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: none; }
.srcs::-webkit-scrollbar { display: none; }
/* With a mouse there's no swipe: round arrows at the card row's edges (mouse devices only). */
.srcwrap { position: relative; }
.srcnav { display: none; }
@media (hover: hover) and (pointer: fine) {
  .srcnav { display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--st); color: var(--t); box-shadow: 0 4px 12px rgba(13, 40, 90, .12); z-index: 2; }
  .srcnav:hover { color: var(--p); border-color: #C9D6EA; }
  .srcnav.prev { left: -12px; }
  .srcnav.next { right: -12px; }
  .srcnav[hidden] { display: none; }
}
.src { flex: 0 0 232px; background: #fff; border: 1px solid var(--st); border-radius: 14px; padding: 12px; scroll-snap-align: start; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; text-align: left; }
button.src:hover { border-color: #C9D6EA; }
.st { display: flex; align-items: center; gap: 7px; }
.n { width: 24px; height: 24px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 24px; }
.n.dim { opacity: .55; }
.tag { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.tag.reference { background: #FFF1E2; color: var(--or); }
.tag.research { background: var(--hi); color: var(--p); }
.tag.guideline { background: var(--tealbg); color: var(--teal); }
.tag.drug { background: #FFF6E0; color: var(--gold); }
.ar { margin-left: auto; color: var(--sec); }
.src b { display: block; margin-top: 9px; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.src small { display: block; margin-top: 5px; color: var(--sec); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-ph { height: 12px; border-radius: 5px; background: var(--sub); margin-top: 9px; }
.bar-ph.short { width: 60%; }
.ph-lines span { display: block; height: 13px; border-radius: 5px; background: var(--sub); margin: 9px 0; }
.ph-lines span:nth-child(2) { width: 82%; } .ph-lines span:nth-child(3) { width: 90%; } .ph-lines span:nth-child(4) { width: 68%; }

.card { background: #fff; border: 1px solid var(--st); border-radius: 16px; padding: 16px; }
.fb { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.fb .q { font-weight: 600; font-size: 15px; }
.fb .b { margin-left: auto; display: flex; gap: 8px; }
.fbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--st); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; background: #fff; }
.fbtn:hover { border-color: #C9D6EA; }
.fbtn.on { background: var(--p); border-color: var(--p); color: #fff; }
.lab { margin-top: 22px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; color: var(--sec); display: flex; align-items: center; gap: 8px; }
.lab .r { margin-left: auto; color: var(--p); letter-spacing: 0; font-size: 12.5px; display: inline-flex; gap: 5px; align-items: center; }
.fu { display: flex; gap: 10px; align-items: center; margin-top: 8px; background: #fff; border: 1px solid var(--st); border-radius: 12px; padding: 11px 13px; font-size: 14.5px; width: 100%; text-align: start; overflow-wrap: anywhere; }
.fu:hover { border-color: #C9D6EA; }
.fu i { color: var(--p); font-style: normal; font-weight: 700; display: inline-flex; }
.ref { display: block; width: 100%; text-align: left; font-size: 13.5px; color: var(--mu); padding: 7px 0; border-bottom: 1px solid var(--st); overflow-wrap: anywhere; }
button.ref:hover, a.ref:hover { color: var(--p); }
.note-box { margin-top: 10px; display: flex; gap: 10px; align-items: center; color: var(--sec); font-size: 13px; line-height: 1.45; }
.fail h3 { margin: 18px 0 6px; font-size: 20px; }
.fail p { color: var(--t); }
.fail small { display: block; color: var(--sec); font-size: 12.5px; margin: 6px 0 14px; }
.stream-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--sec); font-size: 13px; margin-top: 14px; }

/* Ask bar */
.askbar { border-top: 1px solid var(--st); background: var(--bg); padding: 12px 26px calc(14px + env(safe-area-inset-bottom)); } /* clear of the iPhone/iPad home bar */
.ask { max-width: 780px; margin: 0 auto; background: #fff; border: 1px solid var(--st); border-radius: 20px; padding: 10px 10px 8px 14px; box-shadow: 0 6px 18px rgba(13, 40, 90, .06); }
.ask .row { display: flex; align-items: flex-end; gap: 6px; }
.ask textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 15.5px; line-height: 1.4; padding: 7px 4px; max-height: 140px; height: 36px; }
.ask textarea::placeholder { color: var(--sec); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib { color: var(--p); width: 34px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; flex: 0 0 34px; }
.ib:hover { background: var(--hi); }
.modebtn { position: relative; flex: 0 0 auto; align-self: center; }
.mode { display: inline-flex; align-items: center; gap: 4px; background: var(--hi); color: var(--p); font-weight: 700; border-radius: 999px; padding: 6px 11px; font-size: 13px; white-space: nowrap; }
.menu { position: absolute; right: 0; bottom: calc(100% + 8px); background: #fff; border: 1px solid var(--st); border-radius: 14px; box-shadow: 0 12px 30px rgba(13, 40, 90, .14); padding: 6px; min-width: 170px; z-index: 6; }
.menu button { display: flex; width: 100%; padding: 9px 10px; border-radius: 9px; font-size: 14px; gap: 8px; align-items: center; white-space: nowrap; }
.menu button:hover { background: var(--sub); }
.menu button.on { color: var(--p); font-weight: 700; }
.send { width: 36px; height: 36px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; flex: 0 0 36px; }
.send:disabled { background: #C9D2DF; }
.ask .foot { margin-top: 6px; font-size: 12.5px; color: var(--sec); display: flex; gap: 8px; align-items: center; min-width: 0; }
.ask .foot .sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; display: inline-flex; align-items: center; gap: 6px; }
.atts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.att { display: inline-flex; align-items: center; gap: 6px; background: var(--sub); border: 1px solid var(--st); border-radius: 10px; padding: 5px 9px; font-size: 12.5px; max-width: 100%; min-width: 0; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.att button { color: var(--sec); display: inline-flex; }
.priv { display: inline-flex; gap: 5px; align-items: center; color: var(--deep); background: var(--hi); border-radius: 999px; padding: 2px 8px; font-weight: 600; margin-left: auto; flex: 0 0 auto; }

/* Home */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--st); border-radius: 14px; padding: 4px; max-width: 100%; }
.seg button { padding: 9px 20px; border-radius: 10px; font-weight: 600; color: var(--mu); font-size: 15px; white-space: nowrap; }
.seg button.on { background: var(--hi); color: var(--t); }
.hero { text-align: center; padding-top: 30px; }
.logo { width: 104px; height: 104px; margin: 26px auto 16px; }
.logo img { width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 12px 30px rgba(18, 89, 181, .25); display: block; }
.hero h1 { margin: 6px 0 6px; }
.hero .s { color: var(--mu); font-size: 16px; margin: 0 0 14px; }
.ex { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; text-align: left; }
.ex .card { text-align: left; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; }
button.card:hover { border-color: #C9D6EA; }
.ex .card b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.ex .card small { color: var(--sec); font-size: 13px; }

/* Overlays */
.ov { position: absolute; inset: 0; background: rgba(13, 18, 33, .32); display: flex; align-items: center; justify-content: center; z-index: 5; padding: 16px; }
.sheet { width: 460px; max-width: 100%; max-height: 100%; overflow-y: auto; background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.sheet h3 { margin: 0 0 14px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.sheet h3 .x { margin-left: auto; color: var(--sec); font-weight: 400; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px; }
.sheet h3 .x:hover { background: var(--sub); }
.sheet .intro { font-size: 14px; color: var(--sec); line-height: 1.5; margin: -4px 0 6px; }
.sheet .fine { font-size: 11.5px; color: var(--sec); line-height: 1.45; margin: 14px 0 0; }
.sheet .err { font-size: 13.5px; color: var(--red); margin: 10px 0 0; line-height: 1.45; }
.slider-row { font-size: 14.5px; font-weight: 600; }
input[type=range].sl { width: 100%; margin: 12px 0 14px; accent-color: var(--p); height: 22px; }
.tg { display: flex; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--st); font-size: 14.5px; width: 100%; gap: 12px; text-align: left; }
.sw { margin-left: auto; width: 42px; height: 25px; border-radius: 99px; background: #CBD3DF; position: relative; flex: 0 0 42px; transition: background .15s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.sw.on { background: var(--p); }
.sw.on::after { left: 20px; }
.sgl { font-size: 11.5px; font-weight: 700; letter-spacing: .7px; color: var(--sec); margin: 14px 0 2px; }
.btns { display: flex; gap: 10px; margin-top: 16px; }
.btns.finish-mob { display: none; }
.btn { flex: 1; text-align: center; border-radius: 999px; padding: 11px; font-weight: 700; font-size: 14.5px; border: 1px solid var(--st); background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.btn:hover { border-color: #C9D6EA; }
.btn.pr { background: var(--p); color: #fff; border-color: var(--p); }
.btn.pr:hover { background: #0F4E9F; }
.btn.pr:disabled { background: #C9D2DF; border-color: #C9D2DF; }
.btn.red { color: var(--red); }
.btn.grow0 { flex: 0 0 auto; padding: 10px 18px; white-space: nowrap; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--st); border-radius: 12px; margin-top: 8px; font-size: 14.5px; background: #fff; width: 100%; text-align: left; min-width: 0; }
button.opt:hover, label.opt:hover { border-color: #C9D6EA; }
label.opt { cursor: pointer; }
.opt.off, button.opt:disabled { opacity: .5; pointer-events: none; }
.opt .oi { width: 34px; height: 34px; border-radius: 10px; background: var(--hi); color: var(--p); display: grid; place-items: center; flex: 0 0 34px; }
.opt small { color: var(--sec); }
.opt .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.opt .rm { margin-left: auto; color: var(--sec); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px; }
.opt .rm:hover { background: var(--sub); }
.inp { border: 1px solid var(--st); border-radius: 14px; padding: 13px; background: #fff; font-size: 15px; min-height: 76px; width: 100%; resize: vertical; outline: 0; display: block; line-height: 1.45; }
.inp:focus { border-color: var(--p); }
.inp::placeholder { color: var(--sec); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ghost { border: 1px solid var(--st); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; background: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button.ghost:hover { border-color: #C9D6EA; }
.ghost.red { color: var(--red); }
.ghost.sel { background: var(--hi); color: var(--deep); border-color: var(--p); }
.cite-title { font-weight: 700; font-size: 16px; margin: 8px 0 2px; overflow-wrap: anywhere; }
.sheet p.body { font-size: 14.5px; margin: 4px 0; line-height: 1.55; }
.dialog-msg { font-size: 14.5px; color: var(--mu); line-height: 1.5; margin: 0; }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--t); color: #fff; font-size: 14px; padding: 10px 16px; border-radius: 999px; z-index: 8; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* Loading checklist */
.chk { margin-top: 18px; }
.chk div { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; }
.chk .d { width: 20px; height: 20px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; flex: 0 0 20px; }
.chk .w { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--hi); border-top-color: var(--p); animation: spin .8s linear infinite; flex: 0 0 20px; }
.chk .e { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--st); flex: 0 0 20px; }
.chk .todo { color: var(--sec); }
.chk .now { font-weight: 600; }
.chk small { display: block; color: var(--p); font-size: 12px; font-weight: 600; }
.bar { height: 6px; background: var(--st); border-radius: 9px; overflow: hidden; margin: 14px 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--p); transition: width .4s ease; }
.loading { padding-top: 40px; }
.phase { color: var(--mu); font-size: 15px; }

/* Lists (History, Saved, reports) */
.hrow { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--st); width: 100%; text-align: left; align-items: flex-start; min-width: 0; }
.hrow .mi { width: 32px; height: 32px; border-radius: 10px; background: var(--hi); color: var(--p); display: grid; place-items: center; flex: 0 0 32px; }
.hrow .tx { min-width: 0; flex: 1; }
.hrow b { font-size: 15px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; } /* long questions: 3 lines, then … */
.hrow p { margin: 2px 0 0; font-size: 13.5px; color: var(--mu); line-height: 1.45; }
.hrow small { margin-left: auto; color: var(--sec); font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
.hrow .hbad { font-weight: 600; color: var(--sec); }
.hrow .hbad.error, .hrow .hbad.cancelled { color: var(--red); }
.more .merr { margin: 0 0 6px; font-size: 13.5px; color: var(--red); }
.hitem { display: flex; align-items: flex-start; gap: 4px; border-bottom: 1px solid var(--st); }
.hitem .hrow { border-bottom: 0; flex: 1; }
.hitem .hrow:hover b { color: var(--p); }
.hitem .rowact { color: var(--sec); width: 32px; height: 32px; margin-top: 13px; display: inline-grid; place-items: center; border-radius: 50%; flex: 0 0 32px; opacity: .55; }
.hitem .rowact:hover { opacity: 1; background: var(--sub); }
.hitem .rowact.on { color: var(--p); opacity: 1; }
.ttl { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.ttl h1 { margin: 0; }
.ttl .sub { color: var(--sec); font-size: 14px; margin-top: 4px; }
.ttl .r { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 60px 16px; color: var(--sec); }
.empty .big { color: var(--p); }
.empty .btn { margin: 14px auto 0; }
.empty h3 { font-family: var(--serif); color: var(--t); font-size: 24px; margin: 12px 0 6px; }
.empty p { margin: 0 auto; max-width: 380px; font-size: 14.5px; }
.more { display: flex; flex-direction: column; align-items: center; margin-top: 16px; }
.miniswitch { width: 30px; height: 18px; border-radius: 99px; background: #CBD3DF; position: relative; display: inline-block; flex: 0 0 30px; }
.miniswitch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.miniswitch.on { background: var(--p); }
.miniswitch.on::after { left: 14px; }

/* Max */
.maxhd { background: linear-gradient(135deg, #0A3880, #1259B5); color: #fff; border-radius: 18px; padding: 18px; }
.maxhd b { font-size: 18px; display: block; }
.maxhd small { opacity: .85; font-size: 14px; display: block; margin-top: 2px; line-height: 1.45; }
.tabs2 { display: inline-flex; background: #fff; border: 1px solid var(--st); border-radius: 12px; padding: 4px; margin: 14px 0; max-width: 100%; }
.tabs2 button { padding: 8px 18px; border-radius: 9px; font-weight: 600; color: var(--mu); font-size: 14.5px; white-space: nowrap; }
.tabs2 button.on { background: var(--hi); color: var(--t); }
.mlabel { font-weight: 700; margin: 6px 0 8px; display: block; }
.mlabel.gap { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exams { grid-template-columns: repeat(4, 1fr); }
.exam { border: 1px solid var(--st); border-radius: 12px; padding: 10px 12px; background: #fff; font-weight: 600; font-size: 14px; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.exam:hover { border-color: #C9D6EA; }
.exam.on { border-color: var(--p); background: var(--hi); color: var(--deep); }
.selwrap { position: relative; display: inline-flex; max-width: 100%; }
.selwrap select { appearance: none; -webkit-appearance: none; border: 1px solid var(--st); border-radius: 999px; padding: 7px 30px 7px 12px; font-size: 13.5px; background: #fff; font-weight: 600; max-width: 100%; cursor: pointer; }
.selwrap .caret { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--mu); }
.revcard { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.revcard .tx { min-width: 0; flex: 1; }
.revcard .tx div { color: var(--sec); font-size: 13.5px; }
.btns.stack .btn { white-space: normal; }
.ans { border: 1px solid var(--st); border-radius: 12px; padding: 12px; margin-top: 8px; background: #fff; font-size: 15px; width: 100%; text-align: left; display: block; overflow-wrap: anywhere; }
button.ans:not(:disabled):hover { border-color: #C9D6EA; }
.ans.pick { border-color: var(--p); background: var(--hi); }
.ans.good { border-color: var(--green); background: #EAF7F0; }
.ans.bad { border-color: #D9534F; background: #FDECEB; }
.ans small { display: block; color: var(--mu); margin-top: 5px; font-size: 13px; line-height: 1.45; }
.diff { font-size: 11.5px; font-weight: 700; color: var(--gold); background: #FFF6E0; border-radius: 999px; padding: 3px 9px; text-transform: uppercase; }
.qhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qhead .tp { color: var(--sec); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.qhead .rep { margin-left: auto; color: var(--sec); font-size: 13.5px; display: inline-flex; gap: 5px; align-items: center; }
.qhead .rep:hover:not(:disabled) { color: var(--t); }
h1.stem { font-size: 24px; font-family: var(--sans); font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.qbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--sec); font-size: 13.5px; }
.qbar .bar { flex: 1; margin: 0; }
.qbar b { color: var(--t); font-variant-numeric: tabular-nums; }
.score { text-align: center; padding: 22px 16px; background: linear-gradient(135deg, var(--hi), #EAF6F7); border: 1px solid #D6E4F7; border-radius: 18px; }
.score .pct { font-family: var(--serif); font-size: 54px; color: var(--p); font-weight: 700; line-height: 1.1; }
.score b { display: block; font-size: 16px; margin-top: 4px; }
.score small { display: block; color: var(--sec); font-size: 13px; margin-top: 6px; }
.rrow { display: flex; gap: 10px; align-items: flex-start; padding: 11px; margin-top: 8px; width: 100%; text-align: left; border: 1px solid var(--st); border-radius: 12px; background: #fff; font-size: 13.5px; min-width: 0; }
.rrow span.t { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rrow .ok { color: var(--green); } .rrow .no { color: #D9534F; } .rrow .na { color: var(--sec); }
.okl { display: flex; gap: 8px; align-items: center; font-size: 14.5px; margin: 7px 0; }
.okl i { color: var(--p); font-style: normal; font-weight: 800; display: inline-flex; }
.left { color: var(--sec); font-size: 13.5px; margin-top: 10px; }
.btns.narrow { max-width: 420px; }
.intro-card { border-radius: 22px; padding: 22px; background: linear-gradient(180deg, #fff, var(--sub)); border: 1px solid #E8D9B8; box-shadow: 0 14px 28px rgba(18, 89, 181, .12); text-align: center; }
.intro-card .mark { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0A3880, #1259B5, #149EA6); box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(183, 121, 31, .7); }
.intro-card h2 { font-family: var(--serif); color: var(--t); font-size: 24px; margin: 4px 0 6px; }
.intro-card .s { color: var(--sec); font-size: 14.5px; margin: 0 0 14px; line-height: 1.5; }
.intro-card .rw { display: flex; gap: 10px; text-align: left; font-size: 14px; color: var(--sec); line-height: 1.5; margin: 10px 0; }
.intro-card .rw i { color: var(--p); display: inline-flex; padding-top: 2px; }
.intro-card .rw b { color: var(--t); }
.intro-card .safe { display: flex; gap: 10px; text-align: left; font-size: 13px; font-weight: 500; padding: 12px; border-radius: 14px; background: rgba(46, 158, 106, .08); border: 1px solid rgba(46, 158, 106, .25); margin: 14px 0 4px; line-height: 1.45; }
.intro-card .safe i { color: var(--green); display: inline-flex; }
.rpt-progress { margin-top: 14px; }
.rpt-progress h1 { font-size: 26px; margin: 12px 0 10px; }
.rpt-progress .hd { display: flex; align-items: center; gap: 10px; }
.rpt-progress .hd .ghost { margin-left: auto; }
.kp { padding-left: 0; list-style: none; margin: 0; background: linear-gradient(135deg, var(--hi), #EAF6F7); border: 1px solid #D6E4F7; border-radius: 16px; padding: 14px 16px; }
.kp li { display: flex; gap: 9px; margin: 4px 0; }
.kp li i { color: var(--green); display: inline-flex; padding-top: 4px; }
.rule { width: 56px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--p), #149EA6, #FFC721); margin: -4px 0 6px; }
.li-item { display: flex; gap: 9px; }
.li-item::before { content: "•"; color: var(--p); font-weight: 700; }

/* Settings */
.set .card { padding: 4px 16px; margin-top: 10px; }
.set .row { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--st); font-size: 15px; width: 100%; text-align: left; gap: 12px; min-width: 0; }
.set .row:last-child { border-bottom: 0; }
.set .row small { margin-left: auto; color: var(--sec); font-size: 13.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.set .row .lt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set a.row:hover, .set button.row:hover { color: var(--p); }
.set .row.link { color: var(--p); }
.set .row.red { color: var(--red); }
.set .hint { font-size: 12.5px; color: var(--sec); padding: 0 0 12px; line-height: 1.45; border-bottom: 1px solid var(--st); }
.set .h { font-size: 11.5px; font-weight: 700; letter-spacing: .7px; color: var(--sec); margin: 18px 4px 0; }
.set .maxcard { padding: 14px 16px; display: flex; align-items: center; background: linear-gradient(135deg, #0A3880, #1259B5); color: #fff; border: 0; margin-top: 10px; width: 100%; border-radius: 16px; gap: 10px; }
.set .maxcard span { margin-left: auto; display: inline-flex; }
/* Switch to yearly (iOS SwitchToYearlyViews): the Settings row and the sheet after an answer. */
.set .row.sy-row { align-items: flex-start; }
.set .row.sy-row small { margin-top: 2px; }
.set .row.sy-row .spin { margin-left: auto; }
.sy-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sy-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sy-pill { font-size: 9.5px; font-weight: 700; color: var(--p); background: var(--hi); border-radius: 999px; padding: 3px 7px; white-space: nowrap; letter-spacing: .2px; }
.sy-line { font-size: 12.5px; color: var(--sec); line-height: 1.4; }
.sy-err { font-size: 12px; font-weight: 600; color: var(--or); }
.sy-sheet { text-align: center; padding: 28px 24px 16px; }
.sy-sheet .sy-label { font-size: 11.5px; font-weight: 700; color: var(--p); margin: 0 0 10px; letter-spacing: .3px; }
.sy-sheet h2 { font-family: var(--serif); color: var(--t); font-size: 25px; line-height: 1.2; margin: 0 0 16px; font-weight: 700; }
.sy-compare { border: 1px solid var(--st); border-radius: 16px; background: #fff; text-align: left; }
.sy-cmp { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; font-size: 15px; }
.sy-cmp + .sy-cmp { border-top: 1px solid var(--st); }
.sy-cmp.old { color: var(--sec); font-weight: 500; }
.sy-cmp.old s { color: #8A94A6; }
.sy-cmp .p { color: var(--p); font-size: 17px; }
.sy-sheet .btns.stack { flex-direction: column; }
.sy-sheet .btn.pr { padding: 15px; font-size: 16px; border-radius: 16px; }
.sy-sheet .btn.sy-later { border: 0; color: var(--sec); font-size: 15px; }
.sy-legal { font-size: 11px; color: #8A94A6; margin: 10px 0 0; }
.sy-legal a { color: inherit; }
.langs button { display: flex; width: 100%; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--st); font-size: 15px; }
.langs button:last-child { border-bottom: 0; }
.langs button.on { color: var(--p); font-weight: 700; }
.langs button .ico { margin-left: auto; }

/* Phone */
.tabbar { display: none; }
@media (max-width: 820px) {
  .btns.finish-mob { display: flex; }
  .side { display: none; }
  .top { padding: 8px 12px; min-height: 54px; }
  .mob { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
  .dsk { display: none !important; }
  .rb { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--st); background: #fff; display: grid; place-items: center; color: var(--mu); flex: 0 0 38px; }
  .rb.on { color: var(--p); }
  .rb.wide { width: auto; padding: 0 12px; font-size: 13px; border-radius: 999px; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
  .rbs { display: flex; gap: 6px; flex: 0 0 auto; }
  .mb { flex: 1; min-width: 0; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 21px; display: flex; align-items: center; justify-content: center; gap: 7px; }
  .mb img { width: 24px; height: 24px; border-radius: 6px; }
  .c { padding: 16px 14px 26px; }
  h1 { font-size: 26px; }
  .hero { padding-top: 12px; }
  .hero h1 { font-size: 28px; }
  .logo { margin: 22px auto 14px; }
  .ex { grid-template-columns: 1fr; margin-top: 18px; }
  .src { flex-basis: 210px; }
  p, li { font-size: 15px; }
  .askbar { padding: 8px 10px; }
  /* Answer page: no tab bar under the ask bar, so the ask bar keeps clear of the home bar itself. */
  .main:has(> .tabbar[hidden]) .askbar { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .ask { padding: 8px 8px 7px 10px; border-radius: 18px; }
  .ib { width: 30px; flex-basis: 30px; }
  .tabbar { display: flex; border-top: 1px solid var(--st); background: #fff; padding: 7px 0 calc(9px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; text-align: center; font-size: 11px; color: var(--sec); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
  .tabbar a.on { color: var(--p); font-weight: 700; }
  .ov { align-items: flex-end; padding: 0; }
  .sheet { width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; max-height: calc(100% - 24px); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .grid2 { grid-template-columns: 1fr; }
  .exams { grid-template-columns: 1fr 1fr; }
  .btns.stack { flex-direction: column; }
  .ttl .r { margin-left: 0; width: 100%; }
  .seg button { padding: 9px 16px; }
  h1.stem { font-size: 21px; }
  .toast { bottom: 140px; }
}
@media (max-width: 360px) {
  .seg button { padding: 8px 12px; font-size: 14px; }
  .tabs2 button { padding: 8px 12px; }
  /* Ask bar: smaller side buttons, gaps and padding give the text box room for the whole placeholder at 320 px. */
  .askbar { padding-left: 6px; padding-right: 6px; }
  .ask { padding-left: 8px; padding-right: 6px; }
  .ask .row { gap: 3px; }
  .ib { width: 28px; flex-basis: 28px; }
  .ib .ico { width: 16px; height: 16px; }
  .mode { padding: 5px 7px; }
  .send { width: 34px; height: 34px; flex-basis: 34px; }
  .fb .b { margin-left: 0; }
}

/* Print: only the report (Export PDF). */
.print { display: none; }
@media print {
  @page { size: A4; margin: 18mm 17mm; }
  body.wa { display: block; height: auto; overflow: visible; background: #fff; }
  body.printing .shell, body.printing .boot { display: none !important; }
  body.printing .print { display: block; font-family: var(--sans); font-size: 11pt; color: #0D1221; line-height: 1.45; }
  .print h1 { font-family: Georgia, serif; font-size: 22pt; margin: 0 0 6pt; letter-spacing: 0; }
  .print h2 { color: #1259B5; font-size: 13.5pt; margin: 16pt 0 6pt; break-after: avoid; }
  .print p, .print li { font-size: 11pt; line-height: 1.45; margin: 0 0 6pt; }
  .print .meta { color: #616E82; font-size: 9.5pt; margin-bottom: 12pt; }
  .print .keys { background: #EDF5FF; padding: 8pt 12pt; border-radius: 6pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print .keys ul { margin: 0; padding-left: 16pt; }
  .print .item { margin: 0 0 4pt 12pt; }
  .print .ref { font-size: 9.5pt; margin-bottom: 5pt; border: 0; padding: 0; color: #0D1221; }
  .print .ref a, .print .foot a { color: #1259B5; word-break: break-all; }
  .print .foot { color: #616E82; font-size: 8.5pt; margin-top: 18pt; }
}

/* Touch screens: iPhone Safari zooms into any text box under 16px and stays zoomed, so the boxes use 16px there. */
@media (pointer: coarse) {
  .ask textarea, .inp, .selwrap select { font-size: 16px; }
}
