/* Misophonia.is — róleg, hljóðlát upplýsingasíða.
   Layout: einn lesdálkur (~65 stafir) með léttum haus, hliðarboxum fyrir lykilatriði. */
:root {
  --paper: #f3f5f4;
  --surface: #ffffff;
  --ink: #1d2a2f;
  --muted: #56666c;
  --accent: #2c6766;
  --accent-soft: #dce9e7;
  --line: #d5dedc;
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.4rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141c1e;
    --surface: #1b2528;
    --ink: #e3ebea;
    --muted: #9fb0b2;
    --accent: #7fc0bb;
    --accent-soft: #233a3a;
    --line: #2c3a3d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141c1e;
  --surface: #1b2528;
  --ink: #e3ebea;
  --muted: #9fb0b2;
  --accent: #7fc0bb;
  --accent-soft: #233a3a;
  --line: #2c3a3d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* Haus */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
}
.brand svg { flex: none; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step--1);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Meginmál */
main {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.prose { max-width: 40rem; }
.prose > * + * { margin-top: 1rem; }
.prose > h2 { margin-top: 2.75rem; }
.prose > h3 { margin-top: 1.75rem; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  text-wrap: balance;
  font-weight: 600;
}
h1 { font-size: var(--step-3); margin: 0 0 1rem; }
h2 { font-size: var(--step-2); margin: 2.75rem 0 0.75rem; }
h3 { font-size: var(--step-1); margin: 1.75rem 0 0.5rem; }
p { margin: 0; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 38rem; }
ul.list, ol.list { padding-left: 1.25rem; margin: 0; display: grid; gap: 0.4rem; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* Forsíða */
.hero {
  display: grid;
  gap: 1.25rem;
  padding: 1rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  max-width: 44rem;
}
.quiet-note {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-size: var(--step--1);
  color: var(--muted);
}
.quiet-note svg { flex: none; }

.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.path {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 1.25rem 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
.path:hover { border-color: var(--accent); }
.path strong { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.path span { color: var(--muted); font-size: var(--step--1); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 40rem) minmax(0, 20rem);
  gap: 3rem;
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

.aside {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  display: grid;
  gap: 0.6rem;
}
.aside h2, .aside h3 { margin: 0; font-size: var(--step-1); }
.aside p, .aside li { font-size: var(--step--1); }

.figures {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.figures li { display: grid; gap: 0.15rem; }
.figures b {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--accent);
}

.triggers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  max-width: 48rem;
}
.trigger {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.2rem;
}
.trigger b { font-size: var(--step-0); }
.trigger span { color: var(--muted); font-size: var(--step--1); }

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  background: var(--surface);
}
.table-wrap { overflow-x: auto; max-width: 48rem; margin-top: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.compare th, .compare td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare th { font-weight: 700; background: var(--accent-soft); }

.callout {
  border-left: 4px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--ink);
}

.resource-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; max-width: 44rem; }
.resource-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.25rem;
}
.resource-list a { font-weight: 700; }

.sources { font-size: var(--step--1); color: var(--muted); padding-left: 1.25rem; display: grid; gap: 0.4rem; max-width: 48rem; }

.community {
  margin-top: 3rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 0.75rem;
  max-width: 44rem;
}
.community h2 { margin: 0; }
.button {
  display: inline-block;
  justify-self: start;
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-weight: 700;
}
.button:hover { opacity: 0.92; }

/* Fótur */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.site-footer .inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
  display: grid;
  gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--muted);
}

@media (max-width: 480px) {
  :root { --step-3: 1.95rem; --step-2: 1.45rem; }
  main { padding-top: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
