/* julekaker.no – komponenter. Mobil først. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--tex-paper), var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: var(--lh-tight); margin: 0 0 var(--s-3); }
h1, h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: 0; }
h1 { color: var(--c-primary); }
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); font-weight: 700; }
p { margin: 0 0 var(--s-4); }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: var(--s-2); top: -100px; background: var(--c-primary); color: #fff; padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { top: var(--s-2); }

.container { width: 100%; max-width: var(--w-page); margin: 0 auto; padding: 0 var(--gutter); }
.read { max-width: var(--w-read); }
.muted { color: var(--c-ink-muted); }
.small { font-size: var(--fs-sm); }
.stack > * + * { margin-top: var(--s-4); }
[hidden] { display: none !important; }

/* Forhåndsvisningsbanner */
.preview-banner { background: var(--c-accent-deep); color: var(--c-cream); font-size: var(--fs-xs); padding: var(--s-2) 0; }
.preview-banner a { color: inherit; }

/* Topptekst: julerød strikk (lusekofte) med snøfall, selburosebord og lysslynge */
.site-header { position: relative; isolation: isolate; background: var(--jul-strikk) 0 0 / 36px 36px, radial-gradient(ellipse 60% 140% at 50% 0%, #a3301f 0%, transparent 70%), var(--c-jul); color: var(--c-cream); }
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--jul-sno) 0 0 / 400px 300px, var(--jul-sno) 130px 90px / 260px 195px; opacity: .55; animation: snofall 40s linear infinite; }
.site-header::after { content: ''; display: block; height: 60px; margin-top: var(--s-1); background: var(--jul-bord) repeat-x 50% 0 / auto 60px, var(--c-jul); }
/* Lysslyngen henger fra bordet og ned over siden */
main { position: relative; padding-top: 30px; }
main::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 48px; z-index: 2; pointer-events: none; background: var(--jul-lys) repeat-x 50% 0 / 180px 48px; }
@keyframes snofall { from { background-position: 0 0, 130px 90px; } to { background-position: 40px 300px, 150px 285px; } }
@media (prefers-reduced-motion: reduce) { .site-header::before { animation: none; } }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding-top: var(--s-3); padding-bottom: var(--s-3); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--c-cream); font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; min-height: var(--tap); }
.brand img { width: 36px; height: 36px; }
.brand span b { color: var(--c-ochre-light); font-weight: 700; }
.site-nav { order: 3; width: 100%; }
.site-nav ul { list-style: none; margin: 0 calc(-1 * var(--s-3)); padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s-1); }
.site-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-md); text-decoration: none; color: var(--c-cream); font-weight: 700; font-size: var(--fs-md); white-space: nowrap; }
.site-nav a:hover { background: rgba(242, 230, 204, 0.12); }
.site-nav a[aria-current='page'] { background: var(--c-ochre); color: var(--c-ink); }
.header-search { margin-left: auto; display: flex; }
.header-search a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); min-width: var(--tap); justify-content: center; color: var(--c-cream); font-weight: 700; text-decoration: none; border-radius: var(--r-md); }
.header-search a:hover { background: rgba(242, 230, 204, 0.12); }
.site-header :focus-visible { box-shadow: 0 0 0 3px var(--c-jul-deep), 0 0 0 6px var(--c-cream); }
@media (min-width: 56rem) {
  .site-nav { order: 0; width: auto; margin-left: var(--s-4); }
}

/* Knapper: malt, litt ujevne hjørner. Primær = oksblodrød, sekundær = blå kontur. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-md);
  border: 2px solid var(--c-accent); background: var(--c-accent); color: var(--c-cream);
  font: 700 var(--fs-base) / 1.2 var(--f-sans); text-decoration: none; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
  transition: background var(--motion), color var(--motion);
}
.btn:hover { background: var(--c-accent-deep); border-color: var(--c-accent-deep); }
.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); box-shadow: none; }
.btn--ghost:hover { background: var(--c-primary-soft); border-color: var(--c-primary); }
.btn--berry { background: var(--c-primary); border-color: var(--c-primary); }
.btn--berry:hover { background: var(--c-primary-deep); border-color: var(--c-primary-deep); }
.btn--small { min-height: 40px; padding: 0 var(--s-3); font-size: var(--fs-sm); }
.btn[aria-pressed='true'] { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-cream); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--c-primary); text-decoration: underline; font: inherit; cursor: pointer; min-height: var(--tap); }

/* Skjema */
label { font-weight: 700; }
input[type='search'], input[type='text'], input[type='number'], input[type='time'], input[type='date'], select, textarea {
  font: inherit; color: var(--c-ink); background: var(--c-surface);
  border: 2px solid var(--c-line-strong); border-radius: var(--r-md);
  min-height: var(--tap); padding: var(--s-2) var(--s-3); width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--c-primary); }
