/* ============================================================
   shell.css — sidebar app shell design system
   terracotta ground · cream panels · navy · muted gold
   Shared by index.html and begin.html (and any future page
   that adopts the sidebar shell).
   ============================================================ */
:root{
  --terra:      #a25e44;   /* the wall behind everything */
  --terra-deep: #8d4f38;
  --cream:      #ffffff;   /* structural canvas */
  --cream-2:    #edf1f3;   /* cool recessed panel */
  --white:      #ffffff;   /* raised and reading panels */
  --focus-blue: #dceff2;   /* current course focus */
  --navy:       #1d2a44;   /* deep blue — headings, sidebar accents */
  --gold:       #b99753;   /* muted gold — earned things only */
  --gold-soft:  #d8c69a;
  --rust:       #a8542f;   /* terracotta accent — actions, progress */
  --ink:        #2a2620;
  --ink-soft:   #68737d;
  --line:       #d5dde2;

  --serif: Cambria, "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --gk: "Palatino Linotype", Palatino, Georgia, serif;
  --ui: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
}
*{ box-sizing:border-box; margin:0; padding:0; }
html,body{
  background:var(--terra);
  color:var(--ink);
  font-family:var(--serif);
  line-height:1.5;
}

/* ================= APP FRAME ================= */
.frame{
  max-width:1240px; margin:34px auto; padding:0;
  background:var(--cream);
  box-shadow:0 40px 80px -40px rgba(30,20,12,0.55);
  display:grid;
  grid-template-columns:250px 1fr;
  min-height:calc(100vh - 68px);
}

/* ================= SIDEBAR ================= */
.side{
  background:var(--white);
  border-right:1px solid var(--line);
  padding:34px 28px;
  display:flex; flex-direction:column;
}
.brand{ display:flex; align-items:center; gap:12px; margin-bottom:44px; }
.brand svg, .brand-logo{ width:34px; height:38px; flex:0 0 auto; object-fit:contain; }
.brand .nm{
  font-family:var(--serif); font-size:15px; font-weight:700; color:var(--navy);
  line-height:1.15; letter-spacing:0.01em;
}

.nav{ display:flex; flex-direction:column; gap:2px; }
.nav a{
  font-family:var(--serif); font-size:21px; color:var(--ink);
  text-decoration:none; padding:9px 12px; border-radius:4px;
  display:flex; align-items:center; gap:12px;
}
.nav a svg{ width:20px; height:22px; opacity:0.75; flex:0 0 auto; }
.nav a:hover{ background:var(--cream); }
.nav a.on{
  background:var(--cream-2); color:var(--navy); font-weight:700;
}
.nav a.on svg{ opacity:1; }
.nav a.inert{ opacity:0.4; cursor:default; pointer-events:none; }

.side-foot{
  margin-top:auto; padding-top:26px; border-top:1px solid var(--line);
}
.side-foot .figs{ display:flex; gap:16px; margin-bottom:12px; }
.side-foot svg{ width:22px; height:27px; }
.fig-bronze{ color:var(--gold); }
.fig-plaster{ color:var(--ink-soft); }
.side-foot p{
  font-size:11.5px; line-height:1.5; color:var(--ink-soft); font-style:italic;
}
.side-foot p b{ color:var(--rust); font-style:normal; }

.glyph{ stroke:currentColor; fill:none; stroke-width:1.5; }
.glyph .accent{ fill:currentColor; stroke:none; }

/* ================= MAIN ================= */
.main{ padding:0; display:flex; flex-direction:column; }

