/* Typsnitt som ligger på sajten. Licens: SIL Open Font License. */
@font-face {font-family: 'Archivo'; font-style: normal; font-weight: 500; font-stretch: 100%; font-display: swap; src: url(/fonts/archivo-4c18bbf2.woff2) format('woff2')}
@font-face {font-family: 'Archivo'; font-style: normal; font-weight: 800; font-stretch: 100%; font-display: swap; src: url(/fonts/archivo-4c18bbf2.woff2) format('woff2')}
@font-face {font-family: 'Archivo'; font-style: normal; font-weight: 800; font-stretch: 112%; font-display: swap; src: url(/fonts/archivo-4c18bbf2.woff2) format('woff2')}
/* Typsnitt som ligger på sajten. Licens: SIL Open Font License. */
@font-face {font-family: 'Source Serif 4'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/source-serif-4-92ceb83c.woff2) format('woff2')}

:root {
  --bg: #F3F5F2;
  --ink: #182720;
  --muted: #5D6B64;
  --rule: #D3DAD5;
  --panel: #17432F;
  --panel-ink: #F4F7F2;
  --panel-muted: #B9CDC2;
  --panel-cell: #24543E;
  --tag: #F2C94C;
  --tag-ink: #1B1B14;
  --tag-hover: #FFD75E;
  --surface: #FFFFFF;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1A15;
    --ink: #E8EEEA;
    --muted: #9AA8A1;
    --rule: #263831;
    --panel: #143A2A;
    --panel-cell: #1F4D39;
    --surface: #16241D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1A15;
  --ink: #E8EEEA;
  --muted: #9AA8A1;
  --rule: #263831;
  --panel: #143A2A;
  --panel-cell: #1F4D39;
  --surface: #16241D;
  color-scheme: dark;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.6;
}
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--tag); outline-offset: 3px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
main > section { max-width: 46rem; padding: 3.5rem 0 0; }
main > section.wide { max-width: none; }
h2 { font-family: var(--sans); font-weight: 800; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.15; letter-spacing: -0.012em; margin: 0 0 1rem; text-wrap: balance; }
h3 { font-family: var(--sans); font-weight: 800; font-size: 1.125rem; line-height: 1.25; margin: 0; }
p { margin: 0 0 1rem; max-width: 62ch; }
.small { color: var(--muted); font-size: 1rem; }
.tag { font-family: var(--sans); font-weight: 800; font-size: 1rem; background: var(--tag); color: var(--tag-ink); padding: 0.2rem 0.55rem; border-radius: 4px; white-space: nowrap; }

/* Första skärmen: vad jag gör, och ett exempel som räknar på riktigt */
.hero { background: var(--panel); color: var(--panel-ink); padding: 1.5rem 0 3.25rem; font-family: var(--sans); font-weight: 500; color-scheme: dark; }
.bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1.5rem; margin: 0 0 1.75rem; }
.brand { font-weight: 800; font-stretch: 112%; font-size: 1.125rem; letter-spacing: 0.01em; margin: 0; }
.bar nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; font-size: 1rem; }
.bar nav a { text-decoration: none; padding: 0.2rem 0; }
.bar nav a:hover { text-decoration: underline; }
.lede { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 11ch;
  text-wrap: balance;
}
.hero .lead { font-size: 1.25rem; line-height: 1.5; max-width: 34ch; margin: 0 0 2rem; }
.hero .lead strong { font-weight: 800; }
.cta {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.0625rem;
  text-decoration: none;
  background: var(--tag);
  color: var(--tag-ink);
  padding: 0.95rem 1.4rem;
  border-radius: 6px;
  transition: background-color 120ms ease;
}
.cta:hover { background: var(--tag-hover); }
.hero .aside { margin: 1.25rem 0 0; color: var(--panel-muted); font-size: 1rem; }
.hero .aside a { color: var(--panel-ink); }