.field { display: grid; gap: var(--s-1); }
.field__hint { font-size: var(--fs-sm); color: var(--c-ink-muted); font-weight: 400; }
.check { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--tap); padding: var(--s-2) 0; cursor: pointer; font-weight: 400; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--c-primary); flex: none; }

.search-form { display: flex; gap: var(--s-2); }
.search-form input { flex: 1; min-width: 0; }

/* Forside */
.hero { padding: var(--s-5) 0 var(--s-7); }
.hero__grid { display: grid; gap: var(--s-6); align-items: center; }
.hero__eyebrow { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: var(--fs-lg); color: var(--c-accent); margin-bottom: var(--s-1); }
.hero h1 { color: var(--c-primary); max-width: 16ch; }
.hero__lead { font-size: var(--fs-md); max-width: 36rem; }
.hero__search { margin: var(--s-5) 0 var(--s-4); max-width: 34rem; }
.hero__search label { display: block; font-family: var(--f-display); font-size: var(--fs-lg); color: var(--c-primary); margin-bottom: var(--s-2); }
.hero__paths { display: flex; flex-wrap: wrap; gap: var(--s-3); }
/* Bildet i en buet ramme, som et rosemalt skapdørpanel */
.hero__art { aspect-ratio: 4 / 3; border-radius: 48% 48% 12px 12px / 30% 30% 12px 12px; overflow: hidden; background: var(--c-primary); border: 6px solid var(--c-accent); box-shadow: 0 0 0 3px var(--c-ochre), var(--shadow-2); }
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.hero__figure { margin: 0; }
.hero__figure figcaption { margin-top: var(--s-2); text-align: right; }
@media (min-width: 56rem) { .hero__grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-md); border: 2px solid var(--c-primary); background: var(--c-surface); color: var(--c-primary); text-decoration: none; font-weight: 700; }
.chip:hover { border-color: var(--c-primary); }
.chip--active { background: var(--c-primary); color: var(--c-cream); border-color: var(--c-primary); }
button.chip { font: inherit; font-weight: 700; cursor: pointer; }

.section { padding: var(--s-7) 0; }
.section--tint { background: var(--orn-band) repeat-x 0 6px / auto 34px, var(--orn-band) repeat-x 0 calc(100% - 6px) / auto 34px, var(--tex-paper), var(--c-paper-deep); padding-top: calc(var(--s-7) + 20px); padding-bottom: calc(var(--s-7) + 20px); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-5); }
.section__head h2 { margin: 0; }
.section__head > a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }

/* Kort: malt panel med blå kant, okerlist og hjørneornament */
.cards { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); list-style: none; margin: 0; padding: 0; }
.card { position: relative; display: flex; flex-direction: column; background: var(--c-surface); border: 3px solid var(--c-primary); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); height: 100%; }
.card__media { aspect-ratio: 4 / 3; background: var(--c-primary); }
.card__media img, .card__media svg { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--s-4) var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; border-top: 4px solid var(--c-ochre); background: var(--orn-corner-br) no-repeat right 4px bottom 4px / 46px, var(--c-surface); }
.card__title { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-lg); margin: 0; }
.card__title a { color: var(--c-primary); text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; }
.card__title a:focus-visible { box-shadow: none; }
.card:focus-within { box-shadow: var(--focus-ring); }
.card__meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); font-size: var(--fs-sm); color: var(--c-ink-muted); margin: 0; padding: 0; list-style: none; }
.card__actions { position: relative; z-index: 1; margin-top: auto; display: flex; gap: var(--s-2); }