/* --- welcome band --- */
.welcome{
  padding:42px 46px 34px;
  border-bottom:1px solid var(--line);
  background:var(--white);
  display:flex; justify-content:space-between; align-items:flex-end; gap:30px;
  position:relative;
}
.account-greeting{
  margin-bottom:7px;
  font-family:var(--ui);
  font-size:12px;
  color:var(--ink-soft);
}
.welcome-emblem{
  width:78px; height:86px; margin-left:auto; margin-right:22px;
  overflow:visible;
}
.homepage-welcome:after{ right:116px; }
.welcome:after{
  content:"λεύκωμα"; position:absolute; top:14px; right:20px;
  font-family:var(--gk); font-size:11px; color:var(--ink-soft); font-style:italic; opacity:0.7;
}
.welcome h1{
  font-family:var(--serif); font-size:38px; font-weight:700;
  color:var(--navy); letter-spacing:-0.01em; line-height:1.05;
}
.welcome .eyebrow{
  font-family:var(--ui); font-size:10px; font-weight:700; letter-spacing:0.28em;
  text-transform:uppercase; color:var(--rust); margin-bottom:12px;
}
.welcome .right{ text-align:right; flex:0 0 auto; }
.welcome .right .n{
  font-family:var(--serif); font-size:40px; font-weight:700; color:var(--gold);
  line-height:0.9;
}
.welcome .right .l{
  font-family:var(--ui); font-size:10px; font-weight:700; letter-spacing:0.16em;
  text-transform:uppercase; color:var(--ink-soft); margin-top:6px;
}
.welcome-subtitle{
  margin-top:10px; font-family:var(--gk); font-size:17px;
  color:var(--ink-soft); font-style:italic;
}

/* --- current focus: a full-width band, not an inset card ---
   (matches .welcome/.collection/.treatises: no side margin, no
   radius — a section of the page, not a floating box on it) */
.focus{
  background:var(--focus-blue); border-bottom:1px solid var(--line);
  padding:26px 46px 28px;
}
.focus .track{ height:10px; }
.focus .hd{
  display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px;
}
.focus h2{ font-family:var(--serif); font-size:24px; font-weight:700; color:var(--navy); }
.focus .stage{
  font-family:var(--ui); font-size:10px; font-weight:700; letter-spacing:0.14em;
  text-transform:uppercase; color:var(--ink-soft);
}
.focus .stage b{ color:var(--rust); }
.focus .what{
  font-size:15px; color:var(--ink-soft); font-style:italic; margin-bottom:16px;
}
.track{
  height:8px; background:var(--white); border-radius:4px; overflow:hidden;
}
.track i{ display:block; height:100%; width:33%; background:var(--rust); border-radius:4px; }
.focus .foot{
  display:flex; justify-content:space-between; align-items:center; margin-top:16px;
}
.focus .foot .pct{
  font-family:var(--ui); font-size:11px; color:var(--ink-soft);
}
.btn{
  font-family:var(--serif); font-size:15px; font-weight:700;
  background:var(--rust); color:var(--white); border:0; border-radius:4px;
  padding:10px 22px; cursor:pointer; text-decoration:none; display:inline-block;
}
.btn:hover{ background:var(--terra-deep); }
.btn.ghost{
  background:transparent; color:var(--rust); border:1px solid var(--rust);
}
.btn.ghost:hover{ background:var(--cream-2); }

/* --- the quote --- */
.quote{
  margin:22px 46px 0; padding:20px 28px 22px;
  border-left:4px solid var(--gold); background:var(--cream-2); border-radius:0 6px 6px 0;
}
.quote p{ font-family:var(--gk); font-size:16px; line-height:1.55; color:var(--ink); }
.quote .attr{
  margin-top:10px; font-family:var(--ui); font-size:9.5px; font-weight:700;
  letter-spacing:0.16em; text-transform:uppercase; color:var(--ink-soft);
}
.quote .attr b{ color:var(--rust); }

