/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Backgrounds */
    --bg-page:    #f6f3ef;
    --bg-surface: #fdfcfa;
    --bg-raised:  #efebe4;
    --bg-subtle:  #e8e2d8;
    --bg-code:    #1c2130;

    /* Accent — burnt copper */
    --accent:       #c84b0e;
    --accent-hover: #a33c09;
    --accent-light: #e8601a;

    /* Signal blue for links */
    --steel:     #2055a0;
    --steel-dim: #184080;

    /* Text */
    --text:       #1c1e27;
    --text-dim:   #5c6178;
    --text-muted: #8a8fa8;
    --text-code:  #c8d8e0;

    /* Borders */
    --border:        #ddd7ce;
    --border-strong: #c4bdb0;

    /* Status */
    --green: #2e7d55;
    --red:   #c42b2b;

    /* Geometry */
    --radius:    3px;
    --radius-md: 6px;

    /* Typography */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body:    'IBM Plex Sans', 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Layout */
    --nav-h: 56px;
    --max-w: 1120px;
}

html, body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

[id] { scroll-margin-top: var(--nav-h); }

a { color: var(--steel); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--accent-hover);
    background: var(--bg-raised);
    padding: 0.1em 0.35em;
    border-radius: 2px;
}

pre {
    font-family: var(--font-mono);
    background: var(--bg-code);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
}

pre code {
    font-size: 0.82rem;
    color: var(--text-code);
    background: none;
    padding: 0;
    border-radius: 0;
}

h1, h2 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--text);
    line-height: 1.2;
}

h3, h4, h5 {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

/* ── Layout ───────────────────────────────────────────────────────────── */
.ge-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ge-main { flex: 1; }

/* ── Navbar ───────────────────────────────────────────────────────────── */
.ge-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-strong);
    height: var(--nav-h);
}

.ge-navbar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ge-brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text) !important;
    text-decoration: none !important;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.ge-brand-logo {
    height: 28px;
    width: 28px;
    margin-right: 0.35rem;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.ge-nav-links {
    display: flex;
    gap: 0.1rem;
    align-items: center;
    flex-wrap: wrap;
}

.ge-nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.12s, background 0.12s;
    white-space: nowrap;
}

.ge-nav-links a:hover {
    color: var(--text);
    background: var(--bg-raised);
    text-decoration: none;
}

.ge-nav-links a.active {
    color: var(--accent);
    background: var(--bg-raised);
    font-weight: 600;
}

.ge-nav-links a.ge-nav-cta {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.ge-nav-links a.ge-nav-cta:hover {
    background: var(--accent-hover);
    color: #fff;
}

.ge-nav-links a.ge-nav-cta.active {
    background: var(--accent-hover);
    color: #fff;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.ge-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    margin-top: 5rem;
}

.ge-footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.ge-footer-sep { opacity: 0.5; }

.ge-footer-inner a { color: var(--text-muted); }
.ge-footer-inner a:hover { color: var(--text-dim); text-decoration: none; }

/* ── Page containers ──────────────────────────────────────────────────── */
.ge-page {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.ge-page-wide {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.ge-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.12s, color 0.12s, transform 0.08s;
    text-decoration: none !important;
    font-family: var(--font-body);
    letter-spacing: 0.01em;
}

.ge-btn:active { transform: scale(0.98); }

.ge-btn-primary {
    background: var(--accent);
    color: #fff;
}

.ge-btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.ge-btn-outline {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-strong);
}

.ge-btn-outline:hover {
    background: var(--bg-raised);
    color: var(--text);
    border-color: var(--border-strong);
}

/* ── Tables ───────────────────────────────────────────────────────────── */
.ge-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ge-table th {
    background: var(--bg-raised);
    color: var(--text);
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--border-strong);
    font-family: var(--font-body);
}

.ge-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.ge-table tr:last-child td { border-bottom: none; }
.ge-table tr:hover td { background: var(--bg-raised); }

.ge-table td.ge-check   { color: var(--green); font-weight: 600; }
.ge-table td.ge-cross   { color: var(--red); font-weight: 600; }
.ge-table td.ge-partial { color: var(--text-dim); }

.ge-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

/* ── Section label ────────────────────────────────────────────────────── */
.ge-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

/* ── Blazor error UI ──────────────────────────────────────────────────── */
#blazor-error-ui {
    background: #fff3f3;
    border-top: 2px solid var(--red);
    bottom: 0;
    color: var(--red);
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
}

#blazor-error-ui .reload { color: var(--accent); margin-left: 1rem; font-weight: 600; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; color: var(--text-muted); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .ge-brand { font-size: 1.1rem; }
    .ge-nav-links a { padding: 0.3rem 0.5rem; font-size: 0.82rem; }
    .ge-page { padding: 1.5rem 1rem; }
}

/* ── Docs layout ─────────────────────────────────────────────────────────── */
.docs-shell {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - var(--nav-h));
    align-items: start;
}

@media (max-width: 768px) {
    .docs-shell { grid-template-columns: 1fr; }
    .docs-sidebar { display: none; }
}

.docs-sidebar {
    position: sticky;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    padding: 2rem 0.75rem 2rem 1.25rem;
    border-right: 1px solid var(--border);
    background: var(--bg-surface);
}

.docs-sidebar-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.docs-sidebar a {
    display: block;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.28rem 0.5rem;
    border-radius: var(--radius);
    transition: color 0.1s, background 0.1s;
    text-decoration: none;
}

.docs-sidebar a:hover {
    color: var(--text);
    background: var(--bg-raised);
}

.docs-content {
    padding: 2.5rem 3rem 5rem;
    min-width: 0;
}

@media (max-width: 768px) {
    .docs-content { padding: 1.5rem 1rem 3rem; }
}

.docs-section {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

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

.docs-content h1 {
    font-size: 2rem;
    margin: 0.25rem 0 1rem;
}

.docs-content h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    padding-top: 0.25rem;
}

.docs-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem;
    color: var(--text);
}

.docs-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 1rem 0 0.5rem;
}

.docs-content p {
    color: var(--text-dim);
    line-height: 1.75;
    margin-bottom: 0.9rem;
    max-width: 68ch;
    font-size: 0.95rem;
}

.docs-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1rem;
}

.docs-list li {
    padding: 0.3rem 0 0.3rem 1.25rem;
    position: relative;
    color: var(--text-dim);
    font-size: 0.875rem;
    line-height: 1.65;
}

.docs-list li::before {
    content: "–";
    color: var(--accent);
    position: absolute;
    left: 0.1rem;
    font-weight: 700;
}

/* ── Code comment styling ──────────────────────────────────────────────── */
pre code .code-comment {
    color: #6a9a72;
    font-style: italic;
}
