:root {
  --maroon: #7a1f2b;
  --maroon-dark: #5a1520;
  --gold: #d9a01e;
  --gold-soft: #f6e5bd;
  --cream: #fbf6ee;
  --ink: #2a2220;
  --muted: #6f625c;
  --line: #e7dccd;
  --ok: #1f7a4d;
  --ok-soft: #e1f3e9;
  --warn-soft: #fff1d6;
  --err: #b3261e;
  --err-soft: #fde4e1;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: 'Noto Sans', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
  font-size: 17px; line-height: 1.6;
}
:lang(ne) body, html[lang="ne"] body { font-family: 'Noto Sans Devanagari', 'Noto Sans', system-ui, sans-serif; }
a { color: var(--maroon); }
h1, h2 { line-height: 1.25; }
h1 { font-family: 'Noto Serif', 'Noto Sans Devanagari', Georgia, serif; font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .2em 0 .4em; }
h2 { font-size: 1.25rem; margin: .2em 0 .5em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; }
.narrow-wide { max-width: 760px; }
.page { padding-top: 28px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46em; }

/* Top bar */
.topbar { background: #fff; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand strong { display: block; color: var(--maroon); font-size: 1.05rem; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .linkish { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav a.on { background: var(--gold-soft); }
.nav a.btn, .nav a.btn:hover { color: #fff; background: var(--maroon); border-radius: 999px; padding: 6px 14px; }
.nav a:hover, .linkish:hover { background: var(--cream); }
.nav .lang { border: 1px solid var(--line); }
.linkish { background: none; border: 0; cursor: pointer; font: inherit; }
.inline { display: inline; margin: 0; }
.menu-toggle, .menu-button { display: none; }
.testbar { background: #fff3cd; color: #6b4e00; text-align: center; font-size: .85rem; padding: 4px 8px; font-weight: 600; }

@media (max-width: 860px) {
  .menu-button { display: block; font-size: 1.6rem; cursor: pointer; padding: 4px 10px; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 3px solid var(--gold); }
  .menu-toggle:checked ~ .nav { display: flex; }
  .nav a, .nav .linkish { padding: 12px; text-align: left; width: 100%; }
  .nav form { width: 100%; }
}

/* Buttons */
.btn {
  display: inline-block; background: var(--maroon); color: #fff; border: 2px solid var(--maroon);
  padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); }
.btn-ghost { background: transparent; color: var(--maroon); }
.btn-ghost:hover { background: var(--gold-soft); color: var(--maroon); }
.btn-small { padding: 6px 14px; font-size: .9rem; }
.btn-big { font-size: 1.2rem; padding: 16px 28px; margin: 10px 0; }
.btn-danger { background: var(--err); border-color: var(--err); }
.full { width: 100%; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(122,31,43,.96), rgba(90,21,32,.96)),
    repeating-linear-gradient(45deg, var(--gold) 0 2px, transparent 2px 22px);
  color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(90deg, #d9a01e 0 24px, #1f5f8b 24px 48px, #fff 48px 72px, #1f7a4d 72px 96px, #b3261e 96px 120px);
}
.hero h1 { color: #fff; max-width: 20em; }
.hero .lead { color: #f4e6e0; }
.kicker { color: var(--gold); font-weight: 700; letter-spacing: .02em; margin: 0; }
.hero .btn { background: var(--gold); border-color: var(--gold); color: #2a1a00; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: #fff; }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(60,30,20,.04); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -36px; position: relative; }
.pillar-icon { font-size: 2rem; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; padding-top: 32px; padding-bottom: 48px; align-items: start; }
@media (max-width: 760px) { .pillars, .split { grid-template-columns: 1fr; } .pillars { margin-top: 16px; } }
.ticks { list-style: none; padding: 0; }
.ticks li { padding: 6px 0 6px 32px; position: relative; }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 6px; color: #fff; background: var(--ok); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; }
.price-card { border-top: 6px solid var(--gold); }
.price-card.wide { margin: 24px 0; }
.price { font-size: 2.6rem; font-weight: 700; color: var(--maroon); margin: 0; }
.price-sub { font-size: 1rem; color: var(--muted); font-weight: 400; }

/* Join steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #2a1a00; font-weight: 700; font-size: 1.2rem; }
.ok-text { color: var(--ok); font-weight: 700; font-size: 1.4rem; margin: 0; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }

/* Forms */
.form-card { padding: 28px; }
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .95rem; }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-weight: 400;
  border: 1px solid #cbbcaa; border-radius: 10px; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--gold-soft); border-color: var(--gold); }
label.check { display: flex; gap: 10px; align-items: center; }
label.check input { width: auto; margin: 0; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.req { color: var(--err); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }
.admin-form h2 { border-bottom: 2px solid var(--gold-soft); padding-bottom: 6px; margin-top: 10px; }

/* Messages */
.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0; }
.flash-ok { background: var(--ok-soft); color: #0f4b2e; }
.flash-info { background: var(--warn-soft); color: #5c4300; }
.flash-error { background: var(--err-soft); color: #7a1610; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-wait { background: var(--warn-soft); color: #6b4e00; }

/* Lessons */
.locked-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--gold-soft); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0 24px; font-weight: 600; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.lesson-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.lesson-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(60,30,20,.08); }
.lesson-card.is-locked h2 { color: var(--muted); }
.lesson-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.lesson-num { width: 30px; height: 30px; border-radius: 50%; background: var(--maroon); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.tag { display: inline-block; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; font-size: .8rem; color: var(--muted); }
.tag-lock { background: var(--gold-soft); color: #6b4e00; border-color: transparent; }
.more { margin-top: auto; color: var(--maroon); font-weight: 600; }
.locked { text-align: center; padding: 36px 22px; border: 2px dashed var(--gold); background: #fffdf8; }
.lock-icon { font-size: 2.6rem; }
.small-locked { padding: 18px; margin-top: 12px; border-radius: 10px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

/* Live */
.live-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .live-grid { grid-template-columns: 1fr; } }
.live-card { border-top: 6px solid var(--maroon); }
.live-date { font-size: 1.5rem; font-weight: 700; color: var(--maroon); margin: 0; }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { text-align: center; color: var(--muted); }
.stat span { display: block; font-size: 2rem; font-weight: 700; color: var(--maroon); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.admin-tile { text-decoration: none; color: var(--ink); }
.admin-tile span { font-size: 2rem; }
.admin-tile:hover { border-color: var(--gold); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 16px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--gold-soft); font-size: .85rem; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table tr { display: block; border-bottom: 2px solid var(--line); }
  .table td { display: block; border: 0; padding: 6px 12px; }
}
.actions-cell { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.small-input { width: auto; min-width: 180px; margin: 0; padding: 6px 10px; font-size: .9rem; }
.inline-details summary { cursor: pointer; color: var(--muted); }

/* Footer */
.footer { background: var(--maroon-dark); color: #f4e6e0; padding: 28px 0; margin-top: 24px; }
.footer .muted { color: #cfb9b2; }
.footer-pattern { height: 6px; margin-bottom: 16px; border-radius: 3px; background: repeating-linear-gradient(90deg, #d9a01e 0 24px, #1f5f8b 24px 48px, #fff 48px 72px, #1f7a4d 72px 96px, #b3261e 96px 120px); }