/* ================= SCROLL COLLECTION — the terracotta band ================= */
.collection{
  margin-top:34px; background:var(--terra); padding:34px 46px 40px;
}
.collection .hd{
  display:flex; align-items:center; gap:14px; margin-bottom:26px;
}
.collection .hd svg{ width:26px; height:30px; color:var(--gold-soft); }
.collection h2{
  font-family:var(--serif); font-size:26px; font-weight:700; color:var(--cream);
}
.collection .hd .cite{
  font-family:var(--gk); font-size:12px; font-style:italic; color:var(--gold-soft); opacity:0.9;
}
.collection .hd .count{
  margin-left:auto; font-family:var(--ui); font-size:11px; font-weight:700;
  letter-spacing:0.1em; text-transform:uppercase; color:var(--cream); opacity:0.85;
}
.collection .hd .count b{ color:var(--gold-soft); }
.collection-requirement{
  display:none; flex:1 1 auto; min-width:0; min-height:30px; align-items:baseline; gap:14px;
  color:var(--cream);
}
.collection .hd.is-showing-requirement > h2,
.collection .hd.is-showing-requirement > .cite,
.collection .hd.is-showing-requirement > .count{ display:none; }
.collection .hd.is-showing-requirement .collection-requirement{ display:flex; }
.collection-requirement strong{ font-family:var(--serif); font-size:26px; color:var(--cream); }
.collection-requirement > span:last-child{
  margin-left:0; font-family:var(--ui); font-size:11px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:var(--cream); opacity:.85;
}

/* the shelf: bins on one plank — restyled as cards on the band */
.shelf{ display:flex; flex-wrap:wrap; row-gap:2.4rem; }
.bin{ display:flex; flex-direction:column; align-items:center; }
.rolls{
  display:grid; justify-content:center; align-content:end;
  gap:5px; padding:6px 15px 9px;
  box-sizing:border-box;
  height:92px;
  border-bottom:3px solid var(--gold);
}
.bin + .bin .rolls{ border-left:1px dashed rgba(243,239,230,0.3); }
.rolls.c1{ width:64px; grid-template-columns:repeat(1, 32px); }
.rolls.c4{ width:178px; grid-template-columns:repeat(4, 32px); }

.roll{ width:32px; height:32px; }
.roll .reserve{ fill:none; stroke:var(--cream); stroke-width:1.1; stroke-dasharray:2.6 2.2; opacity:0.5; }
.roll .relief{ fill:none; stroke:var(--cream); stroke-width:1; stroke-dasharray:2.6 2.2; opacity:0.35; }
.roll .core{ fill:var(--cream); opacity:0.45; }
.roll .bk{ font-family:var(--gk); font-size:9px; font-weight:bold; fill:var(--cream); opacity:0.55; }
.scroll-target{
  cursor:pointer; outline:none; transform-origin:center;
  transition:transform .18s ease, filter .18s ease;
}
.scroll-target:hover,
.scroll-target:focus-visible,
.scroll-target.is-previewed{
  transform:translateY(-5px) rotate(-5deg) scale(1.16);
  filter:drop-shadow(0 5px 4px rgba(23,19,15,.35));
}
.scroll-target:hover .reserve,
.scroll-target:focus-visible .reserve,
.scroll-target.is-previewed .reserve{
  stroke:var(--gold-soft); opacity:1; stroke-dasharray:none;
}
.scroll-target:hover .relief,
.scroll-target:focus-visible .relief,
.scroll-target.is-previewed .relief{
  stroke:var(--gold-soft); opacity:.8; stroke-dasharray:none;
}
.two-book-stack .roll:nth-child(1){ grid-row:2; }
.two-book-stack .roll:nth-child(2){ grid-row:1; }
.topic-book-stack .roll:nth-child(1){ grid-column:1; grid-row:2; }
.topic-book-stack .roll:nth-child(2){ grid-column:1; grid-row:1; }
.topic-book-stack .roll:nth-child(3){ grid-column:2; grid-row:2; }
.topic-book-stack .roll:nth-child(4){ grid-column:2; grid-row:1; }
.topic-book-stack .roll:nth-child(5){ grid-column:3; grid-row:2; }
.topic-book-stack .roll:nth-child(6){ grid-column:3; grid-row:1; }
.topic-book-stack .roll:nth-child(7){ grid-column:4; grid-row:2; }
.topic-book-stack .roll:nth-child(8){ grid-column:4; grid-row:1; }
/* EARNED: gold on the terracotta, relief cut back in navy */
.roll.earned .reserve{ fill:var(--gold); stroke:var(--gold); stroke-dasharray:none; opacity:1; }
.roll.earned .relief{ stroke:var(--navy); stroke-width:1.2; stroke-dasharray:none; opacity:1; }
.roll.earned .core{ fill:var(--navy); opacity:1; }
.roll.earned .bk{ fill:var(--navy); opacity:1; }

