/* ============================================================
   ATHMA design system
   Palette: Banyan (deep green) · Marigold · Mist · Night
   Type:    Fraunces (display) · Source Serif 4 (reading) · Inter (UI)
   Signature: the breath ring — a slow meditation pulse
   ============================================================ */

:root {
  /* Light theme */
  --bg:        #F2F4F1;   /* mist */
  --bg-raise:  #FBFCFA;
  --bg-soft:   #E8ECE6;
  --ink:       #1E2B26;   /* near-banyan text */
  --ink-soft:  #55655E;
  --line:      #D8DED6;
  --banyan:    #1F3D33;
  --banyan-deep:#163028;
  --marigold:  #C98A1B;
  --marigold-soft: #F3E4C4;
  --danger:    #A8402F;
  --shadow:    0 10px 30px rgba(30, 61, 51, .08);

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui:      "Inter", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --reading: 44rem;   /* comfortable measure ~ 68ch */
}

html[data-theme="dark"] {
  --bg:        #101815;   /* night */
  --bg-raise:  #17211D;
  --bg-soft:   #1D2A25;
  --ink:       #E7ECE7;
  --ink-soft:  #9FB0A7;
  --line:      #2A3831;
  --banyan:    #8FBFA9;   /* banyan lightens in the dark */
  --banyan-deep:#A9D2BE;
  --marigold:  #E0A83E;
  --marigold-soft: #3A2F17;
  --danger:    #E07A62;
  --shadow:    0 10px 30px rgba(0, 0, 0, .35);
}

