@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap");

:root {
    --navy: #0d2137;
    --navy-80: #1a3a57;
    --teal: #1a9e8a;
    --teal-dark: #16897a;
    --teal-soft: #e7f4f1;
    --teal-pale: #f3faf8;
    --gold: #c8973a;
    --gold-soft: #fbf0de;
    --red: #d8453c;
    --red-soft: #fcebea;
    --ink: #1a1f26;
    --ink-soft: #5a6470;
    --ink-faint: #8b95a1;
    --canvas: #f6f7f9;
    --cream: #fbf8f1;
    --white: #fff;
    --line: #e7e9ed;
    --line-strong: #d7dbe1;
    --shadow: 0 1px 2px rgba(13, 33, 55, .04), 0 8px 24px rgba(13, 33, 55, .05);
    --shadow-hover: 0 2px 4px rgba(13, 33, 55, .06), 0 14px 32px rgba(13, 33, 55, .08);
    --radius: 16px;
    --radius-small: 10px;
    --max-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "DM Sans", system-ui, sans-serif;
    text-rendering: optimizeLegibility;
}

body.modal-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}

svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.container {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
}

.mono {
    font-family: "JetBrains Mono", monospace;
}

.eyebrow {
    margin: 0;
    color: var(--teal-dark);
    font-family: "JetBrains Mono", monospace;
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: .86rem;
    font-weight: 600;
    transition: 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: scale(.98);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}

.button-primary {
    border-color: var(--teal);
    color: white;
    background: var(--teal);
}

.button-primary:hover {
    border-color: var(--teal-dark);
    background: var(--teal-dark);
}

.button-secondary {
    border-color: var(--line-strong);
    background: white;
}

.button-secondary:hover {
    border-color: #bbc3cb;
    background: #fbfcfd;
}

.button-block {
    width: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(26, 158, 138, .45);
    border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
    position: absolute;
    width: 1px;
    height: 17px;
    background: var(--teal);
    content: "";
    transform: rotate(45deg);
}

.brand-mark::after {
    opacity: .55;
    transform: rotate(-45deg);
}

.brand-mark > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 5px rgba(26, 158, 138, .12);
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-name {
    color: var(--navy);
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .2em;
}

.brand-product {
    color: var(--ink-faint);
    font-size: .65rem;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.landing-shell {
    overflow: hidden;
    background: white;
}

.public-nav {
    position: absolute;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    border-bottom: 1px solid rgba(13, 33, 55, .08);
}

.nav-inner,
.topbar-inner {
    display: flex;
    height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.public-links {
    display: flex;
    align-items: center;
    gap: 7px;
}

.public-links > a:not(.button) {
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--ink-soft);
    font-size: .86rem;
    font-weight: 500;
}

.public-links > a:not(.button):hover {
    color: var(--navy);
    background: rgba(255, 255, 255, .6);
}

.public-mobile-cta {
    display: none;
}

.hero {
    position: relative;
    display: grid;
    min-height: 720px;
    align-items: center;
    padding: 120px 0 72px;
    background:
        radial-gradient(circle at 83% 17%, rgba(26, 158, 138, .11), transparent 25%),
        radial-gradient(circle at 12% 82%, rgba(200, 151, 58, .08), transparent 24%),
        linear-gradient(135deg, #fff 0%, #fcfbf7 48%, #f3faf8 100%);
}

.hero::after {
    position: absolute;
    right: -5%;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(26, 158, 138, .12);
    border-radius: 50%;
    content: "";
}

.hero-grid {
    display: grid;
    align-items: center;
    gap: 72px;
    grid-template-columns: minmax(0, .92fr) minmax(450px, .85fr);
}

.hero h1 {
    max-width: 680px;
    margin: 18px 0 20px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(3.25rem, 6vw, 5.25rem);
    font-weight: 600;
    letter-spacing: -.045em;
    line-height: .99;
}

.hero-lede {
    max-width: 590px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 1.12rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-note {
    margin: 27px 0 0;
    color: var(--ink-faint);
    font-size: .78rem;
}

.hero-preview {
    position: relative;
}

.preview-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(13, 33, 55, .11);
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 22px 60px rgba(13, 33, 55, .11);
    backdrop-filter: blur(12px);
}

.preview-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), #63c9ba, var(--gold));
    content: "";
}

.preview-head,
.preview-company {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.preview-head {
    align-items: center;
}

.mono-label {
    color: var(--ink-faint);
    font-family: "JetBrains Mono", monospace;
    font-size: .66rem;
    text-transform: uppercase;
}

.live-pill,
.status-pill,
.count-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-size: .68rem;
    font-weight: 600;
}

.live-pill::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 3px rgba(26, 158, 138, .13);
    content: "";
}

.preview-company {
    align-items: end;
    margin-top: 26px;
}

.preview-company h2 {
    margin: 0;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2rem;
}

.preview-company p {
    margin: 4px 0 0;
    color: var(--ink-faint);
    font-family: "JetBrains Mono", monospace;
    font-size: .72rem;
}

.preview-price {
    text-align: right;
}

.preview-price strong,
.preview-price span {
    display: block;
}

.preview-price strong {
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: 1.05rem;
}

.preview-price span {
    margin-top: 3px;
    color: var(--red);
    font-size: .68rem;
}

.insight-card {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid #e4f0ed;
    border-radius: 13px;
    background: var(--teal-pale);
}

.insight-card span {
    color: var(--teal-dark);
    font-family: "JetBrains Mono", monospace;
    font-size: .64rem;
    font-weight: 600;
    text-transform: uppercase;
}

.insight-card p {
    margin: 8px 0 0;
    color: var(--navy);
    font-size: .88rem;
    line-height: 1.55;
}

.preview-metrics {
    display: grid;
    gap: 12px;
    margin-top: 21px;
    grid-template-columns: repeat(3, 1fr);
}

