:root {
  --maroon: #4a0d16;
  --maroon-2: #6b1724;
  --gold: #b5730f;
  --gold-soft: #f6e7c8;
  --ink: #1f1a17;
  --muted: #6b625b;
  --line: #e7e0d6;
  --bg: #fbf8f3;
  --card: #ffffff;
  --ok: #1d7a4f;
  --warn: #b4261c;
  --radius: 14px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--maroon-2); }

.topbar { position: sticky; top: 0; z-index: 20; background: rgba(251, 248, 243, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; }
.topbar nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 999px; }
.topbar nav a.on, .topbar nav a:hover { background: var(--maroon); color: #fff; }

.hero { background: radial-gradient(1200px 420px at 85% -10%, #f3d9a6 0, transparent 60%), var(--maroon); color: #fff; }
.hero .in { max-width: 1180px; margin: 0 auto; padding: 56px 20px 60px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: #f3c977; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; margin: 10px 0 14px; letter-spacing: -.02em; }
.hero p { max-width: 640px; color: #f1e6e1; margin: 0; font-size: 17px; }

.layout { max-width: 1180px; margin: 0 auto; padding: 36px 20px 80px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; }
.toc { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.toc b { display: block; text-transform: uppercase; font-size: 11px; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 10px; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.toc a::before { content: counter(t, decimal-leading-zero); color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--gold-soft); }

main section { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
main section:last-child { border-bottom: 0; }
main h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.2; }
main h2 .n { color: var(--gold); margin-right: 10px; font-variant-numeric: tabular-nums; }
main h3 { font-size: 18px; margin: 26px 0 6px; }
.lead { color: var(--muted); margin: 0 0 18px; font-size: 17px; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 10px 42px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 3px; width: 28px; height: 28px; border-radius: 50%; background: var(--maroon); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }

.shot { margin: 18px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 0 10px 30px -18px rgba(74, 13, 22, .35); }
.shot img { width: 100%; height: auto; }
figcaption { font-size: 13px; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.phone { border-radius: 28px; border: 8px solid #1b1414; overflow: hidden; background: #000; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .45); }
.phone + figcaption, .phonefig figcaption { border: 0; text-align: center; padding: 8px 0 0; }
.phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; margin: 18px 0; }

.note, .warn, .tip { border-radius: 12px; padding: 14px 16px; margin: 16px 0; font-size: 15px; }
.note { background: #eef3fb; border: 1px solid #d3e0f3; }
.tip { background: var(--gold-soft); border: 1px solid #ecd39f; }
.warn { background: #fdecea; border: 1px solid #f5c7c2; }
.note > b:first-child, .tip > b:first-child, .warn > b:first-child { display: block; margin-bottom: 2px; }

table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f5efe6; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.tbl { overflow-x: auto; }

.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.c-new { color: #2f5fb3; border-color: #b9cbec; background: #eef3fb; }
.c-prog { color: #9a6408; border-color: #ecd39f; background: #fdf5e3; }
.c-late { color: var(--warn); border-color: #f5c7c2; background: #fdecea; }
.c-done { color: var(--ok); border-color: #b9e0cb; background: #eaf6ef; }
.c-cancel { color: #555; border-color: #ddd; background: #f3f3f3; }

kbd, .ui { font-family: inherit; font-weight: 700; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font-size: .92em; white-space: nowrap; }

/* ── Landing (index.html only) ─────────────────────────────────────────
   Light documentation hub: real product screens on the right, the two
   manuals below with their actual chapters as links. */
.home .eyebrow { color: var(--gold); }

.lp-hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.lp-hero .in { max-width: 1180px; margin: 0 auto; padding: 64px 20px 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: end; }
.lp-copy { padding-bottom: 72px; }
.lp-copy h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -.035em; color: var(--maroon); margin: 14px 0 18px; text-wrap: balance; }
.lp-copy p { color: var(--muted); font-size: 17px; margin: 0; max-width: 34em; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: #2e070d; }
.btn-ghost { border: 1px solid var(--line); background: var(--card); color: var(--maroon); }
.btn-ghost:hover { border-color: var(--maroon); }
.btn:focus-visible, .chapters a:focus-visible, .role h3 a:focus-visible, .role-go:focus-visible { outline: 3px solid #e8b923; outline-offset: 2px; }

/* Product screens: the portal in a browser frame, the app in a phone frame over it. */
.lp-visual { position: relative; padding: 0 0 0 0; min-height: 380px; }
.lp-browser { border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; overflow: hidden; background: var(--card); box-shadow: 0 30px 60px -40px rgba(74, 13, 22, .45); margin-right: 64px; }
.lp-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #f5efe6; }
.lp-bar i { width: 9px; height: 9px; border-radius: 50%; background: #dccfbd; }
.lp-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); font-weight: 500; }
.lp-browser img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.lp-phone { position: absolute; right: 0; bottom: 0; width: 34%; max-width: 210px; aspect-ratio: 9 / 17; border: 7px solid #1b1414; border-bottom: 0; border-radius: 30px 30px 0 0; overflow: hidden; background: #fff; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .45); }
.lp-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.lp-main { max-width: 1180px; margin: 0 auto; padding: 64px 20px 80px; }
.lp-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: end; margin-bottom: 28px; }
.lp-head h2, .lp-help h2 { font-size: 28px; letter-spacing: -.025em; color: var(--maroon); margin: 0; line-height: 1.2; }
.lp-head p { margin: 0; color: var(--muted); }

.lp-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.role { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.role header { display: grid; gap: 6px; }
.role-tag { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; }
.role h3 { margin: 0; font-size: 26px; letter-spacing: -.02em; line-height: 1.2; }
.role h3 a { color: var(--ink); text-decoration: none; }
.role h3 a:hover { color: var(--maroon-2); }
.role header p { margin: 0; color: var(--muted); }

/* Chapters are the manual's real sequence, so the numbers carry meaning. */
.chapters { list-style: none; margin: 0; padding: 0; counter-reset: ch; columns: 2; column-gap: 20px; border-top: 1px solid var(--line); }
.chapters li { counter-increment: ch; border-bottom: 1px solid var(--line); break-inside: avoid; }
.chapters a { display: flex; gap: 12px; align-items: baseline; padding: 11px 2px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; }
.chapters a::before { content: counter(ch, decimal-leading-zero); color: var(--gold); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.chapters a:hover { color: var(--maroon-2); }
.role-go { margin-top: auto; align-self: flex-start; font-weight: 700; color: var(--maroon-2); text-decoration: none; }
.role-go:hover { text-decoration: underline; text-underline-offset: 3px; }

.lp-help { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; }
.lp-help dl { margin: 0; display: grid; gap: 18px; }
.lp-help dt { font-weight: 700; }
.lp-help dd { margin: 2px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .lp-hero .in, .lp-head, .lp-help { grid-template-columns: 1fr; gap: 20px; }
  .lp-hero .in { padding-top: 44px; }
  .lp-copy { padding-bottom: 8px; }
  .lp-visual { min-height: 0; }
  .lp-roles { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lp-main { padding: 44px 16px 60px; }
  .lp-hero .in { padding-left: 16px; padding-right: 16px; }
  .role { padding: 22px 18px; }
  .chapters { columns: 1; }
  .lp-browser { margin-right: 44px; }
  .lp-phone { width: 38%; border-width: 5px; border-radius: 22px 22px 0 0; }
}

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 2px; color: var(--muted); }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .in { max-width: 1180px; margin: 0 auto; padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 10px; }
  .toc { position: static; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
  .split { grid-template-columns: 1fr; }
  .split .phonefig { max-width: 280px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .topbar nav a { padding: 6px 9px; font-size: 13px; }
  .brand small { display: none; }
  .hero .in { padding: 40px 16px 56px; }
  .layout, .cards { padding-left: 16px; padding-right: 16px; }
}
@media print {
  .topbar, .toc { display: none; }
  .layout { display: block; }
  .hero { background: none; color: var(--ink); }
  .hero p { color: var(--ink); }
  section { break-inside: avoid-page; }
}
