/* Hidden Pattern Studio — landing page (light: ivory, white, gold) */

:root {
  color-scheme: only light;
  --ivory: #F3F1EB;
  --white: #FFFFFF;
  --sand: #E6E0D1;
  --sand-soft: #EFEAE0;
  --line: #E6E0D1;
  --line-gold: #D8C9A3;
  --title: #564316;
  --gold: #856A27;
  --gold-hover: #6F5820;
  --gold-tint: #F6F0E1;
  --text: #3B3327;
  --muted: #675E50;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cjk: 'Noto Serif SC', 'Songti SC', 'SimSun', 'Microsoft YaHei', serif;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(86, 67, 22, 0.06);
  --shadow: 0 1px 2px rgba(86, 67, 22, 0.05), 0 10px 30px rgba(86, 67, 22, 0.07);
  --shadow-lg: 0 2px 4px rgba(86, 67, 22, 0.05), 0 24px 60px rgba(86, 67, 22, 0.12);
  --header-h: 72px;

  --wood: #3E6A3A;   --wood-bg: #EDF3EA;
  --fire: #A2402D;   --fire-bg: #F8ECE8;
  --earth: #8A6524;  --earth-bg: #F6EFE1;
  --metal: #59616B;  --metal-bg: #EEF0F2;
  --water: #2D5B7B;  --water-bg: #E8F0F6;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--ivory);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
h1, h2, h3, h4 { margin: 0; color: var(--title); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[lang="zh"] { font-family: var(--cjk); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.ico {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* lining figures for prices and numbers in the serif */
.price strong, .stage-no, .module-price, .no, .n { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 12px 22px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.25;
  text-align: center; text-decoration: none;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 6px 18px rgba(133, 106, 39, 0.22); }
.btn-primary:hover { background: var(--gold-hover); }
.btn-secondary { background: var(--white); color: var(--title); border-color: var(--line-gold); }
.btn-secondary:hover { border-color: var(--gold); background: var(--gold-tint); }
.btn-primary:focus-visible { outline-color: var(--title); }
.btn-sm { min-height: 40px; padding: 9px 18px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.link-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  padding: 6px 0; border: 0; background: none; cursor: pointer;
  color: var(--gold); font-weight: 600; font-size: 15px;
}
.link-btn:hover { color: var(--gold-hover); text-decoration: underline; text-underline-offset: 4px; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--gold-tint); border: 1px solid var(--line-gold);
  color: var(--title); font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.4;
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 241, 235, 0.92);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-row { height: var(--header-h); display: flex; align-items: center; gap: 20px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--title); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: 19px; white-space: nowrap;
}
.brand img { width: 40px; height: 40px; }

.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 6px; }
.nav-btn, .nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 0; background: none; cursor: pointer;
  color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.nav-btn:hover, .nav-link:hover, .nav-btn[aria-expanded="true"] { background: var(--white); color: var(--title); }
.chev { width: 16px; height: 16px; transition: transform .2s ease; }
[aria-expanded="true"] > .chev { transform: rotate(180deg); }

.dd { position: relative; }
.dd-panel {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 60;
  width: 320px; padding: 10px;
  transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
}
.dd.open .dd-panel { display: block; }
.dd-panel a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--text); text-decoration: none;
}
.dd-panel a:hover, .dd-panel a:focus-visible { background: var(--gold-tint); }
.dd-panel strong { display: block; color: var(--title); font-size: 15px; font-weight: 600; line-height: 1.3; }
.dd-panel small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.dd-glyph { width: 26px; height: 26px; flex-shrink: 0; color: var(--gold); }
.dd-note {
  margin: 6px 4px 2px; padding: 10px 8px 2px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; line-height: 1.5;
}

.header-cta { flex-shrink: 0; }

.menu-btn {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border-radius: 12px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--white); color: var(--title); cursor: pointer;
}
.menu-btn .ico { width: 22px; height: 22px; }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--ivory);
  padding: 12px 0 20px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.mm-group { border-bottom: 1px solid var(--line); }