.badge { display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: 2px var(--s-2); border-radius: var(--r-sm); background: var(--c-primary-soft); color: var(--c-primary); }
.badge--berry { background: var(--c-accent-soft); color: var(--c-accent); }
.badge--warn { background: var(--c-warn-bg); color: #6b3f14; border: 1px solid #d9b98a; }

/* Merknader */
.note { border-left: 5px solid var(--c-primary); background: var(--c-primary-soft); padding: var(--s-3) var(--s-4); border-radius: 0 var(--r-md) var(--r-md) 0; margin: var(--s-4) 0; }
.note--warn { border-color: var(--c-warn-line); background: var(--c-warn-bg); }
.note--berry { border-color: var(--c-accent); background: var(--c-accent-soft); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note strong:first-child { display: block; }

/* Brødsmuler */
.crumbs { font-size: var(--fs-sm); padding: var(--s-3) 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.crumbs li + li::before { content: '›'; margin-right: var(--s-1); color: var(--c-ink-muted); }
.crumbs a { color: var(--c-ink-muted); display: inline-block; padding: var(--s-1) 0; }

/* Oppskrift */
.recipe-head { padding: var(--s-4) 0 var(--s-5); display: grid; gap: var(--s-5); }
.recipe-head__art { border-radius: 48% 48% 12px 12px / 26% 26% 12px 12px; overflow: hidden; background: var(--c-primary); aspect-ratio: 4 / 3; border: 6px solid var(--c-accent); box-shadow: 0 0 0 3px var(--c-ochre), var(--shadow-2); }
.recipe-head__art img { width: 100%; height: 100%; object-fit: cover; }
.recipe-head__art svg { width: 100%; height: 100%; }
.recipe-head h1 { color: var(--c-primary); margin-bottom: var(--s-2); }
.recipe-head__summary { font-size: var(--fs-md); }
.kind-label { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: var(--fs-md); color: var(--c-accent); margin-bottom: var(--s-1); }
@media (min-width: 56rem) { .recipe-head { grid-template-columns: 1fr 1fr; align-items: start; } }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: var(--s-4) 0; padding: 0; }
.facts div { background: var(--c-surface); border: 2px solid var(--c-line); border-top: 4px solid var(--c-ochre); border-radius: var(--r-md); padding: var(--s-3); }
.facts dt { font-size: var(--fs-sm); color: var(--c-accent); font-weight: 700; }
.facts dd { margin: 0; font-weight: 700; }
.facts dd small { display: block; font-weight: 400; color: var(--c-ink-muted); font-size: var(--fs-xs); }
@media (min-width: 40rem) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.jump { margin-top: var(--s-3); }

.recipe-body { display: grid; gap: var(--s-6); padding-bottom: var(--s-7); }
@media (min-width: 56rem) {
  .recipe-body { grid-template-columns: minmax(18rem, 25rem) 1fr; align-items: start; }
  /* Panelet følger siden. Ingen egen rullefelt i panelet. */
}
.panel { background: var(--orn-corner-br) no-repeat right 6px bottom 6px / 56px, var(--c-surface); border: 3px solid var(--c-primary); border-radius: var(--r-lg); padding: var(--s-5) var(--s-4) var(--s-7); box-shadow: var(--frame), var(--shadow-1); }
.scaler { border: 0; padding: 0; margin: 0 0 var(--s-4); }
.scaler legend { font-weight: 700; margin-bottom: var(--s-2); }
.scaler__options { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.scaler__target { display: flex; align-items: end; gap: var(--s-2); margin-top: var(--s-3); }
.scaler__target .field { flex: 1; }
.scaler__status { font-size: var(--fs-sm); color: var(--c-ink-muted); margin: var(--s-2) 0 0; }

.ing-group + .ing-group { margin-top: var(--s-5); }
.ing-group h3 { font-family: var(--f-display); font-size: var(--fs-md); color: var(--c-accent); border-bottom: 2px solid var(--c-ochre); padding-bottom: var(--s-2); }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px dashed var(--c-line); }
.ing-list .qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.ing-list .extra { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--c-ink-muted); }
.ing-list .ing-note { color: var(--c-ink-muted); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 var(--s-5) 3.25rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--c-primary); color: var(--c-cream); font-weight: 700; font-family: var(--f-display);
  box-shadow: 0 0 0 2px var(--c-surface), 0 0 0 4px var(--c-ochre);
}
.step-section { font-family: var(--f-display); color: var(--c-accent); font-size: var(--fs-lg); margin: var(--s-5) 0 var(--s-4); padding-bottom: var(--s-2); border-bottom: 2px solid var(--c-ochre); }
.step-section:first-child { margin-top: 0; }
.step__sensory { color: var(--c-ink-muted); margin: var(--s-1) 0 0; }
.step__sensory::before { content: 'Se etter: '; font-weight: 700; color: var(--c-accent); }
.step__uses { font-size: var(--fs-sm); margin: var(--s-2) 0 0; color: var(--c-ink-muted); }
.step__timer { margin-top: var(--s-2); }

