/* Mellan Raderna – stilmall
   Färgerna kommer från /theme.css (väljs i adminpanelen). Standardvärden nedan. */

@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }

:root {
  --bg: #F4EEE3; --surface: #FBF8F2; --ink: #2A2119; --muted: #6E6255; --line: #D9CEBD; --accent: #6E4428; --accent-ink: #FBF8F2;
  --error: #8E2B1F; --success: #3F5B36;
  --display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --text: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 40rem;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--text); font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.25rem); line-height: 1.65;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.narrow-text { max-width: var(--measure); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.88em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* ---------- Typografi ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; letter-spacing: -0.005em; margin: 0 0 0.5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.eyebrow {
  font-family: var(--text); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.25rem;
}
.page-title { font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.8rem); margin-bottom: 0.6em; }
.section-title { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem); }
.lede { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); font-style: italic; color: var(--muted); max-width: 34em; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: 0.08em; font-size: clamp(3rem, 2rem + 5vw, 5.5rem); margin-bottom: 0.3em; }

/* ---------- Sidhuvud ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem; flex-wrap: wrap; }
.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.logo-word {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.32em;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); margin: 0;
  padding: 0.35em 0; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor;
}
.logo-tag { font-style: italic; font-size: 0.92rem; color: var(--muted); margin-top: 0.4rem; letter-spacing: 0.01em; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-size: 1.02rem; padding: 0.35rem 0; display: inline-block; border-bottom: 1px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--line); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.announcement { background: var(--ink); color: var(--bg); font-size: 0.95rem; text-align: center; padding: 0.6rem 0; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--text); font-size: 1.05rem; letter-spacing: 0.06em;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  padding: 0.85em 1.8em; min-height: 3rem; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; text-decoration: underline; text-underline-offset: 0.25em; }
.btn-ghost:hover { background: transparent; color: var(--accent); border-color: transparent; }
.btn-danger { background: var(--error); border-color: var(--error); }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.link-quiet { font-style: italic; color: var(--muted); }

/* ---------- Startsida ---------- */
.hero { position: relative; padding: clamp(4rem, 10vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6.5rem); overflow: hidden; }
/* Linjerat papper: frågan står bokstavligen mellan raderna. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.6rem - 1px), color-mix(in srgb, var(--line) 70%, transparent) calc(2.6rem - 1px), color-mix(in srgb, var(--line) 70%, transparent) 2.6rem);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
  opacity: 0.55;
}
.hero-inner { position: relative; }
.hero-question { font-size: clamp(2.9rem, 1.6rem + 6.2vw, 7rem); line-height: 1.02; max-width: 11em; margin-bottom: 0.4em; font-weight: 500; }
.hero .lede { margin-bottom: 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-bottom: 3.5rem; }
.closed-note { font-style: italic; border-left: 2px solid var(--accent); padding: 0.25rem 0 0.25rem 1rem; max-width: 34em; }

.counter { max-width: 26rem; }
.counter-text { font-size: 1rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.6rem; }
.counter-num { font-feature-settings: "lnum", "tnum"; font-family: var(--display); font-size: 2.2rem; font-weight: 600; color: var(--ink); margin-right: 0.15em; font-variant-numeric: lining-nums tabular-nums; }
.counter-bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 3px; border: 0; background: var(--line); color: var(--accent); }
.counter-bar::-webkit-progress-bar { background: var(--line); }
.counter-bar::-webkit-progress-value { background: var(--accent); }
.counter-bar::-moz-progress-bar { background: var(--accent); }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.back-bar { padding-top: 1.25rem; }
.back-bar + .section, .back-bar + .hero, .back-bar + article.section { padding-top: clamp(1.75rem, 4vw, 3.5rem); }
.back-link { font-size: 0.98rem; color: var(--muted); text-decoration: none; display: inline-block; padding: 0.4rem 0; }
.back-link:hover { color: var(--ink); text-decoration: underline; }
.steps { border-top: 1px solid var(--line); background: var(--surface); }
.step-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.step-list li { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.step-no { display: block; font-family: var(--display); font-style: italic; font-size: 3.2rem; line-height: 1; color: var(--accent); margin-bottom: 1rem; }
.step-list h3 { font-size: 1.7rem; margin-bottom: 0.4em; }
.step-list p { color: var(--muted); margin: 0; }

.quote-section { border-top: 1px solid var(--line); }
.pull { font-family: var(--display); font-style: italic; font-size: clamp(1.8rem, 1.3rem + 2.2vw, 3rem); line-height: 1.2; text-align: center; margin: 2rem 0 2rem; }
.final-cta { border-top: 1px solid var(--line); background: var(--surface); }

.rule { display: grid; gap: 7px; width: 4.5rem; margin: 0 auto; }
.rule span { display: block; height: 1px; background: var(--ink); }
.rule span:nth-child(2) { width: 60%; justify-self: center; background: var(--accent); }

/* ---------- Formulär ---------- */
.form-section { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.form-wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.story-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.js .story-form .step { display: none; }
.js .story-form .step.is-active { display: block; }
.story-form .step + .step { margin-top: 4rem; }
.js .story-form .step + .step { margin-top: 0; }
.js-only { display: none !important; }
.js .js-only { display: inline-flex !important; }
.step-label { margin-bottom: 1rem; }
.question-label { display: block; font-family: var(--display); font-weight: 500; font-size: clamp(2.3rem, 1.6rem + 3.4vw, 4.2rem); line-height: 1.05; margin-bottom: 1.5rem; }
.form-heading { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); margin-bottom: 1.25rem; }

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], input:not([type]), select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; min-height: 3rem;
}
textarea:focus, input:focus, select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
#story {
  min-height: 16rem; resize: vertical; padding: 1.2rem 1.3rem; line-height: 2rem;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2rem - 1px), color-mix(in srgb, var(--line) 65%, transparent) calc(2rem - 1px), color-mix(in srgb, var(--line) 65%, transparent) 2rem);
  background-attachment: local; background-position: 0 1.2rem;
}
[aria-invalid="true"] { border-color: var(--error) !important; }
.textarea-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.5rem; }
.help { font-size: 0.92rem; color: var(--muted); margin: 0.4rem 0 0; }
.char-count { font-size: 0.88rem; color: var(--muted); white-space: nowrap; margin: 0.4rem 0 0; font-variant-numeric: tabular-nums; }
.field { margin: 0 0 1.5rem; }
.field label { display: block; font-size: 1rem; margin-bottom: 0.35rem; }
.optional { color: var(--muted); font-style: italic; }
.input-short { max-width: 10rem; }
.field-error { color: var(--error); font-size: 0.95rem; margin: 0.4rem 0 0.75rem; }
.field-error::before { content: "— "; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.choice-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.choice { display: flex; gap: 0.8rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice strong { display: block; font-weight: 500; }
.choice small { display: block; color: var(--muted); font-size: 0.9rem; }
.choice-inline { padding: 0.5rem 0.8rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); width: 1.15rem; height: 1.15rem; margin: 0.3rem 0 0; flex: none; }
.js [data-show-when][hidden] { display: none; }

.terms-box { background: var(--surface); border: 1px solid var(--line); padding: 1.5rem 1.6rem; margin: 2rem 0 1.5rem; }
.terms-box h3 { font-size: 1.5rem; }
.terms-box ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.terms-box li { margin-bottom: 0.4rem; }
.consents { display: grid; gap: 0.25rem; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; cursor: pointer; }

.alert { padding: 1rem 1.25rem; border-left: 3px solid; margin-bottom: 2rem; background: var(--surface); }
.alert-error { border-color: var(--error); color: var(--error); }
.alert-error strong { display: block; }
.alert-success { border-color: var(--success); color: var(--success); }

/* ---------- Tack-sidan ---------- */
.thanks .display { margin-top: 0.5rem; }
.thanks .lede { margin: 0 auto 2.5rem; }
.ticket { display: inline-flex; flex-direction: column; align-items: center; padding: 1.5rem 3rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-bottom: 1rem; }
.ticket-label { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.ticket-no { font-feature-settings: "lnum", "tnum"; font-family: var(--display); font-weight: 600; font-size: clamp(3rem, 2rem + 4vw, 4.5rem); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0.04em; }
.share { margin-top: 4rem; }
.share .section-title { margin-top: 2rem; }
.share-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 2rem 0 1rem; }
.share-preview { text-align: center; margin-top: 1.5rem; }
.share-preview img { width: 270px; max-width: 70%; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(42, 33, 25, 0.08); }

/* ---------- Textsidor ---------- */
.prose-page h2 { font-size: clamp(1.6rem, 1.35rem + 1vw, 2.1rem); margin-top: 2.5rem; }
.prose-page ul { padding-left: 1.2rem; }
.prose-page li { margin-bottom: 0.4rem; }
.cta-space { margin-top: 3rem; }
.contact-mail { font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin: 1.5rem 0 2rem; word-break: break-word; }

.editions { list-style: none; padding: 0; margin: 3rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
.edition { background: var(--surface); border: 1px solid var(--line); padding: 1.75rem; display: flex; flex-direction: column; }
.edition h2 { font-size: 1.8rem; }
.edition p { color: var(--muted); }
.edition-format { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; }
.edition-foot { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.edition-price { font-family: var(--display); font-size: 1.5rem; color: var(--ink); }
.badge { font-size: 0.85rem; font-style: italic; border: 1px solid var(--line); padding: 0.2rem 0.7rem; border-radius: 99px; color: var(--muted); }

/* ---------- Sidfot ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; margin-top: 0; }
.footer-cta { text-align: center; padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); }
.footer-question { font-family: var(--display); font-style: italic; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); line-height: 1.2; margin: 1.5rem 0 0.75rem; text-wrap: balance; }
.footer-inner { display: grid; gap: 2rem 3rem; grid-template-columns: minmax(14rem, 1.6fr) repeat(auto-fit, minmax(9rem, 1fr)); align-items: start; }
.footer-brand .logo-word { display: inline-block; font-size: 1rem; }
.footer-brand p { margin: 0.5rem 0 0; font-size: 1rem; }
.footer-brand a { text-decoration: none; }
.footer-brand a:hover { text-decoration: underline; }
.footer-label { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: 1rem; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-base { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.footer-base p { margin: 0; }

/* ---------- Admin ---------- */
.admin { font-size: 1.05rem; font-feature-settings: "kern", "liga", "lnum"; }
.admin-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.admin-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; }
.admin-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; }
.admin-nav a { text-decoration: none; }
.admin-nav a[aria-current="page"] { text-decoration: underline; }
.admin-nav form { margin: 0; }
.admin-site-link { font-style: italic; color: var(--muted); }
.admin-main { padding: 2.5rem 0 5rem; }
.admin .page-title { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); }
.admin-h2 { font-size: 1.8rem; margin-top: 3rem; }
.admin-h3 { font-size: 1.4rem; margin: 0; }
.login-box { max-width: 24rem; margin: 3rem auto; }
.stack { display: grid; gap: 1rem; }
.stack .field { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 1.25rem 1.4rem; margin: 0 0 1.25rem; }
fieldset.panel { min-width: 0; }
.panel legend { font-family: var(--display); font-size: 1.5rem; padding: 0 0.4rem; margin-left: -0.4rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); padding: 1.1rem 1.25rem; display: flex; flex-direction: column; }
.stat-label { font-size: 0.85rem; color: var(--muted); }
.stat-value { font-family: var(--display); font-size: 2.6rem; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.stat-sub { font-size: 0.9rem; color: var(--muted); }

.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem 1rem; align-items: end; background: var(--surface); border: 1px solid var(--line); padding: 1.25rem; margin-bottom: 1.5rem; }
.filter-bar .field { margin: 0; min-width: 0; }
.filter-bar input, .filter-bar select { min-width: 0; max-width: 100%; }
.filter-bar .grow { grid-column: 1 / -1; }
.filter-actions { display: flex; align-items: center; gap: 1rem; }
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; }
.export-links { font-size: 0.95rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.story-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.story-table th, .story-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.story-table th { font-weight: 500; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.story-table tr:last-child td { border-bottom: 0; }
.story-table .excerpt { min-width: 18rem; color: var(--muted); }
.story-table .excerpt a { text-decoration: none; }
.story-table td:first-child a { font-variant-numeric: tabular-nums; }

.status { display: inline-block; font-size: 0.82rem; padding: 0.1rem 0.6rem; border: 1px solid; border-radius: 99px; white-space: nowrap; }
.status-new { color: var(--accent); }
.status-selected { color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); }
.status-rejected { color: var(--muted); }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; }
.back { margin-bottom: 0.5rem; }
.detail-head { display: flex; align-items: center; gap: 1rem; }
.detail-head .page-title { margin: 0; }
.detail-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); margin-top: 1.5rem; }
@media (min-width: 60rem) { .detail-grid { grid-template-columns: minmax(0, 1fr) 22rem; } }
.story-full { align-self: start; background: var(--surface); border: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2.5rem); }
.story-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.15rem; line-height: 1.75; margin-bottom: 1.5rem; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; font-size: 0.95rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.danger-zone { border-color: color-mix(in srgb, var(--error) 40%, var(--line)); }

