:root {
    --bg: #f4efe7;
    --bg-accent: #e8ddd0;
    --surface: rgba(255, 250, 242, 0.92);
    --surface-strong: rgba(255, 252, 246, 0.98);
    --surface-ink: #1f2933;
    --surface-muted: #5d6b78;
    --border: rgba(78, 94, 109, 0.16);
    --border-strong: rgba(78, 94, 109, 0.26);
    --shadow: 0 22px 60px rgba(58, 49, 41, 0.12);
    --shadow-soft: 0 12px 28px rgba(58, 49, 41, 0.08);
    --ink: #16202a;
    --muted: #57687a;
    --muted-soft: #7b8b99;
    --accent: #0d6d7b;
    --accent-soft: rgba(13, 109, 123, 0.12);
    --buy: #1f8f5f;
    --buy-soft: rgba(31, 143, 95, 0.14);
    --sell: #b0453b;
    --sell-soft: rgba(176, 69, 59, 0.14);
    --hold: #667789;
    --hold-soft: rgba(102, 119, 137, 0.14);
    --warning: #9c6b20;
    --warning-soft: rgba(156, 107, 32, 0.14);
    --ok: #23715a;
    --ok-soft: rgba(35, 113, 90, 0.14);
    --info: #275e85;
    --info-soft: rgba(39, 94, 133, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(13, 109, 123, 0.16), transparent 26%),
        radial-gradient(circle at top right, rgba(176, 69, 59, 0.08), transparent 24%),
        linear-gradient(180deg, #f7f2ea 0%, #f1e8dc 100%);
}

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

h1,
h2,
h3,
p {
    margin: 0;
}

pre {
    margin: 0;
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.site-frame {
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px 18px 48px;
}

.site-header,
.site-nav,
.brand-block,
.section-head,
.card-head,
.table-title-row,
.list-row,
.chip-row,
.metric-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header {
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 251, 245, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
}

.brand-block {
    align-items: center;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d6d7b, #124d8c);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: var(--shadow-soft);
}

.brand-copy {
    color: var(--muted);
    font-size: 13px;
}

.site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link,
.api-link,
.text-link,
.pill,
.status-badge,
.micro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.nav-link,
.api-link,
.text-link {
    background: rgba(255, 252, 246, 0.88);
    color: var(--muted);
}

.nav-link:hover,
.api-link:hover,
.text-link:hover,
.interactive-row:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
}

.nav-link.is-active {
    background: var(--accent-soft);
    border-color: rgba(13, 109, 123, 0.24);
    color: var(--accent);
}

.pill {
    background: rgba(255, 252, 246, 0.8);
    color: var(--muted);
    line-height: 1.4;
    text-align: center;
}

.pill-neutral,
.pill-info {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill-ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.pill-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.pill-buy {
    background: var(--buy-soft);
    color: var(--buy);
}

.pill-sell {
    background: var(--sell-soft);
    color: var(--sell);
}

.action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.action-buy {
    background: var(--buy-soft);
    color: var(--buy);
}

.action-sell {
    background: var(--sell-soft);
    color: var(--sell);
}

.action-hold {
    background: var(--hold-soft);
    color: var(--hold);
}

.status-badge,
.micro-badge {
    padding: 6px 10px;
    border: 0;
}

.status-accepted,
.status-new,
.status-filled,
.status-simulated,
.badge-supportive,
.badge-bullish,
.badge-pass,
.badge-ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.status-failed,
.status-rejected,
.badge-bearish,
.badge-fail,
.badge-restrictive {
    background: var(--sell-soft);
    color: var(--sell);
}

.badge-neutral,
.status-pending-new,
.badge-unknown {
    background: var(--hold-soft);
    color: var(--hold);
}

.eyebrow,
.section-kicker,
.card-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    font-weight: 800;
}

.eyebrow {
    color: var(--accent);
    margin-bottom: 10px;
}

.section-kicker,
.card-label {
    color: var(--muted-soft);
}

.console-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.85fr);
    gap: 18px;
    align-items: stretch;
}

