/* Brf Fresta Ängar. One hand-written stylesheet; no inline styles are used in the HTML (strict CSP).
   Fonts: Bricolage Grotesque (headings) and Figtree (body) are named first. Self-hosted font files
   are still to be added (see README); until then the system fallbacks are used. */

:root {
  --ink: #1C2B24;
  --green: #2F5D46;
  --green-dark: #1F3F30;
  --ground: #F4F7F3;
  --panel: #EDF2EC;
  --border: #D9E0DA;
  --border-soft: #E3E8E4;
  --input-border: #B9C4BC;
  --muted: #52605A;
  --muted-text: #3B4842;
  --art: #E4EBE3;
  --editor-bg: #FDF3CF;
  --editor-ink: #5A4100;
  --danger: #9A3412;
  --danger-bg: #FDECE6;
  --font-head: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
}
body.page-home, body.page-privacy { background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid #1B6FB5; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap--narrow { max-width: 760px; }
.section { padding-top: 40px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.muted-text { color: var(--muted-text); }
.small { font-size: 15px; }
.note-small { font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.eyebrow, .label {
  margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.label { font-size: 13px; margin: 0; }
.section-label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.page-title { font-size: 40px; margin-bottom: 6px; }
.section-title { font-size: 38px; margin: 0; }
.section-title--small { font-size: 28px; margin-bottom: 20px; }
.card-heading { font-size: 26px; margin: 0 0 8px; }
.display { font-size: 60px; line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 20px; }
.lead { font-size: 19px; color: var(--muted-text); max-width: 520px; margin-bottom: 32px; }
.lead p:last-child { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); color: #fff; }
.btn--outline { background: #fff; border-color: var(--green); color: var(--green); }
.btn--outline:hover { background: var(--panel); color: var(--green-dark); }
.btn--plain { background: #fff; border-color: #C9D2CB; color: var(--ink); }
.btn--plain:hover { background: var(--ground); color: var(--ink); }
.btn--light { background: #fff; color: var(--green-dark); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #7C2A0E; color: #fff; }
.btn--small { padding: 0 18px; }
.btn--large { min-height: 48px; padding: 0 24px; }
.btn--block { width: 100%; min-height: 52px; margin-top: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.linkbtn { border: 0; background: none; padding: 10px 0; font: inherit; color: var(--green); font-weight: 600; text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--green-dark); }
.inline-form { display: inline; margin: 0; }
.strong-link { font-weight: 600; }

/* Header and navigation */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.site-header--plain { background: var(--ground); border-bottom: 0; }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 14px; padding-bottom: 14px; }
.site-header--app .site-header__inner { padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { color: var(--green); }
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-weight: 500; }
.main-nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 10px 0; }
.main-nav a:not(.btn):hover { text-decoration: underline; }
.userbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 15px; color: var(--muted); }
.subnav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-weight: 600; font-size: 16px; }
.subnav a { padding: 12px 0; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--green); }
.count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: #FBEFC4; color: #6B4E00; font-size: 13px; text-align: center; }

.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-decoration: none;
}
.lang-switch a[aria-current="true"] { border-color: var(--green); background: var(--panel); }
.lang-switch svg { display: block; border-radius: 2px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; color: var(--muted); font-size: 15px; }
.site-footer a { color: var(--muted); }

/* Start page */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 48px; }
.hero__text { flex: 1 1 420px; min-width: 0; }
.hero__art, .map-art { display: block; min-width: 0; background: var(--art); object-fit: cover; }
.hero__art { flex: 1 1 420px; height: 360px; border-radius: 20px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-bottom: 64px; }
.fact { padding: 24px; border-radius: 16px; background: var(--panel); color: var(--muted-text); }
.fact__num { font-family: var(--font-head); font-weight: 700; font-size: 40px; line-height: 1.1; color: var(--ink); }
.band { background: var(--ground); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band__inner { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
.band__head { flex: 1 1 320px; min-width: 0; }
.band__body { flex: 1.4 1 420px; min-width: 0; color: var(--muted-text); }
.cta { border-radius: 20px; background: var(--green); color: #fff; padding: 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.cta__text { flex: 1 1 380px; min-width: 0; }
.cta h2 { font-size: 34px; margin-bottom: 12px; }
.cta p { color: #DCE7DF; margin: 0; }
.cta__action { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cta__action span { font-size: 15px; color: #DCE7DF; }
.emergency { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 20px 0 0; color: var(--ink); }
.emergency svg { color: var(--danger); flex: none; }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; padding-bottom: 72px; }
.panel { flex: 1 1 420px; min-width: 0; border: 1px solid var(--border); border-radius: 20px; padding: 28px; background: #fff; }
.panel--flush { padding: 0; overflow: hidden; }
.map-link { position: relative; display: block; }
.map-art { width: 100%; height: 220px; }
.map-credit { position: absolute; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; background: rgba(255, 255, 255, .8); color: #333; }
.panel__body { padding: 28px; }
.panel--col { display: flex; flex-direction: column; gap: 14px; }
.panel--col .prose { margin: 0; }
.tint-box { margin-top: 8px; padding: 20px; border-radius: 14px; background: var(--panel); }
.tint-box__value { font-size: 20px; font-weight: 600; margin: 4px 0 12px; overflow-wrap: anywhere; }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type=text], input[type=email], input[type=search], input[type=date], input[type=file], select, textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--input-border); border-radius: 12px;
  font: inherit; color: var(--ink); background: #fff;
}
textarea { padding: 12px 14px; resize: vertical; }
input[type=file] { padding: 10px 12px; }
select { padding: 0 12px; }
input[type=radio], input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); margin: 3px 0 0; flex: none; }
.check, .choice { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; }
.check { margin-top: 18px; font-size: 15px; color: var(--muted-text); align-items: center; }
.choice b { font-weight: 600; }
.choice small, .hint { display: block; font-size: 14px; color: var(--muted); }
.hint { margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
fieldset .choice { margin-bottom: 10px; }

.auth-wrap { padding: 48px 16px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 40px; }
.auth-card h1 { font-size: 32px; margin-bottom: 8px; }
.auth-card form > label { margin-top: 24px; }
.auth-card .small { margin: 24px 0 0; }
.icon-tile { width: 56px; height: 56px; border-radius: 16px; background: var(--panel); color: var(--green); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.code-input { min-height: 60px; font-size: 28px; letter-spacing: .3em; text-align: center; }
.auth-links { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; align-items: center; }
.auth-links a { font-weight: 600; padding: 10px 0; }

.flash { margin: 16px 0; padding: 12px 16px; border-radius: 12px; background: #DCEBDD; color: #1F4D33; font-weight: 500; }
.flash--error { background: var(--danger-bg); color: #7C2A0E; }
.auth-card .flash { margin: 16px 0 0; }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--editor-bg); color: var(--editor-ink); font-size: 15px; margin-bottom: 20px; }
.notice a:not(.btn) { color: var(--editor-ink); font-weight: 600; }
.notice--warn { border: 1px solid #E2B93B; background: #FFFBEB; justify-content: flex-start; align-items: flex-start; color: var(--muted-text); }
.notice--warn .check { margin: 0; color: var(--ink); font-weight: 600; }

/* Cards, badges, prose */
.card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.card__title { font-size: 26px; line-height: 1.2; margin: 0 0 10px; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.badge { display: inline-block; flex: none; padding: 2px 10px; border-radius: 999px; background: var(--panel); color: var(--green); font-size: 13px; font-weight: 600; }
.badge--newsletter, .badge--planned { background: #E8EEF6; color: #2D4568; }
.badge--draft { background: #E9ECEA; color: var(--muted-text); }
.badge--review, .badge--ongoing { background: #FBEFC4; color: #6B4E00; }
.badge--published, .badge--new { background: #DCEBDD; color: #1F4D33; }
.badge--private { background: #F3E4E4; color: #6E2A2A; }
.file-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }

.prose { overflow-wrap: anywhere; }
.prose p { margin: 0 0 12px; color: var(--muted-text); }
.prose strong { color: var(--ink); }
.prose h2, .prose h3 { margin: 24px 0 6px; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 20px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; color: var(--muted-text); }
.prose li { margin-bottom: 4px; }
.prose img { border-radius: 12px; margin: 8px 0; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 14px; }
.prose table { border-collapse: collapse; min-width: 60%; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--panel); }
.prose--page h2 { font-size: 22px; }
.article { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 32px; }
.article h1, .article h2.article__title { font-size: 30px; line-height: 1.2; margin: 0 0 14px; }
.article__files { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Members pages */
.layout-main { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 40px; padding-bottom: 72px; }
.layout-main__col { flex: 999 1 560px; min-width: 0; }
.layout-main__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px; }
.side-card--green { background: var(--green); color: #fff; border-color: var(--green); }
.side-card--green p { color: #DCE7DF; font-size: 15px; margin: 0; }
.side-card h2 { font-size: 20px; margin-bottom: 8px; }
.side-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-weight: 500; }
.year-fold { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.year-fold summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.year-fold ul { margin: 0 0 8px; padding: 0; list-style: none; }
.year-fold li { padding: 8px 0; border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }
.year-fold li a { color: var(--ink); text-decoration: none; font-weight: 500; }

/* Documents */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head > div { flex: 1 1 380px; min-width: 0; }
.page-head form { flex: 0 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-head form label { font-size: 15px; margin: 0; }
.doc-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.pill__n { margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--panel); font-size: 13px; }
.pill[aria-current="true"] .pill__n { background: rgba(255,255,255,.2); }
.doc-section { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px 8px; margin-bottom: 16px; scroll-margin-top: 16px; }
.doc-section__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.doc-section__head > div { flex: 1 1 280px; min-width: 0; }
.doc-section h2 { font-size: 22px; margin: 0 0 2px; }
.doc-section__n { font-family: var(--font-body); font-weight: 500; font-size: 16px; color: var(--muted); }
.doc-section__head p { margin: 0; font-size: 15px; color: var(--muted); }
.doc-none { margin: 0 0 16px; }
.doc-list { margin: 0; padding: 0; list-style: none; }
.doc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; border-top: 1px solid var(--border-soft); }
.doc-link { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 11px 0; min-height: 48px; color: var(--ink); text-decoration: none; }
.doc-link svg { color: var(--green); flex: none; }
.doc-link .name { font-weight: 500; overflow-wrap: anywhere; }
.doc-link:hover .name { text-decoration: underline; }
.doc-meta { flex: 0 0 auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
.doc-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 4px 14px; font-size: 14px; }
.doc-tools a, .doc-tools .linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: underline; }
.doc-tools a:hover, .doc-tools .linkbtn:hover { color: var(--ink); }
.doc-tools form { margin: 0; }
.doc-more { border-top: 1px solid var(--border-soft); margin: 0 0 8px; }
.doc-more > summary { cursor: pointer; padding: 12px 0; min-height: 48px; font-weight: 600; color: var(--green); display: flex; align-items: center; }
.doc-more[open] > summary { margin-bottom: 0; }
.doc-more .doc-list { margin-bottom: 8px; }
@media (max-width: 640px) {
  .doc-section { padding: 18px 16px 4px; }
  .doc-link { flex-basis: 100%; padding-bottom: 2px; }
  .doc-row { padding-bottom: 6px; }
  .doc-meta { flex: 1 1 auto; white-space: normal; }
  .doc-tools { margin-left: auto; }
}

/* Forms on a card */
.form-card { width: 100%; max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 36px; }
.form-card h1 { font-size: 32px; margin-bottom: 22px; }
.form-wrap { padding: 40px 16px 72px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.file-chip { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: var(--panel); margin-bottom: 20px; }
.file-chip svg { color: var(--green); }

/* Board: drafts and editor */
.board-main { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 32px; padding-bottom: 72px; }
.board-list { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.board-detail { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.board-list h1 { font-size: 34px; margin: 0; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.draft-item { display: block; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.draft-item:hover { border-color: var(--green); color: var(--ink); }
.draft-item[aria-current="true"] { border: 2px solid var(--green); padding: 17px 19px; }
.draft-item__row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.draft-item__row b { overflow-wrap: anywhere; }
.draft-item__meta { font-size: 14px; color: var(--muted); margin-top: 4px; }
.draft-item--dashed { border-style: dashed; border-color: var(--input-border); }
.comments { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.comments h2 { font-size: 20px; margin: 0; }
.comment { display: flex; gap: 12px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 999px; background: #DCE7DF; color: var(--green-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.comment__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.comment__meta { font-size: 14px; color: var(--muted); }
.comment__text { color: var(--muted-text); white-space: pre-wrap; }
.comments form { display: flex; flex-direction: column; gap: 8px; }
.comments label { font-size: 15px; margin: 0; }
.action-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.action-row .btn-row { gap: 10px; }

.editor-main { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 32px; padding-bottom: 72px; }
.editor-work { flex: 999 1 600px; min-width: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.editor-form { flex: 1 1 380px; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.editor-preview { flex: 1 1 380px; min-width: 0; }
.editor-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.title-input { min-height: 52px; font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.body-input { font-family: var(--font-mono); font-size: 15px; line-height: 1.6; min-height: 320px; }
.toolbar { display: none; flex-wrap: wrap; gap: 6px; }
.js .toolbar { display: flex; }
.toolbar button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid #C9D2CB; background: var(--ground); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.toolbar button:hover { background: var(--panel); }
.help { margin: 0; font-size: 14px; color: var(--muted); }
.saved-state { font-size: 15px; color: var(--muted); }
.attach-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--ground); font-size: 15px; }
.attach-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attach-row form { margin: 0; }
.attach-row .btn { min-height: 40px; }
.attach-row code { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.upload-box { border: 1.5px dashed #9AA79F; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.preview-label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 0 10px; }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-head h2 { margin: 0; font-size: 20px; }
.status-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.status-card p { margin: 0; font-size: 15px; color: var(--muted-text); }
.status-card form { margin: 0; display: flex; flex-direction: column; }
.status-card .btn { width: 100%; min-height: 48px; }
.status-card .small-link { font-size: 14px; }
.quote { padding: 14px; border-radius: 12px; background: var(--ground); font-size: 15px; }

/* Tabs without JavaScript: radio buttons before the panels */
.tabs { display: flex; flex-direction: column; gap: 10px; }
.tabs > input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab-list label { margin: 0; padding: 10px 16px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; min-height: 44px; }
.tab-panel { display: none; flex-direction: column; gap: 10px; }
#tab-sv:checked ~ .tab-list label[for=tab-sv], #tab-en:checked ~ .tab-list label[for=tab-en] { color: var(--ink); border-bottom-color: var(--green); }
#tab-sv:focus-visible ~ .tab-list label[for=tab-sv], #tab-en:focus-visible ~ .tab-list label[for=tab-en] { outline: 3px solid #1B6FB5; outline-offset: 2px; }
#tab-sv:checked ~ .panel-sv, #tab-en:checked ~ .panel-en { display: flex; }

/* Tables (member list) */
.table-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.table-card, .table-scroll { position: relative; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.data-table th, .data-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--ground); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .actions { text-align: right; white-space: nowrap; }
.data-table .actions a, .data-table .actions .linkbtn { display: inline-block; padding: 8px 6px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.toolbar-row form { display: flex; gap: 8px; align-items: flex-end; flex: 1 1 320px; max-width: 480px; }
.toolbar-row form .field { margin: 0; flex: 1; }
.csv-box { font-family: var(--font-mono); font-size: 14px; min-height: 160px; }
.preview-table .state { font-weight: 600; }
.state--add { color: #1F4D33; }
.state--change { color: #6B4E00; }
.state--skip { color: var(--muted); }
.state--bad { color: var(--danger); }
.summary-row { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 16px; font-weight: 600; }
.danger-card { background: #fff; border: 2px solid var(--danger); border-radius: 18px; padding: 28px; max-width: 640px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .display { font-size: 40px; }
  .hero { padding-top: 32px; gap: 28px; }
  .hero__art { height: 220px; }
  .section-title { font-size: 30px; }
  .cta { padding: 28px 22px; }
  .auth-card, .form-card { padding: 26px 20px; }
  .article { padding: 22px; }
  .card { padding: 22px; }
  .page-title { font-size: 32px; }
  .band__inner { padding-top: 40px; padding-bottom: 40px; gap: 24px; }
  
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .draft-item { transition: background-color .15s, border-color .15s; }
}

/* Small helpers */
.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; }
.js-only { display: none; }
.js .js-only { display: inline-flex; }
.field-title { font-size: 20px; margin: 14px 0 4px; }
.legend-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; margin-bottom: 4px; }
.section-gap { margin-top: 32px; }
.choice--sep { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.form-actions--left { justify-content: flex-start; }
.form-card--left { margin: 0; }
.small-link, .linkbtn.small { font-size: 14px; }
.actions-form { margin-top: 20px; }
.editor-preview .article { margin-bottom: 0; }
.editor-main:has(#tab-en:checked) .preview-sv { display: none; }
.editor-main:not(:has(#tab-en:checked)) .preview-en { display: none; }
.doc-list li { position: relative; }
.doc-list .inline-form { display: block; margin-top: -6px; margin-bottom: 4px; padding-left: 34px; }
.header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.status-card legend { float: left; width: 100%; margin-bottom: 4px; padding: 0; }
.status-card legend + * { clear: both; }
.meta-fields { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 4px 0 6px; }
.meta-fields .field { margin: 0; flex: 1 1 200px; }
.meta-fields select, .meta-fields input { min-height: 44px; }

/* Projects and FAQ */
.btn--dashed { background: #fff; border: 1.5px dashed var(--green); color: var(--green); }
.btn--dashed:hover { background: var(--panel); color: var(--green-dark); }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #C9D2CB; background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.pill:hover { background: var(--panel); color: var(--ink); }
.pill[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-bottom: 56px; }
.project-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.project-card--edit { border: 2px solid #E2B93B; padding: 23px; }
.project-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-card__head h2 { font-size: 22px; margin: 0; }
.project-card .prose p { margin: 2px 0 0; }
.project-card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.btn-edit { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--editor-bg); color: var(--editor-ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-edit:hover { background: #F9E8A8; color: var(--editor-ink); }
.title-input--small { font-size: 20px; min-height: 44px; }
.delete-row { margin: 8px 0 0; }
.page-head--faq { margin-bottom: 16px; }
.faq { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { padding: 20px 24px; font-weight: 600; cursor: pointer; }
.faq-item__body { padding: 0 24px 20px; color: var(--muted-text); }
.faq-item__body .prose p { margin: 0 0 8px; }
.faq-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.faq-edit { padding: 20px 24px; border-left: 4px solid #E2B93B; }
.side-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.side-card__head h2 { margin: 0; }
.side-list--rows li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.side-list--rows a { color: var(--ink); text-decoration: none; }

/* In-place editing of page text */
.block { position: relative; }
.btn-edit--block { margin-top: 8px; }
.block-form { background: #fff; border: 2px solid #E2B93B; border-radius: 16px; padding: 18px; color: var(--ink); text-align: left; max-width: 760px; }
.block-form__title { margin: 0 0 8px; font-weight: 600; color: var(--editor-ink); }
.block-form textarea { min-height: 80px; }
.band__body .block-form, .lead .block-form { font-size: 16px; }
.cta .block-form, .side-card--green .block-form { color: var(--ink); }
.side-card--green .btn-edit { margin-top: 10px; }
.card--soft { background: var(--panel); border-color: var(--panel); margin-bottom: 24px; }
.housing-blocks .block { margin-bottom: 24px; }
.housing-intro { margin-bottom: 28px; }
.housing-intro .prose p { font-size: 18px; }
.side-card__link { margin: 12px 0 0; }
.side-card--green .side-card__link a { color: #fff; font-weight: 600; }
.form-actions--stack { justify-content: flex-start; }
.confirm-question { font-size: 20px; font-weight: 600; }
.mailout-status details { margin-top: 6px; }
.mailout-status ul { margin: 6px 0 0; padding-left: 20px; }

.editor-title { flex: 0 0 100%; margin: 0; font-size: 32px; }
.project-grid { align-items: start; }
.project-card--edit { grid-column: 1 / -1; max-width: 760px; }
@media (max-width: 640px) {
  .data-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table--stack, .data-table--stack tbody { display: block; }
  .data-table--stack tr { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
  .data-table--stack tr:last-child { border-bottom: 0; }
  .data-table--stack td { display: block; padding: 0; border: 0; }
  .data-table--stack td.cell-main { flex: 1 1 100%; font-weight: 600; }
  .data-table--stack td.cell-sub { flex: 1 1 100%; color: var(--muted); overflow-wrap: anywhere; }
  .data-table--stack td.actions { flex: 1 1 100%; text-align: left; margin-top: 2px; }
  .data-table--stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

/* One navigation: the board's items sit at the end, marked and separated. */
.subnav__board { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; margin-left: 4px; padding-left: 24px; border-left: 1px solid var(--border); }
.subnav__marker { padding: 2px 10px; border-radius: 999px; background: var(--editor-bg); color: var(--editor-ink); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 640px) {
  .subnav__board { flex: 1 1 100%; margin-left: 0; padding-left: 0; border-left: 0; border-top: 1px solid var(--border-soft); padding-top: 6px; gap: 4px 20px; }
}

/* Drafts at the top of Nyheter (editors) */
.page-head--tight { margin-bottom: 20px; align-items: flex-start; }
.page-head--tight .page-title { margin-bottom: 6px; }
.drafts-panel { background: var(--editor-bg); color: var(--editor-ink); border-radius: 16px; padding: 18px 20px; margin-bottom: 24px; }
.drafts-panel a { color: var(--editor-ink); }
.drafts-panel__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.drafts-panel h2 { font-size: 18px; margin: 0; }
.drafts-panel .count { background: #fff; }
.drafts-panel__none { margin: 0 0 8px; color: var(--editor-ink); }
.drafts-list { list-style: none; margin: 0; padding: 0; }
.drafts-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid rgba(90, 65, 0, .18); }
.drafts-list__title { font-weight: 600; flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.drafts-list__meta { font-size: 14px; flex: 1 1 100%; color: var(--editor-ink); opacity: .85; }
.drafts-panel__foot { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.drafts-panel__foot a { font-weight: 600; }
@media (min-width: 700px) { .drafts-list__meta { flex: 0 1 auto; } }
.form-card--inline { max-width: 680px; margin: 0 0 24px; padding: 28px; border-radius: 18px; border: 2px solid #E2B93B; }
.form-card--inline h2 { font-size: 24px; margin-bottom: 18px; }

/* The view switch strip under the header (real editors only) */
.view-strip { background: var(--panel); border-bottom: 1px solid var(--border); font-size: 15px; }
.view-strip__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; min-height: 44px; }
.view-strip strong { color: var(--ink); }
.view-strip a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.view-strip--member { background: #2D4568; border-bottom-color: #2D4568; color: #fff; }
.view-strip--member a { color: #fff; }
.view-strip--member a:hover { color: #DCE7F5; }

/* Polish after the screenshot review */
.page-head form { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: end; }
.page-head form label { grid-column: 1 / -1; }
.page-head form .btn { min-width: 84px; }
.doc-meta { flex: 0 0 15.5rem; text-align: right; }
.doc-tools form { display: flex; align-items: center; }
.doc-tools a, .doc-tools .linkbtn { line-height: 1.2; }
.side-card--green .prose strong { color: #fff; }
.side-card--green .prose p { color: #DCE7DF; }
.side-card--green .prose a { color: #fff; }
@media (max-width: 640px) { .doc-meta { flex: 1 1 auto; text-align: left; } .page-head form { grid-template-columns: 1fr auto; } }