/* ---------- Accent color themes (pick your palette) ---------- */
html[data-accent="blossom"] { --banyan: #B23A6B; --banyan-deep: #7A1F45; --marigold: #E85D8A; --marigold-soft: #FBE1EA; }
html[data-accent="blossom"][data-theme="dark"] { --banyan: #F2A6C4; --banyan-deep: #F6BFD6; --marigold: #FF87AE; --marigold-soft: #3A1F2A; }

html[data-accent="ocean"] { --banyan: #1E5A8A; --banyan-deep: #123A5C; --marigold: #2FA8D8; --marigold-soft: #DCEEF7; }
html[data-accent="ocean"][data-theme="dark"] { --banyan: #7FC4EE; --banyan-deep: #A9D8F5; --marigold: #4FC3F0; --marigold-soft: #16262E; }

html[data-accent="meadow"] { --banyan: #2E7D46; --banyan-deep: #1C5C30; --marigold: #8BC34A; --marigold-soft: #E7F3D8; }
html[data-accent="meadow"][data-theme="dark"] { --banyan: #8FE0A8; --banyan-deep: #B6ECC6; --marigold: #B7E37B; --marigold-soft: #1E2A1A; }

/* ---------- Right-to-left languages (Urdu) ---------- */
html[dir="rtl"] { direction: rtl; }
html[dir="rtl"] .crumbs, html[dir="rtl"] .lang-alt { direction: rtl; }
/* Free-form content (article bodies, ledes, comments) auto-detects its own script direction,
   so English content shown as a fallback under an RTL UI still reads left-to-right naturally. */
.article-body, .lede, .comment p, #journal-body, #lesson-note, .journal-text { unicode-bidi: plaintext; }
/* ---------- Script-appropriate type per language ---------- */
html[data-locale="ml"] { --font-display: "Noto Serif Malayalam", "Fraunces", Georgia, serif; --font-body: "Noto Sans Malayalam", "Source Serif 4", serif; --font-ui: "Noto Sans Malayalam", "Inter", system-ui, sans-serif; }
html[data-locale="hi"], html[data-locale="mr"] { --font-display: "Noto Serif Devanagari", "Fraunces", Georgia, serif; --font-body: "Noto Sans Devanagari", "Source Serif 4", serif; --font-ui: "Noto Sans Devanagari", "Inter", system-ui, sans-serif; }
html[data-locale="bn"] { --font-display: "Noto Serif Bengali", "Fraunces", Georgia, serif; --font-body: "Noto Sans Bengali", "Source Serif 4", serif; --font-ui: "Noto Sans Bengali", "Inter", system-ui, sans-serif; }
html[data-locale="ta"] { --font-display: "Noto Serif Tamil", "Fraunces", Georgia, serif; --font-body: "Noto Sans Tamil", "Source Serif 4", serif; --font-ui: "Noto Sans Tamil", "Inter", system-ui, sans-serif; }
html[data-locale="te"] { --font-display: "Noto Serif Telugu", "Fraunces", Georgia, serif; --font-body: "Noto Sans Telugu", "Source Serif 4", serif; --font-ui: "Noto Sans Telugu", "Inter", system-ui, sans-serif; }
html[data-locale="gu"] { --font-display: "Noto Serif Gujarati", "Fraunces", Georgia, serif; --font-body: "Noto Sans Gujarati", "Source Serif 4", serif; --font-ui: "Noto Sans Gujarati", "Inter", system-ui, sans-serif; }
html[data-locale="kn"] { --font-display: "Noto Serif Kannada", "Fraunces", Georgia, serif; --font-body: "Noto Sans Kannada", "Source Serif 4", serif; --font-ui: "Noto Sans Kannada", "Inter", system-ui, sans-serif; }
html[data-locale="pa"] { --font-display: "Noto Serif Gurmukhi", "Fraunces", Georgia, serif; --font-body: "Noto Sans Gurmukhi", "Source Serif 4", serif; --font-ui: "Noto Sans Gurmukhi", "Inter", system-ui, sans-serif; }
html[data-locale="ur"] { --font-display: "Noto Nastaliq Urdu", "Fraunces", Georgia, serif; --font-body: "Noto Nastaliq Urdu", "Source Serif 4", serif; --font-ui: "Noto Nastaliq Urdu", "Inter", system-ui, sans-serif; }
html[data-locale="or"] { --font-display: "Noto Serif Oriya", "Fraunces", Georgia, serif; --font-body: "Noto Sans Oriya", "Source Serif 4", serif; --font-ui: "Noto Sans Oriya", "Inter", system-ui, sans-serif; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
img, video { max-width: 100%; border-radius: var(--radius-sm); }
a { color: var(--banyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.container.narrow { max-width: 46rem; }
.container.reading { max-width: var(--reading); }
.center { text-align: center; }

.eyebrow {
  font-family: var(--font-ui); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--marigold); margin: 0 0 .6rem;
}
.lede { font-family: var(--font-body); font-size: 1.15rem; color: var(--ink-soft); max-width: 42rem; }
.hint, small { color: var(--ink-soft); font-size: .85rem; }
.empty-state { color: var(--ink-soft); font-family: var(--font-body); font-size: 1.05rem; padding: 2rem 0; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--banyan); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; border-radius: 8px; }

/* ---------- Signature: breath ring ---------- */
.breath-ring {
  position: relative; width: min(320px, 60vw); aspect-ratio: 1;
  display: grid; place-items: center; margin-inline: auto;
}
.breath-ring span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--banyan); opacity: .5;
  animation: breathe 7s ease-in-out infinite;
}
.breath-ring span:nth-child(2) { inset: 14%; animation-delay: .5s; border-color: var(--marigold); opacity: .55; }
.breath-ring span:nth-child(3) { inset: 28%; animation-delay: 1s; opacity: .6; }
.breath-ring em {
  font-family: var(--font-display); font-style: italic; font-size: 1.05rem;
  color: var(--ink-soft); letter-spacing: .2em;
}
.breath-ring.small-ring { width: 120px; margin-bottom: 1.2rem; }
.breath-ring.small-ring em { display: none; }
@keyframes breathe {
  0%, 100% { transform: scale(.94); opacity: .35; }
  50%      { transform: scale(1.04); opacity: .75; }
}
@media (prefers-reduced-motion: reduce) {
  .breath-ring span { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .12em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-ring { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--marigold); box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4.5px var(--banyan); flex: none; }
.brand-ring.small { width: 18px; height: 18px; }
.admin-tag { font-size: .6rem; letter-spacing: .2em; color: var(--marigold); vertical-align: super; margin-left: .3rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.4rem; padding-block: .8rem; }
.main-nav { display: flex; gap: 1.3rem; margin-right: auto; }
.main-nav a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--ink); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.header-search input {
  width: 180px; padding: .5rem .9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-raise); color: var(--ink);
  font-family: var(--font-ui); font-size: .88rem; transition: width .25s ease;
}
.header-search input:focus { width: 230px; }
.nav-toggle { display: none; }

/* Accent color picker */
.accent-picker { display: flex; align-items: center; gap: .4rem; padding: 0 .3rem; }
.accent-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .15s ease, border-color .15s ease; }
.accent-dot:hover { transform: scale(1.15); }
.accent-dot.on { border-color: var(--ink); }
.accent-dot.accent-banyan { background: linear-gradient(135deg, #1F3D33, #C98A1B); }
.accent-dot.accent-blossom { background: linear-gradient(135deg, #B23A6B, #E85D8A); }
.accent-dot.accent-ocean { background: linear-gradient(135deg, #1E5A8A, #2FA8D8); }
.accent-dot.accent-meadow { background: linear-gradient(135deg, #2E7D46, #8BC34A); }

/* Language picker */
.lang-picker { padding: 0 .2rem; }
.lang-picker select {
  padding: .35rem .6rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-raise); color: var(--ink); font-family: var(--font-ui); font-size: .82rem; cursor: pointer;
}
.lang-alt { margin: -.3rem 0 .9rem; }
.lang-alt a { margin-left: .3rem; }

/* Theme toggle icon (sun/moon via CSS) */
.theme-icon { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--marigold); box-shadow: 0 0 0 3px transparent; position: relative; }
html[data-theme="dark"] .theme-icon { background: transparent; box-shadow: inset 5px -3px 0 0 var(--marigold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-ui); font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; }
.btn-solid { background: var(--banyan); color: var(--bg); }
html[data-theme="dark"] .btn-solid { color: #0F1714; }
.btn-solid:hover { box-shadow: var(--shadow); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--banyan); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); padding: .35rem .8rem; font-size: .82rem; }
.icon-btn { background: none; border: 1px solid transparent; border-radius: 999px; padding: .45rem .6rem; cursor: pointer; font-size: 1rem; color: var(--ink-soft); line-height: 1; }
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn.on { color: var(--marigold); }
.linklike { background: none; border: 0; color: var(--ink-soft); cursor: pointer; padding: 0; font: inherit; text-align: left; }
.linklike:hover { color: var(--ink); }

/* ---------- Flash ---------- */
.flash { padding: .7rem 0; font-weight: 500; font-size: .92rem; }
.flash-success { background: var(--marigold-soft); color: var(--ink); }
.flash-error { background: color-mix(in srgb, var(--danger) 14%, var(--bg)); color: var(--danger); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.4rem, 6vw, 4.5rem); }
.section.alt { background: var(--bg-soft); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-head a { font-size: .9rem; font-weight: 500; }
.page-head-section { padding-bottom: clamp(1rem, 3vw, 2rem); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(2rem, 6vw, 4rem); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.1rem; }
.categories-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.featured-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.testimonial-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); }

.card {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--banyan) 35%, var(--line)); }
.card-icon { font-size: 1.5rem; line-height: 1; margin-top: .1rem; }
.card-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 500; }
.card-text { color: var(--ink-soft); font-size: .92rem; }
.card-meta { color: var(--ink-soft); font-size: .8rem; letter-spacing: .02em; }
.card.static { cursor: default; }
.card-arrow { align-self: center; color: var(--marigold); font-size: 1.2rem; }
.feature-card { flex-direction: column; gap: .5rem; padding: 1.5rem; }
.feature-tag { font-size: .75rem; font-weight: 600; letter-spacing: .06em; color: var(--marigold); text-transform: uppercase; }
.badge-18 { font-size: .65rem; font-weight: 700; background: var(--marigold-soft); color: var(--marigold); border-radius: 6px; padding: .1rem .35rem; vertical-align: middle; }

/* Journey + daily */
.journey-card, .daily-card {
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
}
.daily-card { display: block; border-left: 4px solid var(--marigold); }
.journey-line { margin: 0; font-family: var(--font-body); }

/* Testimonials */
.testimonial { margin: 0; background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.testimonial blockquote { margin: 0 0 .8rem; font-family: var(--font-body); font-size: 1.02rem; font-style: italic; }
.testimonial figcaption { font-size: .85rem; font-weight: 600; }
.testimonial figcaption span { color: var(--ink-soft); font-weight: 400; }

/* Newsletter */
.newsletter { background: var(--banyan-deep); color: #EDF2EE; }
html[data-theme="dark"] .newsletter { background: var(--bg-soft); color: var(--ink); }
.newsletter h2 { color: inherit; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.newsletter-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-form input { padding: .7rem 1.1rem; border-radius: 999px; border: 1px solid transparent; min-width: 240px; font-family: var(--font-ui); }

/* ---------- Course / lesson lists ---------- */
.crumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.lesson-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; counter-reset: none; }
.lesson-row { align-items: center; }
.lesson-num {
  font-family: var(--font-display); font-size: 1.1rem; color: var(--marigold);
  width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; flex: none;
}

/* Progress ringlet (conic mini circle) */
.ringlet {
  --pct: 0;
  width: 26px; height: 26px; border-radius: 50%; flex: none; align-self: center;
  background: conic-gradient(var(--marigold) calc(var(--pct) * 1%), var(--bg-soft) 0);
  box-shadow: inset 0 0 0 4px var(--bg-raise);
  border: 1px solid var(--line);
}
.ringlet.done { background: var(--banyan); box-shadow: none; position: relative; }
.ringlet.done::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--bg); font-size: .7rem; font-weight: 700; }

/* ---------- Reading experience ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--banyan), var(--marigold)); transition: width .1s linear; }

.lesson-meta { display: flex; align-items: center; gap: 1rem; color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.lesson-actions { display: flex; gap: .2rem; }
.lesson-figure { margin: 0 auto 1.5rem; }
.lesson-figure img { width: 100%; }

/* Meta chips: difficulty, XP, tags */
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem;
  border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--bg-raise);
}
.chip-difficulty { color: var(--banyan); border-color: color-mix(in srgb, var(--banyan) 35%, var(--line)); }
.chip-xp { color: var(--marigold); border-color: color-mix(in srgb, var(--marigold) 45%, var(--line)); }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.tag-pill { font-size: .8rem; color: var(--ink-soft); background: var(--bg-soft); padding: .18rem .6rem; border-radius: 999px; }

/* Quote */
.lesson-quote {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.2rem, 3vw, 1.5rem); text-align: center; color: var(--ink);
  border: 0; margin: 0 auto 2rem; padding: 0 1rem; max-width: 38rem;
}

