:root {
    --bg: #f4efe7;
    --bg-accent: #e5ddd2;
    --surface: rgba(255, 252, 247, 0.88);
    --surface-strong: #fffaf2;
    --text: #1d1a17;
    --muted: #5c544d;
    --line: rgba(29, 26, 23, 0.12);
    --accent: #b6462f;
    --accent-dark: #8e321e;
    --success: #24553c;
    --error: #8f2430;
    --shadow: 0 20px 60px rgba(56, 34, 17, 0.12);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --content-width: 1100px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(182, 70, 47, 0.16), transparent 28%),
        radial-gradient(circle at right 20%, rgba(36, 85, 60, 0.12), transparent 24%),
        linear-gradient(180deg, var(--bg), #efe8dc);
}

.demo-shell {
    padding: 32px 20px 48px;
}

.page {
    width: min(100%, var(--content-width));
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.hero-card,
.info-card,
.api-card,
.result-header,
.status-card,
.repo-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 36px;
    border-radius: var(--radius-xl);
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 12ch;
    margin-bottom: 16px;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

h2 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.lead {
    max-width: 70ch;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.search-panel {
    margin-top: 28px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid rgba(29, 26, 23, 0.08);
}

.field-label,
.example-label {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 700;
}

.input-row {
    display: flex;
    gap: 12px;
}

input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 15px 16px;
    border-radius: 14px;
    border: 1px solid rgba(29, 26, 23, 0.18);
    background: #fff;
    color: var(--text);
    font: inherit;
}

input[type="text"]:focus {
    outline: 2px solid rgba(182, 70, 47, 0.2);
    border-color: var(--accent);
}

button,
.secondary-link {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 15px 18px;
    font: inherit;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

button {
    cursor: pointer;
    background: var(--accent);
    color: #fff8f2;
    font-weight: 700;
}

button:hover,
.secondary-link:hover {
    transform: translateY(-1px);
}

button:active,
.secondary-link:active {
    transform: translateY(0);
}

.helper-text {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.example-block {
    margin-top: 22px;
}

.chip-row,
.branch-list,
.meta-row,
.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(29, 26, 23, 0.14);
    padding: 11px 14px;
}

.info-grid,
.results-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.repo-card {
    min-width: 0;
    padding: 24px;
    border-radius: var(--radius-lg);
}

.api-card,
.result-header,
.status-card {
    padding: 26px 28px;
    border-radius: var(--radius-xl);
}

.api-card {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
}

.code-panel {
    display: grid;
    gap: 10px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: #201b18;
}

.code-panel code {
    color: #f6ede0;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.result-page {
    gap: 18px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.secondary-link {
    border: 1px solid rgba(29, 26, 23, 0.14);
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
}

.status-card {
    color: var(--muted);
}

.status-card.success {
    color: var(--success);
}

.status-card.error {
    color: var(--error);
}

.repo-card h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.meta-row {
    margin-bottom: 16px;
}

.meta-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(29, 26, 23, 0.06);
    color: var(--muted);
    font-size: 0.88rem;
}

.branch-list {
    min-width: 0;
    flex-direction: column;
    gap: 12px;
}

.branch-item {
    min-width: 0;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(29, 26, 23, 0.04);
    border: 1px solid rgba(29, 26, 23, 0.06);
    overflow: hidden;
}

.branch-item strong,
.branch-item code {
    display: block;
    min-width: 0;
}

.branch-item strong {
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

code {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hidden {
    display: none;
}

@media (max-width: 920px) {
    .info-grid,
    .results-grid,
    .api-card {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .demo-shell {
        padding-inline: 14px;
    }

    .hero-card,
    .api-card,
    .result-header,
    .status-card,
    .info-card,
    .repo-card {
        padding: 20px;
    }

    .input-row {
        flex-direction: column;
    }

    h1 {
        max-width: none;
        font-size: 2.4rem;
    }
}
