/* ===========================================================================
   UPSC AI Notes — design system
   Palette derived from the logo: deep navy, royal "AI" blue, circuit sky, gold.
   Two themes via [data-theme]; defaults to the OS preference, toggle overrides.
   =========================================================================== */

/* ----- Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

/* ----- Tokens: light (default) ----- */
:root {
  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --navy: #0B1B3F;
  --brand: #1E5FE0;     /* royal AI blue   */
  --brand-2: #3B9CFF;   /* circuit sky     */
  --gold: #D99A1C;      /* spark / accent  */

  --bg: #EEF2FA;
  --bg-2: #E4EAF6;
  --surface: #FFFFFF;
  --surface-2: #F6F8FD;
  --ink: #0B1B3F;
  --ink-soft: #36436A;
  --muted: #6B7A9C;
  --line: #DCE4F2;
  --line-strong: #C6D2E8;

  --shadow-sm: 0 1px 2px rgba(11,27,63,.06), 0 1px 3px rgba(11,27,63,.05);
  --shadow-md: 0 8px 24px rgba(11,27,63,.10);
  --shadow-lg: 0 24px 60px rgba(11,27,63,.16);
  --glow: 0 12px 36px rgba(30,95,224,.28);

  --grad-brand: linear-gradient(135deg, #1E5FE0 0%, #3B9CFF 100%);
  --grad-mesh: radial-gradient(1200px 600px at 78% -10%, rgba(59,156,255,.20), transparent 60%),
               radial-gradient(900px 500px at 10% 0%, rgba(30,95,224,.16), transparent 55%);
  --hero-leaf: #1E5FE0;
  --hero-leaf-2: #3B9CFF;
  --hero-book: #0B1B3F;

  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-pill: 999px;
  --maxw: 1180px;
  --nav-h: 68px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ----- Tokens: dark ----- */
[data-theme="dark"] {
  --bg: #070E20;
  --bg-2: #0A1530;
  --surface: #0F1E3D;
  --surface-2: #13264C;
  --ink: #EAF0FB;
  --ink-soft: #C5D2EC;
  --muted: #93A3C4;
  --line: #1E335E;
  --line-strong: #294879;
  --brand: #4D86F2;
  --brand-2: #6FB4FF;
  --gold: #F0BC4A;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px rgba(0,0,0,.5);
  --shadow-lg: 0 28px 70px rgba(0,0,0,.6);
  --glow: 0 14px 44px rgba(77,134,242,.4);

  --grad-mesh: radial-gradient(1200px 620px at 80% -12%, rgba(59,156,255,.22), transparent 58%),
               radial-gradient(900px 520px at 6% -4%, rgba(30,95,224,.20), transparent 55%);
  --hero-leaf: #4D86F2;
  --hero-leaf-2: #6FB4FF;
  --hero-book: #6FB4FF;
}

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.eyebrow {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--brand);
}
[data-theme="dark"] .eyebrow { color: var(--brand-2); }

/* ----- Navbar ----- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: #fff; padding: 3px; box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
}
.brand .mark img { width: 100%; height: 100%; object-fit: contain; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand .wordmark b { font-family: var(--f-display); font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.brand .wordmark b i { font-style: normal; color: var(--brand); }
[data-theme="dark"] .brand .wordmark b i { color: var(--brand-2); }
.brand .wordmark span {
  font-family: var(--f-mono); font-size: .56rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .sun { display: block; }
[data-theme="dark"] .icon-btn .moon { display: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-weight: 600; font-size: .92rem; padding: 11px 18px; border-radius: var(--r-pill);
  transition: transform .2s var(--ease), box-shadow .25s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 50px rgba(30,95,224,.42); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
.btn-ghost { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 9px 14px; font-size: .85rem; }
.btn svg { width: 16px; height: 16px; }
.icon-btn:active { transform: scale(.92); }
.chip:active { transform: scale(.95); }

/* ----- Hero ----- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero::before {
  content: ""; position: absolute; inset: 0; background: var(--grad-mesh); pointer-events: none;
}
.hero .wrap {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px;
  align-items: center; padding-block: clamp(48px, 8vw, 92px);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono);
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  padding: 7px 13px; border-radius: var(--r-pill); margin-bottom: 22px;
}
[data-theme="dark"] .hero-badge { color: var(--brand-2); }
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 26%, transparent); }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); font-weight: 700; }
.hero h1 .grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--ink-soft); margin-top: 18px; max-width: 38ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-jump-wrap { margin-top: 32px; }
.jump-label { display: block; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.hero-jump { display: flex; flex-wrap: wrap; gap: 10px; }
.jump-chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); cursor: pointer; font-family: var(--f-body); transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
.jump-chip:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.jump-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.jump-chip .jc-sub { font-weight: 600; font-size: .92rem; color: var(--ink); }
.jump-chip .jc-gs { font-family: var(--f-mono); font-size: .64rem; font-weight: 700; letter-spacing: .04em; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 3px 7px; border-radius: var(--r-pill); }
.jump-chip:hover .jc-gs { color: #fff; background: var(--brand); }
@media (prefers-reduced-motion: reduce) { .jump-chip:hover { transform: none; } }

/* Signature: animated circuit-tree growing from a book */
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art svg { width: 100%; max-width: 440px; height: auto; overflow: visible; }
.tree-line { fill: none; stroke: var(--hero-leaf); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 2.4s var(--ease) forwards; }
.tree-line.b2 { stroke: var(--hero-leaf-2); animation-delay: .35s; }
.tree-node { fill: var(--hero-leaf-2); opacity: 0; animation: pop .5s var(--ease) forwards; transform-box: fill-box; transform-origin: center; }
.tree-node.gold { fill: var(--gold); }
.book-shape { fill: var(--hero-book); opacity: 0; animation: fadeUp .8s var(--ease) .1s forwards; }
.book-page { fill: color-mix(in srgb, var(--hero-book) 12%, var(--surface)); opacity: 0; animation: fadeUp .8s var(--ease) .2s forwards; }
.spark { fill: var(--gold); opacity: 0; animation: pop .6s var(--ease) 1.9s forwards, twinkle 3s ease-in-out 2.6s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(0); } 70% { transform: scale(1.3); } 100% { opacity: 1; transform: scale(1); } }
@keyframes twinkle { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ----- Trust strip ----- */
.trust { border-block: 1px solid var(--line); background: var(--surface); }
.trust .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-block: 20px; }
.trust .item { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-soft); font-weight: 500; }
.trust .item svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
[data-theme="dark"] .trust .item svg { color: var(--brand-2); }

