/* ============================================================
   E-Connect for Sessions — Variation 2
   Modern, colour-forward interpretation of the Mankind brand.
   Tailwind supplies utilities; this file owns the component layer
   so page markup stays short and every screen matches.
   ============================================================ */

:root {
  --indigo: #1E1E96;
  --indigo-600: #2323A0;
  --indigo-900: #101050;
  --magenta: #9b126b;
  --purple: #641b8b;
  --aqua: #25A9E0;
  --canvas: #F4F5FB;
  --ink: #14142B;
  --soft: #5C5F7A;
  --line: #E6E8F2;
  --grad: linear-gradient(102deg, #1E1E96 0%, #3A2AA6 38%, #641b8b 72%, #9b126b 100%);
}

* { border-color: var(--line); }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #DEDEF6; color: var(--indigo-900); }

/* ---------- page container: identical on every screen ---------- */

.wrap {
  width: 100%;
  max-width: 76rem;              /* 1216px */
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 1024px) { .wrap { padding-inline: 2rem; } }

.measure { max-width: 48rem; }

/* in-page anchor targets clear the sticky header */
.scroll-target { scroll-margin-top: 104px; }

/* ---------- typography ---------- */

.h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.h2 { font-size: clamp(24px, 3vw, 32px);   font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }

.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--indigo);
}