/* Key takeaways */
.takeaways-block { border-left: 4px solid var(--banyan); }
.takeaways-list { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.takeaways-list li { display: flex; align-items: flex-start; gap: .7rem; font-family: var(--font-body); font-size: 1.05rem; }
.takeaways-list li span { color: var(--banyan); font-weight: 700; margin-top: .15em; flex: none; }

/* Challenge of the day */
.challenge-block { border-left: 4px solid var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--bg-raise)); }
.challenge-block p { margin: 0; font-family: var(--font-body); font-size: 1.05rem; }

/* Notes (private) */
.notes-block { border-left: 4px solid var(--ink-soft); }

/* References */
.reference-list { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.reference-list li { font-family: var(--font-body); font-size: .96rem; color: var(--ink-soft); padding-left: 1.1em; position: relative; }
.reference-list li::before { content: "—"; position: absolute; left: 0; }

/* Related lessons */
.related-lessons { padding-top: .5rem; }

/* Discussion / comments */
.discussion-block { padding-top: .5rem; }
.comment-list { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0 1.4rem; }
.comment { background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1.1rem; }
.comment-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; color: var(--ink-soft); margin-bottom: .3rem; }
.comment-head strong { color: var(--ink); font-family: var(--font-ui); }
.comment p { margin: 0; font-family: var(--font-body); font-size: 1rem; }
.comment-form { display: flex; flex-direction: column; gap: .7rem; }
.comment-form .btn { align-self: flex-start; }