/* ----- Section scaffolding ----- */
.section { padding-block: clamp(54px, 8vw, 88px); }
.section-head { max-width: 640px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; margin-top: 10px; }
.section-head p { color: var(--ink-soft); margin-top: 12px; font-size: 1.04rem; }

/* ----- Filters ----- */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 28px; }
.chip {
  font-family: var(--f-mono); font-size: .76rem; font-weight: 700; letter-spacing: .04em;
  padding: 9px 15px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--muted); transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }

/* ----- Library grid ----- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card.bundle { grid-column: 1 / -1; flex-direction: row; align-items: stretch;
  background: linear-gradient(120deg, var(--navy), #11295e); border-color: transparent; }
[data-theme="dark"] .card.bundle { background: linear-gradient(120deg, #0c1c40, #16306a); }
.card-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease), filter .5s var(--ease), opacity .5s var(--ease); }
.card-thumb img.lazy { filter: blur(14px); opacity: .35; transform: scale(1.04); }
.card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb .preview-tag {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  color: #fff; background: rgba(11,27,63,.72); backdrop-filter: blur(6px);
  padding: 6px 11px; border-radius: var(--r-pill); opacity: 0; transform: translateY(6px);
  transition: all .25s var(--ease);
}
.card-thumb:hover .preview-tag, .card-thumb:focus-visible .preview-tag { opacity: 1; transform: translateY(0); }
.card-thumb .preview-tag svg { width: 13px; height: 13px; }
.badges { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; z-index: 2; }
.badge {
  font-family: var(--f-mono); font-size: .66rem;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy);
  background: var(--gold); padding: 5px 10px; border-radius: var(--r-pill); box-shadow: var(--shadow-sm);
}
.badge.owned { background: var(--brand); color: #fff; }

/* skeleton loaders */
.sk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.sk .sk-thumb { aspect-ratio: 16/10; }
.sk .sk-line { height: 12px; border-radius: 6px; margin: 14px 18px 0; }
.sk .sk-thumb, .sk .sk-line {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--line) 50%, var(--surface-2) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear;
}
.sk .sk-line.short { width: 45%; }
.sk .sk-line.tall { height: 30px; margin-top: 18px; width: 60%; }
.sk .pad { padding-bottom: 22px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-tags { display: flex; gap: 7px; margin-bottom: 11px; }
.tag {
  font-family: var(--f-mono); font-size: .64rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 6px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
}
[data-theme="dark"] .tag { color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 16%, transparent); }
.tag.gs { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.card-body h3 { font-size: 1.18rem; font-weight: 700; }
.card-body .sub { color: var(--muted); font-size: .9rem; margin-top: 3px; }
.card-body ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.card-body ul li { display: flex; gap: 9px; font-size: .88rem; color: var(--ink-soft); }
.card-body ul li svg { width: 15px; height: 15px; color: var(--brand); flex: none; margin-top: 4px; }
[data-theme="dark"] .card-body ul li svg { color: var(--brand-2); }
.card-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 13px; align-items: stretch; }
.price-line { display: flex; align-items: baseline; gap: 9px; }
.price { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.price .cur { font-size: 1rem; color: var(--muted); margin-right: 1px; }
.price-was { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.price-note { font-family: var(--f-mono); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card-foot .actions { display: flex; gap: 8px; }
.card-foot .actions .btn { flex: 1; }

/* Bundle card internals */
.bundle .b-media { flex: 1; position: relative; overflow: hidden; min-height: 240px; }
.bundle .b-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.bundle .b-media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(11,27,63,.5) 70%, var(--navy)); }
.bundle .b-body { flex: 1.05; padding: 34px; color: #EAF0FB; display: flex; flex-direction: column; justify-content: center; }
.bundle .b-body .eyebrow { color: var(--gold); }
.bundle .b-body h3 { color: #fff; font-size: clamp(1.5rem,3vw,2rem); margin: 8px 0 6px; }
.bundle .b-body p { color: #BCCBEA; }
.bundle .b-body ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 9px; }
.bundle .b-body ul li { display: flex; gap: 10px; font-size: .92rem; color: #D6E0F5; }
.bundle .b-body ul li svg { width: 16px; height: 16px; color: var(--gold); flex: none; margin-top: 3px; }
.bundle .b-foot { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.bundle .b-foot .price { color: #fff; font-size: 2rem; }
.bundle .b-foot .price-was { color: #9FB2D8; }

/* ----- How it works ----- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 22px; counter-reset: step; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 28px 22px; box-shadow: var(--shadow-sm);
}
.step .num {
  counter-increment: step; font-family: var(--f-mono); font-weight: 700; font-size: .8rem;
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; margin-bottom: 16px;
}
.step .num::before { content: "0" counter(step); }
.step h4 { font-size: 1.08rem; margin-bottom: 7px; }
.step p { color: var(--ink-soft); font-size: .92rem; }

/* ----- FAQ ----- */
.faq { display: grid; gap: 12px; max-width: 760px; }
.qa { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; transition: border-color .2s; }
.qa[open] { border-color: var(--line-strong); }
.qa summary {
  list-style: none; cursor: pointer; padding: 18px 20px; font-family: var(--f-display);
  font-weight: 600; font-size: 1.02rem; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ic { width: 22px; height: 22px; flex: none; transition: transform .3s var(--ease); color: var(--brand); }
[data-theme="dark"] .qa summary .ic { color: var(--brand-2); }
.qa[open] summary .ic { transform: rotate(45deg); }
.qa .ans { padding: 0 20px 20px; color: var(--ink-soft); font-size: .95rem; }

/* ----- Footer ----- */
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.foot .wrap { padding-block: 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.foot .brand { margin-bottom: 14px; }
.foot p.small { color: var(--muted); font-size: .88rem; max-width: 34ch; }
.foot h5 { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot a.link { display: block; color: var(--ink-soft); font-size: .92rem; padding: 5px 0; transition: color .2s; }
.foot a.link:hover { color: var(--brand); }
.foot-bottom { border-top: 1px solid var(--line); }
.foot-bottom .wrap { padding-block: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: var(--muted); }

/* ----- Modal / lightbox ----- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(7,14,32,.66); backdrop-filter: blur(8px);
}
.overlay.open { display: flex; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 920px; max-height: 92vh; overflow: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  animation: rise .3s var(--ease);
}
.modal.sm { max-width: 440px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal-head h3 { font-size: 1.35rem; }
.modal-head .sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.modal-close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; flex: none; transition: all .2s; }
.modal-close:hover { background: var(--surface-2); border-color: var(--line-strong); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 18px 24px 24px; }

/* lightbox gallery */
.shots { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 16/10; }
.shots img, .shots video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .45s var(--ease); }
.shots img.on, .shots video.on { opacity: 1; }
.shots .clip-badge { position: absolute; left: 12px; top: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: rgba(11,27,63,.72); backdrop-filter: blur(6px); padding: 5px 10px; border-radius: var(--r-pill); }
.shots .clip-badge svg { width: 12px; height: 12px; }
.shots .navbtn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  background: rgba(11,27,63,.7); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px);
}
.shots .navbtn.prev { left: 12px; } .shots .navbtn.next { right: 12px; }
.shots .navbtn svg { width: 18px; height: 18px; }
.shots .dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.shots .dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); transition: all .2s; }
.shots .dots span.on { background: #fff; width: 20px; border-radius: 4px; }
.preview-meta { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.preview-meta .price { margin-right: auto; }
.note-live {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 16px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: .84rem; color: var(--ink-soft);
}
.note-live svg { width: 16px; height: 16px; color: var(--gold); flex: none; margin-top: 2px; }

/* email field */
.field { margin-top: 14px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--ink); font-family: var(--f-body); font-size: .95rem;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* ----- Toast ----- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  z-index: 200; background: var(--navy); color: #fff; padding: 13px 20px; border-radius: var(--r-pill);
  font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: all .3s var(--ease); display: flex; align-items: center; gap: 9px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 17px; height: 17px; color: var(--gold); }

/* ----- Reveal on scroll ----- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ----- Responsive ----- */
/* The library grid and steps auto-fit columns to the viewport (phone → tablet
   → desktop) with no fixed counts. These breakpoints only handle the pieces
   that need a deliberate layout change at a given size. */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 22px; padding-block: clamp(26px, 6vw, 52px); }
  .hero-art { order: -1; max-width: 230px; margin-inline: auto; }
  .hero-badge { margin-bottom: 16px; }
  .card.bundle { flex-direction: column; }
  .bundle .b-media { min-height: 210px; }
  .bundle .b-body { padding: 28px; }
}
@media (max-width: 860px) {
  .trust .wrap { justify-content: center; gap: 14px 26px; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .foot .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero-jump { gap: 8px; }
  .nav .btn-ghost span { display: none; }
  .section-head { margin-bottom: 28px; }
}
@media (max-width: 460px) {
  .brand .wordmark span { display: none; }
  .brand .wordmark b { font-size: 1rem; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ----- Legal / reading pages ----- */
.legal { padding-block: clamp(40px, 6vw, 76px); }
.legal .wrap { max-width: 744px; }
.legal h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 700; letter-spacing: -.015em; }
.legal .updated { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 26px; }
.legal .updated + p { font-size: 1.08rem; color: var(--ink-soft); line-height: 1.72; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.legal h2 { font-size: 1.24rem; font-weight: 700; margin: 42px 0 14px; color: var(--ink); scroll-margin-top: calc(var(--nav-h) + 16px); }
.legal h2::after { content: ""; display: block; width: 34px; height: 3px; border-radius: 2px; background: var(--grad-brand); margin-top: 9px; }
.legal p { color: var(--ink-soft); margin-bottom: 13px; line-height: 1.72; }
.legal ul { color: var(--ink-soft); padding-left: 22px; margin: 0 0 16px; display: grid; gap: 9px; }
.legal li { line-height: 1.66; }
.legal li::marker { color: var(--brand); }
[data-theme="dark"] .legal li::marker { color: var(--brand-2); }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; transition: text-decoration-thickness .15s var(--ease); }
.legal a:hover { text-decoration-thickness: 2px; }
[data-theme="dark"] .legal a { color: var(--brand-2); }
.legal b { color: var(--ink); font-weight: 700; }

/* ----- Smoothness pass ----- */
/* gentle page-load fade */
body { opacity: 0; animation: pageIn .5s var(--ease) forwards; }
@keyframes pageIn { to { opacity: 1; } }
/* nav lifts on scroll */
.nav.scrolled { box-shadow: 0 6px 24px rgba(11,27,63,.08); }
[data-theme="dark"] .nav.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.5); }
/* themed scrollbar */
* { scrollbar-color: var(--line-strong) transparent; }
.modal::-webkit-scrollbar { width: 10px; }
.modal::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 3px solid var(--surface); }
/* smooth theme change cross-fade where supported */
@supports (view-transition-name: root) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
}
@media (prefers-reduced-motion: reduce) {
  body { opacity: 1; animation: none; }
}

/* ----- Skip link (keyboard / screen-reader) ----- */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 300;
  background: var(--grad-brand); color: #fff; font-weight: 600; font-size: .9rem;
  padding: 10px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-md);
  transition: top .2s var(--ease);
}
.skip-link:focus-visible { top: 14px; }

