:root {
    --header-h: 122px;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}
.header {
    width: 100%;
    background-color: #0056b3;
    color: #fff;
    padding: 1rem;
    text-align: left;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    border-bottom: 1px solid #0056b3;
}
.header img {
    height: 90px;
    width: auto;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 10px;
}
.header span {
    font-size: 1rem;
}
.header .brand {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding-left: 0.25rem;
}
.signin-container {
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 150px;
    box-sizing: border-box;
}
.signin-container h1 {
    text-align: center;
    color: #2a2a2a;
    margin-bottom: 1rem;
}
.signin-container form {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    width: 100%;
    text-align: left;
}
.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.form-group input:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
}
.btn {
    background-color: #0056b3;
    color: #fff;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}
.btn:hover {
    background-color: #004494;
}
.signup-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    text-decoration: none;
    color: #1a1a1a;
}
.signup-link:hover {
    text-decoration: underline;
}

/* ── Hamburger menu + sidebar ─────────────────────────── */
.menu-btn {
    width: 42px;
    height: 42px;
    margin-right: 0.75rem;
    padding: 0;
    background: transparent;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.menu-btn:hover {
    background-color: #1a1a1a;
    border-color: #0056b3;
}
.menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
    transition: background-color 0.15s;
}
.menu-btn:hover span {
    background-color: #0056b3;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1500;
}
.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background-color: #0056b3;
    color: #fff;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}
.sidebar.open {
    transform: translateX(0);
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #0056b3;
}
.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ddd;
}
.sidebar-close {
    background: transparent;
    border: none;
    color: #ddd;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}
.sidebar-close:hover {
    color: #0056b3;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}
.sidebar-item {
    display: block;
    padding: 0.85rem 1.25rem;
    color: #e6e6e6;
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: background-color 0.12s, border-left-color 0.12s, color 0.12s;
}
.sidebar-item:hover {
    background-color: #2a2a2a;
    border-left-color: #0056b3;
    color: #fff;
}

/* ── Chat page ─────────────────────────────────────────── */
body.chat-page {
    display: block;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #f4f4f9;
}
body.chat-page .header {
    justify-content: space-between;
}
body.chat-page .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    padding-right: 0.25rem;
}
body.chat-page .header-user {
    color: #ddd;
    font-size: 0.9rem;
}
body.chat-page .header-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid #444;
    border-radius: 4px;
}
.model-picker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #ddd;
}
.model-picker-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
    color: #aaa;
}
.model-picker select {
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    max-width: 200px;
}
.model-picker select:focus {
    outline: none;
    border-color: #0056b3;
}
body.chat-page .header-link:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.chat-shell {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 1rem;
    box-sizing: border-box;
}
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}
.messages::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}
.scroll-bottom-btn {
    position: absolute;
    bottom: 100px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #0056b3;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}
.scroll-bottom-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.scroll-bottom-btn:hover {
    background-color: #004494;
}
.empty-state {
    color: #888;
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
}
.message {
    display: flex;
    width: 100%;
}
.message.user {
    justify-content: flex-end;
}
.message.assistant {
    justify-content: flex-start;
}
.bubble {
    max-width: 75%;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
}
.message.user .bubble {
    background-color: #0056b3;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.message.assistant .bubble {
    background-color: #fff;
    color: #2a2a2a;
    border: 1px solid #e3e3e8;
    border-bottom-left-radius: 4px;
}
.bubble.streaming::after {
    content: "▍";
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s steps(2) infinite;
    color: #0056b3;
}
@keyframes blink {
    50% { opacity: 0; }
}

.chat-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e3e3e8;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.chat-form-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.5rem 0.4rem;
}
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f0f0f4;
    border: 1px solid #d8d8e0;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.82rem;
    color: #2a2a2a;
    max-width: 220px;
}
.attachment-chip span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chip-remove {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.chip-remove:hover {
    color: #0056b3;
}
.chat-form textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.4rem 0.5rem;
    background: transparent;
    max-height: 240px;
    overflow-y: auto;
}
.chat-form .btn {
    width: auto;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 1px solid transparent;
}
.chat-form .btn-secondary {
    background-color: #fff;
    color: #555;
    border: 1px solid #ccc;
}
.chat-form .btn-secondary:hover {
    background-color: #f4f4f4;
    color: #0056b3;
    border-color: #0056b3;
}
.chat-form .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Landing page ──────────────────────────────────────── */
body.landing-page {
    display: block;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f4f4f9;
    color: #2a2a2a;
}
body.landing-page .header {
    justify-content: space-between;
}
body.landing-page .header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}
body.landing-page .header-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    white-space: nowrap;
}
body.landing-page .header-link:hover {
    background-color: #fff;
    color: #0056b3;
}
body.landing-page .header-link.solid {
    background-color: #fff;
    color: #0056b3;
    border-color: #fff;
    font-weight: 600;
}
body.landing-page .header-link.solid:hover {
    background-color: #e6eefb;
}

