@font-face { font-family: "Inter"; src: url(/assets/fonts/inter.3100e775e8.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-ext.34b9c504ca.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+1E00-1EFF, U+0100-024F; }
@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/mono.18be452724.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --black: #000;
  --well: rgba(255, 255, 255, 0.028);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --gold: #e9c063;
  --gold-soft: rgba(233, 192, 99, 0.13);
  --on-gold: #1c1503;
  --bull: #19aa8e;
  --bear: #c04448;
  --bull-text: #5fd9be;
  --bear-text: #f59a9c;
  --blue-text: #8dbdf0;
  --radius: 22px;
  --radius-sm: 14px;
  --top-h: 56px;
  --tab-h: 62px;
  --float: 10px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --glass-fill: linear-gradient(160deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.022) 36%, rgba(255, 255, 255, 0.012) 64%, rgba(255, 255, 255, 0.035) 100%);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 0 24px rgba(255, 255, 255, 0.02), 0 18px 50px rgba(0, 0, 0, 0.7);
  --chrome-fill: rgba(14, 14, 16, 0.56);
  --chrome-blur: blur(28px) saturate(190%);
  --chrome-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.04), inset 0 0 20px rgba(255, 255, 255, 0.03), 0 20px 50px rgba(0, 0, 0, 0.75);
  /* Liquid Glass: bright edge top left and bottom right, like light caught in a lens. */
  --lg-rim: linear-gradient(150deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 16%, rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0.035) 62%, rgba(255, 255, 255, 0.09) 84%, rgba(255, 255, 255, 0.24) 100%);
  --lg-rim-gold: linear-gradient(150deg, rgba(255, 246, 220, 0.95) 0%, rgba(255, 236, 190, 0.35) 30%, rgba(160, 110, 20, 0.2) 70%, rgba(255, 230, 170, 0.6) 100%);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 0.8, 0.28, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--black); scroll-padding-top: calc(var(--top-h) + 28px); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.side, .search, .table-wrap { scrollbar-width: thin; }
body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
  hyphens: auto;
  padding-bottom: calc(var(--tab-h) + 30px + env(safe-area-inset-bottom));
}
/* Glass needs something to catch: black with a faint gold shimmer that drifts very slowly. */
body::before, body::after {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
body::before {
  background:
    radial-gradient(34vmax 28vmax at 22% 18%, rgba(233, 192, 99, 0.1), transparent 70%),
    radial-gradient(30vmax 24vmax at 82% 34%, rgba(200, 128, 13, 0.065), transparent 70%),
    radial-gradient(40vmax 30vmax at 50% 92%, rgba(233, 192, 99, 0.055), transparent 70%);
  animation: drift-a 64s ease-in-out infinite alternate;
}
body::after {
  background:
    radial-gradient(24vmax 20vmax at 70% 72%, rgba(255, 214, 140, 0.045), transparent 70%),
    radial-gradient(22vmax 18vmax at 14% 78%, rgba(176, 120, 40, 0.055), transparent 70%);
  animation: drift-b 48s ease-in-out infinite alternate;
}
@keyframes drift-a {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
  100% { transform: translate3d(-3vmax, 5vmax, 0) scale(1.03); }
}
@keyframes drift-b {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(-5vmax, -4vmax, 0) rotate(8deg); }
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #f5d78d; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(233, 192, 99, 0.3); }
.i { width: 1em; height: 1em; fill: currentColor; flex: none; vertical-align: -0.125em; }
.mono { font-family: var(--mono); font-size: 0.8125rem; }
.muted { color: var(--text-3); }
.tone-bull { color: var(--bull-text); }
.tone-bear { color: var(--bear-text); }
.tone-gold { color: var(--gold); }

/* Shared glass. Cards fake it with light and edge, because real blur on every card would stutter on phones. */
.callout, .card, .sec-card, .toc, .lc, .quiz, .pattern, .pg-card, .calc, .clock, .trainer, .replay,
.journal-form, .tv-gate, .stat, .pn, .table-wrap, .check-item label {
  background: var(--glass-fill);
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow);
}
.card, .sec-card, .pg-card, .pn { transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease; }

.skip { position: fixed; left: 12px; top: -70px; z-index: 100; background: var(--gold); color: var(--on-gold); padding: 8px 14px; border-radius: 999px; }
.skip:focus { top: 12px; }
.read-bar { position: fixed; inset: 0 0 auto; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; z-index: 60; }

/* Floating top bar */
.top {
  position: sticky; top: var(--float); z-index: 40;
  display: flex; align-items: center; gap: 6px;
  height: var(--top-h); margin: var(--float) 12px 0; padding: 0 8px 0 10px;
  background: var(--chrome-fill);
  border-radius: 999px;
  box-shadow: var(--chrome-shadow);
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-flex; align-items: center; gap: 3px; height: 26px; }
.brand-mark i { display: block; width: 6px; border-radius: 2px; background: var(--bear); height: 12px; }
.brand-mark i:nth-child(2) { background: var(--gold); height: 24px; }
.brand-mark i:nth-child(3) { background: var(--bull); height: 16px; }
.brand-text { display: flex; flex-direction: column; font-weight: 650; font-size: 1rem; line-height: 1.1; letter-spacing: -0.015em; hyphens: none; }
.brand-text small { font: 450 0.6875rem/1.3 var(--sans); color: var(--text-3); letter-spacing: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: none; border: 0; border-radius: 50%; color: var(--text-2); cursor: pointer; font-size: 1.125rem;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.search-open {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px; background: var(--surface-2); border: 0;
  border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--text-2); cursor: pointer; font-size: 0.875rem;
}
.search-open:hover { background: rgba(255, 255, 255, 0.13); color: var(--text); }

/* Shell and navigation */
.side {
  position: fixed; inset: var(--float) auto var(--float) var(--float); z-index: 70;
  width: min(84vw, 330px); padding: 8px 8px 32px;
  background: rgba(22, 22, 25, 0.72);
  border-radius: 26px;
  box-shadow: var(--chrome-shadow);
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-110%); transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.28, 1); visibility: hidden;
}
.nav-open .side { transform: none; visibility: visible; }
.nav-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.22s ease; }
.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
.nav-open { overflow: hidden; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px 14px; }
.nav-sec summary {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 12px;
  border-radius: var(--radius-sm); cursor: pointer; list-style: none; font-weight: 550; font-size: 0.9375rem;
}
.nav-sec summary::-webkit-details-marker { display: none; }
.nav-sec summary:hover { background: var(--surface); }
.nav-sec summary .i:first-child { color: var(--text-2); width: 1.1em; }
.nav-sec[open] summary .i:first-child { color: var(--gold); }
.nav-caret { margin-left: auto; font-size: 0.75rem; color: var(--text-3); transition: transform 0.15s ease; }
.nav-sec[open] .nav-caret { transform: rotate(180deg); }
.nav-sec ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 18px; }
.nav-sec li a {
  display: flex; align-items: center; min-height: 38px; padding: 6px 12px;
  border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 0.9rem; line-height: 1.3; hyphens: none;
}
.nav-sec li a:hover { color: var(--text); background: var(--surface); }
.nav-sec li a[aria-current] { color: var(--text); background: var(--surface-2); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.nav-sec li a.is-read::after { content: ""; flex: none; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--bull); }

main { padding: 24px 16px 32px; min-width: 0; }

/* Lesson header */
.doc-head { max-width: 44rem; margin-bottom: 24px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; color: var(--text-3); font: 450 0.8125rem/1.5 var(--sans); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .mono { margin-left: auto; color: var(--text-2); font-size: 0.75rem; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { margin: 10px 0 10px; font-size: clamp(2rem, 7.5vw, 2.75rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.032em; }
.lede { margin: 0; color: var(--text-2); font-size: 1.125rem; line-height: 1.5; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; color: var(--text-3); font-size: 0.8125rem; }
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ticks { display: flex; align-items: center; gap: 3px; height: 14px; margin-top: 16px; }
.tick { display: block; flex: 1 1 0; max-width: 22px; height: 4px; border-radius: 999px; background: var(--line-strong); }
.tick.is-read { background: var(--bull); }
.tick.is-current { height: 8px; background: var(--gold); }
.tick:hover { background: var(--gold); opacity: 0.8; }

/* Prose */
.prose { min-width: 0; }
.prose > * { margin-top: 0; margin-bottom: 1.1em; }
.prose h2 { margin-top: 2.1em; margin-bottom: 0.6em; font-size: 1.5rem; font-weight: 650; display: flex; gap: 10px; align-items: baseline; }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.4em; font-size: 1.1875rem; font-weight: 620; }
.prose h2 .i { color: var(--gold); font-size: 0.875em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--text-3); }
.prose strong { font-weight: 620; color: #fff; }
.prose code { font: 0.875em var(--mono); background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
.h-sm { font-size: 1rem !important; margin-top: 0 !important; }
.term { color: inherit; text-decoration: underline dotted var(--text-3); text-underline-offset: 4px; }

.toc { border-radius: var(--radius-sm); font-size: 0.9rem; }
.toc summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer; font-weight: 550; color: var(--text-2); list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary .i { color: var(--text-3); }
.toc ul { list-style: none; margin: 0; padding: 0 14px 10px; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0; color: var(--text-2); text-decoration: none; line-height: 1.35; hyphens: none; }
.toc a:hover { color: var(--text); }

/* Callouts */
.callout { padding: 16px 18px; border-radius: var(--radius); font-size: 1rem; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-weight: 620; color: var(--text); }
.callout-title .i { color: var(--text-2); }
.callout-tip .callout-title .i, .callout-summary .callout-title .i { color: var(--gold); }
.callout-info .callout-title .i, .callout-phone .callout-title .i, .callout-example .callout-title .i { color: var(--blue-text); }
.callout-warn .callout-title .i, .callout-risk .callout-title .i { color: var(--bear-text); }
.callout-fact .callout-title .i { color: var(--bull-text); }

/* Steps */
.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.step { position: relative; padding: 0 0 18px 46px; margin: 0; counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--line);
  color: var(--text); font: 600 0.8125rem var(--sans);
}
.step:not(:last-child)::after { content: ""; position: absolute; left: 15.5px; top: 38px; bottom: 6px; width: 1px; background: var(--line); }
.step-title { margin: 3px 0 4px; font-weight: 620; }
.step-body > :last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; hyphens: none; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); font-weight: 550; font-size: 0.8125rem; color: var(--text-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-size: 0.875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; background: var(--surface-2); color: var(--text);
  border: 0; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 0 0 1px var(--line);
  cursor: pointer; font-weight: 580; font-size: 0.9375rem; text-decoration: none; hyphens: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.13); color: var(--text); }
