/* Huquq Mock — design tokens: white + light green (#8bc540), soft and rounded; light + dark */
:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #f2f5f3;
  --surface-3: #e6ebe8;
  --text: #111a15;
  --text-2: #3b4741;
  --muted: #69766f;
  --border: #e4e9e6;
  --border-2: #d2dad5;
  --primary: #8bc540;
  --primary-2: #9dd158;
  --primary-soft: #edf6e0;
  --primary-ink: #1a2e05;
  --primary-t: #48750e;
  --chart-line: #6aa32a;
  --logo-ink: #ffffff;
  --gold: #b7791f;
  --gold-soft: #fdf4e3;
  --ok: #4d7c0f;
  --ok-soft: #eef7e2;
  --ok-line: #bfe08f;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --bad-line: #f4b4b4;
  --warn: #b45309;
  --warn-soft: #fdf3e1;
  --mark: #fff1b8;
  --fill-ok: #8bc540;
  --fill-mid: #f59e0b;
  --fill-low: #ef4444;
  --fill-ok-a: #cbe9a2;
  --fill-mid-a: #fde2a4;
  --fill-low-a: #fcc5c5;
  --mint: #e2f4e8;
  --butter: #fff3d3;
  --sparkle: #f4b740;
  --shadow-sm: 0 1px 2px rgba(17, 26, 21, .05);
  --shadow: 0 1px 2px rgba(17, 26, 21, .035), 0 10px 28px -18px rgba(17, 26, 21, .16);
  --shadow-hover: 0 2px 4px rgba(17, 26, 21, .04), 0 18px 36px -18px rgba(17, 26, 21, .24);
  --shadow-lg: 0 20px 50px -18px rgba(17, 26, 21, .25);
  --radius: 18px;
  --radius-sm: 10px;
  --side-w: 248px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Nunito', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0b100d;
  --surface: #111814;
  --surface-2: #17201b;
  --surface-3: #202b24;
  --text: #e6eee9;
  --text-2: #bfcbc4;
  --muted: #86948c;
  --border: #1f2924;
  --border-2: #2c3a32;
  --primary: #a3d65c;
  --primary-2: #b8e27e;
  --primary-soft: #1f2b12;
  --primary-ink: #1a2e05;
  --primary-t: #a3d65c;
  --chart-line: #a3d65c;
  --logo-ink: #1a2e05;
  --gold: #f2c14e;
  --gold-soft: #2c2412;
  --ok: #a3d65c;
  --ok-soft: #1c2a10;
  --ok-line: #456320;
  --bad: #f87171;
  --bad-soft: #3a1618;
  --bad-line: #7f2a2a;
  --warn: #fbbf24;
  --warn-soft: #33270f;
  --mark: #4a3f12;
  --fill-ok: #a3d65c;
  --fill-mid: #fbbf24;
  --fill-low: #f87171;
  --fill-ok-a: #4c7322;
  --fill-mid-a: #8a5a0c;
  --fill-low-a: #7f2a2a;
  --mint: #142219;
  --butter: #2a2414;
  --sparkle: #f2c14e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px -18px rgba(0, 0, 0, .6);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 36px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 20px 56px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: var(--primary-t); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1, h2, h3 { font-family: var(--display); }
.ap { font-family: var(--font); }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: 18.5px; font-weight: 800; letter-spacing: -.005em; }
h3 { font-size: 16px; font-weight: 800; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); }
.warn-t { color: var(--warn); }

/* ---------- navigation: sidebar on the left; icons only on tablets; a drawer behind ☰ on phones ---------- */
body.with-nav #root { padding-left: var(--side-w); }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: var(--side-w);
  display: flex; flex-direction: column;
  padding: 20px 14px 14px max(14px, env(safe-area-inset-left));
  background: var(--surface); border-right: 1px solid var(--border);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 16.5px; letter-spacing: -.015em; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--primary); color: var(--logo-ink); }