.content-section { padding: var(--s-5) 0; border-top: 2px solid var(--c-line); }
.content-section h2 { font-size: var(--fs-lg); color: var(--c-primary); }
.trouble { display: grid; gap: var(--s-3); }
.trouble details { background: var(--c-surface); border-radius: var(--r-md); padding: 0 var(--s-4); }
.trouble summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; padding: var(--s-2) 0; }
.trouble details[open] { padding-bottom: var(--s-3); }
.two-col { display: grid; gap: var(--s-5); }
@media (min-width: 40rem) { .two-col { grid-template-columns: 1fr 1fr; } }
.plain-list { padding-left: 1.25rem; margin: 0 0 var(--s-4); }
.plain-list li + li { margin-top: var(--s-1); }

.sources { font-size: var(--fs-sm); }
.sources li + li { margin-top: var(--s-3); }
.status-box { font-size: var(--fs-sm); }
.status-box dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-4); margin: 0; }
.status-box dt { font-weight: 700; }
.status-box dd { margin: 0; }

/* Butikkmodul – tydelig avgrenset */
.shop { position: relative; border: 3px solid var(--c-shop); border-radius: var(--r-lg); background: var(--tex-paper), var(--c-surface); padding: var(--s-5) var(--s-4); margin: var(--s-6) 0; box-shadow: inset 0 0 0 2px var(--c-surface), inset 0 0 0 4px #e8b4a6, var(--shadow-1); scroll-margin-top: var(--s-5); }
.shop__label { display: inline-block; background: var(--c-shop); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 2px var(--s-2); border-radius: var(--r-sm); letter-spacing: 0.03em; }
.shop h2 { margin: var(--s-2) 0 var(--s-2); color: var(--c-shop); }
.shop__head p { margin: 0; max-width: 40rem; }
.shop__group { margin-top: var(--s-5); }
.shop__group h3 { font-size: var(--fs-md); color: var(--c-ink); border-bottom: 2px solid var(--c-line); padding-bottom: var(--s-1); margin-bottom: var(--s-3); }
.shop__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .shop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .product { grid-template-columns: 88px 1fr; } }
.product { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-3); align-items: start; background: #fff; border: 2px solid var(--c-line); border-radius: var(--r-md); padding: var(--s-3); transition: border-color var(--motion), box-shadow var(--motion); }
.product:hover { border-color: var(--c-shop); }
.product--picked { border-color: var(--c-shop); box-shadow: 0 0 0 2px var(--c-shop); }
.product__media { aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.product__media img { width: 100%; height: 100%; object-fit: contain; }
.product__body { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.product__name { font-family: var(--f-sans); font-size: var(--fs-sm); line-height: 1.3; margin: 0; }
.product__name a { color: var(--c-shop); font-weight: 700; text-decoration-thickness: 1px; }
.product__name a::after { content: ' →'; }
.product__why { margin: 0; font-size: var(--fs-sm); color: var(--c-ink); }
.product__meta { margin: 0; font-size: var(--fs-xs); color: var(--c-ink-muted); }
.product__pick { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; align-self: flex-start; }
.shop__footer { margin-top: var(--s-5); border-top: 2px solid var(--c-line); padding-top: var(--s-4); }
.shop__cart { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); margin-bottom: var(--s-3); }
.shop__cart p { margin: 0; }
.shop__disclosure { font-size: var(--fs-xs); color: var(--c-ink-muted); margin: 0; }
.shop-teaser { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'label label' 'pics text'; gap: var(--s-2) var(--s-3); align-items: center; margin-top: var(--s-4); padding: var(--s-3); border: 2px solid var(--c-shop); border-radius: var(--r-md); background: #fff; color: var(--c-ink); text-decoration: none; }
.shop-teaser:hover { box-shadow: 0 0 0 2px var(--c-shop); }
.shop-teaser__label { grid-area: label; justify-self: start; background: var(--c-shop); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 1px var(--s-2); border-radius: var(--r-sm); }
.shop-teaser__pics { grid-area: pics; display: flex; }
.shop-teaser__pics img { width: 48px; height: 48px; object-fit: contain; background: #fff; border: 1px solid var(--c-line); border-radius: 50%; }
.shop-teaser__pics img + img { margin-left: -14px; }
.shop-teaser__text { grid-area: text; display: flex; flex-direction: column; font-size: var(--fs-sm); line-height: 1.3; }
.shop-teaser__text strong { color: var(--c-shop); }
.btn--shop { background: var(--c-shop); border-color: var(--c-shop); }
.plan-shop { margin-top: var(--s-5); border: 3px solid var(--c-shop); border-radius: var(--r-md); background: #fff; padding: var(--s-4); }
.plan-shop h3 { color: var(--c-shop); margin: var(--s-2) 0 var(--s-1); }
.plan-shop h4 { font-family: var(--f-sans); font-size: var(--fs-sm); margin: var(--s-4) 0 var(--s-1); }
.plan-shop__list { list-style: none; margin: 0; padding: 0; }
.plan-shop__list li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s-3); align-items: center; padding: var(--s-2) 0; border-bottom: 1px dashed var(--c-line); }
.plan-shop__list img { width: 40px; height: 40px; object-fit: contain; }
.plan-shop__list a { color: var(--c-shop); font-weight: 700; font-family: var(--f-sans); font-size: var(--fs-sm); }
.plan-shop__list .from { display: block; font-size: var(--fs-xs); color: var(--c-ink-muted); }
.plan-shop .shop__disclosure { margin-top: var(--s-3); }
.btn--shop:hover { background: #9a0000; }

/* Oversikt og filtre */
.filters { display: grid; gap: var(--s-4); margin-bottom: var(--s-5); }
.filters__grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
.filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.result-count { font-weight: 700; }
.empty { background: var(--c-surface); border: 3px solid var(--c-primary); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--frame); }

/* Planlegger */
.planner { display: grid; gap: var(--s-6); padding-bottom: var(--s-7); }
.planner__step { background: var(--orn-corner-br) no-repeat right 6px bottom 6px / 56px, var(--c-surface); border: 3px solid var(--c-primary); border-radius: var(--r-lg); padding: var(--s-5) var(--s-4) var(--s-7); box-shadow: var(--frame), var(--shadow-1); }
.planner__step > h2 { font-size: var(--fs-lg); color: var(--c-primary); display: flex; gap: var(--s-3); align-items: baseline; }
.planner__step > h2 span { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--c-accent); color: var(--c-cream); font-size: var(--fs-md); box-shadow: 0 0 0 2px var(--c-surface), 0 0 0 4px var(--c-ochre); }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.pick { display: grid; grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-3); border: 2px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.pick.is-selected { border-color: var(--c-primary); background: var(--c-primary-soft); }
.pick__controls { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.pick__controls select { width: auto; }
.pick__meta { font-size: var(--fs-sm); color: var(--c-ink-muted); }
.shopping-list h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-ink-muted); margin-top: var(--s-4); }
.shopping-list ul { list-style: none; margin: 0; padding: 0; }
.shopping-list li { border-bottom: 1px dashed var(--c-line); }
.shopping-list .check { padding: var(--s-2) 0; }
.shopping-list .have { text-decoration: line-through; color: var(--c-ink-muted); }
.shopping-list .from { display: block; font-size: var(--fs-xs); color: var(--c-ink-muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--c-line); }
.timeline time { font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline .kind { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-ink-muted); }
.timeline .is-rest { color: var(--c-ink-muted); }
.timeline .is-oven { color: var(--c-accent); }
.form-row { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.presets { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.preset { text-align: left; background: var(--c-paper); border: 2px solid var(--c-primary); border-top: 5px solid var(--c-accent); border-radius: var(--r-md); padding: var(--s-3); font: inherit; cursor: pointer; min-height: var(--tap); color: var(--c-ink); }
.preset strong { display: block; color: var(--c-primary); font-family: var(--f-display); font-size: var(--fs-md); }
.preset:hover { border-color: var(--c-primary); }

/* Guide */
.article { padding: var(--s-4) 0 var(--s-7); }
.article h1 { color: var(--c-primary); }
.article .lead { font-size: var(--fs-md); }
.article h2 { font-size: var(--fs-lg); color: var(--c-primary); margin-top: var(--s-6); }

/* Bunntekst */
.site-footer { background: var(--jul-strikk) 0 0 / 36px 36px, var(--c-jul-deep); color: var(--c-cream); padding: 0 0 var(--s-6); margin-top: var(--s-6); }
.site-footer::before { content: ''; display: block; height: 60px; margin-bottom: var(--s-6); background: var(--jul-bord) repeat-x 50% 0 / auto 60px, var(--c-jul); }
.site-footer a { color: var(--c-cream); }
.site-footer :focus-visible { box-shadow: 0 0 0 3px var(--c-jul-deep), 0 0 0 6px var(--c-cream); }
.site-footer__grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: var(--s-1) 0; min-height: 32px; }
.site-footer h2 { font-size: var(--fs-lg); color: var(--c-ochre-light); }
.site-footer .small { opacity: 0.9; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--c-primary-deep); color: var(--c-cream); border: 2px solid var(--c-ochre); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); box-shadow: var(--shadow-2); z-index: 60; max-width: calc(100% - 2 * var(--gutter)); }

