/* ==========================================================================
   Quartil — main stylesheet
   ========================================================================== */

/* ---------- Inter font (self-hosted) ---------- */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: optional;
    src: url("/static/fonts/inter-latin.65850a373e25.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: optional;
    src: url("/static/fonts/inter-latin-ext.01ba6c2a184b.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */

:root {
    /* Neutral scale (zinc) */
    --background: #fff;
    --foreground: #212529;
    --muted: #f8f9fa;
    --muted-foreground: #6c757d;
    --secondary-foreground: #495057;
    --accent-muted: #adb5bd;
    --border: #e9ecef;
    --border-subtle: #f1f3f5;
    --input: #dee2e6;

    /* Primary */
    --primary: #212529;
    --primary-hover: #343a40;
    --primary-foreground: #fff;

    /* Accent (neutral surface) */
    --accent: #f4f4f5;
    --accent-foreground: #18181b;

    /* Link */
    --link: #18181b;

    /* Destructive */
    --destructive: #dc3545;
    --destructive-foreground: #fff;

    /* Semantic */
    --positive: #0a8f08;
    --negative: #dc3545;

    /* Badge tokens */
    --badge-inactive-bg: #f8d7da;
    --badge-inactive-fg: #842029;
    --badge-active-bg: #d1e7dd;
    --badge-active-fg: #0f5132;
    --badge-warning-bg: #fff3cd;
    --badge-warning-fg: #664d03;
    --badge-neutral-bg: #e9ecef;
    --badge-neutral-fg: #495057;

    /* Radius */
    --radius-sm: 3px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 14px;

    /* Shadows */
    --shadow-xs: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);

    /* Dark code panel */
    --code-dark-bg: #141414;
    --code-dark-bg-header: #1c1c1c;
    --code-dark-text: #d4d4d8;
    --code-dark-muted: #6c757d;
    --code-dark-border: #343a40;
    --code-dark-hover: rgba(255,255,255,0.08);

    /* Focus */
    --focus-ring: 0 0 0 3px rgba(0,0,0,0.06);

    /* Z-index */
    --z-tooltip: 50;
    --z-header: 100;
    --z-dropdown: 200;
    --z-banner: 300;
    --z-skip: 1000;
}

/* ---------- Reset & base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    font-variant-numeric: tabular-nums;
    line-height: 1.6;
    color: var(--foreground);
    background: var(--background);
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Global focus styles ---------- */

:focus-visible {
    outline: 2px solid var(--foreground);
    outline-offset: 2px;
}

/* ---------- Typography ---------- */

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}

p {
    margin-bottom: 0.75rem;
}

small {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

/* ---------- Layout ---------- */

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

main.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 200px);
}

/* ---------- Skip link ---------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: var(--z-skip);
    background: var(--background);
    color: var(--foreground);
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--foreground);
    border-radius: 4px;
}

.skip-link:focus-visible {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    overflow: visible;
    outline: none;
}

/* ---------- Visually hidden (sr-only) ---------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Anchor offset for sticky header ---------- */

[id] {
    scroll-margin-top: 5rem;
}

/* ---------- Navigation ---------- */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.05rem;
    color: var(--foreground);
    min-width: 128px;
}

.nav-logo:hover {
    text-decoration: none;
}

.nav-logo-img {
    display: block;
    height: 36px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--secondary-foreground);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--foreground);
    text-decoration: none;
}

/* ---------- Nav mega menu ---------- */

.nav-dropdown-wrap {
    position: relative;
    display: inline-flex;
}

.nav-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--secondary-foreground);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.nav-link-btn:hover,
.nav-link-btn.active {
    color: var(--foreground);
}

.nav-megamenu::before {
    content: "";
    position: absolute;
    top: -1rem;
    left: 0;
    right: 0;
    height: 1rem;
}

.nav-megamenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    width: 720px;
}

.megamenu-inner {
    display: grid;
    grid-template-columns: 1fr auto;
}

.megamenu-main {
    padding: 1.5rem;
}

.megamenu-hero-link {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1.25rem;
}

.megamenu-hero-link:hover {
    text-decoration: none;
    color: var(--foreground);
}

.megamenu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
}

.megamenu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-lg);
    color: var(--foreground);
    text-decoration: none;
}

.megamenu-item:hover {
    background: var(--muted);
    text-decoration: none;
}

.megamenu-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    background: var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--secondary-foreground);
}

.megamenu-item:hover .megamenu-icon {
    background: var(--border);
}

.megamenu-item strong {
    display: block;
    font-size: 0.85rem;
    line-height: 1.2;
}

.megamenu-item small {
    display: block;
    font-size: 0.7rem;
    color: var(--muted-foreground);
    margin-top: 0.1rem;
}

.megamenu-cols {
    display: flex;
    gap: 0;
    padding: 1.5rem 0;
    border-left: 1px solid var(--border-subtle);
    background: #fafafa;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}

.megamenu-col {
    padding: 0 1.5rem;
    min-width: 140px;
}

.megamenu-col + .megamenu-col {
    border-left: 1px solid var(--border-subtle);
}

.megamenu-col-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-foreground);
    margin-bottom: 0.6rem;
}

.megamenu-col a {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary-foreground);
    padding: 0.3rem 0;
}

.megamenu-col a:hover {
    color: var(--foreground);
    text-decoration: none;
}

.nav-mcp {
    font-weight: 600;
}

.nav-mcp-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 2px 5px;
    border: 1px solid #868e96;
    border-radius: var(--radius-sm);
    color: var(--secondary-foreground);
    vertical-align: middle;
    margin-right: 2px;
}

.nav-search-icon {
    display: flex;
    align-items: center;
    color: var(--muted-foreground);
}

.nav-search-icon:hover {
    color: var(--foreground);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--foreground);
    border-bottom: 2px solid var(--foreground);
    padding-bottom: 2px;
}

/* ---------- Search ---------- */

/* ---------- Nav account dropdown ---------- */

.nav-account {
    position: relative;
    display: inline-flex;
}

.nav-account-btn {
    background: none;
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.6rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--secondary-foreground);
    cursor: pointer;
}

.nav-account-btn:hover {
    background: var(--muted);
    color: var(--foreground);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 160px;
    z-index: var(--z-dropdown);
}

.nav-dropdown a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--secondary-foreground);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-dropdown a:last-child {
    border-bottom: none;
}

.nav-dropdown a:hover {
    background: var(--muted);
    color: var(--foreground);
    text-decoration: none;
}

[x-cloak] {
    display: none !important;
}

/* ---------- Hamburger + mobile menu ---------- */

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
}