.btn-gold {
  background: linear-gradient(180deg, #f3d382 0%, #e4b94e 100%); color: var(--on-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 24px rgba(233, 192, 99, 0.18);
}
.btn-gold:hover { background: linear-gradient(180deg, #f8dd97 0%, #ecc35c 100%); color: var(--on-gold); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; font-weight: 550; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; background: var(--well);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 400 1rem var(--sans); color: var(--text);
}
.field select option { background: #0b0b0d; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.field small { font-weight: 400; color: var(--text-3); }
.read-toggle { width: 100%; }
.read-toggle.is-read { color: var(--bull-text); }

/* Cards */
.cards { display: grid; gap: 10px; }
.card {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px;
  border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.card:hover, .sec-card:hover, .pg-card:hover, .pn:hover { border-color: var(--line-strong); color: var(--text); }
.card-icon {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px;
  background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); color: var(--gold);
}
.card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-body strong { font-weight: 620; }
.card-body span { color: var(--text-2); font-size: 0.875rem; line-height: 1.4; }
.card-state { margin-left: auto; color: var(--line-strong); }
.card.is-read .card-state { color: var(--bull-text); }
.sec-cards { display: grid; gap: 10px; }
.sec-card {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 14px;
  border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.sec-card .card-icon { grid-row: span 3; }
.sec-card strong { font-weight: 620; }
.sec-card > span:not(.card-icon) { color: var(--text-2); font-size: 0.875rem; line-height: 1.4; }
.sec-card small { color: var(--text-3); font-size: 0.75rem; }

/* Pattern and phone figures */
figure { margin-left: 0; margin-right: 0; }
.pattern { border-radius: var(--radius); overflow: hidden; }
.pattern img { width: 100%; max-width: 480px; margin: 0 auto; }
.pattern-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pattern-grid .pattern { margin: 0; }
.pattern-grid figcaption { padding: 8px 12px 12px; font-size: 0.8125rem; }
.pattern-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.pattern-top .pattern { margin: 0; }
.pg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pg-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.pg-card img { width: 100%; }
.pg-name { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 6px 12px 12px; font-size: 0.875rem; line-height: 1.25; }
.pg-name strong { font-weight: 620; }
.pg-name .bias { margin-left: 0; }
.bias { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; font: 600 0.6875rem/1.5 var(--sans); vertical-align: 1px; hyphens: none; white-space: nowrap; }
.pattern-grid .bias { display: table; margin: 3px 0 4px; }
.bias-bullish { color: var(--bull-text); background: rgba(25, 170, 142, 0.16); }
.bias-bearish { color: var(--bear-text); background: rgba(192, 68, 72, 0.22); }
.bias-neutral { color: var(--text-2); background: var(--surface-2); }
figcaption { padding: 10px 16px 14px; color: var(--text-2); font-size: 0.875rem; line-height: 1.45; }
.phone { display: flex; flex-direction: column; align-items: center; }
.ph-frame { width: min(100%, 300px); background: #000; border-radius: 34px; padding: 10px 8px 12px; box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 18px 44px rgba(0, 0, 0, 0.6); }
.ph-status { display: flex; align-items: center; justify-content: space-between; padding: 2px 16px 6px; font: 600 0.6875rem var(--sans); color: var(--text-2); }
.ph-notch { width: 62px; height: 16px; border-radius: 10px; background: #000; box-shadow: inset 0 0 0 1px var(--line); }
.ph-bar { padding: 9px 12px; background: var(--surface-2); border-radius: 18px 18px 0 0; font-weight: 620; font-size: 0.875rem; text-align: center; }
.ph-screen { display: flex; flex-direction: column; gap: 6px; min-height: 180px; padding: 8px; background: var(--surface); border-radius: 0 0 18px 18px; font-size: 0.8125rem; hyphens: none; }
.ph-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.ph-val { font-family: var(--mono); color: var(--text); }
.ph-val.tone-bull { color: var(--bull-text); }
.ph-val.tone-bear { color: var(--bear-text); }
.ph-quote { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.ph-sym { font-family: var(--sans); font-weight: 620; }
.ph-bid { color: var(--bear-text); }
.ph-ask { color: var(--bull-text); }
.ph-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.ph-btn { display: block; padding: 10px 6px; border-radius: 12px; text-align: center; font-weight: 620; color: #fff; }
.ph-btn.tone-bull { background: #127a66; color: #fff; }
.ph-btn.tone-bear { background: #a2363a; color: #fff; }
.ph-btn.tone-gold { background: var(--gold); color: var(--on-gold); }
.ph-text { margin: 4px 6px; color: var(--text-2); line-height: 1.4; }
.ph-tabs { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.ph-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-3); }
.ph-tab small { font-size: 0.5625rem; }
.ph-tab.is-active { color: var(--gold); }

/* Lesson charts */
.lc { border-radius: var(--radius); overflow: hidden; }
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 0; }
.lc-sym { font: 620 0.875rem var(--sans); letter-spacing: -0.005em; }
.lc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; background: var(--surface-2); border-radius: 999px; color: var(--text-2); font-size: 0.6875rem; font-weight: 550; hyphens: none; }
.lc-badge .i { color: var(--gold); }
.lc-readout { min-height: 1.5em; margin: 2px 16px 4px; color: var(--text-3); font: 400 0.6875rem/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.lc-canvas { position: relative; height: 270px; min-width: 0; }
.lc-tall .lc-canvas { height: 400px; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 8px 16px 0; font-size: 0.75rem; color: var(--text-2); }
.lc-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.lc-key { width: 14px; height: 2px; border-radius: 1px; background: currentColor; }
.lc-steps { padding: 14px 16px; border-top: 1px solid var(--line); margin-top: 8px; }
.lc-step-text { min-height: 4.2em; margin: 0 0 12px; font-size: 0.9375rem; line-height: 1.5; }
.lc-ctrl { display: flex; align-items: center; gap: 8px; }
.lc-ctrl .btn { min-height: 44px; flex: 1; }
.lc-count { font: 500 0.75rem var(--sans); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc-table { padding: 0 16px 8px; font-size: 0.8125rem; }
.lc-table summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; color: var(--text-2); }
.lc .table-wrap { max-height: 240px; overflow: auto; background: var(--well); box-shadow: none; }
.lc figcaption a { white-space: nowrap; }

/* Quiz */
.quiz { padding: 18px; border-radius: var(--radius); }
.quiz h2 { margin-top: 0 !important; font-size: 1.25rem; }
.q { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.q legend { padding: 0; margin-bottom: 8px; font-weight: 580; line-height: 1.4; }
.q-opt { display: flex; align-items: flex-start; gap: 10px; min-height: 46px; padding: 11px 14px; margin-bottom: 6px; background: var(--well); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; line-height: 1.4; font-size: 0.9375rem; }
.q-opt:hover { border-color: var(--line-strong); }
.q-opt input { margin-top: 3px; accent-color: var(--gold); flex: none; }
.q-opt.is-right { border-color: var(--bull); }
.q-opt.is-wrong { border-color: var(--bear); }
.q-opt.is-right span::after { content: " (richtig)"; color: var(--bull-text); font-weight: 600; }
.q-opt.is-wrong span::after { content: " (falsch)"; color: var(--bear-text); font-weight: 600; }
.q-why { margin: 8px 0 0; color: var(--text-2); font-size: 0.9rem; }
.quiz-result { margin: 12px 0 0; font-weight: 620; min-height: 1.5em; }

/* Calculators */
.calc { padding: 18px; border-radius: var(--radius); }
.calc-fields { display: grid; gap: 12px; }
.calc-out { margin: 16px 0 0; background: var(--well); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.calc-out div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.calc-out div:last-child { border-bottom: 0; }
.calc-out dt { color: var(--text-2); font-size: 0.875rem; }
.calc-out dd { margin: 0; font-family: var(--mono); font-size: 0.9375rem; font-variant-numeric: tabular-nums; text-align: right; hyphens: none; white-space: nowrap; }
.calc-out .is-main { padding: 15px 14px; background: var(--surface); }
.calc-out .is-main dt { color: var(--text); font-weight: 580; }
.calc-out .is-main dd { color: var(--gold); font-family: var(--sans); font-size: 1.375rem; font-weight: 620; letter-spacing: -0.02em; white-space: nowrap; }
.calc-note { margin: 12px 0 0; color: var(--text-2); font-size: 0.875rem; line-height: 1.45; }
.calc-note.is-warn { color: var(--bear-text); }

/* Session clock */
.clock { padding: 18px; border-radius: var(--radius); }
.clock-now { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.clock-time { font: 600 1.75rem var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.clock-zone { color: var(--text-3); font-size: 0.75rem; }
.clock-status { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 580; }
.clock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.clock-dot.is-open { background: var(--bull); }
.clock-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 30px; font-size: 0.8125rem; color: var(--text-2); }
.clock-row.is-open { color: var(--text); font-weight: 580; }
.clock-track { position: relative; height: 12px; background: var(--well); border-radius: 999px; overflow: hidden; }
.clock-run { position: absolute; top: 0; bottom: 0; background: var(--line-strong); border-radius: 999px; }
.clock-row.is-open .clock-run { background: var(--gold); }
.clock-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text); }
.clock-axis { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; color: var(--text-3); font: 400 0.625rem var(--sans); }
.clock-axis div { display: flex; justify-content: space-between; }
.clock-note { margin: 12px 0 0; color: var(--text-2); font-size: 0.875rem; line-height: 1.45; }
.clock-note strong { color: var(--text); }

/* Checklist */
.check-list { list-style: none; padding: 0 !important; }
.check-item { margin: 0 0 6px; }
.check-item label { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 13px 14px; border-radius: var(--radius-sm); cursor: pointer; line-height: 1.4; font-size: 0.9375rem; }
.check-item input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); flex: none; }
.check-item input:checked + span { color: var(--text-3); text-decoration: line-through; }
.check-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }

/* Trainer */
.trainer { padding: 18px; border-radius: var(--radius); }
.trainer-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--text-2); font: 500 0.8125rem var(--sans); }
.trainer-img { width: 100%; background: var(--well); border-radius: var(--radius-sm); }
.trainer-options { display: grid; gap: 8px; margin-top: 12px; }
.trainer-options .btn { justify-content: flex-start; text-align: left; line-height: 1.3; }
.trainer-options .btn.is-right { color: var(--bull-text); box-shadow: inset 0 0 0 1px var(--bull); }
.trainer-options .btn.is-wrong { color: var(--bear-text); box-shadow: inset 0 0 0 1px var(--bear); }
.trainer-feedback { min-height: 3em; margin: 12px 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.45; }
.trainer-feedback strong { color: var(--text); }

/* Replay */
.replay { border-radius: var(--radius); overflow: hidden; }
.replay-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.replay-stat { padding: 10px 12px; min-width: 0; border-right: 1px solid var(--line); }
.replay-stat:last-child { border-right: 0; }
.replay-stat small { display: block; color: var(--text-3); font-size: 0.6875rem; }
.replay-stat span { font: 600 0.875rem var(--mono); font-variant-numeric: tabular-nums; hyphens: none; }
.replay-chart { height: 280px; min-width: 0; }
.replay-panel { display: grid; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.replay-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.replay-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn-bull { background: linear-gradient(180deg, #179a80 0%, #127a66 100%); color: #fff; }
.btn-bull:hover { background: linear-gradient(180deg, #1aab8e 0%, #148a73 100%); color: #fff; }
.btn-bear { background: linear-gradient(180deg, #bb4347 0%, #a2363a 100%); color: #fff; }
.btn-bear:hover { background: linear-gradient(180deg, #c84c50 0%, #b03c40 100%); color: #fff; }
.replay-msg { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 0.875rem; line-height: 1.4; }

/* Journal */
.journal-form { display: grid; gap: 12px; padding: 18px; border-radius: var(--radius); }
.journal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.journal-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.stat { padding: 13px 14px; border-radius: var(--radius-sm); }
.stat small { display: block; color: var(--text-3); font-size: 0.75rem; }
.stat strong { font-size: 1.25rem; font-weight: 620; letter-spacing: -0.01em; }
.journal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.journal-file { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Live widgets */
.tv-gate { padding: 20px 18px; border-radius: var(--radius); }
.tv-gate h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.0625rem; }
.tv-gate h3 .i { color: var(--gold); }
.tv-gate p { margin: 0 0 12px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.45; }
.tv-actions { display: grid; gap: 8px; }
.tv-frame { display: block; width: 100%; height: 480px; border: 1px solid var(--line); border-radius: var(--radius); background: #0a0a0b; }
.tv-frame.is-tape { height: 78px; }
.tv-frame.is-calendar { height: 620px; }

/* Glossary */
.gl-group h2 { margin-top: 1.4em !important; color: var(--text-3); font: 600 0.9375rem var(--sans); }
.gl-group dl { margin: 0; }
.gl-item { padding: 11px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + 28px); }
.gl-item:target { background: var(--gold-soft); padding-left: 10px; padding-right: 10px; border-radius: 12px; }
.gl-item dt { font-weight: 620; }
.gl-item dd { margin: 2px 0 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }

/* Prev and next */
.related ul { margin: 0; }
.prevnext { display: grid; gap: 10px; margin-top: 16px; }
.pn { display: flex; flex-direction: column; padding: 13px 16px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.pn small { color: var(--text-3); font: 500 0.75rem var(--sans); }
.pn span { font-weight: 580; font-size: 0.9375rem; line-height: 1.3; }
.pn-next { text-align: right; }

/* Footer */
.foot { padding: 28px 16px 28px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.8125rem; line-height: 1.5; }
.foot-risk { display: flex; gap: 10px; max-width: 60rem; margin: 0 0 14px; color: var(--text-2); }
.foot-risk .i { color: var(--gold); margin-top: 3px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--text-2); }
.foot-made { margin: 0; font-size: 0.75rem; }

/* Floating tab bar */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--float) + env(safe-area-inset-bottom)); z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: var(--tab-h); padding: 0 6px;
  background: var(--chrome-fill);
  border-radius: 28px;
  box-shadow: var(--chrome-shadow);
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; border-radius: 22px; color: var(--text-2); text-decoration: none; font-size: 0.6875rem; font-weight: 500; cursor: pointer;
}
.tabbar .i { font-size: 1.125rem; }
.tabbar a:hover, .tabbar button:hover { color: var(--text); }

/* Search */
.search {
  width: min(100vw, 640px); max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0 auto; padding: 0;
  background: rgba(20, 20, 23, 0.78); color: var(--text); border: 0;
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur);
}
.search::backdrop { background: rgba(0, 0, 0, 0.6); }
.search-head { position: sticky; top: 0; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); }
.search-head > .i { color: var(--text-3); }
.search-head input { flex: 1; min-width: 0; height: 44px; background: none; border: 0; outline: 0; font-size: 1rem; }
.search-state { margin: 12px 18px; color: var(--text-3); font-size: 0.875rem; }
.search-results { list-style: none; margin: 0; padding: 0 8px 24px; }
.search-results a { display: block; padding: 11px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a:focus { background: var(--surface-2); color: var(--text); }
.search-results small { display: block; color: var(--text-3); font: 500 0.75rem var(--sans); }
.search-results span { display: block; color: var(--text-2); font-size: 0.8125rem; line-height: 1.4; }

/* Home */
.hero { padding: 16px 0 8px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px; background: var(--surface-2); border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); color: var(--text-2); font: 500 0.75rem var(--sans); }
.hero-kicker .i { color: var(--gold); }
.hero h1 { margin: 0 0 14px; font-size: clamp(2.5rem, 11vw, 4rem); line-height: 1.02; letter-spacing: -0.04em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-lede { margin: 0 0 20px; color: var(--text-2); font-size: 1.125rem; line-height: 1.5; max-width: 34rem; }
.hero-cta { display: grid; gap: 10px; margin-bottom: 24px; }
.home-block { margin-top: 40px; }
.home-block > h2 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 650; }
.home-block > p { margin: 0 0 14px; color: var(--text-2); }
.home-grid > div > h2 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 650; }
.home-grid > div > p { margin: 0 0 14px; color: var(--text-2); }
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: route; }
.route li { position: relative; margin: 0; counter-increment: route; }
.route a { display: flex; align-items: baseline; gap: 12px; min-height: 52px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 580; }
.route a::before { content: counter(route); color: var(--text-3); font: 500 0.8125rem var(--sans); font-variant-numeric: tabular-nums; }
.route a small { margin-left: auto; color: var(--text-3); font-weight: 400; font-size: 0.8125rem; text-align: right; }
.route a:hover { color: var(--gold); }
.home-grid { display: grid; gap: 28px; }

/* Accounts, news, journal, admin */
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gem { display: inline-flex; color: var(--gold); font-size: 0.75em; }
.gem .i { width: 1em; height: 1em; }
.nav-sec li a .gem { margin-left: auto; padding-left: 8px; }
.nav-sec summary .gem { margin-left: 8px; }
.sec-card .gem { margin-left: 6px; font-size: 0.85em; }
.card-state .gem { font-size: 1em; }
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
.top-left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.top-right { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.icon-btn.is-active { color: var(--gold); }
.ticker {
  display: flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px;
  background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--text); text-decoration: none; line-height: 1.15; white-space: nowrap;
}
.ticker:hover { background: rgba(255, 255, 255, 0.13); color: var(--text); }
.ticker-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--text-3); }
.ticker-dot.is-open { background: var(--bull); }
.ticker-body { display: flex; flex-direction: column; }
.ticker strong { font-size: 0.9375rem; font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ticker small { font-size: 0.625rem; color: var(--text-3); }
.nav-quick { display: grid; gap: 2px; padding: 4px 0 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.nav-quick a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 550; font-size: 0.9375rem; }
.nav-quick a:hover { background: var(--surface); }
.nav-quick a .i { color: var(--gold); width: 1.1em; }
.nav-quick a[aria-current] { background: var(--surface-2); }
.auth, .news-card, .admin-row, .cal-entry, .cal-grid, .premium-list li { background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
.auth { display: grid; gap: 12px; padding: 18px; border-radius: var(--radius); }
.auth > :last-child { margin-bottom: 0; }
.auth > p { margin: 0; }
.auth-sub { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--well); border-radius: 999px; }
.tab { flex: 1; min-height: 40px; background: none; border: 0; border-radius: 999px; color: var(--text-2); font-weight: 550; font-size: 0.9rem; cursor: pointer; }
.tab.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.auth .calc-out { margin: 0; }
.auth .calc-out dd { white-space: normal; overflow-wrap: anywhere; }
.auth .calc-out .is-main dd { font-size: 1.125rem; }
.check-line { display: flex; align-items: flex-start; gap: 12px; color: var(--text-2); font-size: 0.9rem; line-height: 1.4; cursor: pointer; }
.check-line input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--gold); }
.premium-list { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.premium-list li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); }
.premium-list .i { color: var(--gold); }
.news-filter { margin-bottom: 12px; }
.news-list { display: grid; gap: 10px; }
.news-card { padding: 16px 18px; border-radius: var(--radius); }
.news-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.news-head .bias { margin-left: 0; }
.news-topic { color: var(--text-3); font-size: 0.75rem; }
.prose .news-title { display: block; margin: 9px 0 6px; font-size: 1.0625rem; font-weight: 620; letter-spacing: -0.01em; line-height: 1.3; hyphens: none; }
.news-title a { color: var(--text); text-decoration: none; }
.news-title a:hover { color: var(--gold); }
.news-impact { margin: 0 0 6px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.news-meta { margin: 0; color: var(--text-3); font-size: 0.75rem; }
.journal-notice:empty { display: none; }
.journal-notice { margin-bottom: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 1.125rem; font-weight: 620; letter-spacing: -0.01em; }
.cal-head .icon-btn { font-size: 1.5rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px; border-radius: var(--radius); }
.cal-wd { padding-bottom: 4px; color: var(--text-3); font-size: 0.6875rem; text-align: center; }
.cal-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 50px; padding: 2px; background: var(--surface); border: 1px solid transparent; border-radius: 12px; color: var(--text); font-size: 0.875rem; cursor: pointer; }
.cal-cell:hover { border-color: var(--line-strong); }
.cal-cell small { color: var(--text-2); font-size: 0.5625rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-cell.is-up { background: rgba(25, 170, 142, 0.16); }
.cal-cell.is-up small { color: var(--bull-text); }
.cal-cell.is-down { background: rgba(192, 68, 72, 0.2); }
.cal-cell.is-down small { color: var(--bear-text); }
.cal-cell.is-today .cal-num { color: var(--gold); font-weight: 700; }
.cal-cell.is-selected { border-color: var(--gold); }
.cal-day { display: grid; gap: 10px; margin-top: 14px; }
.cal-list { display: grid; gap: 8px; }
.cal-entry { padding: 12px 14px; border-radius: var(--radius-sm); }
.cal-entry-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cal-note { margin: 4px 0 6px; color: var(--text-2); font-size: 0.9rem; line-height: 1.45; white-space: pre-wrap; }
.link-btn { padding: 4px 0; background: none; border: 0; color: var(--text-3); font-size: 0.8125rem; text-decoration: underline; cursor: pointer; }
.cal-trade summary { display: flex; align-items: center; min-height: 36px; color: var(--text-2); font-size: 0.9rem; cursor: pointer; }
.cal-trade[open] summary { margin-bottom: 8px; }
.admin-stats { margin-top: 0; }
.admin-block { display: grid; gap: 10px; margin-top: 28px; }
.prose .admin-block h2 { margin: 0; }
.admin-list { display: grid; gap: 8px; }
.admin-row { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius-sm); min-width: 0; }
.admin-row > select, .admin-row > textarea { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--well); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: 400 0.9375rem var(--sans); }
.admin-row .journal-actions { margin-top: 0; }
.admin-row .news-meta { margin: 0; }
.search-state, .search-results { hyphens: none; }

@media (max-width: 619px) {
  .brand-text { display: none; }
  .top { padding-left: 4px; padding-right: 4px; }
}
@media (min-width: 620px) {
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cal-cell { min-height: 62px; }
  .cal-cell small { font-size: 0.6875rem; }
}

@media (hover: hover) {
  .card:hover, .sec-card:hover, .pg-card:hover, .pn:hover { transform: translateY(-2px); }
}

@media (min-width: 620px) {
  .cards, .sec-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prevnext { grid-template-columns: 1fr 1fr; }
  .pn-next:only-child { grid-column: 2; }
  .hero-cta { display: flex; flex-wrap: wrap; }
  main { padding: 32px 28px 44px; }
  .foot { padding-left: 28px; padding-right: 28px; }
}

@media (min-width: 940px) {
  body { padding-bottom: 0; }
  .only-narrow { display: none; }
  .tabbar { display: none; }
  .top { margin: 12px 16px 0; top: 12px; padding: 0 8px 0 18px; }
  .shell { display: grid; grid-template-columns: 296px minmax(0, 1fr); }
  .side {
    position: sticky; inset: auto; top: calc(var(--top-h) + 24px); z-index: 1; width: auto;
    height: calc(100dvh - var(--top-h) - 36px); margin: 12px 0 12px 16px;
    background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    transform: none; visibility: visible; transition: none;
  }
  .nav-scrim { display: none; }
  .layout-home .shell { display: block; }
  .layout-home .side { display: none; }
  .layout-home main { max-width: 1160px; margin: 0 auto; }
  .hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 44px; align-items: center; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .sec-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search { height: min(70dvh, 640px); margin-top: 10vh; border-radius: 26px; box-shadow: var(--chrome-shadow); }
}

@media (min-width: 1280px) {
  .pg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout-doc .prose { display: grid; grid-template-columns: minmax(0, 44rem) 240px; column-gap: 48px; align-items: start; }
  .layout-doc .prose > * { grid-column: 1; }
  .layout-doc .prose > .toc { grid-column: 2; grid-row: 1 / span 400; position: sticky; top: calc(var(--top-h) + 28px); background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .toc summary { pointer-events: none; }
}

@media (max-width: 1279px) {
  .layout-doc .prose, .layout-tool .prose, .layout-section .prose { max-width: 44rem; }
}

/* Floating bars stay readable where blur is missing or switched off. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top, .tabbar, .side, .search { background: #0b0b0d; }
}
@media (prefers-reduced-transparency: reduce) {
  .top, .tabbar, .search { background: #0b0b0d; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 939px) and (prefers-reduced-transparency: reduce) {
  .side { background: #0b0b0d; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .card:hover, .sec-card:hover, .pg-card:hover, .pn:hover { transform: none; }
}

@media print {
  .top, .side, .tabbar, .foot, .toc, .prevnext, .read-toggle, .read-bar, .nav-scrim, .search { display: none !important; }
  html, body { background: #fff; }
  body::before, body::after { display: none !important; }
  body { color: #000; padding: 0; font-size: 11pt; }
  .prose strong, h1, h2, h3 { color: #000; }
  .callout, .table-wrap, .card, .pattern, .lc { border-color: #999; background: none; box-shadow: none; }
  a { color: #000; }
}

/* ===== Added: account menu, progress, Weiterlernen, Merkliste, Karteikarten, Journal ===== */

/* Shared bits */
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 0.875rem; }
.btn-ghost { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-danger, .btn.is-danger { color: var(--bear-text); box-shadow: inset 0 0 0 1px rgba(192, 68, 72, 0.6); }
.btn .i { flex: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: 600 0.75rem/1.6 var(--sans); white-space: nowrap; }
.chip-gold { background: var(--gold-soft); color: var(--gold); }
.chip-bull { background: rgba(25, 170, 142, 0.16); color: var(--bull-text); }
.bar { display: block; height: 6px; border-radius: 999px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c9a24a, var(--gold)); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.28, 1); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 32px 20px; text-align: center; border-radius: var(--radius); background: var(--glass-fill); border: 1px dashed var(--line-strong); }
.empty > .i { font-size: 1.75rem; color: var(--gold); }
.empty strong { font-size: 1.125rem; }
.empty p { margin: 0 0 6px; color: var(--text-2); max-width: 30rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--well); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.seg-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 16px; background: none; border: 0; border-radius: 999px; color: var(--text-2); font-weight: 550; font-size: 0.875rem; cursor: pointer; }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active, .seg-btn:has(input:checked) { background: var(--surface-2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.seg-btn:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
kbd { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin-left: 8px; padding: 0 4px; border-radius: 6px; background: rgba(0, 0, 0, 0.25); font: 600 0.6875rem var(--mono); opacity: 0.8; }
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-zone .calc-note { flex-basis: 100%; margin: 0; }

/* Account button and menu in the top bar */
.acct-login .acct-label { display: none; }
.acct { position: relative; }
.acct-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 50%; cursor: pointer; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: linear-gradient(145deg, #f3d488, #c9962e); color: var(--on-gold); font: 700 0.875rem var(--sans); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 10px rgba(233, 192, 99, 0.25); }
.avatar-lg { width: 44px; height: 44px; font-size: 1.125rem; }
.acct-btn:hover .avatar, .acct-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 3px rgba(233, 192, 99, 0.3); }
.acct-menu {
  position: absolute; right: -4px; top: calc(100% + 14px); z-index: 90;
  width: min(320px, calc(100vw - 24px)); padding: 8px;
  background: rgba(24, 24, 27, 0.92); border-radius: 22px; box-shadow: var(--chrome-shadow);
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur);
  animation: pop-in 0.18s cubic-bezier(0.22, 0.8, 0.28, 1);
}
.acct-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-who { display: grid; gap: 4px; min-width: 0; }
.acct-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.acct-plan { justify-self: start; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: 600 0.6875rem/1.6 var(--sans); }
.acct-plan.is-premium { background: var(--gold-soft); color: var(--gold); }
.acct-links { display: grid; gap: 2px; }
.acct-links a, .acct-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px;
  background: none; border: 0; border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 520; font-size: 0.9375rem; text-align: left; cursor: pointer;
}
.acct-links a:hover, .acct-item:hover, .acct-links a[aria-current] { background: var(--surface-2); color: var(--text); }
.acct-links .i, .acct-item .i { color: var(--text-3); width: 1.1em; }
.acct-count { margin-left: auto; color: var(--gold); font: 600 0.75rem var(--sans); }
.acct-item { margin-top: 2px; }
.acct-out { border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; margin-top: 6px; color: var(--text-2); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--float) + 14px + env(safe-area-inset-bottom)); z-index: 95; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px;
  background: rgba(30, 30, 34, 0.94); box-shadow: var(--chrome-shadow); color: var(--text); text-decoration: none; font-size: 0.9375rem; line-height: 1.35;
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur); pointer-events: auto;
  animation: toast-in 0.28s cubic-bezier(0.22, 0.8, 0.28, 1);
}
a.toast:hover { color: var(--text); background: rgba(40, 40, 45, 0.96); }
.toast .i { color: var(--gold); font-size: 1.125rem; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }

/* Section cards and lesson cards */
.sec-card { position: relative; }
.sec-bar { display: block; height: 4px; margin-top: 6px; border-radius: 999px; background: var(--well); overflow: hidden; grid-column: 2; }
.sec-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9a24a, var(--gold)); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.28, 1); }
.sec-card.is-done { border-color: rgba(25, 170, 142, 0.45); }
.sec-card.is-done .sec-bar i { background: linear-gradient(90deg, #138a73, var(--bull-text)); }
.sec-card.is-done .card-icon { color: var(--bull-text); }
.card.is-saved { box-shadow: inset 3px 0 0 var(--gold), var(--glass-shadow); }
.nav-count { margin-left: auto; color: var(--gold); font: 600 0.75rem var(--sans); }
.nav-count:empty { display: none; }

/* Lesson head, bookmark and end of lesson */
.doc-meta { align-items: center; }
.bm-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-left: auto; padding: 0 12px;
  background: var(--surface-2); border: 0; border-radius: 999px; color: var(--text-2); font: 550 0.8125rem var(--sans); cursor: pointer;
}
.bm-chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.13); }
.bm-chip.is-saved, .bm-toggle.is-saved { color: var(--gold); background: var(--gold-soft); }
.lesson-actions { display: grid; gap: 8px; margin-top: 20px; }
.prevnext { margin-top: 12px; }
.pn { position: relative; justify-content: center; }
.pn-next { text-align: left; padding: 16px 48px 16px 18px; border-color: rgba(233, 192, 99, 0.28); }
.pn-next small { color: var(--gold); }
.pn-next span { font-size: 1.0625rem; font-weight: 620; margin-top: 2px; }
.pn-next em { margin-top: 4px; color: var(--text-2); font-style: normal; font-size: 0.875rem; line-height: 1.4; }
.pn-arrow { position: absolute; right: 18px; top: 50%; margin-top: -0.5em; color: var(--gold); transition: transform 0.18s ease; }
.pn-next:hover .pn-arrow { transform: translateX(3px); }

