/* Layout: a dark trading app. A sign-in screen first; then one column, phone first, with four views (five for the owner) behind a glass tab bar (bottom on phones, a pill row under the header on wider screens). Cards float on a deep navy ground with a soft blue glow at the top. This design commits to a single dark look. */
:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --bg-2: #10141c;
  --card: #151a24;
  --card-2: #1b2130;
  --line: #242b3a;
  --line-2: #2f3747;
  --ink: #e9edf5;
  --muted: #8b94a7;
  --accent: #4f7cff;
  --accent-2: #86a4ff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 124, 255, .14);
  --accent-glow: rgba(79, 124, 255, .38);
  --up: #19d28a;
  --up-soft: rgba(25, 210, 138, .14);
  --up-glow: rgba(25, 210, 138, .45);
  --down: #ff4d5a;
  --down-soft: rgba(255, 77, 90, .14);
  --down-glow: rgba(255, 77, 90, .45);
  --warn: #ffb224;
  --warn-soft: rgba(255, 178, 36, .14);
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body {
  background: radial-gradient(900px 480px at 50% -120px, rgba(79, 124, 255, .22), transparent 70%), var(--bg);
  color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5;
}
.wrap {
  max-width: 640px; margin: 0 auto;
  padding-block: 22px calc(96px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 16px;
}
.app { display: grid; gap: 16px; min-width: 0; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.view { display: grid; gap: 16px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); text-shadow: 0 0 16px var(--up-glow); }
.down { color: var(--down); text-shadow: 0 0 16px var(--down-glow); }
.t-good { color: var(--up); } .t-accent { color: var(--accent-2); } .t-warn { color: var(--warn); } .t-bad { color: var(--down); }

/* sign in */
.login { display: grid; justify-items: center; padding-block: 8vh 24px; }
.login-card { width: 100%; max-width: 400px; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 22px; padding: 28px 22px; display: grid; gap: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.login-card .logo { width: 56px; height: 56px; border-radius: 16px; justify-self: center; }
.login-card .logo svg { width: 30px; height: 30px; }
.login-card h1 { text-align: center; font-size: 1.8rem; }
.login-card .lede { text-align: center; }
.login-card form { display: grid; gap: 12px; }
.ok-msg { background: var(--up-soft); color: var(--up); border: 1px solid rgba(25, 210, 138, .35); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; }
.login-card form { display: grid; gap: 12px; }
.social { display: grid; gap: 10px; }
.social .btn { display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; }
.social-g { background: #ffffff; color: #1f2430; border-color: #ffffff; }
.social-a { background: #000000; color: #ffffff; border-color: #2a2f3a; }
.soon { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.social-g .soon { background: #e9edf5; color: #4a5368; }
.social p { text-align: center; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-card .link { justify-self: center; }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, #6b93ff, #3a63e8); box-shadow: 0 6px 18px var(--accent-glow); display: grid; place-items: center; color: var(--accent-ink); flex: none; }
.logo svg { width: 20px; height: 20px; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; }
.lede { color: var(--muted); font-size: 14px; margin-top: 1px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px 6px 9px; white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pill.ok i { background: var(--up); box-shadow: 0 0 10px var(--up-glow); }
.pill.off i { background: var(--warn); }
.pill.owner { color: var(--accent-2); border-color: rgba(79, 124, 255, .4); }
.pill.owner i { background: var(--accent-2); box-shadow: 0 0 10px var(--accent-glow); }

/* tabs */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(11, 14, 20, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-block: 8px calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
}
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; max-width: 640px; margin: 0 auto; }
.tabs.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab { display: grid; justify-items: center; gap: 3px; font: 600 11.5px var(--font-body); letter-spacing: .02em; color: var(--muted); background: transparent; border: 0; border-radius: 12px; padding: 4px 2px; cursor: pointer; }
.tab .ic { width: 44px; height: 28px; border-radius: 999px; display: grid; place-items: center; }
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--accent-2); }
.tab.on .ic { background: var(--accent-soft); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 720px) {
  .wrap { padding-block: 28px 56px; }
  .tabbar { position: static; background: transparent; backdrop-filter: none; border: 0; padding: 0; }
  .tabs, .tabs.five { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; max-width: none; }
  .tab { grid-auto-flow: column; align-items: center; gap: 8px; font-size: 14px; padding: 8px 16px; border-radius: 999px; }
  .tab .ic { width: auto; height: auto; background: none; }
  .tab.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px var(--accent-glow); }
  .tab.on .ic { background: none; }
  .tab svg { width: 18px; height: 18px; }
}

/* cards */
.card { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 18px; padding: 18px; min-width: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.card-head .sub { font-size: 13px; color: var(--muted); }

/* check */
.big {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, #6189ff, #3f6cf2); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  min-height: 60px; border-radius: 16px; padding: 12px 18px; cursor: pointer; text-align: center;
  box-shadow: 0 10px 28px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.big svg { width: 24px; height: 24px; flex: none; }
.big.off { opacity: .45; cursor: not-allowed; box-shadow: none; }
.big.over, .big:focus-within { outline: 2px solid var(--accent-2); outline-offset: 4px; }
.hint { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: -4px; }
.notice { background: var(--warn-soft); color: var(--warn); border: 1px solid rgba(255, 178, 36, .3); border-radius: 12px; padding: 11px 14px; font-size: 14.5px; }
.report { display: grid; gap: 16px; }
.top-row { display: flex; gap: 18px; align-items: center; }
.ring { width: 118px; height: 118px; flex: none; display: block; }
.ring .track { fill: none; stroke: var(--line-2); stroke-width: 9; stroke-linecap: round; }
.ring .arc { fill: none; stroke: currentColor; stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 8px currentColor); }
.ring .n { font-family: var(--font-mono); font-weight: 600; font-size: 34px; fill: var(--ink); text-anchor: middle; }
.ring .d { font-family: var(--font-body); font-weight: 600; font-size: 11px; fill: var(--muted); text-anchor: middle; letter-spacing: .08em; }
.word { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.01em; }
.trade { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-top: 6px; }
.stamp { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; margin-bottom: 8px; }
.verdict { font-size: 1.05rem; line-height: 1.5; text-wrap: pretty; }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.readouts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 420px) { .readouts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.readout { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px 10px; min-width: 0; }
.readout .k { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.readout .v { font-family: var(--font-mono); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.3; }
.readout .v small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--muted); font-weight: 500; }
.rr { font-size: 14.5px; color: var(--muted); margin-top: -6px; }
.sec h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sec ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sec li { position: relative; padding-left: 18px; }
.sec li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.sec.good li::before { background: var(--up); box-shadow: 0 0 8px var(--up-glow); }
.sec.risky li::before { background: var(--down); box-shadow: 0 0 8px var(--down-glow); }
.sec.next li::before { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-glow); }
.foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13.5px; color: var(--muted); }
.foot-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.busy { display: flex; gap: 14px; align-items: center; }
.busy img { width: 84px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; background: var(--bg-2); }
.spin { width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--accent-2); border-radius: 50%; animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { color: var(--down); font-size: 14.5px; }

/* buttons & inputs */
.btn { font: 700 15px var(--font-body); cursor: pointer; border-radius: 12px; padding: 11px 16px; border: 1px solid transparent; min-height: 44px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px var(--accent-glow); }
.btn.primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: var(--bg-2); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--accent-2); }
.btn.sm { font-size: 13.5px; padding: 7px 12px; min-height: 36px; border-radius: 10px; }
.link { background: none; border: 0; color: var(--accent-2); font: 700 13.5px var(--font-body); cursor: pointer; padding: 4px 0; }
.link.danger { color: var(--down); }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
input[type="number"], input[type="text"], input[type="email"], input[type="password"], select { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0; }
input[type="number"] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 480px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* chat */
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 90%; padding: 11px 14px; border-radius: 16px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; font-size: 15.5px; }
.msg.user { align-self: flex-end; background: linear-gradient(180deg, #6189ff, #3f6cf2); color: var(--accent-ink); border-bottom-right-radius: 5px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg p { margin: 0; }
.msg p + p, .msg p + ul, .msg p + ol, .msg ul + p, .msg ol + p { margin-top: 8px; }
.msg ul, .msg ol { margin: 0; padding-left: 20px; }
.msg li + li { margin-top: 4px; }
.msg code { font-family: var(--font-mono); font-size: 13px; background: var(--card-2); padding: 1px 5px; border-radius: 5px; }
.msg .mnote { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.dots { display: inline-flex; gap: 5px; align-items: center; height: 1.5em; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick button { font: 600 13.5px var(--font-body); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); cursor: pointer; }
.quick button:hover { border-color: var(--accent-2); color: var(--accent-2); }
.quick button:disabled { opacity: .5; cursor: default; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 16px; line-height: 1.4; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg-2); color: var(--ink); max-height: 140px; }
.composer textarea:disabled { opacity: .6; }
.chat { display: grid; gap: 12px; }

/* journal & lists */
.jlist { display: grid; gap: 10px; }
.trow { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; }
.trow img, .trow .ph { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; background: var(--card-2); display: block; }
.trow .ph { display: grid; place-items: center; font: 600 10px var(--font-mono); color: var(--muted); text-align: center; }
.trow .body { display: grid; gap: 8px; min-width: 0; }
.trow .tl { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; min-width: 0; }
.trow .tl b { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.badge { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; padding: 2px 8px; border-radius: 999px; flex: none; }
.badge.t-good { background: var(--up-soft); } .badge.t-bad { background: var(--down-soft); } .badge.t-warn { background: var(--warn-soft); } .badge.t-accent { background: var(--accent-soft); }
.trow .date { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.trow .vd { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res { display: inline-flex; background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.res button { font: 700 12.5px var(--font-body); padding: 5px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.res button.on.open { background: var(--card-2); color: var(--ink); }
.res button.on.win { background: var(--up); color: #06120c; box-shadow: 0 0 12px var(--up-glow); }
.res button.on.loss { background: var(--down); color: #fff; box-shadow: 0 0 12px var(--down-glow); }
.trow .acts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.note-in { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); width: 100%; }
.review { background: var(--accent-soft); border: 1px solid rgba(79, 124, 255, .3); border-radius: 12px; padding: 12px 14px; font-size: 15.5px; }
.review p { margin: 0; } .review p + p, .review ul { margin-top: 8px; } .review ul { margin-bottom: 0; padding-left: 20px; }
.empty { color: var(--muted); }
.tool { display: grid; gap: 14px; }
.urow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font: 700 15px var(--font-display); }
.urow .nm { font-weight: 700; overflow-wrap: anywhere; }
.urow .meta { font-size: 13px; color: var(--muted); }
.urow .nums { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.kv { display: grid; gap: 8px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.kv div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; overflow-wrap: anywhere; }

/* checklist with switches */
.checks { display: grid; }
.chk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.chk:last-child { border-bottom: 0; }
.chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { position: relative; width: 46px; height: 26px; border-radius: 13px; background: var(--line-2); flex: none; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.chk input:checked + .sw { background: var(--up); box-shadow: 0 0 12px var(--up-glow); }
.chk input:checked + .sw::after { transform: translateX(20px); }
.chk input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.moods { display: flex; gap: 8px; flex-wrap: wrap; }
.moods button { font: 600 14px var(--font-body); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); cursor: pointer; }
.moods button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }
.signal { border-radius: 14px; padding: 12px 14px; border: 1px solid; }
.signal.go { background: var(--up-soft); border-color: rgba(25, 210, 138, .35); }
.signal.wait { background: var(--warn-soft); border-color: rgba(255, 178, 36, .35); }
.signal b { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; display: block; }
.signal.go b { color: var(--up); text-shadow: 0 0 14px var(--up-glow); }
.signal.wait b { color: var(--warn); }
.signal span { display: block; font-size: 14px; margin-top: 2px; color: var(--ink); }
.range { display: grid; gap: 4px; }
.range .lab { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); align-items: baseline; }
.range .lab b { font-family: var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.spark { width: 100%; height: auto; display: block; }
.spark .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.spark .area { opacity: .18; }
.spark .g { stroke: var(--line); stroke-width: 1; }
.spark .base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.spark text { font: 600 11px var(--font-mono); fill: var(--muted); }
.what-out { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; }

/* learn */
.lessons { display: grid; gap: 10px; }
details.lesson { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
details.lesson summary { cursor: pointer; padding: 14px 0; font-family: var(--font-display); font-weight: 600; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
details.lesson summary::-webkit-details-marker { display: none; }
details.lesson summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(45deg); flex: none; margin-right: 4px; transition: transform .2s; }
details.lesson[open] summary::after { transform: rotate(-135deg); }
details.lesson .lb { padding: 0 0 16px; display: grid; gap: 12px; }
details.lesson .lb p { color: #cdd4e1; }

@media (prefers-reduced-motion: reduce) { .spin, .dots i { animation: none; } .sw, .sw::after, details.lesson summary::after { transition: none; } }

/* settings */
.top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--muted); cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover, .icon-btn.on { color: var(--accent-2); border-color: rgba(79, 124, 255, .45); }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; margin-top: -6px; }
.acct-row { display: flex; gap: 12px; align-items: center; }
.big-av { width: 48px; height: 48px; font-size: 18px; flex: none; }
.acct-row .nm { font-weight: 700; overflow-wrap: anywhere; }
.btn.danger-btn { color: var(--down); border-color: rgba(255, 77, 90, .4); }
.btn.danger-btn:hover { border-color: var(--down); }
@media (max-width: 380px) { .top-right .pill { display: none; } }

/* credits */
.credit-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-top: -4px; }
.cb-count { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); }
.cb-count svg { width: 16px; height: 16px; color: var(--warn); filter: drop-shadow(0 0 6px rgba(255, 178, 36, .5)); }
.cb-count b { font-family: var(--font-mono); color: var(--ink); font-size: 16px; }
.credit-bar.low { border-color: rgba(255, 178, 36, .45); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; display: grid; gap: 6px; align-content: start; position: relative; }
.plan.best { border-color: rgba(79, 124, 255, .6); box-shadow: 0 0 0 1px rgba(79, 124, 255, .25), 0 8px 24px rgba(79, 124, 255, .15); }
.plan.current { border-color: rgba(25, 210, 138, .55); }
.plan .pn { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.plan .pp { font-family: var(--font-mono); font-weight: 600; font-size: 1.35rem; }
.plan .pp small { font-family: var(--font-body); font-size: 12.5px; color: var(--muted); font-weight: 500; }
.plan .pc { font-size: 14px; color: var(--muted); }
.plan .btn { margin-top: 6px; width: 100%; }
.plan .ribbon { position: absolute; top: -9px; right: 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 8px; }
.paywall { display: grid; gap: 14px; }
.paywall .word { font-size: 1.3rem; }
.fine a { color: var(--accent-2); text-decoration: none; }
.fine a:hover { text-decoration: underline; }
