/* Gita-level+ visual system for Learn Loop */
:root {
  --bg: #0c0f18;
  --bg2: #12182a;
  --card: #161d32;
  --line: #2a3555;
  --text: #eef2ff;
  --muted: #9aa8c7;
  --gold: #d4a84b;
  --gold-soft: rgba(212, 168, 75, 0.14);
  --warm: #f3e6c8;
  --mint: #3dd6c6;
  --mint-soft: rgba(61, 214, 198, 0.12);
  --violet: #8b7cf6;
  --ok: #3dd68c;
  --danger: #f07178;
  --serif: "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "SF Pro Text", Segoe UI, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--serif);
  background:
    radial-gradient(ellipse 80% 42% at 50% -8%, #1a2844, transparent 55%),
    radial-gradient(ellipse 50% 30% at 100% 0%, rgba(61, 214, 198, 0.06), transparent 50%),
    var(--bg);
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }

.chrome {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px 72px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  font-family: var(--sans);
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(12, 15, 24, 0.92);
  backdrop-filter: blur(12px);
}
.brand { font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none !important; }
.brand em { font-style: normal; color: var(--gold); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  border: 1px solid transparent;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav a.on {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,.05);
}
.badge {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212, 168, 75, 0.35);
  background: var(--gold-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
}

.label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 700;
}
h1 {
  font-weight: 500;
  font-size: clamp(1.55rem, 3.8vw, 2.15rem);
  color: var(--warm);
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.sub {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 40em;
  margin: 0 0 18px;
}

.card {
  background: linear-gradient(165deg, var(--card), var(--bg2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.hero-art {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 14px;
  max-height: 200px;
  object-fit: cover;
  background: #0a0e18;
}

.row-between {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
select.state {
  font-family: var(--sans);
  background: rgba(0,0,0,.35);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  min-width: 210px;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cover {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #0a0e18;
  text-decoration: none !important;
  color: inherit;
  display: block;
  transition: border-color .15s, transform .15s;
}
.cover:hover {
  border-color: rgba(212, 168, 75, 0.5);
  transform: translateY(-2px);
}
.cover .art {
  height: 96px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(61,214,198,.18), transparent 50%),
    linear-gradient(160deg, #1a2438, #0d121c);
  border-bottom: 1px solid var(--line);
  font-size: 28px;
}
.cover .cap {
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 12.5px;
}
.cover .cap b {
  display: block;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cover .cap span { color: var(--muted); line-height: 1.35; display: block; }
.cover.done .art { box-shadow: inset 0 0 0 1px rgba(61, 214, 140, 0.35); }
.cover.done .cap b { color: var(--ok); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--sans); margin-top: 12px; }
.btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { border-color: var(--muted); }
.btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1408;
  font-weight: 700;
}
.btn.mint {
  background: var(--mint);
  border-color: var(--mint);
  color: #042a24;
  font-weight: 700;
}
.btn:disabled { opacity: 0.4; cursor: default; }

.honest {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  margin-top: 16px;
}
.chip {
  font-family: var(--sans);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  font-weight: 600;
}
.chip.gold { border-color: rgba(212,168,75,.4); color: var(--gold); background: var(--gold-soft); }
.chip.mint { border-color: rgba(61,214,198,.4); color: var(--mint); background: var(--mint-soft); }

/* Chapter reader */
.chapter-body h2 {
  font-size: 1.15rem;
  color: var(--warm);
  font-weight: 500;
  margin: 18px 0 8px;
}
.chapter-body h2:first-child { margin-top: 0; }
.chapter-body p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 12px;
}
.progress {
  height: 4px;
  background: #243041;
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 14px;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #f0d78c);
  transition: width 0.25s ease;
}

/* Lesson / practice shared */
.grid2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .grid2 { grid-template-columns: 1.15fr 0.85fr; }
}
.video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.choice {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.28);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--sans);
}
.choice:hover:not(:disabled) { border-color: rgba(212,168,75,.45); }
.choice:disabled { cursor: default; }
.choice.correct { border-color: rgba(61,214,140,.6); background: rgba(61,214,140,.1); }
.choice.wrong { border-color: rgba(240,113,120,.55); background: rgba(240,113,120,.1); }
.explain {
  display: none;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(212,168,75,.08);
  border: 1px solid rgba(212,168,75,.28);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--warm);
}
.explain.show { display: block; }
.list-item {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 8px;
  background: rgba(0,0,0,.18);
  color: inherit;
  text-decoration: none !important;
  font-family: var(--sans);
}
.list-item:hover { border-color: rgba(212,168,75,.45); }
.list-item b { display: block; color: var(--warm); font-family: var(--serif); font-size: 1.05rem; font-weight: 500; margin-bottom: 4px; }
.list-item span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.list-item .status { float: right; font-size: 11px; color: var(--ok); font-weight: 700; }
.states {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.state-btn {
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
}
.state-btn b { display: block; font-size: 15px; color: var(--warm); }
.state-btn span { font-size: 11px; color: var(--muted); }
.state-btn.active {
  border-color: rgba(212,168,75,.55);
  background: var(--gold-soft);
}
.score-big { font-size: 2.5rem; font-weight: 500; color: var(--gold); margin: 8px 0; font-family: var(--serif); }
.score-big.fail { color: var(--danger); }
.hidden { display: none !important; }

.grid3 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid3 { grid-template-columns: repeat(3, 1fr); }
}
.chip.warn {
  border-color: rgba(240, 180, 41, 0.45);
  color: #f0b429;
  background: rgba(240, 180, 41, 0.1);
}
.footer-note {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 28px;
  letter-spacing: 0.04em;
}
/* Touch-friendly practice choices */
@media (max-width: 520px) {
  .choice { padding: 14px 14px; font-size: 15px; }
  .states { max-height: 180px; }
  .btn { min-height: 44px; }
  .chrome { padding-bottom: 88px; }
}
.footer-note {
  margin-top: 28px;
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

/* Topic ads — premium chrome */
.ll-ad {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #1a2235, #12182a);
  padding: 12px 14px 12px 16px;
  position: relative;
  font-family: var(--sans);
}
.ll-ad::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--mint));
  border-radius: 14px 0 0 14px;
}
.ll-ad .ll-ad-label {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.ll-ad .ll-ad-h { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.ll-ad .ll-ad-b { font-size: 13px; color: var(--muted); line-height: 1.4; margin-bottom: 10px; }
.ll-ad .ll-ad-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ll-ad .ll-ad-cta {
  display: inline-flex; border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 700;
  background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(212,168,75,.4);
  text-decoration: none !important;
}
.ll-ad .ll-ad-meta { font-size: 11px; color: var(--muted); }
.ll-ad .ll-ad-topic {
  font-size: 10px; font-weight: 700; color: var(--mint);
  border: 1px solid rgba(61,214,198,.35); border-radius: 999px; padding: 2px 8px;
}
.ll-ad.scaffold .ll-ad-cta { pointer-events: none; opacity: .85; }
