:root {
    --bg: #0f172a;
    --card: #1e293b;
    --ink: #0b1220;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: #334155;
    --accent: #2563eb;
    --accent-2: #1d4ed8;
    --accent-bright: #5b9bff;
    --accent-bright-2: #8cbcff;
    --warn: #fbbf24;
    --up: #4ade80;
    --up-ink: #86efac;
    --down: #f87171;
    --down-soft: rgba(248, 113, 113, 0.28);
    --info: #93c5fd;
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Manrope, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

a { color: inherit; }

.wrap {
    width: min(1120px, calc(100% - 80px));
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 35;
    background: var(--bg);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    width: min(1120px, calc(100% - 80px));
    margin: 0 auto;
    padding: 18px 0 12px;
}

body:has(.settings-rail) .header-bar {
    width: auto;
    max-width: none;
    margin: 0 20px 0 16px;
}

.header-start { display: flex; align-items: center; gap: 10px; }

.menu-toggle[hidden],
body:not(:has(.settings-rail)) .menu-toggle { display: none; }

.menu-toggle,
.menu-toggle:hover {
    width: 36px;
    height: 36px;
    padding: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #e2e8f0;
}

.sidebar-backdrop {
    position: fixed;
    top: var(--header-h, 64px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    background: rgba(2, 6, 23, 0.62);
}

.sidebar-backdrop[hidden] { display: none; }

.settings-rail {
    position: fixed;
    top: var(--header-h, 64px);
    left: 0;
    z-index: 20;
    width: 232px;
    height: calc(100% - var(--header-h, 64px));
    overflow: auto;
    padding: 16px 16px 32px;
    background: #111827;
    border-right: 1px solid var(--line);
}

body:has(.settings-rail) .wrap {
    width: auto;
    max-width: none;
    margin: 0 16px 0 248px;
}

.rail-label {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.side-settings {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.side-settings .tool input,
.side-settings .tool select { width: 100%; max-width: none; }

.side-settings .segment,
.side-settings .pro-toggle { width: 100%; }

.side-settings .segment a {
    flex: 1;
    justify-content: center;
}

.side-settings button.fav-screen,
.side-settings button.fav-screen:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.brand { display: flex; align-items: center; text-decoration: none; }

.brand img { height: 32px; width: auto; display: block; }

.ticker {
    height: 30px;
    margin: 4px 0 12px;
    overflow: hidden;
    border: 1px solid #243044;
    border-radius: 8px;
    background: #0b1220;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker-track {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
    height: 30px;
    animation: ticker 70s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker a {
    flex: none;
    color: #cbd5e1;
    text-decoration: none;
    white-space: nowrap;
    font-family: Manrope, Helvetica, Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 30px;
}

.ticker a,
.ticker a:hover,
.ticker a:visited,
.ticker a:focus {
    text-decoration: none;
}

.ticker a::after {
    content: "·";
    color: #334155;
    margin: 0 22px;
    font-weight: 400;
}

.ticker a span {
    color: #64748b;
    font-weight: 500;
    margin-left: 8px;
}

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }

.top-nav { gap: 6px; }

.top-nav a {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--text);
    font-weight: 650;
}

.top-nav a:hover { background: #1e293b; }

.hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin: 8px 0;
}

.cal-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}

.cal-nav, .cal-tools {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.cal-nav h1 {
    margin: 0 0 0 6px;
    font-size: 26px;
    letter-spacing: -0.03em;
    line-height: 36px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.icon-btn:hover { background: #1e293b; }

.tool { display: grid; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

input, select, button {
    font: inherit;
    color: var(--text);
    background: #0b1220;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
}

.tool input { width: 160px; }
.tool select { max-width: 150px; }

.segment {
    display: inline-flex;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.segment a {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.segment a.on { background: #1e293b; color: #fff; }

button.fav-screen,
button.fav-screen:hover {
    height: 36px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

button.fav-screen.on,
button.fav-screen.on:hover {
    background: #1e293b;
    color: #fff;
}

.pro-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px 0 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.pro-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
}

.knob {
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #334155;
    position: relative;
}

.knob::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}

.pro-toggle input:checked + .knob { background: var(--accent); }

.pro-toggle input:checked + .knob::after { transform: translateX(14px); }

.pro-toggle:has(input:checked) { color: #fff; }

.pro-toggle input:focus-visible + .knob { outline: 2px solid #93c5fd; outline-offset: 2px; }

.legend {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.legend span { display: inline-flex; align-items: center; gap: 6px; }

.swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

.swatch.macro { background: #a78bfa; }
.swatch.ipo { background: #2dd4bf; }
.swatch.high { background: #ef4444; }
.swatch.medium { background: #f59e0b; }
.swatch.low { background: #60a5fa; }

.cal-scroll { overflow-x: auto; }

.cal {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.cal.week { min-width: 980px; }

.cal.week .chip { overflow: hidden; }

.dow, .day {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.dow:nth-child(7n), .day:nth-child(7n) { border-right: 0; }

.dow {
    padding: 8px 8px 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: #0b1220;
}

.day {
    min-height: 132px;
    padding: 6px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.cal.month .day:hover { background: #132033; }

.cal.week .day { min-height: 460px; }

.cal.week .day:hover { background: #132033; }

.day.outside { background: #0b1220; }

.cal.month .day.outside:hover,
.cal.week .day.outside:hover { background: #10192c; }

.day.outside .num { color: #64748b; }

.chip-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.num {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.day.today .num { background: var(--accent); color: #fff; }

.chip {
    display: block;
    width: 100%;
    margin: 0;
    padding: 2px 6px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 6px;
    text-align: left;
    font-size: 12px;
    line-height: 1.35;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.cal .chip { transition: opacity 0.6s ease; }

.cal .chip.is-out { opacity: 0; }

.chip-top { font-weight: 800; }

.chip-time { font-weight: 600; opacity: 0.85; }

.cal.month .chip,
.cal.month .chip-top {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal.month .chip-time { display: none; }

.cal.week .chip-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
}

.cal.week .chip-time {
    margin-left: auto;
    font-size: 11px;
    white-space: nowrap;
}

.chip-local {
    display: block;
    margin-top: 2px;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
}

.cal.month .chip-local { display: none; }

.rail-link {
    display: inline-flex;
    align-items: center;
    height: 36px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.rail-link:hover { color: var(--text); }

.time-card { display: grid; gap: 12px; max-width: 560px; }

.time-card h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }

.time-card .lede { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }

.time-card .tool input,
.time-card .tool select { width: 100%; max-width: none; }

.time-preview { margin: 0; color: #cbd5e1; }

.time-saved { margin: 0; color: #bbf7d0; }

.cal.month .chip-extra { display: none; }

.cal.week .chip { padding: 8px; }
.cal.week .chip-extra {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
    opacity: 0.92;
}

button.chip.macro,
button.chip.macro:hover { background: #4c1d95; color: #ede9fe; border-left-color: #a78bfa; }
button.chip.ipo,
button.chip.ipo:hover { background: #134e4a; color: #ccfbf1; border-left-color: #2dd4bf; }
button.chip.impact-high,
button.chip.impact-high:hover { background: #7f1d1d; color: #fee2e2; border-left-color: #ef4444; }
button.chip.impact-medium,
button.chip.impact-medium:hover { background: #78350f; color: #fef3c7; border-left-color: #f59e0b; }
button.chip.impact-low,
button.chip.impact-low:hover { background: #1e3a5f; color: #dbeafe; border-left-color: #60a5fa; }

#day-list {
    width: min(720px, calc(100% - 32px));
    padding: 24px 24px 20px;
}

#day-list h2 {
    margin: 4px 44px 0 0;
    font-size: 26px;
    line-height: 1.3;
}

#day-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(68vh, 640px);
    overflow: auto;
    margin-top: 18px;
    padding-right: 4px;
}

#day-items .chip {
    flex: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.day-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

.day-row-symbol { font-weight: 800; }

.day-row-company {
    margin-left: 8px;
    font-weight: 600;
}

.day-row-time {
    flex: none;
    font-size: 13px;
    font-weight: 700;
    opacity: 0.85;
}

.day-row-sub {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.92;
}

.muted { color: var(--muted); }

.banner, .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 18px;
    margin: 16px 0;
}

button, .button {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button.ghost,
button.ghost:hover {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    font-weight: 700;
}

button.ghost.on,
button.ghost.on:hover {
    border-color: #fbbf24;
    color: #fde68a;
}

#fav-event { margin: 8px 0 4px; }

button:hover, .button:hover { background: var(--accent-2); }

.dialog-close, .chip { background-clip: padding-box; }

dialog {
    width: min(520px, calc(100% - 24px));
    padding: 20px 20px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #1e293b;
    color: var(--text);
}

dialog::backdrop { background: rgba(2, 6, 23, 0.72); }

dialog h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }

.detail-kicker {
    margin: 0 28px 6px 0;
    color: var(--warn);
    font-size: 12px;
    font-weight: 700;
}

dialog form { margin: 0; }

.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

#detail-facts {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

#detail-facts div { display: grid; grid-template-columns: 156px 1fr; gap: 8px; align-items: baseline; }

#detail-facts dt { color: var(--muted); font-size: 13px; }

#detail-facts dd { margin: 0; font-variant-numeric: tabular-nums; }

#detail-summary { margin: 0; color: #cbd5e1; white-space: pre-wrap; line-height: 1.6; }

.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
    align-items: stretch;
}

.hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.plan h2 { margin: 0 0 8px; }

.plan ul { padding-left: 18px; margin: 0; }

.plan-mail {
    display: inline-flex;
    align-items: center;
    height: 36px;
    margin-top: 16px;
    padding: 0 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-weight: 650;
}

.plan-mail:hover { background: #0f172a; }

.plan { height: 100%; }

button.plan-choose {
    width: 100%;
    margin-top: auto;
}

button.plan-quiet,
button.plan-quiet:hover {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

#plan-signup { display: grid; gap: 12px; margin-top: 4px; }

#plan-dialog-detail { margin: 0; color: #cbd5e1; }

.plan-offer { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.site-footer {
    margin-top: 8px;
    padding: 20px 0 40px;
    border-top: 1px solid var(--line);
}

.site-footer-inner {
    width: min(1120px, calc(100% - 80px));
    margin: 0 auto;
}

body:has(.settings-rail) .site-footer-inner {
    width: auto;
    max-width: none;
    margin: 0 16px 0 248px;
}

.disclaimer { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.site-footer-nav {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 10px;
}

.site-footer-nav a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.site-footer-nav a:hover { color: var(--text); }

.plans-page { padding-bottom: 28px; }

.plans-page .lede { max-width: 640px; color: var(--muted); margin: 0 0 8px; }

.bill-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 4px;
}

.bill-toggle button,
.bill-toggle button:hover {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    font-weight: 700;
}

.bill-toggle button.on,
.bill-toggle button.on:hover {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
}

.save-pill {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #14532d;
    color: #bbf7d0;
    font-size: 12px;
    font-weight: 800;
}

.plan { display: flex; flex-direction: column; position: relative; }

.plan-pro { border-color: #2563eb; box-shadow: inset 0 0 0 1px #2563eb; }

.plan-badge {
    align-self: flex-start;
    margin: 0 0 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #1d4ed8;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.plan-badge[hidden] { display: none; }

.plan-price { margin: 0 0 6px; }

.plan-price strong {
    font-size: 40px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.plan-price span { color: var(--muted); font-weight: 700; }

.plan-benefit { margin: 8px 0 12px; color: #cbd5e1; }

.plan li { margin: 6px 0; }

.compare, .faq { margin-top: 28px; }

.compare h2, .faq h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -0.03em; }

.compare-scroll { overflow-x: auto; }

.compare table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.compare th, .compare td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.compare thead th { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

.compare td { font-weight: 700; }

button.feat-info,
button.feat-info:hover {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

button.feat-info[aria-expanded="true"],
button.feat-info[aria-expanded="true"]:hover {
    background: #1e293b;
    color: #fff;
}

.feat-note {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #0b1220;
    color: #cbd5e1;
}

.faq details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 8px 0;
}

.faq summary { cursor: pointer; font-weight: 700; }

.faq details p { margin: 8px 0 0; color: #cbd5e1; }

.faq a { color: #93c5fd; }

.sticky-plan,
.sticky-plan:hover { display: none; }

.legal { max-width: 720px; padding-bottom: 24px; }

.legal h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.04em; margin: 12px 0 8px; }

.legal .updated { color: var(--muted); margin-top: 0; }

.legal h2 { margin: 28px 0 8px; font-size: 20px; }
.legal h3 { margin: 18px 0 6px; font-size: 16px; }
.legal ul { color: #cbd5e1; padding-left: 18px; }
.legal li { margin: 0 0 6px; }
.qa-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.qa-table th, .qa-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.qa-table th { color: var(--muted); font-weight: 700; }

.legal p { color: #cbd5e1; }

.legal a { color: #93c5fd; }

.legal-end { margin-top: 28px; }

.prompt-note { color: var(--muted); font-size: 13px; }

.prompt-note a { color: #93c5fd; }

#free-prompt form[action="/subscribe"] { display: grid; gap: 8px; margin: 12px 0; }

#free-prompt .ghost { width: 100%; }

.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
}

.tour-overlay[hidden] { display: none; }

.tour-highlight {
    position: fixed;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.72), 0 0 0 3px #2563eb;
    pointer-events: none;
}

.tour-tooltip {
    position: fixed;
    z-index: 81;
    width: 320px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.tour-tooltip h3 { margin: 0 0 6px; font-size: 18px; }

.tour-tooltip p { margin: 0 0 14px; color: #cbd5e1; }

.tour-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.tour-actions { display: flex; gap: 8px; }

.tour-dots { display: flex; gap: 6px; }

.tour-dots i {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: #334155;
}

.tour-dots i.on { background: #60a5fa; }

button#tour-skip,
button#tour-skip:hover {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

@media (max-width: 720px) {
    .menu-toggle,
    .menu-toggle:hover { display: inline-flex; }
    .settings-rail {
        z-index: 40;
        width: min(320px, calc(100% - 48px));
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }
    body.rail-open .settings-rail { transform: none; }
    body:has(.settings-rail) .wrap,
    body:has(.settings-rail) .site-footer-inner {
        width: min(1180px, calc(100% - 32px));
        margin: 0 auto;
    }
}

@media (max-width: 980px) {
    .plans { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
    .plans { grid-template-columns: 1fr; }
    .cal-nav h1 { font-size: 22px; }
    #detail-facts div { grid-template-columns: 1fr; gap: 0; }
    .plans-page { padding-bottom: 88px; }
    .sticky-plan.is-visible,
    .sticky-plan.is-visible:hover {
        display: block;
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 16px;
        z-index: 25;
        height: 48px;
    }
}

.learn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.learn-achieve {
    flex: 0 0 188px;
    margin-top: 22px;
    background: #0b1220;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px 14px;
}
.learn-achieve-kicker { margin: 0; color: #93c5fd; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.learn-achieve-count { margin: 2px 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.learn-achieve-count span { color: var(--muted); font-size: 18px; font-weight: 700; }
.learn-achieve-track { height: 8px; background: #1e293b; border-radius: 99px; overflow: hidden; }
.learn-achieve-track span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; }
.learn-achieve.is-done { border-color: #166534; }
.learn-achieve.is-done .learn-achieve-kicker { color: #86efac; }
.learn-achieve.is-done .learn-achieve-track span { background: #4ade80; }
.learn-card.is-done { border-color: #166534; }
.email-switch { display: flex; gap: 8px; margin: 0 0 16px; }
.email-switch a {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}
.email-switch a.is-on, .email-switch a.is-on:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.email-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr); gap: 16px; align-items: start; }
.email-frame { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 16px; background: #0f172a; }
.email-parts h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -0.02em; }
.email-parts ol { margin: 0 0 14px; padding-left: 18px; color: #cbd5e1; }
.email-parts li { margin: 0 0 10px; }
.email-parts p { margin: 0; color: var(--muted); }
.email-parts code { color: var(--text); }
.learn-switch, .learn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.learn-switch button, .learn-chips button {
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-weight: 700;
}
.learn-switch button:hover, .learn-chips button:hover {
    background: transparent;
    border-color: var(--accent);
    color: var(--text);
}
.learn-switch button.is-on, .learn-switch button.is-on:hover,
.learn-chips button.is-on, .learn-chips button.is-on:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.learn-topics { display: grid; gap: 28px; }
.learn-group[hidden] { display: none !important; }
.learn-section { margin: 0 0 14px; font-size: 22px; letter-spacing: -0.03em; }
.learn-done-mark {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    display: none;
}
.learn-card.is-done .learn-done-mark { display: block; }
.learn-card.is-done::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(74, 222, 128, 0.16);
    pointer-events: none;
}
.learn-card h3, .learn-card p { position: relative; z-index: 1; }
.learn-back { margin: 18px 0 0; }
.learn-back a { color: var(--muted); font-weight: 700; text-decoration: none; }
.learn-back a:hover { color: var(--text); }

.learn-tree { position: relative; width: min(720px, 100%); margin: 8px auto 0; min-height: 240px; }
.learn-path { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.learn-node {
    position: absolute;
    z-index: 1;
    width: 156px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}
.learn-node-face {
    width: 96px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 42%), #0b1220;
    border: 5px solid var(--accent);
    box-shadow: 0 8px 0 #1e3a8a;
    color: #fff;
    font-family: Nunito, Manrope, Helvetica, Arial, sans-serif;
    font-size: 26px;
    font-weight: 800;
}
.learn-node-title {
    display: block;
    margin-top: 14px;
    padding: 2px 6px;
    background: var(--bg);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: Nunito, Manrope, Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.learn-node:hover .learn-node-face { border-color: var(--accent-bright); }
.learn-node.is-current .learn-node-face {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 46%), var(--accent);
    border-color: #93c5fd;
    box-shadow: 0 8px 0 var(--accent-2);
}
.learn-node.is-done .learn-node-face {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 42%), #14532d;
    border-color: var(--up);
    box-shadow: 0 8px 0 #166534;
}
.learn-node.is-done .learn-node-num { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.learn-node.is-done .learn-node-face::after {
    content: "";
    width: 18px;
    height: 10px;
    border-left: 4px solid #ecfdf5;
    border-bottom: 4px solid #ecfdf5;
    transform: rotate(-45deg) translate(1px, -2px);
}
.learn-node.is-branch:not(.is-current) .learn-node-num { display: none; }
.learn-node.is-branch:not(.is-done):not(.is-current) .learn-node-face::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--warn);
}
.learn-node.is-branch .learn-node-face {
    width: 82px;
    height: 72px;
    border-style: dashed;
    border-color: var(--warn);
    box-shadow: 0 7px 0 #92400e;
}
.learn-node.is-branch.is-done .learn-node-face {
    border-style: solid;
    border-color: var(--up);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%), #14532d;
    box-shadow: 0 7px 0 #166534;
}
.learn-node.is-branch.is-current .learn-node-face { border-style: solid; border-color: #93c5fd; }
.learn-index { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.learn-card { position: relative; overflow: hidden; display: block; max-width: none; text-decoration: none; color: inherit; }
.learn-card h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.03em; }
.learn-card p { margin: 0; color: #cbd5e1; }
.learn-card:hover { border-color: #60a5fa; }
.learn-card.is-done:hover { border-color: var(--up); }

.learn-lede { max-width: 760px; margin: 10px 0 0; color: #e2e8f0; font-size: 20px; line-height: 1.45; font-weight: 500; }
.learn-stage { display: grid; gap: 16px; }
.learn-board { display: grid; gap: 12px; }
.learn-panel {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(260px, 320px) auto;
    gap: 12px 20px;
    align-items: center;
}
.learn-kicker { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.learn-pos { margin: 4px 0 0; font-size: 28px; letter-spacing: -0.03em; }
.learn-stop { display: grid; gap: 8px; }
.learn-stop-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.learn-stop-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.learn-stop-fields input { width: 100%; }
.learn-readout { margin: 0; color: var(--text); font-size: 16px; font-weight: 650; }
.learn-stop .learn-readout { color: var(--down); font-size: 15px; }
.learn-stop.learn-target .learn-readout { color: var(--up-ink); }
.learn-stop.learn-plan .learn-readout { color: var(--text); }
#trail-high { fill: none; stroke: #94a3b8; stroke-width: 2; }
#profit-band { fill: #089981; opacity: 0.28; }
#profit-arrow { stroke: #34d399; stroke-width: 1.5; }
#profit-arrow-head { fill: #34d399; }
#profit-note-bg { fill: #0b1220; stroke: #089981; }
#profit-note-label { fill: #6ee7b7; font-size: 13px; font-weight: 700; font-family: Manrope, Helvetica, Arial, sans-serif; }
#old-stop { stroke: #f87171; stroke-width: 1.5; stroke-dasharray: 5 4; }
#old-stop-label { fill: #fca5a5; font-size: 12px; font-weight: 700; font-family: Manrope, Helvetica, Arial, sans-serif; }
#target-line { stroke: #089981; stroke-width: 2; }
#target-hit { stroke: transparent; stroke-width: 18; cursor: ns-resize; }
#target-band { fill: #089981; opacity: 0.16; }
#target-label-bg { fill: #0b1220; }
#target-label, #target-sold { fill: #34d399; font-size: 13px; font-weight: 700; font-family: Manrope, Helvetica, Arial, sans-serif; }
#target-dot { fill: #089981; }
.lesson-go, #run-drop {
    height: 44px;
    white-space: nowrap;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
}
.lesson-go:hover, #run-drop:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.learn-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 0; flex-wrap: wrap; }
.learn-nav-moves { display: flex; gap: 8px; flex-wrap: wrap; }
.learn-nav-back, .learn-nav-prev, .learn-nav-next {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}
.learn-nav-back, .learn-nav-prev { border: 1px solid var(--line); color: var(--text); background: transparent; }
.learn-nav-back:hover, .learn-nav-prev:hover { background: var(--card); }
.learn-nav-prev[aria-disabled="true"] { color: var(--muted); }
.learn-nav-next { background: var(--accent); color: #fff; }
.learn-nav-next:hover { background: var(--accent-2); color: #fff; }
.learn-nav-next[aria-disabled="true"] { background: var(--card); color: var(--muted); }
.lesson-field, .lesson-check { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.lesson-field[hidden], .lesson-sliders[hidden] { display: none !important; }
.lesson-check { grid-template-columns: auto 1fr; align-items: center; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.learn-stage input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: none;
    height: 32px;
    margin: 2px 0;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.learn-stage input[type="range"]:focus { outline: none; }
.learn-stage input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-bright) 45%, transparent);
}
.learn-stage input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    background: var(--line);
    border-radius: 999px;
}
.learn-stage input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    margin-top: -8px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--accent-bright);
}
.learn-stage input[type="range"]::-moz-range-track {
    height: 10px;
    background: var(--line);
    border: 0;
    border-radius: 999px;
}
.learn-stage input[type="range"]::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--accent-bright);
}
.lesson-write { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.lesson-write input, .lesson-write textarea { width: 100%; min-height: 44px; resize: vertical; }
.lesson-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.lesson-caption { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.lesson-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 14px; font-weight: 700; }
.lesson-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lesson-candle text { font-family: Manrope, Helvetica, Arial, sans-serif; }
.risk-cells { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; }
.risk-cells i { display: block; height: 12px; border-radius: 2px; background: var(--line); }
.risk-cells i.is-risk { background: var(--down); }
#lesson-mount { display: grid; gap: 12px; }
.lesson-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-choice, .lesson-choice:hover {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}
.lesson-choice.is-on, .lesson-choice.is-on:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.learn-quiz { display: grid; gap: 12px; }
.learn-quiz[hidden], #quiz-next[hidden] { display: none !important; }
#quiz-prompt { margin: 0; font-size: 18px; font-weight: 700; }
#quiz-choices { display: grid; gap: 8px; }
#quiz-choices .quiz-choice {
    width: 100%;
    height: auto;
    min-height: 44px;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    padding: 10px 14px;
}
.quiz-choice:disabled { opacity: 1; cursor: default; }
.quiz-choice.is-right, .quiz-choice.is-right:hover { background: var(--up); border-color: var(--up); color: var(--ink); }
.quiz-choice.is-wrong, .quiz-choice.is-wrong:hover { background: var(--down); border-color: var(--down); color: var(--ink); }
.lesson-candle {
    --up: #089981;
    --down: #f23645;
    width: 100%;
    height: auto;
    background: #0b1220;
    border: 1px solid #243044;
    border-radius: 4px;
}
.learn-achieve.is-done { border-color: var(--up); }
.learn-achieve.is-done .learn-achieve-kicker, .learn-card.is-done .learn-done-mark { color: var(--up-ink); }
.learn-achieve.is-done .learn-achieve-track span { background: var(--up); }
.learn-chart { background: #0b1220; border: 1px solid #243044; border-radius: 4px; overflow: hidden; }
.learn-chart svg { display: block; width: 100%; height: auto; touch-action: none; background: #0b1220; }
.learn-grid { stroke: #243044; stroke-width: 1; }
.learn-axis { fill: #94a3b8; font-size: 12px; font-family: Manrope, Helvetica, Arial, sans-serif; }
#now-line { stroke: #c5cdd6; stroke-dasharray: 3 4; }
#entry-line { stroke: #2563eb; stroke-dasharray: 5 4; }
#risk-band { fill: #f23645; opacity: 0.12; }
#price { fill: none; stroke: #2962ff; stroke-width: 2; stroke-linejoin: miter; stroke-linecap: butt; }
#ghost { fill: none; stroke: #9ca3af; stroke-width: 2; stroke-dasharray: 4 3; stroke-linejoin: miter; stroke-linecap: butt; }
#stop-line { stroke: #f23645; stroke-width: 2; }
#stop-hit { stroke: transparent; stroke-width: 18; cursor: ns-resize; }
#buy-dot { fill: #2962ff; }
#market-dot { fill: none; stroke: #94a3b8; stroke-width: 2; }
#sell-dot { fill: #f23645; }
#sell-dot.is-gain { fill: #089981; }
#sold-label.is-gain { fill: #34d399; }
#stop-label-bg { fill: #0b1220; }
#stop-label, #sold-label, #buy-label { fill: #e11d48; font-size: 13px; font-weight: 700; font-family: Manrope, Helvetica, Arial, sans-serif; }
#buy-label { fill: #93c5fd; text-anchor: middle; }
.learn-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.learn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.learn-stat { background: #0b1220; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.learn-stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.learn-stat strong { font-size: 22px; letter-spacing: -0.03em; }
.learn-note p { margin: 0; color: var(--muted); }
button:disabled { opacity: 0.6; cursor: progress; }

body:has(.home-hero) { position: relative; overflow-x: hidden; }
body:has(.home-hero) header {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body:has(.home-hero) .wrap { position: relative; z-index: 1; }
.home-orb { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.home-orb-top {
    top: -120px;
    left: 50%;
    width: 640px;
    height: 640px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(15, 23, 42, 0) 70%);
}
.home-orb-mid {
    top: 42%;
    left: -180px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0) 70%);
}
.home-hero {
    margin: 88px auto 0;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: home-fade 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.home-hero h1 {
    margin: 0 0 24px;
    max-width: 900px;
    font-size: clamp(48px, 8vw, 84px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.home-hero p {
    margin: 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.6;
}
.home-cta { display: flex; gap: 16px; margin-top: 40px; }
.home-quiet, .home-quiet:hover {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 22px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}
.home-quiet:hover { background: rgba(255, 255, 255, 0.06); }
.home-functions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 96px 0 72px;
}
.home-glass {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 220px;
    padding: 40px 28px;
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: inherit;
    text-decoration: none;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    animation: home-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.home-glass:nth-child(2) { animation-delay: 0.08s; }
.home-glass:nth-child(3) { animation-delay: 0.16s; }
.home-glass::before {
    content: attr(data-step);
    position: absolute;
    top: -18px;
    right: 12px;
    font-size: 120px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.045);
    pointer-events: none;
}
.home-glass:hover {
    transform: translateY(-6px);
    border-color: rgba(91, 155, 255, 0.45);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.12);
}
.home-glass h2 { position: relative; margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.home-glass p { position: relative; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
@keyframes home-fade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes home-rise {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .home-hero, .home-glass { animation: none; }
}

@media (max-width: 800px) {
    .home-hero { margin-top: 48px; }
    .home-hero p { font-size: 18px; }
    .home-cta { flex-direction: column; width: min(100%, 320px); }
    .home-quiet, .home-quiet:hover { justify-content: center; }
    .home-functions { grid-template-columns: 1fr; margin-top: 64px; }
    .learn-stats { grid-template-columns: 1fr; }
    .learn-panel { grid-template-columns: 1fr; }
    .learn-index { grid-template-columns: 1fr; }
    .learn-node { width: 132px; }
    .learn-node-title { font-size: 13px; }
    .lesson-sliders { grid-template-columns: 1fr; }
    #run-drop { width: 100%; }
    .learn-head { flex-wrap: wrap; }
    .learn-achieve { flex-basis: 100%; margin-top: 0; }
    .email-layout { grid-template-columns: 1fr; }
    .email-frame { height: 560px; }
}