.preview-metrics > div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.preview-metrics span,
.preview-metrics strong {
    display: block;
}

.preview-metrics span {
    color: var(--ink-faint);
    font-size: .65rem;
}

.preview-metrics strong {
    margin-top: 5px;
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .88rem;
}

.preview-chart {
    height: 128px;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.preview-chart svg {
    width: 100%;
    height: 100%;
}

.floating-event {
    position: absolute;
    right: -24px;
    bottom: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow-hover);
}

.floating-event > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 4px var(--red-soft);
}

.floating-event strong,
.floating-event small {
    display: block;
}

.floating-event strong {
    color: var(--navy);
    font-size: .72rem;
}

.floating-event small {
    margin-top: 2px;
    color: var(--ink-faint);
    font-size: .65rem;
}

.proof-strip {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--cream);
}

.proof-grid {
    display: grid;
    min-height: 96px;
    align-items: center;
    grid-template-columns: 1.2fr repeat(3, 1fr);
}

.proof-grid > div {
    min-height: 45px;
    padding-left: 22px;
    border-left: 1px solid #e4dfd4;
}

.proof-grid > div:first-child {
    padding-left: 0;
    border: 0;
}

.proof-grid strong,
.proof-grid span {
    display: block;
}

.proof-grid strong {
    color: var(--navy);
    font-size: .84rem;
}

.proof-grid span {
    margin-top: 4px;
    color: var(--ink-faint);
    font-size: .72rem;
}

.landing-section {
    padding: 88px 0;
}

.landing-section-tinted {
    border-top: 1px solid var(--line);
    background: var(--canvas);
}

.section-intro {
    max-width: 650px;
}

.section-intro h2,
.landing-cta h2 {
    margin: 12px 0 14px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -.025em;
}

.section-intro > p:last-child,
.landing-cta p:last-child {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    gap: 20px;
    margin-top: 40px;
    grid-template-columns: repeat(3, 1fr);
}

.feature-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.feature-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: .68rem;
    font-weight: 600;
}

.feature-card h3 {
    margin: 20px 0 9px;
    color: var(--navy);
    font-size: 1rem;
}

.feature-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .84rem;
    line-height: 1.65;
}

.landing-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 44px;
    border: 1px solid #dceae7;
    border-radius: 22px;
    background: linear-gradient(115deg, #f1faf7, #fff 70%);
}

.landing-cta h2 {
    margin-bottom: 8px;
    font-size: 2.2rem;
}

.public-footer {
    padding: 30px 0;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    background: white;
    font-size: .74rem;
}

.public-footer > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.app-topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 5px rgba(13, 33, 55, .03);
    backdrop-filter: blur(14px);
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.app-nav a {
    padding: 9px 13px;
    border-radius: 9px;
    color: var(--ink-soft);
    font-size: .83rem;
    font-weight: 500;
}

.app-nav a.active,
.app-nav a:hover {
    color: var(--navy);
    background: #f0f3f5;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.quota {
    display: flex;
    min-width: 168px;
    align-items: center;
    gap: 10px;
    padding: 7px 11px;
    border: 1px solid #d9ebe7;
    border-radius: 12px;
    background: var(--teal-pale);
}

.quota-ring {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--teal) 0 var(--quota), #d9ebe7 var(--quota) 100%);
}

.quota-ring > span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    color: var(--navy);
    background: white;
    font-family: "JetBrains Mono", monospace;
    font-size: .61rem;
    font-weight: 600;
}

.quota-copy strong,
.quota-copy span {
    display: block;
}

.quota-copy strong {
    color: var(--navy);
    font-size: .73rem;
}

.quota-copy span {
    margin-top: 1px;
    color: var(--ink-faint);
    font-size: .62rem;
}

.icon-button,
.user-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
}

.icon-button {
    cursor: pointer;
}

.icon-button:hover {
    color: var(--teal-dark);
    background: var(--teal-pale);
}

.user-avatar {
    color: var(--navy);
    background: var(--cream);
    font-size: .67rem;
    font-weight: 600;
}

.dashboard {
    min-height: calc(100vh - 72px);
    padding: 46px 0 80px;
}

.dashboard-heading h1 {
    margin: 8px 0 7px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -.03em;
}

.dashboard-heading > p:last-child {
    margin: 0;
    color: var(--ink-soft);
}

.search-area {
    position: relative;
    width: min(100%, 700px);
    margin-top: 34px;
}

.search-box {
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 13px;
    padding: 0 12px 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow);
    transition: 150ms ease;
}

.search-box:focus-within {
    border-color: rgba(26, 158, 138, .65);
    box-shadow: 0 0 0 4px rgba(26, 158, 138, .08), var(--shadow);
}

.search-box > svg {
    color: var(--ink-faint);
}

.search-box input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--navy);
    background: transparent;
    font-size: .94rem;
}

.search-box input::placeholder {
    color: #a1a9b2;
}

.search-box kbd {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 6px;
    color: var(--ink-faint);
    background: #f9fafb;
    font-family: "JetBrains Mono", monospace;
    font-size: .6rem;
}

.search-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: 0 18px 42px rgba(13, 33, 55, .12);
}

.search-results.open {
    display: block;
}

.search-result {
    display: grid;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    text-align: left;
    background: white;
    grid-template-columns: 40px 1fr auto;
}

.search-result:last-child {
    border: 0;
}

.search-result:hover {
    background: var(--teal-pale);
}

.search-result strong,
.search-result small {
    display: block;
}

.search-result strong {
    color: var(--navy);
    font-size: .81rem;
}

.search-result small {
    margin-top: 2px;
    color: var(--ink-faint);
    font-family: "JetBrains Mono", monospace;
    font-size: .65rem;
}

.result-action {
    color: var(--teal-dark);
    font-size: .68rem;
    font-weight: 600;
}

.search-empty {
    padding: 16px;
    color: var(--ink-faint);
    font-size: .78rem;
}