/* Bakemodus */
.bake-mode { position: fixed; inset: 0; z-index: 50; background: var(--tex-paper), var(--c-paper); display: flex; flex-direction: column; font-size: 1.25rem; }
.bake-mode__top { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--gutter); border-bottom: 3px solid var(--c-ochre); padding-top: calc(var(--s-2) + env(safe-area-inset-top)); background: var(--tex-wood), var(--c-primary); }
.bake-mode__top .btn--ghost { color: var(--c-cream); border-color: var(--c-cream); }
.bake-mode__top .btn--ghost:hover { background: rgba(242, 230, 204, 0.12); }
.bake-mode__title { font-family: var(--f-display); color: var(--c-cream); font-size: var(--fs-md); margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bake-mode__progress { height: 6px; background: var(--c-paper-deep); }
.bake-mode__progress div { height: 100%; background: var(--c-accent); transition: width var(--motion); }
.bake-mode__main { flex: 1; overflow-y: auto; padding: var(--s-5) var(--gutter) var(--s-6); }
.bake-mode__inner { max-width: 44rem; margin: 0 auto; }
.bake-mode__stepno { font-family: var(--f-display); font-style: italic; font-size: var(--fs-md); color: var(--c-accent); }
.bake-mode__text { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); line-height: 1.4; margin: var(--s-2) 0 var(--s-4); }
.bake-mode__nav { display: flex; gap: var(--s-3); padding: var(--s-3) var(--gutter); padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); border-top: 3px solid var(--c-ochre); background: var(--tex-paper), var(--c-paper-deep); }
.bake-mode__nav .btn { flex: 1; min-height: 56px; font-size: 1.125rem; }
.bake-mode .ing-list li { grid-template-columns: auto 6rem 1fr; align-items: start; }
.bake-mode .check-ing { width: 28px; height: 28px; accent-color: var(--c-primary); margin: 0; }
.bake-mode .is-done { color: var(--c-ink-muted); text-decoration: line-through; }
.timers { display: grid; gap: var(--s-2); margin: var(--s-4) 0; }
.timer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); background: var(--c-surface); border: 2px solid var(--c-line); border-radius: var(--r-md); padding: var(--s-2) var(--s-3); }
.timer__label { flex: 1 1 10rem; font-weight: 700; font-size: 1rem; }
.timer__time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.5rem; }
.timer.is-done { border-color: var(--c-accent); background: var(--c-accent-soft); }
body.is-baking { overflow: hidden; }

