/* Midnight / 深空仪表盘. The Tibo page deliberately keeps its X appearance.
   Shared layout lives in themes.css; this file owns only this theme's tokens,
   surface styling and decorative gauge. Values remain live HTML data. */
html[data-theme="midnight"]:has(body:not([data-page="tibo"])) {
    background: #060e1d;
    color-scheme: dark;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) {
    --paper: #060e1d;
    --white: #0b172b;
    --ink: #e7f1ff;
    --muted: #9aacc5;
    --green: #44ccff;
    --green-light: #112b44;
    --orange: #f5bd75;
    --line: #20334e;
    --radius: 10px;
    --theme-accent: #50d2ff;
    --theme-border: #20334e;
    --theme-muted: #9aacc5;
    --theme-surface: #0b172b;
    --theme-surface-soft: #0e2037;
    background: var(--paper);
    color: var(--ink);
    color-scheme: dark;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) ::selection { background: #235578; color: #fff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(button,a,input,select,textarea,summary):focus-visible {
    outline-color: #69dbff;
    outline-offset: 3px;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.topbar,.sidebar) {
    background: #091427;
    border-color: #1d304a;
    color: #b9cbe1;
    box-shadow: 0 1px 0 #153152;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-brand { color: #e0ecfa; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.brand-symbol,.theme-brand-symbol) { color: #5bdaff; background: #102c46; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.nav-link,.theme-topnav a) { color: #aabbd1; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.nav-link:hover,.theme-topnav a:hover) { background: #122a43; color: #e6f8ff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.nav-link.is-active,.theme-topnav a.is-active,.theme-topnav a[aria-current]) {
    background: #12344d;
    color: #66d9ff;
    box-shadow: inset 0 0 0 1px #235d7a, 0 0 18px #20baff0a;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.nav-caption,.sidebar-domain,.sidebar-note strong,.sidebar-note p,.breadcrumb,.breadcrumb strong,.timezone-label,.timezone-label .mono,.connection-status,.topbar-end) { color: #95aac3; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.nav-small,.resetbell-download,.resetbell-download small) { background: #10243a; border-color: #27445f; color: #a7c7e4; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.nav-divider,.sidebar-note) { border-color: var(--line); }
html[data-theme="midnight"] body:not([data-page="tibo"]) .topbar-divider { background: var(--line); }
html[data-theme="midnight"] body:not([data-page="tibo"]) .language-form { background: #0f223a; border-color: #29445f; color: #b9d5ef; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.language-form select,.language-symbol,.language-apply) { color: #c4dbf4; background: transparent; }
html[data-theme="midnight"] body:not([data-page="tibo"]) select option { color: #e7f1ff; background: #0d2036; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.theme-switcher,.theme-control,.theme-select-wrap) { background: #10243a; border-color: #29445f; color: #bed4ec; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is([data-theme-select],.theme-select) { background-color: #10243a; border-color: #29445f; color: #d5e8fc; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.icon-button,.button-outline) { color: #b0cbe5; border-color: #2b4661; background: #102239; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.icon-button:hover,.button-outline:hover) { color: #e7f7ff; background: #15324d; border-color: #4389ac; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.button-green,.personal-panel .button-green,.prompt-copy-button) { background: #47c9f5; color: #06172a; border-color: #47c9f5; font-weight: 650; box-shadow: 0 3px 20px #10b9ff16; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.button-green:hover,.personal-panel .button-green:hover,.prompt-copy-button:hover) { background: #79dfff; color: #06172a; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .page-heading {
    border: 1px solid #1b304c;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 16px;
    background: #0a172b;
    min-height: 148px;
    overflow: hidden;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) .page-heading h1 { color: #eef5ff; font-weight: 650; letter-spacing: -.9px; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .page-heading h1 > span { color: #aad3f2; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .page-heading p { color: #a3bad3; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-hero-art { display: none; }
/* A restrained raster atmosphere belongs only to the homepage header. */
html[data-theme="midnight"] body[data-page="home"] .page-heading { background-color: #060e1d; }
html[data-theme="midnight"] body[data-page="home"] .page-heading .theme-hero-art {
    display: block;
    background: url('/assets/themes/midnight-atmosphere.png') center right / cover no-repeat;
    opacity: .65;
    pointer-events: none;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-overview { margin-bottom: 24px; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-summary-grid { grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: 12px; align-items: stretch; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric {
    background: #0a172b;
    border: 1px solid #203852;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 #24436140, 0 6px 20px #00000018;
    color: #c4dcf4;
    padding: 24px 20px;
    min-height: 222px;
    justify-content: center;
    overflow: hidden;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric:hover { border-color: #3b7299; box-shadow: 0 0 25px #16b4f515; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-label { color: #b5c8e0; font-size: 12px; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-value { color: #ecf6ff; font-variant-numeric: tabular-nums; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-value strong { color: #e4f6ff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-value small { color: #9cc7e3; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-note { color: #94acc7; font-size: 11px; line-height: 1.65; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.theme-metric-icon,.theme-metric > svg) { color: #66cffa; background: #12334c; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: #071427 url('/assets/themes/midnight-gauge.png') center 40% / auto 250px no-repeat;
    padding: 15px 14px 14px;
    min-height: 222px;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability .theme-metric-label { color: #cbdcf1; font-size: 12px; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability .theme-metric-value { margin: 69px 0 7px; line-height: 1.1; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability .theme-metric-value strong { font-size: 44px; letter-spacing: -1.8px; text-shadow: 0 0 20px #46c7ff35; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability .theme-metric-note { font-size: 10px; max-width: 240px; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.panel,.daily-card,.reset-statistics,.prompt-card,.prompts-intro,.prompts-guide,.api-intro,.api-principles,.attribution-panel) {
    background: #0b182c;
    border-color: #203650;
    box-shadow: inset 0 1px 0 #25446030, 0 6px 20px #00000010;
    border-radius: 10px;
    color: #dce9f8;
}
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.section-heading h2,.daily-section-heading h2,.daily-card h3,.calendar-heading h2,.statistics-heading h2,.personal-panel h2,.sources-panel h2,.prompt-card h2,.prompts-intro h2,.prompts-guide h2,.api-intro h2,.api-principles h2,.attribution-panel h3,.model-heading h3) { color: #e2effd; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.eyebrow,.section-heading .eyebrow,.daily-section-heading .eyebrow,.calendar-heading .eyebrow,.personal-panel .eyebrow,.developer-card .eyebrow) { color: #8caecc; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.section-heading p,.daily-section-heading > p,.calendar-heading p,.personal-description,.source-health-note,.data-notice,.reading-note p,.probability-caption,.model-policy,.model-unavailable,.model-metadata,.model-factors-heading,.model-empty,.persistent-history-note small) { color: #9aafc8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.text-link,.small-link,.text-button,.feed-more > .text-button,.post-source,.calendar-source,.daily-card-footer > a,.daily-signal-footer > a,.outlook-credit,.data-credit,.developer-link,.hero-link) { color: #65ccf6; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.text-link:hover,.text-button:hover,.post-source:hover,.data-credit:hover) { color: #a5e8ff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .small-pill { color: #9ac7e4; background: #112a42; border-color: #2b4e6a; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.panel-foot,.persistent-history-note,.forecast-explanation,.experimental-model,.reading-note,.daily-signal,.personal-calendar-summary,.global-calendar-summary) { background: #0e2037; border-color: #253c56; color: #aac0d7; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-card { --daily-accent: #59cffa; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-card-today { background: #0c2037; border-color: #2b5774; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-card[data-level="medium"] { --daily-accent: #a59aff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-card[data-level="high"] { --daily-accent: #76e0df; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-number { color: #e5f6ff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-number > span { color: #9cc2df; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.daily-card time,.daily-reason > span,.daily-card-footer,.daily-estimate-updated,.daily-estimate-label,.daily-signal-footer,.statistics-heading > span,.statistics-note,.statistic-item > span,.statistic-item > small) { color: #91acc8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.daily-reason,.daily-card[data-completed="true"] .daily-estimate,.statistics-note,.statistic-item,.calendar-estimate-history) { border-color: #2c435c; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.daily-reason > p,.daily-signal > p,.daily-window-note,.daily-estimate > summary,.calendar-estimate-history > summary) { color: #bdd4eb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-signal-heading h3 { color: #cceafa; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.daily-state,.outlook-state) { color: #9ed9f6; background: #123149; border-color: #2b536c; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.daily-state[data-pending="true"],.daily-state[data-stale="true"],.outlook-state[data-stale="true"]) { color: #f6cd97; border-color: #705638; background: #33281d; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-pending-note { color: #e3bd8f; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-probability-track { background: #1a3850; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-probability-track > span { box-shadow: 0 0 12px #4fcfff45; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-completion { background: #134a54; border: 1px solid #2a8594; color: #e4fffb; box-shadow: none; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-completion-banked { background: #53391e; border-color: #9c7443; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-completion small { color: #c0e3e4; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .statistic-item > strong { color: #a4dfff; font-size: 25px; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-calendar-summary,.global-calendar-summary) > strong { color: #b9def7; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-calendar-summary,.global-calendar-summary) > :is(span,small) { color: #91adc8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.calendar-heading > .button,.calendar-toolbar button,.calendar-set-day) { color: #b9d8ee; border-color: #31536f; background: #10283f; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-toolbar button:hover { color: #edfbff; background: #194260; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-toolbar > strong { color: #e1efff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-table th { color: #8ba8c7; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day { color: #bcd8ee; background: #10253e; border-color: #1b3752; border-radius: 5px; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day:hover { background: #173b55; border-color: #3c95bd; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day.is-outside { background: #0a192c; color: #7a91af; border-color: #152b43; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day.is-today .calendar-day-number { background: #62d2fb; color: #071b2f; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day:has(.badge-reset) { background: #103c4f; border-color: #3d9dc0; box-shadow: inset 0 2px #6ad9f6, 0 0 10px #2bc6ee12; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day:has(.badge-banked) { background: #352a27; border-color: #8d6947; box-shadow: inset 0 2px #e9b373; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day:has(.badge-personal) { background: #202d54; border-color: #576bb4; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day:has(.badge-weekly) { background: #1b2643; border-color: #3d4c73; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day.is-selected { outline-color: #74d9ff; border-color: #74d9ff; box-shadow: 0 0 12px #40caff18; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .badge-reset { background: #b9f1ff; color: #07344b; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .badge-banked { background: #f2c58e; color: #3a2914; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .badge-forecast { background: #17314b; color: #bdd9f5; border-color: #385872; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .badge-planned { background: #2a2545; color: #c8baf5; border-color: #685792; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .badge-personal { background: #344d87; color: #e0eaff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .badge-weekly { background: #283153; color: #c8ccef; border-color: #7c82b0; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .daily-completion .calendar-badge { color: inherit; background: transparent; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.calendar-legend,.calendar-empty,.calendar-event time,.calendar-event > small,.calendar-event .calendar-event-original,.calendar-detail-heading > span,.calendar-legend > small) { color: #8fa9c4; border-color: #203c56; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.calendar-detail-heading,.calendar-event > p) { color: #bad3eb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-event { border-color: #20364f; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .personal-date-mark { background: #182c48; color: #bbd6f6; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .personal-date-mark small { color: #96aecb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .dot-reset { background: #78d9f4; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .dot-banked { background: #efbb7b; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .dot-forecast { background: #9ca6e8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .signal-toolbar { border-color: #20344b; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .filter-tabs button { color: #a0b9d4; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .filter-tabs button:hover { background: #132e47; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .filter-tabs button.is-active { color: #87def9; background: #12354d; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .filter-tabs button > span { color: #b2e7fc; background: #24536c; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .signal-search { color: #8cabc9; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .signal-search input { color: #d5e7fa; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .signal-search input::placeholder { color: #91a9c4; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .signal-search kbd { color: #95aec9; border-color: #34516d; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.signals-panel .social-post,.reset-posts .social-post) { background: #0b182c; border-color: #1b314a; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.signals-panel .social-post:hover,.reset-posts .social-post:hover) { background: #10233a; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.social-post .post-text,.social-post .post-author,.social-post .post-platform) { color: #dbeafa; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.social-post .post-handle,.social-post .post-published,.social-post .post-translation-label,.social-post .post-state-note,.social-post .verification-note,.social-post .data-credit,.social-post .post-bottom) { color: #93acc7; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .social-post .signal-badge { color: #9eb7d1; border-color: #38516c; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.social-post .kind-planned,.social-post .kind-hint,.social-post .kind-watch) { color: #e6c28f; border-color: #6d5437; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.social-post .kind-reported_completed,.social-post .kind-reset) { color: #87e0dc; border-color: #306267; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .social-post .kind-banked { color: #eac094; border-color: #6b5239; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .social-post .kind-limits { color: #c1b0ed; border-color: #574678; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .social-post .post-original { color: #76d3fb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .social-post .post-original p { color: #b1c9e2; background: #11283f; border-color: #3a6c90; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .social-post .post-source { color: #6acdf5; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.post-summary,.source-avatar,.source-radar,.tool-symbol) { color: #a6d4ee; background: #15314a; border-color: #2b4a64; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.probability-block > span,.probability > span,.forecast-explanation p,.timeline-date,.timeline-copy p,.countdown > span > small,.countdown-caption,.usage-row,.usage-row strong,.usage-caption,.personal-description code,.personal-footer,.source-row small,.source-health,.source-health strong,.source-health-note,.mini-index) { color: #92afcb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.probability strong,.countdown > span,.timeline-copy strong,.source-row strong) { color: #b6e6ff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.probability-track,.usage-track) { background: #1d354c; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.probability-track > span,.usage-track > span) { background: #55bfe9; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .probability-block + .probability-block .probability-track > span { background: #ad97ee; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .usage-track > .usage-high { background: #edbb7f; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .countdown > i { color: #466680; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-footer,.source-row,.model-factor) { border-color: #233d57; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .timeline-item:not(:last-child)::before { background: #284862; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .timeline-dot { background: #61d9fc; box-shadow: 0 0 0 3px #173b54, 0 0 10px #2ac9ff45; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.timeline-link,.source-row > a) { color: #77c7ea; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .developer-card { background: #15213b; border-color: #31496a; color: #d0e5fb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .developer-card h3 { color: #dae8fa; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .developer-card p { color: #9eb4d2; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .developer-icon { color: #739dc6; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.model-comparison td,.model-factor-meta,.factor-original) { color: #abc2da; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .factor-delta { color: #d7b998; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.empty-state h3,.compact-empty p,.prompts-empty h2) { color: #a2bfd9; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.empty-state p,.compact-empty small,.prompts-empty p) { color: #91a9c2; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.empty-radar,.compact-empty > span) { color: #5286a7; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.site-footer,.site-footer > div > span) { color: #819ab7; border-color: #20334c; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .site-footer > span strong { color: #b1c7de; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .site-footer a { color: #a5cbe6; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-dialog,.prompt-copy-dialog) { background: #102239; color: #e1edf9; border-color: #375670; box-shadow: 0 24px 90px #00000080; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-dialog,.prompt-copy-dialog)::backdrop { background: #010712b8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-dialog h2,.prompt-copy-dialog-heading h2) { color: #e1f2ff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-dialog label,.personal-dialog label > span,.personal-dialog form > p,.dialog-note,.personal-dialog .weekly-option > span,.prompt-copy-dialog > p) { color: #a2bdd7; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.personal-dialog input,.prompt-copy-dialog textarea,.percent-input) { color: #e1efff; background: #09192c; border-color: #355571; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .personal-dialog .weekly-option input { accent-color: #53cafa; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .personal-dialog input:focus { border-color: #65cbf4; box-shadow: 0 0 0 3px #1b435b; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .dialog-note { background: #163048; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .form-error { color: #ffb9b3 !important; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .toast { background: #163951; color: #e0f5ff; border: 1px solid #3f7191; box-shadow: 0 10px 35px #0008; }
html[data-theme="midnight"] body:not([data-page="tibo"]) p code { background: #19334d; color: #bedef8; }
/* Extension surfaces: API reference and the existing prompt/animation page. */
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.api-intro p,.api-base > span,.api-code-shell p,.endpoint-description p,.contract-table th,.compatibility-links span,.principle p,.attribution-panel p,.prompts-intro p,.prompts-guide li,.prompts-guide > p,.prompt-meaning,.prompt-copy-row > span,.prompt-answer-content p,.prompt-answer-content [data-prompt-checkpoint]) { color: #a0b9d2; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.api-base,.api-code-shell,.integration-code,.prompt-text,.prompt-answer,.prompt-answer-content,.prompts-empty) { background: #09192d; border-color: #213c57; color: #b8d8f3; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.api-base > code,.api-code-shell pre,.integration-code,.endpoint-title code,.endpoint-description strong,.contract-table td,.contract-table td:first-child,.compatibility-links code,.principle h3,.prompt-card-heading h2,.prompt-answer-content h3) { color: #bddbf3; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.code-heading,.code-heading > span > .mono,.code-copy,.principle > span,.prompt-number) { color: #83a7c8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.endpoint,.contract-table th,.contract-table td,.principle,.attribution-panel,.prompts-guide > p,.code-heading) { border-color: #223c56; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .http-method { background: #143e50; color: #8bdbf8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .endpoint-row { border-color: #213b54; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .code-copy { color: #c3e2f7; background: #17334a; border-color: #3c617a; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .code-copy:hover { background: #234b67; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .api-code-shell p > a { color: #7fd9f8; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .compatibility-links > a { background: #10273e; border-color: #2a4760; color: #b2d2eb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .compatibility-links > a:hover { background: #183a53; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.prompt-category,.prompts-count,.prompts-symbol) { background: #13304a; color: #a8cde8; border-color: #2e506b; }
html[data-theme="midnight"] body:not([data-page="tibo"]) :is(.prompt-answer > summary,.prompt-answer[open] > summary) { color: #a8d9f2; background: #10273f; border-color: #24445e; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .prompt-answer > summary:hover { color: #d9f3ff; background: #193952; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .prompt-text { color: #cce6ff; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .animation-showcase { border-color: #29455f; background: #0d2037; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .pelican-demo { background: #0b182c; border-color: #203650; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .pelican-demo-header h2 { color: #e1effb; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .pelican-demo-header p { color: #a0b9d2; }
html[data-theme="midnight"] body:not([data-page="tibo"]) .pelican-stage { background: #10253d; border-color: #203b56; }
@media (max-width: 1100px) {
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric { min-height: 190px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability { min-height: 222px; }
}
@media (max-width: 580px) {
    html[data-theme="midnight"] body:not([data-page="tibo"]) .page-heading { padding: 22px 18px; min-height: 0; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .page-heading h1 { font-size: 26px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-summary-grid { gap: 10px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric { padding: 17px 14px; min-height: 140px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability { grid-column: 1 / -1; min-height: 225px; padding-top: 16px; background-size: auto 260px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-probability .theme-metric-value { margin-top: 73px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-personal { grid-column: 1 / -1; min-height: 126px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric-note { font-size: 10px; }
    html[data-theme="midnight"] body:not([data-page="tibo"]) .calendar-day { min-height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
    html[data-theme="midnight"] body:not([data-page="tibo"]) .theme-metric { transition: none; }
}