.dashboard-grid {
    display: grid;
    align-items: start;
    gap: 22px;
    margin-top: 38px;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
}

.panel,
.report-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: .98rem;
}

.panel-heading p {
    margin: 4px 0 0;
    color: var(--ink-faint);
    font-size: .72rem;
}

.watchlist-panel,
.history-panel {
    overflow: hidden;
}

.watch-row {
    display: grid;
    min-height: 87px;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
    transition: 140ms ease;
    grid-template-columns: minmax(190px, 1fr) 112px minmax(180px, 1.3fr) 25px;
}

.watch-row:last-child {
    border-bottom: 0;
}

.watch-row:hover {
    background: #fbfcfc;
}

.company-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.ticker-tile {
    position: relative;
    display: grid;
    width: 39px;
    height: 39px;
    flex: none;
    place-items: center;
    border-radius: 10px;
    color: var(--navy);
    background: var(--cream);
    font-family: "JetBrains Mono", monospace;
    font-size: .65rem;
    font-weight: 600;
}

.ticker-tile.has-logo {
    overflow: hidden;
    border: 1px solid var(--line);
    background: white;
}

.ticker-tile .logo-fallback,
.company-logo .logo-fallback {
    grid-area: 1 / 1;
}

.ticker-tile img {
    z-index: 1;
    grid-area: 1 / 1;
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.company-cell strong,
.company-cell small {
    display: block;
}

.company-cell strong {
    overflow: hidden;
    color: var(--navy);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-cell small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-family: "JetBrains Mono", monospace;
    font-size: .64rem;
}

.price-cell {
    font-family: "JetBrains Mono", monospace;
    text-align: right;
}

.price-cell strong,
.price-cell small {
    display: block;
}

.price-cell strong {
    color: var(--navy);
    font-size: .72rem;
}

.price-cell small {
    margin-top: 3px;
    font-size: .63rem;
}

.positive {
    color: var(--teal-dark) !important;
}

.negative {
    color: var(--red) !important;
}

.event-cell {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 9px;
    color: var(--ink-soft);
    font-size: .7rem;
    line-height: 1.45;
}

.event-dot {
    width: 7px;
    height: 7px;
    margin-top: 5px;
    flex: none;
    border-radius: 50%;
    background: var(--ink-faint);
    box-shadow: 0 0 0 3px #eef0f2;
}

.event-dot.urgent {
    background: var(--red);
    box-shadow: 0 0 0 3px var(--red-soft);
}

.event-dot.positive {
    background: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-soft);
}

.event-dot.caution {
    background: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.row-arrow {
    color: var(--ink-faint);
}

.dashboard-sidebar {
    display: grid;
    gap: 22px;
}

.usage-panel {
    padding: 22px;
    background: linear-gradient(145deg, #fff, #f4faf8);
}

.usage-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.usage-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: .9rem;
}

.usage-heading p {
    margin: 5px 0 0;
    color: var(--ink-faint);
    font-size: .7rem;
}

.usage-heading > strong {
    color: var(--teal-dark);
    font-family: "JetBrains Mono", monospace;
    font-size: 1.35rem;
}

.progress {
    height: 7px;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfece9;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--teal);
    transition: width 300ms ease;
}

.progress span.error {
    background: var(--red);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: var(--ink-faint);
    font-size: .63rem;
}

.signals-panel {
    overflow: hidden;
}

.signal {
    display: flex;
    gap: 12px;
    padding: 13px 19px;
}

.signal + .signal {
    border-top: 1px solid var(--line);
}

.signal > span {
    display: grid;
    width: 30px;
    height: 30px;
    flex: none;
    place-items: center;
    border-radius: 9px;
    color: var(--gold);
    background: var(--gold-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: .7rem;
}

.signal strong {
    display: block;
    color: var(--navy);
    font-size: .73rem;
}

.signal p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: .67rem;
    line-height: 1.45;
}