.nav-desktop-only {
    /* visible by default, hidden on mobile via media query */
}

.nav-mobile-menu {
    border-top: 1px solid var(--border);
    background: var(--background);
    padding: 1rem 2rem 1.5rem;
}

.nav-mobile-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.nav-mobile-section:last-child {
    border-bottom: none;
}

.nav-mobile-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-foreground);
    margin-bottom: 0.4rem;
}

.nav-mobile-section a {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--secondary-foreground);
}

.nav-mobile-section a:hover {
    color: var(--foreground);
    text-decoration: none;
}

.nav-mobile-auth {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ---------- Nav auth ---------- */

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

/* ---------- Auth forms ---------- */

.auth-container {
    max-width: 480px;
    margin: 2rem auto;
}

.auth-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    background: var(--background);
}

.auth-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.auth-form {
    margin-top: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.auth-benefits {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--muted);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.auth-benefits h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.auth-benefits ul {
    list-style: none;
    padding: 0;
}

.auth-benefits ul li {
    padding: 0.2rem 0;
    color: var(--secondary-foreground);
}

.auth-benefits ul li::before {
    content: "\2713  ";
    color: var(--positive);
    font-weight: 600;
}

/* Social auth buttons */

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid var(--input);
    background: var(--background);
    color: var(--foreground);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.btn.btn-social:hover {
    background: var(--muted);
    border-color: var(--accent-muted);
    text-decoration: none;
    color: var(--foreground);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--secondary-foreground);
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--background);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus-visible {
    outline: none;
    border-color: var(--foreground);
    box-shadow: var(--focus-ring);
}

.form-input--error {
    border-color: var(--destructive);
}

.form-error {
    font-size: 0.75rem;
    color: var(--destructive);
    margin-top: 0.2rem;
}

/* Field component aliases - shared field vocabulary (P1-2) */
.field        { margin-bottom: 1rem; }
.field-label  { display: block; font-size: 0.825rem; font-weight: 600; color: var(--secondary-foreground); margin-bottom: 0.25rem; }
.field-control { width: 100%; padding: 0.55rem 0.75rem; font-size: 0.875rem; border: 1px solid var(--input); border-radius: var(--radius); background: var(--background); transition: border-color 0.15s, box-shadow 0.15s; }
.field-control:focus-visible { outline: none; border-color: var(--foreground); box-shadow: var(--focus-ring); }
.field-help   { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.2rem; }
.field-error  { font-size: 0.75rem; color: var(--destructive); margin-top: 0.2rem; }
.field-control--error { border-color: var(--destructive); }

/* ---------- Alerts ---------- */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert--success {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert--info {
    background: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

.alert--warning {
    background: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert--error {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

/* ---------- Plan badges ---------- */

.plan-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
}

.plan-badge--free {
    background: var(--border);
    color: var(--secondary-foreground);
}

.plan-badge--pro {
    background: var(--primary);
    color: var(--primary-foreground);
}

.plan-badge--business {
    background: var(--muted-foreground);
    color: var(--primary-foreground);
}

.plan-badge--enterprise {
    background: var(--secondary-foreground);
    color: var(--primary-foreground);
}

/* ---------- Code block ---------- */

.code-block {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 0.825rem;
    overflow-x: auto;
    font-family: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
}

/* ---------- Code panel (copy affordance) ---------- */

.code-panel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.code-panel > .code-block {
    border-radius: 0 0 var(--radius) var(--radius);
}

.code-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
    background: var(--muted);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--muted-foreground);
    user-select: none;
}

.code-panel--dark .code-panel-header {
    background: var(--code-dark-bg-header);
    border-color: var(--code-dark-border);
    color: var(--code-dark-muted);
}

.code-panel--dark > .cta-code-block {
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: none;
}

.code-panel-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.45rem;
    font-size: 0.675rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--muted-foreground);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
    white-space: nowrap;
}

.code-panel-copy:hover {
    background: var(--border-subtle);
    color: var(--foreground);
}

.code-panel-copy:focus-visible {
    outline: 2px solid var(--foreground);
    outline-offset: 1px;
}

.code-panel--dark .code-panel-copy {
    color: var(--code-dark-muted);
    border-color: var(--code-dark-border);
}

.code-panel--dark .code-panel-copy:hover {
    background: var(--code-dark-hover);
    color: var(--code-dark-text);
}

.code-panel-copy[data-copied] {
    color: var(--positive);
    border-color: var(--positive);
}

.code-panel--dark .code-panel-copy[data-copied] {
    color: var(--positive);
    border-color: var(--positive);
}

.code-panel-copy svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.code-tabs-header {
    position: relative;
}

.code-tabs-header .code-panel-copy {
    margin-left: auto;
    align-self: center;
    margin-right: 0.5rem;
    color: var(--code-dark-muted);
    border-color: var(--code-dark-border);
}

.code-tabs-header .code-panel-copy:hover {
    background: var(--code-dark-hover);
    color: var(--code-dark-text);
}

.code-tabs-header .code-panel-copy:focus-visible {
    outline-color: var(--primary-foreground);
}

.code-tabs-header .code-panel-copy[data-copied] {
    color: #a6e3a1;
    border-color: #a6e3a1;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--muted);
    padding-top: 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 1.5rem;
}

.footer-col p {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-top: 0.4rem;
}

.footer-logo-img {
    display: block;
    width: 120px;
    height: 32px;
    margin-bottom: 0.35rem;
}

.footer-col ul {
    list-style: none;
    margin-top: 0.4rem;
}

.footer-col ul li {
    margin-bottom: 0.25rem;
}