/* =====================================================================
   INTERACTION + ANIMATION LAYER  (circuit/AI motif, reduced-motion safe)
   ===================================================================== */

/* scroll progress line under the nav */
#scrollbar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 60;
  background: var(--grad-brand); box-shadow: 0 0 10px rgba(59,156,255,.7); transition: width .08s linear; }

/* hero background slowly drifts */
.hero::before { animation: meshDrift 22s ease-in-out infinite alternate; }
@keyframes meshDrift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-3%,2%,0) scale(1.06); } }

/* tree nodes keep a soft pulse after they pop in */
.tree-node { animation: pop .5s var(--ease) forwards, nodePulse 3.4s ease-in-out 2.6s infinite; }
@keyframes nodePulse { 0%,100% { filter: none; } 50% { filter: drop-shadow(0 0 5px var(--hero-leaf-2)); } }

/* data pulses travel up the branches (offset-path = bespoke, not a particle cliché) */
.pulse { opacity: 0; fill: var(--gold); filter: drop-shadow(0 0 5px var(--gold)); }
.pulse.p1 { offset-path: path("M180 300 L180 196"); animation: flow 2.4s linear 2.8s infinite; }
.pulse.p2 { offset-path: path("M180 230 L132 196 L132 150 L104 124"); animation: flow 2.9s linear 3.2s infinite; }
.pulse.p3 { offset-path: path("M180 230 L228 196 L228 150 L256 124"); animation: flow 2.9s linear 3.6s infinite; }
.pulse.p4 { offset-path: path("M180 196 L180 96"); animation: flow 2.6s linear 4s infinite; }
@keyframes flow { 0% { opacity: 0; offset-distance: 0%; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; offset-distance: 100%; } }