.lede { font-size: 17px; line-height: 1.62; color: var(--soft); }
.num  { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- links & focus ---------- */

a { color: inherit; text-decoration: none; }

.link { color: var(--indigo); font-weight: 500; }
.link:hover { color: var(--magenta); }

:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
  padding: .78rem 1.5rem; border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; white-space: nowrap; max-width: 100%;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
/* A long label — "Download the signed agreement" — is wider than a phone. Below
   that width the label wraps and centres rather than pushing the page sideways. */
@media (max-width: 520px) {
  .btn { white-space: normal; text-align: center; line-height: 1.35; }
  .btn-lg { padding-inline: 1.4rem; }
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Primary action: flat indigo. The gradient is reserved for feature surfaces —
   on a button it reads as decoration rather than something you can press. */
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 6px 16px -8px rgba(30,30,150,.55); }
.btn-primary:hover { background: var(--indigo-600); box-shadow: 0 10px 22px -10px rgba(30,30,150,.6); }
.btn-primary:active { background: var(--indigo-900); }

.btn-outline { border-color: #CFD2E6; background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }

.btn-ghost { background: #EFEFFB; color: var(--indigo); }
.btn-ghost:hover { background: #DEDEF6; }

.btn-quiet { background: transparent; color: var(--soft); padding-inline: .75rem; }
.btn-quiet:hover { color: var(--indigo); }

.btn-white { background: #fff; color: var(--indigo); }
.btn-white:hover { background: #EFEFFB; }

.btn-danger { background: #FCECEC; color: #B3261E; }
.btn-danger:hover { background: #F8DEDE; }

.btn-sm { padding: .48rem 1rem; font-size: 13px; }
.btn-lg { padding: .95rem 1.9rem; font-size: 15.5px; }

/* ---------- surfaces ---------- */

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(20,20,43,.03);
}
.card-hover { transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.card-hover:hover { box-shadow: 0 2px 6px rgba(20,20,43,.06), 0 22px 44px -22px rgba(20,20,43,.28); transform: translateY(-2px); border-color: #D7DAEC; }

/* Tinted surfaces. Values are strong enough to read against BOTH white and the
   lavender canvas — the earlier pale steps were within 1.02 contrast of the page
   and disappeared entirely on the stat cards. */
.tinted         { background: #E4E4F8; border-color: #CFCFEF; }
.tinted-aqua    { background: #D9EFFB; border-color: #BBE2F5; }
.tinted-magenta { background: #FADCEE; border-color: #F2C6E1; }

/* full-colour feature panel */
.panel-grad { background: var(--grad); color: #fff; border-radius: 26px; position: relative; overflow: hidden; }
.panel-grad::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(46% 62% at 82% 12%, rgba(255,255,255,.20) 0%, transparent 70%),
    radial-gradient(40% 55% at 6% 92%, rgba(37,169,224,.32) 0%, transparent 72%);
}
.panel-grad > * { position: relative; z-index: 1; }
/* a light card sitting inside the gradient panel must not inherit its white text */
.panel-grad .bg-white,
.panel-grad .card { color: var(--ink); }
.panel-grad .btn-white { color: var(--indigo); }   /* keep the button's own colour */

.panel-deep { background: linear-gradient(160deg, #1E1E96 0%, #101050 62%, #0A0A33 100%); color: #fff; }

/* icon chip — the circular badge used across the Mankind site */
.chip {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--indigo); color: #fff;
}
.chip-sm { width: 36px; height: 36px; }
.chip-grad { background: var(--grad); }
.chip-soft    { background: #DEDEF6; color: var(--indigo); }
.chip-aqua    { background: #C5E6F7; color: #10688F; }
.chip-magenta { background: #F5CCE4; color: #9A1A72; }

/* ---------- pills / status ---------- */

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  padding: .3rem .7rem; border-radius: 999px; white-space: nowrap;
}
.pill-brand   { background: #EFEFFB; color: var(--indigo); }
.pill-accent  { background: #FCEEF7; color: #A3187A; }
.pill-aqua    { background: #DCF1FC; color: #106B95; }
.pill-neutral { background: #EEEFF5; color: #4B4E68; }
.pill-ok      { background: #E4F6EC; color: #146C43; }
.pill-warn    { background: #FEF3DC; color: #8A5A00; }
.pill-bad     { background: #FCECEC; color: #B3261E; }
.pill-live    { background: #9b126b; color: #fff; }
.pill-solid   { background: var(--indigo); color: #fff; }

.dot-live {
  width: 6px; height: 6px; border-radius: 999px; background: currentColor;
  animation: pulse 1.9s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.8); }
  70%  { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ---------- form controls ---------- */

.field {
  width: 100%; background: #fff; color: var(--ink);
  border: 1.5px solid #DFE2EF; border-radius: 12px;
  padding: .78rem .95rem; font-family: inherit; font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field::placeholder { color: #9FA3BC; }
.field:hover { border-color: #C8CCE2; }
.field:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(30,30,150,.1); }

select.field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%235C5F7A' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem;
}
.field-label { display: block; font-size: 13px; font-weight: 600; color: #3A3D57; margin-bottom: .4rem; }
.field-hint { font-size: 12.5px; color: var(--soft); margin-top: .4rem; }

/* option cards */
.opt {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: .95rem 1.1rem; background: #fff;
  border: 1.5px solid #E4E7F3; border-radius: 14px; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.opt:hover { border-color: #B9BCE0; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt .dot {
  flex: 0 0 auto; width: 19px; height: 19px; margin-top: 1px;
  border: 2px solid #C6C9DE; border-radius: 999px; display: grid; place-items: center;
  transition: border-color .15s ease, background-color .15s ease;
}
.opt .dot::after {
  content: ''; width: 9px; height: 9px; border-radius: 999px; background: #fff;
  transform: scale(0); transition: transform .16s cubic-bezier(.3,1.5,.5,1);
}
.opt.is-box .dot { border-radius: 6px; }
.opt.is-box .dot::after { border-radius: 2px; }
.opt input:checked ~ .dot { border-color: var(--indigo); background: var(--indigo); }
.opt input:checked ~ .dot::after { transform: scale(1); }
.opt:has(input:checked) { border-color: var(--indigo); background: #F7F7FE; box-shadow: 0 8px 20px -14px rgba(30,30,150,.6); }
.opt .opt-body { flex: 1; min-width: 0; }
.opt.is-correct { border-color: #1E9E62; background: #F1FBF5; }
.opt.is-wrong   { border-color: #D8544B; background: #FDF2F2; }

/* option cards on a dark surface — the in-session poll.
   The light-theme selected state (indigo fill on a white card) disappears against
   the dark panel, so the whole set is restated in aqua. */
.opt-dark {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}
.opt-dark:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.42); }
.opt-dark .opt-body { color: #fff; }
.opt-dark .dot { border-color: rgba(255,255,255,.5); background: transparent; }
.opt-dark input:checked ~ .dot { background: var(--aqua); border-color: var(--aqua); }
.opt-dark .dot::after { background: #0A0A33; }
.opt-dark:has(input:checked) {
  background: rgba(37,169,224,.18);
  border-color: var(--aqua);
  box-shadow: inset 0 0 0 1px rgba(37,169,224,.5);
}

/* 1–5 scale */
.scale { display: flex; gap: .5rem; }
.scale label {
  flex: 1; text-align: center; cursor: pointer; font-weight: 600;
  border: 1.5px solid #E4E7F3; background: #fff; border-radius: 12px; padding: .75rem 0;
  transition: all .15s ease;
}
.scale label:hover { border-color: #B9BCE0; }
.scale input { position: absolute; opacity: 0; }
.scale label:has(input:checked) { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* ---------- onboarding shell (rep and doctor) ----------
   One task per screen: a progress bar under the header, a back chevron and a
   two-tone title. The column below is a normal responsive card. */

.flow-bar { height: 3px; background: #EDEEF6; }
.flow-bar > span { display: block; height: 100%; background: var(--grad); transition: width .45s cubic-bezier(.2,.8,.3,1); }

/* the content column: full width on a phone, a readable measure on a desktop */
.flow-col { width: 100%; max-width: 46rem; margin-inline: auto; }

.iconbtn {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px; background: #EFEFFB; color: var(--indigo);
  transition: background-color .15s ease;
}
.iconbtn:hover { background: #DEDEF6; }

/* the action row that closes every onboarding screen */
.flow-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem;
  margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.flow-actions .btn { flex: 1 1 100%; }
@media (min-width: 640px) { .flow-actions .btn { flex: 0 0 auto; } }

.readonly { background: #F7F8FC; color: var(--soft); }

/* ---------- upload drop zone ---------- */

.drop {
  display: block; cursor: pointer; text-align: center;
  background: #F7F7FE; border: 2px dashed #C7C7EA; border-radius: 18px;
  padding: 1.6rem 1.25rem; transition: border-color .16s ease, background-color .16s ease;
}
.drop:hover { border-color: var(--indigo); background: #F1F1FC; }
.drop-lg { padding: 2.5rem 1.5rem; }

/* A document box is cut to the shape of the thing being photographed, so the
   frame itself tells you what to line up: a PAN card is ID-1 (85.6 × 54 mm),
   an Indian CTS-2010 cheque is 200 × 92 mm. */
.drop-doc {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 100%; padding: 1rem; margin-inline: auto;
  container-type: inline-size;          /* the prompt shrinks with the frame, not the page */
}
.ratio-pan    { aspect-ratio: 85.6 / 54;  max-width: 27rem; }
.ratio-cheque { aspect-ratio: 200 / 92;   max-width: 34rem; }
.drop-doc [data-drop-filled] { position: absolute; inset: 0; }
.drop-doc [data-drop-thumb]  { width: 100%; height: 100%; object-fit: cover; background: #fff; }

/* the empty state, sized so it never outgrows the frame it sits in */
.doc-prompt { display: grid; justify-items: center; gap: .6rem; }
.doc-prompt .chip { margin: 0; }
.doc-title { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.doc-hint  { font-size: 12.5px; color: var(--soft); line-height: 1.35; }

/* A cheque frame is only ~150px tall on a small phone; drop the icon and the
   secondary line rather than letting the stack spill out of the box. */
@container (max-width: 420px) {
  .doc-prompt { gap: .45rem; }
  .doc-prompt .chip { width: 30px; height: 30px; }
  .doc-title { font-size: 13.5px; }
  .doc-hint  { display: none; }
}
@container (max-width: 320px) {
  .doc-prompt .chip { display: none; }
  .doc-prompt .btn-sm { padding: .35rem .8rem; font-size: 12px; }
}
/* Fallback for browsers without container queries (Safari < 16): the frame is
   the column width there, so the viewport is a close enough proxy. */
@media (max-width: 480px) {
  .doc-prompt { gap: .45rem; }
  .doc-prompt .chip { width: 30px; height: 30px; }
  .doc-title { font-size: 13.5px; }
  .doc-hint  { display: none; }
}
.drop-doc .file-strip {
  position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: .6rem;
  padding: .6rem .8rem; text-align: left;
  background: linear-gradient(to top, rgba(10,10,51,.88), rgba(10,10,51,0));
  color: #fff;
}
@container (max-width: 360px) {
  .drop-doc .file-strip [data-drop-meta] { display: none; }   /* keep the name and Replace */
}

/* ---------- one-time password ---------- */

.otp { display: flex; gap: .5rem; }
.otp input {
  width: 100%; max-width: 58px; aspect-ratio: 1 / 1.15; text-align: center;
  font-family: inherit; font-size: 22px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
  background: #fff; border: 1.5px solid #DFE2EF; border-radius: 14px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.otp input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(30,30,150,.1); }
.otp input:not(:placeholder-shown) { border-color: var(--indigo); background: #F7F7FE; }
.otp.is-wrong input { border-color: #D8544B; background: #FDF2F2; }

/* The rail above a stepped form is the same component the attendee journey wears —
   app.js renders both from railSteps(), so there is nothing to style here. */

/* ---------- vertical timeline ---------- */

.trail { list-style: none; margin: 0; padding: 0; }
.trail > li { position: relative; padding: 0 0 1.5rem 2.1rem; }
.trail > li::before {
  content: ''; position: absolute; left: 6px; top: 20px; bottom: -2px; width: 2px; background: #E7E9F4;
}
.trail > li:last-child { padding-bottom: 0; }
.trail > li:last-child::before { display: none; }
.trail > li > .mark {
  position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 999px;
  background: #fff; border: 3px solid #D5D8EA;
}
.trail > li[data-state="done"] > .mark { border-color: var(--indigo); background: var(--indigo); }
.trail > li[data-state="done"]::before { background: var(--indigo); opacity: .35; }
.trail > li[data-state="next"] > .mark { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(37,169,224,.18); }

/* ---------- long legal text ---------- */

/* The clauses run at their natural length rather than inside a fixed-height
   scroller — a nested scrollbar hid two thirds of the agreement and left the
   column short of the signing rail beside it. */
.legal h3 { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: .4rem; }
.legal p  { font-size: 13.5px; line-height: 1.72; color: var(--soft); }
.legal > * + * { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }

/* ---------- e-signature ---------- */

/* draw with a finger or a mouse; the canvas is sized to its box in JS */
.sigpad {
  position: relative; background: #F7F8FC;
  border: 1.5px dashed #C7C7EA; border-radius: 16px; overflow: hidden;
  touch-action: none;
}
.sigpad canvas { display: block; width: 100%; height: 172px; cursor: crosshair; }
.sigpad .hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13.5px; color: #9FA3BC; pointer-events: none;
}
.sigpad.has-ink .hint { display: none; }

/* the typed alternative — one button per handwriting face */
.sig-style {
  display: block; width: 100%; text-align: center; cursor: pointer;
  background: #fff; border: 1.5px solid #E4E7F3; border-radius: 14px;
  padding: .7rem 1rem; font-size: 26px; line-height: 1.5; color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.sig-style:hover { border-color: #B9BCE0; }
.sig-style[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.sig { font-size: 30px; line-height: 1.5; color: var(--indigo-900); }

/* ---------- tables ---------- */

.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl thead th {
  text-align: left; padding: .7rem 1rem; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #6C6F8A; background: #F7F8FC; border-bottom: 1px solid var(--line);
}
.tbl tbody td { padding: .85rem 1rem; border-bottom: 1px solid #F0F1F7; vertical-align: middle; max-width: 340px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #FAFAFE; }
.tbl .right { text-align: right; }

/* A long title or hospital name must not stretch the row: cap cell text at two
   lines and ellipsis the rest. Cells that opt out — single-line values wearing
   .whitespace-nowrap or .truncate — keep their own behaviour. */
.clamp-2,
.tbl tbody td .block:not(.whitespace-nowrap):not(.truncate) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- avatars ---------- */

.avatar {
  flex: 0 0 auto; display: grid; place-items: center; border-radius: 999px;
  width: 38px; height: 38px; font-size: 12.5px; font-weight: 700; color: #fff;
  background: var(--indigo); letter-spacing: .01em;
}
.avatar-lg { width: 54px; height: 54px; font-size: 16px; }
.avatar-xl { width: 92px; height: 92px; font-size: 28px; }

/* ---------- meters & bars ---------- */

.meter { height: 8px; background: #E7E9F4; border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--indigo); transition: width .5s ease; }
.meter-ok > span   { background: #1E9E62; }
.meter-warn > span { background: #E0A106; }
.meter-grad > span { background: var(--grad); }

.bar-track { height: 10px; background: #EDEEF6; border-radius: 999px; overflow: hidden; }
.bar-track > span { display: block; height: 100%; border-radius: 999px; background: var(--indigo); }
.bar-track.mute > span { background: #C3C6DC; }

/* ---------- tabs ---------- */

.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: 4px; background: #EDEEF6; border-radius: 999px; }
.tabs button {
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--soft);
  padding: .5rem 1.05rem; border: 0; border-radius: 999px; background: transparent;
  cursor: pointer; white-space: nowrap; transition: all .16s ease;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--indigo); box-shadow: 0 2px 8px -2px rgba(20,20,43,.16); }

/* ---------- certificate ---------- */

.cert { background: #fff; border-radius: 22px; box-shadow: 0 3px 8px rgba(20,20,43,.05), 0 30px 60px -30px rgba(30,30,150,.4); overflow: hidden; }
.cert-band { background: var(--grad); }
.cert-inner { position: relative; }
.cert-inner::before {
  content: ''; position: absolute; inset: 10px; border-radius: 14px;
  border: 1.5px solid #E9EAF6; pointer-events: none;
}
.seal {
  width: 74px; height: 74px; border-radius: 999px; display: grid; place-items: center;
  background: var(--grad); color: #fff; text-align: center;
  box-shadow: 0 10px 22px -10px rgba(124,43,168,.7);
}

/* ---------- session room ---------- */

.stage { position: relative; overflow: hidden; background: linear-gradient(160deg, #26268F 0%, #131353 58%, #0A0A33 100%); }
.stage::before {
  content: ''; position: absolute; inset: 0; opacity: .85;
  background:
    radial-gradient(38% 48% at 84% 8%, rgba(196,40,142,.34) 0%, transparent 70%),
    radial-gradient(42% 52% at 8% 96%, rgba(37,169,224,.30) 0%, transparent 72%);
}
.stage > * { position: relative; z-index: 1; }

.ctrl {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff;
  cursor: pointer; transition: all .16s ease;
}
.ctrl:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.ctrl[aria-pressed="true"] { background: #9b126b; border-color: #9b126b; }
.ctrl-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: .45rem; }

.dark-field {
  width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: #fff; border-radius: 999px; padding: .6rem 1rem; font-family: inherit; font-size: 13.5px;
}
.dark-field::placeholder { color: rgba(255,255,255,.45); }
.dark-field:focus { outline: none; border-color: var(--aqua); }

.rail-tabs { display: flex; gap: .3rem; padding: 4px; background: rgba(255,255,255,.08); border-radius: 999px; }
.rail-tabs button {
  flex: 1; font-family: inherit; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.6);
  padding: .45rem .5rem; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  transition: all .16s ease;
}
.rail-tabs button[aria-selected="true"] { background: rgba(255,255,255,.16); color: #fff; }

.scroll-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-thin::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 999px; }

/* ---------- misc ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 14px);
  background: var(--indigo-900); color: #fff; font-size: 13.5px; font-weight: 500;
  padding: .78rem 1.25rem; border-radius: 999px; box-shadow: 0 20px 44px -18px rgba(16,16,80,.8);
  opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
  z-index: 90; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.protobar {
  position: fixed; left: 16px; bottom: 16px; z-index: 80;
  display: inline-flex; align-items: center; gap: .45rem;
  background: #fff; color: var(--indigo); font-size: 11.5px; font-weight: 600;
  padding: .45rem .85rem .45rem .7rem; border-radius: 999px;
  box-shadow: 0 6px 20px -8px rgba(20,20,43,.4); border: 1px solid var(--line);
}
.protobar:hover { background: #EFEFFB; }
.protobar span { color: var(--soft); font-weight: 500; }

[hidden] { display: none !important; }

.fade-in { animation: fadeIn .36s cubic-bezier(.2,.8,.3,1) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- print ---------- */

@media print {
  body { background: #fff; }
  .no-print, .protobar, .toast { display: none !important; }
  .print-sheet { box-shadow: none !important; margin: 0 !important; }
  @page { size: A4 landscape; margin: 8mm; }
}
