/* Averholt Atelier — an editorial product experience, built without media dependencies. */
:root {
    --bg: #080c0d;
    --surface: #101617;
    --surface-raised: #172020;
    --card: #121a1a;
    --text: #f2f3ec;
    --muted: #aab9b4;
    --line: rgba(205, 225, 216, .15);
    --line-strong: rgba(205, 225, 216, .3);
    --aqua: #bcebd9;
    --atelier-panel: #111919;
    --atelier-panel-raised: #172120;
    --atelier-input: #0b1212;
    --atelier-display: Georgia, "Times New Roman", serif;
}
body { background: var(--bg); }

/* Public introduction: typography, a sculptural product mark, and a clear first action. */
.auth-shell {
    background: radial-gradient(ellipse at 18% 34%, rgba(110, 163, 143, .065), transparent 40%), var(--bg);
    padding-top: calc(26px + var(--safe-top));
    padding-bottom: var(--safe-bottom);
}
.auth-atmosphere { display: none; }
.experience-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(100%, 1280px); margin: 0 auto; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.experience-header .auth-brand { flex-shrink: 0; gap: 12px; font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
.experience-header .auth-brand img { width: 38px; height: 38px; border: 0; border-radius: 10px; box-shadow: none; }
.experience-header .auth-brand > span { display: grid; gap: 2px; line-height: 1.12; }
.experience-header .auth-brand small { color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .23em; }
.experience-nav { display: flex; align-items: center; gap: 36px; }
.experience-nav a { display: inline-flex; align-items: center; gap: 22px; min-height: 44px; color: var(--text); font-size: 12px; text-decoration: none; }
.experience-nav a > span { color: var(--aqua); font-size: 18px; }
.experience-nav > span { color: var(--muted); font-size: 9px; letter-spacing: .13em; }
.auth-layout { grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); align-items: center; gap: clamp(44px, 7vw, 106px); min-height: 0; padding: clamp(58px, 6vw, 90px) 0 76px; }
.auth-shell .auth-intro { max-width: none; padding: 0; text-align: left; }
.auth-intro::before, .auth-intro::after { content: none; }
.auth-shell .auth-intro > .eyebrow { max-width: 45ch; margin: 0 0 28px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .15em; }
.auth-shell .auth-intro h1 { max-width: none; margin: 0 0 28px; background: none; color: var(--text); font-family: var(--atelier-display); font-size: clamp(64px, 6.8vw, 104px); font-weight: 400; letter-spacing: -.065em; line-height: .98; text-wrap: initial; }
.auth-shell .auth-intro h1 em { color: var(--aqua); font-weight: 400; }
.auth-shell .auth-intro > p:not(.eyebrow) { display: block; max-width: 36ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.experience-art { margin: 24px 0 0; color: #b8d2c8; }
.experience-orbit { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.experience-art figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; letter-spacing: .04em; }
.experience-art figcaption > span:last-child { color: var(--aqua); white-space: nowrap; }
.auth-shell .auth-card { padding: clamp(26px, 3vw, 40px); border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(150deg, #192321, #0f1717 74%); box-shadow: 0 24px 66px rgba(0, 0, 0, .15), inset 0 1px rgba(245, 255, 249, .035); }
.auth-shell .auth-card::before { width: 38%; left: 31%; background: linear-gradient(90deg, transparent, #b8d1c6, transparent); }
.auth-shell .auth-card .eyebrow { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .17em; }
.auth-shell .auth-card h2 { margin: 12px 0 17px; font-family: var(--atelier-display); font-size: clamp(34px, 3.4vw, 46px); font-weight: 400; letter-spacing: -.045em; line-height: 1.08; }
.auth-shell .auth-overview > p:not(.eyebrow):not(.experience-account-note),
.auth-shell .auth-card-copy > p:last-child { margin-bottom: 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.primary-action { border-color: #d5eee3; background: linear-gradient(105deg, #e5f3e9, #b9e6d5); color: #12231d; box-shadow: none; border-radius: 10px; }
.primary-action:hover { box-shadow: none; }
.auth-shell .primary-action { min-height: 54px; font-size: 13px; letter-spacing: -.01em; }
.auth-shell .auth-secondary-action { margin-top: 8px; color: var(--muted); font-size: 12px; }
.auth-shell .auth-card input { border-radius: 10px; border-color: var(--line-strong); background: var(--atelier-input); color: var(--text); }
.auth-shell .auth-card input:focus { border-color: var(--aqua); background: var(--atelier-panel); }
.auth-shell .auth-card label { color: var(--text); }
.auth-shell .auth-more { border-color: var(--line); }
.auth-shell .auth-session-note, .auth-shell .security-note { color: var(--muted); }

/* These are explanatory previews, with no simulated prices or performance claims. */
.experience-preview { margin-top: 25px; }
.experience-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.experience-tabs button { position: relative; min-width: 0; min-height: 44px; padding: 10px 5px; border: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.experience-tabs button::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -8px; height: 2px; background: transparent; }
.experience-tabs button[aria-selected="true"] { color: var(--aqua); background: rgba(195, 236, 218, .035); }
.experience-tabs button[aria-selected="true"]::after { background: var(--aqua); }
.experience-panel { min-width: 0; min-height: 276px; padding: 22px 0 2px; }
.experience-panel[hidden] { display: none; }
.experience-panel:focus-visible { outline: 3px solid var(--aqua); outline-offset: 6px; border-radius: 3px; }
.experience-panel-label { margin: 0 0 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; letter-spacing: .11em; }
.experience-panel h3 { margin: 0 0 10px; color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.025em; line-height: 1.35; }
.experience-panel > p:not(.experience-panel-label):not(.experience-panel-note) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.experience-question-list { display: grid; margin-top: 20px; }
.experience-question-list > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.experience-question-list b { color: var(--text); font-size: 11px; font-weight: 600; }
.experience-question-list small { color: var(--muted); font-size: 11px; }
.experience-workflow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.experience-workflow span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); font-size: 11px; }
.experience-workflow i { color: var(--aqua); font-size: 12px; font-style: normal; }
.experience-panel .experience-panel-note { margin: 18px 0 0; color: var(--aqua); font-size: 11px; }
.experience-lesson-list { display: grid; gap: 11px; margin-top: 20px; }
.experience-lesson-list > span { display: flex; align-items: center; gap: 14px; color: var(--text); font-size: 12px; }
.experience-lesson-list b { color: var(--aqua); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 400; }
.experience-account-note { margin: 20px 0 0; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.65; }

/* A short product story gives the visual design substance. */
.experience-story { width: min(100%, 1280px); margin: 0 auto; padding: 74px 0 80px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.experience-story-heading { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); column-gap: 80px; align-items: end; }
.experience-story-heading > .eyebrow { grid-column: 1 / -1; margin-bottom: 28px; color: var(--muted); font-size: 9px; }
.experience-story h2 { margin: 0; font-family: var(--atelier-display); font-size: clamp(40px, 4.2vw, 62px); font-weight: 400; line-height: 1.12; letter-spacing: -.05em; }
.experience-story h2 em { color: var(--aqua); font-weight: 400; }
.experience-story-heading > p:last-child { max-width: 34ch; margin: 0 0 5px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.experience-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin-top: 48px; }
.experience-principles article { min-width: 0; padding: 28px 0 0; border-top: 1px solid var(--line-strong); }
.experience-principle-number { display: inline-block; margin-bottom: 34px; color: var(--aqua); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.experience-principles h3 { margin: 0 0 14px; font-size: 19px; font-weight: 550; line-height: 1.3; letter-spacing: -.03em; }
.experience-principles p { max-width: 37ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.experience-principle-detail { display: block; margin-top: 26px; color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.experience-footer { display: grid; grid-template-columns: 1fr minmax(0, 2fr) auto; align-items: center; gap: 30px; width: min(100%, 1280px); margin: 0 auto; padding: 30px 0; border-top: 1px solid var(--line); }
.experience-footer > span { color: var(--text); font-size: 14px; letter-spacing: -.02em; }
.experience-footer p { max-width: 70ch; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.experience-footer nav { display: flex; align-items: center; gap: 22px; }
.experience-footer a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; color: var(--muted); font-size: 11px; text-decoration: none; }

/* The signed-in workspace shares the material and typography without changing its data layout. */
.app-shell { background: var(--bg); }
html .app-shell .sidebar, html .app-shell .app-header { background: var(--atelier-panel); border-color: var(--line); box-shadow: none; }
html .app-shell .sidebar nav button.active { color: var(--text); border-color: var(--line-strong); background: rgba(195, 236, 218, .065); }
.app-shell .sidebar .app-brand { font-weight: 650; }
.app-shell .app-brand img { box-shadow: none; }
.app-shell .welcome-row h1, .app-shell .page-heading h1 { font-family: var(--atelier-display); font-weight: 400; font-size: clamp(40px, 4.1vw, 62px); letter-spacing: -.055em; line-height: 1.1; }
.app-shell .eyebrow { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .16em; }
html .app-shell :is(.home-actions button, .home-kpis article, .balance-card, .insight-card, .table-card, .allocation-card, .portfolio-stats article, .market-card, .search-card, .feature-card, .analytics-card, .daily-challenge, .money-vault, .plan-card, .copilot-shell, .home-feed, .home-learn-card, .learning-progress, .lesson-card, .activity-timeline) { background: var(--atelier-panel); border-color: var(--line); box-shadow: none; }
.app-shell .balance-card { border-radius: 18px; }
.app-shell .balance-card > strong { font-weight: 550; letter-spacing: -.055em; }
.app-shell .insight-card { border-radius: 18px; }
.app-shell .insight-card h2 { font-family: var(--atelier-display); font-size: 29px; font-weight: 400; letter-spacing: -.04em; }
.app-shell .market-card, .app-shell .search-card, .app-shell .home-actions button, .app-shell .home-kpis article { border-radius: 13px; }
.app-shell .home-kpis strong, .app-shell .portfolio-stats strong { font-weight: 600; }
.app-shell .home-actions button > span, .app-shell .insight-icon, .app-shell .notable-home-icon { color: var(--aqua); border-color: var(--line); background: rgba(195, 236, 218, .055); }
html .app-shell .notable-home-card { background: linear-gradient(105deg, #1c2b25, #111b18); border-color: rgba(188, 235, 217, .24); border-radius: 14px; }
.app-shell .notable-home-card > strong { color: var(--aqua); }
.app-shell .section-row h2 { font-family: var(--atelier-display); font-size: 30px; font-weight: 400; letter-spacing: -.04em; }
.app-shell .outline-action { border-radius: 9px; }
.app-shell .global-search { border-radius: 9px; background: var(--atelier-input); }
.app-shell .account-chip, .app-shell .header-alerts { box-shadow: none; }
html .app-shell :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { color: var(--text); background-color: var(--atelier-input); }
html .app-shell .settings-panel, html .app-shell .settings-handle { background: var(--atelier-panel); border-color: var(--line); }
html .app-shell .settings-panel { box-shadow: -14px 16px 38px rgba(0, 0, 0, .2); }
.app-shell .chart-ranges { background: var(--atelier-input); }
.app-shell .chart-tooltip { background: var(--atelier-panel-raised); }

/* Reveal is progressive: no class is required for content to be visible. */
[data-reveal] { opacity: 1; }
.experience-revealed { animation: experienceArrive 480ms cubic-bezier(.2, .8, .2, 1) both; }
.experience-revealed .experience-orbit-frame { transform-origin: 280px 152px; animation: experienceOrbitArrive 800ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes experienceArrive { from { opacity: .82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes experienceOrbitArrive { from { opacity: .5; transform: rotate(-4deg) scale(.97); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (pointer: fine) {
    .experience-nav a:hover, .experience-footer a:hover { color: var(--aqua); }
    .experience-tabs button:hover { color: var(--text); }
    html .app-shell .home-actions button:hover, html .app-shell .market-card:hover, html .app-shell .search-card:hover { border-color: var(--line-strong); background: var(--atelier-panel-raised); }
}

html[data-theme="light"] {
    --bg: #f4f3ec;
    --surface: #fcfcf7;
    --surface-raised: #fffef9;
    --card: #fffef9;
    --text: #182720;
    --muted: #56685e;
    --line: rgba(31, 64, 46, .16);
    --line-strong: rgba(31, 64, 46, .3);
    --aqua: #246852;
    --atelier-panel: #fdfdf8;
    --atelier-panel-raised: #eaf0e7;
    --atelier-input: #f1f4ec;
}
html[data-theme="light"] body, html[data-theme="light"] .auth-shell { background: var(--bg); }
html[data-theme="light"] .auth-shell .auth-intro h1 { color: var(--text); background: none; }
html[data-theme="light"] .auth-shell .auth-card { background: linear-gradient(145deg, #fffef9, #f0f4ec); border-color: var(--line-strong); box-shadow: 0 24px 60px rgba(42, 68, 48, .055); }
html[data-theme="light"] .auth-shell .auth-card input { color: var(--text); background: var(--atelier-input); }
html[data-theme="light"] .experience-art { color: #436c5b; }
html[data-theme="light"] .experience-orbit-guides { opacity: .3; }
html[data-theme="light"] .experience-tabs button[aria-selected="true"] { background: rgba(31, 64, 46, .035); }
html[data-theme="light"] .app-shell .sidebar, html[data-theme="light"] .app-shell .app-header,
html[data-theme="light"] .app-shell .settings-panel, html[data-theme="light"] .app-shell .settings-handle { background: var(--atelier-panel); border-color: var(--line); }
html[data-theme="light"] .app-shell .sidebar nav button.active { background: #e8f0e7; border-color: var(--line-strong); color: var(--text); }
html[data-theme="light"] .app-shell .notable-home-card { background: linear-gradient(105deg, #e4eee1, #f3f6ef); border-color: var(--line-strong); }

@media (max-width: 1080px) {
    .experience-nav { gap: 22px; }
    .experience-nav > span { display: none; }
    .auth-layout { gap: 38px; grid-template-columns: minmax(0, 1fr) minmax(320px, .96fr); padding-top: 58px; }
    .auth-shell .auth-intro h1 { font-size: clamp(56px, 6.4vw, 72px); }
    .auth-shell .auth-card { padding: 28px; }
    .auth-shell .auth-card h2 { font-size: 36px; }
    .experience-story-heading { column-gap: 40px; }
    .experience-principles { gap: 26px; }
    .experience-footer { grid-template-columns: 1fr auto; }
    .experience-footer p { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
    .auth-shell { padding-top: calc(18px + var(--safe-top)); padding-bottom: var(--safe-bottom); }
    .experience-header { gap: 16px; padding-bottom: 18px; }
    .experience-header .auth-brand { gap: 10px; font-size: 18px; }
    .experience-header .auth-brand img { width: 34px; height: 34px; }
    .experience-nav a { gap: 10px; font-size: 11px; }
    .auth-layout { width: min(100%, 560px); grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 42px 0 54px; }
    .auth-shell .auth-intro > .eyebrow { max-width: 44ch; margin-bottom: 20px; font-size: 8px; }
    .auth-shell .auth-intro h1 { margin-bottom: 22px; font-size: clamp(56px, 11.5vw, 76px); }
    .auth-shell .auth-intro > p:not(.eyebrow) { max-width: 39ch; font-size: 14px; line-height: 1.75; }
    .experience-art { width: min(100%, 460px); margin: 14px auto 0; }
    .experience-orbit { max-height: 215px; }
    .experience-art figcaption { font-size: 8px; }
    .auth-shell .auth-card { padding: 28px; border-radius: 17px; }
    .auth-shell .auth-card h2 { font-size: 37px; }
    .experience-preview { margin-top: 20px; }
    .experience-panel { min-height: 260px; }
    .experience-story { padding: 50px 0 56px; }
    .experience-story-heading { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .experience-story-heading > .eyebrow { margin-bottom: 0; }
    .experience-story h2 { font-size: clamp(38px, 8vw, 48px); }
    .experience-story-heading > p:last-child { max-width: 40ch; font-size: 14px; }
    .experience-principles { grid-template-columns: minmax(0, 1fr); gap: 30px; margin-top: 34px; }
    .experience-principles article { padding-top: 20px; }
    .experience-principle-number { margin-bottom: 18px; }
    .experience-principles p { max-width: 56ch; }
    .experience-principle-detail { margin-top: 20px; }
    .experience-footer { gap: 18px; padding: 24px 0; }
    .experience-footer > span { font-size: 13px; }
    .experience-footer nav { gap: 18px; }
    .app-shell .welcome-row h1, .app-shell .page-heading h1 { font-size: clamp(36px, 8.5vw, 46px); }
    .app-shell .section-row h2 { font-size: 28px; }
}
@media (max-width: 360px) {
    .experience-header .auth-brand { font-size: 16px; }
    .experience-header .auth-brand img { width: 30px; height: 30px; }
    .experience-nav a { gap: 6px; font-size: 10px; }
    .auth-shell .auth-intro h1 { font-size: 53px; }
    .auth-shell .auth-card { padding: 24px 20px; }
    .auth-shell .auth-card h2 { font-size: 33px; }
    .experience-orbit { max-height: 175px; }
    .experience-tabs button { font-size: 11px; }
    .experience-panel h3 { font-size: 17px; }
    .experience-question-list > span { gap: 10px; }
    .experience-question-list small { font-size: 10px; }
    .experience-story h2 { font-size: 35px; }
}
@media (max-height: 540px) and (orientation: landscape) {
    .auth-layout { align-items: start; padding-top: 32px; }
    .auth-shell .auth-intro h1 { font-size: 54px; }
    .experience-art { margin-top: 10px; }
}
html.no-motion .experience-revealed, html.data-saver .experience-revealed,
html.no-motion .experience-orbit-frame, html.data-saver .experience-orbit-frame { opacity: 1; transform: none; animation: none; }
@media (prefers-reduced-motion: reduce) {
    .experience-revealed, .experience-orbit-frame { opacity: 1; transform: none; animation: none; }
}
