:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f3f5f9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

.shell {
    width: min(100% - 2rem, 960px);
    margin: 0 auto;
    padding: 2rem 0;
}

.auth-card {
    width: min(100%, 440px);
    margin: 8vh auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid #e1e6ef;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgb(22 34 56 / 8%);
}

h1 {
    margin-top: 0;
    font-size: 1.65rem;
}

.muted {
    color: #5e687b;
}

label {
    display: block;
    margin: 1rem 0 .4rem;
    font-weight: 650;
}

input {
    width: 100%;
    padding: .7rem .75rem;
    border: 1px solid #b9c3d2;
    border-radius: 6px;
    font: inherit;
}

input[type="checkbox"] {
    width: auto;
    margin-right: .4rem;
}

button {
    margin-top: 1.3rem;
    padding: .72rem 1rem;
    border: 0;
    border-radius: 6px;
    background: #2456c4;
    color: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

textarea,
select {
    width: 100%;
    padding: .7rem .75rem;
    border: 1px solid #b9c3d2;
    border-radius: 6px;
    font: inherit;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem 1rem;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.section-gap {
    margin-top: 1rem;
}

[hidden] {
    display: none !important;
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    padding: .7rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e1e6ef;
}

.notice {
    padding: .75rem;
    border-radius: 6px;
    background: #eaf7ed;
    color: #205b2b;
}

nav a,
header a {
    color: #2456c4;
}

.workspace-links {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.25rem;
}

.workspace-links a {
    padding: .7rem 1rem;
    border: 1px solid #d5deeb;
    border-radius: 6px;
    text-decoration: none;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1.25rem;
}

.pagination a,
.pagination strong {
    padding: .45rem .7rem;
    border: 1px solid #d5deeb;
    border-radius: 6px;
    text-decoration: none;
}

.pagination strong {
    background: #2456c4;
    color: #fff;
}

.code-input,
.json-output {
    width: 100%;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9rem;
}

.article-content {
    max-height: 70vh;
    overflow: auto;
    padding: 1rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f7f8fb;
    border: 1px solid #e1e6ef;
    border-radius: 6px;
    font: .95rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.comparison-grid h2 {
    font-size: 1.15rem;
}

.issue {
    padding: .8rem 0;
    border-bottom: 1px solid #e1e6ef;
}

.json-output {
    padding: 1rem;
    background: #f3f5f9;
    border-radius: 6px;
}

.alert {
    padding: .75rem;
    border-radius: 6px;
    background: #fff1f0;
    color: #922b21;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.panel {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e1e6ef;
    border-radius: 10px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: .8rem;
}

.metric-card {
    display: flex;
    min-height: 110px;
    flex-direction: column;
    justify-content: center;
    gap: .35rem;
    padding: 1rem;
    border: 1px solid #e1e6ef;
    border-radius: 8px;
    background: #fff;
}

.metric-card span,
.metric-card small {
    color: #5e687b;
}

.metric-card strong {
    font-size: 1.65rem;
}

.section-heading,
.calendar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.calendar-heading h2 {
    margin: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #e1e6ef;
    border-left: 1px solid #e1e6ef;
}

.calendar-weekday {
    padding: .6rem .4rem;
    text-align: center;
    font-weight: 700;
    border-right: 1px solid #e1e6ef;
    border-bottom: 1px solid #e1e6ef;
}

.calendar-day {
    min-height: 110px;
    padding: .4rem;
    overflow: hidden;
    border-right: 1px solid #e1e6ef;
    border-bottom: 1px solid #e1e6ef;
}

.calendar-outside {
    color: #8892a2;
    background: #f7f8fb;
}

.calendar-event {
    display: block;
    margin-top: .35rem;
    padding: .35rem;
    overflow-wrap: anywhere;
    border-radius: 4px;
    background: #edf2ff;
    font-size: .8rem;
    text-decoration: none;
}

.calendar-event small {
    display: block;
    color: #5e687b;
}

.calendar-published {
    background: #eaf7ed;
}

.calendar-failed {
    background: #fff1f0;
}

.article-image {
    display: block;
    width: min(100%, 640px);
    height: auto;
    margin: 1rem 0;
    border: 1px solid #e1e6ef;
    border-radius: 8px;
}

.secondary-button {
    margin: 0;
    background: #42516a;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .full {
        grid-column: auto;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .calendar-weekday {
        font-size: .72rem;
        overflow-wrap: anywhere;
    }

    .calendar-day {
        min-height: 82px;
        padding: .2rem;
        font-size: .82rem;
    }

    .calendar-event {
        padding: .2rem;
        font-size: .7rem;
    }
}