/* Reward line above the complete button */
.reward-line { color: var(--ink-soft); font-size: .92rem; margin: 0 0 1rem; }
.reward-line strong { color: var(--marigold); font-weight: 700; }


.article-body {
  font-family: var(--font-body); font-size: 1.14rem; line-height: 1.85; color: var(--ink);
}
.article-body p { margin: 0 0 1.3em; }
.article-body h2, .article-body h3 { margin-top: 2em; }
.article-body h2 { font-size: 1.5rem; }
.article-body blockquote {
  margin: 1.6em 0; padding: .4em 1.4em; border-left: 3px solid var(--marigold);
  font-style: italic; color: var(--ink-soft);
}
.article-body img { margin-block: 1em; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin-bottom: 1.3em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }

/* Media blocks */
.media-stack { display: flex; flex-direction: column; gap: 1.4rem; margin-block: 2.5rem; }
.media-block { margin: 0; }
.media-block figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: .4rem; font-family: var(--font-ui); }
.media-block video, .media-block img { width: 100%; }
.media-block audio { width: 100%; }
.media-block.placeholder {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 2.2rem; text-align: center; color: var(--ink-soft); background: var(--bg-raise);
}
.media-block.placeholder span { font-size: 1.6rem; display: block; margin-bottom: .3rem; }
.media-block.placeholder p { margin: 0; font-size: .9rem; }
.media-block.placeholder.audio { padding: 1.2rem; display: flex; align-items: center; justify-content: center; gap: .8rem; }
.media-block.placeholder.audio span { margin: 0; }

