/* Zeal Tutorial — editorial studio system. DLM CASH LABS. 2026-09-30 */
@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,640;0,9..144,700;1,9..144,500&family=Noto+Naskh+Arabic:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4eee4;
  --bg-2: #efe6d6;
  --paper: #fffaf2;
  --ink: #1a1714;
  --ink-2: #5b5348;
  --line: #e2d6c4;
  --line-2: #cbbba3;
  --terracotta: #c45c26;
  --terracotta-2: #9a3f16;
  --forest: #2f5d50;
  --forest-2: #1d3d35;
  --gold: #c4a265;
  --gold-2: #8c7038;
  --ok: #2f6b4f;
  --warn: #a15c12;
  --danger: #9b3224;
  --chat: #1a1714;
  --shadow: 0 10px 30px rgba(26, 23, 20, 0.08);
  --shadow-lg: 0 24px 50px rgba(26, 23, 20, 0.14);
  --r: 10px;
  --r-sm: 6px;
  --max: 1180px;
  --nav-h: 72px;
  --font-display: "Fraunces", "Noto Sans Devanagari", Georgia, serif;
  --font-ui: "Figtree", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-ar: "Noto Naskh Arabic", "Figtree", serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #12100e;
  --bg-2: #1a1714;
  --paper: #1c1916;
  --ink: #f3ede3;
  --ink-2: #b8a990;
  --line: #2e2a24;
  --line-2: #463f35;
  --terracotta: #e07a3d;
  --terracotta-2: #f0b08a;
  --forest: #7eb7a4;
  --forest-2: #c5e4d8;
  --gold: #d4b57a;
  --gold-2: #f0deba;
  --ok: #7dca9f;
  --warn: #e0a35a;
  --danger: #e07a6d;
  --chat: #f3ede3;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #12100e;
    --bg-2: #1a1714;
    --paper: #1c1916;
    --ink: #f3ede3;
    --ink-2: #b8a990;
    --line: #2e2a24;
    --line-2: #463f35;
    --terracotta: #e07a3d;
    --terracotta-2: #f0b08a;
    --forest: #7eb7a4;
    --forest-2: #c5e4d8;
    --gold: #d4b57a;
    --gold-2: #f0deba;
    --ok: #7dca9f;
    --warn: #e0a35a;
    --danger: #e07a6d;
    --chat: #f3ede3;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { [data-theme="auto"] { color-scheme: dark; } }

body {
  overflow-x: clip;
  background:
    radial-gradient(900px 420px at 8% -10%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, color-mix(in srgb, var(--forest) 14%, transparent), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  min-height: 100vh;
}

html[lang="hi"] body { font-family: "Noto Sans Devanagari", var(--font-ui); }
html[lang="ur"] { direction: rtl; }
html[lang="ur"] body { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.75; }

img { max-width: 100%; display: block; }
/* Locked frames. A new upload cannot change the box — the picture only crops inside it. */
.ph {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--bg-2);
}
.ph-port { aspect-ratio: 4 / 5; }
.ph-land { aspect-ratio: 16 / 10; }
.ph img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center 18%;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-2); }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
button { cursor: pointer; }

.display {
  font-family: var(--font-display);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}
html[lang="ur"] .display { letter-spacing: 0; line-height: 1.25; }

.kicker, .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 10px;
}
html[lang="ur"] .kicker,
html[lang="ur"] .eyebrow { letter-spacing: 0.04em; text-transform: none; }

.lede { color: var(--ink-2); font-size: 18px; max-width: 46ch; }
.tiny { font-size: 12px; color: var(--ink-2); }
.muted { color: var(--ink-2); }

.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.section { padding: 72px 0; }
.section-head { display: grid; gap: 10px; margin-bottom: 32px; max-width: 640px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: start; }
.grid-2.equal { grid-template-columns: 1fr 1fr; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  min-height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; gap: 20px;
  width: min(var(--max), calc(100% - 40px));
  padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; min-width: max-content; cursor: pointer; }
.mark {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover;
  background: var(--paper);
  border: 1px solid var(--line);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1; color: var(--ink); }
.brand-sub {
  display: block; font-family: var(--font-ui); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
  margin-top: 3px; font-weight: 600;
}

.nav { display: flex; gap: 16px; flex: 1; overflow: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); font-size: 14px; font-weight: 550; white-space: nowrap; }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex-wrap: wrap; justify-content: flex-end; }

