/* Brand-neutral browser notices for the public API service. */
:root {
    --ep-bg: #11120f;
    --ep-panel: #181a16;
    --ep-text: #f2f0e8;
    --ep-muted: #9da196;
    --ep-faint: #6f746a;
    --ep-line: #33372f;
    --ep-accent: #c7e36b;
    --ep-danger: #ed7a6d;
    --ep-warning: #e7b75f;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--ep-bg);
}

body.error-shell {
    min-height: 100vh;
    margin: 0;
    color: var(--ep-text);
    background-color: var(--ep-bg);
    background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255, 255, 255, 0.035) 25%);
    font-family: "Arial Nova", "Aptos", "Segoe UI", sans-serif;
    letter-spacing: 0;
}

code,
.entry-index,
.entry-label,
.entry-status,
.ep-badge {
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.entry-page {
    display: grid;
    width: min(1180px, calc(100% - 48px));
    min-height: 100dvh;
    margin: 0 auto;
    grid-template-rows: auto 1fr auto;
}

.entry-header,
.entry-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--ep-muted);
    font-size: 12px;
}

.entry-header {
    min-height: 80px;
    border-bottom: 1px solid var(--ep-line);
}

.entry-label {
    color: var(--ep-text);
    font-weight: 700;
}

.entry-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.entry-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ep-accent);
    box-shadow: 0 0 0 5px rgba(199, 227, 107, 0.1);
}

.entry-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.75fr);
    align-items: stretch;
}

.entry-copy,
.entry-flow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(48px, 6vh, 72px) 0;
}

.entry-copy {
    padding-right: clamp(48px, 8vw, 112px);
}

.entry-flow {
    border-left: 1px solid var(--ep-line);
    padding-left: clamp(32px, 5vw, 64px);
}

.entry-index {
    margin: 0 0 28px;
    color: var(--ep-accent);
    font-size: 11px;
    font-weight: 600;
}

.entry-copy h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(46px, 5.4vw, 72px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: 0;
    text-wrap: balance;
}

.entry-message {
    max-width: 590px;
    margin: 34px 0 0;
    color: var(--ep-muted);
    font-size: 17px;
    line-height: 1.7;
    text-wrap: pretty;
}

.entry-meta {
    display: grid;
    max-width: 590px;
    margin: 48px 0 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--ep-line);
    border-bottom: 1px solid var(--ep-line);
}

.entry-meta div { padding: 19px 0 21px; }

.entry-meta div + div {
    border-left: 1px solid var(--ep-line);
    padding-left: 24px;
}

.entry-meta dt {
    margin-bottom: 8px;
    color: var(--ep-faint);
    font-size: 11px;
}

.entry-meta dd {
    margin: 0;
    color: var(--ep-text);
    font-size: 14px;
    font-weight: 600;
}

.entry-meta code { color: var(--ep-accent); }

.entry-flow ol {
    position: relative;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.entry-flow ol::before {
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 19px;
    width: 1px;
    background: var(--ep-line);
    content: "";
}

.entry-flow li {
    position: relative;
    display: grid;
    min-height: 112px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.entry-flow li > span {
    display: grid;
    z-index: 1;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--ep-line);
    background: var(--ep-bg);
    color: var(--ep-accent);
    font: 11px "Cascadia Code", Consolas, monospace;
}

.entry-flow strong,
.entry-flow small { display: block; }

.entry-flow strong {
    margin: 1px 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.entry-flow small {
    color: var(--ep-muted);
    font-size: 13px;
    line-height: 1.55;
}

.entry-footer {
    min-height: 64px;
    border-top: 1px solid var(--ep-line);
}

/* Shared HTTP error layout. */
.ep-page {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: 32px 24px;
}

.ep-frame {
    display: grid;
    width: min(1100px, 100%);
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    border-top: 1px solid var(--ep-line);
    border-bottom: 1px solid var(--ep-line);
}

.ep-main,
.ep-side { padding: clamp(36px, 6vw, 72px); }

.ep-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid var(--ep-line);
    background: rgba(255, 255, 255, 0.018);
}

.ep-brand { margin-bottom: 42px; }

.ep-brand-text strong,
.ep-brand-text span,
.ep-side-title,
.ep-side-copy { display: block; }

.ep-brand-text strong,
.ep-side-title {
    color: var(--ep-text);
    font-size: 14px;
    font-weight: 600;
}

.ep-brand-text span,
.ep-side-copy,
.ep-status-text,
.ep-meta span {
    margin-top: 5px;
    color: var(--ep-muted);
    font-size: 12px;
}

.ep-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.ep-badge {
    padding: 6px 8px;
    border: 1px solid var(--ep-line);
    color: var(--ep-accent);
    font-size: 10px;
}

.ep-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ep-accent);
}

.error-shell--403,
.error-shell--500 { --ep-accent: var(--ep-danger); }

.error-shell--502,
.error-shell--503,
.error-shell--service { --ep-accent: var(--ep-warning); }

.ep-code {
    margin: 0 0 20px;
    color: var(--ep-accent);
    font: 500 clamp(76px, 11vw, 136px)/0.9 "Cascadia Code", Consolas, monospace;
}

.ep-main h1 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(34px, 4.5vw, 58px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: 0;
    text-wrap: balance;
}

.ep-message {
    max-width: 640px;
    margin: 24px 0 0;
    color: var(--ep-muted);
    font-size: 15px;
    line-height: 1.7;
}

.ep-meta {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    padding: 15px 0;
    border-top: 1px solid var(--ep-line);
    border-bottom: 1px solid var(--ep-line);
}

.ep-meta code {
    overflow-wrap: anywhere;
    color: var(--ep-text);
    font-size: 12px;
}

.ep-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.ep-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid var(--ep-line);
    border-radius: 2px;
    color: var(--ep-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.ep-button:hover,
.ep-button:focus-visible {
    border-color: var(--ep-accent);
    outline: none;
    transform: translateY(-1px);
}

.ep-button:active { transform: translateY(1px); }

.ep-button--primary {
    border-color: var(--ep-accent);
    background: var(--ep-accent);
    color: var(--ep-bg);
}

.ep-side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ep-signal {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--ep-line);
    color: var(--ep-accent);
    font: 600 13px "Cascadia Code", Consolas, monospace;
}

.ep-checklist {
    display: grid;
    gap: 18px;
    margin: 36px 0;
}

.ep-check {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    color: var(--ep-muted);
    font-size: 13px;
    line-height: 1.5;
}

.ep-check::before {
    color: var(--ep-accent);
    content: "/";
    font-family: "Cascadia Code", Consolas, monospace;
}

.ep-reference {
    padding-top: 22px;
    border-top: 1px solid var(--ep-line);
    color: var(--ep-faint);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 820px) {
    body.error-shell { background-image: none; }

    .entry-grid,
    .ep-frame { grid-template-columns: 1fr; }

    .entry-flow,
    .ep-side {
        border-top: 1px solid var(--ep-line);
        border-left: 0;
    }

    .entry-flow { padding-left: 0; }
    .entry-copy { padding-right: 0; }
}

@media (max-width: 520px) {
    .entry-page { width: min(100% - 32px, 1180px); }

    .entry-header,
    .entry-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .entry-copy,
    .entry-flow { padding: 54px 0; }
    .entry-copy h1 { font-size: 42px; }
    .entry-meta { grid-template-columns: 1fr; }

    .entry-meta div + div {
        border-top: 1px solid var(--ep-line);
        border-left: 0;
        padding-left: 0;
    }

    .ep-page { padding: 16px; }
    .ep-main,
    .ep-side { padding: 32px 24px; }
    .ep-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