/* Dialog */
dialog { border: 3px solid var(--c-primary); border-radius: var(--r-lg); padding: var(--s-5); max-width: min(32rem, calc(100% - 2 * var(--gutter))); box-shadow: var(--shadow-2); background: var(--c-surface); color: var(--c-ink); }
dialog::backdrop { background: rgba(21, 43, 57, 0.55); }

.print-only { display: none; }

/* Programmatisk fokus (overskrifter med tabindex=-1) skal ikke vise ring */
[tabindex='-1']:focus { box-shadow: none; outline: none; }
.header-search svg { width: 26px; height: 26px; }
.shop__pick { width: 24px; height: 24px; margin: 0; accent-color: var(--c-shop); }

/* Gavelapp */
.label-preview { margin: var(--s-4) 0; }
.gift-label { border: 2px dashed var(--c-accent); border-radius: var(--r-md); padding: var(--s-4); background: var(--c-surface); max-width: 22rem; }
.gift-label h3 { font-family: var(--f-display); font-size: var(--fs-lg); color: var(--c-primary); margin: 0 0 var(--s-2); }
.gift-label p { margin: 0 0 var(--s-2); font-size: var(--fs-sm); }

/* Vurderinger og omtaler */
.stars { display: inline-block; line-height: 1; vertical-align: -0.08em; font-size: 1.05em; letter-spacing: 0.08em; }
.stars::before { content: '★★★★★'; background: linear-gradient(90deg, #a8741c calc(var(--rating, 0) / 5 * 100%), #c9b58f 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars--lg { font-size: 1.6em; }
.rating-line { margin: 0 0 var(--s-3); }
.rating-line a { text-decoration: none; color: var(--c-ink); }
.rating-line a:hover strong, .rating-line a:hover { text-decoration: underline; }
.card__rating { margin: var(--s-1) 0 0; }
.reviews__score { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); font-size: var(--fs-md); }
.reviews__bars { list-style: none; margin: 0 0 var(--s-4); padding: 0; max-width: 22rem; font-size: var(--fs-sm); }
.reviews__bars li { display: grid; grid-template-columns: 2.6rem 1fr 2rem; gap: var(--s-2); align-items: center; }
.reviews__bars .bar { height: 0.6rem; background: var(--c-paper-deep); border-radius: var(--r-pill); overflow: hidden; }
.reviews__bars .bar span { display: block; height: 100%; background: #a8741c; }
.review-form { background: var(--c-surface); border: 3px solid var(--c-primary); border-radius: var(--r-lg); padding: var(--s-4); box-shadow: var(--frame); margin: var(--s-4) 0; }
.review-form h3 { margin-top: 0; }
.review-form textarea, .review-form input[type=text] { width: 100%; }
.star-input { border: 0; padding: 0; margin: 0 0 var(--s-3); display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-1); }
.star-input legend { font-weight: 700; margin-bottom: var(--s-1); padding: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2.2rem; line-height: 1; min-width: var(--tap); min-height: var(--tap); display: grid; place-items: center; cursor: pointer; color: #c9b58f; border-radius: var(--r-sm); }
.star-input[data-value="1"] label:nth-of-type(-n+1), .star-input[data-value="2"] label:nth-of-type(-n+2), .star-input[data-value="3"] label:nth-of-type(-n+3), .star-input[data-value="4"] label:nth-of-type(-n+4), .star-input[data-value="5"] label:nth-of-type(-n+5) { color: #a8741c; }
.star-input input:focus-visible + label { box-shadow: var(--focus-ring); }
.star-input__text { margin-left: var(--s-2); color: var(--c-ink-muted); min-width: 6rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.review-form__status--error { color: var(--c-accent); font-weight: 700; }
.review-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.review { border-top: 2px solid var(--c-line); padding: var(--s-3) 0; }
.review p { margin: var(--s-1) 0 0; white-space: pre-line; }
.review__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.review--mod .review__text { background: var(--c-surface); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); }

/* Rosemalt skillelinje (laget med Magnific, se docs/designsystem.md) */
.orn-divider { height: 64px; margin: var(--s-4) auto; max-width: 30rem; background: var(--orn-divider) no-repeat center / contain; }
@media (max-width: 40rem) { .orn-divider { height: 48px; } }

/* Artikler: tabeller, A–Å-navigasjon og oppskriftslister */
.table-wrap { overflow-x: auto; margin: var(--s-4) 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--c-surface); }
.data-table caption { text-align: left; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-md); padding-bottom: var(--s-2); color: var(--c-primary); }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--c-line); }
.data-table thead th { background: var(--c-paper-deep); }
.data-table tbody th { font-weight: 700; }
.az-nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); margin: var(--s-4) 0; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-md); }
.az-nav a { display: inline-flex; min-width: var(--tap); min-height: var(--tap); align-items: center; justify-content: center; border: 2px solid var(--c-line); border-radius: var(--r-md); text-decoration: none; }
.recipe-index li { padding: var(--s-1) 0; }
.faq h3 { margin-top: var(--s-4); }
.guide-links li { padding: var(--s-2) 0; border-bottom: 1px dashed var(--c-line); }
.guide-links li:last-child { border-bottom: 0; }
.guide-shop { border: 2px solid var(--c-line); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); margin: var(--s-4) 0; background: var(--c-surface); }
.guide-shop .shop__label { margin: 0 0 var(--s-2); }
.guide-shop__list li { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-2) 0; }
.guide-shop__list img { flex: none; border-radius: var(--r-sm, 6px); }
.calc-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0 var(--s-3); max-height: 22rem; overflow-y: auto; padding: var(--s-2); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.calc-picks .check { min-height: 2.25rem; }
.calc-picks li { list-style: none; }
.review__reply { margin: var(--s-2) 0 0 var(--s-4); padding: var(--s-2) var(--s-3); border-left: 3px solid var(--c-jul, var(--c-primary)); background: var(--c-surface); border-radius: 0 var(--r-md) var(--r-md) 0; }
.review__reply .review__reply-head { margin: 0; }
.mod-reply textarea { width: 100%; min-height: 4.5rem; }
/* Pris og lagerstatus fra Slikkepott */
.product__price { margin: 2px 0 var(--s-1); }
.product__price strong { color: var(--c-ink); }
.product--soldout { opacity: .55; filter: grayscale(1); }
.product--soldout [data-stock] { font-weight: 700; }
.plan-shop__list .product__price, .plan-shop__list .from { display: block; }