.lang, .theme-seg {
  display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper);
}
.lang button, .theme-seg button {
  border: 0; background: transparent; padding: 8px 12px; min-height: 44px; font-size: 13px; font-weight: 650;
  cursor: pointer; color: var(--ink-2);
}
.lang button.is-on, .theme-seg button.is-on { background: var(--ink); color: var(--bg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid transparent; padding: 12px 18px;
  min-height: 44px;
  font-weight: 650; font-size: 14px; cursor: pointer;
  transition: transform 160ms var(--ease), background 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terracotta); color: #fffaf2; }
.btn-primary:hover { background: var(--terracotta-2); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--paper); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe57; color: #fff; }
.wa-glyph {
  width: 22px;
  height: 22px;
  flex: none;
  display: block;
}
.btn-wa .wa-glyph { width: 20px; height: 20px; }
.ph img.founder-photo { object-position: center 30%; }
.founder-photo.look-beauty { filter: saturate(1.12) contrast(.94) brightness(1.05); }
.founder-photo.look-professional { filter: saturate(.88) contrast(1.08) brightness(.99); }
.ph.look-beauty::after,
.ph.look-professional::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ph.look-beauty::after {
  background: radial-gradient(circle at 50% 32%, rgba(255, 214, 186, .28), transparent 58%);
}
.ph.look-professional::after {
  background: linear-gradient(180deg, rgba(16, 22, 28, .04), rgba(16, 22, 28, .16));
}
.look-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.look-picks label {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
  background: var(--paper); min-height: 44px;
}
.hero-focus { width: 100%; accent-color: var(--terracotta); }
.studio-layout { display: grid; gap: 14px; align-items: start; }
.studio-stage {
  position: relative;
  width: min(100%, 320px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.studio-stage canvas {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
}
.studio-stage[data-tool="move"] canvas { cursor: grab; }
.studio-stage[data-tool="erase"] canvas { cursor: crosshair; }
.studio-stage[data-tool="restore"] canvas { cursor: cell; }
.studio-stage.look-beauty canvas { filter: saturate(1.12) contrast(.94) brightness(1.05); }
.studio-stage.look-professional canvas { filter: saturate(.88) contrast(1.08) brightness(.99); }
.studio-stage.look-beauty::after,
.studio-stage.look-professional::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.studio-stage.look-beauty::after {
  background: radial-gradient(circle at 50% 32%, rgba(255, 214, 186, .28), transparent 58%);
}
.studio-stage.look-professional::after {
  background: linear-gradient(180deg, rgba(16, 22, 28, .04), rgba(16, 22, 28, .16));
}
.studio-tools { display: grid; gap: 8px; }
.studio-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-picks .btn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.studio-note { margin: 0; }
@media (min-width: 800px) {
  .studio-layout { grid-template-columns: 320px minmax(0, 1fr); }
}
.btn-forest { background: var(--forest); color: #fffaf2; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.hero { padding: 48px 0 12px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero .display { font-size: clamp(36px, 5.2vw, 64px); max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-tail { display: inline-flex; align-items: flex-end; gap: 10px; flex: none; }

.founder-frame {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 10px 16px;
  box-shadow: var(--shadow-lg);
  width: min(100%, 420px);
  max-width: 420px;
  margin-inline: auto;
  justify-self: end;
}
.founder-cap { margin-top: 12px; padding: 0 6px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.founder-cap b { color: var(--ink); font-weight: 650; display: block; }
[data-page="about"] .about-cap-photo { display: none; }
[data-page="about"] .founder-frame.has-photo .about-cap-empty { display: none; }
[data-page="about"] .founder-frame.has-photo .about-cap-photo { display: block; }

.proof {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 16px; overflow: hidden;
}
.proof div { padding: 18px 20px; border-inline-end: 1px solid var(--line); }
.proof div:last-child { border-inline-end: 0; }
.proof strong { display: block; font-family: var(--font-display); font-size: 28px; }
.proof span { color: var(--ink-2); font-size: 13px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  min-height: 100%;
}
.card-kicker { color: var(--forest); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.card-title { font-family: var(--font-display); font-size: 24px; margin: 8px 0 8px; }
.price { font-weight: 700; color: var(--ink); }
.card img.cover { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.card p { color: var(--ink-2); margin: 0 0 12px; }

.masonry { column-count: 3; column-gap: 14px; }
.tile {
  break-inside: avoid; margin: 0 0 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.tile img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.tile-cap { padding: 10px 12px 14px; font-size: 13px; color: var(--ink-2); }
.tile-cap b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }

.magazine { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 22px; }
.feature-story {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.feature-story img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; }
.feature-story .pad { padding: 22px; }
.feature-story h2 { font-family: var(--font-display); font-size: 32px; margin: 6px 0 10px; }
.story-rail { display: grid; gap: 12px; }
.story-rail article {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px;
}
.story-rail img { width: 92px; height: 72px; max-width: 92px; object-fit: cover; border-radius: 6px; }
.story-rail h3 { font-size: 15px; margin: 0 0 4px; }
.journal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.j-filter {
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: 650 13px var(--font-ui);
  min-height: 44px;
}
.j-filter.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.j-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-inline-start: 3px solid var(--gold);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  max-width: 760px;
}
.journal-grid, .journal-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.hero #home-wire.section { padding: 16px 0 8px; }
#home-wire.is-quiet .home-rail { opacity: 0.4; }
#home-wire .home-rail { transition: opacity .45s ease; }
.wire-title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 18ch;
}
html[lang="ur"] .wire-title { letter-spacing: 0; line-height: 1.35; }
#home-wire .section-head, .page-wire .section-head { margin-bottom: 18px; gap: 6px; }
.home-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.home-rail .j-card { min-width: 0; }
.home-rail .j-card img,
.home-rail .j-fallback,
.home-rail .ph { height: auto; }
.home-rail .j-card h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
  min-height: 2.6em;
}
.home-rail .j-card p:not(.j-meta) {
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 5.8em;
}
.home-rail .j-card p.j-meta {
  display: block;
  min-height: 0;
  margin: 0;
  overflow: visible;
  font-size: 14px;
  line-height: 1.45;
}
.page-wire { margin-top: 28px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.pager span { font-weight: 700; color: var(--ink-2); }
.blog-body p { white-space: pre-wrap; }
.j-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  min-height: 100%;
  box-shadow: var(--shadow);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.j-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.j-card.lead { grid-row: span 2; }
.j-card > img, .j-fallback { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; background: var(--bg-2); display: block; }
.j-card .pad { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.j-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--forest); margin: 0; }
.j-card h2, .j-card h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; color: var(--ink); }
.j-card h2 { font-size: 34px; }
.j-card h3 { font-size: 20px; }
.j-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.j-card .more { margin-top: auto; color: var(--terracotta); font-weight: 700; font-size: 13px; }
.journal-article { max-width: 760px; }
.journal-article .display { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; margin: 8px 0 14px; }
.journal-article .ph { margin: 10px 0 18px; border-radius: 16px; }
.ph .j-hero { margin: 0; border-radius: 0; max-height: none; aspect-ratio: auto; }
.j-credit { font-size: 13px; color: var(--ink-2); }
.j-back { font-weight: 700; color: var(--forest); }
.j-fallback {
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, var(--bg-2), transparent 60%),
    repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 12px);
}
.j-fallback span { font-weight: 700; font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2); }

