:root {
    color-scheme: light;
    font-family: system-ui, sans-serif;
    color: #182522;
    background: #edf2ef;
    --accent: #155746;
    --border: #d4ded8;
    --muted: #4d6259;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }

.shell { width: min(100% - 2rem, 50rem); margin: 0 auto 3rem; }
.topbar { min-height: 5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { color: inherit; font-size: 1.3rem; font-weight: 800; letter-spacing: -.045em; text-decoration: none; }
.brand span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
nav a, .text-button { font-size: .9rem; }

.card { padding: clamp(1.25rem, 4vw, 2rem); background: white; border: 1px solid var(--border); border-radius: 1rem; }
.card + .card { margin-top: 1rem; }
.narrow { max-width: 36rem; }
h1, h2 { margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); letter-spacing: -.04em; }
h2 { font-size: 1.2rem; }
label { font-weight: 650; }
.stack { display: grid; gap: .75rem; margin-top: 1.25rem; }
.stack button { justify-self: start; }
.hint, .muted, small { color: var(--muted); }
.hint, .error { font-size: .925rem; margin: .6rem 0 0; }
.stack .hint, .stack .error { margin: 0; }
.error ul { margin: 0; padding-left: 1.2rem; }
.error { color: #a02222; }
.validation-summary-valid { display: none; }

input { min-width: 0; width: 100%; color: inherit; font: inherit; }
input:not([type=file]), .slug-input { padding: .7rem .85rem; border: 1px solid #a4b6ad; border-radius: .5rem; }
.slug-input { display: flex; align-items: center; gap: .35rem; color: var(--muted); }
.slug-input input { padding: 0; border: 0; border-radius: 0; color: #182522; outline: none; }
.slug-input:focus-within, :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input::file-selector-button { padding: .5rem .75rem; margin-right: .65rem; border: 1px solid var(--border); border-radius: .4rem; background: #edf2ef; color: var(--accent); font: inherit; cursor: pointer; }

button, .button { display: inline-block; padding: .65rem .9rem; border: 1px solid transparent; border-radius: .5rem; background: var(--accent); color: white; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.secondary { color: var(--accent); background: #edf5f0; border-color: var(--border); font-size: .875rem; }
.text-button { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; font-weight: inherit; }
[hidden] { display: none !important; }

.share-link { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .85rem; }
.share-link a { overflow-wrap: anywhere; }
.upload { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.files-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.files { margin: .75rem 0 0; padding: 0; list-style: none; }
.files li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; padding: .8rem 0; border-top: 1px solid var(--border); }
.files li:last-child { padding-bottom: 0; }
.file-info { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.file-details { display: grid; gap: .2rem; min-width: 0; }
.filename { font-weight: 650; overflow-wrap: anywhere; }
.image-preview { flex: none; display: block; border: 1px solid var(--border); border-radius: .5rem; background: #edf2ef; overflow: hidden; }
.image-preview img { display: block; object-fit: contain; }