/* Forsiden: hurtigvalg og tre steg */
.quick { margin: 0 0 var(--s-4); max-width: 34rem; }
.quick__label { font-weight: 700; margin: 0 0 var(--s-2); color: var(--c-primary); }
.quick__list { list-style: none; margin: 0; padding: 0 0 var(--s-2); display: flex; gap: var(--s-2); overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.quick__list li { flex: none; scroll-snap-align: start; }
.quick__list a { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); width: 84px; text-decoration: none; color: var(--c-ink); font-weight: 700; font-size: var(--fs-sm); text-align: center; line-height: 1.2; }
.quick__img { display: block; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 3px solid var(--c-ochre); background: var(--c-primary); }
.quick__img img { width: 100%; height: 100%; object-fit: cover; }
.quick__list a:hover .quick__img, .quick__list a:focus-visible .quick__img { border-color: var(--c-accent); }
@media (min-width: 56rem) { .quick__list { flex-wrap: wrap; overflow: visible; } }
.steps-section { padding-top: 0; }
.steps-title { font-size: var(--fs-lg); }
.steps-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.steps-nav a { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); background: var(--c-surface); border: 2px solid var(--c-line); border-radius: var(--r-md); text-decoration: none; color: var(--c-ink); height: 100%; }
.steps-nav a:hover { border-color: var(--c-primary); }
.steps-nav strong { display: block; color: var(--c-primary); font-family: var(--f-display); font-size: var(--fs-md); }
.steps-nav__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--c-jul, var(--c-accent)); color: #fff; font-weight: 700; }
@media (min-width: 40rem) { .steps-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Mobil: kompakt header, én menylinje og søket høyt opp */
@media (max-width: 40rem) {
  .site-header__inner { padding-top: var(--s-2); padding-bottom: 0; gap: 0 var(--s-2); }
  .brand { font-size: 1.3rem; min-height: 40px; }
  .brand img { width: 30px; height: 30px; }
  .site-nav ul { flex-wrap: nowrap; justify-content: space-between; margin: 0 calc(-1 * var(--s-2)); gap: 0; }
  .site-nav a { padding: 0 var(--s-2); font-size: 0.98rem; min-height: 44px; }
  .site-header::after { height: 30px; background-size: auto 30px; margin-top: 0; }
  main::before { height: 30px; background-size: 120px 30px; }
  .hero { padding: var(--s-5) 0 var(--s-5); }
  .hero__eyebrow, .hero__lead { display: none; }
  .hero h1 { font-size: 1.75rem; max-width: none; margin-bottom: var(--s-2); }
  .hero__search { margin: var(--s-2) 0 var(--s-4); }
  .hero__search label { font-size: var(--fs-md); }
  .hero__figure { display: none; }
}
/* Hindrer at den horisontale klassiker-raden gjør spalten bredere enn skjermen. */
.hero__grid > * { min-width: 0; }
.quick { max-width: min(34rem, 100%); }
.steps-nav .small { display: block; line-height: 1.4; margin-top: 2px; }
.quick__list a { width: 96px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
@media (max-width: 40rem) { .site-nav a { font-size: clamp(0.82rem, 3.6vw, 0.98rem); padding: 0 clamp(4px, 1.6vw, var(--s-2)); } }
