:root { color-scheme: light; font-family: system-ui, "Nirmala UI", sans-serif; color: #251c2b; background: #fffaf6; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #35223b; color: #fff5eb; }
nav, main, footer { width: min(100% - 2rem, 68rem); margin: auto; }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
nav a { color: inherit; }
nav a:first-child { font-size: 1.35rem; font-weight: 750; }
a { color: #652a62; text-underline-offset: .2em; }
main { min-height: 75vh; padding: 2rem 0; }
.hero { background: #f1e0ef; padding: clamp(1.4rem, 5vw, 4rem); border-radius: 1rem; margin-bottom: 1.4rem; }
h1 { font-size: clamp(1.8rem, 6vw, 3.3rem); margin: 0 0 .7rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.card, .reading, form { background: #fff; border: 1px solid #eedde8; border-radius: 1rem; padding: clamp(1rem, 3vw, 2rem); }
.card h2 { margin: .3rem 0; }
small, time { color: #774870; font-weight: 650; }
.reading, form { max-width: 46rem; margin: 0 auto 1.25rem; }
.reading p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.95; font-size: 1.12rem; }
label { display: grid; gap: .45rem; margin-bottom: 1rem; font-weight: 650; }
input, textarea, select { font: inherit; width: 100%; border: 1px solid #aa8da5; border-radius: .4rem; padding: .65rem; color: inherit; background: #fff; }
button { cursor: pointer; background: #652a62; color: white; padding: .7rem 1rem; border-radius: .5rem; border: 0; font: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
footer { padding: 1rem 0 2rem; color: #774870; }
.language-links { width: 100%; justify-content: flex-start; gap: 1rem; flex-wrap: wrap; padding: 0; }
.language-links a, .language-links a:first-child { color: #652a62; font-size: 1rem; font-weight: 650; }
.checkbox { display: flex; align-items: center; }
.checkbox input { width: auto; }
button { min-height: 44px; }
@media (max-width: 38rem) {
    main { padding-top: 1.25rem; }
    form .actions > button { flex: 1 1 100%; }
    textarea[name="body"] { min-height: 13rem; }
}

.settings-page { max-width: 50rem; margin: auto; }
.settings-page h1 { margin-top: .65rem; }
.settings-form { max-width: none; display: grid; gap: 1.25rem; }
.settings-form fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid #eedde8; border-radius: .65rem; }
.settings-form legend { padding: 0 .4rem; font-weight: 750; }
.settings-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-hint { color: #514354; font-size: .9rem; font-weight: 400; }
.code-field { font-family: ui-monospace, Consolas, monospace; }
.settings-form textarea { resize: vertical; }
.settings-form button { justify-self: start; }
.settings-notice { padding: .75rem 1rem; background: #f1e0ef; border-radius: .5rem; }
@media (max-width: 38rem) {
    .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .settings-form button { justify-self: stretch; }
}