/* Practice blocks */
.practice-block {
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.2rem); margin-block: 1.6rem;
}
.activity-block { border-left: 4px solid var(--marigold); }
.reflection-block { border-left: 4px solid var(--banyan); }
.reflection-q { font-family: var(--font-body); font-size: 1.2rem; font-style: italic; margin: 0 0 1.2rem; color: var(--ink); }
.activity-done { display: flex; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.journal-inline { display: flex; flex-direction: column; gap: .7rem; }
textarea, input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], select {
  width: 100%; padding: .7rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: .95rem;
}
textarea { resize: vertical; font-family: var(--font-body); line-height: 1.6; }
.journal-inline .btn, .activity-done .btn { align-self: flex-start; }

.checklist { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.checklist label { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; font-family: var(--font-body); font-size: 1.02rem; }
.checklist input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; accent-color: var(--banyan); flex: none; }
.checklist input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--marigold); }

/* Lesson footer */
.lesson-footer { padding-block: 2rem 3rem; display: flex; flex-direction: column; gap: 2rem; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pn-link { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--bg-raise); }
.pn-link:hover { text-decoration: none; border-color: var(--banyan); }
.pn-link span { font-size: .78rem; color: var(--ink-soft); letter-spacing: .05em; text-transform: uppercase; }
.pn-link strong { font-family: var(--font-display); font-weight: 500; }
.pn-link.next { text-align: right; }
.pn-link.disabled { border: 0; background: transparent; }

/* ---------- Search / blog ---------- */
.big-search { display: flex; gap: .6rem; margin-top: 1.2rem; }
.result-head { margin-top: 2.4rem; }
.blog-layout { display: grid; grid-template-columns: 1fr 280px; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; }
.blog-side h2 { font-size: 1.05rem; margin-top: 1.8rem; }
.blog-side h2:first-child { margin-top: 0; }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; font-size: .92rem; }
.side-list li { display: flex; justify-content: space-between; gap: .8rem; }
.side-list span { color: var(--ink-soft); font-size: .8rem; white-space: nowrap; }
.related { padding-block: 2rem 3rem; }