.live { margin: 0; min-width: 0; }
.live-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.live-title { font-weight: 800; font-size: 1rem; }
.live-top button { white-space: nowrap; flex: none; font: inherit; font-size: 0.9375rem; color: var(--panel-ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.live-in { display: flex; align-items: center; gap: 0.6rem; height: 2.2rem; margin-bottom: 0.5rem; font-size: 0.9375rem; color: var(--panel-muted); }
.chip { display: block; overflow: hidden; flex: none; border-radius: 3px; background: var(--panel-ink); color: var(--panel); font-size: 0.6875rem; font-weight: 800; line-height: 1.3; padding: 0 0.25rem; white-space: nowrap; text-overflow: ellipsis; transform-origin: 0 0; }
.chip.new { background: var(--tag); color: var(--tag-ink); }
.live-in .chip { font-size: 0.8125rem; padding: 0.25rem 0.5rem; }
.live-days, .live-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.live-days { font-size: 0.8125rem; color: var(--panel-muted); }
.live-name { font-size: 0.8125rem; color: var(--panel-muted); margin: 0.6rem 0 0.25rem; max-width: none; }
.cell { background: var(--panel-cell); border-radius: 4px; padding: 3px; height: 7.6rem; display: flex; flex-direction: column; gap: 2px; }
.cell .fill { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); margin-bottom: 2px; overflow: hidden; flex: none; }
.cell .fill i { display: block; height: 100%; width: 0; background: var(--tag); transition: width 450ms ease; }
.live-note { height: 4.4em; margin: 0.8rem 0 0; font-size: 0.9375rem; line-height: 1.45; max-width: none; }
.live-add { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9375rem; padding-top: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.live-add span { flex: 1 1 100%; }
.live-add select { font: inherit; font-size: 0.9375rem; min-width: 0; flex: 1 1 8rem; padding: 0.5rem 0.5rem; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 6px; background: var(--panel-cell); color: var(--panel-ink); }
.live-add button { font: inherit; font-weight: 800; font-size: 0.9375rem; padding: 0.55rem 0.9rem; border: 0; border-radius: 6px; background: var(--tag); color: var(--tag-ink); cursor: pointer; }
.live-add button:hover { background: var(--tag-hover); }
.live figcaption { margin-top: 0.9rem; color: var(--panel-muted); font-size: 0.9375rem; line-height: 1.45; }
.live figcaption a { color: var(--panel-ink); }
.live noscript img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* Tre nivåer. Bilden växer med djupet. */
.levels { margin: 1.5rem 0 0; }
.lvl { border-top: 2px solid var(--ink); padding: 1.4rem 0 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem 3rem; }
.lvl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.lvl-head h3 { font-size: 1.625rem; letter-spacing: -0.012em; }
.lvl p { margin: 0 0 0.6rem; max-width: 46ch; }
.lvl .eg { color: var(--muted); font-size: 1rem; }
.exlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; align-content: start; }
.exlist li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.exlist .thumb { display: block; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #fff; }
.exlist img { display: block; width: 100%; height: auto; }
.exlist .title { font-family: var(--sans); font-weight: 800; font-size: 1.0625rem; line-height: 1.25; }
.exlist p { margin: 0.15rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.4; }
.exlist.big li { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
.terms { margin: 0; border-top: 2px solid var(--ink); padding-top: 1.25rem; max-width: 46rem; }

/* Räknaren */
.fields-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem 1rem; max-width: 40rem; }
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field label { font-family: var(--sans); font-weight: 500; font-size: 0.95rem; }
.field input { font: inherit; font-family: var(--sans); font-size: 1rem; padding: 0.55rem 0.7rem; border: 1px solid #8E9A94; border-radius: 6px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
.result { margin-top: 0.9rem; padding: 0.9rem 1rem; background: var(--panel); color: var(--panel-ink); border-radius: 6px; font-family: var(--sans); font-weight: 500; font-size: 1.0625rem; line-height: 1.5; max-width: 40rem; }
.result strong { color: var(--tag); font-weight: 800; }

.areas { margin: 0 0 1.5rem; }
.areas dt { font-family: var(--sans); font-weight: 800; font-size: 1.125rem; margin: 1.25rem 0 0.25rem; }
.areas dt:first-child { margin-top: 0; }
.areas dd { margin: 0; max-width: 58ch; }
ul.facts { margin: 0; padding-left: 1.2rem; max-width: 58ch; }
ul.facts li { margin: 0 0 0.6rem; padding-left: 0.2rem; }
ol.steps { margin: 0; padding-left: 1.5rem; max-width: 58ch; }
ol.steps li { margin: 0 0 0.6rem; padding-left: 0.3rem; }
ol.steps li::marker { font-family: var(--sans); font-weight: 800; }
.contact { border-top: 1px solid var(--rule); margin-top: 3.5rem; padding-bottom: 3.5rem; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0; max-width: none; }
.copy { font: inherit; font-family: var(--sans); font-weight: 500; font-size: 1rem; color: var(--ink); background: none; border: 0; padding: 0.5rem 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
footer { color: var(--muted); font-size: 0.95rem; padding: 2rem 0 3rem; border-top: 1px solid var(--rule); }
footer p { margin: 0 0 0.35rem; }

@media (min-width: 44rem) {
  .lvl { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .exlist li { grid-template-columns: 9.5rem minmax(0, 1fr); }
  .live-add span { flex: 0 0 auto; }
}
@media (min-width: 60rem) {
  .hero { padding-bottom: 3.75rem; }
  .bar { margin-bottom: 2.5rem; }
  .lede { grid-template-columns: minmax(0, 1fr) 28rem; gap: 4rem; align-items: center; }
  .chip { font-size: 0.75rem; }
  .live-add span { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cta { transition: none; }
  .cell .fill i { transition: none; }
}