.brand .logo svg { width: 20px; height: 20px; }
.brand small { display: block; margin-top: 3px; font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 18px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav a, .nav-btn {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  color: var(--text-2); font-size: 14.5px; font-weight: 500; text-align: left; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a svg, .nav-btn svg { width: 20px; height: 20px; flex: none; color: var(--muted); transition: color .15s; }
.nav a:hover, .nav-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a:hover svg, .nav-btn:hover svg { color: var(--text-2); }
.nav a.on { background: var(--primary-soft); color: var(--primary-t); font-weight: 600; }
.nav a.on svg { color: var(--primary-t); }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.side-card { margin-top: auto; padding: 16px; border-radius: 16px; background: linear-gradient(150deg, var(--primary-soft), var(--mint)); }
.side-card .sc-ic { width: 34px; height: 34px; margin-bottom: 10px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); color: var(--primary-t); box-shadow: var(--shadow-sm); }
.side-card .sc-ic svg { width: 18px; height: 18px; }
.side-card b { display: block; font: 800 15px/1.3 var(--display); color: var(--text); }
.side-card .sc-t { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.side-card + .side-foot { margin-top: 12px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.icon-btn { width: 38px; height: 38px; flex: none; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 19px; height: 19px; }
.mbar, .scrim { display: none; }
/* Tablets: only the icons stay; a section's name shows on hover. */
@media (min-width: 721px) and (max-width: 1180px) {
  :root { --side-w: 76px; }
  .sidebar { padding: 18px 12px 12px; overflow: visible; }
  .brand { justify-content: center; padding: 0 0 20px; }
  .brand-t, .nav a span, .nav-btn span, .side-card { display: none; }
  .side-card + .side-foot { margin-top: auto; }
  .nav-label { height: 1px; margin: 10px 8px; padding: 0; font-size: 0; background: var(--border); }
  .nav a, .nav-btn { justify-content: center; padding: 11px 0; }
  .nav a.on::before { left: -12px; }
  .sidebar [data-tip]:hover::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; z-index: 5; transform: translateY(-50%);
    padding: 5px 9px; border-radius: 7px; background: var(--text); color: var(--surface);
    font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none;
  }
}
/* Phones: a slim top bar; ☰ slides the same sidebar in from the left. */
@media (max-width: 720px) {
  body.with-nav #root { padding-left: 0; }
  body.nav-open { overflow: hidden; }
  .sidebar {
    width: min(292px, 86vw); padding-top: max(18px, env(safe-area-inset-top));
    transform: translateX(-100%); visibility: hidden;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .26s;
  }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(10, 18, 13, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .mbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .mbar .brand { padding: 0; font-size: 15px; }
  .mbar .brand .logo { width: 30px; height: 30px; border-radius: 9px; }
  .mbar .brand .logo svg { width: 17px; height: 17px; }
  .mbar .brand small { display: none; }
  .mbar > .icon-btn:last-child { margin-left: auto; }
}

/* ---------- layout ---------- */
.view { max-width: 1180px; margin: 0 auto; padding: 34px 32px 80px; }
@media (max-width: 1180px) { .view { padding: 28px 24px 80px; } }
.view.wide { max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
@media (max-width: 980px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } .view { padding: 18px 14px 70px; } h1 { font-size: 22px; } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.flat { box-shadow: none; }
.card.tight { padding: 14px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.card-head .sub { color: var(--muted); font-size: 13px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
h1 > svg, h2 > svg, h3 > svg { width: 20px; height: 20px; vertical-align: -3px; margin-right: 6px; color: var(--primary); flex: none; }
.chip svg { width: 13px; height: 13px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; }

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: center;
  padding: 36px 40px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero::before { content: ''; position: absolute; z-index: -1; right: -140px; top: -170px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 20%, transparent), transparent 66%); }
.hero::after { content: ''; position: absolute; z-index: -1; left: -120px; bottom: -220px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--sparkle) 13%, transparent), transparent 68%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-t); font-size: 13px; font-weight: 600; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.hero h1 { margin-top: 16px; font-size: 36px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.hero p { margin-top: 12px; max-width: 620px; color: var(--muted); line-height: 1.65; }
.hero-badges { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 24px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.hero-badges span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero-ill { width: 100%; height: auto; display: block; overflow: visible; }
.hero-ill .ib { fill: var(--primary-soft); }
.hero-ill .im { fill: var(--mint); }
.hero-ill .ishadow { fill: color-mix(in srgb, var(--primary-t) 12%, transparent); }
.hero-ill .ipaper { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.hero-ill .iline { fill: var(--surface-3); }
.hero-ill .iline.strong { fill: color-mix(in srgb, var(--primary) 70%, var(--surface)); }
.hero-ill .ichk { fill: var(--primary); }
.hero-ill .itick { fill: none; stroke: var(--logo-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-ill .iopen { fill: none; stroke: var(--border-2); stroke-width: 2; stroke-dasharray: 3 3.2; }
.hero-ill .iring { fill: var(--surface); }
.hero-ill .ibadge { fill: var(--primary); }
.hero-ill .iscale { fill: none; stroke: var(--logo-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-ill .ipill { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.hero-ill .ispark { fill: none; stroke: var(--chart-line); stroke-width: 3; stroke-linecap: round; }
.hero-ill .isparkdot { fill: var(--chart-line); }
.hero-ill .istar { fill: var(--sparkle); }
.hero-ill .istar.s2 { fill: var(--primary); }
.hero-ill .idot { fill: var(--primary); opacity: .55; }
.hero-ill .float, .hero-ill .float2 { transform-box: fill-box; transform-origin: center; animation: ill-float 5s ease-in-out infinite; }
.hero-ill .float2 { animation-duration: 6.5s; animation-delay: -2s; }
@keyframes ill-float { 50% { transform: translateY(-7px); } }
@media (max-width: 1000px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-ill { display: none; } }
@media (max-width: 720px) { .hero { padding: 24px 20px; border-radius: 20px; } .hero h1 { font-size: 28px; } }

/* ---------- buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 14.5px;
  cursor: pointer; transition: background .15s, transform .05s, box-shadow .15s, border-color .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-2); box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--primary) 75%, transparent); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1d1503; }
.btn.danger { color: var(--bad); border-color: var(--bad-line); background: var(--surface); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 14px; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn svg { width: 17px; height: 17px; }
:where(.btn, .icon-btn, .nav a, .nav-btn, .brand, .ocard, .lawpick, .opt, .seg button, .navgrid button):focus-visible { outline: 2px solid var(--primary-t); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border-2);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input.sm { padding: 7px 10px; font-size: 14px; }
.help { font-size: 12.5px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--primary-t); box-shadow: var(--shadow-sm); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.chip.primary { background: var(--primary-soft); color: var(--primary-t); border-color: transparent; }
.chip.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.d-1 { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.d-2 { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.d-3 { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .25; }
.dots i.f { opacity: 1; }

/* ---------- stats ---------- */
.stat { position: relative; display: flex; flex-direction: column; gap: 4px; transition: transform .2s ease, box-shadow .2s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat .ic { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-t); }
.stat .ic svg { width: 20px; height: 20px; }
.stat .ic.mint { background: var(--mint); }
.stat .ic.gold { background: var(--butter); color: var(--gold); }
.stat .k { padding-right: 48px; font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .v { margin-top: 6px; font-family: var(--display); font-size: 34px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 17px; font-weight: 800; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }
.delta.same { color: var(--muted); background: var(--surface-2); }

.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--fill-ok-a), var(--fill-ok)); transform-origin: left center; animation: bar-grow 1s cubic-bezier(.2, .8, .2, 1) .1s both; transition: width .5s ease; }
.bar.ok > i { background: linear-gradient(90deg, var(--fill-ok-a), var(--fill-ok)); }
.bar.mid > i { background: linear-gradient(90deg, var(--fill-mid-a), var(--fill-mid)); }
.bar.low > i { background: linear-gradient(90deg, var(--fill-low-a), var(--fill-low)); }
@keyframes bar-grow { from { transform: scaleX(0); } }
.bar.gold > i { background: var(--gold); }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0; }
.mrow + .mrow { border-top: 1px dashed var(--border); }
.mrow .t { font-weight: 600; font-size: 14px; }
.mrow .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mrow .n small { color: var(--muted); font-weight: 600; font-size: 12px; margin-left: 6px; }
.mrow .bar { grid-column: 1 / -1; }

.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 6; stroke-linecap: round; }
.chart .grid-l.base { stroke-dasharray: none; stroke: var(--border-2); }
.chart .axis-t { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .reveal { transform-box: view-box; transform-origin: 0 0; animation: chart-reveal 1.4s cubic-bezier(.4, .15, .3, 1) both; }
.chart .glow { fill: none; stroke: var(--chart-line); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; opacity: .13; }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .avg { fill: none; stroke: var(--sparkle); stroke-width: 2.2; stroke-dasharray: .1 7; stroke-linecap: round; }
.chart .pt-g { cursor: pointer; }
.chart .pt-g .hit { fill: transparent; }
.chart .pt { fill: var(--surface); stroke-width: 2.6; transform-box: fill-box; transform-origin: center; transition: transform .15s ease; animation: chart-pop .45s cubic-bezier(.3, 1.6, .6, 1) both; animation-delay: calc(.15s + var(--f, 1) * 1.05s); }
.chart .pt.up { stroke: var(--chart-line); }
.chart .pt.down { stroke: var(--fill-low); }
.chart .pt.same { stroke: var(--muted); }
.chart .pt.last { fill: var(--chart-line); stroke: var(--surface); stroke-width: 3; }
.chart .pt-g:hover .pt { transform: scale(1.35); }
.chart .halo { fill: var(--chart-line); opacity: 0; transform-box: fill-box; transform-origin: center; animation: chart-halo 2.8s ease-out 1.7s infinite; }
.chart .bubble { animation: chart-fade .5s 1.35s both; }
.chart .bubble rect, .chart .bubble path { fill: var(--chart-line); }
.chart .bubble text { fill: var(--primary-ink); font: 800 12.5px var(--display); }
:root[data-theme='dark'] .chart .bubble text { fill: #10200a; }
@keyframes chart-reveal { from { transform: scaleX(0); } }
@keyframes chart-fade { from { opacity: 0; } }
@keyframes chart-pop { from { transform: scale(0); } }
@keyframes chart-halo { 0% { transform: scale(.5); opacity: .4; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.chart-tip { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 14px)); padding: 8px 11px; border-radius: 11px; background: var(--text); color: var(--surface); font-size: 12px; line-height: 1.35; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-lg); }
.chart-tip b { display: block; font: 900 15px var(--display); }
.chart-tip::after { content: ''; position: absolute; left: var(--ax, 50%); bottom: -5px; width: 10px; height: 10px; background: inherit; border-radius: 2px; transform: translateX(-50%) rotate(45deg); }
.legend { display: flex; gap: 8px 18px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--chart-line); }
.legend i.avg { background: radial-gradient(circle, var(--sparkle) 1.3px, transparent 1.6px) 0 50% / 6px 3px repeat-x; height: 4px; }
.legend i.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--chart-line); }
.legend i.dot.down { border-color: var(--fill-low); }
.chart-empty { position: relative; min-height: 200px; display: grid; place-items: center; }
.chart-empty .ghost { position: absolute; inset: 14px 0 0; width: 100%; height: calc(100% - 14px); }
.chart-empty .ghost path { fill: none; stroke: color-mix(in srgb, var(--primary) 45%, transparent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: .1 9; vector-effect: non-scaling-stroke; }
.chart-empty .ghost .ga { fill: color-mix(in srgb, var(--primary-soft) 70%, transparent); stroke: none; }
.chart-empty .msg { position: relative; max-width: 380px; padding: 0 16px; text-align: center; color: var(--muted); font-size: 14px; }
.chart-empty .msg .ico { width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--primary-t); box-shadow: var(--shadow); }
.chart-empty .msg .ico svg { width: 24px; height: 24px; }

.list { display: flex; flex-direction: column; }
.list.scroll { max-height: 490px; overflow-y: auto; scrollbar-width: thin; margin-right: -6px; padding-right: 6px; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--border); }
.li:first-child { border-top: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .title { font-weight: 600; font-size: 14.5px; }
a.plain { color: var(--text); }
a.plain:hover { color: var(--primary-t); text-decoration: none; }
.li .meta { font-size: 12.5px; color: var(--muted); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num-badge { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--bad-soft); color: var(--bad); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
.pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.pct.hi { color: var(--ok); } .pct.mid { color: var(--warn); } .pct.lo { color: var(--bad); }

.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty .ico { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-t); }
.empty .ico svg { width: 26px; height: 26px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: var(--primary-soft); color: var(--text); border: 1px solid transparent; font-size: 14px; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }
.notice.ok { background: var(--ok-soft); }
.notice svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.notice > .grow { flex: 1; min-width: 0; }
.notice.act { align-items: center; }
.notice.act > svg { align-self: flex-start; }

/* ---------- exam setup ---------- */
.opt-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .opt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ocard { text-align: left; border: 1.5px solid var(--border); background: var(--surface); border-radius: 14px; padding: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; display: flex; flex-direction: column; gap: 6px; }
.ocard:hover { border-color: var(--border-2); background: var(--surface-2); }
.ocard.on { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface); }
.ocard .h { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.ocard .d { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ocard .c { font-size: 12px; font-weight: 700; color: var(--text-2); }
.law-block { margin-top: 14px; }
.law-block .bh { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.law-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.lawpick { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1.5px solid var(--border); background: var(--surface); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; transition: border-color .15s, background .15s; }
.lawpick:hover { background: var(--surface-2); }
.lawpick.on { border-color: var(--primary); background: var(--primary-soft); }
.lawpick .box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border-2); flex: none; margin-top: 1px; display: grid; place-items: center; background: var(--surface); }
.lawpick.on .box { background: var(--primary); border-color: var(--primary); }
.lawpick.on .box::after { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--primary-ink); border-bottom: 2px solid var(--primary-ink); transform: rotate(-45deg) translate(1px, -1px); }
.lawpick .no { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lawpick.off { opacity: .5; cursor: not-allowed; }
.lawpick .cnt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.summary-bar { position: sticky; bottom: 14px; z-index: 5; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); flex-wrap: wrap; }

/* ---------- exam runner ---------- */
.exam-top { position: sticky; top: 0; z-index: 25; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.exam-top .in { max-width: 1320px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.exam-title { font-weight: 700; font-size: 14.5px; }
.exam-title small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.timer { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer svg { width: 18px; height: 18px; color: var(--muted); }
.timer.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.timer.crit { background: var(--bad-soft); color: var(--bad); border-color: transparent; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.prog { flex: 1; min-width: 120px; }
.prog .bar { height: 7px; }
.prog .t { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.save-ind { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-ind i { width: 7px; height: 7px; border-radius: 50%; background: var(--fill-ok); }
.save-ind.pending i { background: var(--warn); }
.save-ind.err { color: var(--bad); } .save-ind.err i { background: var(--bad); }

.exam-body { max-width: 1320px; margin: 0 auto; padding: 22px 20px 90px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .exam-body { grid-template-columns: minmax(0, 1fr); } .side { display: none; } .side.open { display: block; position: fixed; inset: auto 0 0 0; z-index: 40; max-height: 70vh; overflow: auto; border-radius: 20px 20px 0 0; } }
.qcard { padding: 26px 28px; }
/* Phones: one compact row (progress, timer, question list, finish); the title and the
   long labels go, the save state stays as its coloured dot. */
@media (max-width: 720px) {
  .qcard { padding: 18px 16px; }
  .exam-body { padding: 14px 12px 90px; }
  .exam-top .in { padding: 8px 12px; gap: 8px; }
  .exam-title, .prog .lbl, .save-ind > span { display: none; }
  .save-ind.err > span { display: inline; }
  .kbd-hint { display: none; }
  .qhead .law-chip { white-space: normal; max-width: 100%; border-radius: 12px; }
  .prog { min-width: 0; }
  .prog .t { font-size: 13px; color: var(--text-2); }
  .timer { font-size: 16px; padding: 6px 9px; gap: 6px; }
  .exam-top .btn { padding: 8px 11px; font-size: 14px; }
}
@media (max-width: 400px) { .timer svg { display: none; } }
.qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.qnum { font-weight: 800; font-size: 14px; color: var(--primary-t); background: var(--primary-soft); padding: 4px 11px; border-radius: 999px; }
.law-chip { display: inline-block; max-width: min(340px, 100%); }
.q-stem { font-size: 17.5px; font-weight: 600; line-height: 1.5; color: var(--text); white-space: pre-line; }
.q-lead { margin-top: 12px; padding: 12px 15px; border-radius: 12px; background: var(--surface-2); font-size: 16px; line-height: 1.6; white-space: pre-line; }
.q-lead.fill { font-family: var(--serif); font-size: 17px; }
.blank { display: inline-block; min-width: 72px; border-bottom: 2px dashed var(--primary); color: var(--primary-t); text-align: center; font-weight: 700; padding: 0 6px; }
.blank.filled { border-bottom-style: solid; background: var(--ok-soft); color: var(--ok); border-color: var(--ok); border-radius: 4px 4px 0 0; }
.q-items { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.q-items li { display: flex; gap: 10px; padding: 9px 12px; border-radius: 11px; background: var(--surface-2); font-size: 15.5px; line-height: 1.5; }
.q-items .lbl { font-weight: 800; color: var(--primary-t); min-width: 26px; }
.q-items li.t-true { background: var(--ok-soft); }
.q-items li.t-false { background: var(--bad-soft); }
.q-items .tv { margin-left: auto; font-size: 12px; font-weight: 800; white-space: nowrap; padding-left: 10px; align-self: center; }
.q-items li.t-true .tv { color: var(--ok); } .q-items li.t-false .tv { color: var(--bad); }
.match { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 720px) { .match { grid-template-columns: minmax(0, 1fr); } }
.match .q-items { margin: 0; }
.q-table { margin-top: 14px; }
.q-table table.t th { white-space: normal; }
.q-table table.t td { font-size: 15px; line-height: 1.45; }
.q-table table.t td.n { font-weight: 800; color: var(--primary-t); width: 44px; }
.q-table tr.t-true td { background: var(--ok-soft); } .q-table tr.t-false td { background: var(--bad-soft); }
.q-table tr.t-true td.tv { color: var(--ok); font-weight: 800; } .q-table tr.t-false td.tv { color: var(--bad); font-weight: 800; }
/* Phones: a two-column table does not fit, so every row becomes a small card of its own with the
   column names written above the values (no sideways scrolling inside a test question). */
@media (max-width: 560px) {
  .q-table.table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .q-table table.t, .q-table table.t tbody, .q-table table.t tr, .q-table table.t td { display: block; width: auto; }
  .q-table table.t thead { display: none; }
  .q-table table.t tr { position: relative; padding: 10px 12px 10px 42px; border-radius: 12px; background: var(--surface-2); }
  .q-table table.t tr + tr { margin-top: 6px; }
  .q-table table.t td { padding: 2px 0; border: 0; background: none; }
  .q-table table.t td + td[data-h] { margin-top: 6px; }
  .q-table table.t td.n { position: absolute; left: 14px; top: 10px; width: auto; }
  .q-table table.t td[data-h]::before { content: attr(data-h); display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 1px; }
  .q-table table.t td.tv { margin-top: 6px; }
  .q-table table.t tr.t-true { background: var(--ok-soft); } .q-table table.t tr.t-false { background: var(--bad-soft); }
}
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.opt { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 13px 15px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: 15.5px; line-height: 1.5; transition: border-color .12s, background .12s, box-shadow .12s; }
.opt:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.opt .L { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.opt .x { flex: 1; padding-top: 3px; }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.opt.sel .L { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.opt.static { cursor: default; }
.opt.right { border-color: var(--ok-line); background: var(--ok-soft); }
.opt.right .L { background: var(--fill-ok); color: var(--primary-ink); border-color: var(--fill-ok); }
.opt.wrong { border-color: var(--bad-line); background: var(--bad-soft); }
.opt.wrong .L { background: var(--bad); color: #fff; border-color: var(--bad); }
.opt .tag { flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; align-self: center; }
.opt.right .tag { color: var(--ok); background: var(--surface); }
.opt.wrong .tag { color: var(--bad); background: var(--surface); }
.qfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
/* "Javobni oʻchirish" sits under the options it clears; its place is kept while nothing is chosen,
   so choosing an answer never moves the buttons below it */
.opt-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.opt-tools .btn[disabled] { visibility: hidden; }
.opt-tools + .qfoot { margin-top: 10px; }
.kbd { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--muted); }
.flag-btn.on { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.side .card { padding: 16px; }
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.navgrid button { position: relative; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 13px; cursor: pointer; color: var(--text-2); font-variant-numeric: tabular-nums; }
.navgrid button:hover { border-color: var(--border-2); }
.navgrid button.ans { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.navgrid button.cur { box-shadow: 0 0 0 3px var(--primary-soft), 0 0 0 1.5px var(--primary); }
.navgrid button.flag::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--surface); }
.navgrid button.r-right { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.navgrid button.r-wrong { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.navgrid button.r-empty { background: var(--surface-2); color: var(--muted); border-style: dashed; }
.nav-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 12px; }
.nav-legend span { display: inline-flex; align-items: center; gap: 5px; }
.nav-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; border: 1px solid var(--border-2); }
.mobile-nav-btn { display: none; }
@media (max-width: 1000px) { .mobile-nav-btn { display: inline-flex; } }

/* ---------- results ---------- */
.result-hero { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 26px; align-items: center; }
@media (max-width: 720px) { .result-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }
.ring { position: relative; width: 190px; height: 190px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .bg { fill: none; stroke: var(--surface-3); stroke-width: 15; }
.ring .fg { fill: none; stroke-width: 15; stroke-linecap: round; animation: ring-fill 1.4s cubic-bezier(.3, .9, .3, 1) .15s both; }
.ring.ok { --ring-a: var(--fill-ok-a); --ring-b: var(--fill-ok); }
.ring.mid { --ring-a: var(--fill-mid-a); --ring-b: var(--fill-mid); }
.ring.low { --ring-a: var(--fill-low-a); --ring-b: var(--fill-low); }
@keyframes ring-fill { from { stroke-dashoffset: 100; } }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { display: block; font-family: var(--display); font-size: 40px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.ring .c span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } }
.kpi { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 650; }
.kpi .v { font-family: var(--display); font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.kpi.ok { background: var(--ok-soft); } .kpi.bad { background: var(--bad-soft); }
.kpi.ok .v { color: var(--ok); } .kpi.bad .v { color: var(--bad); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.review-q { margin-top: 14px; }
.review-q.is-wrong { border-left: 4px solid var(--bad); }
.review-q.is-right { border-left: 4px solid var(--ok); }
.review-q.is-empty { border-left: 4px solid var(--border-2); }
.explain { margin-top: 16px; padding: 14px 16px; border-radius: 13px; background: var(--surface-2); }
.explain h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.evidence { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; font-family: var(--serif); font-size: 15.5px; line-height: 1.55; }
.cite { margin-top: 10px; font-size: 13px; color: var(--text-2); font-weight: 600; }

/* ---------- laws ---------- */
.law-text { font-family: var(--serif); font-size: 17px; line-height: 1.7; }
.law-text .chapter { font-family: var(--font); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-t); margin: 30px 0 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.article { padding: 14px 16px; margin: 0 -16px; border-radius: 14px; scroll-margin-top: 24px; transition: background .6s; }
.article.flash { background: var(--gold-soft); }
.article h3 { font-family: var(--font); font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.article h3 .n { color: var(--primary-t); }
.article p { margin: 0 0 7px; }
mark, .hl { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.reader { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .reader { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding: 14px; }
.toc a { display: block; font-size: 13px; padding: 4px 8px; border-radius: 8px; color: var(--text-2); }
.toc a:hover { background: var(--surface-2); text-decoration: none; }
.toc .ch { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 8px 4px; }

/* ---------- admin ---------- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.log { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.mini-q { padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.mini-q + .mini-q { margin-top: 10px; }

/* ---------- login ---------- */
.login-wrap { position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-wrap::before { content: ''; position: absolute; z-index: -1; right: -240px; top: -280px; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 24%, transparent), transparent 66%); }
.login-wrap::after { content: ''; position: absolute; z-index: -1; left: -220px; bottom: -260px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--sparkle) 16%, transparent), transparent 68%); }
.login { width: min(420px, 100%); padding: 34px 30px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.login h1 { font-size: 30px; font-weight: 900; }
.login .logo { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px; background: var(--primary); color: var(--logo-ink); }
.login .logo svg { width: 32px; height: 32px; }

/* ---------- modal, toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(10, 18, 13, .45); backdrop-filter: blur(2px); animation: fade .15s ease; }
.modal .box { width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .18s ease; }
.modal .box h2 { margin-bottom: 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 15px; border-radius: 12px; background: var(--text); color: var(--surface); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 360px; animation: pop .2s ease; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--fill-ok); color: var(--primary-ink); }

.boot { min-height: 50vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s ease infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* Phones. Placed last so it wins over the base rules above. */
@media (max-width: 720px) {
  .view { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .summary-bar { bottom: calc(10px + env(safe-area-inset-bottom)); padding: 12px 14px; gap: 10px; font-size: 14px; }
  .summary-bar .btn { width: 100%; }
  .hero .row .btn { flex: 1 1 100%; }
  .toasts { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .article { scroll-margin-top: 72px; }
  .toast { max-width: none; }
  /* Review tags drop under the answer text instead of squeezing it into a narrow column. */
  .opt { flex-wrap: wrap; row-gap: 8px; }
  .opt .x { flex: 1 1 calc(100% - 44px); min-width: 0; }
  .opt .tag { margin-left: 44px; align-self: flex-start; }
  /* a notice's button drops under its text instead of squeezing it */
  .list.docs .li > .btn { display: none; }
  /* stat cards are narrow here: the icon sits above the label */
  .stat .ic { position: static; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 12px; }
  .stat .k { padding-right: 0; }
  .notice.act { flex-wrap: wrap; row-gap: 10px; }
  .notice.act > .grow { flex-basis: calc(100% - 31px); }
  .notice.act > .btn { margin-left: 31px; }
  /* page actions fill the row: the main one beside the first, the rest below */
  .page-head > .row { width: 100%; }
  .page-head > .row > .btn { flex: 1 1 auto; }
  .page-head > .row > .btn.primary { order: 1; }
  .page-head > .row > .btn:not(.primary):not(:first-child) { order: 2; }
  /* exam footer: Oldingi and Belgilash share a row, the main button fills the next one */
  .qfoot { gap: 8px; }
  .qfoot > .btn.primary { flex: 1 1 100%; padding-top: 13px; padding-bottom: 13px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .mbar, .scrim, .exam-top, .side, .qfoot, .filters, .btn { display: none !important; } body.with-nav #root { padding-left: 0; } body { background: #fff; } .card { box-shadow: none; } }

/* question source line (practice), mock/practice cards, gap fillers */
.q-source { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.q-source svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.opt-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .opt-cards.two { grid-template-columns: minmax(0, 1fr); } }
.q-items.fillers li { background: transparent; border: 1px dashed var(--border-2); }
.q-items.fillers li.t-true { background: var(--ok-soft); border: 1px solid transparent; }

/* law reader: parts, articles questions never come from, preamble */
.law-text .section-h { font-family: var(--font); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 34px 0 2px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); }
.law-text .section-h:first-child { margin-top: 0; }
.law-text .section-h + .chapter { border-top: 0; margin-top: 14px; padding-top: 0; }
.toc .sec { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin: 16px 8px 2px; }
.toc a.out { opacity: .55; }
.article.out { opacity: .62; }
.article.out:hover, .article.out.flash { opacity: 1; }
.article h3 .chip { font-size: 11px; font-weight: 700; vertical-align: 2px; margin-left: 6px; }
.article.preamble { border-left: 3px solid var(--border-2); border-radius: 0 14px 14px 0; margin-bottom: 8px; }

/* admin: review queue */
.rv-tabs { align-items: center; gap: 10px; }
.rv-law-pick { width: 320px; max-width: 100%; margin-left: auto; }
@media (max-width: 720px) { .rv-law-pick { margin-left: 0; width: 100%; } }
.rv-wait { display: grid; place-items: center; min-height: 140px; }
.rv-item { padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.rv-item + .rv-item { margin-top: 12px; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .rv-grid { grid-template-columns: minmax(0, 1fr); } }
.rv-q .opts { margin-top: 12px; }
.rv-law { max-height: 560px; overflow: auto; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-family: var(--serif); font-size: 15px; line-height: 1.6; }
.rv-art + .rv-art { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rv-art-h { font-family: var(--font); font-weight: 700; font-size: 14px; color: var(--primary-t); margin-bottom: 4px; }
.rv-text { white-space: pre-line; }
.rv-law mark { background: var(--gold-soft); color: inherit; border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px 0 var(--gold); }
details > summary { cursor: pointer; color: var(--muted); margin-top: 4px; }
.rv-item .chip { white-space: normal; max-width: 100%; }
.mb12 { margin-bottom: 12px; }
.mb16 { margin-bottom: 16px; }
.t td.types { min-width: 260px; }

/* ---------- garden: flowers, gifts, the honesty note ---------- */
.fl-daisy, .fl-rose { display: inline-block; flex: none; overflow: visible; vertical-align: middle; }
.fl-daisy ellipse { fill: #ffffff; stroke: #e7dcbc; stroke-width: .8; }
.fl-daisy .c { fill: #f7c948; }
.fl-daisy .d { fill: #fde68a; }
.fl-daisy.pink ellipse { fill: #fbcfe8; stroke: #f472b6; }
.fl-daisy.pink .c { fill: #f59e0b; }
.fl-rose .st { fill: none; stroke: #4d7c0f; stroke-width: 2.2; stroke-linecap: round; }
.fl-rose .lf { fill: #6aa32a; }
.fl-rose .p1 { fill: #f43f5e; }
.fl-rose .p2 { fill: #be123c; }
.fl-rose .sp { fill: none; stroke: #9f1239; stroke-width: 1.7; stroke-linecap: round; }
:root[data-theme='dark'] .fl-daisy ellipse { stroke: #cbbf9b; }

/* sidebar: her flowers */
.side-card.garden { display: block; color: var(--text); background: linear-gradient(150deg, #fff0f3, var(--primary-soft) 58%, var(--mint)); transition: transform .2s ease, box-shadow .2s ease; }
:root[data-theme='dark'] .side-card.garden { background: linear-gradient(150deg, #2a1a20, var(--primary-soft) 58%, var(--mint)); }
.side-card.garden:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); text-decoration: none; }
.sg-row { display: flex; gap: 16px; }
.sg-f { display: inline-flex; align-items: center; gap: 7px; }
.sg-f b { font: 900 21px/1 var(--display); }
.side-card.garden .sc-t { margin-top: 10px; }
.side-card.garden .bar { display: block; margin-top: 8px; height: 6px; background: color-mix(in srgb, var(--surface) 75%, transparent); }

/* the honesty note before a test */
.pledge { text-align: left; }
.pl-art { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 0 0 14px; }

/* results: the flowers of this test */
.reward { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; background: linear-gradient(120deg, #fff4f6, var(--surface) 46%, var(--primary-soft)); }
:root[data-theme='dark'] .reward { background: linear-gradient(120deg, #26161c, var(--surface) 46%, var(--primary-soft)); }
.reward h3 { font-size: 19px; }
.rw-flowers { display: flex; flex-wrap: wrap; align-items: flex-end; max-width: 236px; gap: 1px; }
.rw-flowers > span { display: inline-flex; transform-origin: 50% 80%; animation: chart-pop .45s cubic-bezier(.3, 1.6, .6, 1) both; animation-delay: calc(.25s + var(--i) * 55ms); }
@media (max-width: 720px) { .reward { grid-template-columns: minmax(0, 1fr); } .reward .btn { justify-self: start; } }

/* garden page */
.garden-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 430px); gap: 20px; align-items: center; padding: 28px 32px; border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); background: linear-gradient(135deg, #fff5f7 0%, var(--surface) 46%, var(--primary-soft) 100%); }
:root[data-theme='dark'] .garden-hero { background: linear-gradient(135deg, #26161c 0%, var(--surface) 46%, var(--primary-soft) 100%); }
.gh-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.gh-stat { display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 12px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.gh-stat b { display: block; font: 900 34px/1 var(--display); }
.gh-stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.gh-next { margin-top: 18px; max-width: 540px; }
.gh-ready { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, #fff1f3 70%, var(--surface)); color: var(--text); }
:root[data-theme='dark'] .gh-ready { background: #26161c; }
.gh-ready svg { width: 20px; height: 20px; color: #e11d48; flex: none; }
.vase { display: flex; flex-wrap: wrap; gap: 0 2px; padding: 12px 10px 6px; border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, #fff1f3 80%, var(--surface)), transparent); }
:root[data-theme='dark'] .vase { background: linear-gradient(180deg, #26161c, transparent); }
.vase .vr { display: inline-flex; transform-origin: 50% 90%; animation: chart-pop .4s cubic-bezier(.3, 1.6, .6, 1) both; animation-delay: calc(var(--i) * 40ms); }
.meadow { position: relative; align-self: stretch; min-height: 180px; }
.meadow::before { content: ''; position: absolute; left: -12%; right: -12%; bottom: -46%; height: 86%; border-radius: 50%; background: radial-gradient(ellipse at 50% 32%, color-mix(in srgb, var(--primary) 34%, transparent), transparent 70%); }
.meadow > span { position: absolute; display: inline-flex; transform: translate(-50%, -50%); transform-origin: 50% 100%; animation: sway 4.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.7s); }
@keyframes sway { 0%, 100% { transform: translate(-50%, -50%) rotate(-3deg); } 50% { transform: translate(-50%, -50%) rotate(3deg); } }
@media (max-width: 900px) { .garden-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; } .meadow { min-height: 140px; } }
@media (max-width: 560px) {
  .gh-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gh-stat { padding: 10px 12px 10px 8px; gap: 8px; }
  .gh-stat .fl-daisy, .gh-stat .fl-rose { width: 38px; height: 38px; }
  .gh-stat b { font-size: 28px; }
}

.gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.gift { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); text-align: center; transition: transform .2s ease, box-shadow .2s ease; }
.gift:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.gift .g-art { position: relative; width: 100px; height: 100px; }
.gift .gbox { width: 100px; height: 100px; }
.gift.locked .g-art { filter: grayscale(.4); opacity: .75; }
.gift.ready { border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); box-shadow: 0 0 0 4px var(--primary-soft); }
.gift.ready .gbox { transform-origin: 50% 90%; animation: gift-wiggle 2.8s ease-in-out infinite; }
@keyframes gift-wiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-5deg); } 82% { transform: rotate(5deg); } 88% { transform: rotate(-3deg); } 94% { transform: rotate(2deg); } }
.gift.opened { background: linear-gradient(180deg, #fff7f9, var(--surface)); }
:root[data-theme='dark'] .gift.opened { background: linear-gradient(180deg, #24161b, var(--surface)); }
.gift.opened .gbox .lid { transform: translate(-6px, -18px) rotate(-16deg); }
.gift .g-peek { position: absolute; left: 50%; top: 22%; display: flex; align-items: flex-end; transform: translateX(-50%); }
.g-name { font: 800 14.5px/1.3 var(--display); }
.g-cost { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 14px; }
.g-phrase { font-family: 'Dancing Script', var(--display); font-weight: 700; font-size: 21px; line-height: 1.2; color: #db2777; }
:root[data-theme='dark'] .g-phrase { color: #f9a8d4; }

.bouquet { display: flex; flex-direction: column; gap: 10px; }
.rose-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 16px; background: color-mix(in srgb, #fff1f3 75%, var(--surface)); }
:root[data-theme='dark'] .rose-item { background: #26161c; }
.rose-item b { display: block; font-size: 14px; }
.rose-item span { font-size: 12px; color: var(--muted); }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rules li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; }
.rules li > svg:not(.fl-daisy):not(.fl-rose) { width: 22px; height: 22px; padding: 1px; flex: none; color: #e11d48; }

/* gift boxes */
.gbox { --gb: #fecdd3; --gl: #fda4af; --gr: #e11d48; display: block; overflow: visible; }
.gbox[data-theme='daisy'] { --gb: #fff7d6; --gl: #fde68a; --gr: #f59e0b; }
.gbox[data-theme='lime'] { --gb: #e3f3cc; --gl: #bfe38a; --gr: #4d7c0f; }
.gbox[data-theme='peach'] { --gb: #ffe4cc; --gl: #fdba74; --gr: #ea580c; }
.gbox[data-theme='lilac'] { --gb: #efe3ff; --gl: #d8b4fe; --gr: #9333ea; }
.gbox[data-theme='mint'] { --gb: #d1fae5; --gl: #86efac; --gr: #15803d; }
.gbox[data-theme='gold'] { --gb: #fef3c7; --gl: #fcd34d; --gr: #b45309; }
.gbox[data-theme='night'] { --gb: #e0e7ff; --gl: #a5b4fc; --gr: #4338ca; }
.gbox .sh { fill: rgba(17, 26, 21, .1); }
.gbox .body { fill: var(--gb); }
.gbox .top { fill: var(--gl); }
.gbox .rib, .gbox .bow { fill: var(--gr); }
.gbox .knot { fill: var(--gr); stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; }
.gbox .shine { fill: rgba(255, 255, 255, .5); }
.gbox .lid { transform-box: view-box; transform-origin: 60px 58px; transition: transform .3s ease; }

/* opening a gift */
.gift-show { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(12, 20, 14, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s ease; }
.gift-show.out { opacity: 0; transition: opacity .2s ease; }
.gs-stage { position: relative; width: min(640px, 100%); min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 238px 24px 30px; border-radius: 30px; text-align: center; overflow: hidden; background: radial-gradient(circle at 50% 36%, #ffffff 0, #fff3f6 46%, #eef8e2 100%); box-shadow: var(--shadow-lg); animation: pop .3s ease; }
:root[data-theme='dark'] .gs-stage { background: radial-gradient(circle at 50% 36%, #1f2a21 0, #22161b 50%, #111a12 100%); }
.gs-glow { position: absolute; left: 50%; top: 140px; width: 440px; height: 440px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(244, 63, 94, .22), rgba(139, 197, 64, .12) 46%, transparent 68%); animation: gs-glow 1.4s .7s ease-out both; }
@keyframes gs-glow { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } }
.gs-box { position: absolute; left: 50%; top: 122px; width: 160px; transform: translate(-50%, -50%); animation: gs-shake .7s ease-in-out both, gs-away .45s .95s ease-in forwards; }
.gs-box .gbox { width: 160px; height: 160px; }
.gs-box .lid { animation: gs-lid .5s .68s cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes gs-shake { 0%, 100% { transform: translate(-50%, -50%) rotate(0); } 20% { transform: translate(-50%, -50%) rotate(-7deg); } 40% { transform: translate(-50%, -50%) rotate(7deg); } 60% { transform: translate(-50%, -50%) rotate(-5deg); } 80% { transform: translate(-50%, -50%) rotate(4deg); } }
@keyframes gs-lid { to { transform: translate(-30px, -90px) rotate(-28deg); opacity: 0; } }
@keyframes gs-away { to { transform: translate(-50%, -50%) scale(.5); opacity: 0; } }
.gs-burst { position: absolute; left: 50%; top: 122px; width: 0; height: 0; }
.gs-bouquet { position: absolute; left: 50%; top: 52px; display: flex; align-items: flex-end; transform: translateX(-50%); }
.gs-bouquet > svg { margin: 0 -12px; transform-origin: 50% 100%; animation: gs-bud .7s cubic-bezier(.3, 1.5, .5, 1) both; }
.gs-bouquet > svg:nth-child(1) { animation-delay: 1.18s; transform: rotate(-20deg); }
.gs-bouquet > svg:nth-child(2) { animation-delay: 1.06s; transform: rotate(-9deg); }
.gs-bouquet > svg:nth-child(3) { animation-delay: .98s; position: relative; z-index: 1; }
.gs-bouquet > svg:nth-child(4) { animation-delay: 1.06s; transform: rotate(9deg); }
.gs-bouquet > svg:nth-child(5) { animation-delay: 1.18s; transform: rotate(20deg); }
@keyframes gs-bud { from { transform: translateY(60px) scale(0); opacity: 0; } }
.petal { position: absolute; left: 0; top: 0; width: 13px; height: 18px; border-radius: 70% 30% 70% 30%; opacity: 0; animation: gs-petal var(--t) calc(.8s + var(--dl)) cubic-bezier(.15, .7, .3, 1) forwards; }
.petal.p-rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.petal.p-daisy { background: #ffffff; box-shadow: inset 0 0 0 1px #efe4c4; }
.petal.p-leaf { width: 10px; height: 16px; background: linear-gradient(135deg, #bfe38a, #6aa32a); }
@keyframes gs-petal { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.3) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 90px)) scale(1) rotate(var(--r)); } }
.gs-blooms .bloom { position: absolute; display: inline-flex; transform: translate(-50%, -50%) scale(0); animation: gs-bloom .6s calc(1.1s + var(--i) * .09s) cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes gs-bloom { to { transform: translate(-50%, -50%) scale(1) rotate(-6deg); } }
.gs-words { position: relative; z-index: 2; max-width: 540px; margin-bottom: 4px; animation: gs-rise .75s 1.1s cubic-bezier(.2, .9, .3, 1) both; font-family: 'Dancing Script', var(--display); font-weight: 700; font-size: clamp(38px, 7vw, 60px); line-height: 1.12; }
.gs-words .w { display: inline-block; white-space: nowrap; }
.gs-words .ch { display: inline-block; opacity: 0; transform: translateY(20px) scale(.5); animation: gs-in .5s calc(1.2s + var(--i) * .045s) cubic-bezier(.3, 1.5, .5, 1) forwards; text-shadow: 0 2px 14px rgba(255, 255, 255, .7); }
:root[data-theme='dark'] .gs-words .ch { text-shadow: none; }
.gs-words .ch.fo .fl-daisy { width: .7em; height: .7em; margin: 0 .02em; vertical-align: -.06em; }
.gs-sub { position: relative; z-index: 2; margin-top: 8px; color: var(--muted); font-size: 14px; opacity: 0; animation: gs-in .5s 2.2s forwards; }
.gs-close { position: relative; z-index: 2; margin-top: 16px; opacity: 0; transform: translateY(8px); animation: gs-in .5s 2.4s forwards; }
@keyframes gs-in { to { opacity: 1; transform: none; } }
@keyframes gs-rise { from { transform: translateY(-120px) scale(.35); } }
@media (prefers-reduced-motion: reduce) {
  .gs-box, .gs-burst { display: none; }
  .gs-words .ch, .gs-sub, .gs-close { opacity: 1 !important; transform: none !important; }
  .gs-blooms .bloom { transform: translate(-50%, -50%) !important; }
}

/* login: full width, so the soft glows sit in the screen corners on wide screens too */
#view.view-full .login-wrap { width: 100%; }
:root[data-theme='dark'] .login-wrap::after, :root[data-theme='dark'] .hero::after { background: radial-gradient(circle, color-mix(in srgb, var(--primary) 9%, transparent), transparent 68%); }

/* phones: two gifts in a row (after the base gift rules, so it wins) */
@media (max-width: 560px) {
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gift { padding: 12px 8px; }
  .gift .g-art, .gift .gbox { width: 82px; height: 82px; }
  .g-phrase { font-size: 18px; }
}