.titulus{
  position:relative; margin-top:16px; width:60px;
  font-family:var(--ui); font-size:10px; font-weight:700;
  padding:5px 4px; text-align:center; line-height:1.3; border-radius:3px;
  white-space:normal; word-break:keep-all;
}
.titulus::before{
  content:""; position:absolute; left:50%; top:-16px; height:16px;
  border-left:1px solid var(--gold-soft); opacity:0.6;
}
.titulus.earned{ background:var(--gold); color:var(--navy); }
.titulus.locked{ background:transparent; color:var(--cream); border:1px dashed rgba(243,239,230,0.4); }
@media (prefers-reduced-motion:reduce){
  .scroll-target{ transition:none; }
}

/* ================= TREATISES ================= */
.treatises{ padding:38px 46px 46px; }
.treatises .hd{
  display:flex; align-items:center; gap:14px; margin-bottom:0;
  padding-bottom:12px; border-bottom:2px solid var(--navy);
}
.treatises .hd svg{ width:26px; height:30px; color:var(--rust); }
.treatises h2{
  font-family:var(--serif); font-size:26px; font-weight:700; color:var(--navy);
}
.treatises .hd .cite{
  font-family:var(--gk); font-size:12px; font-style:italic; color:var(--ink-soft);
}

.cards{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.card{
  background:var(--white); border:1px solid var(--line); border-radius:6px;
  padding:22px 24px; text-decoration:none; color:inherit;
  display:flex; flex-direction:column; gap:0;
  position:relative;
}
.card.open{ border-top:4px solid var(--rust); cursor:pointer; }
.card.open:hover{ box-shadow:0 14px 30px -22px rgba(30,20,12,0.5); }
.card.closed{ border-top:4px solid var(--line); opacity:0.65; }

.card .no{
  position:absolute; top:18px; right:20px;
  font-family:var(--serif); font-size:26px; font-weight:700; color:var(--cream-2);
}
.card.open .no{ color:var(--gold-soft); }
.card h3{
  font-family:var(--serif); font-size:23px; font-weight:700; color:var(--navy);
  letter-spacing:-0.01em;
}
.card .el{ font-family:var(--gk); font-size:15px; color:var(--rust); margin-top:2px; }
.card .sub{
  font-size:13px; font-style:italic; color:var(--ink-soft); margin-top:10px;
}
.card .foot{
  margin-top:18px; padding-top:14px; border-top:1px solid var(--line);
  display:flex; justify-content:space-between; align-items:center;
}
.pips{ display:flex; gap:3px; align-items:center; }
.pip{ width:14px; height:14px; }
.pip circle{ fill:none; stroke:var(--ink-soft); stroke-width:1.1; opacity:0.4; }
.pip.earned .p-body{ fill:var(--gold); stroke:var(--gold); opacity:1; }
.pip.earned .p-line{ stroke:var(--navy); opacity:1; }
.pip.earned circle:first-child{ fill:var(--gold); stroke:var(--gold); opacity:1; }
.pip.earned circle:not(:first-child){ stroke:var(--navy); opacity:1; }
.pip-count{
  font-family:var(--ui); font-size:9.5px; font-weight:700; letter-spacing:0.1em;
  text-transform:uppercase; color:var(--ink-soft); margin-left:8px;
}
.cta{
  font-family:var(--ui); font-size:10px; font-weight:700; letter-spacing:0.14em;
  text-transform:uppercase; color:var(--rust);
}
.cta.muted{ color:var(--ink-soft); }

/* ================= BEGIN PAGE ================= */
.masthead{
  padding:46px 54px 40px; background:var(--focus-blue); color:var(--navy);
  position:relative; overflow:hidden;
}
.masthead .eyebrow{
  font-family:var(--ui); font-size:10px; font-weight:700; letter-spacing:0.28em;
  text-transform:uppercase; color:var(--rust); margin-bottom:14px;
}
.masthead h1{ font-size:44px; font-weight:700; letter-spacing:-0.01em; }
.masthead .greek{ font-family:var(--gk); font-size:18px; color:var(--ink-soft); margin-top:8px; }
.masthead .key{
  position:absolute; left:0; right:0; bottom:0; height:8px;
  background:repeating-linear-gradient(90deg, var(--gold) 0 2px, transparent 2px 6px, var(--gold) 6px 8px, transparent 8px 16px);
  opacity:0.5;
}

.body{ padding:44px 54px 54px; max-width:760px; }

.account-sync{
  margin-top:28px;
  padding:18px 20px;
  border:1px solid var(--line);
  background:var(--white);
  border-radius:6px;
}
.account-sync h3{
  font-family:var(--ui);
  font-size:12px;
  font-weight:700;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--navy);
  margin-bottom:8px;
}
.account-sync p{
  font-size:14px;
  color:var(--ink-soft);
  margin-bottom:10px;
}
.account-sync .sync-row{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.account-sync input{
  flex:1 1 240px;
  min-width:210px;
  border:1px solid var(--line);
  border-radius:4px;
  background:var(--cream);
  color:var(--ink);
  padding:9px 10px;
  font-family:var(--ui);
  font-size:13px;
}
.account-sync .btn{
  font-size:14px;
  padding:9px 14px;
}
.account-sync .sync-meta{
  margin-top:8px;
  font-family:var(--ui);
  font-size:11px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--ink-soft);
}