.wiki-desk { display: block; }
.wiki-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin: 8px 0 18px; }
.wiki-search input { flex: 1 1 220px; min-height: 48px; }
.wiki-search input, .field input, .field select, .field textarea, .form input, .form select, .form textarea, input:not([type]), input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], select, textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
textarea { min-height: 110px; resize: vertical; }
@media (min-width: 641px) {
  .wiki-search input,
  .wiki-search select { width: auto; max-width: 100%; min-width: 0; }
  .wiki-search input { flex: 1 1 160px; }
  .wiki-search select { flex: 0 1 auto; }
}
.wiki-result {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.wiki-result h3 { margin: 0 0 8px; font-family: var(--font-display); }
.wiki-result .extract { color: var(--ink-2); }

.desk { display: grid; gap: 18px; min-width: 0; }
.desk > * { min-width: 0; }
.desk-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; flex-wrap: wrap; }
.table { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper); border: 1px solid var(--line); }
.desk-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 16px; }
.desk-nav a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.list-search { min-height: 48px; margin: 0 0 12px; }
.student-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  display: grid;
  gap: 2px;
}
.student-card strong { font-family: var(--font-display); font-size: 22px; }
.student-card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.add-child { padding: 16px; margin-top: 16px; display: grid; gap: 8px; }
@media (min-width: 721px) {
  .add-child { grid-template-columns: 1fr 1fr; }
  .add-child h3, .add-child div { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .students-table { display: none; }
  .student-cards { display: grid; }
}
.table th, .table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 3px 9px; font-size: 12px; font-weight: 700;
  background: var(--bg-2); color: var(--ink);
}
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, var(--paper)); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, var(--paper)); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--danger) 18%, var(--paper)); color: var(--danger); }
.notice {
  border: 1px dashed var(--line-2); background: var(--bg-2);
  padding: 12px 14px; border-radius: var(--r); color: var(--ink-2); font-size: 14px;
}

.chat-dock { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 50; display: grid; justify-items: end; gap: 10px; }
.chat-fab {
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg); cursor: pointer;
}
.chat-fab svg { display: block; }
.chat-panel > header { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; display: grid; gap: 2px; }
.chat-note { font-weight: 550; font-size: 12px; color: var(--ink-2); }
.wa-fab {
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: #128C7E; color: #fff; font-size: 12px; font-weight: 800;
  box-shadow: var(--shadow);
}
.chat-panel {
  width: min(360px, calc(100vw - 28px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
}
.chat-panel.open { display: grid; grid-template-rows: auto 1fr auto; height: 460px; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.chat-log { padding: 12px; overflow: auto; display: grid; gap: 8px; align-content: start; }
.bubble { padding: 9px 12px; border-radius: 12px; font-size: 14px; max-width: 86%; }
.bubble.bot { background: var(--bg-2); }
.bubble.me { background: var(--ink); color: var(--bg); justify-self: end; }
.bubble-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bubble-actions a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px;
  border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 700; font-size: 13px;
  border: 1px solid var(--line);
}
.owner-connect { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chat-thread { display: grid; gap: 6px; margin: 12px 0; }
.chat-thread h3 { margin: 0; font-size: 18px; }
.chat-thread p { margin: 0; color: var(--ink); }

.desk-chats .display { font-size: clamp(36px, 5vw, 56px); margin: 0; }
.inbox-top { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 4px 0 14px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ok);
}
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.inbox {
  display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  min-height: min(640px, calc(100vh - 220px));
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper); overflow: hidden;
}
.inbox-list { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--line); background: var(--bg); }
.inbox-list .list-search { margin: 10px; }
#chat-threads { overflow: auto; flex: 1; min-height: 0; }
.inbox-row {
  display: grid; gap: 2px; width: 100%; text-align: start; cursor: pointer;
  padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--ink);
}
.inbox-row.is-on { background: var(--paper); box-shadow: inset 3px 0 0 var(--terracotta); }
.inbox-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.inbox-row-top strong { font-size: 15px; }
.inbox-row-top time, .inbox-row-sub, .inbox-row-preview { font-size: 13px; color: var(--ink-2); }
.inbox-row-top time { white-space: nowrap; font-size: 12px; }
.inbox-row-sub, .inbox-row-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-wait { justify-self: start; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--terracotta); }
.inbox-pane { display: grid; grid-template-rows: auto minmax(180px, 1fr) auto; min-width: 0; }
.thread-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.thread-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 560; }
.thread-head p, .thread-head .lede { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.inbox-back { display: none; }
.thread-log {
  overflow: auto; padding: 16px; display: grid; gap: 10px; align-content: start;
  background: color-mix(in srgb, var(--bg) 70%, var(--paper));
}
.thread-log .bubble { display: grid; gap: 4px; }
.bubble-who { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; opacity: .72; }
.thread-reply { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: end; }
.thread-reply[hidden] { display: none; }
.thread-reply textarea { flex: 1; min-height: 52px; resize: vertical; }
.inbox-rules { margin-top: 18px; }
.inbox-rules summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }
@media (max-width: 800px) {
  .inbox { grid-template-columns: 1fr; min-height: 72vh; }
  .inbox-pane { display: none; }
  .inbox.has-open .inbox-list { display: none; }
  .inbox.has-open .inbox-pane { display: grid; min-height: 72vh; }
  .inbox-back { display: inline-flex; }
}
.chat-input { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; }

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 80px;
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.footer a, .footer p { color: var(--ink-2); font-size: 14px; display: block; margin: 0 0 6px; }
.legal { margin-top: 28px; font-size: 12px; color: var(--ink-2); display: flex; gap: 16px; flex-wrap: wrap; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 650; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }

.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.video-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.video-card iframe, .video-card video { width: 100%; aspect-ratio: 16/9; border: 0; background: #000; }
.video-card .pad { padding: 12px 14px; }

.timeline { display: grid; gap: 0; }
.timeline article {
  display: grid; grid-template-columns: 88px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.week { font-family: var(--font-display); font-size: 22px; color: var(--terracotta); }

.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 16px; margin-bottom: 8px;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--ink-2); margin: 8px 0 4px; }

.scan-box {
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  padding: 22px;
  text-align: center;
  background: var(--bg-2);
}

.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.socials a {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
  color: var(--ink); font-size: 12px; font-weight: 650;
}

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.split-login { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.page-hero { padding: 36px 0 8px; }
.page-hero .display { font-size: clamp(32px, 5vw, 56px); max-width: 18ch; }

.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.crumbs a { color: var(--ink-2); }

@media (max-width: 980px) {
  .hero-grid, .grid-2, .magazine, .wiki-desk, .footer-grid, .split-login, .pricing-grid { grid-template-columns: 1fr; }
  .hero-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
  .founder-frame { justify-self: center; max-width: min(100%, 280px); }
  .journal-grid { grid-template-columns: 1fr 1fr; }
  .home-rail { grid-template-columns: 1fr 1fr; }
  .j-card.lead { grid-row: auto; }
  .grid-3, .grid-4, .proof, .video-grid, .stat-row { grid-template-columns: 1fr 1fr; }
  .masonry { column-count: 2; }
  .nav { display: none; }
  .nav.mobile-open {
    display: flex;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    top: 72px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
    flex-direction: column;
    gap: 4px;
    z-index: 35;
  }
  .nav.mobile-open a { padding: 12px 4px; min-height: 44px; font-size: 16px; }
  .menu-btn { display: inline-flex; }
  .topbar { position: sticky; }
  .topbar .wrap { position: relative; flex-wrap: wrap; row-gap: 8px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-sub { display: none; }
  .nav-tools { flex: 1 1 100%; width: 100%; margin: 0; justify-content: flex-start; }
  .lang button, .theme-seg button { min-height: 44px; padding: 8px 10px; }
  [data-page="home"] .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 981px) { .menu-btn { display: none; } }
@media (max-width: 640px) {
  .grid-3, .grid-4, .video-grid, .stat-row, .journal-grid { grid-template-columns: 1fr; }
  .proof, .home-rail { grid-template-columns: 1fr 1fr; }
  .masonry { column-count: 1; }
  .hero { padding: 20px 0 4px; }
  .hero .display { font-size: 34px; }
  .section { padding: 36px 0; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .lede { font-size: 16px; }
  .home-rail { gap: 10px; }
  .home-rail .j-card h3 { font-size: 14px; min-height: 0; }
  .home-rail .j-card p:not(.j-meta) { font-size: 13px; -webkit-line-clamp: 3; min-height: 0; }
  #home-wire .home-rail:not(.home-rail-fit) .j-card p:not(.j-meta) {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .home-rail .j-card p.j-meta { font-size: 13px; }
  .home-rail .j-card .pad { padding: 10px 10px 12px; }
  .nav-tools .btn-primary { display: none; }
  #wa-hero { display: none; }
  .proof strong { font-size: 22px; }
  .proof div { padding: 14px 12px; }
}
@media (min-width: 700px) and (max-width: 980px) {
  [data-page="home"] .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 981px) {
  [data-page="programs"] .grid-3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  [data-page="programs"] .grid-3 > .card { grid-column: span 2; }
  [data-page="programs"] .grid-3 > .card:last-child:nth-child(3n + 1) { grid-column: 3 / span 2; }
}
@media (min-width: 641px) and (max-width: 980px) {
  [data-page="programs"] .grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [data-page="programs"] .grid-3 > .card { grid-column: span 2; }
  [data-page="programs"] .grid-3 > .card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
@media (min-width: 981px) {
  [data-page="confidence"] .mini-grid { grid-template-columns: 1fr; }
}
@media (min-width: 981px) {
  #desk-mount .grid-2 { grid-template-columns: 1fr 1fr; }
}
[data-page="addons"] .grid-3 { align-items: start; }
[data-page="addons"] .grid-3 > .card { min-height: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.menu-btn {
  display: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
}
@media (max-width: 980px) { .menu-btn { display: inline-flex; } }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-card { background: var(--paper); border: 1px solid var(--line); padding: 22px; border-radius: var(--r); }
.price-card.featured { border-color: var(--terracotta); box-shadow: var(--shadow); }
.price-card .amt { font-family: var(--font-display); font-size: 32px; margin: 8px 0; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; } }

.letter { background: var(--paper); border: 1px solid var(--line); padding: 28px 32px; font-size: 18px; max-width: 68ch; }
.letter p { margin: 0 0 1em; color: var(--ink-2); }
.hw-drop { border: 1px dashed var(--line-2); padding: 28px; text-align: center; background: var(--bg-2); }
.badge { border: 1px solid var(--gold); color: var(--gold-2); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.login-card { max-width: 440px; margin: 48px auto; background: var(--paper); border: 1px solid var(--line); padding: 28px; border-radius: var(--r); box-shadow: var(--shadow); }
.hidden { display: none !important; }

@media print {
  .topbar, .chat-dock, .footer, .nav-tools { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Benjamin merge: route visibility + WhatsApp fab (Harper contract) */
.route { display: none; }
.route.is-on { display: block; }
.fab-wa {
  position: fixed; left: 18px; z-index: 50;
  width: 56px; height: 56px; padding: 0;
  display: grid; place-items: center;
  background: #25D366; color: #fff;
  border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 10px 24px rgba(18, 110, 70, .28);
}
.fab-wa:hover { background: #1ebe57; color: #fff; }
.fab-wa .wa-glyph { width: 30px; height: 30px; }
#wa-foot {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #25D366; color: #fff;
}
#wa-foot .wa-glyph { width: 20px; height: 20px; }
html[lang="ur"] .fab-wa { left: auto; right: 18px; }
html[lang="ur"] .route { text-align: start; }

/* Permanent layout. One system for desk, phone, and tablet. 2026-10-22 */
html { -webkit-text-size-adjust: 100%; }
body { overflow-wrap: break-word; }
body.nav-lock { overflow: hidden; }
::selection { background: color-mix(in srgb, var(--terracotta) 28%, var(--paper)); color: var(--ink); }

img, video, iframe, svg { max-width: 100%; }
.frame-photo, .card > img, .grid-2 > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
}
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }

.topbar { padding-top: env(safe-area-inset-top); }
.topbar .wrap { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.brand { flex: 1 1 auto; min-width: 0; }
.nav {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  overflow: visible;
  padding: 2px 0 8px;
}
.nav a { padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center; }
.nav-tools { flex: 0 1 auto; flex-wrap: wrap; max-width: 100%; }

label, .student-search { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.form, form.card, .card form, .form-card {
  display: grid;
  gap: 12px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
input, select, textarea { font-size: 16px; min-width: 0; }
input[type="file"] { width: 100%; }
button.card, .split-login .card { width: 100%; text-align: start; }
.student-cards { display: none; list-style: none; margin: 0; padding: 0; gap: 10px; }
.student-search { margin: 0 0 12px; }
.table { display: block; }
.table table { width: 100%; border-collapse: collapse; }
.holiday-table a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
@media (max-width: 640px) {
  .holiday-table { overflow: visible; }
  .holiday-table table, .holiday-table tbody, .holiday-table tr, .holiday-table td { display: block; width: 100%; }
  .holiday-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .holiday-table tr { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
  .holiday-table td { border-bottom: 0; padding: 4px 12px; }
  .holiday-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
    font-weight: 700;
  }
}
.desk .display { font-size: clamp(32px, 5vw, 56px); }
.desk-nav { max-width: 100%; gap: 8px; }
.desk-nav a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.price-card { display: grid; align-content: start; min-width: 0; }
.letter { padding: 22px; }
.chat-input .btn, .thread-reply .btn { flex: none; }
.chat-input input, .thread-reply textarea { min-width: 0; }
.inbox-row.is-on { box-shadow: inset 3px 0 0 var(--terracotta); }
html[lang="ur"] .inbox-row.is-on { box-shadow: inset -3px 0 0 var(--terracotta); }

.chat-dock, .fab-wa {
  bottom: calc(16px + env(safe-area-inset-bottom));
}
.footer { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }

@media (max-width: 980px) {
  .founder-frame { max-width: min(100%, 420px); }
  .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .nav-tools {
    flex: 1 1 100%;
    flex-wrap: wrap;
    overflow: visible;
    justify-content: flex-start;
    gap: 8px;
  }
  .mini-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 981px) {
  .menu-btn { display: none; }
  .topbar .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand tools" "nav nav";
    align-items: center;
    column-gap: 24px;
    row-gap: 0;
  }
  .brand { grid-area: brand; }
  .nav { grid-area: nav; flex: none; }
  .nav-tools { grid-area: tools; margin: 0; justify-content: flex-end; }
}
@media (max-width: 720px) {
  .student-cards { display: grid; }
  .table.students-table { display: none; }
  .form-row, .mini-grid, .timeline article { grid-template-columns: 1fr; }
  .thread-reply { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .nav-tools .btn-ghost { order: 1; margin-inline-start: auto; }
  .nav-tools .btn-primary { order: 2; flex: 1 1 100%; display: inline-flex; }
  .lang button, .theme-seg button { padding-inline: 8px; }
  .hero-actions { display: grid; }
  .hero-actions .btn { width: 100%; }
  body:not(.is-app) .hero-grid > div:first-child { position: relative; }
  body:not(.is-app) .hero-tail {
    position: absolute;
    width: 56px;
    height: 56px;
    inset-inline-end: 0;
    bottom: 8px;
  }
  body:not(.is-app) .hero-tail .chat-dock { position: static; inset: auto; bottom: auto; }
  .fab-wa {
    left: 12px;
    right: auto;
    width: 56px;
    height: 56px;
    padding: 0;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
  html[lang="ur"] .fab-wa { left: auto; right: 12px; }
  .chat-dock {
    inset-inline-end: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .chat-panel { width: min(360px, calc(100% - 24px)); }
  .chat-panel.open {
    position: fixed;
    inset-inline: 8px;
    width: auto;
    top: calc(8px + env(safe-area-inset-top));
    bottom: calc(76px + env(safe-area-inset-bottom));
    height: auto;
    max-height: none;
  }
  .proof strong { font-size: 20px; }
  .proof span { font-size: 12px; }
  .card, .price-card, .letter { padding: 16px; }
}
.thread-head .who { min-width: 0; flex: 1; }
.who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.who-field { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.who-field span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.who-field b { display: block; font-weight: 650; overflow-wrap: anywhere; font-size: 14px; }
@media (max-width: 640px) { .who-grid { grid-template-columns: 1fr; } }
#site-editor {
  position: fixed;
  z-index: 60;
  top: calc(var(--nav-h) + 8px);
  right: 12px;
  left: auto;
  width: min(340px, calc(100% - 24px));
  max-height: calc(100vh - var(--nav-h) - 24px);
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
}
@media (max-width: 800px) {
  #site-editor {
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 38vh;
  }
}
#site-editor.is-collapsed .edit-tools,
#site-editor.is-collapsed .edit-status { display: none; }
.edit-bar, .edit-tools, .edit-pages { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.edit-tools { margin-top: 8px; }
.edit-tools label, .edit-wide { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.edit-wide { flex: 1 1 220px; }
.edit-tools input, .edit-tools select, .edit-tools textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  padding: 8px;
}
.edit-check { display: flex; align-items: center; gap: 6px; }
.edit-pages { margin: 8px 0; }
.edit-pages button, .edit-page-card {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.edit-pages button.is-on { background: var(--ink); color: var(--bg); }
.edit-status, .edit-kicker { flex: 1 1 100%; margin: 0; color: var(--ink-2); font-size: 13px; }
.edit-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.edit-page-card { border-radius: 16px; text-align: start; padding: 14px; }
.edit-page-card strong { display: block; font-family: var(--font-display); font-size: 22px; color: var(--ink); }
body.is-editing [data-edit-key] { cursor: text; }
body.is-editing [data-edit-key]:hover { outline: 1px dashed var(--terracotta); outline-offset: 2px; }
body.is-editing .is-edit-on { outline: 2px solid var(--terracotta); outline-offset: 2px; }
#edit-exit { border: 1px solid var(--terracotta); color: var(--terracotta); font-weight: 700; }
#wa-pick {
  position: fixed;
  z-index: 80;
  width: min(320px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: grid;
  gap: 10px;
}
#wa-pick[hidden] { display: none !important; }
.wa-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-pick-head strong { font-size: 15px; line-height: 1.3; }
#wa-pick p { margin: 0; color: var(--ink-2); font-size: 13px; }
.wa-pick-actions { display: grid; gap: 8px; }
#wa-pick a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 12px;
}
#wa-pick a.wa-app { background: #25D366; color: #fff; }
#wa-pick a.wa-biz { background: #075E54; color: #fff; }

/* Phone and tablet bar: one row. Language, theme, and actions sit in the open menu. */
@media (max-width: 980px) {
  .topbar {
    background: var(--paper);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 10px 28px rgba(26, 23, 20, 0.05);
  }
  .topbar .wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
    row-gap: 0;
  }
  .brand { flex: 1 1 auto; min-width: 0; gap: 10px; }
  .brand > span { min-width: 0; }
  .brand-name {
    display: block;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .menu-btn {
    position: relative;
    z-index: 45;
    margin-inline-start: auto;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(26, 23, 20, 0.06);
  }
  .nav-tools { display: none !important; }
  body.nav-lock .nav-tools {
    display: grid !important;
    position: fixed;
    z-index: 36;
    inset-inline: 0;
    bottom: 0;
    top: auto;
    margin: 0;
    width: auto;
    max-width: none;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    justify-content: stretch;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px rgba(26, 23, 20, 0.06);
  }
  body.nav-lock .nav-tools .lang,
  body.nav-lock .nav-tools .theme-seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }
  body.nav-lock .nav-tools .lang button,
  body.nav-lock .nav-tools .theme-seg button {
    padding-inline: 4px;
    font-size: 12px;
  }
  body.nav-lock .nav-tools .btn-primary,
  body.nav-lock .nav-tools .btn-ghost {
    display: inline-flex;
    grid-column: 1 / -1;
    order: 0;
    margin: 0;
    width: 100%;
    flex: none;
  }
  .nav.mobile-open {
    top: 72px;
    background: var(--paper);
    gap: 0;
    padding: 6px 18px calc(210px + env(safe-area-inset-bottom));
  }
  .nav.mobile-open a {
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 560;
    letter-spacing: -0.02em;
    padding: 13px 2px;
  }
  .nav.mobile-open a.is-active { color: var(--terracotta); }
  body.nav-lock .fab-wa,
  body.nav-lock .chat-dock { visibility: hidden; pointer-events: none; }
  .card, .price-card, .letter {
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(26, 23, 20, 0.05);
  }
  .hero .display { letter-spacing: -0.03em; }
  .section, .route { scroll-margin-top: 80px; }
}
.btn-app { background: var(--ink); color: var(--paper); }
.btn-app:hover { background: var(--terracotta); color: #fff; }
.app-head-link { display: none; }
.app-install-note { display: none; margin: 14px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.app-install-note a { color: var(--terracotta); font-weight: 700; }
.app-tabbar { display: none; }
#app-install {
  position: fixed;
  z-index: 85;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: grid;
  gap: 10px;
}
#app-install[hidden] { display: none !important; }
#app-install p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
#app-install-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
.app-install-url { overflow-wrap: anywhere; font-size: 12px; }
#app-logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--line);
}
body.is-app { min-height: 100dvh; }
body.is-app .topbar { padding-top: env(safe-area-inset-top); }
body.is-app .brand { min-width: 0; }
body.is-app .brand-sub { display: none; }
body.is-app .menu-btn { display: none !important; }
body.is-app .nav { display: none !important; }
body.is-app .app-head-link { display: none !important; }
body.is-standalone .app-download { display: none !important; }
body.is-app:not(.is-standalone) .app-install-note { display: block; }
body.can-install .app-install-note { display: none; }
body.is-app .app-tabbar {
  display: flex;
  position: fixed;
  z-index: 34;
  left: 0;
  right: 0;
  bottom: 0;
  gap: 4px;
  justify-content: space-between;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}
body.is-app .app-tabbar a {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 2px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.is-app .app-tabbar a.is-active { color: var(--terracotta); background: rgba(196, 92, 38, 0.12); }
body.is-app { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
body.is-app .fab-wa,
body.is-app .chat-dock { bottom: calc(84px + env(safe-area-inset-bottom)); }
body.is-app .chat-panel.open { bottom: calc(148px + env(safe-area-inset-bottom)); }
body.is-app .footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.footer a.app-download, .nav a.app-download {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 980px) {
  .app-head-link {
    display: inline-flex;
    flex: none;
    margin-inline-start: auto;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
    font-size: 13px;
    align-items: center;
  }
  .menu-btn { margin-inline-start: 8px; }
  body.nav-lock .nav-tools .app-download {
    display: inline-flex;
    grid-column: 1 / -1;
    width: 100%;
  }
  body.is-app .nav-tools {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    width: auto !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    flex: none;
    gap: 6px;
  }
  body.is-app .nav-tools .theme-seg,
  body.is-app .nav-tools .btn,
  body.is-app .nav-tools .app-download { display: none !important; }
  body.is-app .nav-tools .lang { display: flex !important; width: auto !important; }
  body.is-app .nav-tools .lang button { padding-inline: 8px; }
}
@media (max-width: 800px) {
  body.is-app #site-editor { bottom: calc(148px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .app-head-link { padding-inline: 10px; font-size: 12px; }
}
#save-toast {
  position: fixed;
  z-index: 96;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
#save-toast[hidden] { display: none !important; }
#save-toast.is-error { background: #6b2a1a; }
body.is-app #save-toast { bottom: calc(230px + env(safe-area-inset-bottom)); }

/* Fees. Five prices. Each amount stays on one line, and a short last row sits in the middle. */
@media (max-width: 699px) {
  [data-page="pricing"] .pricing-grid { grid-template-columns: 1fr; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  [data-page="pricing"] .pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [data-page="pricing"] .pricing-grid > .price-card { grid-column: span 2; }
  [data-page="pricing"] .pricing-grid > .price-card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
@media (min-width: 1100px) {
  [data-page="pricing"] .pricing-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  [data-page="pricing"] .pricing-grid > .price-card { grid-column: span 2; }
  [data-page="pricing"] .pricing-grid > .price-card:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
  [data-page="pricing"] .pricing-grid > .price-card:last-child:nth-child(5) { grid-column: 4 / span 2; }
}
#app-install-bar {
  display: none;
  position: fixed;
  z-index: 45;
  left: 12px;
  right: 12px;
  bottom: calc(148px + env(safe-area-inset-bottom));
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
body.is-app:not(.is-standalone) #app-install-bar { display: flex; }
body.install-dismissed #app-install-bar,
body.is-editing #app-install-bar,
body.nav-lock #app-install-bar,
body.is-standalone #app-install-bar { display: none !important; }
#app-install-bar p { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.35; }
#app-install-now {
  flex: none;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
#app-install-dismiss {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-size: 18px;
  cursor: pointer;
}
@media print {
  .app-tabbar, #app-install, #app-install-bar, #save-toast, .app-install-note, .app-head-link { display: none !important; }
}
#app-install-page {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--terracotta);
  font-weight: 700;
}
@media (max-width: 980px) {
  .nav { display: none; }
  .nav.mobile-open {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .nav.mobile-open a {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
  }
}
.brand > .mark {
  flex: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
}
@media (max-width: 400px) {
  .app-head-link { display: none; }
  .brand-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
.hero-fab-slot { position: relative; height: 0; }
@media (max-width: 980px) {
  body:not(.is-app) .hero-fab-slot {
    height: 72px;
    margin: 4px 0 8px;
  }
  body:not(.is-app) .hero-fab-slot .fab-wa,
  body:not(.is-app) .hero-fab-slot .chat-dock {
    position: absolute;
    top: auto;
    bottom: 0;
    margin: 0;
  }
  body:not(.is-app) .hero-fab-slot .fab-wa {
    left: auto;
    right: auto;
    inset-inline-start: 0;
    inset-inline-end: auto;
  }
  body:not(.is-app) .hero-fab-slot .chat-dock {
    left: auto;
    right: auto;
    inset-inline-end: 0;
    inset-inline-start: auto;
  }
}
@media (min-width: 981px) {
  .home-rail.home-rail-fit {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
@media (min-width: 981px) and (max-width: 1360px) {
  body:not(.is-app) .hero-fab-slot {
    height: 72px;
    margin: 4px 0 8px;
  }
  body:not(.is-app) .hero-fab-slot .fab-wa,
  body:not(.is-app) .hero-fab-slot .chat-dock {
    position: absolute;
    top: auto;
    bottom: 0;
    margin: 0;
  }
  body:not(.is-app) .hero-fab-slot .fab-wa {
    left: auto;
    right: auto;
    inset-inline-start: 0;
    inset-inline-end: auto;
  }
  body:not(.is-app) .hero-fab-slot .chat-dock {
    left: auto;
    right: auto;
    inset-inline-end: 0;
    inset-inline-start: auto;
  }
  body:not(.is-app) .hero-fab-slot .chat-panel.open {
    position: fixed;
    inset-inline-end: 18px;
    inset-inline-start: auto;
    width: min(360px, calc(100vw - 36px));
    height: min(460px, calc(100vh - 96px));
    bottom: 18px;
    top: auto;
    z-index: 60;
  }
}
@media (min-width: 641px) {
  #wa-fab { display: none; }
  body:not(.is-app) .hero-grid > div:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 10px;
  }
  body:not(.is-app) .hero-grid > div:first-child > :not(.hero-actions):not(.hero-fab-slot) {
    flex: 1 0 100%;
  }
  body:not(.is-app) .hero-actions { flex: 0 1 auto; }
  body:not(.is-app) .hero-fab-slot { display: none; }
  body:not(.is-app) .hero-tail .chat-dock {
    position: static;
    inset: auto;
    bottom: auto;
  }
  body:not(.is-app) .hero-tail .chat-panel.open {
    position: fixed;
    inset-inline-end: 18px;
    inset-inline-start: auto;
    width: min(360px, calc(100vw - 36px));
    height: min(460px, calc(100vh - 96px));
    bottom: 18px;
    top: auto;
    z-index: 60;
  }
}
#book-form input, #book-form select { min-height: 44px; }
#book-form textarea { min-height: 110px; }
#book-ok .book-send { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* FAQ. The story rail keeps a 92px photograph column. These cards have no photograph. */
[data-page="faq"] .story-rail article {
  grid-template-columns: minmax(0, 1fr);
  padding: 16px 18px;
}
[data-page="faq"] .story-rail h3 { font-size: 18px; line-height: 1.35; }

/* Legal. Three policies shared one full-width block. */
[data-page="legal"] .wrap { max-width: 720px; }
[data-page="legal"] h2 { margin-top: 32px; }

/* Sign in. The desk heading is 56px with a tight line, so the g is cut. The desk menu matches the other forms. */
.login-desk .display { line-height: 1.2; }
#signup-form input, #signup-form select { min-height: 44px; }

/* Student desk. Between 641 and 980 the badges card sat alone on the left. */
@media (min-width: 641px) and (max-width: 980px) {
  .child-desk .grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .child-desk .grid-3 > .card { grid-column: span 2; }
  .child-desk .grid-3 > .card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
.child-desk .display { line-height: 1.2; }
#scan-form input { min-height: 44px; }

/* Parent desk. Same lone badges card, and the child name cut the g. */
@media (min-width: 641px) and (max-width: 980px) {
  .parent-desk .grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .parent-desk .grid-3 > .card { grid-column: span 2; }
  .parent-desk .grid-3 > .card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
.parent-desk .display { line-height: 1.2; }

/* Admin desk. Five cards left the last one, then the last pair, on the left. */
@media (min-width: 641px) and (max-width: 980px) {
  .admin-desk .grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-desk .grid-3 > .card { grid-column: span 2; }
  .admin-desk .grid-3 > .card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
@media (min-width: 981px) {
  .admin-desk .grid-3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .admin-desk .grid-3 > .card { grid-column: span 2; }
  .admin-desk .grid-3 > .card:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
  .admin-desk .grid-3 > .card:last-child:nth-child(5) { grid-column: 4 / span 2; }
}
.admin-desk .display { line-height: 1.2; }
.admin-desk select,
.admin-desk input[type="date"],
.admin-desk input[type="file"] { min-height: 44px; }
@media (max-width: 479px) {
  .admin-desk .edit-page-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-desk .edit-page-grid > .card { grid-column: span 2; }
  .admin-desk .edit-page-grid > .card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