.footer-col ul a {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.footer-col ul a:hover {
    color: var(--foreground);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 1.25rem;
    text-align: center;
}

/* ---------- Market ticker bar ---------- */

.ticker-bar {
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    width: 100%;
}

.ticker-track {
    display: flex;
    align-items: center;
    padding: 0.55rem 0;
    white-space: nowrap;
}

a.ticker-item,
.ticker-item {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0 1.25rem;
    border-right: 1px solid var(--border);
    text-decoration: none;
}

a.ticker-item:hover {
    text-decoration: none;
}

a.ticker-item:hover .ticker-label {
    color: var(--foreground);
}

.ticker-item:last-child {
    border-right: none;
}

.ticker-logo {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.ticker-label {
    color: var(--muted-foreground);
    margin-right: 0.3rem;
}

.ticker-item strong {
    color: var(--foreground);
    font-weight: 600;
}

/* ---------- Hero (homepage) ---------- */

.hero-home {
    padding: 3rem 0 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-home h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-sub {
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

/* ---------- Showcase sections (MCP chat + API terminal) ---------- */

.showcase-section {
    padding: 2.5rem 0;
}

.showcase-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.showcase-row--reverse {
    grid-template-columns: 1.2fr 1fr;
}

.showcase-row--reverse .showcase-text {
    order: 2;
}

.showcase-row--reverse .showcase-visual {
    order: 1;
}

.showcase-text h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.showcase-text p {
    color: #495057;
    line-height: 1.6;
}

.showcase-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.25rem;
}

.showcase-list li {
    padding: 0.3rem 0;
    font-size: 0.875rem;
    color: #495057;
}

.showcase-list li::before {
    content: "\2713  ";
    color: #0a8f08;
    font-weight: 600;
}

/* ---------- Mock LLM chat UI ---------- */

.mock-llm {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    height: 420px;
}

.mock-llm-sidebar {
    width: 180px;
    background: #f7f7f8;
    border-right: 1px solid #e9ecef;
    padding: 0.75rem 0.5rem;
    flex-shrink: 0;
}

.llm-sidebar-item {
    padding: 0.45rem 0.65rem;
    font-size: 0.725rem;
    color: #6c757d;
    border-radius: 6px;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.llm-sidebar-active {
    background: #ececec;
    color: #212529;
    font-weight: 500;
}

.mock-llm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.mock-llm-messages {
    flex: 1;
    padding: 1.25rem 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.llm-msg-user {
    max-width: 80%;
    align-self: flex-end;
}

.llm-msg-user p {
    background: #212529;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 18px 18px 4px 18px;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.llm-msg-ai {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.llm-ai-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #495057;
    margin-top: 0.1rem;
}

.llm-ai-body {
    flex: 1;
    min-width: 0;
}

.llm-ai-body p {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.chat-table {
    font-size: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.chat-table-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    padding: 0.35rem 0.75rem;
}

.chat-table-row:not(:last-child) {
    border-bottom: 1px solid #f1f3f5;
}

.chat-table-head {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.675rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8f9fa;
}

.chat-source {
    font-size: 0.675rem;
    color: #9ca3af;
    margin-bottom: 0;
}

.mock-llm-input {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e9ecef;
}

.llm-input-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #d9d9e3;
    border-radius: 22px;
    padding: 0.55rem 0.6rem 0.55rem 1rem;
    background: #fff;
}

.llm-input-text {
    font-size: 0.8rem;
    color: #9ca3af;
}

.llm-input-send {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #212529;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ---------- Stock search + popular ---------- */

.stock-search-section {
    padding: 3rem 0;
    text-align: center;
    background: #fff;
}

.stock-search-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.stock-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.stock-search-form .search-icon {
    position: absolute;
    left: 0.85rem;
    color: #adb5bd;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.stock-search-form input {
    flex: 1;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.925rem;
    border: 2px solid #dee2e6;
    border-right: none;
    border-radius: 10px 0 0 10px;
    background: #fff;
}

.stock-search-form input:focus-visible {
    outline: none;
    border-color: #212529;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.stock-search-form:focus-within {
    border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.stock-search-form .btn {
    border-radius: 0 10px 10px 0;
    padding: 0.75rem 1.5rem;
    font-size: 0.925rem;
}

.popular-stocks {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.popular-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.75rem;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.popular-stock-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0.85rem;
    text-decoration: none;
    color: #212529;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.popular-stock-card:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-decoration: none;
}

.popular-stock-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.popular-stock-top strong {
    font-size: 0.9rem;
}

.popular-stock-price {
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.popular-stock-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.popular-all {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ---------- Code tabs (language switcher) ---------- */

.code-tabs-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.code-tabs-header {
    display: flex;
    gap: 0;
    background: var(--code-dark-bg-header);
    padding: 0 0.5rem;
}

.code-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-size: 0.775rem;
    font-weight: 500;
    color: var(--code-dark-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.code-tab:hover {
    color: var(--accent-muted);
}

.code-tab-active {
    color: var(--primary-foreground);
    border-bottom-color: var(--primary-foreground);
}

.code-tabs-body {
    background: var(--code-dark-bg);
    color: var(--code-dark-text);
    padding: 1.25rem 1.5rem;
    font-size: 0.8rem;
    font-family: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
    line-height: 1.7;
    margin: 0;
    border: none;
    border-radius: 0;
    overflow-x: auto;
    min-height: 220px;
}

.term-str {
    color: #a6e3a1;
}

/* ---------- Proof band ---------- */

.proof-band {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.proof-band li {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--secondary-foreground, #495057);
    line-height: 1.5;
}

.proof-band li svg {
    flex-shrink: 0;
    position: relative;
    top: 2px;
    color: var(--foreground, #212529);
}

.proof-band li strong {
    color: var(--foreground, #212529);
}

/* ---------- Data groups ---------- */

.data-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.data-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground, #6c757d);
    margin: 0 0 0.5rem;
}

.data-group-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

/* ---------- Data icon cards ---------- */

.data-card {
    padding: 1.15rem;
    border: 1px solid var(--border, #e9ecef);
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.data-card:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.data-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--muted, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    color: var(--secondary-foreground, #495057);
}

.data-card strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.data-card span {
    font-size: 0.75rem;
    color: var(--muted-foreground, #6c757d);
    line-height: 1.4;
}

.term-prompt {
    color: #a6e3a1;
}

.term-key {
    color: #89b4fa;
}

/* (why-grid removed — replaced by .proof-band above) */

/* ---------- CTA section (full-width dark, two-column) ---------- */

.cta-section {
    background: #212529;
    color: #fff;
    padding: 4rem 0;
}

.cta-inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    align-items: center;
}

.cta-text h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.cta-desc {
    font-size: 1rem;
    color: #adb5bd;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    background: #fff;
    color: #212529;
    transition: background 0.15s, transform 0.15s;
}

.btn-cta:hover {
    background: #f8f9fa;
    color: #212529;
    text-decoration: none;
    transform: translateY(-1px);
}

.cta-sub {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 1rem;
    margin-bottom: 0;
}

.cta-sub a {
    color: #adb5bd;
}

.cta-sub a:hover {
    color: #fff;
}

.cta-code-block {
    background: var(--code-dark-bg);
    border: 1px solid var(--code-dark-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    font-size: 0.8rem;
    font-family: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
    color: var(--code-dark-text);
    line-height: 1.7;
    overflow-x: auto;
    margin: 0;
}

.term-comment {
    color: var(--code-dark-muted);
}

/* ---------- Hero (legacy — kept for non-home pages) ---------- */


/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

/* Disabled — covers class, native attribute, and ARIA */
.btn-disabled,
.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

/* -- Variants -- */

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--primary-foreground);
}

.btn-outline {
    background: var(--background);
    color: var(--secondary-foreground);
    border-color: var(--input);
}

.btn-outline:hover {
    background: var(--muted);
    border-color: var(--accent-muted);
    color: var(--foreground);
}

.btn-ghost {
    background: transparent;
    color: var(--secondary-foreground);
}

.btn-ghost:hover {
    background: var(--muted);
    color: var(--foreground);
}

.btn-danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
    border-color: var(--destructive);
}

.btn-danger:hover {
    opacity: 0.9;
}

/* -- Size / layout modifiers -- */

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.btn-icon.btn-sm {
    width: 1.75rem;
    height: 1.75rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ---------- Cards ---------- */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: var(--background);
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.card-label {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.card-detail {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-top: 0.15rem;
}

/* ---------- Section headings ---------- */

.section-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary-foreground);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.accordion-heading {
    padding-bottom: 0;
}

.accordion-trigger {
    all: unset;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 0.5rem;
    font: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}

.accordion-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.accordion-indicator {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* ---------- Table shell ---------- */

.table-shell {
    margin-bottom: 1.5rem;
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll-hint {
    display: none;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

/* Sticky first column inside table-shell */
.table-shell .data-table--sticky-col thead th:first-child,
.table-shell .data-table--sticky-col tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--background);
}

.table-shell .data-table--sticky-col tbody tr:hover td:first-child {
    background: var(--muted);
}

.table-shell .data-table--sticky-col thead th:first-child {
    z-index: 3;
}

/* ---------- Data tables ---------- */

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.table-actions--inline {
    margin: 0;
}

.empty-state-cell {
    text-align: center;
    padding: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    background: var(--background);
}

.data-table.sticky-header th {
    position: sticky;
    top: 56px;
}

.sort-header {
    color: var(--muted-foreground);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.sort-header:hover {
    color: var(--foreground);
}
.sort-header.active {
    color: var(--foreground);
    font-weight: 700;
}

.data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--muted);
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
    font-size: 0.825rem;
}

.data-table .ticker-link {
    font-weight: 600;
    color: var(--foreground);
}

/* ---------- Color classes ---------- */

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

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

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

/* ---------- Status badges ---------- */

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.4rem;
}

.badge-inactive {
    background: var(--badge-inactive-bg);
    color: var(--badge-inactive-fg);
}

.badge-active {
    background: var(--badge-active-bg);
    color: var(--badge-active-fg);
}

.badge-not-trading {
    background: var(--badge-warning-bg);
    color: var(--badge-warning-fg);
}

/* ---------- API Keys page ---------- */

.api-key-create-form {
    margin-bottom: 1.5rem;
}

.api-key-create-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.api-key-create-row .form-input {
    width: 220px;
    flex-shrink: 0;
}

.api-key-masked {
    font-family: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
    font-size: 0.8rem;
}

.api-key-revoked {
    opacity: 0.5;
}

.new-key-panel {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.new-key-panel-title {
    font-size: 0.925rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: #0f5132;
}

.new-key-panel-warning {
    font-size: 0.8rem;
    color: #0f5132;
    margin: 0 0 0.75rem;
}

.new-key-panel .code-block {
    background: var(--background);
    border-color: #badbcc;
    word-break: break-all;
    white-space: pre-wrap;
}

/* Revoke confirmation (details/summary) */

.revoke-confirm {
    position: relative;
}

.revoke-confirm > summary {
    list-style: none;
    cursor: pointer;
}

.revoke-confirm > summary::-webkit-details-marker {
    display: none;
}

.revoke-confirm-body {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 10;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    min-width: 260px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
    font-size: 0.825rem;
}

.revoke-confirm-body p {
    margin: 0 0 0.6rem;
}

.revoke-confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.btn-destructive {
    background: #842029;
    color: #fff;
    border: 1px solid #842029;
}

.btn-destructive:hover {
    background: #6c1a21;
    border-color: #6c1a21;
}

/* ---------- Explore links (DDM-style) ---------- */

/* ---------- Tooltips ---------- */

.has-tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--accent-muted);
}

.has-tooltip .tooltip-text {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--foreground);
    color: var(--background);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    white-space: normal;
    width: 220px;
    text-transform: none;
    letter-spacing: 0;
    z-index: var(--z-tooltip);
    margin-bottom: 4px;
}

.has-tooltip:hover .tooltip-text,
.has-tooltip:focus-within .tooltip-text {
    display: block;
}

.metric-info {
    all: unset;
    font: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: help;
}

.metric-info:focus-visible {
    outline: 2px solid var(--foreground);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ---------- Source attribution ---------- */

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--muted-foreground);
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.15rem 0.4rem;
    font-weight: 500;
    text-decoration: none;
}

a.source-badge:hover {
    background: var(--border);
    color: var(--secondary-foreground);
    text-decoration: none;
}

.source-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* ---------- Indicator summary ---------- */

.indicator-summary {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    padding: 0.85rem 1rem;
}

.indicator-summary p {
    margin: 0;
    line-height: 1.6;
}

/* ---------- News list ---------- */

.news-list {
    margin-bottom: 1.5rem;
}

.news-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.news-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #212529;
    display: block;
}

a.news-title:hover {
    color: #1a73e8;
}

.news-summary {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.2rem;
    margin-bottom: 0;
}

/* ---------- Stock logos ---------- */

.stock-logo {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 0.3rem;
    display: inline-block;
}

.data-table .ticker-cell {
    white-space: nowrap;
}

.stock-logo-lg {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* ---------- Stock detail ---------- */

.stock-page-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stock-header-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.stock-identity {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.stock-identity-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.stock-page-header .stock-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
}

.stock-page-header .ticker {
    font-size: inherit;
    font-weight: inherit;
}

.stock-page-header .name {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    font-weight: 400;
    overflow-wrap: break-word;
    word-break: break-word;
}

.stock-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.stock-badges .badge {
    margin-left: 0;
}

.stock-header-meta {
    padding-top: 0.25rem;
}

.stock-price-summary {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.stock-price-summary .current-price {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stock-price-summary .change {
    font-size: 0.95rem;
    font-weight: 500;
}

.stock-info-card {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.7;
}

.stock-info-card dt {
    font-weight: 600;
    color: #495057;
}

.stock-info-card dd {
    margin-bottom: 0.5rem;
    margin-left: 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.metric-item {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.75rem;
}

.metric-item .label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-item .value {
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-top: 0.15rem;
}

/* ---------- Stock sub-page tabs ---------- */

.stock-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.stock-tabs a {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.stock-tabs a:hover {
    color: var(--foreground);
    text-decoration: none;
}

.stock-tabs a.active {
    color: var(--foreground);
    border-bottom-color: var(--foreground);
}

/* ---------- Chart container ---------- */

.chart-container {
    width: 100%;
    height: 400px;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

/* ---------- Dividend bar chart (CSS) ---------- */

.dividend-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 200px;
    padding: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.dividend-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.dividend-bar {
    width: 100%;
    max-width: 40px;
    background: #1a73e8;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    height: var(--bar-h, 0px);
}

.dividend-bar-label {
    font-size: 0.7rem;
    color: #6c757d;
    white-space: nowrap;
}

.dividend-bar-value {
    font-size: 0.7rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- Financial statements ---------- */

.financials-table {
    margin-bottom: 1.5rem;
}

.financials-table .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.financials-table table {
    width: 100%;
    min-width: 600px;
}

.financials-table th,
.financials-table td {
    font-size: 0.825rem;
}

.financials-table .row-label {
    font-weight: 500;
    white-space: nowrap;
    min-width: 200px;
}

/* Sticky first column for financial tables */
.financials-table .data-table--sticky-col thead th:first-child,
.financials-table .data-table--sticky-col tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--background);
}

.financials-table .data-table--sticky-col tbody tr:hover td:first-child {
    background: var(--muted);
}

.financials-table .data-table--sticky-col thead th:first-child {
    z-index: 3;
}

/* ---------- Screener ---------- */

.screener-filters {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background: #f8f9fa;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

fieldset.filter-group {
    border: 0;
    margin: 0;
    padding: 0;
    min-inline-size: 0;
}

.filter-group label,
.filter-group legend {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
    padding: 0;
    float: none;
    width: auto;
}

.filter-group .filter-range {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.filter-group input[type="number"],
.filter-group select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.825rem;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    background: #fff;
}

.filter-group input[type="number"] {
    width: 70px;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* ---------- Active filter chips ---------- */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.filter-chips-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary-foreground);
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 7px;
    white-space: nowrap;
}

.filter-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--muted-foreground);
    text-decoration: none;
    border-radius: 50%;
}

.filter-chip-remove:hover {
    color: var(--foreground);
    background: var(--border);
}

.filter-chips-clear {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 0.25rem;
}

.filter-chips-clear:hover {
    color: var(--foreground);
}

/* ---------- Pricing ---------- */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.pricing-card {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
}

.pricing-card.featured {
    border-color: #212529;
    box-shadow: 0 0 0 1px #212529;
}

.pricing-card .tier-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.pricing-card .tier-price {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pricing-card .tier-period {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.pricing-card ul li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.pricing-card .pricing-recommended {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--primary-foreground);
    margin-bottom: 0.5rem;
}

/* Pricing comparison table */

.pricing-compare {
    margin-top: 2.5rem;
}

.pricing-compare h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.pricing-compare table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.pricing-compare th {
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.pricing-compare td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.pricing-compare tbody tr:hover {
    background: var(--muted);
}

.pricing-compare .check {
    color: var(--positive);
}

.pricing-compare .dash {
    color: var(--accent-muted);
}

/* Pricing FAQ */

.pricing-faq {
    margin-top: 2.5rem;
}

.pricing-faq h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.pricing-faq-item {
    border-bottom: 1px solid var(--border);
}

.pricing-faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.85rem 0;
    background: none;
    border: none;
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--foreground);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.pricing-faq-arrow {
    font-size: 1rem;
    color: var(--muted-foreground);
    transition: transform 0.15s;
    transform: rotate(180deg);
}

.pricing-faq-open {
    transform: rotate(0deg);
}

.pricing-faq-a {
    padding: 0 0 0.85rem;
}

.pricing-faq-a p {
    font-size: 0.875rem;
    color: var(--secondary-foreground);
}

/* Account plan usage */

.plan-usage {
    margin-bottom: 1.5rem;
}

.plan-usage-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.plan-usage-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    min-width: 7rem;
}

.plan-usage-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.plan-usage-progress {
    display: block;
    width: 100%;
    height: 6px;
    appearance: none;
    border: 0;
    border-radius: 3px;
    background: transparent;
}

.plan-usage-progress::-webkit-progress-bar {
    background: var(--border);
    border-radius: 3px;
}

.plan-usage-progress::-webkit-progress-value {
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.2s;
}

.plan-usage-progress::-moz-progress-bar {
    background: var(--primary);
    border-radius: 3px;
}

.plan-usage-progress.warn::-webkit-progress-value {
    background: var(--negative);
}

.plan-usage-progress.warn::-moz-progress-bar {
    background: var(--negative);
}

.plan-usage-count {
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--secondary-foreground);
    min-width: 6rem;
    text-align: right;
}

.plan-billing-note {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
}

/* ---------- Dashboard usage ---------- */

.dash-usage {
    margin-bottom: 2rem;
}

/* ---------- Onboarding checklist ---------- */

.checklist {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

.checklist-item:last-child {
    border-bottom: 0;
}

.checklist-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--input);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted-foreground);
    flex-shrink: 0;
}

.checklist-item--done .checklist-icon {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.checklist-item--done .checklist-text {
    color: var(--muted-foreground);
}

/* ---------- Quick links ---------- */

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.quick-link {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    font-size: 0.825rem;
    font-weight: 500;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    color: var(--secondary-foreground);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.quick-link:hover {
    background: var(--muted);
    border-color: var(--accent-muted);
    text-decoration: none;
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}

.pagination a,
.pagination span {
    padding: 0.4rem 0.75rem;
    font-size: 0.825rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    color: var(--secondary-foreground);
}

.pagination a:hover {
    background: var(--muted);
    text-decoration: none;
}

.pagination .current {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* ---------- Empty state ---------- */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--muted);
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 0.35rem;
}

.empty-state-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0 0 1rem;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.inline-error,
.data-status {
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: var(--radius);
}

.inline-error {
    color: var(--destructive);
}

.data-status {
    color: var(--muted-foreground);
}

.skeleton {
    min-height: 1rem;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--muted) 25%, var(--border-subtle) 37%, var(--muted) 63%);
    background-size: 400% 100%;
    animation: skeleton-pulse 1.4s ease infinite;
}

@keyframes skeleton-pulse {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ---------- Sector list ---------- */

.sector-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.sector-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    transition: border-color 0.15s;
}

.sector-item:hover {
    border-color: var(--foreground);
}

.sector-item-link {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: inherit;
}

.sector-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.sector-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--foreground);
}

.sector-item-count {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.sector-item-tickers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sector-ticker {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: var(--font-mono, "SFMono-Regular", "Cascadia Code", "Consolas", monospace);
    background: var(--muted);
    color: var(--muted-foreground);
    border-radius: var(--radius);
}

.sector-item-action {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.sector-item:hover .sector-item-action {
    color: var(--foreground);
}

/* ---------- Dataset list (data dumps) ---------- */

.dataset-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.dataset-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dataset-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.dataset-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--foreground);
}

.dataset-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius);
    white-space: nowrap;
}

.dataset-status--coming-soon {
    background: var(--muted);
    color: var(--muted-foreground);
}

.dataset-description {
    font-size: 0.8rem;
    color: var(--secondary-foreground);
    margin: 0;
    line-height: 1.4;
}

.dataset-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.dataset-format,
.dataset-tier {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: var(--font-mono, "SFMono-Regular", "Cascadia Code", "Consolas", monospace);
    background: var(--muted);
    color: var(--muted-foreground);
    border-radius: var(--radius);
}

.dataset-cta {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--muted);
}

.dataset-cta p {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--secondary-foreground);
}

.dataset-cta-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---------- Utility ---------- */

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

.text-sm {
    font-size: 0.85rem;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- Cookie banner ---------- */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: var(--muted);
    z-index: var(--z-banner);
    padding: 0.75rem 0;
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-banner p {
    font-size: 0.825rem;
    margin: 0;
}

.cookie-banner a {
    color: #cff4fc;
}

/* ---------- Unified stock search bar ---------- */

.stock-search-bar {
    margin-bottom: 1rem;
}

.stock-unified-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.search-icon-inline {
    position: absolute;
    left: 0.75rem;
    color: #adb5bd;
    display: flex;
    pointer-events: none;
}

.stock-unified-search input {
    flex: 1;
    padding: 0.65rem 0.75rem 0.65rem 2.5rem;
    font-size: 0.925rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

.stock-unified-search input:focus-visible {
    outline: none;
    border-color: #212529;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.stock-unified-search:focus-within {
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.screener-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ---------- Docs layout (sidebar + content) ---------- */

.docs-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 70px;
}

.docs-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.docs-sidebar-nav {
    display: flex;
    flex-direction: column;
}

.docs-sidebar-nav a {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0.3rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
}

.docs-sidebar-nav a:hover {
    color: #212529;
    text-decoration: none;
    border-left-color: #dee2e6;
}

.docs-sidebar-nav a[aria-current="location"] {
    color: var(--foreground, #212529);
    font-weight: 600;
    border-left-color: var(--foreground, #212529);
}

.docs-content {
    max-width: 800px;
    min-width: 0;
}

/* ---------- Docs shell (quick-start, mobile TOC, method badges) ---------- */

.docs-shell {
    /* wrapper — no visual style, just scoping */
}

.docs-quick-start {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.docs-quick-start-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.docs-quick-start-steps {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.7;
}

.docs-quick-start-steps .code-block {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Mobile on-this-page dropdown */
.docs-mobile-toc {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.docs-mobile-toc summary {
    padding: 0.6rem 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.docs-mobile-toc summary::-webkit-details-marker {
    display: none;
}

.docs-mobile-toc summary::after {
    content: "▸";
    float: right;
    transition: transform 0.15s ease;
}

.docs-mobile-toc[open] summary::after {
    transform: rotate(90deg);
}

.docs-mobile-toc-nav {
    display: flex;
    flex-direction: column;
    padding: 0 1rem 0.75rem;
    gap: 0.25rem;
}

.docs-mobile-toc-nav a {
    color: var(--muted-foreground);
    padding: 0.25rem 0;
    font-size: 0.8rem;
}

.docs-mobile-toc-nav a:hover {
    color: var(--foreground);
    text-decoration: none;
}

.docs-mobile-toc-nav a[aria-current="location"] {
    color: var(--foreground);
    font-weight: 600;
}

/* Method badges */
.method-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono, ui-monospace, monospace);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15em 0.45em;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 0.35em;
    position: relative;
    top: -1px;
}

.method-get {
    background: #e8f5e9;
    color: #2e7d32;
}

.method-post {
    background: #e3f2fd;
    color: #1565c0;
}

.method-put {
    background: #fff3e0;
    color: #e65100;
}

.method-delete {
    background: #fce4ec;
    color: #c62828;
}

/* Hide mobile TOC on desktop (sidebar visible) */
@media (min-width: 769px) {
    .docs-mobile-toc {
        display: none;
    }
}

/* ---------- Autocomplete dropdown ---------- */

.stock-search-bar,
.stock-search-form,
.stock-search-autocomplete {
    position: relative;
}

.stock-search-autocomplete {
    max-width: 600px;
    margin: 0 auto;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: var(--z-dropdown);
    margin-top: 0.25rem;
    overflow: hidden;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--foreground);
    background: none;
    border: none;
    border-bottom: 1px solid var(--muted);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-active {
    background: var(--muted);
}

.autocomplete-item strong {
    font-size: 0.9rem;
    min-width: 60px;
}

.autocomplete-item span {
    color: var(--muted-foreground);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- MCP docs page ---------- */

.mcp-hero {
    padding: 2rem 0 1.5rem;
}

.mcp-hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid #212529;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.mcp-hero h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.mcp-hero p {
    font-size: 1.05rem;
    color: #495057;
    line-height: 1.7;
}

.mcp-section {
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
}

.mcp-section h2 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.mcp-section p {
    color: #495057;
    line-height: 1.7;
}

/* MCP client tabs */

.client-tabs {
    margin-top: 1rem;
}

.client-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

.client-tab {
    padding: 0.5rem 1rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: #6c757d;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.client-tab:hover {
    color: #212529;
}

.client-tab-active {
    color: #212529;
    border-bottom-color: #212529;
}

.client-tab-content {
    padding: 0.25rem 0;
}

.client-tab-content p {
    font-size: 0.9rem;
}

/* MCP diagram */

.mcp-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    margin: 1.25rem 0;
    background: #f8f9fa;
    border-radius: 10px;
    overflow-x: auto;
}

.mcp-diagram-box {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #fff;
    white-space: nowrap;
}

.mcp-diagram-highlight {
    background: #212529;
    color: #fff;
    border-color: #212529;
}

.mcp-diagram-arrow {
    color: #adb5bd;
    font-size: 1.1rem;
}

/* MCP steps */

.mcp-steps {
    margin-top: 1.5rem;
}

.mcp-step {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.mcp-step:last-child {
    border-bottom: none;
}

.mcp-step-number {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #212529;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.mcp-step-content {
    flex: 1;
}

.mcp-step-content h3 {
    margin-bottom: 0.4rem;
}

.mcp-step-content p {
    font-size: 0.9rem;
}

.mcp-config-toggle {
    background: none;
    border: none;
    font-size: 0.825rem;
    color: #1a73e8;
    cursor: pointer;
    padding: 0;
    margin-top: 0.5rem;
    font-family: inherit;
}

.mcp-config-details {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.825rem;
}

.mcp-config-details p {
    font-size: 0.825rem;
    margin-bottom: 0.4rem;
}

.mcp-config-details p:last-child {
    margin-bottom: 0;
}

/* MCP examples */

.mcp-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.mcp-example {
    padding: 0.6rem 0.85rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.825rem;
    color: #495057;
    font-style: italic;
}

/* MCP FAQ */

.mcp-faq {
    margin-top: 0.5rem;
}

.mcp-faq-item {
    border-bottom: 1px solid #e9ecef;
}

.mcp-faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.85rem 0;
    background: none;
    border: none;
    font-size: 0.925rem;
    font-weight: 500;
    color: #212529;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.mcp-faq-arrow {
    font-size: 1rem;
    color: #6c757d;
    transition: transform 0.15s;
    transform: rotate(180deg);
}

.mcp-faq-open {
    transform: rotate(0deg);
}

.mcp-faq-a {
    padding: 0 0 0.85rem;
}

.mcp-faq-a p {
    font-size: 0.875rem;
}

/* ---------- Ferramentas (tools) ---------- */

.tool-index-header {
    padding: 1.5rem 0 0.5rem;
    max-width: 800px;
}

.tool-index-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.tool-index-header p {
    font-size: 0.95rem;
    color: #71717a;
    margin: 0;
}

.tool-category {
    margin-bottom: 1.5rem;
}

.tool-category-heading {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #71717a;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e4e4e7;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 0;
}

.tool-card {
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: #18181b;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    border-color: #a1a1aa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-decoration: none;
}

.tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: #3f3f46;
}

.tool-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.tool-card p {
    font-size: 0.825rem;
    color: #71717a;
    line-height: 1.5;
    margin: 0;
}

.tool-page {
    max-width: 720px;
}

.tool-page h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.tool-page > p.text-muted {
    font-size: 0.925rem;
    line-height: 1.6;
}

.tool-form {
    margin-bottom: 1.5rem;
}

.tool-form-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Calculator input section */

.tool-page .form-group {
    margin-bottom: 0.85rem;
}

.tool-page .form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.35rem;
}

.tool-page .form-input {
    padding: 0.6rem 0.85rem;
    font-size: 0.925rem;
    border-radius: 8px;
}

.tool-page .form-input:focus-visible {
    border-color: #212529;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.input-reveal-wrapper {
    position: relative;
}

.input-reveal-wrapper .form-input {
    padding-right: 5rem;
}

.input-reveal-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground, #6b7280);
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 4px;
}

.input-reveal-toggle:hover {
    color: var(--foreground, #111827);
    background: rgba(0,0,0,0.04);
}

/* Calculator results */

.calc-result,
.sim-result {
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.calc-stock-info,
.sim-stock-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.calc-card {
    padding: 1.1rem 0.75rem;
    background: #f9fafb;
    border: 1px solid #f1f3f5;
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.15s;
}

.calc-card:hover {
    border-color: #dee2e6;
}

.calc-label {
    font-size: 0.675rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.calc-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* Calculator highlight card */
.calc-card-highlight {
    background: #212529;
    border-color: #212529;
}

.calc-card-highlight .calc-label {
    color: #9ca3af;
}

.calc-card-highlight .calc-value {
    color: #fff;
}

/* Calculator section titles */
.calc-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 1.75rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f3f5;
}

/* Calculator 2-col grid for comparison layouts */
.calc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

/* Calculator disclaimer */
.tool-page .text-sm.text-muted.mt-2 {
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
    margin-top: 1.25rem;
    font-size: 0.775rem;
    line-height: 1.5;
}

/* Compare form */

.compare-form {
    margin-bottom: 1.5rem;
}

.compare-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Prompt cards */

.prompt-category {
    margin-bottom: 1.5rem;
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.prompt-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.prompt-text {
    font-size: 0.85rem;
    font-style: italic;
    color: #495057;
    line-height: 1.5;
    margin: 0;
}

/* ---------- About page ---------- */

.about-page {
    max-width: 800px;
}

.about-hero {
    padding: 2rem 0 1.5rem;
}

.about-hero h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.about-hero p {
    font-size: 1.05rem;
    color: #495057;
    line-height: 1.7;
}

.about-section {
    padding: 1.5rem 0;
    border-top: 1px solid #e9ecef;
}

.about-section h2 {
    margin-bottom: 0.75rem;
}

.about-section p {
    color: #495057;
    line-height: 1.7;
}

.about-sources {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

.about-source {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.about-source strong {
    display: block;
    margin-bottom: 0.25rem;
}

.about-source p {
    font-size: 0.85rem;
    margin: 0;
}

.about-access {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.about-access-item {
    padding: 1.25rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.about-access-item h3 {
    margin-bottom: 0.4rem;
}

.about-access-item p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    /* Nav: hide desktop, show hamburger */
    .nav-desktop {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-desktop-only {
        display: none;
    }

    .nav-container {
        padding: 0.5rem 1rem;
    }

    .nav-mobile-menu {
        padding: 0.75rem 1.25rem 1.25rem;
    }

    .nav-mobile-section a {
        padding: 0.5rem 0;
    }

    /* Ticker bar */
    .ticker-bar {
        padding: 0;
    }

    .ticker-item {
        font-size: 0.7rem;
        padding: 0 0.6rem;
    }

    .ticker-logo {
        width: 14px;
        height: 14px;
    }

    .ticker-set {
        padding: 0.4rem 0;
    }

    /* Hero */
    .hero-home {
        padding: 2rem 0 1.5rem;
    }

    .hero-home h1 {
        font-size: 1.75rem;
    }

    .hero-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* General spacing on mobile */
    main.container {
        padding-top: 1.25rem;
        padding-bottom: 2rem;
    }

    .section-heading {
        font-size: 0.75rem;
    }

    .showcase-section {
        padding: 1.5rem 0;
    }

    .showcase-row,
    .showcase-row--reverse {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .showcase-row--reverse .showcase-text,
    .showcase-row--reverse .showcase-visual {
        order: unset;
    }

    .showcase-text h2 {
        font-size: 1.25rem;
    }

    .showcase-list li {
        font-size: 0.825rem;
    }

    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        display: none;
    }

    .nav-megamenu {
        width: 95vw;
        left: 0;
        transform: none;
    }

    .megamenu-inner {
        grid-template-columns: 1fr;
    }

    .megamenu-cols {
        border-left: none;
        border-top: 1px solid var(--border-subtle);
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    }

    .mock-llm-sidebar {
        display: none;
    }

    .mock-llm {
        height: 380px;
    }

    .data-group-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .data-card {
        padding: 0.85rem;
    }

    .data-card strong {
        font-size: 0.8rem;
    }

    .code-tabs-header {
        gap: 0;
    }

    .code-tab {
        padding: 0.5rem 0.6rem;
        font-size: 0.7rem;
    }

    .code-tabs-body {
        font-size: 0.7rem;
        padding: 1rem;
        min-height: 180px;
    }

    .cta-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-section {
        padding: 2rem 0;
    }

    .cta-text h2 {
        font-size: 1.5rem;
    }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .popular-stock-card {
        padding: 0.65rem;
    }

    .stock-search-section {
        padding: 1.5rem 0;
    }

    .stock-search-section h2 {
        font-size: 1.25rem;
    }

    .stock-search-form input {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem 0.6rem 2.25rem;
    }

    .stock-search-form .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

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

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

    .stock-header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stock-price-summary {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .stock-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stock-tabs a {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .chart-container {
        height: 280px;
    }

    .stock-info-card {
        overflow-wrap: break-word;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

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

    .filter-group input[type="number"] {
        width: 100%;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .table-wrap .data-table {
        overflow-x: visible;
    }

    .table-scroll-hint {
        display: block;
    }

    /* Tools/ferramentas grid */
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Calculator results */
    .calc-grid {
        grid-template-columns: 1fr;
    }

    /* Prompt grid */
    .prompt-grid {
        grid-template-columns: 1fr;
    }

    /* About page grids */
    .about-sources {
        grid-template-columns: 1fr;
    }

    .about-access {
        grid-template-columns: 1fr;
    }

    /* Auth forms */
    .auth-card {
        padding: 1.25rem;
    }

    /* Compare inputs */
    .compare-inputs {
        flex-wrap: wrap;
    }

    /* MCP docs examples */
    .mcp-examples {
        grid-template-columns: 1fr;
    }

    /* MCP diagram */
    .mcp-diagram {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* MCP steps */
    .mcp-step {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Tool form rows */
    .tool-form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {

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

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

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

    .stock-page-header .stock-title {
        font-size: 1.75rem;
    }

    .stock-price-summary .current-price {
        font-size: 1.2rem;
    }

    .card-value {
        font-size: 1.1rem;
    }

    .data-group-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-home {
        padding: 1.5rem 0 1rem;
    }

    .hero-home h1 {
        font-size: 1.85rem;
        letter-spacing: -0.02em;
    }

    .hero-sub {
        font-size: 0.85rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .mock-llm {
        height: 320px;
    }

    .llm-msg-user p {
        font-size: 0.8rem;
    }

    .showcase-section {
        padding: 1.25rem 0;
    }

    .showcase-text h2 {
        font-size: 1.1rem;
    }

    .proof-band li {
        font-size: 0.8rem;
    }

    .cta-text h2 {
        font-size: 1.25rem;
    }

    .btn-cta {
        width: 100%;
        justify-content: center;
    }

    .llm-ai-body p {
        font-size: 0.8rem;
    }

    .cta-inner {
        text-align: center;
    }

    .cta-code {
        display: none;
    }

    .container {
        padding: 0 1rem;
    }

    .tool-index-header {
        padding: 1rem 0 0.25rem;
    }

    .tool-index-header h1 {
        font-size: 1.35rem;
    }

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

    .nav-mobile-menu {
        padding: 0.75rem 1rem 1.25rem;
    }

    .footer-container {
        gap: 1rem;
    }

    .footer-col p {
        font-size: 0.8rem;
    }

    .client-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .code-block {
        font-size: 0.725rem;
        padding: 0.75rem;
    }

    .popular-stock-top strong {
        font-size: 0.825rem;
    }

    .popular-stock-price {
        font-size: 0.9rem;
    }
}

/* ---------- Prose pages (terms, privacy) ---------- */

.prose-page {
    max-width: 720px;
}

.prose-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.prose-page .prose-date {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

.prose-page h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-page p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.prose-page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose-page ul li {
    line-height: 1.7;
    margin-bottom: 0.25rem;
}

.prose-page a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Error pages (404, 500) ---------- */

.error-page {
    text-align: center;
    padding: 5rem 0 4rem;
}

.error-page h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.error-page p {
    color: var(--muted-foreground);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.error-page .error-actions {
    margin-top: 1.75rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Inline-style replacements (P4-2) ---------- */

.text-center { text-align: center; }
.text-mono   { font-family: monospace; }
.flex-1      { flex: 1; }

.flex-row-center {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chart-loading,
.chart-empty,
.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
    text-align: center;
}

.chart-empty {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.chart-error {
    color: var(--destructive);
    font-size: 0.875rem;
}

.autocomplete-wrap        { position: relative; }
.autocomplete-wrap-inline { position: relative; display: inline-block; }
.autocomplete-status {
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
}
.btn-self-end             { align-self: end; }

.form-input-xs { width: 120px; }
.form-input-sm { width: 140px; }
.form-input-md { width: 160px; }
.form-input-lg { width: 200px; }

.badge-neutral {
    background: var(--badge-neutral-bg);
    color: var(--badge-neutral-fg);
}

.row-past { opacity: 0.6; }

.compare-section-header {
    background: #f8f9fa;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.stock-info-card-danger {
    background: #f8d7da;
    border-color: #f5c2c7;
}

.stock-info-card-warning {
    background: #fff3cd;
    border-color: #ffecb5;
}

.news-title-static { color: #212529; }

.nav-dropdown hr   { margin: 0; border-color: #f1f3f5; }
.nav-dropdown form { margin: 0; }

.nav-dropdown-btn {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--secondary-foreground);
    background: none;
    border: none;
    border-bottom: 1px solid var(--muted);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.nav-dropdown-btn:hover {
    background: var(--muted);
    color: var(--foreground);
}

.data-table-compact { margin: 0.75rem 0; }
.form-checkbox      { width: auto; }
.form-label-inline  { margin: 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .ticker-track {
        transform: none !important;
        overflow-x: auto;
    }
}