/* Weiterlernen on the start page */
.resume { display: grid; gap: 12px; margin: 4px 0 28px; }
.resume-main {
  position: relative; display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(233, 192, 99, 0.16), transparent 55%), var(--glass-fill);
  border: 1px solid rgba(233, 192, 99, 0.25); box-shadow: var(--glass-shadow); color: var(--text); text-decoration: none;
}
.resume-main:hover { color: var(--text); border-color: rgba(233, 192, 99, 0.45); }
.resume-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font: 600 0.8125rem var(--sans); }
.resume-main > strong { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 680; line-height: 1.12; letter-spacing: -0.025em; }
.resume-text { color: var(--text-2); line-height: 1.5; max-width: 36rem; }
.resume-meta { color: var(--text-3); font-size: 0.8125rem; }
.resume-main .bar { max-width: 22rem; }
.resume-main .btn { justify-self: start; margin-top: 8px; }
.resume-side { display: grid; gap: 12px; align-content: start; }
.resume-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); color: var(--text); text-decoration: none; }
a.resume-card:hover { color: var(--text); border-color: var(--line-strong); }
.resume-card-text { display: grid; gap: 2px; font-size: 0.875rem; color: var(--text-2); line-height: 1.4; }
.resume-card-text strong { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 0.9375rem; }
.resume-card-text strong .i { color: var(--gold); }
.resume-streak .resume-card-text strong .i { color: #f0923a; }
.ring-box { position: relative; flex: none; width: 56px; height: 56px; }
.ring { width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.ring-track { stroke: rgba(255, 255, 255, 0.08); }
.ring-fill { stroke: var(--gold); transition: stroke-dasharray 0.6s ease; }
.ring-value { position: absolute; inset: 0; display: grid; place-items: center; font: 650 0.8125rem var(--sans); font-variant-numeric: tabular-nums; }
.resume-saved { display: grid; gap: 8px; align-items: stretch; }
.resume-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.resume-card-head strong { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9375rem; }
.resume-card-head strong .i { color: var(--gold); }
.resume-card-head a { font-size: 0.8125rem; }
.resume-saved ul { list-style: none; margin: 0; padding: 0; display: grid; }
.resume-saved li a { display: block; padding: 7px 0; border-top: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 0.9rem; line-height: 1.35; }
.resume-saved li a:hover { color: var(--text); }
.resume-install { flex-wrap: wrap; }
.resume-install-actions { display: flex; align-items: center; gap: 12px; }

/* Mein Fortschritt */
.sync-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(25, 170, 142, 0.1); color: var(--text-2); font-size: 0.9rem; line-height: 1.45; }
.sync-note .i { color: var(--bull-text); margin-top: 3px; }
.sync-note.is-local { background: var(--gold-soft); }
.sync-note.is-local .i { color: var(--gold); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.stat-grid .stat { display: grid; gap: 2px; align-content: start; }
.stat-icon small { display: flex; align-items: center; gap: 6px; }
.stat-icon small .i { color: var(--gold); }
.stat-note { display: block; color: var(--text-3); font-size: 0.75rem; line-height: 1.35; }
.goal-box .muted { margin: 0 0 10px; font-size: 0.875rem; }
.prose section > h2.h-sm { margin: 28px 0 10px !important; display: flex; align-items: center; gap: 8px; }
.heat { display: grid; gap: 8px; }
.heat-grid { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; max-width: 360px; }
.heat-cell { display: block; aspect-ratio: 1; min-width: 10px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); }
.heat-cell.l1 { background: rgba(233, 192, 99, 0.3); }
.heat-cell.l2 { background: rgba(233, 192, 99, 0.65); }
.heat-cell.l3 { background: var(--gold); }
.heat-cell.is-future { visibility: hidden; }
.heat-cell.is-today { box-shadow: 0 0 0 1.5px var(--text); }
.heat-legend { display: flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 0.75rem; }
.heat-legend .heat-cell { width: 12px; min-width: 12px; }
.sec-progress { display: grid; gap: 4px; }
.sec-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3.2rem; align-items: center; gap: 12px; min-height: 44px; padding: 4px 10px; border-radius: 12px; color: var(--text); text-decoration: none; font-size: 0.9375rem; }
.sec-row:hover { background: var(--surface); color: var(--text); }
.sec-row-label { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sec-row-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-row-label .i { color: var(--text-3); }
.sec-row small { text-align: right; color: var(--text-3); }
.sec-row.is-done .sec-row-label .i { color: var(--bull-text); }
.sec-row.is-done .bar i { background: linear-gradient(90deg, #138a73, var(--bull-text)); }
.badges { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; padding: 0 !important; }
.badge { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.badge-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--text-3); font-size: 1.05rem; }
.badge.is-earned { background: var(--glass-fill); box-shadow: var(--glass-shadow); }
.badge.is-earned .badge-icon { background: linear-gradient(145deg, #f3d488, #b98a28); color: var(--on-gold); box-shadow: 0 4px 14px rgba(233, 192, 99, 0.25); }
.badge-body { display: grid; gap: 1px; min-width: 0; }
.badge-body strong { font-size: 0.9375rem; font-weight: 620; line-height: 1.3; }
.badge-body span { color: var(--text-2); font-size: 0.8125rem; line-height: 1.35; }
.badge-body small { color: var(--text-3); font-size: 0.6875rem; margin-top: 2px; }
.badge:not(.is-earned) .badge-body strong { color: var(--text-2); }

/* Merkliste and offline list */
.bm-list { list-style: none; display: grid; gap: 8px; padding: 0 !important; }
.bm-item { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 6px 4px 4px; border-radius: var(--radius-sm); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
.bm-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 8px 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.bm-link:hover { color: var(--text); background: var(--surface); }
.bm-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bm-body strong { font-weight: 600; line-height: 1.3; }
.bm-body small { color: var(--text-3); font-size: 0.8125rem; }
.bm-remove { flex: none; }

/* Karteikarten */
.fc-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fc-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-mode { min-width: min(100%, 240px); }
.fc-stage { display: grid; gap: 12px; }
.fc-meter { height: 4px; }
.fc-card { position: relative; display: grid; min-height: 260px; padding: 0; background: none; border: 0; color: var(--text); cursor: pointer; perspective: 1400px; text-align: center; font: inherit; }
.fc-side {
  grid-area: 1 / 1; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 28px 24px; border-radius: 26px;
  background: radial-gradient(130% 120% at 50% 0%, rgba(233, 192, 99, 0.1), transparent 60%), var(--glass-fill);
  border: 1px solid var(--line-strong); box-shadow: var(--glass-shadow);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.fc-front small, .fc-back small { color: var(--text-3); font: 550 0.75rem var(--sans); }
.fc-front strong { font-size: clamp(1.6rem, 6vw, 2.25rem); font-weight: 680; letter-spacing: -0.025em; line-height: 1.15; hyphens: auto; }
.fc-front em { color: var(--text-3); font-style: normal; font-size: 0.8125rem; }
.fc-back { transform: rotateY(180deg); background: radial-gradient(130% 120% at 50% 0%, rgba(25, 170, 142, 0.12), transparent 60%), var(--glass-fill); }
.fc-back small { color: var(--gold); font-size: 0.875rem; font-weight: 620; }
.fc-text { max-width: 34rem; font-size: 1.0625rem; line-height: 1.55; }
.fc-card.is-flipped .fc-front { transform: rotateY(-180deg); }
.fc-card.is-flipped .fc-back { transform: rotateY(0); }
.fc-card:focus-visible { outline: none; }
.fc-card:focus-visible .fc-side { outline: 2px solid var(--gold); outline-offset: 3px; }
.fc-answer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-answer .btn { min-height: 52px; }
.fc-done { display: grid; justify-items: center; gap: 10px; padding: 36px 20px; text-align: center; border-radius: 26px; background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
.fc-done > .i { font-size: 2rem; color: var(--gold); }
.fc-done strong { font-size: 1.25rem; }
.fc-done p { margin: 0; }
.fc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

/* Account page */
.account { display: grid; gap: 14px; }
.account > .auth-sub { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass-fill); box-shadow: var(--glass-shadow); }
.account .h-sm { display: flex; align-items: center; gap: 8px; margin: 0 !important; }
.account .h-sm .i { color: var(--gold); }
.account-head { display: flex; align-items: center; gap: 14px; }
.account-card .sync-note { margin: 0; }
.auth-form { display: grid; gap: 12px; }
.auth .link-btn, .auth-form .link-btn { justify-self: start; }
.device-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.device { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); }
.device.is-current { box-shadow: inset 0 0 0 1px rgba(233, 192, 99, 0.35); }
.device-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.device-body strong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.device-body small { color: var(--text-3); font-size: 0.8125rem; line-height: 1.35; }

/* Journal */
.jr-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.jr-tabs { flex: 1 1 auto; }
.jr-tabs .seg-btn { flex: 1; }
.jr-add { flex: 0 0 auto; }
.jr-pane { display: grid; gap: 14px; }
.cal-layout { display: grid; gap: 16px; align-items: start; }
.cal-layout > div { display: grid; gap: 10px; }
.cal-head { margin-bottom: 0; gap: 8px; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-title { min-width: 9.5em; text-align: center; }
.cal-head .icon-btn { font-size: 1rem; }
.cal-cell { position: relative; }
.cal-cell.is-today { box-shadow: inset 0 0 0 1.5px rgba(233, 192, 99, 0.6); }
.cal-cell.is-selected { border-color: var(--gold); background-color: var(--gold-soft); }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); }
.cal-day { margin-top: 0; padding: 16px; border-radius: var(--radius); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-day-head h2 { margin: 0 !important; }
.jr-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.jr-sum { display: grid; gap: 1px; padding: 9px 11px; border-radius: 14px; background: var(--surface); min-width: 0; }
.jr-sum small { color: var(--text-3); font-size: 0.6875rem; }
.jr-sum strong { font-size: 0.9375rem; font-weight: 640; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-list { display: grid; gap: 8px; }
.jr-list > .muted { margin: 4px 0; font-size: 0.9375rem; }
.jr-entry { display: grid; gap: 6px; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
.jr-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jr-entry-title { flex: 1 1 10rem; min-width: 0; font-weight: 620; line-height: 1.3; }
.dir-chip, .pl-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font: 650 0.75rem/1.6 var(--sans); white-space: nowrap; }
.dir-chip.is-long { background: rgba(25, 170, 142, 0.16); color: var(--bull-text); }
.dir-chip.is-short { background: rgba(192, 68, 72, 0.2); color: var(--bear-text); }
.dir-chip.is-note { background: var(--surface-2); color: var(--text-2); }
.pl-chip { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pl-chip.is-up { background: rgba(25, 170, 142, 0.16); color: var(--bull-text); }
.pl-chip.is-down { background: rgba(192, 68, 72, 0.2); color: var(--bear-text); }
.jr-facts { margin: 0; color: var(--text-2); font: 0.8125rem/1.5 var(--mono); font-variant-numeric: tabular-nums; hyphens: none; }
.jr-note { margin: 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; white-space: pre-wrap; }
.jr-entry-actions { display: flex; gap: 16px; }
.jr-entry-actions .link-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.jr-entry-actions .link-btn:hover { color: var(--text); }
.link-btn.is-armed { color: var(--bear-text); font-weight: 600; }
.jr-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.jr-search { grid-column: 1 / -1; }
.jr-filters .field input, .jr-filters .field select { min-height: 44px; }
.jr-chart { margin: 0; border-radius: var(--radius); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); overflow: hidden; }
.jr-chart figcaption { padding: 12px 16px 0; }
.jr-canvas { height: 260px; min-width: 0; }
.jr-week { display: grid; gap: 6px; }
.prose .jr-week h2, .prose .jr-sides h2 { margin: 10px 0 4px !important; }
.wk-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 0.875rem; }
.wk-name { color: var(--text-2); font-weight: 600; }
.wk-track { height: 12px; border-radius: 999px; background: var(--well); overflow: hidden; }
.wk-track i { display: block; height: 100%; border-radius: inherit; transform: scaleX(var(--p, 0)); transform-origin: left; }
.wk-track i.is-up { background: var(--bull); }
.wk-track i.is-down { background: var(--bear); }
.wk-value { font-size: 0.8125rem; white-space: nowrap; }
.jr-side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jr-dialog {
  width: min(560px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); padding: 0; margin: auto;
  background: rgba(22, 22, 25, 0.96); color: var(--text); border: 0; border-radius: 26px; box-shadow: var(--chrome-shadow);
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur);
}
.jr-dialog[open] { animation: pop-in 0.2s cubic-bezier(0.22, 0.8, 0.28, 1); }
.jr-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.jr-form { display: grid; gap: 14px; padding: 18px; }
.jr-dialog-head { display: flex; align-items: center; justify-content: space-between; margin: -4px -6px -4px 0; }
.jr-dialog-head h2 { margin: 0 !important; font-size: 1.125rem !important; }
.jr-form-top { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem; gap: 10px; }
.jr-kind { display: flex; }
.jr-kind .seg-btn { flex: 1; }
.jr-trade { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
.jr-more summary { min-height: 36px; display: flex; align-items: center; color: var(--text-2); font-size: 0.875rem; cursor: pointer; }
.jr-more[open] summary { margin-bottom: 6px; }
.jr-preview { margin: 0; color: var(--text-2); font-size: 0.9375rem; }
.jr-preview strong { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.jr-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }
.jr-form .calc-note:empty { display: none; }

/* Smooth page changes where the browser supports them */
@view-transition { navigation: auto; }
.top { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
.tab-lens { view-transition-name: tab-lens; }
::view-transition-old(root) { animation: vt-out 0.2s ease both; }
::view-transition-new(root) { animation: vt-in 0.34s var(--ease-out) both; }
::view-transition-group(tab-lens) { animation-duration: 0.5s; animation-timing-function: var(--spring); }
@keyframes vt-out { to { opacity: 0; scale: 0.99; } }
@keyframes vt-in { from { opacity: 0; translate: 0 12px; } }

@media (min-width: 620px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lesson-actions { grid-template-columns: minmax(0, 1fr) auto; }
  .lesson-actions .bm-toggle { padding-left: 22px; padding-right: 22px; }
  .jr-filters { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
  .jr-search { grid-column: auto; }
  .jr-canvas { height: 300px; }
}
@media (min-width: 720px) {
  .acct-login { display: inline-flex; align-items: center; width: auto; height: 40px; gap: 8px; padding: 0 16px 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 0.875rem; font-weight: 600; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
  .acct-login:hover { background: rgba(255, 255, 255, 0.13); }
  .acct-login .acct-label { display: inline; }
}
@media (min-width: 940px) {
  .toasts { bottom: 24px; }
  .resume { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .resume-main { padding: 28px; }
}
@media (min-width: 1100px) {
  .cal-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .layout-tool .prose:has(.jr-top) { max-width: none; }
}
@media (max-width: 479px) {
  .jr-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jr-form-top { grid-template-columns: 1fr; }
  .jr-top .jr-add { width: 100%; }
  .sec-row { grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 2.8rem; gap: 8px; }
  .jr-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .fc-side { transition: none; }
}
@media print {
  body::after { display: none; }
  html.js-reveal * { opacity: 1 !important; translate: none !important; scale: none !important; }
  .acct, .toasts, .lesson-actions, .bm-chip, .resume-slot, .jr-top, .jr-entry-actions { display: none !important; }
}

/* ===== Liquid Glass (iOS style): material, edges, motion ===== */

/* Glass cards: dark translucent fill, a hairline edge that catches light, deep shadow. */
:is(.callout, .card, .sec-card, .toc, .lc, .quiz, .pattern, .pg-card, .calc, .clock, .trainer, .replay, .journal-form,
.tv-gate, .stat, .pn, .check-item label, .auth, .news-card, .admin-row, .cal-entry, .cal-grid, .premium-list li,
.resume-main, .resume-card, .bm-item, .fc-side, .fc-done, .jr-entry, .cal-day, .jr-chart, .account > .auth-sub, .badge.is-earned) {
  position: relative;
  border-color: rgba(255, 255, 255, 0.045);
}
:is(.callout, .card, .sec-card, .toc, .lc, .quiz, .pattern, .pg-card, .calc, .clock, .trainer, .replay, .journal-form,
.tv-gate, .stat, .pn, .check-item label, .auth, .news-card, .admin-row, .cal-entry, .cal-grid, .premium-list li,
.resume-main, .resume-card, .bm-item, .fc-side, .fc-done, .jr-entry, .cal-day, .jr-chart, .account > .auth-sub, .badge.is-earned,
.top, .tabbar, .side, .acct-menu, .toast, .btn, .seg, .auth-tabs, .ticker, .hero-kicker, .bm-chip)::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--lg-rim);
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:is(.btn, .seg, .auth-tabs, .ticker, .hero-kicker, .bm-chip, .toast) { position: relative; }
.top::before, .tabbar::before, .acct-menu::before { background: linear-gradient(160deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.12) 22%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0.3) 100%); }
.sec-card.is-done::before { background: linear-gradient(150deg, rgba(95, 217, 190, 0.6), rgba(95, 217, 190, 0.08) 40%, rgba(95, 217, 190, 0.05) 70%, rgba(95, 217, 190, 0.3)); }
.resume-main::before { background: linear-gradient(150deg, rgba(255, 228, 160, 0.65), rgba(233, 192, 99, 0.12) 30%, rgba(255, 255, 255, 0.04) 60%, rgba(233, 192, 99, 0.3)); }

/* A light streak glides across the glass when the pointer moves over it. */
:is(.card, .sec-card, .pg-card, .pn, .resume-main, a.resume-card)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.07) 47%, rgba(255, 236, 200, 0.045) 53%, transparent 68%) no-repeat;
  background-size: 260% 100%;
  background-position: 130% 0;
  opacity: 0;
  transition: background-position 0.9s var(--ease-out), opacity 0.4s ease;
}
@media (hover: hover) {
  :is(.card, .sec-card, .pg-card, .pn, .resume-main, a.resume-card):hover::after { background-position: -30% 0; opacity: 1; }
  :is(.card, .sec-card, .pg-card, .pn):hover { border-color: rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 30px rgba(255, 255, 255, 0.03), 0 24px 60px rgba(0, 0, 0, 0.8); }
}

/* Everything you can press gives a little springy squeeze. */
:is(.btn, .card, .sec-card, .pg-card, .pn, .icon-btn, .acct-btn, .seg-btn, .tab, .tabbar a, .tabbar button, .cal-cell,
.bm-chip, .resume-main, a.resume-card, .ticker, .q-opt, .acct-links a, .acct-item, .nav-quick a, .nav-sec li a, .bm-link) {
  transition: transform 0.4s var(--spring), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, color 0.2s ease;
}
:is(.btn, .card, .sec-card, .pg-card, .pn, .icon-btn, .acct-btn, .seg-btn, .tab, .tabbar a, .tabbar button, .cal-cell,
.bm-chip, .resume-main, a.resume-card, .ticker, .q-opt, .acct-links a, .acct-item, .bm-link):active { transform: scale(0.965); transition-duration: 0.12s; }

/* Glass buttons: clear capsules; the main action is gold-tinted glass. */
.btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.045) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.03), 0 8px 22px rgba(0, 0, 0, 0.5);
}
.btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.07) 100%); }
.btn-gold, .btn-gold:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.06) 48%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #f2cf78 0%, #d9a843 100%);
  color: var(--on-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 8px rgba(110, 70, 0, 0.35), 0 10px 32px rgba(233, 192, 99, 0.24);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold::before { background: var(--lg-rim-gold); }
.btn-bull { background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, rgba(25, 170, 142, 0.75), rgba(15, 110, 92, 0.75)); color: #fff; }
.btn-bear { background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, rgba(200, 70, 74, 0.75), rgba(140, 44, 48, 0.75)); color: #fff; }
.btn-bull:hover, .btn-bear:hover { color: #fff; filter: brightness(1.1); }
.btn-ghost { background: none; box-shadow: none; }

/* Segmented controls: a dark glass track with a lens on the chosen part. */
.seg, .auth-tabs { background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.seg::before, .auth-tabs::before { opacity: 0.5; }
.seg-btn.is-active, .seg-btn:has(input:checked), .tab.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0.06) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(255, 255, 255, 0.05), 0 6px 16px rgba(0, 0, 0, 0.55);
  color: var(--text);
}

/* Inputs: dark glass wells with a soft gold focus ring. */
.field input, .field select, .field textarea {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65);
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(233, 192, 99, 0.65);
  box-shadow: 0 0 0 4px rgba(233, 192, 99, 0.16), inset 0 1px 3px rgba(0, 0, 0, 0.65);
}
.field select option { background: #0b0b0d; }

/* Floating chrome: real blur, tinted darker once the page scrolls (iOS scroll edge). */
.top { transition: background-color 0.35s ease, box-shadow 0.35s ease; }
html.is-scrolled .top { background: rgba(10, 10, 12, 0.74); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.85); }
.read-bar { box-shadow: 0 0 12px rgba(233, 192, 99, 0.55); }
.ticker { background: rgba(255, 255, 255, 0.06); }
.ticker-dot { position: relative; }
.ticker-dot.is-open::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--bull); animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.acct-menu { background: rgba(16, 16, 18, 0.86); animation: pop-in 0.32s var(--spring); }
.toast { background: rgba(18, 18, 20, 0.84); }
.search { background: rgba(12, 12, 14, 0.84); }
.search[open] { animation: pop-in 0.32s var(--spring); }
.jr-dialog { background: rgba(14, 14, 16, 0.88); }
.jr-dialog[open] { animation: pop-in 0.34s var(--spring); }
.search::backdrop, .jr-dialog::backdrop { background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (max-width: 939px) {
  .side { background: rgba(12, 12, 14, 0.6); transition: transform 0.5s var(--spring); }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }

/* Tab bar like iOS 26: a floating glass capsule; the active tab sits in a glass lens that glides
   between pages, and the bar shrinks to icons while scrolling down. */
.tabbar {
  background: rgba(14, 14, 16, 0.56);
  border-radius: 32px;
  transition: left 0.5s var(--spring), right 0.5s var(--spring), height 0.5s var(--spring), border-radius 0.5s var(--spring);
}
.tabbar a, .tabbar button { position: relative; isolation: isolate; border-radius: 24px; }
.tabbar .is-current { color: var(--gold); }
.tab-lens {
  position: absolute; inset: 6px 3px; z-index: -1; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(0, 0, 0, 0.5);
}
.tab-label { display: block; max-height: 1.4em; overflow: hidden; transition: opacity 0.25s ease, max-height 0.4s var(--ease-out); }
html.is-scrolling-down .tabbar { left: 16%; right: 16%; height: 52px; }
html.is-scrolling-down .tab-label { opacity: 0; max-height: 0; }
html.is-scrolling-down .tabbar .i { font-size: 1.25rem; }

/* Gold text in the hero shimmers slowly. */
.hero h1 em {
  background: linear-gradient(100deg, #b8862a 0%, #f7dc98 38%, #e9c063 55%, #b8862a 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gold-shine 7s ease-in-out infinite alternate;
}
@keyframes gold-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Content glides in as it comes into view (core.js marks it with .is-in). Without the script
   everything shows after three seconds; with reduced motion it never hides. */
html.js-reveal :is(.doc-head, .prose > h2, .prose > .callout, .prose > figure, .prose > .quiz, .prose > .table-wrap,
.prose > .steps, .prose > .pattern-top, .prose > .pattern-grid, .prose > .pg, .cards > .card, .sec-cards > .sec-card, .route li,
.hero-split > *, .home-grid > div, .home-block > h2, .prevnext > .pn, .lesson-actions, .related, .premium-list li) {
  opacity: 0;
  translate: 0 18px;
  scale: 0.985;
}
html.js-reveal :is(.doc-head, .prose > h2, .prose > .callout, .prose > figure, .prose > .quiz, .prose > .table-wrap,
.prose > .steps, .prose > .pattern-top, .prose > .pattern-grid, .prose > .pg, .cards > .card, .sec-cards > .sec-card, .route li,
.hero-split > *, .home-grid > div, .home-block > h2, .prevnext > .pn, .lesson-actions, .related, .premium-list li).is-in {
  opacity: 1;
  translate: none;
  scale: none;
  transition: opacity 0.6s ease var(--d, 0ms), translate 0.8s var(--ease-out) var(--d, 0ms), scale 0.8s var(--ease-out) var(--d, 0ms),
    transform 0.4s var(--spring), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, color 0.2s ease;
}
html.js-reveal:not(.reveal-ready) :is(.doc-head, .prose > h2, .prose > .callout, .prose > figure, .prose > .quiz, .prose > .table-wrap,
.prose > .steps, .prose > .pattern-top, .prose > .pattern-grid, .prose > .pg, .cards > .card, .sec-cards > .sec-card, .route li,
.hero-split > *, .home-grid > div, .home-block > h2, .prevnext > .pn, .lesson-actions, .related, .premium-list li) {
  animation: reveal-fallback 0.01s 3s forwards;
}
@keyframes reveal-fallback { to { opacity: 1; translate: none; scale: none; } }

/* Content the scripts create rises in. */
@keyframes rise { from { opacity: 0; translate: 0 14px; scale: 0.985; } }
.resume, .fc-card, .fc-done, .jr-pane, .empty { animation: rise 0.6s var(--ease-out) both; }

@media (min-width: 1280px) {
  .layout-doc .prose > .toc::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.js-reveal * { opacity: 1 !important; translate: none !important; scale: none !important; }
  .hero h1 em { background-position: 50% 0; }
}
/* Without blur support or with reduced transparency: solid, very dark surfaces. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top, html.is-scrolled .top, .tabbar, .side, .search, .acct-menu, .toast, .jr-dialog { background: #0b0b0d !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .top, html.is-scrolled .top, .tabbar, .search, .acct-menu, .toast, .jr-dialog { background: #0b0b0d !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  body::before, body::after { display: none; }
}

/* ===== Added: terms, notes, certificates, question of the day, confetti ===== */
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.link-more:hover { color: #f7dc98; }
.link-more .i { transition: transform 0.3s var(--spring); }
.link-more:hover .i { transform: translateX(3px); }

/* Technical terms: a gold dotted underline; tapping opens a glass bubble. */
.term { text-decoration: underline dotted rgba(233, 192, 99, 0.6); text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: help; border-radius: 4px; transition: background-color 0.2s ease, color 0.2s ease; }
.term:hover, .term[aria-expanded="true"] { color: var(--text); background: rgba(233, 192, 99, 0.12); text-decoration-color: var(--gold); }
.term-pop {
  position: absolute; z-index: 120; width: var(--w, 320px); padding: 16px 18px 14px; border-radius: 20px;
  background: rgba(16, 16, 18, 0.93); box-shadow: var(--chrome-shadow);
  -webkit-backdrop-filter: var(--chrome-blur); backdrop-filter: var(--chrome-blur);
  transform-origin: var(--ax, 50%) top; opacity: 0; scale: 0.94; translate: 0 -4px;
  transition: opacity 0.2s ease, scale 0.35s var(--spring), translate 0.35s var(--spring);
}
.term-pop.is-above { transform-origin: var(--ax, 50%) bottom; translate: 0 4px; }
.term-pop.is-in { opacity: 1; scale: 1; translate: none; }
.term-pop::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: var(--lg-rim); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.term-pop-title { display: block; padding-right: 32px; color: var(--gold); font-size: 1rem; }
.term-pop-text { margin: 6px 0 10px; color: var(--text); font-size: 0.9375rem; line-height: 1.5; hyphens: auto; }
.term-pop-more { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.term-pop-more:hover { color: var(--gold); }
.term-pop-close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; min-height: 34px; font-size: 0.875rem; }

/* "Meine Notiz" under a lesson. */
.note-box { margin-top: 12px; }
.note-card { position: relative; border-radius: var(--radius); background: var(--glass-fill); border: 1px solid rgba(255, 255, 255, 0.045); box-shadow: var(--glass-shadow); overflow: hidden; }
.note-card::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: var(--lg-rim); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.note-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 16px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.note-glyph { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); color: var(--text-3); transition: background-color 0.3s ease, color 0.3s ease; }
.note-card.has-note .note-glyph { background: var(--gold-soft); color: var(--gold); }
.note-label { display: grid; min-width: 0; flex: 1; }
.note-label strong { font-size: 0.9375rem; }
.note-preview { overflow: hidden; color: var(--text-3); font-size: 0.875rem; text-overflow: ellipsis; white-space: nowrap; }
.note-chev { color: var(--text-3); transition: transform 0.4s var(--spring); }
.note-card.is-open .note-chev { transform: rotate(90deg); }
.note-body { padding: 0 16px 14px; animation: rise 0.45s var(--ease-out) both; }
.note-area { display: block; width: 100%; min-height: 130px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65); color: var(--text); font: 400 1rem/1.55 var(--sans); resize: vertical; transition: border-color 0.2s ease, box-shadow 0.25s ease; }
.note-area:focus { outline: none; border-color: rgba(233, 192, 99, 0.65); box-shadow: 0 0 0 4px rgba(233, 192, 99, 0.16), inset 0 1px 3px rgba(0, 0, 0, 0.65); }
.note-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 0.8125rem; color: var(--text-3); }
.note-state { min-width: 7rem; }
.note-count { margin-right: auto; }
.note-all { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; text-decoration: none; }
.note-hint { margin: 8px 0 0; color: var(--text-3); font-size: 0.8125rem; }