.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem;
    box-sizing: border-box;
}
.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0056b3;
    margin: 0 0 0.6rem;
}
.section-title {
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #12233b;
}
.section-lede {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #55606f;
    max-width: 60ch;
    margin: 0 0 2.5rem;
}

/* Hero */
.hero {
    position: relative;
    margin-top: var(--header-h);
    background: linear-gradient(135deg, #003a7a 0%, #0056b3 55%, #1a7fd4 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 75% 65% at 70% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 70% 40%, #000 20%, transparent 75%);
    z-index: -1;
    pointer-events: none;
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 1.5rem 5.5rem;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
    box-sizing: border-box;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.hero-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7cf3c4;
    box-shadow: 0 0 0 0 rgba(124, 243, 196, 0.7);
    animation: pulse-dot 2.2s ease-out infinite;
}
@keyframes pulse-dot {
    70% { box-shadow: 0 0 0 8px rgba(124, 243, 196, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 243, 196, 0); }
}
.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.08;
    margin: 0 0 1.1rem;
    letter-spacing: -0.02em;
}
.hero h1 .accent {
    background: linear-gradient(90deg, #9fe0ff, #7cf3c4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.hero-sub {
    font-size: 1.12rem;
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.86);
    max-width: 54ch;
    margin: 0 0 2rem;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.25rem;
}
.btn-hero {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-hero.primary {
    background: #fff;
    color: #0056b3;
    box-shadow: 0 6px 20px rgba(0, 20, 50, 0.28);
}
.btn-hero.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 20, 50, 0.36);
}
.btn-hero.ghost {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}
.btn-hero.ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}
.hero-modalities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}
.hero-modalities span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.hero-modalities span::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
}

/* Hero dot-cluster visual — echoes the logo mark */
.hero-visual {
    position: relative;
    aspect-ratio: 1;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}
.hero-visual svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.hero-visual .cluster-dot {
    fill: none;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.5;
    transform-box: fill-box;
    transform-origin: center;
    animation: float-dot 6s ease-in-out infinite;
}
.hero-visual .cluster-dot.filled {
    fill: rgba(124, 243, 196, 0.22);
    stroke: #7cf3c4;
}
.hero-visual .scan-line {
    stroke: rgba(159, 224, 255, 0.9);
    stroke-width: 2;
    animation: scan 4.5s ease-in-out infinite;
}
.hero-visual .link-line {
    stroke: rgba(255, 255, 255, 0.28);
    stroke-width: 1;
    stroke-dasharray: 4 5;
    animation: dash-drift 8s linear infinite;
}
@keyframes float-dot {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-7px) scale(1.05); }
}
@keyframes scan {
    0%, 100% { transform: translateY(-6%); opacity: 0; }
    15%, 85% { opacity: 1; }
    50%      { transform: translateY(106%); }
}
@keyframes dash-drift {
    to { stroke-dashoffset: -90; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-visual .cluster-dot,
    .hero-visual .scan-line,
    .hero-visual .link-line,
    .hero-pill .dot {
        animation: none;
    }
}

/* Modality cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.card {
    background: #fff;
    border: 1px solid #e3e3e8;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: #0056b3;
    box-shadow: 0 12px 28px rgba(0, 60, 130, 0.14);
}
.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0056b3, #1a7fd4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}
.card-icon svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.card h3 {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
    color: #12233b;
}
.card p {
    margin: 0 0 1rem;
    line-height: 1.6;
    color: #55606f;
    font-size: 0.95rem;
}
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
}
.tag {
    background: #eef3fb;
    color: #0056b3;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* How it works */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 1.5rem 1.25rem 1.25rem;
    background: #fff;
    border: 1px solid #e3e3e8;
    border-radius: 12px;
}
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: -14px;
    left: 1.25rem;
    background: #0056b3;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}
