:root {
  --green: #1e4d35;
  --green-dark: #153a28;
  --green-soft: #e4ede6;
  --bg: #f6f7f3;
  --paper: #ffffff;
  --ink: #1b1f1c;
  --muted: #5b6660;
  --line: #d6dcd6;
  --error: #9b2c2c;
  --error-bg: #fbecec;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

header.site {
  background: var(--green);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}
header.site .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
header.site .brand-sub { color: #cfe0d4; font-size: .95rem; }

footer.site {
  margin-top: 56px;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 0; }

h1 { font-size: 1.85rem; line-height: 1.2; margin: 0 0 12px; color: var(--green-dark); }
h2 { font-size: 1.3rem; margin: 0 0 8px; color: var(--green-dark); }
h3 { font-size: 1rem; margin: 0 0 4px; }
p { margin: 0 0 14px; }
.lead { font-size: 1.05rem; color: #2d3530; max-width: 62ch; }
.deadline { color: var(--green-dark); font-weight: 600; }
.muted { color: var(--muted); }
.fine { font-size: .9rem; color: var(--muted); margin: 14px 0 0; }
.opt { font-weight: 400; color: var(--muted); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-top: 24px;
}
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.card.center { text-align: center; padding: 40px 24px; }

label { display: block; font-weight: 600; margin: 16px 0 6px; }
label:first-of-type { margin-top: 0; }
input[type="text"], input[type="password"], textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #aab4ac;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, button:focus-visible, .option:focus-within {
  outline: 3px solid #8fc4a5;
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 120px; }

button, .button {
  display: inline-block;
  margin-top: 20px;
  font: inherit;
  font-weight: 600;
  padding: 13px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--green-dark); }
button.link { background: none; color: var(--green-dark); padding: 0; margin: 0; text-decoration: underline; font-weight: 500; }
button.warn { background: var(--error); }

.error {
  background: var(--error-bg);
  color: var(--error);
  border-left: 4px solid var(--error);
  padding: 12px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
}

/* survey */
.survey .alt {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 24px 0;
}
.survey .alt img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 12px 0 18px;
  border: 1px solid var(--line);
}
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.pros-cons ol { margin: 0; padding-left: 20px; }
.pros-cons li { margin-bottom: 4px; }
@media (max-width: 560px) { .pros-cons { grid-template-columns: 1fr; } }

fieldset.choice {
  border: 0;
  padding: 0;
  margin: 32px 0 8px;
}
fieldset.choice legend { font-weight: 700; font-size: 1.2rem; color: var(--green-dark); margin-bottom: 12px; padding: 0; }
.option {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 10px;
  font-weight: 400;
  cursor: pointer;
}
.option:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.option input { width: 22px; height: 22px; margin: 0; accent-color: var(--green); flex: none; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400;
  margin-top: 20px;
}
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--green); flex: none; }
.check small { color: var(--muted); }

/* admin */
.admin-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 28px; }
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}
.stat .n { font-size: 2rem; font-weight: 700; color: var(--green-dark); line-height: 1.1; }
.bars { margin-bottom: 20px; }
.bar { margin-bottom: 14px; }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.bar-track { background: var(--green-soft); border-radius: 4px; height: 18px; overflow: hidden; }
.bar-fill { background: var(--green); height: 100%; }

.comments { list-style: none; padding: 0; margin: 0 0 32px; }
.comments li { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px; }
.comments .meta { font-size: .9rem; margin-bottom: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.comments p { margin: 0; white-space: pre-wrap; }
.tag { background: var(--green-soft); color: var(--green-dark); font-weight: 600; padding: 1px 8px; border-radius: 4px; }

details.danger { border: 1px solid #e3b7b7; border-radius: 8px; padding: 14px 18px; background: #fff; margin-top: 24px; }
details.danger summary { cursor: pointer; font-weight: 600; color: var(--error); }
details.danger p { margin-top: 12px; }

/* logo i sidhuvudet */
header.site { align-items: center; padding-top: 12px; padding-bottom: 12px; }
header.site .brand { display: flex; align-items: center; }
header.site .logo { width: 56px; height: 56px; border-radius: 50%; display: block; }
header.site .brand-sub { font-size: 1.05rem; color: #fff; }