/* "Meine Notizen" page. */
.notes-head { margin: 0 0 12px; }
.notes-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.notes-field { flex: 1 1 220px; }
.notes-groups { display: grid; gap: 22px; }
.notes-group .h-sm { display: flex; align-items: center; gap: 8px; margin: 0 0 10px !important; }
.notes-group .h-sm .i { color: var(--gold); }
.notes-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0 !important; }
.notes-item { position: relative; margin: 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); animation: rise 0.5s var(--ease-out) both; }
.notes-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.notes-link { display: grid; color: var(--text); text-decoration: none; }
.notes-link small { color: var(--text-3); font-size: 0.8125rem; }
.notes-link:hover strong { color: var(--gold); }
.notes-text { margin: 8px 0 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.55; white-space: pre-wrap; }
.notes-remove.is-confirm { color: var(--bear-text); }

/* Certificates. */
.cert-name { max-width: 26rem; margin-bottom: 14px; }
.cert-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cert-box > .muted { margin: 4px 0 10px; font-size: 0.875rem; }
.cert-mini { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 !important; }
.cert-chip { margin: 0; }
.cert-chip a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-3); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.cert-chip.is-earned a { background: linear-gradient(180deg, rgba(233, 192, 99, 0.2), rgba(233, 192, 99, 0.08)); border-color: rgba(233, 192, 99, 0.4); color: var(--gold); }
.cert-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 14px 0 0; padding: 0 !important; }
.cert-card { position: relative; display: flex; gap: 14px; margin: 0; padding: 16px; border-radius: var(--radius); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); animation: rise 0.55s var(--ease-out) both; }
.cert-card.is-earned { background: radial-gradient(120% 120% at 0% 0%, rgba(233, 192, 99, 0.16), transparent 60%), var(--glass-fill); border-color: rgba(233, 192, 99, 0.3); }
.cert-seal { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); color: var(--text-3); font-size: 1.15rem; }
.cert-card.is-earned .cert-seal { background: linear-gradient(145deg, #f3d488, #b98a28); color: var(--on-gold); box-shadow: 0 6px 18px rgba(233, 192, 99, 0.3); }
.cert-card-body { display: grid; gap: 7px; align-content: start; min-width: 0; flex: 1; }
.cert-card-body small { color: var(--text-3); font-size: 0.8125rem; }
.cert-card-body .btn { justify-self: start; }
.cert-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cert-back { margin-top: 18px; }
.cert-sheet {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: clamp(28px, 6vw, 56px) clamp(18px, 5vw, 56px) clamp(22px, 4vw, 36px);
  border-radius: 28px; text-align: center; overflow: hidden;
  background: radial-gradient(90% 70% at 15% 0%, rgba(233, 192, 99, 0.2), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(200, 128, 13, 0.14), transparent 60%), #060607;
  box-shadow: inset 0 0 0 1.5px rgba(233, 192, 99, 0.55), inset 0 0 0 10px #060607, inset 0 0 0 11px rgba(233, 192, 99, 0.22), 0 30px 80px rgba(0, 0, 0, 0.8);
  animation: rise 0.7s var(--ease-out) both;
}
.cert-brand { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--gold); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; }
.cert-title { margin: 6px 0 14px !important; font-size: clamp(2.2rem, 7vw, 3.6rem) !important; letter-spacing: -0.02em; }
.cert-line { margin: 0; color: var(--text-2); font-size: clamp(0.9375rem, 2.4vw, 1.125rem); }
.cert-who { margin: 8px 0 12px; padding: 0 12px 8px; border-bottom: 1px solid rgba(233, 192, 99, 0.45); font-size: clamp(1.6rem, 6vw, 2.75rem); font-weight: 700; line-height: 1.2; background: linear-gradient(100deg, #f7dc98, #c99a3c 60%, #f2cf78); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert-who.is-empty { opacity: 0.45; }
.cert-course { margin: 4px 0 2px; font-size: clamp(1.3rem, 4.5vw, 2rem); font-weight: 700; }
.cert-facts { margin: 14px 0 0; color: var(--gold); font-size: 0.9375rem; font-weight: 600; }
.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; width: 100%; margin-top: 26px; }
.cert-date { display: grid; margin: 0; font-size: 0.9375rem; }
.cert-date small { color: var(--text-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.cert-stamp { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(145deg, #f7dc98, #b8862a); color: var(--on-gold); font-size: 1.6rem; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 10px 30px rgba(233, 192, 99, 0.3); }
.cert-small { margin: 22px 0 0; color: var(--text-3); font-size: 0.75rem; }

/* Question of the day on the start page. */
.daily-slot { margin-top: 28px; }
.daily-slot:empty { min-height: 1px; }
.daily {
  position: relative; display: grid; gap: 12px; padding: clamp(18px, 4vw, 26px); border-radius: 26px;
  background: radial-gradient(120% 120% at 100% 0%, rgba(233, 192, 99, 0.13), transparent 55%), var(--glass-fill);
  border: 1px solid rgba(255, 255, 255, 0.045); box-shadow: var(--glass-shadow); animation: rise 0.6s var(--ease-out) both;
}
.daily::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: linear-gradient(150deg, rgba(255, 228, 160, 0.55), rgba(233, 192, 99, 0.1) 30%, rgba(255, 255, 255, 0.04) 60%, rgba(233, 192, 99, 0.25)); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.daily-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.daily-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: 0.8125rem; font-weight: 700; }
.daily-badge .i { animation: bulb 3.2s ease-in-out infinite; }
@keyframes bulb { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 6px rgba(233, 192, 99, 0.9)); } }
.daily-meta { color: var(--text-3); font-size: 0.8125rem; }
.daily-q { margin: 2px 0 0 !important; font-size: clamp(1.125rem, 3vw, 1.375rem) !important; line-height: 1.35; }
.daily-options { display: grid; gap: 8px; }
.daily-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 16px rgba(0, 0, 0, 0.45);
  color: var(--text); font: 500 1rem/1.4 var(--sans); text-align: left; cursor: pointer;
  transition: transform 0.4s var(--spring), background-color 0.2s ease, border-color 0.25s ease, opacity 0.3s ease;
}
.daily-opt:hover:not(:disabled) { border-color: rgba(233, 192, 99, 0.45); }
.daily-opt:active:not(:disabled) { transform: scale(0.975); transition-duration: 0.12s; }
.daily-opt:disabled { cursor: default; opacity: 0.5; }
.daily-letter { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 0.8125rem; font-weight: 700; }
.daily-opt.is-right { opacity: 1; border-color: rgba(95, 217, 190, 0.6); background: linear-gradient(180deg, rgba(25, 170, 142, 0.24), rgba(25, 170, 142, 0.1)); animation: pop-right 0.55s var(--spring); }
.daily-opt.is-right .daily-letter { background: var(--bull); color: #fff; }
.daily-opt.is-wrong { opacity: 1; border-color: rgba(245, 154, 156, 0.55); background: linear-gradient(180deg, rgba(192, 68, 72, 0.22), rgba(192, 68, 72, 0.08)); animation: shake 0.45s ease; }
.daily-opt.is-wrong .daily-letter { background: var(--bear); color: #fff; }
@keyframes pop-right { 40% { transform: scale(1.03); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.daily-result { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; animation: rise 0.45s var(--ease-out) both; }
.daily-result.is-right { color: var(--bull-text); }
.daily-result.is-wrong { color: var(--bear-text); }
.daily-why { margin: 0; color: var(--text-2); font-size: 0.9375rem; animation: rise 0.55s var(--ease-out) 0.05s both; }
.daily-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; color: var(--text-3); font-size: 0.8125rem; }
.daily-hint { color: var(--text-3); font-size: 0.8125rem; }

/* Confetti and the springy toast icon. */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 300; pointer-events: none; }
.toast .i { animation: toast-pop 0.6s var(--spring) both; }
@keyframes toast-pop { from { opacity: 0; transform: scale(0.3) rotate(-25deg); } }

@media (prefers-reduced-motion: reduce) {
  .daily-badge .i, .daily-opt.is-right, .daily-opt.is-wrong, .toast .i { animation: none; }
  .term-pop { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .term-pop { background: #0b0b0d; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .term-pop { background: #0b0b0d; }
}

/* Printing a certificate: white paper, gold frame, nothing else on the page. */
@page cert { size: A4 landscape; margin: 10mm; }
@media print {
  .note-box, .term-pop, .daily-slot, .confetti { display: none !important; }
  body:has(.cert-sheet) :is(.doc-head, .cert-tools, .cert-name, .cert-back, .related, .lesson-actions) { display: none !important; }
  body:has(.cert-sheet) main, body:has(.cert-sheet) .prose { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  html:has(.cert-sheet), html:has(.cert-sheet) body { page: cert; }
  .cert-sheet {
    break-inside: avoid; min-height: 170mm; align-content: center; animation: none !important;
    background: #fff !important; color: #111; box-shadow: none !important; border: 2.5pt solid #c99a3c; border-radius: 6mm; outline: 0.75pt solid #c99a3c; outline-offset: -4mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .cert-brand, .cert-facts { color: #9a6f1c !important; }
  .cert-line, .cert-date small, .cert-small { color: #555 !important; }
  .cert-who { color: #8a6215 !important; background: none !important; -webkit-text-fill-color: #8a6215; border-color: #c99a3c; }
  .cert-title, .cert-course, .cert-date strong { color: #111 !important; }
}

/* ===== Added: journal setup, feeling, insights and the monthly report ===== */
.chip-bear { background: rgba(192, 68, 72, 0.2); color: var(--bear-text); }
.jr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip.mood-ruhig, .jr-chip.mood-ruhig[aria-pressed="true"] { background: rgba(141, 189, 240, 0.16); color: var(--blue-text); }
.chip.mood-sicher, .jr-chip.mood-sicher[aria-pressed="true"] { background: rgba(25, 170, 142, 0.16); color: var(--bull-text); }
.chip.mood-unsicher, .jr-chip.mood-unsicher[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.chip.mood-fomo, .chip.mood-rache, .jr-chip.mood-fomo[aria-pressed="true"], .jr-chip.mood-rache[aria-pressed="true"] { background: rgba(192, 68, 72, 0.2); color: var(--bear-text); }
.chip.mood-muede, .jr-chip.mood-muede[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); }
.jr-form-top { grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); }
.jr-when { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 999px;
  background: rgba(255, 255, 255, 0.045); color: var(--text-2); font: 600 0.8125rem/1.2 var(--sans); cursor: pointer;
  transition: transform 0.35s var(--spring), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.jr-chip:hover { border-color: rgba(233, 192, 99, 0.4); color: var(--text); }
.jr-chip:active { transform: scale(0.95); }
.jr-chip[aria-pressed="true"] { background: var(--gold-soft); border-color: rgba(233, 192, 99, 0.5); color: var(--gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.jr-mood, .jr-plan { gap: 8px; }
.jr-plan .seg { align-self: start; }
.jr-break { display: grid; gap: 8px; }
.prose .jr-break h2, .prose .jr-insights h2, .prose .jr-report h2 { margin: 10px 0 4px !important; }
.br-row { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 0.875rem; }
.br-label { display: grid; min-width: 0; line-height: 1.3; }
.br-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }
.br-label small { color: var(--text-3); font-size: 0.75rem; }
.jr-break-empty { margin: 0; font-size: 0.875rem; }
.jr-insights {
  position: relative; padding: 16px 18px; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, rgba(233, 192, 99, 0.13), transparent 55%), var(--glass-fill);
  border: 1px solid rgba(233, 192, 99, 0.22); box-shadow: var(--glass-shadow);
}
.jr-insights .h-sm { display: flex; align-items: center; gap: 8px; margin-top: 0 !important; }
.jr-insights .h-sm .i { color: var(--gold); }
.jr-insights > p { margin: 0; font-size: 0.9375rem; }
.jr-insight-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0 !important; }
.jr-insight-list li { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 0.9375rem; line-height: 1.5; animation: rise 0.5s var(--ease-out) both; }
.jr-insight-list li:nth-child(2) { animation-delay: 0.06s; }
.jr-insight-list li:nth-child(3) { animation-delay: 0.12s; }
.jr-insight-list li:nth-child(4) { animation-delay: 0.18s; }
.jr-insight-list .i { flex: none; margin-top: 4px; color: var(--gold); }
.jr-pane-auswertung { gap: 18px; }
.jr-report { display: grid; gap: 18px; }
.jr-report-tools { margin-bottom: 14px; }
.jr-report { padding: clamp(16px, 4vw, 26px); border-radius: 26px; background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
.jr-report-head small { color: var(--gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.jr-report-head h2 { margin: 2px 0 0 !important; font-size: clamp(1.5rem, 4vw, 2rem) !important; }
.jr-report-head p { margin: 2px 0 0; font-size: 0.875rem; }
.jr-report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.jr-report-curve { margin: 0; padding: 12px; border-radius: var(--radius-sm); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
.jr-report-curve figcaption { margin-bottom: 6px; color: var(--text-3); font-size: 0.8125rem; }
.jr-curve { display: block; width: 100%; height: auto; }
.jr-curve-line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.jr-curve-zero { stroke: rgba(255, 255, 255, 0.18); stroke-dasharray: 4 5; }
.jr-curve-area.is-up { fill: rgba(25, 170, 142, 0.16); }
.jr-curve-area.is-down { fill: rgba(192, 68, 72, 0.16); }
.jr-report-note textarea { min-height: 110px; }
.jr-report-note-print, .jr-report-foot { display: none; }
.jr-report-empty { margin: 0; }
@media (max-width: 599px) {
  .jr-form-top { grid-template-columns: 1fr; }
  .jr-report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .br-row { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto; gap: 8px; }
  .jr-tabs .seg-btn span { font-size: 0.8125rem; }
}
@media print {
  body:has(.jr-pane-bericht:not([hidden])) :is(.doc-head, .journal-notice, .jr-top, .jr-report-tools, .jr-report-note .field) { display: none !important; }
  .jr-report { display: block; padding: 0; border: 0; background: none !important; box-shadow: none !important; color: #111; }
  .jr-report > * { margin-bottom: 14pt; break-inside: avoid; }
  .jr-report::before, .jr-report .stat::before { display: none !important; }
  .jr-report .stat { background: none !important; border: 0.75pt solid #bbb !important; box-shadow: none !important; }
  .jr-report :is(strong, h2, .wk-value) { color: #111 !important; }
  .jr-report :is(small, .stat-note, .muted, figcaption) { color: #555 !important; }
  .jr-report .tone-bull { color: #0d7a63 !important; }
  .jr-report .tone-bear { color: #a3282d !important; }
  .jr-report-head small { color: #9a6f1c !important; }
  .jr-report-curve { background: none; box-shadow: none; border: 0.75pt solid #bbb; }
  .jr-curve-line { stroke: #9a6f1c; }
  .jr-curve-zero { stroke: #999; }
  .wk-track { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wk-track i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .jr-report-note-print { display: block; white-space: pre-wrap; padding: 8pt; border: 0.75pt solid #bbb; border-radius: 4pt; color: #111; }
  .jr-report-note-print:empty { display: none; }
  .jr-report-note::before { content: "Mein Fazit zum Monat"; display: block; font-weight: 700; margin-bottom: 4pt; color: #111; }
  .jr-report-foot { display: block; color: #555; font-size: 9pt; }
}

/* ===== Added: visitor statistics in the admin panel ===== */
.visits-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.visits-note { margin: 0; font-size: 0.8125rem; }
.visits .admin-stats { margin: 4px 0 0; }
.visits-chart { margin: 0; padding: 14px 14px 10px; border-radius: var(--radius); background: var(--glass-fill); border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
.visits-chart figcaption { color: var(--text-2); font-size: 0.8125rem; font-weight: 600; margin-bottom: 8px; }
.visits-plot { position: relative; padding-top: 18px; }
.visits-max { position: absolute; top: 0; left: 0; color: var(--text-3); font-size: 0.6875rem; }
.visits-bars { display: flex; align-items: flex-end; gap: 2px; height: 150px; border-top: 1px dashed rgba(255, 255, 255, 0.08); border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.visits-bar { position: relative; display: flex; align-items: flex-end; flex: 1 1 0; min-width: 0; height: 100%; cursor: default; outline: none; }
.visits-bar i { display: block; width: 100%; height: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #f2cf78, #c99a3c); transform: scaleY(var(--p, 0)); transform-origin: bottom; transition: transform 0.6s var(--ease-out), filter 0.2s ease; }
.visits-bar:hover i, .visits-bar:focus-visible i { filter: brightness(1.25); }
.visits-bar:focus-visible { box-shadow: 0 0 0 2px var(--gold); border-radius: 4px; }
.visits-bar.is-today i { background: linear-gradient(180deg, #fff1cc, #e9c063); }
.visits-tip { position: absolute; top: -6px; z-index: 2; padding: 5px 10px; border-radius: 10px; background: rgba(20, 20, 23, 0.95); box-shadow: var(--chrome-shadow); color: var(--text); font-size: 0.75rem; white-space: nowrap; pointer-events: none; }
.visits-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-3); font-size: 0.6875rem; }
.visits-cols { display: grid; gap: 18px; }
.visits-col { display: grid; gap: 8px; align-content: start; min-width: 0; }
.prose .visits h3 { margin: 6px 0 2px !important; }
.visits-table { width: 100%; font-size: 0.875rem; }
.visits-table td.mono, .visits-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.wk-track i.is-gold { background: linear-gradient(90deg, #c99a3c, var(--gold)); }
.visits-flow { display: grid; gap: 8px; }
.visits-section { padding: 4px 14px; border-radius: var(--radius-sm); background: var(--glass-fill); border: 1px solid var(--line); }
.visits-section summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; cursor: pointer; }
.visits-section summary small { color: var(--text-3); }
.visits-section[open] { padding-bottom: 12px; }
.visits-section .br-row + .br-row { margin-top: 8px; }
@media (min-width: 900px) {
  .visits-cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .visits .admin-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ===== Added: reminder switch on the account page ===== */
.remind { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.remind-switch { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0; border: 0; background: none; color: var(--text); font: 600 0.9375rem/1.3 var(--sans); cursor: pointer; text-align: left; }
.remind-knob { position: relative; flex: none; width: 52px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6); transition: background-color 0.3s ease; }
.remind-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #fff, #d9d9de); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45); transition: transform 0.45s var(--spring); }
.remind-switch.is-on .remind-knob { background: linear-gradient(180deg, #f2cf78, #c99a3c); }
.remind-switch.is-on .remind-knob::after { transform: translateX(20px); }
.remind-switch:focus-visible .remind-knob { outline: 2px solid var(--gold); outline-offset: 2px; }
.remind-switch:disabled { opacity: 0.6; }
.remind-hour { min-width: 8.5rem; }
.remind-others { flex-basis: 100%; color: var(--text-3); font-size: 0.8125rem; }
.remind-others:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .remind-knob::after { transition: none; } }
.prose strong.tone-bull, .prose .stat strong.tone-bull { color: var(--bull-text); }
.prose strong.tone-bear, .prose .stat strong.tone-bear { color: var(--bear-text); }

/* ===== Added: Gold-Analyse (Tages-Ausbruch and Trend-Signal), phones first ===== */
.top-tool { color: var(--gold); }
.top-tool-label { display: none; }
@media (min-width: 900px) {
  .top-tool { display: inline-flex; align-items: center; width: auto; height: 40px; gap: 7px; margin-right: 6px; padding: 0 15px 0 13px; border-radius: 999px;
    background: linear-gradient(180deg, rgba(233, 192, 99, 0.2), rgba(233, 192, 99, 0.08)); box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.25), inset 0 0 0 1px rgba(233, 192, 99, 0.25);
    font-size: 0.875rem; font-weight: 650; text-decoration: none; }
  .top-tool:hover { color: #f7dc98; background: linear-gradient(180deg, rgba(233, 192, 99, 0.28), rgba(233, 192, 99, 0.12)); }
  .top-tool-label { display: inline; }
}
@media (min-width: 1100px) { .layout-tool .prose:has(.an) { max-width: none; } }

.an { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.an-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.an-strategies .seg-btn { flex: 1; gap: 8px; min-height: 46px; font-weight: 650; }
.an-tfs .seg-btn { flex: 1; min-height: 40px; font-variant-numeric: tabular-nums; }
.an-meta { color: var(--text-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .an-nav { grid-template-columns: minmax(0, 23rem) minmax(0, 20rem) minmax(0, 1fr); align-items: center; }
  .an-meta { grid-column: 3; text-align: right; }
}
.an-banner { margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); color: var(--text-2); font-size: 0.875rem; }
.an-banner.is-warn { background: var(--gold-soft); color: var(--text); }
.an-copy-area { position: fixed; top: -100px; left: 0; opacity: 0; }

/* The answer card: status, prices to copy, lot size and the honest hit rate. */
.an-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 26px;
  background: var(--glass-fill); border: 1px solid rgba(255, 255, 255, 0.045); box-shadow: var(--glass-shadow);
}
.an-hero::before, .an-card::before, .an-chart::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: var(--lg-rim); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.an-signal { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.06); color: var(--text-2); }
.an-signal-word { display: inline-flex; align-items: center; gap: 9px; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.03em; line-height: 1.1; }
.an-grade { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; text-align: right; }
.an-hero.is-buy .an-signal { background: radial-gradient(120% 160% at 20% 0%, rgba(95, 217, 190, 0.35), rgba(25, 170, 142, 0.12) 60%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(95, 217, 190, 0.35), 0 10px 30px rgba(25, 170, 142, 0.2); color: var(--bull-text); }
.an-hero.is-sell .an-signal { background: radial-gradient(120% 160% at 20% 0%, rgba(245, 154, 156, 0.33), rgba(192, 68, 72, 0.12) 60%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(245, 154, 156, 0.35), 0 10px 30px rgba(192, 68, 72, 0.2); color: var(--bear-text); }
.an-hero.is-ready .an-signal { background: radial-gradient(120% 160% at 20% 0%, rgba(255, 228, 160, 0.3), rgba(233, 192, 99, 0.1) 60%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(233, 192, 99, 0.4), 0 10px 30px rgba(233, 192, 99, 0.16); color: var(--gold); }
.an-hero.is-fresh .an-signal { animation: an-pulse 2.2s ease-in-out infinite; }
@keyframes an-pulse { 50% { transform: scale(1.02); filter: brightness(1.15); } }
.an-answer { display: grid; gap: 3px; min-width: 0; }
.an-answer-title { font-size: 1.0625rem; line-height: 1.3; }
.an-answer-text { color: var(--text-2); font-size: 0.9375rem; line-height: 1.45; }
.an-timer { color: var(--gold); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-timer:empty { display: none; }
.an-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr)); gap: 8px; }
.an-level {
  position: relative; display: grid; gap: 1px; min-height: 54px; padding: 8px 34px 8px 12px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: transform 0.35s var(--spring), border-color 0.2s ease;
}
.an-level:active { transform: scale(0.97); transition-duration: 0.1s; }
.an-level:hover { border-color: rgba(233, 192, 99, 0.4); }
.an-level small { color: var(--text-3); font-size: 0.75rem; }
.an-level strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.an-level.is-sl strong { color: var(--bear-text); }
.an-level.is-tp strong { color: var(--bull-text); }
.an-level-copy { position: absolute; top: 50%; right: 11px; translate: 0 -50%; color: var(--text-3); font-size: 0.8125rem; }
.an-lot {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; align-items: center; width: 100%; min-height: 58px; padding: 9px 14px; border: 0; border-radius: 16px;
  background: linear-gradient(180deg, rgba(233, 192, 99, 0.18), rgba(233, 192, 99, 0.07)); box-shadow: inset 0 0 0 1px rgba(233, 192, 99, 0.32); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: transform 0.35s var(--spring);
}
.an-lot:active { transform: scale(0.98); transition-duration: 0.1s; }
.an-lot-main { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); }
.an-lot-main strong { font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.an-lot small { grid-column: 1; color: var(--text-2); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.an-lot-go { grid-column: 2; grid-row: 1 / span 2; color: var(--gold); }
.an-lot.is-warn { background: rgba(192, 68, 72, 0.12); box-shadow: inset 0 0 0 1px rgba(245, 154, 156, 0.35); }
.an-lot.is-warn .an-lot-main, .an-lot.is-warn .an-lot-go { color: var(--bear-text); }
.an-prob { display: flex; align-items: center; gap: 12px; }
.an-ring-box { position: relative; display: grid; place-items: center; flex: none; width: 64px; height: 64px; }
.an-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.an-ring-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 6; }
.an-ring-fill { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; }
.an-ring-value { position: relative; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.an-prob-text { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.an-prob-text strong { font-size: 0.875rem; }
.an-prob-text span { color: var(--text-3); font-size: 0.8125rem; line-height: 1.4; }
.an-verdict { padding: 2px 10px; border-radius: 999px; font-size: 0.75rem !important; font-weight: 650; }
.an-verdict.is-plus { background: rgba(25, 170, 142, 0.16); color: var(--bull-text) !important; }
.an-verdict.is-minus { background: rgba(192, 68, 72, 0.2); color: var(--bear-text) !important; }
.an-verdict.is-flat { background: var(--surface-2); color: var(--text-2) !important; }
@media (min-width: 900px) {
  .an-hero { grid-template-columns: auto minmax(0, 1fr) minmax(0, 20rem); grid-template-areas: "badge text prob" "levels levels lot"; align-items: center; padding: 18px; }
  .an-signal { grid-area: badge; flex-direction: column; justify-content: center; min-width: 9.5rem; padding: 14px 18px; }
  .an-signal-word { font-size: 1.75rem; }
  .an-grade { text-align: center; }
  .an-answer { grid-area: text; }
  .an-prob { grid-area: prob; }
  .an-levels { grid-area: levels; }
  .an-lot { grid-area: lot; }
}
/* Placeholder while the first answer loads, so nothing jumps. */
.an-skel { border-radius: 16px; background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 70%); background-size: 300% 100%; animation: an-shimmer 1.4s linear infinite; }
.an-skel-badge { height: 52px; }
.an-skel-lines { height: 46px; }
.an-skel-ring { height: 64px; }
@keyframes an-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Trend of all five timeframes in one row. */
.an-trendbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.an-trendbar:empty { min-height: 58px; }
.an-tchip {
  display: grid; justify-items: center; gap: 1px; min-height: 58px; padding: 7px 2px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 16px;
  background: rgba(255, 255, 255, 0.035); color: var(--text-2); font: inherit; cursor: pointer; transition: transform 0.35s var(--spring), border-color 0.2s ease;
}
.an-tchip:active { transform: scale(0.95); transition-duration: 0.1s; }
.an-tchip-tf { color: var(--text); font: 700 0.8125rem var(--mono); }
.an-tchip small { font-size: 0.6875rem; font-weight: 600; }
.an-tchip.is-bull { color: var(--bull-text); background: rgba(25, 170, 142, 0.1); }
.an-tchip.is-bear { color: var(--bear-text); background: rgba(192, 68, 72, 0.12); }
.an-tchip.is-current { border-color: rgba(233, 192, 99, 0.6); box-shadow: inset 0 0 0 1px rgba(233, 192, 99, 0.25); }

/* Chart. */
.an-chart { position: relative; margin: 0; padding: 8px 8px 8px; border-radius: var(--radius); background: var(--glass-fill); border: 1px solid rgba(255, 255, 255, 0.045); box-shadow: var(--glass-shadow); }
.an-canvas { height: clamp(260px, 44vh, 520px); }
.an-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; min-height: 22px; padding: 6px 4px 0; color: var(--text-3); font-size: 0.75rem; }
.an-key { display: inline-flex; align-items: center; gap: 6px; }
.an-key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.an-key .k-e21 { background: #e9c063; }
.an-key .k-e50 { background: #8dbdf0; }
.an-key .k-e200 { background: #86868b; }
.an-key .k-range { height: 0; border-top: 2px dashed #e9c063; border-radius: 0; }
.an-key .k-buy, .an-key .k-sell { width: 0; height: 0; border-radius: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.an-key .k-buy { border-bottom: 8px solid #19aa8e; }
.an-key .k-sell { border-top: 8px solid #c04448; }
.an-key .k-exit { width: 8px; height: 8px; border-radius: 50%; background: #b0b0b6; }
.an-key .k-sl { background: #c04448; }
.an-key .k-tp { background: #19aa8e; }

/* Foldable cards. */
.an-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
@media (min-width: 1000px) {
  .an-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  .an-cards .an-about { grid-column: 1 / -1; }
}
.an-card { position: relative; min-width: 0; border-radius: var(--radius); background: var(--glass-fill); border: 1px solid rgba(255, 255, 255, 0.045); box-shadow: var(--glass-shadow); }
.an-card-head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px 0 16px; cursor: pointer; list-style: none; border-radius: inherit; }
.an-card-head::-webkit-details-marker { display: none; }
.an-card-title { display: inline-flex; align-items: center; gap: 9px; flex: none; font-size: 1rem; font-weight: 650; }
.an-card-title .i { color: var(--gold); }
.an-card-info { margin-left: auto; min-width: 0; overflow: hidden; color: var(--text-3); font-size: 0.8125rem; text-align: right; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-chev { flex: none; color: var(--text-3); font-size: 0.8125rem; transition: transform 0.4s var(--spring); }
.an-card[open] > .an-card-head .an-chev { transform: rotate(90deg); }
.an-card-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 2px 14px 16px; }
.an-card-body > p, .an-card-body .calc-note { margin: 0; }
.an-plan-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.an-plan-body > p, .an-plan-body .calc-note { margin: 0; }
.prose .an-card-body h3 { margin: 4px 0 -6px !important; }
.an-about p { color: var(--text-2); font-size: 0.9375rem; }

/* Balance, risk, leverage and stop mode above the plan. */
.an-wallet { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(233, 192, 99, 0.1), rgba(233, 192, 99, 0.03)); box-shadow: inset 0 0 0 1px rgba(233, 192, 99, 0.22); }
.an-wallet-input { position: relative; display: flex; align-items: center; }
.an-wallet-input input { width: 100%; padding-right: 3.6rem; font-size: 1.375rem !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.an-wallet-unit { position: absolute; right: 14px; color: var(--text-3); font-size: 0.875rem; font-weight: 650; pointer-events: none; }
.an-wallet-label { color: var(--text-2); font-size: 0.875rem; font-weight: 550; }
.an-wallet-chips .jr-chip { font-variant-numeric: tabular-nums; }
.an-wallet-lev { max-width: 14rem; }
.an-slmode { display: grid; gap: 8px; }
.an-slmode-hint { color: var(--text-3); font-size: 0.8125rem; line-height: 1.4; }
.an-plan-intro { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--text-2); font-size: 0.875rem; }
.an-plan-intro .i { flex: none; margin-top: 3px; color: var(--text-3); }
.an-plan-intro.is-live .i { color: var(--gold); }
.an-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.an-plan-grid > div { display: grid; gap: 1px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.an-plan-grid dt { color: var(--text-3); font-size: 0.75rem; }
.an-plan-grid dd { margin: 0; font: 650 1rem/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.an-plan-grid .is-key { grid-column: 1 / -1; background: linear-gradient(180deg, rgba(233, 192, 99, 0.16), rgba(233, 192, 99, 0.06)); box-shadow: inset 0 0 0 1px rgba(233, 192, 99, 0.3); }
.an-plan-grid .is-key dd { color: var(--gold); font-size: 1.5rem; }
@media (min-width: 600px) { .an-plan-body > .an-plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.an-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.an-side { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.025); }
.an-side.is-buy { box-shadow: inset 0 0 0 1px rgba(95, 217, 190, 0.3); }
.an-side.is-sell { box-shadow: inset 0 0 0 1px rgba(245, 154, 156, 0.3); }
.an-side-title { display: inline-flex; align-items: center; gap: 7px; font-size: 0.875rem; }
.an-side.is-buy .an-side-title { color: var(--bull-text); }
.an-side.is-sell .an-side-title { color: var(--bear-text); }
.an-side .an-plan-grid { grid-template-columns: minmax(0, 1fr); }
.an-side .an-plan-grid .is-key dd { font-size: 1.25rem; }
.an-side .an-level { padding-right: 30px; }

/* Checklists. Ticks only spring in when a list is new, never on a plain refresh. */
.an-dir { align-self: start; }
.an-checklist { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0 !important; }
.an-item { display: flex; gap: 12px; margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.025); }
.an-checklist.is-new .an-item { animation: rise 0.45s var(--ease-out) var(--d, 0ms) both; }
.an-mark { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: 0.8rem; }
.an-item.is-ok .an-mark { background: var(--bull); color: #fff; box-shadow: 0 4px 14px rgba(25, 170, 142, 0.35); }
.an-checklist.is-new .an-item.is-ok .an-mark { animation: tick 0.5s var(--spring) var(--d, 0ms) both; }
.an-item.is-no .an-mark { background: rgba(192, 68, 72, 0.18); color: var(--bear-text); }
.an-item.is-wait .an-mark { background: var(--gold-soft); color: var(--gold); }
@keyframes tick { from { transform: scale(0.3); } }
.an-item-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.an-item-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.an-item-top strong { font-size: 0.9375rem; }
.an-item-value { color: var(--text-2); font: 0.8125rem/1.4 var(--mono); }
.an-item-why { margin: 0; color: var(--text-3); font-size: 0.8125rem; line-height: 1.45; }
.an-check-foot { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--gold-soft); color: var(--text-2); font-size: 0.875rem; }
.an-check-foot .i { flex: none; margin-top: 3px; color: var(--gold); }
.an-check-foot.is-signal { background: rgba(25, 170, 142, 0.14); }
.an-check-foot.is-signal .i { color: var(--bull-text); }

/* Strategy numbers. */
.an-math-verdict { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px 12px; border-radius: 14px; font-size: 0.9375rem; line-height: 1.45; background: var(--surface-2); color: var(--text); }
.an-math-verdict .i { flex: none; margin-top: 4px; }
.an-math-verdict.is-plus { background: rgba(25, 170, 142, 0.14); }
.an-math-verdict.is-plus .i { color: var(--bull-text); }
.an-math-verdict.is-minus { background: rgba(192, 68, 72, 0.16); }
.an-math-verdict.is-minus .i { color: var(--bear-text); }
.an-math-grid { margin: 0; }
@media (min-width: 600px) { .an-math-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) and (max-width: 1399px) { .an-math-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.an-grade-box { display: grid; gap: 1px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); font-size: 0.8125rem; }
.an-grade-box strong { font-size: 0.875rem; }
.an-grade-box small { color: var(--text-3); }
.an-grade-box.is-plus { box-shadow: inset 0 0 0 1px rgba(95, 217, 190, 0.3); }
.an-grade-box.is-minus { box-shadow: inset 0 0 0 1px rgba(245, 154, 156, 0.35); }
.an-mc { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
.prose .an-mc h3 { margin: 0 !important; font-size: 0.9375rem !important; }
.an-mc-list { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0 !important; }
.an-mc-list li { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 0.875rem; line-height: 1.45; }
.an-mc-list .i { flex: none; margin-top: 3px; color: var(--gold); }
.an-mc-note, .an-since { margin: 0; font-size: 0.75rem; }

/* History, settings, push, notes. */
.an-sum { margin: 0; color: var(--text-2); font-size: 0.875rem; }
.an-sum strong { color: var(--text); }
.an-table { width: 100%; font-size: 0.875rem; }
.an-table th, .an-table td { padding: 8px 8px; }
.an-table td.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Where the card is narrow, stop and exit price make room; entry and result stay. */
@media (max-width: 599px), (min-width: 1000px) and (max-width: 1499px) { .an-table .an-opt { display: none; } }
.an-res span { font-weight: 650; }
.an-res small { display: block; color: inherit; opacity: 0.8; }
.an-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.an-push-chips .jr-chip { min-width: 3.4rem; justify-content: center; }
.an-disclaimer { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 16px; background: rgba(233, 192, 99, 0.07); box-shadow: inset 0 0 0 1px rgba(233, 192, 99, 0.2); color: var(--text-2); font-size: 0.8125rem; line-height: 1.5; }
.an-disclaimer .i { flex: none; margin-top: 3px; color: var(--gold); }
@media (max-width: 599px) {
  /* On a phone the answer card should be on the first screen: a short page head. */
  body:has(.an) .doc-head .lede, body:has(.an) .doc-head .crumbs { display: none; }
  body:has(.an) .doc-head h1 { font-size: 1.5rem; }
  body:has(.an) .doc-head { margin-bottom: 12px; }
  .an-card-head { padding: 0 12px 0 14px; }
  .an-card-body { padding: 2px 12px 14px; }
  .an-strategies .seg-btn { font-size: 0.875rem; }
}
@media (max-width: 359px) { .an-tchip small { display: none; } .an-sides { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .an-hero.is-fresh .an-signal, .an-checklist.is-new .an-item, .an-checklist.is-new .an-item.is-ok .an-mark, .an-skel { animation: none; }
}
@media print { .an-chart, .an-push, .an-settings, .an-nav, .an-trendbar { display: none !important; } }