.compact-hero {
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.75fr);
}

.hero-copy,
.hero-side,
.split-main,
.split-side,
.section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subtitle {
    max-width: 82ch;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

h1 {
    font-family: "Georgia", "Times New Roman", serif;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    margin-bottom: 10px;
}

h2 {
    font-family: "Georgia", "Times New Roman", serif;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.section-head {
    justify-content: space-between;
    flex-wrap: wrap;
}

.card-grid {
    display: grid;
    gap: 16px;
}

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

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

.compact-grid {
    gap: 12px 14px;
}

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

.flow-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(310px, 0.85fr);
    gap: 16px;
}

.card {
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.statement-card {
    min-height: 100%;
}

.stat-value {
    display: block;
    margin-top: 12px;
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.metric-stack,
.stack-list,
.event-item,
.activity-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-stack > div,
.event-item,
.list-row,
.score-row {
    padding: 10px 0;
    border-bottom: 1px solid rgba(78, 94, 109, 0.12);
}

.metric-stack > div:last-child,
.event-item:last-child,
.list-row:last-child,
.score-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.metric-stack span,
.event-item span,
.key-stat span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.metric-stack strong,
.key-stat strong {
    font-size: 1rem;
    line-height: 1.45;
}

.hero-summary,
.micro-copy,
.empty-copy,
.warning-copy,
.muted-copy {
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.warning-copy {
    color: var(--warning);
}

.muted-copy {
    font-size: 12px;
}

.compact-list .list-row {
    padding: 9px 0;
}

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

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

.list-row {
    justify-content: space-between;
}

.interactive-row {
    border-radius: 14px;
    padding: 10px 12px;
    margin: -2px -6px;
}

.key-stat {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(13, 109, 123, 0.06);
    border: 1px solid rgba(13, 109, 123, 0.08);
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-title-row {
    justify-content: space-between;
    padding: 18px 20px 0;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(78, 94, 109, 0.12);
    font-size: 13px;
}

thead th {
    color: var(--muted-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

tbody tr:hover {
    background: rgba(13, 109, 123, 0.05);
}

.scorecard-block {
    padding-top: 6px;
}

.score-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) 50px;
    align-items: center;
    gap: 10px;
}

.score-bar-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(13, 109, 123, 0.08);
    overflow: hidden;
}

.score-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0d6d7b, #2c8ab1);
}

.json-inspector summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
}

.json-inspector pre {
    margin-top: 12px;
    padding: 16px;
    border-radius: 16px;
    background: #f1ece4;
    border: 1px solid rgba(78, 94, 109, 0.1);
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
    color: #33424f;
}

.tone-buy,
.tone-ok {
    color: var(--buy);
}

.tone-sell,
.tone-warning {
    color: var(--sell);
}

.tone-hold,
.tone-neutral {
    color: var(--hold);
}

.tone-info {
    color: var(--info);
}

@media (max-width: 1180px) {
    .hero-panel,
    .compact-hero,
    .split-section,
    .timeline-grid,
    .stats-grid,
    .detail-grid,
    .flow-feature-grid,
    .flow-two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-header {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 780px) {
    .site-frame {
        padding: 16px 12px 36px;
    }

    .hero-panel,
    .compact-hero,
    .split-section,
    .stats-grid,
    .detail-grid,
    .timeline-grid,
    .flow-feature-grid,
    .flow-two-col {
        grid-template-columns: 1fr;
    }

    .site-header,
    .card {
        border-radius: 20px;
    }

    h1 {
        font-size: 2.25rem;
    }

    .brand-block {
        flex-direction: column;
        align-items: flex-start;
    }

    th,
    td {
        padding: 12px 14px;
    }

    .table-title-row,
    .section-head,
    .card-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
