:root {
  --bg: #F7F6FD;
  --surface: #FFFFFF;
  --soft: #ECEAFB;
  --ink: #1E1B3A;
  --muted: #48446A;
  --faint: #6E6A8C;
  --accent: #4C33C4;
  --accent-dark: #3A2696;
  --accent-tint: #E6E1FF;
  --mint: #E4F6EE;
  --mint-ink: #17694A;
  --radius: 22px;
  --shadow: 0 30px 70px rgba(30, 27, 58, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; line-height: 1.12; }
h2 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 19px; }
p { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.section { padding-top: 72px; padding-bottom: 24px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 11px 18px; border-radius: 999px;
  font-weight: 700; text-decoration: none; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 16px 26px; font-size: 17px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-soft { background: var(--soft); color: var(--ink); font-weight: 600; }
.btn-soft:hover { color: var(--ink); background: #E0DCF8; }
.btn-light { background: var(--surface); color: var(--accent); box-shadow: 0 2px 10px rgba(76, 51, 196, 0.12); }
.btn-white { background: #fff; color: var(--accent); font-weight: 800; }

.pill { display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.pill-mint { background: var(--mint); color: var(--mint-ink); }

/* Nav */
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
/* The logo's tagline reads from 64 px tall; keep it at least that. */
.brand-logo { height: 64px; width: auto; max-width: 100%; object-fit: contain; display: block; }
/* A brand with no logo image: its icon and name written out. */
.brand-word { display: inline-flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.brand-word img { border-radius: 10px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; font-weight: 500; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -0.02em; max-width: 860px; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 640px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* App tour: the app window with its menu; the tour clicks through the pages (site.js). */
.app { position: relative; width: 100%; max-width: 1040px; margin: 28px 0 0; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.app-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #EEEDF6; }
.app-bar span { width: 11px; height: 11px; border-radius: 50%; background: #DDDAEE; }
.app-bar b { margin-left: 10px; font-size: 13px; color: var(--faint); font-weight: 600; }
.app-bar em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--faint); }
.app-body { display: flex; }

.app-menu { flex: 0 0 214px; padding: 14px 10px; background: #FAF9FF; border-right: 1px solid #EEEDF6; }
.app-menu ul { list-style: none; margin: 0; padding: 0; }
.menu-head { margin: 14px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.app-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.app-menu button:hover { background: #F1EFFB; color: var(--ink); }
.app-menu button[aria-current="true"] { background: var(--soft); color: var(--accent); font-weight: 700; }

.app-main { flex: 1 1 auto; min-width: 0; }
.slides { position: relative; display: grid; min-height: 470px; padding: 22px 24px; }
/* The old page goes at once; only the new one fades in, so two never overlap. */
.slide { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; opacity: 0; visibility: hidden; }
.slide.is-on, .app:not(.ready) .slide:first-child { opacity: 1; visibility: visible; transition: opacity 0.35s ease; }
.app-title { font-weight: 800; font-size: 20px; }
.app-title small { font-weight: 500; font-size: 13px; color: var(--faint); margin-left: 8px; }

/* Loading state between pages */
.loading { position: absolute; inset: 0; z-index: 2; display: none; flex-direction: column; gap: 14px; padding: 22px 24px; background: var(--surface); }
.slides.is-loading .loading { display: flex; }
.loading-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--faint); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.sk { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #F2F0F9 25%, #E7E3F7 37%, #F2F0F9 63%); background-size: 400% 100%; animation: shimmer 1.2s ease infinite; }
.sk-title { width: 40%; height: 22px; }
.sk-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sk-row .sk { height: 64px; border-radius: 14px; }
.sk-80 { width: 80%; } .sk-65 { width: 65%; } .sk-90 { width: 90%; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* The tour's pointer */
.cursor { position: absolute; top: 0; left: 0; z-index: 5; width: 22px; height: 22px; pointer-events: none; opacity: 0; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s; }
.cursor.show { opacity: 1; }
.cursor svg { display: block; filter: drop-shadow(0 2px 3px rgba(30, 27, 58, 0.3)); }
.cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: rgba(76, 51, 196, 0.35); opacity: 0; transform: scale(0.2); }
.cursor.click::after { animation: ripple 0.45s ease-out; }
@keyframes ripple { from { opacity: 0.9; transform: scale(0.2); } to { opacity: 0; transform: scale(1.8); } }

/* Page content */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: #F6F5FC; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tile small { color: var(--faint); font-size: 12px; font-weight: 600; }
.tile strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.tile strong.sm { font-size: 15px; }
.tile-hi { background: var(--mint); }
.tile-hi small, .tile-hi strong { color: var(--mint-ink); }
.neg { color: #B45309; }
.muted { color: var(--faint); font-size: 12px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; background: #F6F5FC; border-radius: 10px; font-size: 13px; }
.row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-ok { background: var(--mint-ink); }
.dot-warn { background: #C2410C; }
.dot-info { background: var(--accent); }
.dot-busy { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.progress { height: 6px; border-radius: 3px; background: #EEEDF6; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

.chart { height: 150px; display: flex; align-items: flex-end; gap: 12px; padding: 0 4px; }
.col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.col i { display: block; background: #CFC6F7; border-radius: 6px 6px 0 0; }
.col i.neg { background: #F5C9A8; }
.col i.hi { background: var(--accent); }
.col span { font-size: 11px; color: var(--faint); text-align: center; border-top: 1px solid #EEEDF6; padding-top: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg span { font-size: 12px; font-weight: 600; color: var(--muted); background: #F6F5FC; padding: 6px 10px; border-radius: 999px; }
.seg b { color: var(--ink); font-variant-numeric: tabular-nums; }
.seg b.neg { color: #B45309; }

.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.ledger > div { background: #F6F5FC; border-radius: 12px; padding: 12px 16px; }
.ledger h4 { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.ledger p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed #E2DFF0; }
.ledger b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger p.total { border-bottom: 0; font-weight: 800; }
.ledger p.total b { font-weight: 800; }

.table { border: 1px solid #EEEDF6; border-radius: 12px; overflow-x: auto; font-size: 13px; }
.table p { display: grid; grid-template-columns: var(--cols); gap: 10px; min-width: 520px; margin: 0; padding: 9px 14px; border-top: 1px solid #F1F0F7; font-variant-numeric: tabular-nums; }
.table p > * { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table p > :first-child { text-align: left; }
.table b { font-weight: 600; }
.table p.th { border-top: 0; background: #F6F5FC; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.table p.total { background: #FAF9FF; font-weight: 800; }
.table p.total b { font-weight: 800; }
.table p.muted-row { color: var(--faint); }
.t-day { --cols: 56px 104px minmax(0, 1fr) 90px 90px; }
.t-ledger { --cols: 56px minmax(0, 1fr) 90px 90px 120px; }
.t-trial { --cols: minmax(0, 1fr) 110px 110px; }
.t-hold { --cols: minmax(0, 1fr) 50px 90px 90px 90px; }
.t-gains { --cols: minmax(0, 1fr) 50px 90px 60px 80px; }
.t-trade { --cols: minmax(0, 1fr) 60px 80px 80px 80px; }
.t-day p > :nth-child(2), .t-day p > :nth-child(3), .t-ledger p > :nth-child(2),
.t-gains p > :nth-child(3), .t-gains p > :nth-child(4) { text-align: left; }

.rating { display: flex; flex-wrap: wrap; gap: 14px; }
.grade { flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border-radius: 14px; background: var(--accent); color: #fff; }
.grade strong { font-size: 48px; line-height: 1; font-weight: 800; }
.grade span { margin-top: 8px; font-size: 12px; color: var(--accent-tint); }
.rating .list { flex: 1 1 260px; }
.history { display: flex; gap: 8px; }
.history span { flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: #F6F5FC; font-size: 12px; color: var(--faint); }
.history b { display: block; font-size: 18px; color: var(--ink); }
.history .on { background: var(--soft); }
.history .on b { color: var(--accent); }

/* New voucher: drawn like the app's form (not real controls). */
.voucher { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border: 1px solid #E6E3F2; border-radius: 12px; font-size: 13px; }
.vf { display: flex; align-items: center; gap: 14px; }
.vl { flex: 0 0 76px; color: var(--muted); }
.in { display: block; min-height: 30px; padding: 5px 10px; border: 1px solid #DDD9EE; border-radius: 7px; background: #fff; }
.in-date { width: 130px; }
.in-wide { flex: 1; border-color: var(--accent); }
.tabs { display: inline-flex; padding: 3px; border: 1px solid #E6E3F2; border-radius: 9px; background: #F6F5FC; }
.tabs span { padding: 4px 12px; border-radius: 7px; color: var(--muted); }
.tabs .on { background: #fff; color: var(--accent); font-weight: 700; box-shadow: 0 1px 2px rgba(30, 27, 58, 0.12); }
.vbody { display: none; flex-direction: column; gap: 12px; }
.vbody.on { display: flex; animation: fade-in 0.3s ease; }
@keyframes fade-in { from { opacity: 0; } }
.tabs span { transition: background 0.2s, color 0.2s; }
.vlines { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.vlines p { display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px 70px; gap: 8px; align-items: center; margin: 0; font-variant-numeric: tabular-nums; }
.vlines .vh { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.vlines .amt { text-align: right; }
.vlines .vt { font-weight: 800; }
.vlines .vt span:nth-child(2), .vlines .vt span:nth-child(3) { text-align: right; padding-right: 11px; }
.sel { position: relative; padding-right: 26px; }
.sel::after { content: ""; position: absolute; right: 10px; top: 50%; margin-top: -2px; border: 5px solid transparent; border-top-color: var(--ink); }
.ghost { padding: 5px 10px; border: 1px solid #DDD9EE; border-radius: 7px; background: #fff; text-align: center; color: var(--ink); }
.vbtns { display: flex; gap: 10px; margin-top: 4px; }
.fake-btn { padding: 6px 14px; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; }

.hbars p { display: grid; grid-template-columns: 120px minmax(0, 1fr) 70px; gap: 12px; align-items: center; margin: 0 0 12px; font-size: 13px; }
.hbars i { display: block; height: 14px; border-radius: 7px; background: #CFC6F7; }
.hbars p:first-child i { background: var(--accent); }
.hbars b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* On the home page the tour fits the window whole; the menu and long pages scroll inside it. */
.tour-section { padding-top: 48px; }
.tour-section h2 { margin-bottom: 20px; }
.tour-section .app { display: flex; flex-direction: column; margin: 0 auto; height: clamp(400px, calc(100vh - 130px), 820px); height: clamp(400px, calc(100svh - 130px), 820px); }
.tour-section .app-bar, .tour-section .slider-controls, .tour-section .app figcaption { flex: none; }
.tour-section .app-body { flex: 1 1 auto; min-height: 0; }
.tour-section .app-menu, .tour-section .slides { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #D9D5EE transparent; }

/* Tour controls */
.slider-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid #EEEDF6; }
.app:not(.ready) .slider-controls { display: none; }
.ctl { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #E4E1F2; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.ctl:hover { background: var(--soft); }
.ctl .i-play, .app.is-paused .ctl .i-pause { display: none; }
.app.is-paused .ctl .i-play { display: block; }
.dots { display: flex; flex-wrap: wrap; margin-left: 6px; }
.dots button { width: 22px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.dots button::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: #D9D5EE; transition: width 0.3s, background 0.3s; }
.dots button[aria-current="true"]::before { width: 18px; background: var(--accent); }
.slide-label { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.app figcaption { padding: 12px 20px; font-size: 13px; color: var(--faint); border-top: 1px solid #EEEDF6; }

/* Brokers */
.brokers { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-bottom: 16px; }
.brokers p { font-size: 14px; font-weight: 600; color: var(--faint); }
.brokers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.brokers li { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 8px 20px 8px 10px; font-weight: 700; }
/* Brokers' own site icons, in brokers/. */
.logo { width: 28px; height: 28px; flex: none; object-fit: contain; border-radius: 6px; }
.logo-px { image-rendering: pixelated; }   /* HDFC Securities only publishes a 16 px icon */
.brokers .soon-label { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.brokers .soon { max-width: 860px; }
.brokers .soon li { background: transparent; border: 1.5px dashed #D3CFE6; color: var(--muted); font-weight: 600; }
.brokers .soon .logo { opacity: 0.75; }

/* Steps */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.card p { color: var(--muted); }
.num { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.num-done { background: var(--mint); color: var(--mint-ink); }

/* Features */
.panel { background: var(--soft); border-radius: 32px; padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; gap: 32px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px 36px; }
.features article { display: flex; flex-direction: column; gap: 8px; }
.features h3 { font-size: 20px; }
.features p { color: var(--muted); }

/* Pricing: the seller's plans, filled in when the site is generated */
#pricing .lead { margin: 14px auto 0; }
.plans { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan { background: var(--surface); border-radius: var(--radius); padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.plan h3 { font-size: 20px; }
.plan-price { font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.plan ul { list-style: none; margin: 6px 0 0; padding: 14px 0 0; border-top: 1px solid #EEEDF6; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 15px; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan-note { margin-top: 22px; color: var(--faint); font-size: 14px; }

/* FAQ */
#faq h2 { margin-bottom: 26px; }
details { background: var(--surface); border-radius: 18px; padding: 0 24px; margin-bottom: 14px; }
summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; font-weight: 700; font-size: 17px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 500; color: var(--accent); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); padding-bottom: 20px; }

/* Download */
#download { padding-bottom: 88px; }
.cta { background: var(--accent); color: #fff; border-radius: 32px; padding: clamp(40px, 6vw, 56px) 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.cta h2 { font-size: clamp(32px, 5vw, 42px); }
.cta p { font-size: 17px; color: var(--accent-tint); }
.cta small { font-size: 14px; color: var(--accent-tint); }
.cta .btn-white:hover { color: var(--accent-dark); }

/* User manual: contents on the left (sticky), the guide on the right; one column on phones. */
.manual-hero { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding-top: 40px; padding-bottom: 40px; }
.manual-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; }
.manual { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 88px; }
.toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; background: var(--surface); border-radius: 18px; padding: 16px 12px; }
.toc summary { list-style: none; padding: 0 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc details { padding: 0; margin: 0; background: none; border-radius: 0; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 5px 10px; border-radius: 8px; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.toc a::before { content: counter(toc); min-width: 16px; color: var(--faint); font-variant-numeric: tabular-nums; }
.toc a:hover { background: #F1EFFB; color: var(--ink); }
.toc a[aria-current="true"] { background: var(--soft); color: var(--accent); font-weight: 700; }

.doc { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.doc > section { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); scroll-margin-top: 20px; }
.doc h2 { display: flex; align-items: center; gap: 14px; font-size: clamp(24px, 3vw, 30px); margin-bottom: 16px; }
.sec-num { flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--soft); color: var(--accent); display: grid; place-items: center; font-size: 16px; font-weight: 800; }
.doc h3 { font-size: 18px; margin: 26px 0 10px; }
.doc p, .doc li, .doc dd { color: var(--muted); }
.doc p + p, .doc p + ul, .doc ul + p, .doc ol + p, .doc p + ol, .doc p + dl, .doc dl + p, .doc .note + p, .doc p + .note, .doc ol + .note, .doc ul + .note, .doc dl + .note { margin-top: 12px; }
.doc b { color: var(--ink); font-weight: 700; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc li > ul, .doc dd > ul, .doc dd > ol { margin-top: 6px; }
.doc code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.88em; background: #F3F1FB; color: var(--ink); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
kbd { font-family: inherit; font-size: 0.85em; font-weight: 700; padding: 1px 7px; border: 1px solid #D9D5EE; border-bottom-width: 2px; border-radius: 6px; background: #fff; color: var(--ink); }
.link-like { color: var(--accent); text-decoration: underline; }

/* Numbered steps */
.doc ol.howto { list-style: none; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.doc ol.howto > li { counter-increment: step; position: relative; padding-left: 42px; margin: 0; }
.doc ol.howto > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 9px; background: var(--soft); color: var(--accent); font-weight: 800; font-size: 14px; display: grid; place-items: center; }

/* Screen-by-screen descriptions */
.terms { margin: 0; display: flex; flex-direction: column; }
.terms dt { font-weight: 700; color: var(--ink); padding-top: 14px; border-top: 1px solid #EEEDF6; }
.terms dt:first-child { padding-top: 0; border-top: 0; }
.terms dd { margin: 4px 0 14px; }
.terms dd:last-child { margin-bottom: 0; }

.note { background: var(--mint); color: var(--mint-ink); border-radius: 14px; padding: 14px 18px; font-size: 15px; }
.note b { color: inherit; }
.note-warn { background: #FFF1E6; color: #8A3B0B; }

.doc details { background: #F6F5FC; border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
.doc details:last-child { margin-bottom: 0; }
.doc summary { font-size: 16px; padding: 16px 32px 16px 0; }
.doc details p { padding-bottom: 16px; }

@media (max-width: 900px) {
  .manual { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; max-height: none; }
  .toc summary { padding-bottom: 0; padding-right: 32px; }
  .toc details summary::after { right: 6px; font-size: 20px; }
  .toc details[open] summary { padding-bottom: 8px; }
}

/* Footer */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding-bottom: 40px; font-size: 14px; color: var(--faint); }
.footer-logo { flex-basis: 100%; }
.footer-logo img { display: block; height: 80px; width: auto; max-width: 100%; object-fit: contain; }
.footer-logo .brand-word { font-size: 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: inherit; }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .nav { justify-content: center; }
  .nav-links { justify-content: center; }
  .footer { justify-content: center; text-align: center; }
  .footer-links, .footer-logo .brand-word { justify-content: center; }
  .slides { padding: 18px 16px; min-height: 520px; }
  .app-bar em { display: none; }
  .dots { display: none; }
}

/* Too narrow for the app's menu: the tour runs on the controls alone. */
@media (max-width: 760px) {
  .app-menu, .cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
  .slide, .cursor, .dots button::before { transition: none; }
  .sk, .spinner, .dot-busy { animation: none; }
}
/* The manual's contents only fold on phones. */
@media (min-width: 901px) {
  .toc summary { pointer-events: none; }
  .toc details summary::after, .toc details[open] summary::after { content: none; }
}
