/* Members area (/learn) and legal pages. Same brand tokens as the sales page (public/index.html):
   espresso header, warm light reading ground, Cormorant Garamond display + Onest body. Single theme by design. */
:root {
  color-scheme: light;
  --night: #1B1514; --night-2: #2A2120;
  --ground: #FBF7F5; --panel: #F3E6E2; --white: #FFFFFF;
  --ink: #221B1A; --muted: #6E5F5C; --line: #E6D6D1;
  --on-night: #F6EEEA; --on-night-2: #C9B6B0;
  --rose: #B07F75; --rose-deep: #7E4F47; --rose-glow: #D9A79C;
  --ok: #4F7A5A;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Onest", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --r: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--rose-deep); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(34px, 8vw, 48px); }
h2 { font-size: clamp(27px, 6vw, 34px); margin-top: 8px; }
h3 { font-size: 25px; }
p { margin: 0 0 14px; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding-inline: 16px; }
.main { padding-block: 24px 56px; display: grid; gap: 20px; }
.main > * { margin: 0; }

.top { background: var(--night); color: var(--on-night); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { color: var(--on-night); text-decoration: none; font-family: var(--display); font-size: 23px; font-weight: 600; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.nav a, .nav button { color: var(--on-night-2); text-decoration: none; padding: 8px 10px; border-radius: 999px; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a[aria-current="page"], .nav a:hover, .nav button:hover { color: var(--on-night); background: var(--night-2); }
.nav form { margin: 0; }
@media (max-width: 420px) {
  .brand { font-size: 20px; }
  .nav { gap: 0; font-size: 14px; }
  .nav a, .nav button { padding: 8px 7px; }
}

.eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--rose-deep); font-weight: 600; margin-bottom: 6px; }
.lede { font-size: 18px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.soft { color: var(--muted); font-weight: 500; }
.crumbs { font-size: 15px; }
.crumbs a { text-decoration: none; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; }
.card.narrow { max-width: 520px; margin-inline: auto; width: 100%; }
.card.dark { background: var(--night); color: var(--on-night); border-color: var(--night); }
.card.dark .eyebrow { color: var(--rose-glow); }
.card.dark p { color: var(--on-night-2); }
.card.dark a:not(.btn) { color: var(--on-night); }
.notice { background: var(--panel); border-radius: 14px; padding: 14px 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 26px; border-radius: 999px; background: var(--ink); color: var(--white); border: 1.5px solid var(--ink); font: 600 17px/1.2 var(--body); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--rose-deep); border-color: var(--rose-deep); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--panel); }
.btn.light { background: var(--on-night); color: var(--ink); border-color: var(--on-night); }

.stack { display: grid; gap: 10px; margin: 18px 0; }
label { font-weight: 600; font-size: 15px; }
input[type="email"] { width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 14px; font: 17px var(--body); background: var(--white); color: var(--ink); }
input[type="email"]:focus { outline: 2px solid var(--rose); border-color: var(--rose); }

.hello { display: grid; gap: 10px; justify-items: start; }
.hello h1 { margin: 0; }
.progress { width: 100%; height: 10px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--rose); border-radius: 999px; }

.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lesson-list a { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lesson-list a:hover { background: var(--ground); }
.lesson-list .n { width: 34px; height: 34px; border-radius: 50%; background: var(--panel); color: var(--rose-deep); display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.lesson-list .done .n { background: var(--ok); color: var(--white); }
.lesson-list .d { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.mats { display: grid; gap: 10px; }
.mat { display: grid; gap: 2px; padding: 16px; border-radius: 14px; background: var(--panel); text-decoration: none; color: var(--ink); }
.mat b { font-size: 17px; }
.mat span { font-size: 14px; color: var(--muted); }
.mat:hover { background: #EEDCD6; }
@media (min-width: 640px) { .mats { grid-template-columns: 1fr 1fr; } }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--night); margin-inline: -16px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 640px) { .video { margin-inline: 0; } }
.done-form { margin: 0; }

.prose h2 { margin-top: 26px; }
.prose h3 { margin-top: 20px; }
.prose ol, .prose ul, .practice ol, .practice ul { padding-left: 22px; margin: 0 0 14px; }
.prose li, .practice li { margin-bottom: 6px; }
blockquote { margin: 0 0 14px; padding: 12px 16px; background: var(--panel); border-radius: 12px; border-left: 3px solid var(--rose); }
blockquote p { margin: 0; }

.practices { display: grid; gap: 14px; }
.practices > h2 { margin: 6px 0 0; }
.practice { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.practice h3 { margin-bottom: 8px; }
.wb-lesson { display: grid; gap: 12px; margin-top: 10px; }
.wb-lesson > h2 { margin: 0; }
.toc ol.plain { margin: 0; padding-left: 0; list-style: none; columns: 1; }
.toc li { margin-bottom: 6px; }
@media (min-width: 640px) { .toc ol.plain { columns: 2; column-gap: 24px; } }

.pager { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 600; padding: 10px 0; }

/* Test */
.test { display: grid; gap: 16px; }
.level { border: 1px solid var(--line); border-radius: var(--r); background: var(--white); padding: 18px 16px 8px; margin: 0; min-width: 0; }
.level legend { float: left; width: 100%; font-family: var(--display); font-size: 25px; font-weight: 600; padding: 0; margin-bottom: 6px; line-height: 1.15; }
.level legend + * { clear: both; }
.level legend .eyebrow { display: block; font-family: var(--body); font-size: 12px; margin: 0; }
.level legend .soft { font-family: var(--body); font-size: 15px; }
.q { padding: 12px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.q p { margin-bottom: 10px; font-weight: 500; }
.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.scale label { font-weight: 500; font-size: 13px; line-height: 1.25; text-align: center; cursor: pointer; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span { display: grid; place-items: center; min-height: 54px; padding: 6px 4px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--ground); }
.scale input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.scale input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.result { display: grid; gap: 14px; }
.house { display: grid; gap: 6px; }
.floor { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 48px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-size: 15px; }
.floor .bar { height: 8px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.floor .bar i { display: block; height: 100%; background: var(--rose); }
.floor.low .bar i { background: var(--rose-deep); }
.floor.high .bar i { background: var(--ok); }
.floor b { text-align: right; font-variant-numeric: tabular-nums; }
.lv-note { padding: 12px 0; border-top: 1px solid var(--line); }
.lv-note p { margin: 4px 0 0; color: var(--muted); }

.foot { display: grid; gap: 6px; padding-block: 24px 40px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

@media print {
  .top, .foot, .nav, .crumbs, .print-btn, .btn, .done-form, .pager, .video { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card, .practice, .level { border: 1px solid #ccc; break-inside: avoid; }
  .main { padding: 0; }
  a { color: inherit; text-decoration: none; }
}

/* Sign-in: locked controls, "check your email" steps */
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }
input:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--ink); color: var(--white, #fff); }
.steps { margin: 4px 0 8px; padding-left: 22px; display: grid; gap: 8px; }
.steps li { padding-left: 4px; }
[data-count] { font-variant-numeric: tabular-nums; }