/* ---------- Auth / gate ---------- */
.auth-card, .gate-card {
  max-width: 26rem; text-align: center;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.8rem, 5vw, 2.8rem); box-shadow: var(--shadow);
}
.gate-card { max-width: 32rem; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; text-align: left; margin-top: 1.4rem; }
.form-stack label { display: flex; flex-direction: column; gap: .35rem; font-weight: 500; font-size: .9rem; }
.auth-alt { margin-top: 1.4rem; font-size: .9rem; color: var(--ink-soft); }
.gate-actions { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Dashboard ---------- */
.dash-layout { display: grid; grid-template-columns: 230px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.dash-side { position: sticky; top: 80px; }
.dash-hello { color: var(--ink-soft); font-size: .9rem; }
.dash-nav { display: flex; flex-direction: column; gap: .15rem; }
.dash-nav a, .dash-nav .linklike { padding: .5rem .8rem; border-radius: var(--radius-sm); color: var(--ink-soft); font-size: .92rem; font-weight: 500; }
.dash-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.dash-nav a.on { background: var(--bg-raise); color: var(--ink); border: 1px solid var(--line); }
.dash-main h2 { margin-top: 2.2rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; margin-block: 1.2rem 1.8rem; }
.stat { background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; }
.stat strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--banyan); }
.stat span { font-size: .82rem; color: var(--ink-soft); }
.journal-entry { justify-content: space-between; }
.journal-text { white-space: pre-line; }
.journal-new { margin-block: 1.4rem 2.2rem; }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: var(--bg-raise); border-right: 1px solid var(--line); padding: 1.4rem 1.1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; margin-top: 1.4rem; }
.admin-nav a, .admin-nav .linklike { padding: .5rem .7rem; border-radius: var(--radius-sm); color: var(--ink-soft); font-size: .9rem; font-weight: 500; }
.admin-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.admin-nav a.on { background: var(--marigold-soft); color: var(--ink); }
.admin-main { padding: clamp(1.4rem, 3vw, 2.5rem); max-width: 62rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--bg-raise); }
.admin-table th, .admin-table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.admin-table th { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: var(--bg-soft); }
.row-actions { display: flex; gap: .4rem; align-items: center; justify-content: flex-end; }
.admin-form { max-width: 44rem; }
.admin-form h2 { margin-top: 1.8rem; }
.check-row { flex-direction: row !important; align-items: center; gap: .6rem !important; }
.check-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--banyan); }
.code-area { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; line-height: 1.5; }
.form-actions { display: flex; gap: .8rem; margin-top: 1rem; }
.upload-field { display: flex; flex-direction: column; gap: .5rem; }
.upload-controls { display: flex; align-items: center; gap: .8rem; font-size: .85rem; }
.upload-status { color: var(--ink-soft); }
.upload-preview { max-width: 220px; border: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; background: var(--bg-soft); }
.footer-inner { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: .7rem; color: var(--ink-soft); font-family: var(--font-body); }
.footer-brand p { margin: 0; }
.footer-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-soft); font-size: .9rem; }
.footer-note { color: var(--ink-soft); font-size: .8rem; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .breath-ring { order: -1; width: min(220px, 55vw); }
  .two-col, .blog-layout, .dash-layout { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--bg-raise);
    border-bottom: 1px solid var(--line); padding: .6rem 1.2rem 1rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .header-search { display: none; }
  .accent-picker { display: none; }
  .header-actions .btn-quiet { display: none; }
  #install-app-btn { display: none; }
  .site-header .header-actions a.btn-solid { display: inline-flex; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-link.next { text-align: left; }
  .newsletter-form input { min-width: 0; flex: 1; }
}
@media (max-width: 480px) {
  .header-inner { gap: .6rem; }
  .header-actions { gap: .4rem; }
  .brand-name { font-size: 1.05rem; }
  .lang-picker select { padding: .3rem .4rem; font-size: .76rem; max-width: 84px; }
  .header-actions .btn-solid { padding: .5rem .8rem; font-size: .85rem; }
}

/* ============================================================
   Design style switcher — 8 alternate visual treatments for
   cards, buttons and surfaces. Default (no attribute, or
   data-style="minimal") is the site's normal calm design.
   Heavier styles (glass/liquid/spatial) use backdrop-filter,
   which costs more to render — @supports fallbacks keep them
   solid on devices/browsers that don't handle it well.
   ============================================================ */

/* ---------- Liquid Glass (fluid, glossy, dynamic refraction) ---------- */
html[data-style="liquid-glass"] .card,
html[data-style="liquid-glass"] .stat,
html[data-style="liquid-glass"] .practice-block,
html[data-style="liquid-glass"] .testimonial {
  background: color-mix(in srgb, var(--bg-raise) 55%, transparent);
  border: 1px solid color-mix(in srgb, #fff 35%, transparent);
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.4);
  position: relative;
  overflow: hidden;
}
@supports (backdrop-filter: blur(1px)) {
  html[data-style="liquid-glass"] .card, html[data-style="liquid-glass"] .stat,
  html[data-style="liquid-glass"] .practice-block, html[data-style="liquid-glass"] .testimonial {
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
  }
}
html[data-style="liquid-glass"] .card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.25), transparent);
  pointer-events: none;
}
html[data-style="liquid-glass"] .btn-solid { border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.3); }
html[data-style="liquid-glass"] body { background: linear-gradient(160deg, var(--bg), color-mix(in srgb, var(--marigold) 8%, var(--bg))); }