.history-panel {
    margin-top: 22px;
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.history-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.history-table th,
.history-table td,
.data-table th,
.data-table td {
    padding: 13px 19px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.history-table th,
.data-table th {
    color: var(--ink-faint);
    background: #fbfcfd;
    font-size: .64rem;
    font-weight: 500;
}

.history-table td {
    color: var(--ink-soft);
    font-size: .74rem;
}

.history-table tbody tr {
    cursor: pointer;
}

.history-table tbody tr:hover {
    background: #fbfcfc;
}

.history-table tr:last-child td,
.data-table tr:last-child td {
    border-bottom: 0;
}

.status-pill.generating {
    color: var(--gold);
    background: var(--gold-soft);
}

.empty-state {
    padding: 24px;
    color: var(--ink-faint);
    font-size: .76rem;
    text-align: center;
}

.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(13, 33, 55, .35);
    backdrop-filter: blur(5px);
}

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

.generation-modal {
    position: relative;
    width: min(100%, 560px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: 0 28px 80px rgba(13, 33, 55, .2);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    color: var(--ink-soft);
    background: white;
    font-size: 1.2rem;
}

.generation-modal h2 {
    margin: 10px 0 8px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.8rem;
}

.generation-modal > p:not(.eyebrow) {
    margin: 0;
    color: var(--ink-soft);
    font-size: .82rem;
}

.generation-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.generation-progress {
    margin-top: 24px;
}

.generation-progress > p {
    margin: 12px 0;
    color: var(--ink-soft);
    font-size: .76rem;
}

.job-log {
    min-height: 92px;
    max-height: 180px;
    overflow: auto;
    padding: 14px;
    border-radius: 10px;
    color: #bcd8d2;
    background: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .62rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.generation-complete {
    margin-top: 24px;
    text-align: center;
}

.generation-complete > span {
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0 auto;
    place-items: center;
    border-radius: 50%;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-size: 1.1rem;
}

.generation-complete h3 {
    margin: 12px 0 18px;
    color: var(--navy);
}

.generation-complete .button {
    margin: 4px;
}

.stock-page {
    background: var(--canvas);
}

.stock-header {
    padding: 34px 0 25px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 88% 18%, rgba(26, 158, 138, .09), transparent 26%),
        white;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--ink-faint);
    font-size: .7rem;
}

.breadcrumbs a {
    color: var(--ink-soft);
}

.breadcrumbs a:hover {
    color: var(--teal-dark);
}

.stock-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.stock-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.company-logo {
    position: relative;
    display: grid;
    width: 56px;
    height: 56px;
    flex: none;
    place-items: center;
    border: 1px solid #dce3e8;
    border-radius: 15px;
    color: var(--navy);
    background: white;
    box-shadow: var(--shadow);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.company-logo img {
    z-index: 1;
    grid-area: 1 / 1;
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.stock-identity h1 {
    margin: 0;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: -.035em;
}

.stock-identity p {
    margin: 7px 0 0;
    color: var(--ink-faint);
    font-size: .73rem;
}

.stock-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-actions .button svg {
    width: 16px;
    height: 16px;
}

.stock-actions .button.watching {
    border-color: #cce5df;
    color: var(--teal-dark);
    background: var(--teal-pale);
}

.stock-actions .button.watching svg {
    fill: currentColor;
}

.stock-price {
    margin-right: 10px;
    text-align: right;
}

.stock-price strong,
.stock-price span {
    display: block;
}

.stock-price strong {
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: 1.22rem;
}

.stock-price span {
    margin-top: 4px;
    color: var(--ink-faint);
    font-size: .63rem;
}

.report-updated {
    margin: 19px 0 0;
    color: var(--ink-faint);
    font-size: .63rem;
}

.report-layout {
    display: grid;
    min-width: 0;
    align-items: start;
    gap: 24px;
    padding: 28px 0 90px;
    grid-template-columns: 220px minmax(0, 1fr);
}

.report-toc {
    position: sticky;
    top: 96px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow);
}

.report-toc > span {
    display: block;
    padding: 3px 9px 10px;
    color: var(--ink-faint);
    font-family: "JetBrains Mono", monospace;
    font-size: .59rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.report-toc a {
    display: block;
    padding: 8px 9px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: .72rem;
}

.report-toc a:hover,
.report-toc a.active {
    color: var(--teal-dark);
    background: var(--teal-pale);
}

.report-content {
    display: grid;
    min-width: 0;
    gap: 20px;
}

.report-card {
    min-width: 0;
    padding: 25px;
    scroll-margin-top: 96px;
}

.report-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.report-heading h2 {
    display: flex;
    align-items: center;
    margin: 0;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.5rem;
    letter-spacing: -.02em;
}

.report-heading h2 > span {
    display: inline-grid;
    min-width: 29px;
    height: 29px;
    margin-right: 9px;
    place-items: center;
    border-radius: 9px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: .62rem;
}

.report-heading small,
.subsection-heading span {
    color: var(--ink-faint);
    font-family: "JetBrains Mono", monospace;
    font-size: .61rem;
}

.snapshot-grid {
    display: grid;
    gap: 18px;
    align-items: start;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.snapshot-main {
    display: grid;
    min-width: 0;
    gap: 14px;
}

.thesis {
    padding: 22px;
    border: 1px solid #dceae7;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--teal-pale), #fff);
}

.thesis > span,
.central-question > span {
    color: var(--teal-dark);
    font-family: "JetBrains Mono", monospace;
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
}

.thesis h3 {
    margin: 10px 0 13px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.24rem;
    line-height: 1.35;
}

.thesis p,
.report-prose p {
    color: var(--ink-soft);
    font-size: .81rem;
    line-height: 1.72;
}

.thesis p {
    margin: 11px 0 0;
}

.quick-stats {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    grid-template-columns: repeat(2, 1fr);
}

.quick-stats > div {
    padding: 14px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.quick-stats > div:nth-child(2n) {
    border-right: 0;
}

.quick-stats > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.quick-stats span,
.quick-stats strong {
    display: block;
}

.quick-stats span {
    color: var(--ink-faint);
    font-size: .62rem;
}

.quick-stats strong {
    margin-top: 5px;
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .73rem;
}

.snapshot-aside {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
}

.snapshot-aside .compact-block,
.snapshot-aside .compact-table-block {
    padding: 12px;
}

.aside-section {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.aside-section > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.aside-section h3 {
    margin: 0;
    color: var(--navy);
    font-size: .72rem;
}

.aside-section header span {
    color: var(--ink-faint);
    font-size: .58rem;
}

.snapshot-aside .factor-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dense-metrics {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fbfcfd;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dense-metrics > div {
    min-width: 0;
    padding: 11px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.dense-metrics > div:nth-child(2n) {
    border-right: 0;
}

.dense-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.dense-metrics span,
.dense-metrics strong {
    display: block;
}

.dense-metrics span {
    overflow: hidden;
    color: var(--ink-faint);
    font-size: .58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dense-metrics strong {
    overflow: hidden;
    margin-top: 4px;
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .69rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.next-event {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid #d6e9e4;
    border-radius: 11px;
    background: var(--teal-pale);
}

.next-event span {
    color: var(--teal-dark);
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
}

.next-event strong {
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .71rem;
}

.holder-list {
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.holder-list summary {
    padding: 10px 0;
    cursor: pointer;
    color: var(--ink-soft);
    font-size: .65rem;
}

.holder-list > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: .63rem;
}

.snapshot-signals {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-block,
.compact-table-block {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.compact-block > header,
.compact-table-block > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.compact-block h3,
.compact-table-block h3 {
    margin: 0;
    color: var(--navy);
    font-size: .72rem;
}

.compact-block header span,
.compact-table-block header span {
    color: var(--ink-faint);
    font-size: .58rem;
}

.revision-grid,
.technical-grid {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.technical-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.revision-grid > div,
.technical-grid > div {
    min-width: 0;
    padding: 9px 7px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.revision-grid > div:last-child,
.technical-grid > div:last-child {
    border-right: 0;
}

.revision-grid span,
.revision-grid strong,
.technical-grid span,
.technical-grid strong {
    display: block;
}

.revision-grid span,
.technical-grid span {
    color: var(--ink-faint);
    font-size: .55rem;
}

.revision-grid strong,
.technical-grid strong {
    margin-top: 4px;
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .64rem;
}

.factor-pills {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.factor-pill {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.factor-pill > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.factor-pill span {
    overflow: hidden;
    font-size: .59rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.factor-pill strong {
    font-family: "JetBrains Mono", monospace;
    font-size: .59rem;
}

.factor-pill > i {
    display: block;
    height: 4px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
}

.factor-pill > i > b {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.factor-low {
    border-color: #f2d2cf;
    color: #ae342d;
    background: var(--red-soft);
}

.factor-low > i > b {
    background: var(--red);
}

.factor-mid {
    border-color: #ead7b3;
    color: #93651d;
    background: var(--gold-soft);
}

.factor-mid > i > b {
    background: #d9912b;
}

.factor-high {
    border-color: #cce5df;
    color: var(--teal-dark);
    background: var(--teal-soft);
}

.factor-high > i > b {
    background: var(--teal);
}

.snapshot-forward {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-data-table {
    width: 100%;
    border-collapse: collapse;
}

.mini-data-table th,
.mini-data-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: .57rem;
    text-align: right;
    white-space: nowrap;
}

.mini-data-table th {
    color: var(--ink-faint);
    background: #fbfcfd;
    font-weight: 500;
}

.mini-data-table th:first-child,
.mini-data-table td:first-child {
    color: var(--navy);
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    text-align: left;
}

.mini-data-table tr:last-child td {
    border-bottom: 0;
}

.interactive-chart {
    position: relative;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: white;
}

.snapshot-charts {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.snapshot-charts .interactive-chart,
.snapshot-charts .report-chart {
    min-width: 0;
}

.snapshot-charts .chart-canvas,
.snapshot-charts .chart-canvas svg {
    min-height: 245px;
    height: 245px;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.chart-toolbar h3 {
    margin: 0;
    color: var(--navy);
    font-size: .78rem;
}

.chart-toolbar > div > span {
    display: block;
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: .58rem;
}

.chart-ranges {
    display: flex;
    gap: 2px;
    padding: 2px;
    border: 0;
    border-radius: 999px;
    background: #f3f5f6;
}

.chart-ranges button {
    padding: 5px 9px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: var(--ink-faint);
    background: transparent;
    font-family: "DM Sans", sans-serif;
    font-size: .61rem;
    font-weight: 500;
}

.chart-ranges button.active {
    color: var(--teal-dark);
    background: white;
    box-shadow: 0 1px 3px rgba(13, 33, 55, .08);
}

.valuation-chart {
    margin-top: 24px;
}

.chart-type-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 4px;
}

.chart-type-controls button {
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    color: var(--ink-soft);
    background: #f5f7f8;
    font-family: "DM Sans", sans-serif;
    font-size: .62rem;
    font-weight: 500;
}

.chart-type-controls button:hover {
    color: var(--teal-dark);
    background: #eef7f5;
}

.chart-type-controls button.active {
    border-color: transparent;
    color: var(--teal-dark);
    background: var(--teal-soft);
}

.valuation-chart .chart-canvas,
.valuation-chart .chart-canvas svg {
    min-height: 320px;
    height: 320px;
}

.earnings-chart {
    margin-top: 24px;
}

.earnings-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 12px 0 4px;
    color: var(--ink-faint);
    font-size: .61rem;
}

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

.earnings-chart-legend i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--navy);
}

.earnings-chart-legend .actual i {
    background: var(--teal);
}

.earnings-chart-legend .estimate i {
    border: 1.5px solid var(--ink-faint);
    background: white;
}

.earnings-chart-legend .surprise i {
    border-radius: 2px;
    background: #71b7dd;
}

.earnings-chart-canvas,
.earnings-chart-canvas svg {
    width: 100%;
    min-height: 390px;
    height: 390px;
}

.earnings-chart-canvas svg {
    overflow: visible;
    stroke: none;
    stroke-width: 0;
}

.earnings-price-path {
    fill: none;
    stroke: var(--navy-80);
    stroke-width: 1.45;
    vector-effect: non-scaling-stroke;
}

.earnings-estimate-bridge {
    stroke: #aeb6bf;
    stroke-dasharray: 2 2;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.earnings-estimate-dot {
    fill: white;
    stroke: #8f99a4;
    stroke-width: 1.6;
    vector-effect: non-scaling-stroke;
}

.earnings-actual-dot {
    fill: var(--teal);
    stroke: white;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.earnings-actual-dot.negative {
    fill: var(--red);
}

.earnings-panel-divider {
    stroke: #e8ebee;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.earnings-surprise-zero {
    stroke: #b9c0c8;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.earnings-surprise-bar {
    fill: #55afd9;
}

.earnings-surprise-bar.negative {
    fill: #e99a92;
}

.earnings-axis-title {
    fill: var(--ink-faint);
    stroke: none;
    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    font-weight: 500;
}

.earnings-event-hit {
    fill: transparent;
    stroke: none;
    cursor: crosshair;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 0 2px;
}

.chart-legend button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    color: var(--ink-soft);
    background: #f5f7f8;
    font-family: "DM Sans", sans-serif;
    font-size: .61rem;
    font-weight: 500;
}

.chart-legend button.off {
    opacity: .42;
}

.chart-legend i {
    width: 12px;
    height: 2px;
    background: var(--series-color);
}

.chart-canvas {
    min-height: 285px;
}

.chart-canvas svg {
    width: 100%;
    height: 285px;
    overflow: visible;
    stroke: none;
    stroke-width: 0;
}

.chart-grid-line {
    stroke: #eef0f2;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.chart-axis-label {
    fill: var(--ink-faint);
    stroke: none;
    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    font-weight: 400;
}

.chart-series-path {
    fill: none;
    stroke: var(--series-color);
    stroke-width: 1.4;
    vector-effect: non-scaling-stroke;
}

.chart-series-path.primary {
    stroke-width: 1.8;
}

.chart-hover-line {
    stroke: var(--ink-faint);
    stroke-dasharray: 3 3;
    stroke-width: 1;
    pointer-events: none;
    vector-effect: non-scaling-stroke;
}

.chart-hover-dot {
    fill: white;
    stroke: var(--series-color);
    stroke-width: 2;
    pointer-events: none;
    vector-effect: non-scaling-stroke;
}

.chart-hit-area {
    fill: transparent;
    stroke: none;
    cursor: crosshair;
}

.chart-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 150px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-hover);
    font-family: "JetBrains Mono", monospace;
    font-size: .57rem;
    pointer-events: none;
}

.chart-tooltip strong {
    display: block;
    margin-bottom: 5px;
    color: var(--navy);
}

.chart-tooltip span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 3px;
}

.chart-tooltip em {
    font-style: normal;
}

.chart-tooltip b {
    color: var(--navy);
    font-weight: 600;
}

.chart-tooltip i {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--series-color);
}

.subsection-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 24px 0 14px;
}

.subsection-heading h3 {
    margin: 0;
    color: var(--navy);
    font-size: .83rem;
}

.factor-grid {
    display: grid;
    gap: 10px 15px;
    grid-template-columns: repeat(2, 1fr);
}

.factor {
    display: grid;
    align-items: center;
    gap: 10px;
    grid-template-columns: 110px 1fr 28px;
}

.factor > span {
    color: var(--ink-soft);
    font-size: .67rem;
}

.factor > i {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf0f2;
}

.factor > i > b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--teal);
}

.factor > strong {
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .63rem;
    text-align: right;
}

.report-chart {
    margin: 23px 0 0;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.report-chart > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.report-chart h3 {
    margin: 0;
    color: var(--navy);
    font-size: .8rem;
}

.report-chart > div span {
    color: var(--ink-faint);
    font-size: .62rem;
}

.report-chart img {
    display: block;
    width: 100%;
    max-height: 330px;
    margin-top: 14px;
    object-fit: contain;
}

.report-prose p {
    margin: 0 0 14px;
}

.report-prose p:last-child {
    margin-bottom: 0;
}

.report-prose.columns {
    columns: 2 310px;
    column-gap: 28px;
}

.report-prose.columns p {
    break-inside: avoid;
}

.central-question {
    margin: 22px 0 0;
    padding: 22px;
    border: 0;
    border-left: 3px solid var(--gold);
    border-radius: 0 14px 14px 0;
    background: var(--cream);
}

.central-question > span {
    color: var(--gold);
}

.central-question p {
    margin: 9px 0 0;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.5;
}

.narrative-cards {
    display: grid;
    gap: 13px;
    grid-template-columns: repeat(2, 1fr);
}

.narrative-cards article {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.narrative-cards article > span {
    display: grid;
    width: 27px;
    height: 27px;
    flex: none;
    place-items: center;
    border-radius: 8px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: .59rem;
}

.narrative-cards p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .73rem;
    line-height: 1.62;
}

.narrative-cards h3 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: .8rem;
    line-height: 1.45;
}

.results-intro {
    margin-bottom: 16px;
}

.results-summary {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.results-summary p:last-child {
    margin-bottom: 0;
}

.timeline {
    position: relative;
    display: grid;
    gap: 5px;
}

.timeline::before {
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 13px;
    width: 1px;
    background: var(--line-strong);
    content: "";
}

.timeline article {
    position: relative;
    display: grid;
    gap: 13px;
    grid-template-columns: 28px 1fr;
}

.timeline article > span {
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #cae5df;
    border-radius: 50%;
    color: var(--teal-dark);
    background: var(--teal-pale);
    font-family: "JetBrains Mono", monospace;
    font-size: .61rem;
}

.timeline article p {
    margin: 2px 0 15px;
    color: var(--ink-soft);
    font-size: .76rem;
    line-height: 1.6;
}

.research-details {
    margin-top: 14px;
    border-top: 1px solid var(--line);
}

.research-details summary {
    padding: 17px 0 10px;
    cursor: pointer;
    color: var(--navy);
    font-size: .78rem;
    font-weight: 600;
}

.data-table {
    min-width: 580px;
    margin-bottom: 18px;
}

.data-table td {
    color: var(--ink-soft);
    font-family: "JetBrains Mono", monospace;
    font-size: .67rem;
}

.data-table td:first-child {
    color: var(--navy);
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
}

.comparables-table {
    min-width: 860px;
}

.comparables-table td:first-child strong,
.comparables-table td:first-child span {
    display: block;
}

.comparables-table td:first-child span {
    max-width: 150px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--ink-faint);
    font-size: .57rem;
    font-weight: 400;
    text-overflow: ellipsis;
}

.comparables-table .subject-row {
    background: var(--teal-pale);
}

.comparables-table .subject-row td:first-child {
    color: var(--teal-dark);
}

.table-switcher {
    display: flex;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    gap: 3px;
    margin-bottom: 14px;
    padding: 3px;
    border-radius: 999px;
    background: #f2f4f5;
}

.table-switcher button {
    flex: none;
    padding: 7px 11px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: var(--ink-faint);
    background: transparent;
    font-size: .64rem;
    font-weight: 500;
}

.table-switcher button.active {
    color: var(--teal-dark);
    background: white;
    box-shadow: 0 1px 3px rgba(13, 33, 55, .08);
}

.comparable-table-panel[hidden] {
    display: none;
}

.full-comparables-table {
    width: max-content;
    min-width: 100%;
}

.full-comparables-table th {
    text-align: center;
}

.full-comparables-table th:first-child,
.full-comparables-table td:first-child {
    position: sticky;
    z-index: 1;
    left: 0;
    min-width: 125px;
    text-align: left;
    background: white;
}

.full-comparables-table td:first-child strong,
.full-comparables-table td:first-child span {
    display: block;
}

.full-comparables-table td:first-child span {
    margin-top: 2px;
    color: var(--ink-faint);
    font-family: "DM Sans", sans-serif;
    font-size: .57rem;
    font-weight: 400;
}

.full-comparables-table thead th:first-child {
    z-index: 2;
    background: #f6f8f9;
}

.full-comparables-table .subject-row td {
    background: var(--teal-pale);
}

.full-comparables-table td {
    min-width: 68px;
    font-family: "JetBrains Mono", monospace;
    font-size: .61rem;
    text-align: right;
}

.sentiment-grid {
    display: grid;
    align-items: start;
    gap: 22px;
    grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr);
}

.sentiment-rating-card {
    padding: 17px;
    border: 1px solid #edf0f2;
    border-radius: 13px;
    background: #fbfcfc;
}

.sentiment-rating-card > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}

.sentiment-rating-card header span,
.sentiment-rating-card header strong {
    display: block;
}

.sentiment-rating-card header span {
    color: var(--ink-faint);
    font-size: .62rem;
}

.sentiment-rating-card header strong {
    margin-top: 3px;
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .85rem;
}

.sentiment-rating-card header small {
    color: var(--ink-faint);
    font-size: .6rem;
}

.rating-bars {
    display: grid;
    gap: 12px;
}

.rating-bars > div {
    display: grid;
    align-items: center;
    gap: 8px;
    grid-template-columns: 65px minmax(80px, 1fr) 22px;
}

.rating-bars span {
    color: var(--ink-soft);
    font-size: .61rem;
}

.rating-bars i {
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: #e8edef;
}

.rating-bars b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--navy-80);
}

.rating-bars strong {
    color: var(--navy);
    font-family: "JetBrains Mono", monospace;
    font-size: .6rem;
    text-align: right;
}

.sentiment-timeseries-chart {
    margin-top: 20px;
}

.source-table-details {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.source-table-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    color: var(--navy);
    background: #fbfcfc;
    font-size: .73rem;
    font-weight: 600;
}

.source-table-details > summary::-webkit-details-marker {
    display: none;
}

.source-table-details > summary::after {
    color: var(--teal-dark);
    content: "−";
    font-family: "JetBrains Mono", monospace;
}

.source-table-details:not([open]) > summary::after {
    content: "+";
}

.source-table-details summary small {
    margin-left: auto;
    color: var(--ink-faint);
    font-size: .59rem;
    font-weight: 400;
}

.source-table-details .table-scroll {
    border-top: 1px solid var(--line);
}

.source-table {
    min-width: 760px;
    margin: 0;
}

.source-table td {
    font-family: "DM Sans", sans-serif;
    font-size: .66rem;
    text-align: left;
    white-space: normal;
}

.source-table td:first-child {
    width: 24%;
    color: var(--navy);
    font-weight: 600;
}

.source-table td:nth-child(2) {
    width: 20%;
    color: var(--ink-faint);
}

.source-table a {
    color: var(--teal-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.source-link {
    color: var(--teal-dark);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--teal-dark) 35%, transparent);
    text-underline-offset: 0.18em;
}

.source-link:hover {
    text-decoration-color: currentColor;
}

.risk-list {
    display: grid;
    gap: 10px;
}

.risk-list details {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.risk-list summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.risk-list summary::-webkit-details-marker {
    display: none;
}

.risk-list summary > span {
    flex: none;
    color: var(--gold);
    font-family: "JetBrains Mono", monospace;
    font-size: .6rem;
}

.risk-list summary > strong {
    color: var(--navy);
    font-size: .74rem;
}

.risk-list details > p {
    margin: 0;
    padding: 0 16px 16px 70px;
    color: var(--ink-soft);
    font-size: .72rem;
    line-height: 1.6;
}

.source-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(3, 1fr);
}

.source-grid > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-soft);
    background: #fbfcfd;
    font-size: .7rem;
}

.source-grid small {
    color: var(--ink-faint);
    font-family: "JetBrains Mono", monospace;
    font-size: .56rem;
}

.disclaimer {
    margin: 18px 0 0;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: .62rem;
    line-height: 1.55;
}

.auth-shell,
.error-shell {
    display: grid;
    min-height: 100vh;
    padding: 32px 20px;
    place-items: center;
    background:
        radial-gradient(circle at 75% 15%, rgba(26, 158, 138, .1), transparent 25%),
        linear-gradient(135deg, #fff, #f7faf9);
}

.auth-brand {
    position: absolute;
    top: 28px;
    left: 32px;
}

.auth-card {
    width: min(100%, 430px);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: 0 22px 60px rgba(13, 33, 55, .09);
}

.auth-card h1 {
    margin: 11px 0 8px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.15rem;
    letter-spacing: -.03em;
}

.auth-lede {
    margin: 0 0 25px;
    color: var(--ink-soft);
    font-size: .8rem;
    line-height: 1.6;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.field > span {
    color: var(--navy);
    font-size: .73rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    outline: 0;
    color: var(--navy);
    background: #fbfcfd;
    font-size: .83rem;
}

.field input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(26, 158, 138, .1);
}

.form-alert {
    margin-bottom: 17px;
    padding: 10px 12px;
    border: 1px solid #f2d1ce;
    border-radius: 9px;
    color: var(--red);
    background: var(--red-soft);
    font-size: .7rem;
}

.form-alert.warning {
    border-color: #eadabb;
    color: #9a6d1f;
    background: var(--gold-soft);
}

.demo-credentials {
    margin: 18px 0 0;
    color: var(--ink-faint);
    font-size: .67rem;
    text-align: center;
}

.demo-credentials span {
    color: var(--ink-soft);
    font-family: "JetBrains Mono", monospace;
}

.auth-footer {
    position: absolute;
    bottom: 22px;
    color: var(--ink-faint);
    font-size: .62rem;
}

.error-shell > .brand {
    position: absolute;
    top: 28px;
    left: 32px;
}

.error-shell section {
    max-width: 560px;
    text-align: center;
}

.error-shell h1 {
    margin: 12px 0;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.6rem;
}

.error-shell section > p:not(.eyebrow) {
    margin: 0 0 22px;
    color: var(--ink-soft);
}

.toast {
    position: fixed;
    z-index: 150;
    right: 24px;
    bottom: 24px;
    max-width: 360px;
    padding: 12px 16px;
    border: 1px solid #cfe7e1;
    border-radius: 11px;
    opacity: 0;
    color: var(--navy);
    background: white;
    box-shadow: 0 14px 42px rgba(13, 33, 55, .16);
    font-size: .75rem;
    pointer-events: none;
    transform: translateY(12px);
    transition: 180ms ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1050px) {
    .hero-grid {
        gap: 40px;
        grid-template-columns: minmax(0, .8fr) minmax(390px, 1fr);
    }

    .hero h1 {
        font-size: 3.8rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        grid-template-columns: repeat(2, 1fr);
    }

    .snapshot-grid {
        grid-template-columns: 1fr;
    }

    .factor-pills {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .snapshot-charts {
        grid-template-columns: 1fr;
    }

    .stock-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .stock-actions {
        width: 100%;
    }

    .stock-price {
        margin-right: auto;
        text-align: left;
    }
}

@media (max-width: 840px) {
    .public-links {
        display: none;
    }

    .public-mobile-cta {
        display: inline-flex;
    }

    .hero {
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-top: 30px;
    }

    .hero-preview {
        max-width: 560px;
    }

    .proof-grid {
        padding: 20px 0;
        gap: 20px;
        grid-template-columns: repeat(2, 1fr);
    }

    .proof-grid > div:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .app-nav {
        display: none;
    }

    .quota {
        margin-left: auto;
    }

    .watch-row {
        grid-template-columns: minmax(180px, 1fr) 100px minmax(150px, 1.2fr) 24px;
    }

    .report-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-toc {
        position: static;
        display: flex;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        gap: 3px;
        padding: 9px;
    }

    .report-toc > span {
        display: none;
    }

    .report-toc a {
        flex: none;
    }

    .narrative-cards {
        grid-template-columns: 1fr;
    }

    .sentiment-grid {
        grid-template-columns: 1fr;
    }

    .snapshot-signals,
    .snapshot-forward {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(calc(100% - 28px), var(--max-width));
    }

    .nav-inner,
    .topbar-inner {
        height: 64px;
    }

    .brand-product {
        display: none;
    }

    .app-topbar .brand-copy {
        display: none;
    }

    .quota {
        min-width: 0;
        padding: 6px;
    }

    .quota-copy,
    .user-avatar {
        display: none;
    }

    .hero {
        padding: 94px 0 60px;
    }

    .hero h1 {
        font-size: 3.05rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .preview-card {
        padding: 21px;
    }

    .preview-metrics {
        grid-template-columns: 1fr;
    }

    .floating-event {
        position: static;
        width: max-content;
        margin: 12px 0 0 auto;
    }

    .proof-grid {
        grid-template-columns: 1fr;
    }

    .proof-grid > div,
    .proof-grid > div:nth-child(3) {
        padding: 0 0 14px;
        border: 0;
        border-bottom: 1px solid #e4dfd4;
    }

    .proof-grid > div:last-child {
        padding: 0;
        border: 0;
    }

    .landing-section {
        padding: 62px 0;
    }

    .landing-cta {
        align-items: flex-start;
        flex-direction: column;
        padding: 28px;
    }

    .public-footer > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard {
        padding-top: 32px;
    }

    .search-box {
        min-height: 56px;
    }

    .search-box kbd {
        display: none;
    }

    .watch-row {
        gap: 12px;
        padding: 14px;
        grid-template-columns: 1fr auto;
    }

    .price-cell {
        grid-column: 2;
        grid-row: 1;
    }

    .event-cell {
        grid-column: 1 / -1;
    }

    .watch-row .row-arrow {
        display: none;
    }

    .dashboard-sidebar {
        grid-template-columns: 1fr;
    }

    .history-table th:nth-child(2),
    .history-table td:nth-child(2) {
        display: none;
    }

    .stock-header {
        padding-top: 25px;
    }

    .company-logo {
        width: 48px;
        height: 48px;
    }

    .stock-identity {
        align-items: flex-start;
    }

    .stock-identity h1 {
        font-size: 2rem;
    }

    .stock-actions {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .stock-price {
        width: 100%;
    }

    .report-card {
        padding: 20px;
    }

    .report-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-heading h2 {
        font-size: 1.28rem;
    }

    .factor-grid,
    .source-grid {
        grid-template-columns: 1fr;
    }

    .factor-pills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .snapshot-aside .factor-pills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .snapshot-signals {
        grid-template-columns: 1fr;
    }

    .source-table-details summary small {
        display: none;
    }

    .chart-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-canvas,
    .chart-canvas svg {
        min-height: 230px;
        height: 230px;
    }

    .report-prose.columns {
        columns: auto;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .quick-stats > div {
        border-right: 0;
        border-bottom: 1px solid var(--line) !important;
    }

    .quick-stats > div:last-child {
        border-bottom: 0 !important;
    }

    .generation-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-brand {
        top: 20px;
        left: 20px;
    }

    .auth-card {
        padding: 26px 22px;
    }

    .auth-footer {
        display: none;
    }
}
