:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #172033;
    --muted: #657086;
    --line: #dfe4ec;
    --primary: #126a5f;
    --primary-dark: #0b4f47;
    --accent: #c35a2e;
    --danger: #b42318;
    --ok: #16794c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar,
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(18px, 4vw, 56px);
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.footer {
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    color: var(--muted);
}

.brand {
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
}

.nav,
.actions,
.admin-nav,
.inline-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 28px;
    align-items: center;
    min-height: 560px;
}

.hero h1,
.narrow h1 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    margin: 8px 0 18px;
}

.lead {
    font-size: 20px;
    color: var(--muted);
    max-width: 760px;
}

.eyebrow {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
}

.notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 14px 16px;
    color: #7c2d12;
}

.panel,
.card,
.auth {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(23, 32, 51, .04);
}

.hero-media {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 18px 50px rgba(23, 32, 51, .12);
}

.hero-media img {
    display: block;
    width: 100%;
    height: auto;
}

.grid {
    display: grid;
    gap: 18px;
    margin: 22px 0;
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
    align-items: start;
    margin-top: 26px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.section-head h1,
.auth h1,
.narrow h1 {
    margin-top: 0;
}

.metric span,
.card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.metric strong,
.card strong {
    display: block;
    font-size: 30px;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.button:hover,
button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.button.secondary,
button.secondary {
    background: #fff;
    color: var(--primary);
}

.button.small,
button.small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 14px;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
}

.check-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.check-row input {
    width: auto;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

textarea {
    resize: vertical;
}

.auth,
.narrow {
    max-width: 760px;
    margin: 40px auto;
}

.table-wrap {
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

.url-cell {
    max-width: 420px;
    overflow-wrap: anywhere;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.alert.success {
    background: #ecfdf3;
    color: var(--ok);
    border: 1px solid #abefc6;
}

.alert.error {
    background: #fef3f2;
    color: var(--danger);
    border: 1px solid #fecdca;
}

.checklist {
    padding-left: 20px;
}

pre,
code {
    background: #eef2f6;
    border-radius: 6px;
    padding: 2px 5px;
}

pre {
    overflow-x: auto;
    padding: 12px;
}

.admin-nav {
    margin-top: 24px;
}

.admin-nav a {
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-weight: 700;
}

.inline-form {
    min-width: 300px;
}

.inline-form input {
    max-width: 70px;
}

@media (max-width: 900px) {
    .hero,
    .split,
    .grid.three,
    .grid.four {
        grid-template-columns: 1fr;
    }

    .section-head,
    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .nav {
        width: 100%;
    }

    .nav a {
        padding: 4px 0;
    }

    .hero {
        min-height: auto;
        padding: 32px 0;
    }
}
