/* Skin: calm, fast, one clear action per screen.
   Loaded after tool.css and site.css, so it only overrides tokens and surfaces.
   Motion follows two springs: --spring (no overshoot) for moves, --pop (slight overshoot) for confirmation. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --fg: #13171e;
  --muted: #566073;
  --line: #e1e4ea;
  --accent: #1c4fd8;
  --accent-ink: #ffffff;
  --accent-tint: #e6ecfc;
  --ok: #0b7a43;
  --ok-bg: #e1f3e8;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --warn: #6b4a00;
  --warn-bg: #f9f1dc;
  --shadow: 0 1px 1px rgba(19,23,30,.04), 0 8px 24px -12px rgba(19,23,30,.16);
  --font-body: "Figtree", "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: var(--font-body);
  --spring: linear(0, 0.058, 0.182, 0.324, 0.459, 0.577, 0.675, 0.754, 0.815, 0.863, 0.899, 0.926, 0.946, 0.961, 0.972, 0.98, 1);
  --pop: linear(0, 0.041, 0.14, 0.268, 0.406, 0.54, 0.661, 0.764, 0.848, 0.914, 0.963, 0.997, 1.019, 1.032, 1.037, 1.038, 1.036, 1.032, 1.027, 1.021, 1.016, 1.012, 1.008, 1.005, 1.003, 1.001, 1, 0.999, 1);
}
@media not all /* dark mode off; change back to (prefers-color-scheme: dark) to re-enable */ {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --surface: #171b22; --surface-2: #1f242d; --fg: #e9ecf1; --muted: #9aa3b2; --line: #2b313c;
    --accent: #8fb0ff; --accent-ink: #0b1633; --accent-tint: #1d2a4d;
    --ok: #6fd49c; --ok-bg: #17301f; --bad: #ff9a92; --bad-bg: #3a1c1a; --warn: #e8c46a; --warn-bg: #302612;
    --shadow: 0 1px 1px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --surface: #171b22; --surface-2: #1f242d; --fg: #e9ecf1; --muted: #9aa3b2; --line: #2b313c;
  --accent: #8fb0ff; --accent-ink: #0b1633; --accent-tint: #1d2a4d;
  --ok: #6fd49c; --ok-bg: #17301f; --bad: #ff9a92; --bad-bg: #3a1c1a; --warn: #e8c46a; --warn-bg: #302612;
  --shadow: 0 1px 1px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
}

/* type */
body { font-size: 16px; line-height: 1.55; font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; }
:lang(hi) body, body:lang(hi) { line-height: 1.7; }
.pagetitle { font-size: clamp(26px, 5.4vw, 40px); line-height: 1.12; letter-spacing: -0.028em; font-weight: 700; margin-top: 20px; text-wrap: balance; }
.lead { font-size: 16px; color: var(--muted); max-width: 58ch; margin-top: 8px; }
h2 { letter-spacing: -0.012em; }
.card h2 { font-size: 17px; font-weight: 650; }
.mono, .specs dd, input[type="number"], input[type="text"] { font-family: var(--font-body); font-variant-numeric: tabular-nums; }

