:root {
    --ink: #12182a;
    --ink-soft: #5c6578;
    --paper: #f4f6fb;
    --card: #ffffff;
    --line: #e6e8f0;
    --navy: #131929;
    --brand: #4830e8;
    --brand-dark: #3a22d4;
    --blue: #5080f0;
    --teal: var(--brand);
    --teal-dark: var(--brand-dark);
    --amber: #b86e00;
    --amber-bg: #fff4df;
    --coral: #c4233a;
    --ok: #1f7a4d;
    --ok-bg: #e7f6ee;
    --shadow: 0 18px 40px rgba(19, 25, 41, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

a { color: var(--teal-dark); }

.admin {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--navy);
    color: #f4f6fb;
    padding: 28px 20px;
}

.brand {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 6px;
}

.brand span, .muted { color: #a8b0c2; font-weight: 500; }

.nav { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; }

.nav a {
    color: #f4f6fb;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
}

.nav a.active, .nav a:hover { background: rgba(255, 255, 255, 0.08); }

.main { padding: 32px 36px 64px; }

.topbar, .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.row h2 { margin: 0; }
.filters { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 8px; }
.filter-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; align-items: end; }
.filter-fields label { font-size: 0.86rem; }
.filter-fields input, .filter-fields select { width: 100%; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters + table { margin-top: 8px; }
.email-edit { margin-top: 16px; max-width: none; }
.email-edit textarea { width: 100%; min-height: 280px; line-height: 1.45; }
.email-body { margin-top: 8px; max-height: 360px; overflow: auto; line-height: 1.55; white-space: normal; padding-right: 8px; }

h1 { font-size: 1.8rem; margin: 0 0 6px; }

h2 { font-size: 1.15rem; margin: 0 0 12px; }

.sub { color: var(--ink-soft); margin: 0; }

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.metric, .card, .panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.metric { padding: 18px; }

.metric strong { display: block; font-size: 1.8rem; margin-top: 6px; }
.meter { display: block; height: 8px; margin: 10px 0 8px; border-radius: 999px; background: #e8eaf2; overflow: hidden; }
.meter i { display: block; height: 100%; background: #9d2c2c; border-radius: 999px; }
.meter-ok i { background: #1f7a4d; }
.pager { margin-top: 16px; }
.pager-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager-links { display: flex; gap: 6px; align-items: center; }
.pager-links a, .pager-current, .pager-disabled { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.pager-current { background: var(--ink); color: white; }
.pager-disabled { color: #a3abba; }

.metric span, .label { color: var(--ink-soft); font-size: 0.86rem; }

.panel { padding: 20px; margin-top: 18px; }
.campaign-tabs { display: flex; gap: 8px; margin-top: 18px; }
.campaign-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 650; }
.campaign-tabs a.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.send-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr); gap: 16px; align-items: start; }
.send-grid[hidden] { display: none; }
.send-grid > form { margin-top: 18px; max-width: none; }
td.linkish { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; }

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

th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.78rem;
    background: #eef0f6;
}

.badge.warn { background: #fde8e4; color: var(--coral); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.live { background: #ece8ff; color: var(--brand-dark); }

button, .button {
    background: var(--brand);
    color: white;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
button:hover, .button:hover { background: var(--brand-dark); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

button.secondary, .button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: var(--coral); }

form.inline { display: inline; }
button.compact { padding: 6px 10px; border-radius: 8px; font-size: 0.85rem; margin-top: 6px; }
.mail-error { display: block; max-width: 240px; }

.stack { display: grid; gap: 12px; max-width: 640px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
    font: inherit;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f7f8fc;
    accent-color: var(--brand);
}
.checks { display: grid; gap: 8px; font-weight: 500; }
.checks label, label.remember { display: flex; flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
label.remember input { width: 1.05rem; height: 1.05rem; margin: 0; padding: 0; flex: none; }
.error { color: var(--coral); font-size: 0.85rem; font-weight: 500; }
.flash { background: var(--ok-bg); color: var(--ok); padding: 12px 14px; border-radius: 12px; margin: 12px 0; }

.public {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(80, 128, 240, 0.18), transparent 28%),
        radial-gradient(circle at 82% 78%, rgba(72, 48, 232, 0.2), transparent 32%),
        var(--navy);
    padding: 32px 16px 64px;
}

.sheet { max-width: 760px; margin: 0 auto; }

.banner {
    background: var(--amber-bg);
    border: 1px solid #efd3a2;
    color: #6d4300;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.card { padding: 28px; }

.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-weight: 500; }
.question { margin-top: 18px; }
.wrong { background: #fde8e4; }
.right { background: var(--ok-bg); }
.result-row { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin-top: 18px; background: #fff; }
.answer-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 12px; }
.answer-box { border-radius: 10px; padding: 16px 18px; }
.answer-box span { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.answer-box p { margin: 8px 0 0; font-weight: 600; line-height: 1.45; }
.answer-gap { margin: 4px 0 14px; color: var(--coral); font-weight: 700; }
@media (max-width: 700px) {
    .answer-compare { grid-template-columns: 1fr; }
}

.linkish { word-break: break-all; font-size: 0.82rem; }

.login-wrap { max-width: 420px; margin: 10vh auto; }

.hr-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 16%, rgba(80, 128, 240, 0.2), transparent 26%),
        radial-gradient(circle at 88% 84%, rgba(72, 48, 232, 0.22), transparent 30%),
        radial-gradient(circle at 70% 12%, rgba(80, 128, 240, 0.08), transparent 18%),
        var(--navy);
}
.hr-bar { background: transparent; color: #f4f6fb; }
.hr-bar-inner { display: flex; justify-content: space-between; align-items: center; padding: 22px 0 0; }
.numera-lockup { display: flex; align-items: center; gap: 12px; }
.numera-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #6a93ff, #3d63f0);
    box-shadow: 0 8px 18px rgba(61, 99, 240, 0.35);
}
.hr-brand, .hr-brand-sub, .hr-ref { margin: 0; }
.hr-brand { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hr-brand-sub, .hr-ref { color: #b7c0d4; font-size: 0.82rem; }
.hr-main { padding: 12px 20px 48px; }
.hr-doc {
    background: #fff;
    border: 0;
    border-radius: 28px;
    padding: 36px 44px 32px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}
.hr-kicker { margin: 22px 0 8px; color: var(--brand); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hr-doc h1 { font-size: 1.65rem; line-height: 1.25; margin: 0 0 22px; }
.hr-progress { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.86rem; font-weight: 650; }
.hr-progress-track { height: 6px; margin: 0 0 18px; border-radius: 999px; background: #e7e9f2; overflow: hidden; }
.hr-progress-track i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.js .hr-steps > .hr-step:not(.is-current) { display: none; }
.hr-step-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hr-step-nav button:last-child { margin-left: auto; }
.hr-alert { margin: 0 0 18px; }
.hr-alert h1 { margin-bottom: 8px; }
.hr-alert .hr-kicker { margin: 0 0 8px; }
.hr-alert .hr-lead { margin: 0 0 16px; font-weight: 700; }
.hr-alert .hr-list { margin: 8px 0 16px; }
.hr-alert p:last-child { margin-bottom: 0; }
.hr-story { font-size: 1.05rem; line-height: 1.55; }
.hr-story h1 { font-size: 2rem; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 10px; }
.hr-story .hr-kicker { margin-bottom: 12px; }
.hr-story .hr-lead { margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 1.08rem; line-height: 1.4; }
.hr-story p { margin: 0 0 12px; }
.hr-story .hr-hello { margin-bottom: 4px; font-weight: 650; }
.hr-story .hr-breath { margin: 0 0 18px; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.hr-story .hr-turn { margin-top: 4px; font-weight: 650; }
.hr-story .hr-could { margin-bottom: 8px; color: var(--ink-soft); }
.hr-story .hr-list { margin: 0 0 20px; padding: 14px 18px 14px 2.2rem; border-radius: 14px; background: #f4f6fb; }
.hr-story .hr-list li { margin: 7px 0; line-height: 1.4; }
.hr-story .hr-aside { margin-bottom: 4px; }
.hr-story .hr-aside + .hr-reassure { margin-top: 16px; }
.hr-story .hr-reassure { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-soft); font-style: italic; line-height: 1.5; }
.hr-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; margin: 0 0 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hr-meta div { margin: 0; }
.hr-meta-wide { grid-column: 1 / -1; }
.hr-meta dt { color: var(--ink-soft); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hr-meta dd { margin: 2px 0 0; font-weight: 600; }
.hr-panel { margin: 0 0 16px; padding: 22px 24px; border-radius: 12px; background: #f5f7fb; }
.hr-panel h2 { margin: 0 0 8px; }
.hr-panel p:last-child, .hr-panel .button { margin-bottom: 0; }
.hr-panel-warn { background: #fde8e4; }
.hr-panel-ok { background: var(--ok-bg); }
.hr-list { margin: 0; padding-left: 1.15rem; }
.hr-list li { margin: 8px 0; line-height: 1.45; }
.hr-checks { list-style: none; padding-left: 0; }
.hr-checks li { position: relative; padding-left: 1.7rem; }
.hr-checks li::before { content: "✅"; position: absolute; left: 0; top: 0; }
.hr-takeaway { margin-top: 28px; }
.hr-takeaway .hr-punch { margin: 14px 0; }
.hr-helpful { margin-top: 16px; }
.hr-helpful .hr-step-nav { display: flex; }
.hr-helpful .hr-step-nav button:last-child { margin-left: 0; }
.hr-punch { margin: 8px 0 0; font-size: 1.25rem; font-weight: 700; }
.hr-callout { margin: 12px 0 0; font-style: italic; font-weight: 650; }
.hr-callout + .hr-callout { margin-top: 4px; }
.hr-note { color: var(--ink-soft); }
.hr-foot { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.82rem; }
.hr-signoff { margin-top: 28px; }
.hr-doc .question { border: 0; margin: 22px 0 0; padding: 0; }
.hr-doc legend { font-weight: 700; padding: 0; }
.hr-doc legend span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: 8px; border-radius: 999px; background: var(--brand); color: white; font-size: 0.85rem; }
.hr-doc .choice { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; line-height: 1.4; }
.report-channels { margin-top: 12px; }
.report-channels[hidden] { display: none; }
.report-details { margin-top: 12px; }
.report-details summary { width: fit-content; list-style: none; cursor: pointer; }
.report-details summary::-webkit-details-marker { display: none; }
.report-choices { margin-top: 14px; max-width: 420px; }
.report-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; max-width: 420px; }
.report-yesno .choice { margin-top: 0; align-items: center; }
.hr-doc .stack input, .hr-doc form.stack > button, .login-wrap button { width: 100%; }

@media (max-width: 900px) {
    .admin { grid-template-columns: 1fr; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .main { padding: 20px; }
    .hr-meta { grid-template-columns: 1fr; }
    .hr-doc { padding: 24px 18px; }
    .filter-fields { grid-template-columns: 1fr 1fr; }
    .send-grid { grid-template-columns: 1fr; }
}