.mm-btn, .mm-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 52px; padding: 12px 4px; border: 0; background: none; cursor: pointer;
  color: var(--title); font-size: 17px; font-weight: 600; text-decoration: none; text-align: left;
}
.mm-link { border-bottom: 1px solid var(--line); }
.mm-sub { padding: 0 0 10px; }
.mm-sub a {
  display: block; padding: 10px 14px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 16px;
}
.mm-sub a:hover { background: var(--white); }
.mm-note { margin: 14px 4px 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Common sections ---------- */

.section { padding: 96px 0; }
.band { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); line-height: 1.18; }
.section-sub { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px;
  color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before, .section-head .eyebrow::after { content: ""; width: 24px; height: 1px; background: var(--line-gold); }
.hero .eyebrow::after { display: none; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price strong { font-family: var(--serif); font-size: 2rem; line-height: 1.1; font-weight: 600; color: var(--title); }
.price span { color: var(--text); font-weight: 500; }

.checks li { position: relative; padding-left: 28px; }
.checks li + li { margin-top: 8px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .52em;
  width: 14px; height: 8px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg) translateY(-2px);
}

.mock-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.mock-crumb { color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.tiny { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- Hero ---------- */

.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.02fr; gap: 56px; align-items: center; }

.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.25rem); line-height: 1.1; }
.hero h1 > span { display: block; color: var(--gold); font-style: italic; font-weight: 500; }
.nowrap { white-space: nowrap; }
.lead { margin-top: 22px; font-size: 1.1rem; color: var(--text); max-width: 560px; }

.price-line {
  margin-top: 28px; padding: 16px 0 0; border-top: 1px solid var(--line-gold); max-width: 560px;
}
.price-note { margin-top: 4px; color: var(--muted); font-size: 15px; }

.cta-row { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-copy { animation: rise .7s ease both; }
.hero-visual { margin: 0; animation: rise .7s .12s ease both; }
@keyframes rise { from { transform: translateY(10px); } to { transform: none; } }

.mock {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FBFAF6;
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--sand); }
.mock-title { font-size: 13px; font-weight: 600; color: var(--title); }
.mock-bar .tag { margin-left: auto; }

.mock-body { display: grid; grid-template-columns: 200px 1fr; }
.mock-side { padding: 18px 16px; border-right: 1px solid var(--line); background: #FCFBF8; }
.mock-toc li {
  display: flex; gap: 8px;
  padding: 7px 8px; border-radius: 8px; font-size: 13px; line-height: 1.4; color: var(--muted);
}
.toc-no { color: var(--gold); font-weight: 600; min-width: 16px; font-variant-numeric: lining-nums; }
.mock-toc li.is-on { background: var(--gold-tint); color: var(--title); font-weight: 600; }
.mock-main { padding: 20px 22px 22px; min-width: 0; }
.mock-h { margin-top: 4px; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--title); }
.mock-p { margin: 8px 0 16px; font-size: 14px; line-height: 1.6; color: var(--text); }
.hero-visual figcaption { margin-top: 14px; text-align: center; color: var(--muted); font-size: 13px; }

/* pillar chart */
.pillars { width: 100%; border-collapse: separate; border-spacing: 6px; margin: -6px; width: calc(100% + 12px); table-layout: fixed; }
.pillars th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 2px 0; }
.pillars th.is-day { color: var(--gold); }
.pillars td {
  text-align: center; padding: 10px 4px 8px; border-radius: 12px; border: 1px solid transparent;
  vertical-align: top;
}
.pillars td span { display: block; font-size: 30px; line-height: 1.15; }
.pillars td small { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.3; font-weight: 500; }
.pillars-sm td { padding: 8px 2px 6px; }
.pillars-sm td span { font-size: 24px; }
.pillars td.is-dm { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(133, 106, 39, 0.14); }

.el-wood { background: var(--wood-bg); color: var(--wood); }
.el-fire { background: var(--fire-bg); color: var(--fire); }
.el-earth { background: var(--earth-bg); color: var(--earth); }
.el-metal { background: var(--metal-bg); color: var(--metal); }
.el-water { background: var(--water-bg); color: var(--water); }

/* ---------- Benefits ---------- */

.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.benefit { padding: 28px 24px; }
.icon-badge {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--gold-tint); border: 1px solid var(--line-gold); color: var(--gold);
}
.icon-badge .ico { width: 22px; height: 22px; }
.benefit p { margin-top: 18px; color: var(--title); font-family: var(--serif); font-size: 1.12rem; font-weight: 500; line-height: 1.45; }
.product-form {
  max-width: 760px; margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--line-gold);
  text-align: center; color: var(--text); font-size: 1.05rem;
}

/* ---------- Flow ---------- */