.step h3 {
    font-size: 1.02rem;
    margin: 0.35rem 0 0.4rem;
    color: #12233b;
}
.step p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #55606f;
}

/* Stats band */
.stats-band {
    background: #12233b;
    color: #fff;
}
.stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
    box-sizing: border-box;
}
.stat-value {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #9fe0ff, #7cf3c4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.35rem;
    line-height: 1.45;
}

/* CTA band */
.cta-band {
    background: linear-gradient(135deg, #0056b3, #003a7a);
    color: #fff;
    text-align: center;
}
.cta-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    box-sizing: border-box;
}
.cta-inner h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}
.cta-inner p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0 0 2rem;
}

/* Footer */
.site-footer {
    background: #0d1727;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}
.site-footer a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}
.site-footer a:hover {
    color: #fff;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Dashboard / docs ──────────────────────────────────── */
body.app-page {
    display: block;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f4f4f9;
    color: #2a2a2a;
}
body.app-page .header {
    justify-content: space-between;
}
body.app-page .header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-left: auto;
}
body.app-page .header-user {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}
body.app-page .header-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    white-space: nowrap;
}
body.app-page .header-link:hover {
    background-color: #fff;
    color: #0056b3;
}

.page-shell {
    max-width: 1000px;
    margin: 0 auto;
    padding: calc(var(--header-h) + 2.5rem) 1.5rem 4rem;
    box-sizing: border-box;
}
.page-head {
    margin-bottom: 2rem;
}
.page-head h1 {
    font-size: 1.9rem;
    margin: 0 0 0.4rem;
    color: #12233b;
    letter-spacing: -0.01em;
}
.page-head p {
    margin: 0;
    color: #55606f;
    line-height: 1.6;
}

.panel {
    background: #fff;
    border: 1px solid #e3e3e8;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}
.panel h2 {
    font-size: 1.15rem;
    margin: 0;
    color: #12233b;
}
.panel-sub {
    color: #55606f;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 1.25rem;
}
.panel-count {
    font-size: 0.82rem;
    color: #7a828f;
}

/* Notices */
.notice {
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    border: 1px solid;
}
.notice.info {
    background: #eef3fb;
    border-color: #cfe0f7;
    color: #14395f;
}
.notice.warn {
    background: #fff6e6;
    border-color: #ffdfa1;
    color: #6b4a05;
}
.notice.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.notice strong {
    font-weight: 700;
}

/* Key reveal */
.key-reveal {
    background: linear-gradient(135deg, #06305f, #0056b3);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    color: #fff;
}
.key-reveal h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}
.key-reveal p {
    margin: 0 0 0.85rem;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}
.key-copy {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.key-copy code {
    flex: 1;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 0.65rem 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    color: #d8f3ff;
}
.copy-btn {
    background: #fff;
    color: #0056b3;
    border: none;
    border-radius: 6px;
    padding: 0 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.copy-btn:hover {
    background: #e6eefb;
}
.copy-btn.copied {
    background: #7cf3c4;
    color: #06422c;
}

/* Key table */
.key-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.key-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border: 1px solid #e3e3e8;
    border-radius: 8px;
    background: #fbfbfd;
}
.key-row.revoked {
    opacity: 0.55;
}
.key-main {
    flex: 1;
    min-width: 180px;
}
.key-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #12233b;
}
.key-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    color: #55606f;
    margin-top: 0.15rem;
}
.key-meta {
    font-size: 0.78rem;
    color: #7a828f;
    line-height: 1.5;
    min-width: 150px;
}
.badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
}
.badge.active {
    background: #e3f7ee;
    color: #0a6b47;
}
.badge.revoked {
    background: #f0f0f4;
    color: #7a828f;
}
.btn-link-danger {
    background: transparent;
    border: 1px solid #e3b7bc;
    color: #a3323f;
    border-radius: 6px;
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
    cursor: pointer;
}
.btn-link-danger:hover {
    background: #f8d7da;
}
.key-empty {
    color: #7a828f;
    font-style: italic;
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
}