.settings-form { max-width: 46rem; }
.theme-choices { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.theme-choice { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--line); padding: 0.6rem 0.9rem; cursor: pointer; }
.theme-choice:has(input:checked) { border-color: var(--ink); }
.swatch { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.theme-kram .swatch { background: linear-gradient(135deg, #F4EEE3 50%, #6E4428 50%); }
.theme-sand .swatch { background: linear-gradient(135deg, #EADFCB 50%, #5E361C 50%); }
.theme-papper .swatch { background: linear-gradient(135deg, #F7F5F0 50%, #2E2B28 50%); }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 1rem 0; border-top: 1px solid var(--line); }

/* ---------- Mobil ---------- */
@media (max-width: 40rem) {
  .header-inner { flex-direction: column; align-items: flex-start; padding-top: 1.1rem; padding-bottom: 0.9rem; }
  .main-nav { width: 100%; }
  .main-nav ul { gap: 0.1rem 0.85rem; }
  .main-nav a { font-size: 0.98rem; }
  .hero-actions .btn, .final-cta .btn { width: 100%; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .share-buttons .btn { width: 100%; }
  .ticket { padding: 1.25rem 1.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .textarea-meta { flex-direction: column; gap: 0; }
  /* Tabellen blir kort på mobil */
  .story-table thead { display: none; }
  .story-table, .story-table tbody, .story-table tr, .story-table td { display: block; }
  .story-table tr { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 0.2rem 0.8rem; }
  .story-table td { padding: 0; border: 0; }
  .story-table td:nth-child(2) { grid-column: 2; color: var(--muted); font-size: 0.9rem; }
  .story-table td:nth-child(3) { grid-column: 1 / 3; }
  .story-table td:nth-child(4) { grid-column: 3; grid-row: 1; }
  .story-table .excerpt { grid-column: 1 / -1; min-width: 0; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .btn { display: none; } body { background: #fff; } }
