:root {
    color-scheme: light;
    --page: #f4f1ea;
    --surface: #ffffff;
    --ink: #202124;
    --muted: #626a73;
    --line: #d8ddd8;
    --primary: #126b5d;
    --primary-dark: #0c4f45;
    --accent: #b76e23;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--page);
    color: var(--ink);
}

a {
    color: var(--primary);
    font-weight: 700;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

.site {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

@supports (min-height: 100dvh) {
    body,
    .site {
        min-height: 100dvh;
    }
}

.site-header,
.site-footer {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.site-header {
    border-bottom: 1px solid var(--line);
}

.site-footer {
    border-top: 1px solid var(--line);
}

.bar,
.content,
.footer-inner {
    width: min(100% - 40px, 1040px);
    margin: 0 auto;
}

.bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.brand:hover,
.brand:focus {
    text-decoration: underline;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

.account-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-weight: 400;
    text-decoration: none;
}

.account-avatar {
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    object-fit: cover;
}

.account-link:hover .account-email,
.account-link:focus .account-email,
.account-link:hover .account-label,
.account-link:focus .account-label {
    text-decoration: underline;
}

.content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    align-content: start;
    align-items: start;
    gap: 40px;
    padding: 72px 0;
}

.primary-content,
.sidebar {
    align-self: start;
}

.sidebar {
    padding-top: 4px;
}

.menu-toggle {
    width: 34px;
    height: 34px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: #f8faf8;
}

.menu-toggle-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.panel {
    width: 100%;
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(32, 33, 36, 0.08);
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
}

.side-nav-link:hover,
.side-nav-link:focus {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.62);
}

.side-nav-link.active {
    border-color: var(--line);
    background: var(--surface);
    color: var(--primary-dark);
    box-shadow: 0 10px 28px rgba(32, 33, 36, 0.06);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 3rem;
    line-height: 1.04;
    font-weight: 850;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: 0;
}

p {
    max-width: 64ch;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.65;
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

button {
    font: inherit;
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
.button:focus {
    background: var(--primary-dark);
}

.button.secondary {
    border-color: var(--line);
    background: #ffffff;
    color: var(--ink);
}

.button.secondary:hover,
.button.secondary:focus {
    border-color: #b9c1ba;
    background: #f8faf8;
}

.meta {
    display: grid;
    gap: 10px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.meta p {
    margin: 0;
    font-size: 0.98rem;
}

.info-sections {
    display: grid;
    gap: 28px;
    margin-top: 32px;
}

.info-section {
    display: grid;
    gap: 14px;
}

.info-table {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    border-spacing: 0;
    background: #ffffff;
    overflow: hidden;
}

.info-table th,
.info-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.info-table tr:first-child th,
.info-table tr:first-child td {
    border-top: 0;
}

.info-table th {
    width: 1%;
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}

.info-table td {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.check-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: var(--ink);
    font-weight: 700;
}

.check-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.footer-inner {
    flex-wrap: wrap;
    padding: 22px 0;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 0.92rem;
}

.footer-brand {
    color: var(--muted);
    font-weight: 400;
    text-decoration: none;
}

.footer-brand:hover,
.footer-brand:focus {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .content {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 20px 0 40px 0;
    }

    .sidebar {
        order: -1;
        padding-top: 0;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .side-nav {
        display: none;
        margin-top: 8px;
    }

    .sidebar.menu-open .side-nav {
        display: grid;
    }

    .side-nav-link {
        justify-content: flex-start;
        text-align: left;
    }

    .account-email,
    .account-label {
        display: none;
    }

    .panel {
        padding: 26px;
    }

    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
        border-top: 0;
    }

    .info-table tr {
        display: block;
        padding: 12px 14px;
        border-top: 1px solid var(--line);
    }

    .info-table tr:first-child {
        border-top: 0;
    }

    .info-table th,
    .info-table td {
        padding: 0;
    }

    .info-table td {
        margin-top: 6px;
    }

    h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 400px) {
    .bar {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 18px 0;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Feed inspection uses the starter layout and palette. */
.inspection h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.ingest-form { display: grid; gap: 12px; margin-top: 28px; }
.ingest-form label { font-weight: 700; }
.ingest-form #feed-url { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font: inherit; }
.ingest-form button { justify-self: start; }
.ingest-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ingest-result { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 28px; }
.ingest-result h2 { font-size: 1.4rem; }
.ingest-result h3 { margin: 24px 0 12px; font-size: 1rem; }
.feed-fields { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 10px 18px; line-height: 1.5; }
.feed-fields dt { font-weight: 700; }
.feed-fields dd { margin: 0; overflow-wrap: anywhere; }
.request-url { overflow-wrap: anywhere; }
.inspection details { margin-top: 20px; }
.inspection summary { cursor: pointer; font-weight: 700; }
.inspection pre { padding: 14px; background: var(--page); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.8rem/1.6 ui-monospace, monospace; max-height: 32rem; overflow-y: auto; }
.item-samples { padding-left: 24px; }
.item-samples li { padding: 7px 0; overflow-wrap: anywhere; }
.item-samples li div { margin-top: 4px; font-size: .88rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 760px) {
    /* Navigation remains usable before JavaScript initializes. */
    .side-nav { display: grid; }
    .sidebar.menu-ready .side-nav { display: none; }
    .sidebar.menu-ready.menu-open .side-nav { display: grid; }
    .menu-toggle { display: none; }
    .menu-toggle.menu-ready { display: inline-flex; }
    .feed-fields { grid-template-columns: 1fr; gap: 3px; }
    .feed-fields dd { margin-bottom: 10px; }
}

.footer-build { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