.flow-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--ivory); padding: 6px;
}
.flow-tab {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 14px; border: 0; border-radius: 13px; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 15px;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.flow-tab + .flow-tab::before {
  content: "→"; position: absolute; left: -7px; top: 50%; transform: translateY(-50%);
  color: var(--line-gold); font-weight: 400;
}
.flow-tab .n {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-gold); font-size: 12px; color: var(--gold);
}
.flow-tab .ico { display: none; }
.flow-tab:hover { color: var(--title); }
.flow-tab[aria-selected="true"] { background: var(--white); color: var(--title); box-shadow: var(--shadow); }
.flow-tab[aria-selected="true"] .n { background: var(--gold); border-color: var(--gold); color: #fff; }

.flow-stage {
  margin-top: 20px; padding: 28px; border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, #FCFBF7, var(--ivory));
}
.stage-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.panel-step { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.js .panel-step { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.flow-panel + .flow-panel { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.js .flow-panel + .flow-panel { margin-top: 0; padding-top: 0; border-top: 0; }
.flow-panel:focus-visible { outline-offset: 6px; border-radius: 12px; }

.stage-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.stage-grid > * { min-width: 0; }
.lesson, .side-note, .tool-form, .practice, .notes, .stage-grid > div:not([class]) {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: var(--shadow-sm);
}
.lesson-h { margin: 6px 0 10px; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--title); }
.lesson p:not(.lesson-h):not(.mock-crumb) { font-size: 15.5px; }
.lesson p + p { margin-top: 10px; }
.terms li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.terms li:first-child { border-top: 0; padding-top: 0; }
.terms b { display: block; color: var(--title); font-weight: 600; }

.fields div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FCFBF8; }
.fields div + div { margin-top: 10px; }
.fields dt { color: var(--muted); font-size: 14px; }
.fields dd { margin: 0; color: var(--title); font-weight: 600; font-size: 14.5px; }

.callout { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--gold-tint); border-radius: 0 10px 10px 0; font-size: 14.5px; line-height: 1.55; }
.callout b { color: var(--title); }

.tally li { display: grid; grid-template-columns: 56px 1fr 20px; align-items: center; gap: 12px; font-size: 14.5px; }
.tally li + li { margin-top: 10px; }
.tally b { text-align: right; color: var(--title); }
.bar { height: 10px; border-radius: 999px; background: var(--sand-soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: calc(var(--n) * 25%); border-radius: 999px; background: currentColor; }

.practice ol { counter-reset: q; margin-top: 10px; }
.practice ol li { counter-increment: q; display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.practice ol li::before { content: counter(q) "."; color: var(--gold); font-weight: 600; }
.practice > p:not(.mock-label):not(.tiny) { font-size: 15.5px; }
.note-lines i { display: block; height: 1px; background: var(--line); margin: 26px 0; }

/* ---------- Modules ---------- */

.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.module { display: flex; flex-direction: column; gap: 18px; padding: 30px; transition: box-shadow .25s ease, border-color .25s ease; }
.module:hover { box-shadow: var(--shadow-lg); border-color: var(--line-gold); }
.module-head { display: flex; align-items: center; gap: 16px; }
.glyph {
  display: grid; place-items: center; width: 60px; height: 60px; flex-shrink: 0; border-radius: 50%;
  background: var(--gold-tint); border: 1px solid var(--line-gold); color: var(--gold);
}
.glyph svg { width: 34px; height: 34px; }
.module h3 { font-size: 1.6rem; line-height: 1.2; }
.module-price { color: var(--gold); font-weight: 600; font-size: 15px; }
.module > p { color: var(--muted); flex: 1; }
.module-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Curriculum ---------- */

.cur-tabs {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.cur-tab {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--ivory);
  color: var(--text); font-weight: 600; font-size: 15px;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.cur-tab .dd-glyph { width: 22px; height: 22px; }
.cur-tab:hover { border-color: var(--line-gold); }
.cur-tab[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.cur-tab[aria-selected="true"] .dd-glyph { color: #fff; }

.cur-panel { border: 1px solid var(--line); border-radius: 22px; background: var(--ivory); padding: 32px; }
.cur-panel + .cur-panel { margin-top: 24px; }
.js .cur-panel + .cur-panel { margin-top: 0; }
.cur-panel.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(133, 106, 39, .35); } 100% { box-shadow: 0 0 0 14px rgba(133, 106, 39, 0); } }

.cur-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; grid-template-rows: auto 1fr;
  grid-template-areas: "info chap" "extra chap"; column-gap: 32px; align-items: start;
}
.cur-grid > * { min-width: 0; }
.cur-info { grid-area: info; }
.cur-chapters { grid-area: chap; }
.cur-extra { grid-area: extra; }
.cur-info h3 { font-size: 1.75rem; }
.cur-info > p { margin-top: 10px; color: var(--muted); }
.cur-info h4, .cur-chapters h4, .cur-extra h4 {
  margin: 24px 0 12px; font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.cur-chapters h4 { margin-top: 0; }
.cur-info .checks { font-size: 15.5px; }

.tools-box { margin-top: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.tools-box h4 { margin-top: 0; margin-bottom: 8px; }
.tools-box p { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.tools-box .ico { margin-top: 4px; color: var(--gold); }

.buy-box { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line-gold); }
.buy-box .price strong { font-size: 1.7rem; }
.buy-box .price span { font-size: 15px; color: var(--muted); }

.cur-chapters { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.cur-chapters:focus-visible, .tools-box:focus-visible { outline-offset: 4px; }

details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }

.chap-list > summary, .level > summary {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px;
  padding: 4px 36px 4px 0; color: var(--title); font-weight: 600; line-height: 1.4;
}
.chap-head { font-family: var(--serif); font-size: 1.2rem; }
.chap-level, .cur-method {
  display: block; margin-bottom: 2px; font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.chap-count { font-size: 14px; font-weight: 600; color: var(--muted); }
.chap-sum { margin: 14px 0 6px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.chap-items { margin-top: 8px; columns: 2; column-gap: 28px; }
.chap-items li {
  display: flex; gap: 12px; align-items: flex-start; break-inside: avoid;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--text);
}
.subpages { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.chap-list > summary::after, .level > summary::after, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
details[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.no {
  display: inline-grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold-tint); border: 1px solid var(--line-gold); color: var(--gold); font-size: 13px;
}
.goal { margin-top: 0; color: var(--text); font-size: 15.5px; }
.scope { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.next-panel {
  margin-top: 24px; padding: 20px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line-gold); border-radius: 16px;
}
.next-panel > div { flex: 1 1 280px; }
.next-panel h4 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--title); }
.next-panel p { margin-top: 2px; color: var(--muted); font-size: 15px; }
.next-panel .icon-badge { flex-shrink: 0; }

/* tools section */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool-card { padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.tool-card h3 { font-size: 1.2rem; line-height: 1.3; }
.tool-card > p { color: var(--muted); font-size: 15px; flex: 1; }
.tool-card.flash { animation: flash 1.2s ease; }
.tool-card:focus-visible { outline-offset: 4px; }
.tool-card .glyph { width: 48px; height: 48px; }
.tool-card .glyph svg { width: 28px; height: 28px; }
.tool-meta div { padding: 8px 0; border-top: 1px solid var(--line); }
.tool-meta dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.tool-meta dd { margin: 2px 0 0; font-size: 14.5px; color: var(--text); }

/* ---------- Stages ---------- */

.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.stage { padding: 30px 26px; }
.stage-no { font-family: var(--serif); font-size: 1.9rem; color: var(--gold); line-height: 1; }
.stage h3 { margin-top: 16px; font-size: 1.3rem; line-height: 1.3; }
.stage p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.stage-foot {
  max-width: 760px; margin: 36px auto 0; padding-top: 24px; border-top: 1px solid var(--line-gold);
  text-align: center; color: var(--text); font-size: 1.05rem;
}

/* ---------- FAQ ---------- */

.faq-wrap { max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--ivory); }
.faq details + details { margin-top: 12px; }
.faq summary {
  position: relative; padding: 18px 52px 18px 22px;
  color: var(--title); font-weight: 600; font-size: 16.5px; line-height: 1.45;
}
.faq summary::after { right: 24px; }
.faq details[open] { background: var(--white); box-shadow: var(--shadow-sm); }
.faq details p { padding: 0 22px 20px; color: var(--text); font-size: 15.5px; }

/* ---------- Closing ---------- */

.closing {
  max-width: 780px; margin: 0 auto; padding: 56px 40px; text-align: center;
  background: var(--white); border: 1px solid var(--line-gold); border-radius: 26px; box-shadow: var(--shadow);
  position: relative;
}
.closing::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); border-radius: 20px; pointer-events: none;
}
.closing img { width: 64px; height: 64px; margin: 0 auto 18px; }
.closing h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.2; }
.closing p { margin: 14px auto 28px; max-width: 520px; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line-gold); padding: 28px 0 36px; }
.footer-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer .brand { font-size: 16px; }
.site-footer .brand img { width: 32px; height: 32px; }
.footer-nav { display: flex; gap: 20px; margin-left: auto; }
.footer-nav a { color: var(--text); text-decoration: none; font-size: 14.5px; }
.footer-nav a:hover { color: var(--gold); }
.site-footer p { color: var(--muted); font-size: 14px; }

/* ---------- Auth pages ---------- */

.auth { padding: 64px 0 96px; }
.auth-card {
  max-width: 460px; margin: 0 auto; padding: 36px 32px; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.9rem; line-height: 1.2; margin-top: 12px; }
.auth-emblem { width: 56px; height: 56px; margin: 0 auto; }
.auth-note { margin: 10px 0 24px; color: var(--muted); font-size: 15.5px; }
.auth-card .notice { text-align: left; margin-bottom: 20px; }
.auth-alt { margin-top: 14px; font-size: 15px; color: var(--muted); }
.auth-alt a { font-weight: 600; }

.form { text-align: left; }
.field + .field { margin-top: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; color: var(--title); }
.field label small { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-gold); background: #FCFBF8; color: var(--text); font: inherit; font-size: 16px;
}
.field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; background: var(--white); }
.field input[aria-invalid="true"] { border-color: #A2402D; }
.field-error { margin-top: 6px; color: #A2402D; font-size: 14px; font-weight: 500; }
.check { display: flex; align-items: center; gap: 10px; margin: 16px 0 20px; font-size: 15px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.form .tiny { margin: 16px 0 18px; }

/* ---------- Member pages ---------- */

.member { padding: 40px 0 96px; }
.member-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.member-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.15; }
.member-head .eyebrow::after { display: none; }
.member-sub { margin-top: 8px; color: var(--muted); max-width: 680px; }
.member-h2 { display: flex; align-items: center; gap: 10px; margin: 32px 0 14px; font-size: 1.35rem; }
.member-h2 .ico { color: var(--gold); width: 20px; height: 20px; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--gold-tint); border: 1px solid var(--line-gold); color: var(--title); font-size: 15px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--gold); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

.field-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.field-switch a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.field-switch .dd-glyph { width: 20px; height: 20px; }
.field-switch a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.field-switch a[aria-current="page"] .dd-glyph { color: #fff; }

.access-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.access-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.access-card h3 { font-size: 1.35rem; }
.access-state { font-size: 14.5px; color: var(--muted); }
.access-state.is-on { color: var(--wood); font-weight: 600; }
.howto { margin-top: 12px; }
.howto p { color: var(--text); max-width: 760px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-gold); background: var(--gold-tint); color: var(--title);
  font-size: 12.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.pill .ico { width: 13px; height: 13px; }
.pill-muted { background: var(--sand-soft); border-color: var(--line); color: var(--muted); }
.pill-on { background: var(--wood-bg); border-color: #CFE0CB; color: var(--wood); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }

.levels { display: grid; gap: 14px; }
.levels-divider { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.levels-divider::before, .levels-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-gold); }
.levels-divider:focus-visible { outline-offset: 6px; }
.level { background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.level > summary { padding: 18px 52px 18px 22px; }
.level > summary::after { right: 24px; }
.level-title { font-family: var(--serif); font-size: 1.25rem; }
.level-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.level-body { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; padding: 0 22px 22px; }
.level-body > * { min-width: 0; }
.level-info > p:first-child { color: var(--muted); }
.mini-h { margin: 18px 0 6px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.level-info .btn { margin-top: 18px; }
.lesson-list li {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 6px 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45;
}
.lesson-list li:first-child { border-top: 0; }
.lesson-state { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.side-card { padding: 22px 24px; }
.side-card .member-h2 { margin-top: 0; }
.library li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.library li small { color: var(--muted); }
.library details { width: 100%; }
.library summary { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lib-items { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.lesson-wrap { max-width: 760px; }
.lesson-page h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1.2; margin-bottom: 20px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose ol { list-style: decimal; padding-left: 22px; }
.prose h2, .prose h3 { margin: 28px 0 12px; }

.steps-list { counter-reset: s; margin-bottom: 12px; }
.steps-list > li { counter-increment: s; position: relative; padding-left: 34px; }
.steps-list > li + li { margin-top: 14px; }
.steps-list > li::before {
  content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: #fff; font-size: 12px; font-weight: 700;
}
.btn-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-row .btn { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.nav-account .ico { width: 16px; height: 16px; }

/* ---------- Dialog ---------- */

.choose {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--white); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.choose::backdrop { background: rgba(59, 51, 39, 0.38); }
.choose-inner { padding: 24px; }
.choose-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.choose-head h2 { font-size: 1.5rem; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white); color: var(--title); cursor: pointer;
}
.icon-btn:hover { background: var(--gold-tint); }

.choose-options { margin: 18px 0 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choose-options label { position: relative; cursor: pointer; }
.choose-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choose-options span {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--ivory);
  font-weight: 600; color: var(--text);
  transition: border-color .2s ease, background-color .2s ease;
}
.choose-options input:checked + span { border-color: var(--gold); background: var(--gold-tint); color: var(--title); box-shadow: inset 0 0 0 1px var(--gold); }
.choose-options input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.choose-summary { margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--ivory); border: 1px solid var(--line); }
.choose-name { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.choose-name strong { font-family: var(--serif); font-size: 1.25rem; color: var(--title); font-weight: 600; }
.choose-name span { font-weight: 700; color: var(--gold); }
.choose-summary .checks { font-size: 15px; }

.choose-next { margin-top: 18px; }
.choose-next h3 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.choose-next p { font-size: 15px; color: var(--text); }
.choose-next .btn { margin-top: 14px; }
.msg {
  margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line-gold); border-radius: 12px;
  background: #FCFBF8; color: var(--title) !important; font-weight: 500;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .benefits, .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { gap: 40px; }
  .mock-body { grid-template-columns: 170px 1fr; }
}

@media (max-width: 960px) {
  .nav, .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .hero { padding: 36px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 640px; }
  .section { padding: 80px 0; }
  .stage-grid { grid-template-columns: 1fr; }
  .cur-grid { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "info" "chap" "extra"; row-gap: 24px; }
  .cur-extra .tools-box { margin-top: 0; }
  .chap-items { columns: 1; }
  .member-grid, .access-grid { grid-template-columns: 1fr; }
  .level-body { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; }
  .flow-tab { flex-direction: column; gap: 6px; font-size: 14px; }
}

@media (min-width: 961px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 720px) {
  .modules { grid-template-columns: 1fr; }
  .flow-tabs { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .flow-tab + .flow-tab::before { display: none; }
  .flow-tab { flex-direction: row; }
  .flow-stage { padding: 18px; }
  .cur-panel { padding: 20px; }
  .cur-tabs { display: grid; grid-template-columns: repeat(2, 1fr); }
  .cur-tab { justify-content: center; padding: 10px 12px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .hero h1 { font-size: clamp(1.95rem, 8.6vw, 2.4rem); }
  .hero .eyebrow { letter-spacing: .1em; font-size: 12px; }
  .hero .eyebrow::before { display: none; }
  .lead { font-size: 1.02rem; }
  .cta-row .btn { width: 100%; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .mock-main { padding: 16px; }
  .mock-bar { padding: 10px 12px; }
  .pillars td span { font-size: 24px; }
  .pillars td small { font-size: 10.5px; }
  .pillars { border-spacing: 4px; margin: -4px; width: calc(100% + 8px); }
  .benefits { grid-template-columns: 1fr; gap: 12px; }
  .benefit { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 20px; }
  .benefit { align-items: center; }
  .benefit p { margin-top: 0; font-size: 1.05rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .next-panel { padding: 18px; }
  .next-panel .btn { width: 100%; }
  .member-head { flex-direction: column; align-items: flex-start; }
  .level-body { padding: 0 16px 16px; }
  .lesson-list li { grid-template-columns: 30px 1fr; }
  .lesson-state { grid-column: 2; justify-content: flex-start; }
  .auth-card { padding: 28px 20px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .module { padding: 22px 20px; }
  .module-actions .btn { flex: 1 1 100%; }
  .lesson, .side-note, .tool-form, .practice, .notes, .stage-grid > div:not([class]) { padding: 16px; }
  .cur-panel { padding: 16px; border-radius: 18px; }
  .cur-chapters { padding: 16px; }
  .buy-box .btn { width: 100%; }
  .closing { padding: 40px 20px; }
  .closing .btn { width: 100%; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-nav { margin-left: 0; }
  .choose-inner { padding: 18px; }
}

@media (max-width: 380px) {
  .brand span { font-size: 15.5px; }
  .flow-tab { font-size: 13px; padding: 8px; gap: 6px; }
  .cur-tab { font-size: 14px; padding: 8px; gap: 6px; }
  .cur-tab .dd-glyph { width: 18px; height: 18px; }
  .choose-options { grid-template-columns: 1fr 1fr; }
  .choose-options span { padding: 8px 10px; gap: 8px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