/* touch: respond on press, no tap delay */
a, button, label.btn, .opt, .chip { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn, .opt, .chip, .iconbtn, .tabs button, .si, .lang a, .links a, .pill {
  transition: transform .12s ease-out, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:active:not([disabled]), .opt:active, .chip:active, .iconbtn:active, .tabs button:active, .si:active, .links a:active { transform: scale(.97); }

/* top bar: translucent material */
.top { background: color-mix(in srgb, var(--bg) 74%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }
@media (prefers-reduced-transparency: reduce) { .top { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.brand span { letter-spacing: -0.02em; font-weight: 700; }

/* sidebar: sentence-case groups, pill items */
.sh { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.si { border-radius: 999px; font-weight: 500; }
.si.on { background: var(--accent-tint); color: var(--accent); font-weight: 650; }

/* cards: quiet surfaces, one soft shadow */
.card { border-radius: 22px; border-color: color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow); }
.grid { gap: 16px; }

/* the exam strip sits on the canvas, not in a card */
.grid > .card.span2 { background: transparent; border: 0; box-shadow: none; padding: 4px 0 0; }
.grid > .card > h2:first-child::before { width: 24px; height: 24px; font-size: 13px; font-weight: 700; background: var(--fg); color: var(--bg); }

/* exam picker: one scrolling row of pills */
.exams { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 16px 8px; margin: 0 -16px; scrollbar-width: none; }
.exams::-webkit-scrollbar { display: none; }
.opt { flex: none; scroll-snap-align: start; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.opt::before { display: none; }
.opt b { font-weight: 600; white-space: nowrap; }
.opt small { display: none; }
.opt[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.opt[aria-pressed="true"] small { color: inherit; }
@media (min-width: 900px) {
  .exams { flex-wrap: wrap; overflow: visible; margin: 0; padding: 2px 0 6px; }
  .opt small { display: inline; font-size: 13px; opacity: .7; }
}

/* the rules, as one quiet line */
.specs { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.specs div { background: none; padding: 0; border-radius: 0; }
.specs dt { font-size: 12.5px; color: var(--muted); }
.specs dd { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.note { background: none; color: var(--muted); border: 0; border-left: 3px solid var(--line); border-radius: 0; padding: 2px 0 2px 12px; font-size: 14px; line-height: 1.55; }
.note.ok { background: none; color: var(--muted); }
.note.ok:last-child { color: var(--ok); border-left-color: var(--ok); }
.note a { color: inherit; font-weight: 650; text-underline-offset: 2px; }

/* buttons */
.btn { border-radius: 999px; min-height: 52px; font-weight: 600; letter-spacing: -0.005em; }
.btn.primary { box-shadow: none; }
.btn.primary:hover { filter: none; background: color-mix(in srgb, var(--accent) 90%, #000); }
.tabs { border-radius: 999px; }
.stage { border-radius: 20px; border-width: 1.5px; }

/* the result: the one moment that gets motion */
.verdict { border-radius: 18px; padding: 16px 18px; font-size: 18px; font-weight: 700; letter-spacing: -0.012em; }
.verdict.ok { animation: sorted .7s var(--pop) both; }
@keyframes sorted { from { transform: scale(.94); opacity: .3; } to { transform: none; opacity: 1; } }

/* drawer on phones: springs in, scrim fades, blurs the page behind */
@media (max-width: 899px) {
  .side { transition: transform .55s var(--spring); will-change: transform; border-radius: 0 24px 24px 0; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(10,14,22,.38); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  .pagetitle { font-size: clamp(25px, 7vw, 30px); }
}

/* preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:active, .opt:active, .chip:active, .si:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) { .scrim { -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) {
  :root { --line: #6b7280; }
  .card, .specs, .opt { border-color: var(--fg); }
  .top { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* phones: language switch shares the top row; long notes fold to three lines until tapped */
@media (max-width: 899px) {
  .top { flex-wrap: nowrap; gap: 6px; }
  .top .brand span { font-size: 17px; white-space: nowrap; }
  .lang a, .lang button { padding-left: 12px; padding-right: 12px; font-size: 14px; }
  .rules .note:not(:last-child):not(.open) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
}

/* image converter */
.cvtop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#cvZone { border-style: dashed; border-width: 1.5px; transition: background-color .2s, border-color .2s; }
#cvZone.over { background: var(--accent-tint); border-color: var(--accent); }
.cvopts { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 24px; }
.cvjpg { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; }
.cvjpg .ctl { min-width: 200px; }
.cvjpg .f { max-width: 220px; }
.cvlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cvrow { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cvrow:first-child { border-top: 0; }
.cvrow img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.cvname { min-width: 0; display: flex; flex-direction: column; }
.cvname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvright { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cvright .btn { min-height: 44px; padding: 6px 20px; }
.bad { color: var(--bad); }
@media (min-width: 700px) { .cvrow { grid-template-columns: 52px minmax(0, 1fr) auto; } .cvright { grid-column: auto; } }

/* cyber café mode */
.cafetop { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; }
.cafetop .f { min-width: 200px; }
.cafetop select { min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg); font: inherit; padding: 0 12px; }
.cafespecs { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; color: var(--muted); }
.cafespecs b { color: var(--fg); font-weight: 600; }
.cafebar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cafebar .grow { flex: 1; }
.cands { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.cand { background: var(--surface-2); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.chead { display: flex; align-items: center; gap: 8px; }
.cname { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; font-weight: 600; padding: 0 12px; }
.pill.on { background: var(--ok-bg); color: var(--ok); }
.cslots { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
.cslot { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: 16px; padding: 8px 6px; cursor: pointer; text-align: center; font-size: 13px; transition: transform .12s ease-out, border-color .2s; }
.cslot:active { transform: scale(.97); }
.cslot.done { border-style: solid; border-color: var(--ok); }
.cslot.bad { border-color: var(--bad); }
.cslot:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.cimg { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.cimg img { width: 100%; height: 100%; object-fit: contain; }
.cimg .plus { font-size: 28px; color: var(--muted); line-height: 1; }
.clab { font-weight: 600; }
.okc { color: var(--ok); font-weight: 600; }
.cafefoot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.segb[aria-pressed="true"], .segb.on { background: var(--accent); color: var(--accent-ink); }
.seglab { align-self: center; padding: 0 12px 0 14px; font-weight: 600; color: var(--fg); font-size: 14px; }
.cvjpg .ctl { flex: 1 1 220px; }
.cvjpg .ctl input[type="range"] { width: 100%; }
#cvZone .cvopts { align-items: center; }
.cvjpg { width: 100%; }
.cvjpg .ctl { min-width: 0; }
.cvjpg .ctl input[type="range"] { max-width: 100%; box-sizing: border-box; margin: 0; }

/* background swatches */
.swatches{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.sw{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;border:1px solid var(--line,#d8dbe2);background:transparent;color:inherit;font:inherit;font-size:14px;cursor:pointer;min-height:40px}
.sw i{width:16px;height:16px;border-radius:50%;border:1px solid rgba(0,0,0,.2);display:inline-block}
.sw-white i{background:#fff}.sw-blue i{background:#cfe3ff}.sw-cream i{background:#fbf3dc}.sw-grey i{background:#e6e6e6}
.sw[aria-pressed="true"]{border-color:#1c4fd8;box-shadow:0 0 0 2px rgba(28,79,216,.25)}

/* age calculator */
.ageout{margin-top:16px;padding:16px;border-radius:14px;background:rgba(28,79,216,.06)}
.ageout.ok{background:rgba(11,122,67,.09)}.ageout.bad{background:rgba(190,40,40,.08)}
.agebig{font-size:20px;margin:0 0 4px}.agebig b{font-size:28px;font-variant-numeric:tabular-nums}
.agever{font-weight:600;margin:12px 0 4px}.agever.ok{color:#0b7a43}.agever.bad{color:#b42318}
.h3{font-size:15px;margin:16px 0 4px}

/* quick tour */
.tour{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;justify-content:center;padding:12px 16px calc(12px + env(safe-area-inset-bottom));pointer-events:none}
.tour-card{pointer-events:auto;position:relative;width:100%;max-width:440px;background:var(--card,#fff);color:inherit;border:1px solid rgba(0,0,0,.08);border-radius:20px;box-shadow:0 12px 40px rgba(0,0,0,.18);padding:20px 20px 16px;animation:tourIn .35s cubic-bezier(.2,.8,.2,1)}
@keyframes tourIn{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
.tour-card h2{font-size:18px;margin:6px 0 6px}.tour-card p{margin:0 0 12px;font-size:15px;line-height:1.5;color:var(--muted,#555)}
.tour-i{font-size:28px}.tour-skip{position:absolute;top:12px;right:14px;background:none;border:0;color:var(--muted,#555);font:inherit;font-size:14px;padding:8px;min-height:40px;cursor:pointer}
.tour-dots{display:flex;gap:6px;margin-bottom:12px}.tour-dots i{width:6px;height:6px;border-radius:3px;background:rgba(0,0,0,.18);transition:width .25s}.tour-dots i.on{width:18px;background:#1c4fd8}
.tour-btns{display:flex;gap:8px;justify-content:flex-end}
@media (prefers-reduced-motion:reduce){.tour-card{animation:none}}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
button.si{background:none;border:0;width:100%;text-align:left;font-family:inherit;cursor:pointer}

/* concise sidebar: collapsible groups */
.sidenav{gap:6px}
.fold>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;min-height:40px;margin:0;padding:0 12px;border-radius:999px;color:var(--muted)}
.fold>summary::-webkit-details-marker{display:none}
.fold>summary:hover{background:rgba(0,0,0,.04)}
.fold .chev{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .2s;margin-right:4px}
.fold[open]>summary .chev{transform:rotate(45deg)}
.fold[open]{padding-bottom:4px}
@media (prefers-reduced-motion:reduce){.fold .chev{transition:none}}

/* FAQ slide-in panel (only when JavaScript is available; otherwise the FAQ stays in the page) */
.faqbtn{display:none}
.faqhead{display:flex;align-items:center;justify-content:space-between;gap:8px}
.faqclose{display:none}
.js .faqbtn{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;margin-right:8px;border-radius:999px;border:1px solid var(--line,#d8dbe2);background:transparent;color:inherit;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.js .faqclose{display:inline-flex}
.js .faq#faqPanel{position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);max-width:100vw;margin:0;border-radius:20px 0 0 20px;overflow-y:auto;z-index:80;background:var(--card,#fff);box-shadow:-12px 0 40px rgba(0,0,0,.18);transform:translateX(105%);visibility:hidden;transition:transform .32s cubic-bezier(.2,.8,.2,1),visibility 0s .32s;padding:20px 20px calc(24px + env(safe-area-inset-bottom))}
.js .faq-open .faq#faqPanel{transform:none;visibility:visible;transition:transform .32s cubic-bezier(.2,.8,.2,1),visibility 0s}
.faqscrim{position:fixed;inset:0;z-index:75;background:rgba(0,0,0,.35);opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s .25s}
.faq-open .faqscrim{opacity:1;visibility:visible;transition:opacity .25s,visibility 0s}
@media (prefers-reduced-motion:reduce){.js .faq#faqPanel,.faqscrim{transition:none}}
@media (max-width:640px){.js .faq#faqPanel{width:100vw;border-radius:0}}
@media (max-width:480px){.js .faqbtn{padding:0 12px;margin-right:4px;font-size:13px}.top .lang a{padding-left:10px;padding-right:10px}.top .brand span,.top .brand b{font-size:15px}}
.ls{display:none}
.top .grow{min-width:8px}
@media (max-width:480px){.top .ll{display:none}.top .ls{display:inline}.top .lang a{padding-left:12px;padding-right:12px;min-width:44px;text-align:center}.top{gap:8px}.js .faqbtn{margin-right:0}}
