:root {
    font:
        15px/1.55 system-ui,
        sans-serif;
    color: #243c35;
    background: #f5f6f2;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
header {
    padding: 18px 28px;
    background: #243c35;
    color: white;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
header a {
    color: white;
}
main {
    max-width: 1320px;
    margin: 28px auto;
    padding: 0 24px;
}
nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
section,
.card {
    background: white;
    border: 1px solid #d7dfd8;
    border-radius: 8px;
    padding: 22px;
    margin: 18px 0;
}
h1 {
    font-size: 30px;
    margin: 0 0 8px;
}
h2 {
    font-size: 22px;
}
h3 {
    font-size: 18px;
}
p,
dd,
td {
    overflow-wrap: anywhere;
}
label {
    display: block;
    margin: 12px 0;
}
input,
textarea,
select,
button {
    font: inherit;
    border: 1px solid #b9c7bd;
    border-radius: 5px;
    padding: 9px;
}
input:not([type="checkbox"]):not([type="color"]),
select,
textarea {
    width: 100%;
    max-width: 640px;
    background: #fff;
}
textarea {
    min-height: 84px;
}
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 8px;
}
button {
    background: #245d47;
    color: white;
    cursor: pointer;
    margin: 4px 8px 4px 0;
}
button.secondary {
    background: white;
    color: #245d47;
}
button.danger {
    background: #903d34;
}
button:disabled {
    opacity: 0.55;
    cursor: wait;
}
a {
    color: #245d47;
}
[hidden] {
    display: none !important;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.metric {
    background: #f1f5ef;
    padding: 16px;
    border-radius: 6px;
}
.metric strong {
    display: block;
    font-size: 26px;
}
.muted,
small {
    color: #64766b;
}
#status {
    position: sticky;
    bottom: 0;
    background: #fff1d2;
    border: 1px solid #decda2;
    padding: 12px;
    z-index: 3;
}
#status:empty {
    display: none;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th,
td {
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #dce3dd;
    padding: 10px;
}
dt {
    font-weight: 600;
}
dd {
    margin: 0 0 12px;
    white-space: pre-wrap;
}
.scroll {
    overflow: auto;
}
pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f1f5ef;
    padding: 14px;
}
.field-row {
    border-bottom: 1px solid #e0e5df;
    padding: 8px 0;
}
.color-editor {
    display: flex;
    gap: 10px;
}
.color-picker {
    width: 50px;
    height: 44px;
}
.notice {
    border-left: 4px solid #a5883b;
    padding: 10px 16px;
    background: #fff9e9;
}
:focus-visible {
    outline: 3px solid #97ad50;
    outline-offset: 3px;
}
@media (max-width: 600px) {
    main {
        padding: 0 12px;
    }
    section {
        padding: 14px;
    }
    header {
        padding: 14px;
    }
    h1 {
        font-size: 25px;
    }
}

/* Shared columns keep controls aligned regardless of the label's length. */
form {
    max-width: 1040px;
}
label {
    display: grid;
    grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
    gap: 16px 28px;
    align-items: center;
    margin: 16px 0;
    line-height: 1.45;
}
label > input:not([type="checkbox"]):not([type="color"]),
label > select,
label > textarea,
label > .color-editor {
    width: 100%;
    max-width: none;
    min-width: 0;
}
input:not([type="checkbox"]):not([type="color"]),
select {
    min-height: 44px;
}
textarea {
    min-height: 100px;
    resize: vertical;
}
label > input[type="checkbox"] {
    justify-self: start;
    margin: 0;
}
nav a {
    padding: 9px 14px;
    border: 1px solid #b9c7bd;
    border-radius: 5px;
    text-decoration: none;
    background: white;
}
nav a[aria-current="page"] {
    background: #245d47;
    color: white;
    border-color: #245d47;
}
@media (max-width: 700px) {
    label {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        align-items: start;
    }
    nav a {
        padding: 9px 11px;
    }
}