/* Inline create form */
.key-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid #ececf1;
}
.key-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.key-form input[type="text"]:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.12);
}
.btn-compact {
    background-color: #0056b3;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.btn-compact:hover {
    background-color: #004494;
}
.btn-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Code blocks */
.code-block {
    position: relative;
    background: #0d1727;
    border-radius: 8px;
    padding: 1rem 1.1rem;
    overflow-x: auto;
    margin: 0 0 1rem;
}
.code-block pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #d7e3f4;
    white-space: pre;
}
.code-block .c-key { color: #7cf3c4; }
.code-block .c-str { color: #9fe0ff; }
.code-block .c-com { color: #6c7a90; font-style: italic; }
.code-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a828f;
    font-weight: 700;
    margin: 0 0 0.4rem;
}

/* Endpoint / API links */
.endpoint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border: 1px solid #e3e3e8;
    border-radius: 8px;
    background: #fbfbfd;
    text-decoration: none;
    margin-bottom: 0.6rem;
    transition: border-color 0.15s, transform 0.15s;
}
.endpoint:hover {
    border-color: #0056b3;
    transform: translateX(2px);
}
.method {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #0056b3;
    color: #fff;
    letter-spacing: 0.04em;
}
.method.get { background: #0a6b47; }
.endpoint-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    color: #12233b;
    font-weight: 600;
}
.endpoint-desc {
    font-size: 0.85rem;
    color: #7a828f;
    margin-left: auto;
}

/* Plans */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}
.plan {
    border: 1px solid #e3e3e8;
    border-radius: 10px;
    padding: 1.4rem;
    background: #fbfbfd;
    display: flex;
    flex-direction: column;
}
.plan.featured {
    border-color: #0056b3;
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.12);
    background: #fff;
}
.plan-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #12233b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.plan-price {
    font-size: 1.9rem;
    font-weight: 700;
    color: #12233b;
    margin: 0.6rem 0 0.1rem;
    letter-spacing: -0.02em;
}
.plan-price.tbd {
    color: #b4bac4;
}
.plan-period {
    font-size: 0.8rem;
    color: #7a828f;
}
.plan-tagline {
    font-size: 0.88rem;
    color: #55606f;
    line-height: 1.55;
    margin: 0.75rem 0 1rem;
}
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    flex: 1;
}
.plan-features li {
    font-size: 0.86rem;
    color: #55606f;
    line-height: 1.5;
    padding-left: 1.35rem;
    position: relative;
    margin-bottom: 0.45rem;
}
.plan-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0056b3;
}
.plan .btn-compact {
    width: 100%;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --header-h: 80px;
    }
    .header {
        padding: 0.6rem 0.85rem;
    }
    .header img {
        height: 56px;
    }
    body.chat-page .header-actions {
        gap: 0.6rem;
    }
    .model-picker select {
        max-width: 130px;
    }
    .chat-shell {
        padding: 0 0.6rem 0.6rem;
    }
    .bubble {
        max-width: 85%;
    }
    .signin-container {
        margin-top: 110px;
    }
    .scroll-bottom-btn {
        bottom: 88px;
        right: 16px;
    }
    .hero-inner {
        grid-template-columns: 1fr;
        padding: 3rem 1.25rem 3.5rem;
        gap: 2.5rem;
    }
    .hero-visual {
        max-width: 300px;
        order: -1;
    }
    .section {
        padding: 3.25rem 1.25rem;
    }
}

@media (max-width: 480px) {
    :root {
        --header-h: 68px;
    }
    .header {
        padding: 0.5rem 0.6rem;
    }
    .header img {
        height: 44px;
    }
    body.chat-page .header-user {
        display: none;
    }
    body.chat-page .header-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    .messages {
        padding: 0.75rem 0;
        gap: 0.6rem;
    }
    .bubble {
        max-width: 90%;
        font-size: 0.9rem;
        padding: 0.6rem 0.85rem;
    }
    .chat-form {
        gap: 0.35rem;
        padding: 0.5rem;
        flex-wrap: wrap;
    }
    .chat-form-main {
        flex: 1 1 100%;
        order: -1;
    }
    .chat-form .btn {
        flex: 1 1 auto;
        padding: 0.55rem 0.6rem;
        font-size: 0.85rem;
    }
    .signin-container {
        margin: 90px 1rem 0;
        padding: 1.5rem;
    }
    body.landing-page .header-link {
        padding: 0.35rem 0.7rem;
        font-size: 0.82rem;
    }
    body.landing-page .header-link.ghost-sm {
        display: none;
    }
    .hero-visual {
        max-width: 230px;
    }
    .btn-hero {
        width: 100%;
        text-align: center;
    }
    .card {
        padding: 1.35rem;
    }
    .footer-inner {
        justify-content: center;
        text-align: center;
    }
}