/* ---------- Bento Grid (modular blocks, bold dividers) ---------- */
html[data-style="bento"] .categories-grid, html[data-style="bento"] .featured-grid, html[data-style="bento"] .testimonial-grid {
  gap: .5rem;
}
html[data-style="bento"] .card, html[data-style="bento"] .stat, html[data-style="bento"] .practice-block {
  border-radius: 22px; border: 2px solid var(--ink); box-shadow: none;
}
html[data-style="bento"] .categories-grid .card:nth-child(3n+1) { background: var(--marigold-soft); }
html[data-style="bento"] .categories-grid .card:nth-child(3n+2) { background: var(--bg-soft); }
html[data-style="bento"] .btn-solid { border-radius: 12px; border: 2px solid var(--ink); }
html[data-style="bento"] .btn-quiet { border-radius: 12px; border: 2px solid var(--ink); }

/* ---------- Spatial UI (layered depth, floating) ---------- */
html[data-style="spatial"] .card, html[data-style="spatial"] .stat, html[data-style="spatial"] .practice-block {
  border: 0; border-radius: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 16px 40px -12px rgba(0,0,0,.22);
  transition: transform .25s ease, box-shadow .25s ease;
}
html[data-style="spatial"] a.card:hover, html[data-style="spatial"] .stat:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 8px 12px rgba(0,0,0,.06), 0 28px 56px -16px rgba(0,0,0,.3);
}
html[data-style="spatial"] body { background: radial-gradient(120% 100% at 50% -10%, color-mix(in srgb, var(--banyan) 10%, var(--bg)), var(--bg) 60%); }

/* ---------- Claymorphism (soft, puffy, pastel) ---------- */
html[data-style="clay"] .card, html[data-style="clay"] .stat, html[data-style="clay"] .practice-block, html[data-style="clay"] .testimonial {
  border: 0; border-radius: 32px; background: var(--bg-raise);
  box-shadow: -8px -8px 16px rgba(255,255,255,.7), 8px 8px 20px rgba(0,0,0,.12);
}
html[data-theme="dark"][data-style="clay"] .card, html[data-theme="dark"][data-style="clay"] .stat,
html[data-theme="dark"][data-style="clay"] .practice-block, html[data-theme="dark"][data-style="clay"] .testimonial {
  box-shadow: -8px -8px 16px rgba(255,255,255,.04), 8px 8px 20px rgba(0,0,0,.5);
}
html[data-style="clay"] .btn-solid { border-radius: 999px; box-shadow: -4px -4px 10px rgba(255,255,255,.5), 4px 4px 14px rgba(0,0,0,.18); }