/* glossy pointer-follow sheen on cards */
.card { position: relative; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .35s var(--ease);
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%), color-mix(in srgb, var(--brand-2) 26%, transparent), transparent 62%); }
.card:hover::after { opacity: .9; }
.card.bundle::after { background: radial-gradient(320px circle at var(--mx,50%) var(--my,50%), rgba(240,188,74,.18), transparent 60%); }
.card.tilting { transition: transform .08s linear, box-shadow .3s var(--ease); }
.grid { perspective: 1400px; }

/* button ripple */
.btn { position: relative; overflow: hidden; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); pointer-events: none;
  background: rgba(255,255,255,.45); animation: ripple .6s var(--ease); }
.btn-ghost .ripple { background: color-mix(in srgb, var(--brand) 30%, transparent); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* trust items lift on hover */
.trust .item { transition: transform .2s var(--ease), color .2s; }
.trust .item:hover { transform: translateY(-2px); color: var(--brand); }
.trust .item:hover svg { transform: scale(1.12); transition: transform .2s var(--ease); }

/* theme toggle morphs */
#themeToggle svg { transition: transform .5s var(--ease); }
#themeToggle:hover svg { transform: rotate(25deg); }
#themeToggle:active svg { transform: rotate(180deg) scale(.9); }

/* hero CTA arrow nudges */
.hero-cta .btn-primary svg { transition: transform .25s var(--ease); }
.hero-cta .btn-primary:hover svg { transform: translateX(4px); }

/* smooth FAQ open/close */
.qa .ans { display: grid; grid-template-rows: 1fr; }
.qa:not([open]) .ans { display: none; }
.qa[open] .ans { animation: faqIn .35s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* chips get a smooth active transition already; add gentle scale-in on grid items handled via .reveal */

@media (prefers-reduced-motion: reduce) {
  .hero::before, .tree-node, .pulse { animation: none !important; }
  #scrollbar { display: none; }
  .card.tilting { transition: none; }
}
@media (hover: none) {
  .card::after { display: none; }   /* no pointer sheen on touch */
}

/* ----- Back to top ----- */
#toTop {
  position: fixed; right: 20px; bottom: 22px; z-index: 70;
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; box-shadow: var(--glow);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { transform: translateY(-2px); }
#toTop:active { transform: scale(.92); }
#toTop svg { width: 20px; height: 20px; }
@media (max-width: 600px) { #toTop { right: 14px; bottom: 16px; } }

/* nicer paragraph wrapping where supported */
.lead, .section-head p, .card-body .sub { text-wrap: pretty; }

/* ----- Safe-area insets (notched phones, landscape) ----- */
.wrap { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
#toTop { bottom: max(22px, env(safe-area-inset-bottom)); right: max(20px, env(safe-area-inset-right)); }
.toast { bottom: max(26px, calc(env(safe-area-inset-bottom) + 12px)); }
.overlay { padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
/* very small phones: tighten section rhythm a touch */
@media (max-width: 380px) {
  .wrap { padding-inline: max(16px, env(safe-area-inset-left)); }
  .card-body { padding: 16px 16px 18px; }
}
/* large desktops: cap the comfortable reading width, center nicely (already via --maxw) */
@media (min-width: 1500px) {
  :root { --maxw: 1240px; }
}

/* ----- Verification form bits ----- */
.phone-row { display: flex; align-items: stretch; gap: 8px; }
.phone-row .cc {
  display: grid; place-items: center; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-soft);
  font-family: var(--f-mono); font-weight: 700; font-size: .9rem;
}
.phone-row input { flex: 1; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .88rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.linklike { display: inline-block; margin-top: 14px; color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--brand); }
.linklike:disabled { color: var(--line-strong); text-decoration: none; cursor: default; }

/* ----- Quote of the day ----- */
.qotd-section { padding-top: 0; }
.qotd {
  position: relative; overflow: hidden;
  background: var(--grad-hero, linear-gradient(135deg, #0B1B3F, #16336e));
  border: 1px solid var(--border); border-radius: var(--r-lg, 22px);
  padding: 38px clamp(22px, 4vw, 56px); color: #fff;
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .qotd { background: linear-gradient(135deg, #0B1B3F, #122a59); }
.qotd .qotd-mark {
  position: absolute; top: -18px; left: 18px; font-family: var(--f-display);
  font-size: 9rem; line-height: 1; color: var(--brand-2); opacity: .18; pointer-events: none;
}
.qotd .eyebrow { color: var(--gold); position: relative; z-index: 1; }
.qotd blockquote {
  position: relative; z-index: 1; margin: 12px 0 0; border: 0; padding: 0;
  font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(1.3rem, 2.6vw, 2.05rem); line-height: 1.32; color: #fff; text-wrap: balance;
}
.qotd .qotd-by { position: relative; z-index: 1; margin-top: 14px; font-weight: 600; color: var(--brand-2); }
.qotd .qotd-rel {
  position: relative; z-index: 1; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  color: #C6D5F2; font-size: .95rem; line-height: 1.5;
}
.qotd .qotd-rel .tag { background: rgba(59,156,255,.16); color: var(--brand-2); border-color: transparent; flex: none; }
.qotd #qotdMore { margin-top: 20px; position: relative; z-index: 1; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.qotd #qotdMore:hover { background: rgba(255,255,255,.16); }
.qotd.flash blockquote { animation: qFlash .5s var(--ease); }
@keyframes qFlash { from { opacity: .2; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qotd.flash blockquote { animation: none; } }

/* ----- Current affairs ----- */
.section-sub { max-width: 60ch; color: var(--muted); margin: 10px 0 0; line-height: 1.55; }
.ca-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 22px 0 16px; }
.ca-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.sm { padding: 6px 12px; font-size: .8rem; }
.ca-updated { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.ca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ca-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: inherit; transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
.ca-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-md); }
.ca-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ca-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ca-when { font-family: var(--f-mono); font-size: .68rem; color: var(--muted); white-space: nowrap; }
.ca-title { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; line-height: 1.34; margin: 0; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ca-src { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: .82rem; color: var(--muted); }
.ca-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); flex: none; }
.ca-empty { color: var(--muted); padding: 8px 0; }
.ca-empty a { color: var(--brand); }
.ca-card.skeleton { min-height: 150px; border-color: transparent; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@media (prefers-reduced-motion: reduce) { .ca-card:hover { transform: none; } .ca-card.skeleton { animation: none; } }

/* ----- Question of the day + streak ----- */
.qd-card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: clamp(22px, 3.4vw, 38px); box-shadow: var(--shadow-sm); }
.qd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.streak { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--ink); font-size: .82rem; }
.streak .flame { width: 16px; height: 16px; fill: var(--gold); }
.streak b { font-family: var(--f-display); font-size: 1rem; }
.streak .streak-label { color: var(--muted); }
.qd-tagrow { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.qd-count { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qd-q { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.36; margin: 12px 0 20px; color: var(--ink); text-wrap: balance; }
.qd-options { display: grid; gap: 10px; }
.qd-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); color: var(--ink); font: inherit; font-size: .98rem; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease); }
.qd-opt:hover:not(:disabled) { border-color: var(--brand); transform: translateX(2px); }
.qd-opt:disabled { cursor: default; }
.qd-key { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-family: var(--f-mono); font-weight: 700; font-size: .82rem; }
.qd-opt.correct { border-color: #1a9d5a; background: color-mix(in srgb, #1a9d5a 12%, transparent); }
.qd-opt.correct .qd-key { background: #1a9d5a; color: #fff; }
.qd-opt.wrong { border-color: #d14343; background: color-mix(in srgb, #d14343 10%, transparent); }
.qd-opt.wrong .qd-key { background: #d14343; color: #fff; }
.qd-explain { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--brand); border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }
.qd-explain b { color: var(--ink); }
.qd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.countdown { font-size: .9rem; color: var(--muted); }
.countdown b { font-family: var(--f-display); font-size: 1.1rem; color: var(--brand); }
.countdown .approx { font-size: .78rem; opacity: .75; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .qd-opt:hover:not(:disabled) { transform: none; } }

/* ----- QOTD greeting, stats, actions ----- */
.qd-greeting { margin: 6px 0 0; color: var(--brand); font-weight: 600; font-size: .92rem; }
.qd-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qd-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.qd-stat { flex: 1 1 90px; min-width: 90px; background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; }
.qd-stat b { display: block; font-family: var(--f-display); font-size: 1.35rem; color: var(--ink); line-height: 1; }
.qd-stat span { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ----- CA exam angle ----- */
.ca-angle { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.ca-angle-k { flex: none; font-family: var(--f-mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 3px 7px; border-radius: var(--r-pill); margin-top: 1px; }

/* ----- Motivation / creed band ----- */
.creed { position: relative; overflow: hidden; text-align: center; border-radius: var(--r-lg); padding: clamp(34px, 5vw, 64px) clamp(20px, 4vw, 56px); background: var(--grad-brand, linear-gradient(135deg, #1E5FE0, #3B9CFF)); color: #fff; box-shadow: var(--shadow-md); }
.creed-line { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.28; letter-spacing: -.01em; margin: 0 auto; max-width: 22ch; text-wrap: balance; }
.creed-sub { margin: 16px auto 0; max-width: 60ch; color: rgba(255,255,255,.9); line-height: 1.6; font-size: 1rem; }
.creed .btn { margin-top: 26px; background: #fff; color: var(--brand); border-color: #fff; }
.creed .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
@media (prefers-reduced-motion: reduce) { .creed .btn:hover { transform: none; } }

/* ----- CA AI insight button ----- */
.ca-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.ca-ai { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); color: var(--brand); font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.ca-ai svg { width: 13px; height: 13px; }
.ca-ai:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.ca-ai.loading { opacity: .7; cursor: default; }
.ca-ai.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- polish layer ----- */
::selection { background: color-mix(in srgb, var(--brand) 26%, transparent); color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, .chip:focus-visible, .jump-chip:focus-visible, .qd-opt:focus-visible, .ca-card:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px;
}
.card { transition: transform .26s var(--ease), box-shadow .26s var(--ease), border-color .26s var(--ease); }
.card:hover { box-shadow: 0 22px 54px -26px color-mix(in srgb, var(--navy) 55%, transparent); }
.chip:active, .jump-chip:active, .btn:active { transform: translateY(0) scale(.98); }
/* premium scrollbar (desktop) */
@media (hover: hover) and (pointer: fine) {
  * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--brand) 40%, transparent) transparent; }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--brand) 36%, transparent); border-radius: 99px; border: 2px solid var(--bg); }
  *::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--brand) 55%, transparent); }
}
/* let the daily cluster breathe a touch more */
#qotd, #qotday, #affairs { scroll-margin-top: calc(var(--nav-h) + 18px); }

/* ===== animation pass ===== */
@keyframes correctPop {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, #1a9d5a 50%, transparent); transform: scale(1); }
  40%  { transform: scale(1.02); }
  100% { box-shadow: 0 0 0 7px transparent; transform: scale(1); }
}
@keyframes wrongShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-5px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}
@keyframes flamePulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.13); opacity: .82; } }
@keyframes badgePop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }

.qd-opt.correct { animation: correctPop .5s var(--ease); }
.qd-opt.wrong { animation: wrongShake .4s ease; }
.qd-explain:not([hidden]) { animation: fadeUp .4s var(--ease); }
.streak:not([hidden]) { animation: badgePop .5s var(--ease); }
.streak .flame { transform-origin: center bottom; animation: flamePulse 2.2s ease-in-out infinite; }
.qd-greeting { animation: fadeUp .55s var(--ease) both; }
.qd-stat { animation: rise .45s var(--ease) both; }
.qd-stat:nth-child(2) { animation-delay: .07s; }
.qd-stat:nth-child(3) { animation-delay: .14s; }

/* primary-button sheen on hover */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.22) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .65s var(--ease);
}
.btn-primary:hover::after { transform: translateX(130%); }

@media (prefers-reduced-motion: reduce) {
  .qd-opt.correct, .qd-opt.wrong, .qd-explain:not([hidden]), .streak:not([hidden]),
  .streak .flame, .qd-greeting, .qd-stat { animation: none; }
  .btn-primary::after { display: none; }
}
