:root {
  color-scheme: light;
  --paper: #f4eddc;
  --card: #fbf6ea;
  --ink: #1a2942;
  --muted: #6e6550;
  --line: #ddceac;
  --navy: #1a2942;
  --navy-deep: #111d33;
  --navy-soft: #e7dcc2;
  --gold: #c9a15f;
  --gold-strong: #b0863d;
  --gold-text: #7a5c22;
  --gold-soft: #e3cf9f;
  --green: #4f6146;
  --green-soft: #e4ecdf;
  --red: #8f3a3a;
  --red-soft: #f1e2e0;
  --radius: 12px;
  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; max-width: 100%; }
a { color: var(--navy); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; color: var(--navy); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 60px; }

/* Header */
header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.monogram { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--gold-soft); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; letter-spacing: .5px; flex: none; }
.monogram svg { display: block; }
.brand h1 { font-size: 1.15rem; }
.brand small { display: block; color: var(--muted); font-size: .72rem; font-family: var(--sans); font-weight: 400; margin-top: -1px; }
.stats { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.pill { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pill b { color: var(--ink); font-weight: 600; }
nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav button { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: .88rem; white-space: nowrap; }
nav button:hover { color: var(--ink); background: var(--card); border-color: var(--line); }
nav button.on { color: var(--navy); background: var(--card); border-color: var(--line); font-weight: 600; }

/* Cards & layout */
main { padding-top: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px -16px rgba(26,41,66,.35); }
.card + .card, .stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr 1fr; } .stats .hide-sm { display: none; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.eyebrow { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); font-weight: 700; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: .92rem; transition: transform .05s ease, background .15s ease; }
.btn:hover { background: #f4f1ea; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #1b2b48; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.gold:hover { background: #9b7124; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--navy); }
.btn.sm { padding: 6px 11px; font-size: .84rem; border-radius: 8px; }
.btn.danger { color: var(--red); border-color: #efc9c9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }

/* XP bar */
.xpbar { height: 10px; background: var(--gold-soft); border-radius: 999px; overflow: hidden; }
.xpbar > div { height: 100%; background: linear-gradient(90deg, var(--gold), #d4a651); border-radius: 999px; transition: width .4s ease; }

/* Week strip */
.weeks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 640px) { .weeks { grid-template-columns: 1fr 1fr; } }
.week { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.week:hover { border-color: var(--gold); }
.week .dots { display: flex; gap: 5px; margin-top: 8px; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.dot.done { background: var(--green); }
.dot.part { background: var(--gold); }
.dot.star { width: 14px; height: 14px; border-radius: 3px; transform: rotate(45deg); margin-left: 4px; }
.dot.star.done { background: var(--gold); }

/* Map rows */
.dayrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.dayrow:first-of-type { border-top: 0; }
.dayrow:hover .daytitle { color: var(--gold); }
.daynum { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; background: var(--navy-soft); color: var(--navy); }
.daynum.done { background: var(--green); color: #fff; }
.daynum.boss { background: var(--gold-soft); color: var(--navy); border-radius: 8px; }
.daynum.boss.done { background: var(--gold); color: var(--navy); }
.daynum.locked { background: #eee; color: var(--muted); }
.daytitle { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; color: var(--navy); }
.steps { display: flex; gap: 4px; }
.step { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .65rem; font-weight: 700; background: var(--line); color: var(--navy); }
.step.done { background: var(--green-soft); color: var(--green); }

/* Lesson */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { flex: 1; min-width: 120px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tab .tiny { margin-bottom: 2px; }
.tab .lbl { font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.tab.on { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy-soft); }
.tab.done .lbl::after { content: "✓"; color: var(--green); font-weight: 800; }
ul.clean { margin: 8px 0 0; padding-left: 20px; }
ul.clean li { margin: 4px 0; }

/* Timer */
.timer { font-family: var(--serif); font-size: 2.4rem; font-weight: 600; color: var(--navy); letter-spacing: 1px; }

/* Flashcard */
.fc { perspective: 1000px; cursor: pointer; }
.fc-inner { position: relative; min-height: 190px; transition: transform .45s ease; transform-style: preserve-3d; }
.fc.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--radius); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; justify-content: center; background: var(--card); }
.fc-face.back { transform: rotateY(180deg); background: var(--navy-soft); }
.fc-face .q { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); }
.fc-face .a { font-size: 1rem; }

/* Quiz */
.opt { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 8px; font-size: .95rem; line-height: 1.4; }
.opt:hover { border-color: var(--navy); }
.opt.correct { background: var(--green-soft); border-color: var(--green); }
.opt.wrong { background: var(--red-soft); border-color: var(--red); }
.opt.dim { opacity: .75; }
.opt:disabled { cursor: default; }
.why { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 8px; padding: 10px 12px; margin-top: 12px; font-size: .92rem; }
.qprog { display: flex; gap: 4px; }
.qprog span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.qprog span.ok { background: var(--green); }
.qprog span.bad { background: var(--red); }
.qprog span.now { background: var(--navy); }
.score { font-family: var(--serif); font-size: 2.6rem; color: var(--navy); font-weight: 700; }

/* Badges */
.badge { text-align: center; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.badge .ico { font-size: 1.8rem; }
.badge .nm { font-weight: 600; font-size: .85rem; margin-top: 6px; }
.badge .ds { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.badge.locked { opacity: .45; filter: grayscale(1); }

/* Inputs */
textarea, input[type=text], input[type=date], select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
label.lbl { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; opacity: 0; transition: all .25s ease; pointer-events: none; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

/* Certificate */
.cert { border: 6px double var(--gold); padding: 36px 28px; text-align: center; background: #fffdf8; border-radius: 6px; }
.cert .eyebrow { margin-bottom: 8px; }
.cert h2 { font-size: 2rem; }
.cert .name { font-family: var(--serif); font-size: 2.2rem; color: var(--gold-strong); margin: 18px 0 6px; font-style: italic; }
.cert .sig { margin-top: 26px; font-family: var(--serif); font-style: italic; color: var(--muted); }
@media print { header, nav, .noprint { display: none !important; } body { background: #fff; } }

.lvl { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); font-weight: 600; }
.big { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--navy); }
.note { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-size: .88rem; color: var(--muted); }
.kbd { font-size: .75rem; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--muted); }

/* ---------- Additions for Etiquette Trainer ---------- */
input[type=email], input[type=password] { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--navy-soft); border-color: var(--navy); }
.field + .field { margin-top: 12px; }
.err { color: var(--red); font-size: .88rem; margin-top: 8px; }
.ok { color: var(--green); font-size: .88rem; margin-top: 8px; }
.banner { background: var(--gold-soft); border-bottom: 1px solid #ecd9ad; color: #5b4412; font-size: .82rem; text-align: center; padding: 6px 12px; }
.lock { font-size: .85rem; color: var(--muted); }
.dayrow.locked .daynum { opacity: .7; }
.dayrow.locked .daytitle { color: var(--muted); }
.hdr .acct { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.narrow { max-width: 460px; margin: 0 auto; }
.choices { display: grid; gap: 8px; }
.choice { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.choice.on { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy-soft); }
.stat { display: flex; gap: 8px; align-items: baseline; }

/* Lesson prose */
.lesson { font-size: 1.02rem; line-height: 1.65; max-width: 640px; }
.lesson h2 { font-size: 1.15rem; margin-top: 26px; margin-bottom: 6px; }
.lesson p { margin: 0 0 12px; }
.lesson p.lede { font-size: 1.08rem; color: var(--navy); }
.lesson ul { margin: 0 0 12px; padding-left: 20px; }
.lesson li { margin: 4px 0; }
.lesson strong { color: var(--navy); }
.lesson .rules { background: var(--navy-soft); border-radius: 12px; padding: 14px 18px 14px 34px; margin-top: 8px; }
.lesson .rules li { font-weight: 600; color: var(--navy); }
.focus { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .9rem; }
.focus ul { margin: 6px 0 0; padding-left: 18px; }
.readtime { font-size: .8rem; color: var(--muted); }
.progress-line { position: sticky; top: 0; height: 3px; background: var(--gold); width: 0; z-index: 5; }

/* Landing */
.land { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.land header { position: static; border: 0; background: transparent; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; flex-wrap: wrap; row-gap: 10px; }
.topbar nav { display: flex; gap: 6px; padding: 0; flex-wrap: wrap; overflow-x: visible; }
@media (max-width: 640px) { .topbar nav { width: 100%; justify-content: flex-start; } }
.hero { padding: 40px 0 30px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: 2.8rem; line-height: 1.1; }
@media (max-width: 600px) { .hero h1 { font-size: 2.1rem; } }
.hero .sub { font-size: 1.15rem; color: var(--muted); margin-top: 14px; max-width: 520px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.mock { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 20px 50px rgba(34,53,89,.10); }
.section { padding: 34px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 1.7rem; margin-bottom: 8px; }
.section .lead { color: var(--muted); max-width: 640px; margin-bottom: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid4l { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 800px) { .grid3, .grid4l { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid3, .grid4l { grid-template-columns: 1fr; } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.tile h3 { margin-bottom: 6px; }
.tile .num { font-family: var(--serif); font-size: 2rem; color: var(--gold-strong); font-weight: 700; line-height: 1; }
.price { background: var(--navy); color: #fff; border-radius: 18px; padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
@media (max-width: 700px) { .price { grid-template-columns: 1fr; } }
.price h2, .price h3 { color: #fff; }
.price .amt { font-family: var(--serif); font-size: 3rem; font-weight: 700; color: #f0d9a3; line-height: 1; }
.price ul { margin: 12px 0 0; padding-left: 18px; opacity: .92; }
.price li { margin: 4px 0; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); font-family: var(--serif); font-size: 1.05rem; }
.faq p { margin-top: 8px; color: var(--muted); }
footer.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.quote { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); border-left: 4px solid var(--gold); padding-left: 16px; }
.legal { max-width: 720px; margin: 0 auto; padding: 30px 20px 60px; }
.legal h1 { margin-bottom: 8px; } .legal h2 { margin-top: 24px; margin-bottom: 6px; font-size: 1.15rem; }
.legal p { margin-bottom: 10px; }

/* ---------- Journey map (growth), wardrobe & butler mascot ---------- */
.link-ish { color: var(--navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); cursor: pointer; }
.journey-card { background: linear-gradient(180deg, var(--card), var(--paper)); }
.journey { display: grid; gap: 14px; }
.jmonth-label { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.jrow { display: flex; gap: 6px; flex-wrap: wrap; }
.jnode { width: 34px; height: 34px; border-radius: 50%; background: var(--line); color: var(--navy); display: grid; place-items: center; font-size: .78rem; font-weight: 700; cursor: pointer; border: 2px solid transparent; transition: transform .1s ease; }
.jnode:hover { transform: scale(1.08); }
.jnode.part { background: var(--gold-soft); color: var(--navy); }
.jnode.done { background: var(--green); color: #fff; }
.jnode.cur { border-color: var(--gold); background: var(--navy-soft); font-size: 1.1rem; box-shadow: 0 0 0 3px var(--gold-soft); }

.gold-pill { background: var(--gold-soft); border-color: #ecd9ad; color: #6b5119; }
.wgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .wgrid { grid-template-columns: 1fr 1fr; } }
.wcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; background: var(--paper); }
.wcard.equipped { border-color: var(--gold); background: var(--gold-soft); }
.wcard.equipped .wrole, .wcard.equipped .muted { color: var(--navy); }
.wico { font-size: 2rem; }
.wname { font-family: var(--serif); font-weight: 600; color: var(--navy); margin-top: 4px; }
.wpreview { text-align: center; background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 18px; }
.wpreview-figure { display: flex; align-items: center; justify-content: center; gap: 6px; }
.wpreview-ico { font-size: 3rem; }
.wpreview-acc { font-size: 1.6rem; }


/* Marketing nav: mark the page you’re on */
.topbar nav a[aria-current="page"] { border-color: var(--gold); color: var(--navy); font-weight: 700; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,.2); transition: top .15s ease; }
.skip-link:focus { top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[role="button"] { cursor: pointer; }
[role="button"]:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 2px; }