/* ---------- Neumorphism (monochrome, embossed) ---------- */
html[data-style="neu"] .card, html[data-style="neu"] .stat, html[data-style="neu"] .practice-block {
  border: 0; border-radius: 20px; background: var(--bg);
  box-shadow: -6px -6px 14px rgba(255,255,255,.65), 6px 6px 14px rgba(0,0,0,.1);
}
html[data-theme="dark"][data-style="neu"] .card, html[data-theme="dark"][data-style="neu"] .stat,
html[data-theme="dark"][data-style="neu"] .practice-block {
  box-shadow: -6px -6px 14px rgba(255,255,255,.03), 6px 6px 14px rgba(0,0,0,.55);
}
html[data-style="neu"] .btn-solid, html[data-style="neu"] .btn-quiet {
  background: var(--bg); color: var(--ink); border: 0;
  box-shadow: -4px -4px 8px rgba(255,255,255,.6), 4px 4px 10px rgba(0,0,0,.12);
}

/* ---------- Glassmorphism (frosted, flat, static) ---------- */
html[data-style="glass"] .card, html[data-style="glass"] .stat, html[data-style="glass"] .practice-block, html[data-style="glass"] .testimonial {
  background: color-mix(in srgb, var(--bg-raise) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
@supports (backdrop-filter: blur(1px)) {
  html[data-style="glass"] .card, html[data-style="glass"] .stat,
  html[data-style="glass"] .practice-block, html[data-style="glass"] .testimonial {
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
}

/* ---------- Skeuomorphism (realistic, textured, tactile) ---------- */
html[data-style="skeuo"] .card, html[data-style="skeuo"] .practice-block, html[data-style="skeuo"] .stat {
  border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,.015) 0 2px, transparent 2px 6px),
    var(--bg-raise);
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 18px -8px rgba(0,0,0,.28);
}
html[data-style="skeuo"] .btn-solid {
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--banyan) 85%, white), var(--banyan));
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 3px 6px rgba(0,0,0,.3);
  border: 1px solid var(--banyan-deep);
}

/* ---------- Maximalism (bold, dense, colorful) ---------- */
html[data-style="maximal"] body { background: linear-gradient(135deg, var(--marigold-soft), var(--bg) 40%, color-mix(in srgb, var(--banyan) 12%, var(--bg))); }
html[data-style="maximal"] .card, html[data-style="maximal"] .stat, html[data-style="maximal"] .practice-block {
  border: 3px solid var(--ink); border-radius: 6px;
  box-shadow: 6px 6px 0 var(--marigold);
}
html[data-style="maximal"] h1, html[data-style="maximal"] h2 {
  background: linear-gradient(90deg, var(--banyan), var(--marigold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-style="maximal"] .btn-solid { border-radius: 6px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--marigold); }
html[data-style="maximal"] .btn-quiet { border-radius: 6px; border: 3px solid var(--ink); }

/* Respect users who've asked for reduced motion/transparency */
@media (prefers-reduced-transparency: reduce) {
  html[data-style="liquid-glass"] .card, html[data-style="glass"] .card,
  html[data-style="liquid-glass"] .stat, html[data-style="glass"] .stat {
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    background: var(--bg-raise) !important;
  }
}

/* Style picker dropdown, matches the language/accent pickers */
.style-picker select {
  padding: .35rem .6rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-raise); color: var(--ink); font-family: var(--font-ui); font-size: .82rem; cursor: pointer;
}
@media (max-width: 900px) { .style-picker { display: none; } }
