/* HuskDet: redesign proposal (design-forslag/).
   Direction: the split stage. The phone stays still on the left while the week scrolls past
   on the right; then the page opens to full width. Brand colours kept (#2563EB, the slate ramp).
   No script anywhere: the live part is radio inputs, the motion is CSS keyframes and scroll
   timelines, so the site's CSP (script-src 'none') can stay as it is. */

:root {
  --paper: #F5F7FB;
  --paper-2: #E7ECF4;
  --white: #FFFFFF;
  --ink: #0F172A;
  --ink-soft: #475569;
  --night: #0B1530;
  --night-2: #17244A;
  --night-ink: #EEF2F8;
  --night-soft: #B4C0D4;
  --accent: #2563EB;
  --accent-deep: #1D4ED8;
  --mark: #DBEAFE;

  --font: "Literata", Georgia, "Times New Roman", serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  --step-big: clamp(3rem, 1.2rem + 5.4vw, 6rem);
  --step-mark: clamp(5.5rem, 15.5vw, 14.5rem);
  --step-note: 17px;

  --m: clamp(20px, 2.2vw, 32px);
  --split: 46vw;
  --col: calc(var(--split) + 72px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 900ms;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  font-optical-sizing: auto;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
b { font-weight: 600; }
::selection { background: var(--mark); color: var(--ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- stage */

.stage {
  display: grid;
  grid-template-columns: var(--split) 1fr;
  background: var(--night);
  timeline-scope: --intro, --how;
}

.stage-side { position: relative; }

.stage-main { min-width: 0; }

/* The lock screen: the product's own surface, cropped as a picture (data-ui). */
.lock {
  position: sticky;
  top: 24px;
  height: calc(100svh - 48px);
  margin: 24px 0 24px var(--m);
  overflow: clip;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--ui);
}

.lock-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9% 7% 28%;
  background: var(--accent);
}

.lock-noise, .lock-evening { opacity: 0; visibility: hidden; }
.lock-noise { background: var(--accent-deep); }

.lock-clock { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lock-date { font-size: 19px; font-weight: 600; letter-spacing: 0.01em; }
.lock-time { font-size: clamp(72px, 7.4vw, 116px); font-weight: 300; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.lock-stack { margin-top: auto; position: relative; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 8px; }

.note {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  background: #EEF3FF;
  color: #0F172A;
  font-size: 15px;
  line-height: 1.3;
}
.note-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.note-body > span:last-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #475569; }
.note-head b { color: #0F172A; font-size: 15px; }
.note-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: #2563EB url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 5.6a6.9 6.9 0 0 0-6.9 6.9v3.3L6.6 20.4a.9.9 0 0 0 .8 1.4h17.2a.9.9 0 0 0 .8-1.4l-2.5-4.6v-3.3A6.9 6.9 0 0 0 16 5.6zM12.9 23.6h6.2a3.1 3.1 0 0 1-6.2 0z' fill='white'/%3E%3C/svg%3E") center / 30px no-repeat;
}
.note-icon--school { background: #64748B; }
.lock-more { margin-top: 4px; font-size: 14px; text-align: center; color: #FFFFFF; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 32px var(--m) 40px 72px;
  background: var(--night);
  color: var(--night-ink);
}

.nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px 28px; font-size: var(--step-small); }
.nav a { text-decoration: none; padding: 4px 0; transition: color var(--t-hover) ease; }
.nav a:hover { color: #FFFFFF; text-decoration: underline; }
.nav-action { font-weight: 600; }

.hero-copy { margin-top: clamp(40px, 10vh, 120px); }
.hero h1 { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.02em; max-width: 14ch; }
.hero-line { margin-top: 32px; font-size: var(--step-lead); line-height: 1.45; max-width: 27ch; }
.hero-copy .button { margin-top: 36px; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 28px;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.button:hover { background: var(--accent-deep); }
.button:active { transform: scale(0.97); }
.button--light { background: #FFFFFF; color: var(--accent-deep); font-weight: 600; }
.button--light:hover { background: var(--mark); }

.wordmark {
  position: absolute;
  right: var(--m);
  bottom: 28px;
  margin: 0;
  font-size: var(--step-mark);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.045em;
  color: var(--night-ink);
  white-space: nowrap;
  pointer-events: none;
}

/* ---------------------------------------------------------------- intro: the pain */

.intro {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding: 176px var(--m) 200px 72px;
  view-timeline-name: --intro;
}
.intro h2 { font-size: var(--step-head); line-height: 1.08; letter-spacing: -0.02em; }
.intro-text { margin-top: 44px; max-width: 34ch; }
.intro-text p + p { margin-top: 1.1em; }
.intro-first { font-weight: 500; }

/* ---------------------------------------------------------------- how: the slip */

.how {
  position: relative;
  z-index: 1;
  background: var(--paper-2);
  padding: 176px var(--m) 200px 72px;
  view-timeline-name: --how;
}
.how-head { max-width: 30ch; }
.how h2 { font-size: var(--step-head); line-height: 1.08; letter-spacing: -0.02em; }
.how-head p { margin-top: 28px; }

.slip {
  margin-top: 56px;
  width: min(500px, 100%);
  padding: 36px 32px 64px;
  background: var(--white);
  font-size: var(--step-note);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 97.917% 100%, 95.833% calc(100% - 12px), 93.750% 100%, 91.667% calc(100% - 12px), 89.583% 100%, 87.500% calc(100% - 12px), 85.417% 100%, 83.333% calc(100% - 12px), 81.250% 100%, 79.167% calc(100% - 12px), 77.083% 100%, 75.000% calc(100% - 12px), 72.917% 100%, 70.833% calc(100% - 12px), 68.750% 100%, 66.667% calc(100% - 12px), 64.583% 100%, 62.500% calc(100% - 12px), 60.417% 100%, 58.333% calc(100% - 12px), 56.250% 100%, 54.167% calc(100% - 12px), 52.083% 100%, 50.000% calc(100% - 12px), 47.917% 100%, 45.833% calc(100% - 12px), 43.750% 100%, 41.667% calc(100% - 12px), 39.583% 100%, 37.500% calc(100% - 12px), 35.417% 100%, 33.333% calc(100% - 12px), 31.250% 100%, 29.167% calc(100% - 12px), 27.083% 100%, 25.000% calc(100% - 12px), 22.917% 100%, 20.833% calc(100% - 12px), 18.750% 100%, 16.667% calc(100% - 12px), 14.583% 100%, 12.500% calc(100% - 12px), 10.417% 100%, 8.333% calc(100% - 12px), 6.250% 100%, 4.167% calc(100% - 12px), 2.083% 100%, 0.000% calc(100% - 12px));
}
.slip h3 { margin: 28px 0 6px; font-size: var(--step-note); font-weight: 600; }
.slip h3:first-child { margin-top: 0; }
.row { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; }
.row > span:first-child { flex: 0 1 auto; }
.row > span:last-child { flex: none; }
.leader { flex: 1 1 24px; min-width: 24px; overflow: hidden; white-space: nowrap; color: var(--ink-soft); }
.leader::after { content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."; }
.row--result {
  margin: 32px -32px 0;
  padding: 10px 32px;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

/* ---------------------------------------------------------------- finds: photo-bullet list */

.finds { padding: 200px var(--m) 160px; }
.finds-head { display: grid; grid-template-columns: calc(var(--col) - var(--m) - 64px) 1fr; column-gap: 64px; align-items: end; }
.finds h2 { font-size: var(--step-big); line-height: 0.98; letter-spacing: -0.03em; grid-column: 1 / -1; }
.finds-head p { grid-column: 2; margin-top: 28px; max-width: 40ch; }

.cats {
  list-style: none;
  margin: 80px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.cat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #E2E8F0; /* taste-skill-ignore: the old site's category cards, kept by request */
  background: var(--white);
}
.cat h3 { font-size: var(--step-body); font-weight: 600; line-height: 1.3; }
.cat p { margin-top: 4px; font-size: var(--step-note); line-height: 1.5; color: var(--ink-soft); }

/* ---------------------------------------------------------------- try: input half, output half */

.try { position: relative; }
.try-pick { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; } /* taste-skill-ignore: visually hidden radio input, not a rule */

.try-fields { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; min-height: 92svh; }
/* Both halves share the rows: the tabs on the first, the two screens side by side on the second. */
.try-in, .try-out { grid-row: span 2; display: grid; grid-template-rows: subgrid; align-content: start; }
.try-screen { grid-row: 2; }

.try-in {
  background: var(--night);
  color: var(--night-ink);
  padding: 16svh var(--m) 200px calc(var(--m) + 4vw);
}
.try-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 44px; }
.try-tabs label {
  padding: 10px 16px;
  background: var(--night-2);
  font-size: var(--step-note);
  cursor: pointer;
  user-select: none;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.try-tabs label:hover { background: #22325F; }
.try-tabs label:active { transform: scale(0.97); }

#b1:checked ~ .try-fields label[for="b1"],
#b2:checked ~ .try-fields label[for="b2"],
#b3:checked ~ .try-fields label[for="b3"] { background: var(--night-ink); color: var(--night); }

#b1:focus-visible ~ .try-fields label[for="b1"],
#b2:focus-visible ~ .try-fields label[for="b2"],
#b3:focus-visible ~ .try-fields label[for="b3"] { outline: 3px solid #93C5FD; outline-offset: 3px; }

/* Which app each half shows: the message in Aula, what HuskDet makes of it. */
.try-where { margin-bottom: 16px; font-size: var(--step-note); font-weight: 600; color: var(--night-soft); }
.try-out .try-where { color: var(--ink-soft); }

/* The message on a phone screen: a plain rounded rectangle, a top bar, the sender, the text.
   Our own colours and type, nothing of Aula's look. */
.msg {
  display: none;
  width: min(400px, 100%);
  padding: 0 20px 24px;
  border: 8px solid var(--night-2); /* taste-skill-ignore: the phone's edge, a plain rounded rectangle (data-ui) */
  border-radius: 32px;
  background: #FFFFFF;
  color: #0F172A;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
}
[data-ui] .aula-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 -20px 18px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #E2E8F0; /* taste-skill-ignore: the app's own bar edge (data-ui) */
  font-size: 16px;
  font-weight: 600;
}
[data-ui] .aula-bar span { font-size: 22px; line-height: 1; color: #2563EB; }
[data-ui] .aula-from { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
[data-ui] .aula-from > span:last-child { display: flex; flex-direction: column; }
[data-ui] .aula-from b { font-weight: 600; }
[data-ui] .aula-from > span:last-child > span { font-size: 14px; color: #475569; }
[data-ui] .aula-avatar {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: #E2E8F0; color: #334155;
  font-size: 16px; font-weight: 600;
}
[data-ui] .aula-subject { margin: 16px 0 10px; font-size: 19px; font-weight: 700; line-height: 1.25; }
.msg[data-ui] p + p { margin-top: 0.7em; }
[data-ui] .aula-file { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: #F1F5F9; }
[data-ui] .aula-file-name { display: flex; gap: 10px; align-items: center; font-weight: 600; }
[data-ui] .aula-pdf {
  flex: none; padding: 3px 6px; border-radius: 4px;
  background: #DC2626; color: #FFFFFF;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
[data-ui] .aula-file-page { margin-top: 8px; font-size: 15px; color: #334155; }

#b1:checked ~ .try-fields .msg-1,
#b2:checked ~ .try-fields .msg-2,
#b3:checked ~ .try-fields .msg-3 { display: block; }

.try-out { background: var(--white); padding: 16svh var(--m) 200px 56px; }

/* The app's list screen, at its real size and in its own type. */
.app {
  width: min(440px, 100%);
  padding: 20px 18px 22px;
  border: 8px solid #E2E8F0; /* taste-skill-ignore: the phone's edge, as on the Aula screen beside it (data-ui) */
  border-radius: 32px;
  background: #F1F5F9;
  color: #1E293B;
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.35;
}
.out { display: none; }
#b1:checked ~ .try-fields .out-1,
#b2:checked ~ .try-fields .out-2,
#b3:checked ~ .try-fields .out-3 { display: block; }

.app-day { margin: 0 4px 8px; font-size: 15px; font-weight: 700; color: #0F172A; }
.card + .app-day { margin-top: 18px; }
.card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0; /* taste-skill-ignore: the app's own card border (data-ui) */
}
.card-body { display: flex; flex-direction: column; gap: 2px; }
.card-title { font-size: 16px; font-weight: 600; color: #0F172A; }
.card-child { font-size: 13px; font-weight: 600; color: #2563EB; }
.card-action { font-size: 15px; color: #1E293B; }
.card-time { font-size: 13px; color: #475569; }
.icon-tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; }
.icon-tile svg { width: 20px; height: 20px; }
/* The app's category colours (app/(tabs)/index.tsx CATEGORY_COLORS), as on the old site. */
.icon-tile--amber { color: #F59E0B; background: #FEF3C7; }
.icon-tile--red { color: #EF4444; background: #FEE2E2; }
.icon-tile--green { color: #10B981; background: #D1FAE5; }
.icon-tile--purple { color: #8B5CF6; background: #EDE9FE; } /* taste-skill-ignore: the app's own colour for Møder */
.icon-tile--orange { color: #F97316; background: #FFEDD5; }
.icon-tile--indigo { color: #6366F1; background: #E0E7FF; } /* taste-skill-ignore: the app's own colour for Arrangementer */
.app-label { margin: 22px 4px 8px; font-size: 13px; font-weight: 600; color: #475569; }
.push {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start;
  padding: 10px 12px; border-radius: 14px; background: #FFFFFF; font-size: 14px; line-height: 1.3;
}
.push + .push { margin-top: 6px; }
.push .note-icon { width: 30px; height: 30px; border-radius: 7px; background-size: 24px; }
.push > div { display: flex; flex-direction: column; }
.push .note-head b { font-size: 14px; }
.app-src { margin: 14px 4px 0; font-size: 13px; color: #475569; }

.try-title {
  position: absolute;
  left: var(--m);
  right: var(--m);
  bottom: 40px;
  display: flex;
  justify-content: space-between;
  font-size: var(--step-big);
  line-height: 1;
  letter-spacing: -0.03em;
  pointer-events: none;
}
.try-title-in { color: var(--night-ink); }
.try-title-out { color: var(--ink); }

/* ---------------------------------------------------------------- letter */

.letter { width: min(560px, 100% - 2 * var(--m)); margin: 0 auto; padding: 208px 0 200px; }
.letter-mark {
  display: block;
  width: 44px; height: 44px; border-radius: 50%;
  background: #2563EB url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 5.6a6.9 6.9 0 0 0-6.9 6.9v3.3L6.6 20.4a.9.9 0 0 0 .8 1.4h17.2a.9.9 0 0 0 .8-1.4l-2.5-4.6v-3.3A6.9 6.9 0 0 0 16 5.6zM12.9 23.6h6.2a3.1 3.1 0 0 1-6.2 0z' fill='white'/%3E%3C/svg%3E") center / 30px no-repeat;
}
.letter h2 { margin-top: 28px; font-size: var(--step-head); line-height: 1.08; letter-spacing: -0.02em; }
.letter h2 + p { margin-top: 36px; }
.letter p + p { margin-top: 1.1em; }
.letter p { line-height: 1.6; }
.letter mark { background: var(--mark); color: inherit; padding: 0 0.15em; }
.letter-ps { font-size: var(--step-note); }
.letter .letter-sign { margin-top: 40px; display: flex; flex-direction: column; }
.letter-sign i { font-size: var(--step-lead); line-height: 1.2; }
.letter-sign span { margin-top: 4px; font-size: var(--step-small); color: var(--ink-soft); }

/* ---------------------------------------------------------------- faq */

.faq {
  display: grid;
  grid-template-columns: calc(var(--col) - var(--m) - 64px) 1fr;
  column-gap: 64px;
  padding: 120px var(--m) 220px;
}
.faq h2 { font-size: var(--step-head); line-height: 1.08; letter-spacing: -0.02em; }
.faq-text { columns: 2; column-gap: 56px; font-size: var(--step-note); line-height: 1.55; }
.faq-text p { break-inside: avoid; margin-bottom: 22px; }
.faq-text b { font-weight: 600; }

/* ---------------------------------------------------------------- cta */

.cta {
  display: grid;
  grid-template-columns: calc(var(--col) - var(--m) - 64px) 1fr;
  column-gap: 64px;
  min-height: 92svh;
  padding: 120px var(--m) 56px;
  background: var(--accent);
  color: #FFFFFF;
}
.cta :focus-visible { outline-color: #FFFFFF; }
.cta-copy { align-self: end; }
.cta h2 { font-size: var(--step-big); line-height: 0.92; letter-spacing: -0.035em; max-width: 7ch; }
.cta-copy p { margin-top: 28px; max-width: 34ch; }
.cta-copy p + p { margin-top: 36px; }

.setup {
  position: relative;
  align-self: center;
  width: min(440px, 100%);
  min-height: 452px;
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: #FFFFFF;
  color: #1E293B;
  font-family: var(--ui);
  box-shadow: 0 30px 60px rgba(8, 20, 60, 0.35); /* taste-skill-ignore: the app's own dialog shadow (data-ui) */
}
/* The state lives in hidden inputs at the top of the dialog; labels elsewhere drive them. */
.setup-pick, .setup-opt, .setup-day { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; } /* taste-skill-ignore: visually hidden inputs, not a rule */

.setup-screen { display: none; }
#trin-tider:checked ~ .setup-screen--tider,
#trin-hent:checked ~ .setup-screen--hent,
#trin-klar:checked ~ .setup-screen--klar { display: flex; flex-direction: column; min-height: 400px; }

.setup-title { font-size: 22px; font-weight: 700; color: #0F172A; line-height: 1.2; }
.setup-hint { margin-top: 12px; font-size: 14px; color: #475569; }
.setup-explain { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #EFF6FF; font-size: 15px; line-height: 1.4; color: #1E293B; }

.setup-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #F1F5F9;
  cursor: pointer;
}
.setup-row + .setup-row { margin-top: 8px; }
.setup-row > span:first-child { display: flex; flex-direction: column; }
.setup-row b { font-size: 16px; font-weight: 600; color: #0F172A; }
.setup-row b + span { font-size: 14px; color: #475569; }
.setup-row--static { cursor: default; }
.setup-row--static span { font-size: 16px; font-weight: 600; color: #2563EB; }

.switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: #CBD5E1; transition: background-color 220ms ease; }
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #FFFFFF; transition: transform 260ms var(--ease-out);
}
#valg-aften:checked ~ .setup-screen label[for="valg-aften"] .switch,
#valg-morgen:checked ~ .setup-screen label[for="valg-morgen"] .switch { background: #2563EB; }
#valg-aften:checked ~ .setup-screen label[for="valg-aften"] .switch::after,
#valg-morgen:checked ~ .setup-screen label[for="valg-morgen"] .switch::after { transform: translateX(20px); }
#valg-aften:focus-visible ~ .setup-screen label[for="valg-aften"] .switch,
#valg-morgen:focus-visible ~ .setup-screen label[for="valg-morgen"] .switch { outline: 3px solid #2563EB; outline-offset: 2px; }

.setup-days { display: flex; justify-content: space-between; gap: 6px; margin-top: 16px; }
.setup-days label {
  display: grid; place-items: center; flex: 1; height: 40px; border-radius: 10px;
  background: #F1F5F9; color: #475569; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform var(--t-press) var(--ease-out);
}
.setup-days label:active { transform: scale(0.94); }
#dag-ma:checked ~ .setup-screen label[for="dag-ma"],
#dag-ti:checked ~ .setup-screen label[for="dag-ti"],
#dag-on:checked ~ .setup-screen label[for="dag-on"],
#dag-to:checked ~ .setup-screen label[for="dag-to"],
#dag-fr:checked ~ .setup-screen label[for="dag-fr"],
#dag-lo:checked ~ .setup-screen label[for="dag-lo"],
#dag-so:checked ~ .setup-screen label[for="dag-so"] { background: #2563EB; color: #FFFFFF; }
#dag-ma:focus-visible ~ .setup-screen label[for="dag-ma"],
#dag-ti:focus-visible ~ .setup-screen label[for="dag-ti"],
#dag-on:focus-visible ~ .setup-screen label[for="dag-on"],
#dag-to:focus-visible ~ .setup-screen label[for="dag-to"],
#dag-fr:focus-visible ~ .setup-screen label[for="dag-fr"],
#dag-lo:focus-visible ~ .setup-screen label[for="dag-lo"],
#dag-so:focus-visible ~ .setup-screen label[for="dag-so"] { outline: 3px solid #93C5FD; outline-offset: 2px; }
.setup-none { display: none; margin-top: 10px; font-size: 14px; color: #B45309; }
.setup:not(:has(.setup-day:checked)) .setup-none { display: block; }

.setup-foot { margin-top: auto; padding-top: 20px; }
.setup-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.setup-dots i { width: 8px; height: 8px; border-radius: 50%; background: #CBD5E1; }
.setup-dots i.on { width: 20px; border-radius: 4px; background: #2563EB; }
.setup-actions { display: flex; align-items: center; gap: 12px; }
.setup-actions .setup-button { flex: 1; }

.setup-button {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 52px; border-radius: 12px;
  background: #2563EB; color: #FFFFFF;
  font-size: 17px; font-weight: 600; cursor: pointer; user-select: none;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.setup-button svg { width: 20px; height: 20px; }
.setup-button:hover { background: #1D4ED8; }
.setup-button:active { transform: scale(0.98); }
.setup-back {
  border: 0; background: none; font-family: inherit;
  padding: 14px 6px; color: #2563EB; font-size: 16px; font-weight: 600; cursor: pointer; user-select: none;
}
.setup-back:hover { text-decoration: underline; }
.setup-pick:focus-visible ~ .setup-screen .setup-button { outline: 3px solid #0F172A; outline-offset: 3px; }

.setup-check { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 50%; background: #DCFCE7; color: #16A34A; }
.setup-check svg { width: 30px; height: 30px; }
.setup-summary { margin-top: 12px; font-size: 16px; line-height: 1.45; color: #1E293B; }
.setup-summary span { display: none; }
#valg-aften:checked ~ #valg-morgen:checked ~ .setup-screen .sum-begge,
#valg-aften:checked ~ #valg-morgen:not(:checked) ~ .setup-screen .sum-aften,
#valg-aften:not(:checked) ~ #valg-morgen:checked ~ .setup-screen .sum-morgen,
#valg-aften:not(:checked) ~ #valg-morgen:not(:checked) ~ .setup-screen .sum-ingen { display: inline; }
.setup-summary .sum-hent-alle { display: inline; }
.setup:has(.setup-day:not(:checked)) .sum-hent-alle { display: none; }
.setup:has(.setup-day:checked):has(.setup-day:not(:checked)) .sum-hent-nogle { display: inline; }
.setup:not(:has(.setup-day:checked)) .sum-hent-ingen { display: inline; }
.setup-again { align-self: flex-start; margin-top: auto; padding-left: 0; }

/* ---------------------------------------------------------------- footer */

.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  column-gap: 24px;
  padding: 30svh var(--m) 32px;
  font-size: var(--step-small);
}
.foot-links { display: flex; gap: 24px; }
.foot-year { text-align: right; color: var(--ink-soft); }
.foot-small { grid-column: 1 / -1; margin-top: 16px; max-width: 110ch; font-size: var(--step-small); color: var(--ink-soft); line-height: 1.55; }
.foot-small a { color: var(--ink); }

/* ---------------------------------------------------------------- phone and tablet */

@media (max-width: 899px) {
  .stage { grid-template-columns: 1fr; position: relative; }
  .stage-side { padding: 12px 12px 0; }
  .lock { position: relative; top: 0; height: 40svh; min-height: 330px; margin: 0; }
  .lock-state { padding: 68px 16px calc(20px + 5vw); }
  .note--older { display: none; }
  .lock-time { font-size: 72px; }
  .lock-noise, .lock-evening { display: none; }

  .hero { position: static; min-height: 0; padding: 0 20px 88px; }
  .wordmark { z-index: 2; }
  .nav { position: absolute; z-index: 3; top: 24px; left: 28px; right: 28px; justify-content: space-between; color: #FFFFFF; }
  .nav a:not(.nav-action):not([href="#proev-den"]) { display: none; }
  .wordmark { position: relative; right: auto; bottom: auto; order: -1; margin-top: -3.4vw; font-size: 21vw; line-height: 0.8; }
  .hero-copy { margin-top: 48px; }
  .hero-line { margin-top: 20px; }

  .intro, .how { padding: 88px 20px 104px; }
  .intro-text { margin-top: 32px; }
  .slip { padding: 28px 20px 56px; }
  .row--result { margin-inline: -20px; padding-inline: 20px; }

  .finds { padding: 104px 20px 120px; }
  .finds-head { grid-template-columns: 1fr; }
  .cats { margin-top: 48px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .cat { padding: 20px; }
  .finds-head p { grid-column: 1; }

  .try { display: flex; flex-direction: column; }
  .try-title { position: static; order: -1; flex-direction: column; padding: 88px 20px 32px; background: var(--night); }
  .try-title-out { color: var(--night-ink); }
  .try-fields { grid-template-columns: 1fr; grid-template-rows: none; min-height: 0; }
  .try-in, .try-out { grid-row: auto; display: block; }
  .try-in { padding: 0 20px 64px; }
  .try-out { padding: 48px 16px 72px; }

  .letter { width: auto; margin: 0 24px; padding: 112px 0 104px; }

  .faq { grid-template-columns: 1fr; padding: 72px 20px 112px; }
  .faq-text { columns: 1; margin-top: 32px; }

  .cta { grid-template-columns: 1fr; min-height: 84svh; padding: 88px 16px 56px; }
  .cta-copy { align-self: start; padding-inline: 4px; }
  .setup { margin-top: 48px; width: 100%; }

  .foot { display: block; padding: 20svh 20px 24px; }
  .foot > p + p { margin-top: 8px; }
  .foot-links { flex-wrap: wrap; gap: 8px 20px; }
  .foot-year { text-align: left; }
}

@media (min-width: 600px) and (max-width: 899px) {
  .intro-text { max-width: none; columns: 2; column-gap: 40px; }
  .intro-text p { break-inside: avoid; }
  .cta { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 24px; align-items: center; min-height: 0; padding: 120px 24px; }
  .cta-copy { align-self: center; }
  .setup { margin-top: 0; }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {

  /* The load: the title arrives, then the line, the action, the name; the notification lands. */
  .rise { animation: rise var(--t-reveal) var(--ease-expo) both; }
  .hero-copy .rise:nth-child(2) { animation-delay: 90ms; }
  .hero-copy .rise:nth-child(3) { animation-delay: 180ms; }
  .hero-copy .rise:nth-child(4) { animation-delay: 240ms; }
  .wordmark { animation: rise-mark 1200ms var(--ease-expo) 120ms both; }
  .note--arrive { animation: arrive 900ms var(--ease-expo) 650ms both; }
  .lock-morning .lock-clock { animation: fade 700ms ease 100ms both; }

  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes rise-mark { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes arrive { from { opacity: 0; transform: translateY(-28px) scale(0.96); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes enter { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  @keyframes swap { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  /* A message picked in "Prøv den": its text and its reminder arrive. */
  #b1:checked ~ .try-fields .msg-1, #b2:checked ~ .try-fields .msg-2, #b3:checked ~ .try-fields .msg-3 { animation: swap 420ms var(--ease-out) both; }
  #b1:checked ~ .try-fields .out-1, #b2:checked ~ .try-fields .out-2, #b3:checked ~ .try-fields .out-3 { animation: swap 560ms var(--ease-out) 120ms both; }
  #trin-tider:checked ~ .setup-screen--tider, #trin-hent:checked ~ .setup-screen--hent, #trin-klar:checked ~ .setup-screen--klar { animation: swap 380ms var(--ease-out) both; }
  #trin-klar:checked ~ .setup-screen--klar .setup-check { animation: pop 520ms var(--ease-out) 80ms both; }
  @keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

  @supports (animation-timeline: view()) {
    /* Entrances, scrubbed to the scroll: heading first, then the text, then the pictures. */
    .enter { animation: enter linear forwards; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    p.enter, .slip.enter { animation-range: entry 8% entry 80%; }
    .cat.enter:nth-child(3n+2) { animation-range: entry 8% entry 78%; }
    .cat.enter:nth-child(3n) { animation-range: entry 16% entry 86%; }

    /* The signature: the phone on the left changes with the section beside it. Sunday night
       fills it with school; Tuesday evening, one line; Wednesday morning, the line again. */
    @media (min-width: 900px) {
      .lock-morning {
        animation: morning-intro linear both, morning-how linear none;
        animation-timeline: --intro, --how;
        animation-range: cover 0% cover 100%, cover 0% cover 100%;
      }
      .lock-noise {
        animation: lock-noise linear both, noise-off linear none;
        animation-timeline: --intro, --how;
        animation-range: cover 0% cover 100%, cover 0% cover 100%;
      }
      .lock-evening { animation: lock-evening linear both; animation-timeline: --how; animation-range: cover 0% cover 100%; }
      .lock-noise .note { animation: enter linear both; animation-timeline: --intro; animation-range: cover 22% cover 40%; }
      .lock-noise .note:nth-child(2) { animation-range: cover 25% cover 43%; }
      .lock-noise .note:nth-child(3) { animation-range: cover 28% cover 46%; }
      .lock-noise .note:nth-child(4) { animation-range: cover 31% cover 49%; }
    }
  }

  /* Each layer hides (visibility) whatever it fully covers, so no text lies hidden under another. */
  @keyframes lock-noise { 0%, 22% { opacity: 0; visibility: hidden; } 32%, 99% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
  @keyframes noise-off { 0%, 23.9% { visibility: visible; } 24%, 100% { visibility: hidden; } }
  @keyframes lock-evening { 0%, 14% { opacity: 0; visibility: hidden; } 24%, 56% { opacity: 1; visibility: visible; } 66%, 100% { opacity: 0; visibility: hidden; } }
  @keyframes morning-intro { 0%, 31.9% { visibility: visible; } 32%, 100% { visibility: hidden; } }
  @keyframes morning-how { 0%, 55.9% { visibility: hidden; } 56%, 100% { visibility: visible; } }
}

/* ---------------------------------------------------------------- privacy policy page */

.policy-top {
  padding: 32px 0 104px;
  background: var(--night);
  color: var(--night-ink);
}
.policy-nav { display: flex; justify-content: space-between; align-items: center; padding-inline: var(--m); font-size: var(--step-small); }
.policy-nav a { text-decoration: none; }
.policy-nav a:hover { text-decoration: underline; }
.policy-brand { display: inline-flex; align-items: center; gap: 12px; font-size: var(--step-body); font-weight: 600; }
.policy-brand .letter-mark { width: 34px; height: 34px; background-size: 24px; }

.policy-inner { width: min(680px, 100% - 2 * var(--m)); margin-inline: auto; }
.policy-top h1 { margin-top: clamp(72px, 12vh, 140px); font-size: clamp(2.4rem, 1.2rem + 5.4vw, 6rem); line-height: 0.98; letter-spacing: -0.03em; }
.policy-top .updated { margin-top: 24px; font-size: var(--step-small); color: var(--night-soft); }

.policy { padding: 96px 0 40px; }
.policy-lead { font-size: var(--step-lead); line-height: 1.45; }
.policy h2 { margin-top: 64px; font-size: var(--step-lead); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.policy h2 + p, .policy h2 + ul { margin-top: 14px; }
.policy p + p, .policy ul + p, .policy p + ul { margin-top: 16px; }
.policy ul { margin-bottom: 0; padding-left: 1.2em; }
.policy li + li { margin-top: 10px; }
.policy li::marker { color: var(--accent); }
.policy strong { font-weight: 600; }

@media (max-width: 899px) {
  .policy-top { padding: 24px 0 72px; }
  .policy-nav { padding-inline: 20px; }
  .policy { padding: 64px 0 24px; }
  .policy h2 { margin-top: 48px; }
}

.policy + .foot { padding-top: 120px; }