.account-page-body{
  max-width:760px;
}

.account-card{
  border:1px solid var(--line);
  border-top:4px solid var(--rust);
  padding:30px;
  margin-bottom:20px;
  background:var(--white);
}

.account-card[hidden]{ display:none; }

.account-card h2,
.account-privacy h2{
  margin:8px 0 12px;
  font-size:25px;
  color:var(--navy);
}

.account-form{ margin-top:22px; }

.account-form label{
  display:block;
  margin-bottom:8px;
  color:var(--navy);
  font-weight:700;
}

.account-form-row{
  display:flex;
  gap:10px;
  align-items:stretch;
}

.account-form input{
  flex:1 1 300px;
  min-width:0;
  border:1px solid var(--line);
  padding:12px 14px;
  background:#fff;
  color:var(--ink);
  font:inherit;
}

.account-message{
  min-height:24px;
  margin:18px 0 30px;
  padding:12px 14px;
  border-left:4px solid var(--gold);
  background:var(--focus-blue);
  color:var(--navy);
}

.account-message:empty{ display:none; }
.account-message[data-state="error"]{ border-left-color:var(--rust); }
.account-message[data-state="saved"],
.account-message[data-state="success"]{ border-left-color:#3d5f3b; }

.account-privacy{
  border-top:1px solid var(--line);
  padding-top:20px;
}

.epigraph{
  border-left:4px solid var(--gold); padding:6px 0 6px 26px; margin-bottom:40px;
}
.epigraph p{ font-family:var(--gk); font-size:21px; line-height:1.55; color:var(--ink); }
.epigraph .attr{
  margin-top:14px; font-family:var(--ui); font-size:10px; font-weight:700;
  letter-spacing:0.16em; text-transform:uppercase; color:var(--ink-soft);
}
.epigraph .attr b{ color:var(--rust); }

.body h2{
  font-size:15px; font-weight:700; color:var(--navy);
  text-transform:uppercase; font-family:var(--ui); letter-spacing:0.14em;
  margin:36px 0 16px; padding-bottom:10px; border-bottom:1px solid var(--line);
}
.body p{ font-size:16px; line-height:1.65; margin-bottom:16px; color:var(--ink); }
.body p b{ color:var(--navy); }
.body sup{
  font-size:.72em;
  line-height:0;
  vertical-align:super;
}
.body sup a{
  color:var(--rust);
  text-decoration:none;
  font-weight:700;
}
.begin-source-notes{
  margin:28px 0 34px;
  border:1px solid var(--line);
  background:var(--cream-2);
}
.begin-source-notes summary{
  cursor:pointer;
  padding:14px 18px;
  color:var(--navy);
  font-family:var(--ui);
  font-size:12px;
  font-weight:700;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.begin-source-notes ol{
  margin:0;
  padding:4px 38px 22px 52px;
}
.begin-source-notes li{
  margin:0 0 12px;
  color:var(--ink-soft);
  font-size:13px;
  line-height:1.55;
}

.stages{ display:grid; gap:12px; margin:20px 0 8px; }
.stg{
  display:flex; gap:18px; align-items:flex-start;
  background:var(--white); border:1px solid var(--line); border-radius:6px; padding:18px 22px;
}
.stg .n{
  font-family:var(--serif); font-size:30px; font-weight:700; color:var(--gold-soft);
  line-height:1; flex:0 0 auto; width:40px;
}
.stg h3{ font-size:19px; font-weight:700; color:var(--navy); }
.stg .gk{ font-family:var(--gk); font-size:14px; color:var(--rust); margin:1px 0 6px; }
.stg p{ font-size:13.5px; line-height:1.5; color:var(--ink-soft); margin:0; }

.begin-cta{ margin-top:38px; display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.begin-cta .note{ font-size:13px; font-style:italic; color:var(--ink-soft); }

/* ================= TREATISES PAGE (SHELL) ================= */
.treatises-shell{
  background:var(--cream);
}
.treatises-shell .welcome{
  border-bottom:1px solid var(--line);
}
.treatises-shell .focus{
  background:var(--focus-blue);
}

/* ================= CATEGORIES TREATISE ================= */
.categories-detail .inner{ padding:0 46px 46px; }
.categories-detail .breadcrumb{ margin:24px 0 14px; }
.categories-detail .breadcrumb a{
  font-family:var(--ui); font-size:11px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:var(--rust); text-decoration:none;
}
.categories-detail .leukoma{
  background:var(--white); border:1px solid var(--line); border-top:4px solid var(--rust);
  padding:34px 38px; position:relative;
}
.categories-detail .leukoma-tag{
  position:absolute; top:12px; right:16px; font-family:var(--gk);
  font-size:11px; font-style:italic; color:var(--ink-soft);
}
.categories-detail .hero-eyebrow{
  font-family:var(--ui); font-size:10px; font-weight:700; letter-spacing:.2em;
  text-transform:uppercase; color:var(--rust); text-align:center;
}
.categories-detail .hero-title{ margin-top:8px; font-size:42px; color:var(--navy); text-align:center; }
.categories-detail .hero-rule{ width:64px; border-top:2px solid var(--gold); margin:18px auto; }
.categories-detail .hero-intro{ max-width:620px; margin:auto; text-align:center; font-size:16px; }
.categories-detail .hero-intro-secondary{ margin-top:10px; color:var(--ink-soft); font-size:14px; }
.categories-detail .hero-cite{
  margin-top:12px; text-align:center; font-family:var(--ui); font-size:10px;
  letter-spacing:.12em; text-transform:uppercase; color:var(--ink-soft);
}
.categories-detail .trophy-note{
  display:flex; align-items:center; justify-content:center; gap:12px;
  margin:24px auto 0; padding-top:18px; border-top:1px solid var(--line);
}
.categories-detail .trophy-note .roll{ width:30px; height:30px; }
.categories-detail .trophy-note .roll .reserve,
.categories-detail .trophy-note .roll .relief{ stroke:var(--rust); }
.categories-detail .trophy-note .roll .core{ fill:var(--rust); }
.categories-detail .trophy-note-text{ font-size:13px; color:var(--ink-soft); }
.categories-detail .trophy-note-status{
  display:block; font-family:var(--ui); font-size:9px; letter-spacing:.1em;
  text-transform:uppercase;
}
.categories-detail .section{ margin-top:34px; }
.categories-detail .section-head{
  display:flex; align-items:center; gap:14px; padding-bottom:12px;
  border-bottom:2px solid var(--navy); margin-bottom:20px;
}
.categories-detail .section-head .mark{ color:var(--rust); line-height:0; }
.categories-detail .section-head .mark svg{ width:26px; height:30px; }
.categories-detail .section-head h2{ font-size:26px; color:var(--navy); }
.categories-detail .head-cite{ font-family:var(--gk); font-size:12px; font-style:italic; color:var(--ink-soft); }
.mode-toggle-wrap{ display:flex; flex-direction:column; align-items:center; margin:0 0 24px; }
.mode-toggle{
  display:flex; border:1px solid var(--line); border-radius:4px;
  background:var(--white); overflow:hidden;
}
.mode-btn{
  border:0; background:transparent; padding:8px 14px; color:var(--ink-soft);
  cursor:pointer; font-family:var(--ui);
}
.mode-btn + .mode-btn{ border-left:1px solid var(--line); }
.mode-btn-en{ display:block; font-size:10px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.mode-btn-gr{ display:block; font-family:var(--gk); font-size:10px; font-style:italic; }
.mode-btn.active{ background:var(--rust); color:var(--white); }
.mode-note{ margin-top:6px; font-size:11px; color:var(--ink-soft); }
.mode-warning{
  max-width:560px; margin-top:8px; padding:8px 10px;
  border-left:3px solid var(--rust); background:var(--white);
  font-family:var(--ui); font-size:11px; color:var(--rust);
}
.mode-toggle-home{
  margin:20px 0 22px; padding:18px 22px;
  border:1px solid var(--line); background:var(--white);
}
.categories-detail .card-cta{
  font-family:var(--ui); font-size:10px; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; color:var(--rust);
}
.categories-detail .card-cta.muted{ color:var(--ink-soft); }

/* ================= CHAPTER LESSON ================= */
.lesson-detail{
  --paper:var(--cream);
  --paper2:var(--cream-2);
  --card:var(--white);
  --accent-color:var(--rust);
  --gold-soft:var(--line);
  --shadow:none;
}
.lesson-detail .page{
  width:100%; max-width:none; margin:0; padding:26px 46px 46px;
}
.lesson-detail .breadcrumb{ margin-bottom:14px; }
.lesson-detail .breadcrumb a{
  font-family:var(--ui); font-size:11px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:var(--rust);
}
.lesson-detail .hero{
  margin:0 0 22px; padding:30px 34px;
  border:1px solid var(--line); border-top:4px solid var(--rust);
  background:var(--white); text-align:left;
}
.lesson-detail .hero .eyebrow{
  font-family:var(--ui); font-size:10px; letter-spacing:.2em; color:var(--rust);
}
.lesson-detail .hero h1{ font-family:var(--serif); font-size:36px; color:var(--navy); }
.lesson-detail .hero .intro{ max-width:620px; margin:8px 0 0; color:var(--ink-soft); }
.lesson-detail .card,
.lesson-detail .before-card,
.lesson-detail .exercise-card{
  border:1px solid var(--line); border-radius:4px; background:var(--white); box-shadow:none;
}
.lesson-detail .card{ padding:26px 30px; }
.lesson-detail .card + .card{ margin-top:18px; }
.lesson-detail .lesson-section,
.lesson-detail .before-block,
.lesson-detail .context-box{ border-color:var(--line); background:var(--cream); }
.lesson-detail .passage-card,
.lesson-detail .greek-term-card,
.lesson-detail .context-passage-card{ border-color:var(--line); background:var(--white); }
.lesson-detail .primary-action{ background:var(--rust); color:var(--white); }
.lesson-detail .primary-action:hover{ background:var(--terra-deep); }
.lesson-detail .progress-fill{ background:var(--rust); }
.lesson-detail .choice-bubble:hover:not(:disabled){ border-color:var(--rust); }
.lesson-detail .exercise-heading,
.lesson-detail h2,
.lesson-detail h3,
.lesson-detail h4{ color:var(--navy); }
.lesson-detail .lesson-mode-toggle{ margin-bottom:18px; }
.chapter-list{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.chapter-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:6px;
  padding:14px 16px;
  text-decoration:none;
  color:inherit;
}
.chapter-row.open{
  border-top:4px solid var(--rust);
}
.chapter-row.open:hover{
  box-shadow:0 14px 30px -22px rgba(30,20,12,0.5);
}
.chapter-row.closed{
  opacity:0.66;
}
.chapter-main{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
.chapter-num{
  font-family:var(--serif);
  font-size:22px;
  font-weight:700;
  color:var(--gold-soft);
  min-width:22px;
  line-height:1.1;
}
.chapter-title{
  font-family:var(--serif);
  font-size:19px;
  font-weight:700;
  color:var(--navy);
}
.chapter-bekker{
  margin-top:3px;
  font-family:var(--gk);
  font-size:13px;
  color:var(--ink-soft);
}
.chapter-side .cta{
  white-space:nowrap;
}

@media (max-width:980px){
  .frame{ grid-template-columns:1fr; margin:0; min-height:100vh; }
  .side{ flex-direction:row; align-items:center; gap:20px; padding:16px 20px; flex-wrap:wrap; }
  .brand{ margin-bottom:0; }
  .nav{ flex-direction:row; gap:6px; flex-wrap:wrap; }
  .nav a{ font-size:15px; padding:7px 10px; }
  .side-foot{ display:none; }
  .welcome{ padding:26px 22px; flex-direction:column; align-items:flex-start; gap:16px; }
  .welcome h1{ font-size:30px; }
  .welcome-emblem{ position:absolute; right:18px; top:18px; width:58px; height:64px; opacity:.8; }
  .homepage-welcome:after{ display:none; }
  .focus{ padding:22px 22px 24px; }
  .quote{ margin-left:22px; margin-right:22px; }
  .collection{ padding:26px 22px 32px; }
  .collection-requirement{ flex-wrap:wrap; gap:4px 10px; }
  .collection-requirement strong{ font-size:22px; }
  .collection-requirement > span:last-child{ width:auto; margin-left:0; }
  .treatises{ padding:28px 22px; }
  .cards{ grid-template-columns:1fr; }
  .rolls.c4{ width:158px; grid-template-columns:repeat(4, 28px); }
  .rolls.c1{ grid-template-columns:repeat(1, 28px); }
  .roll{ width:28px; height:28px; }
  .rolls{ height:82px; }
  .masthead{ padding:30px 22px; }
  .masthead h1{ font-size:32px; }
  .body{ padding:30px 22px; }
  .account-sync input{ min-width:100%; }
  .account-form-row{ flex-direction:column; }
  .categories-detail .inner{ padding:0 22px 32px; }
  .categories-detail .leukoma{ padding:28px 22px; }
  .categories-detail .hero-title{ font-size:34px; }
  .mode-toggle-home{ margin:18px 0 20px; }
  .lesson-detail .page{ padding:20px 22px 32px; }
  .lesson-detail .hero{ padding:24px 22px; }
  .lesson-detail .card{ padding:20px; }
}
