* {
    box-sizing: border-box;
}

:root {
    --bg: #111111;
    --panel: #202020;
    --panel-soft: #282828;
    --text: #ffffff;
    --muted: #aaaaaa;
    --accent: #5c5cff;
    --accent-2: #7c7cff;
    --success: #1f6d3a;
    --error: #70262b;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    padding: 24px;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.shell {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.shell.narrow {
    max-width: 560px;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.brand.centred {
    justify-content: center;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-2)
        );
    color: white;
    font-size: 34px;
    font-weight: 900;
    box-shadow:
        0 10px 30px rgba(0,0,0,.3);
}

.brand h1 {
    margin: 0;
    font-size: 28px;
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
}

.card {
    margin-bottom: 18px;
    padding: 22px;
    background: var(--panel);
    border-radius: 18px;
    box-shadow:
        0 8px 28px rgba(0,0,0,.30);
}

.card h2 {
    margin-top: 0;
}

.lead {
    color: #cccccc;
    line-height: 1.55;
}

label {
    display: block;
    margin: 16px 0 7px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #3b3b3b;
    border-radius: 11px;
    background: #151515;
    color: white;
    font-size: 16px;
}

button,
.button,
.secondary-button {
    display: inline-block;
    border: 0;
    border-radius: 11px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

button,
.button {
    width: 100%;
    margin-top: 18px;
    background: var(--accent);
    color: white;
    text-align: center;
}

.secondary-button {
    background: #3b3b3b;
    color: white;
}

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

.notice.error {
    background: var(--error);
    color: #ffd6d9;
}

.notice.success {
    background: var(--success);
    color: #d9ffe4;
}

.info-grid,
.choice-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.info-grid > div,
.choice {
    padding: 16px;
    border-radius: 12px;
    background: var(--panel-soft);
}

.info-grid span,
.choice span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.info-grid strong,
.choice strong {
    display: block;
}

.choice strong {
    margin-bottom: 7px;
    font-size: 17px;
}

.centred-text {
    text-align: center;
}

@media (max-width: 640px) {

    body {
        padding: 16px;
    }

    .topbar {
        align-items: flex-start;
    }

    .info-grid,
    .choice-grid {
        grid-template-columns: 1fr;
    }

    .brand h1 {
        font-size: 23px;
    }
}


/* Program setup additions */

.field-help {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.settings-block {
    margin-top: 24px;
    padding: 18px;
    background: #181818;
    border-radius: 14px;
}

.settings-block h3 {
    margin: 0 0 10px;
}

.toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    margin: 0;
    border-bottom: 1px solid #303030;
}

.toggle-row:last-child {
    border-bottom: 0;
}

.toggle-row input {
    width: 21px;
    height: 21px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.toggle-row span {
    display: block;
}

.toggle-row strong,
.toggle-row small {
    display: block;
}

.toggle-row small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: normal;
    line-height: 1.4;
}

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

.choice-link,
.choice-link:visited,
.choice-link:hover,
.choice-link:active {
    color: #fff;
    text-decoration: none;
}

.choice-link {
    display: block;
    transition:
        transform .15s ease,
        background .15s ease;
}

.choice-link:hover {
    transform: translateY(-2px);
    background: #333;
}

.choice-link strong {
    color: #fff;
}

.choice-link span {
    color: #aaa;
}

.choice-link b {
    display: block;
    margin-top: 14px;
    color: #ff69b4;
    font-size: 13px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.status-pill {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    background: #1f6d3a;
    color: #d9ffe4;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

@media (max-width: 780px) {
    .choice-grid.three {
        grid-template-columns: 1fr;
    }
}
