@import url('./tokens.css');

*,*::before,*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--kc-font);
  font-size: var(--kc-fs-body);
  line-height: var(--kc-lh-body);
  color: var(--kc-ink);
  background: var(--kc-bg);

  -webkit-font-smoothing: antialiased;
}

.num, td, input { }

a { color: var(--kc-primary); }
a:hover { color: var(--kc-primary-hover); }

:focus-visible {
  outline: 2px solid var(--kc-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--kc-fs-h1); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: var(--kc-fs-h2); font-weight: 700; line-height: 1.3; }
h3 { font-size: var(--kc-fs-h3); font-weight: 600; line-height: 1.35; }
h4 { font-size: var(--kc-fs-h4); font-weight: 600; line-height: 1.4; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }

.lead { font-size: 1.1875rem; line-height: 1.55; }
.muted { color: var(--kc-text-muted); }
.small { font-size: var(--kc-fs-small); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--kc-max-w);
  margin: 0 auto;
  padding: 0 var(--kc-space-5);
}
@media (min-width: 768px) {
  .wrap { padding: 0 var(--kc-space-6); }
}

/* ---------- Header ---------- */
.site-header {
  background: var(--kc-surface);
  border-bottom: 1px solid var(--kc-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--kc-space-5);
  height: 72px;
}
.brand {
  text-decoration: none;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.brand__name { font-weight: 800; color: var(--kc-ink); }
.brand__tld  { font-weight: 500; color: var(--kc-primary); }

.site-header__search {
  display: flex; align-items: center; gap: 10px;
  height: 44px; flex: 0 1 380px;
  padding: 0 12px;
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius-md);
  background: var(--kc-surface-2);
}
.site-header__search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: 400 var(--kc-fs-ui)/1.4 var(--kc-font);
  color: var(--kc-ink);
}
.site-header__search .shortcut {
  font-size: 12px; color: var(--kc-text-muted);
  border: 1px solid var(--kc-border);
  border-radius: 4px; padding: 1px 6px;
  background: var(--kc-surface);
  font-family: var(--kc-font-mono);
}

.site-nav {
  margin-left: auto;
  display: flex; gap: 4px; flex-shrink: 0;
  font-size: var(--kc-fs-ui); font-weight: 600;
}
.site-nav a {
  padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: var(--kc-ink);
}
.site-nav a[aria-current="page"] {
  color: var(--kc-primary); background: var(--kc-primary-soft);
}
.site-nav a.btn { color: var(--kc-on-primary); }
.site-nav a.btn--secondary,
.site-nav a.btn--ghost { color: var(--kc-primary); }

.site-header__search { flex: 1 1 460px; max-width: 560px; }

/* Mobile icon actions (search + menu) */
.site-header__mactions { display: none; margin-left: auto; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--kc-surface-2); border: 1px solid var(--kc-border); border-radius: 10px;
  color: var(--kc-ink); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--kc-primary-soft); color: var(--kc-primary); border-color: var(--kc-primary-soft); }
.icon-btn .icon-close { display: none; }
.is-menu-open .icon-btn[data-header-toggle="menu"] { background: var(--kc-primary-soft); color: var(--kc-primary); border-color: var(--kc-primary-soft); }
.is-menu-open .icon-btn[data-header-toggle="menu"] .icon-menu { display: none; }
.is-menu-open .icon-btn[data-header-toggle="menu"] .icon-close { display: block; }
.is-search-open .icon-btn[data-header-toggle="search"] { background: var(--kc-primary-soft); color: var(--kc-primary); border-color: var(--kc-primary-soft); }

/* Header sheets (mobile search + menu) */
.header-sheet { border-top: 1px solid var(--kc-border); background: var(--kc-surface); }
.header-sheet__inner {
  display: flex; align-items: center; gap: 12px;
  padding-top: 12px; padding-bottom: 12px;
}
.site-header__search--sheet { flex: 1 1 auto; max-width: none; height: 44px; }
.header-sheet__cancel {
  background: transparent; border: 0; padding: 8px 4px; cursor: pointer;
  color: var(--kc-primary); font: 600 15px var(--kc-font);
}
.header-drawer { padding: 8px 0 16px; }
.header-drawer__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px var(--kc-space-4);
  color: var(--kc-ink); text-decoration: none;
  font: 600 16px var(--kc-font);
}
.header-drawer__row.is-on { background: var(--kc-primary-soft); color: var(--kc-primary); }
.header-drawer__row svg { color: var(--kc-text-muted); }
.header-drawer__row.is-on svg { color: var(--kc-primary); }
.header-drawer__row--mini { font-weight: 500; color: var(--kc-text-muted); padding: 10px var(--kc-space-4); }
.header-drawer__divider { margin: 10px var(--kc-space-4); border: 0; border-top: 1px solid var(--kc-border); }

/* Tablet: keep inline search, swap nav for hamburger only (no search-icon btn) */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header__mactions { display: inline-flex; }
  .site-header__mactions [data-header-toggle="search"] { display: none; }
}
/* Mobile: hide inline search, show both icons */
@media (max-width: 760px) {
  .site-header__inner { height: 56px; gap: var(--kc-space-2); }
  .site-header__inner > .site-header__search { display: none; }
  .site-header__mactions [data-header-toggle="search"] { display: inline-flex; }
  .site-header__search--sheet { display: flex; }
}
@media (min-width: 901px) {
  .site-header__mactions,
  .header-sheet { display: none !important; }
}
/* Hide search-sheet above mobile breakpoint */
@media (min-width: 761px) {
  .header-sheet--search { display: none !important; }
}

/* ---------- Breadcrumbs ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 14px;
}
.crumbs .sep { color: var(--kc-border-strong); }
.crumbs [aria-current] { color: var(--kc-text-muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius-lg);
  padding: var(--kc-space-5);
}
.card--pad-lg { padding: var(--kc-space-6); }
.card--flush  { padding: 0; overflow: hidden; }

/* ---------- Hero / nøgletal ---------- */
.hero {
  display: flex; flex-wrap: wrap;
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius-lg);
  overflow: hidden;
}
.hero__key, .hero__picker {
  padding: var(--kc-space-6);
  flex: 1 1 300px;
}
.hero__key { border-right: 1px solid var(--kc-surface-2); display: flex; flex-direction: column; gap: 6px; }
.hero__label { font-size: 14px; font-weight: 600; color: var(--kc-text-muted); }
.hero__kcal {
  display: flex; align-items: baseline; gap: 8px;
}
.hero__kcal b {
  font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
  line-height: 1; font-weight: 700; letter-spacing: -0.02em;
}
.hero__kcal span { font-size: 1.5rem; font-weight: 500; color: var(--kc-text-muted); }
.hero__kj { font-size: 1.1875rem; font-weight: 500; }
.hero__src {
  margin-top: 10px; display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--kc-text-muted);
}
/* Vitaminer og mineraler — to kolonner med [navn | per 100 g | per portion] rækker. */
.micros-grid { display: grid; grid-template-columns: 1fr; gap: 0 32px; }
@media (min-width: 640px) { .micros-grid { grid-template-columns: 1fr 1fr; } }
.micro-row {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--kc-surface-2);
  font-size: 15px;
}
.micro-100    { }
.micro-portion { font-weight: 600; }
.hero__picker { display: flex; flex-direction: column; gap: var(--kc-space-3); }
.hero__macros {
  border-top: 1px solid var(--kc-surface-2);
  background: color-mix(in srgb, var(--kc-surface) 92%, var(--kc-bg));
  padding: var(--kc-space-5) var(--kc-space-6);
  display: flex; flex-direction: column; gap: var(--kc-space-4);
  flex-basis: 100%;
}

/* ---------- Portion chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 44px; padding: 0 16px;
  border-radius: var(--kc-radius-pill);
  border: 1.5px solid var(--kc-border);
  background: var(--kc-surface);
  color: var(--kc-ink);
  font: 500 var(--kc-fs-ui)/1 var(--kc-font);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.chip:hover { border-color: var(--kc-border-strong); background: var(--kc-primary-soft); }
.chip[aria-pressed="true"] {
  border-color: var(--kc-primary);
  background: var(--kc-primary);
  color: var(--kc-on-primary);
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border: 0; border-radius: var(--kc-radius-md);
  background: var(--kc-primary); color: var(--kc-on-primary);
  font: 600 var(--kc-fs-ui)/1 var(--kc-font);
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--kc-primary-hover); color: var(--kc-on-primary); }
.btn[disabled] { background: var(--kc-border); color: var(--kc-text-muted); cursor: not-allowed; }

.btn--secondary {
  background: var(--kc-surface); color: var(--kc-primary);
  border: 1.5px solid var(--kc-primary);
}
.btn--secondary:hover { background: var(--kc-primary-soft); color: var(--kc-primary-hover); border-color: var(--kc-primary-hover); }

.btn--ghost {
  height: 44px; padding: 0 12px;
  background: transparent; color: var(--kc-primary); border: 0;
}
.btn--ghost:hover { background: var(--kc-primary-soft); color: var(--kc-primary-hover); }

/* ---------- Inputs ---------- */
.input {
  display: inline-flex; align-items: center; gap: 6px;
  height: 48px; padding: 0 14px;
  border: 1.5px solid var(--kc-border-strong);
  border-radius: var(--kc-radius-md);
  background: var(--kc-surface);
  position: relative;
}
.input input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: 500 1.0625rem/1.4 var(--kc-font); color: var(--kc-ink);
}
.input span { color: var(--kc-text-muted); font-weight: 500; }
.input:focus-within { border-color: var(--kc-info); }

/* ---------- Macro bar ---------- */
.macro-bar {
  display: flex; height: 20px;
  border-radius: 6px; overflow: hidden; gap: 2px;
}
.macro-legend {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--kc-space-4);
}
@media (min-width: 720px) {
  .macro-legend { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.macro {
  display: flex; flex-direction: column; gap: 2px;
}
.macro__row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.macro__swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.macro__pct { font-size: 22px; font-weight: 700; }
.macro__g   { font-size: 14px; color: var(--kc-text-muted); }

/* ---------- Nutrition table ---------- */
.nutri-wrap { background: var(--kc-surface); border: 1px solid var(--kc-border); border-radius: var(--kc-radius-lg); padding: 8px 28px; }
.nutri {
  width: 100%; border-collapse: collapse; font-size: 16px;
}
.nutri thead th {
  text-align: right; padding: 14px 0;
  font-size: 13px; font-weight: 600; color: var(--kc-text-muted);
  border-bottom: 2px solid var(--kc-ink);
}
.nutri thead th:first-child { text-align: left; }
.nutri tbody th {
  text-align: left; padding: 12px 0; font-weight: 600;
}
.nutri tbody td { text-align: right; padding: 12px 0; }
.nutri tr { border-bottom: 1px solid var(--kc-surface-2); }
.nutri tr:last-child { border-bottom: 0; }
.nutri .sub th { padding-left: 20px; font-weight: 400; color: var(--kc-text-muted); }
.nutri .sub td { color: var(--kc-text-muted); }
.nutri .total th, .nutri .total td { font-weight: 600; }

@media (max-width: 500px) {
  .nutri-wrap { padding: 4px 16px; }
}

/* ---------- Disclosure (details/summary) ---------- */
details.disclose {
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius-lg);
  overflow: hidden;
}
details.disclose > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font: 600 17px/1.3 var(--kc-font);
  color: var(--kc-ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::after {
  content: '';
  width: 20px; height: 20px;
  background: no-repeat center / 20px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172120' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  transition: transform .18s ease;
}
details.disclose[open] > summary::after { transform: rotate(180deg); }
details.disclose > .disclose__body { padding: 0 20px 20px; border-top: 1px solid var(--kc-surface-2); }

/* ---------- Source card ---------- */
.source {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius-lg); padding: var(--kc-space-5);
  display: grid; grid-template-columns: 40px 1fr auto; gap: var(--kc-space-4);
  align-items: center;
}
.source__icon {
  width: 40px; height: 40px; border-radius: var(--kc-radius-md);
  background: var(--kc-surface-2); color: var(--kc-ink);
  display: flex; align-items: center; justify-content: center;
}
.source__link { font-size: 14px; font-weight: 600; }
@media (max-width: 560px) {
  .source { grid-template-columns: 40px 1fr; }
  .source__link { grid-column: 2 / -1; }
}

/* ---------- Related / list cards ---------- */
.card-link {
  text-decoration: none; color: var(--kc-ink);
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 12px; padding: 16px;
  display: grid; grid-template-columns: 1fr auto 20px;
  gap: 12px; align-items: center;
}
.card-link:hover { border-color: var(--kc-primary); box-shadow: var(--kc-shadow-sm); color: var(--kc-ink); }
.card-link .name { font-size: 16px; font-weight: 600; display: block; }
.card-link .sub  {
  font-size: 13px; color: var(--kc-text-muted);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 4px;
}
.card-link .kcal { font-size: 18px; font-weight: 700; display: block; text-align: right; }
.card-link .u    { font-size: 12px; color: var(--kc-text-muted); display: block; text-align: right; }

/* "Generisk" / "Mærkevare" chips brugt i food cards og søgeresultater. */
.chip-tag {
  font-size: 11px; font-weight: 600;
  padding: 2px 6px; border-radius: 6px;
  background: var(--kc-surface-2); color: var(--kc-text-muted);
}
.chip-tag--brand {
  background: var(--kc-secondary-soft);
  color: var(--kc-secondary);
}

/* ---------- Toplist row ---------- */
.toplist-row {
  text-decoration: none; color: var(--kc-ink);
  display: grid; grid-template-columns: 36px 1fr auto 20px;
  gap: 12px; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--kc-surface-2);
}
.toplist-row:last-child { border-bottom: 0; }
.toplist-row:hover { background: var(--kc-surface-2); color: var(--kc-ink); }
.toplist-rank {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--kc-ink); color: var(--kc-surface);
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Food page layout ---------- */
.food-grid {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: flex-start;
}
.food-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: var(--kc-space-7); }
.food-aside { flex: 1 1 300px; max-width: 300px; display: flex; flex-direction: column; gap: var(--kc-space-5); }
@media (max-width: 920px) { .food-aside { max-width: 100%; } }

/* ---------- Ad slot (reserveret højde) ---------- */
.ad {
  box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--kc-border);
  border-bottom: 1px solid var(--kc-border);
}
.ad--leader  { height: var(--kc-ad-leader-h); }
.ad--content { height: var(--kc-ad-content-h); }
.ad__label { font-size: 12px; color: var(--kc-text-muted); }
.ad__placeholder {
  width: 100%; max-width: 728px; height: 90px;
  background: repeating-linear-gradient(45deg, var(--kc-surface-2) 0 10px, var(--kc-bg) 10px 20px);
  border: 1px dashed var(--kc-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--kc-text-muted);
  font-family: var(--kc-font-mono);
}
.ad--content .ad__placeholder { width: 300px; height: 250px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--kc-ink); color: #E8EEEC;
  margin-top: var(--kc-space-8);
}
.site-footer .wrap {
  padding-top: 56px; padding-bottom: 40px;
  display: flex; flex-direction: column; gap: 40px;
}
.footer-cols {
  display: grid; gap: 40px 48px; font-size: var(--kc-fs-ui);
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  align-items: start;
}
.footer-col summary {
  list-style: none; cursor: default;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.footer-col summary::-webkit-details-marker { display: none; }
.footer-col__chevron { color: #A7B3B0; display: none; transition: transform .15s ease; }
.footer-col[open] .footer-col__chevron { transform: rotate(180deg); }
@media (min-width: 761px) {
  .footer-col .footer-col__links { display: flex !important; }
}
.footer-cols h3 {
  font-size: 14px; font-weight: 700; color: #FFFFFF; margin: 0 0 14px;
}
.footer-col__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-cols a { color: #B6C3C0; text-decoration: none; font-size: var(--kc-fs-small); }
.footer-cols a:hover { color: #FFFFFF; }
.footer-brand .brand__name { color: #FFFFFF; }
.footer-brand .brand__tld  { color: #5FB8BF; }
.footer-brand p { color: #A7B3B0; font-size: 14px; line-height: 1.5; max-width: 260px; margin: 14px 0 0; }

.footer-bottom {
  border-top: 1px solid #2E3B39;
  margin-top: 32px;
  padding-top: 28px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 13px; color: #A7B3B0;
}
.footer-bottom a { color: #FFFFFF; text-decoration: underline; }
.footer-bottom a:hover { text-decoration: none; }

@media (max-width: 760px) {
  .site-footer .wrap { padding-top: 36px; padding-bottom: 28px; gap: 24px; }
  .footer-cols { grid-template-columns: 1fr; gap: 0; }
  .footer-brand { padding-bottom: 20px; border-bottom: 1px solid #2E3B39; }
  .footer-col {
    border-bottom: 1px solid #2E3B39;
    padding: 18px 0;
  }
  .footer-col summary { cursor: pointer; }
  .footer-col__chevron { display: inline-block; }
  .footer-cols h3 { margin: 0; font-size: 15px; }
  .footer-col:not([open]) .footer-col__links { display: none; }
  .footer-col[open] .footer-col__links { margin-top: 14px; gap: 14px; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .footer-bottom__meta { white-space: pre-line; }
}

/* ---------- Hero / forside ---------- */
.home-hero {
  display: flex; flex-direction: column; gap: var(--kc-space-5);
  padding: var(--kc-space-7) 0;
}
.home-hero h1 { max-width: 760px; }
.home-hero .lead { max-width: 680px; color: var(--kc-text-muted); }

.home-search {
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 8px 0 20px;
  border: 2px solid var(--kc-primary); border-radius: var(--kc-radius-lg);
  background: var(--kc-surface);
  box-shadow: var(--kc-shadow-md);
  max-width: 680px;
}
.home-search input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--kc-ink);
  font: 400 18px/1.4 var(--kc-font);
}
.home-search .btn { height: 48px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
  font-size: 14px; padding: 6px 12px;
  border-radius: var(--kc-radius-pill);
  background: var(--kc-surface-2);
  color: var(--kc-ink); text-decoration: none;
}
.chip-link:hover { background: var(--kc-primary-soft); color: var(--kc-primary-hover); }

/* ---------- kcal ↔ kJ beregner ---------- */
.kcj-card { display: flex; flex-direction: column; gap: 20px; }
.kcj-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 20px; align-items: end;
}
.kcj-field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kcj-label { font-size: 14px; font-weight: 600; color: var(--kc-text-muted); }
.kcj-input {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; box-sizing: border-box;
  height: 90px; padding: 0 24px;
  border-radius: 14px;
  border: 2px solid var(--kc-border);
  background: var(--kc-surface-2);
  transition: border-color 0.15s;
}
.kcj-input input { line-height: 1; }
.kcj-field--active .kcj-input,
.kcj-input:focus-within {
  border-color: var(--kc-primary); background: var(--kc-surface);
}
.kcj-input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-weight: 700; font-size: clamp(32px, 2rem + 1vw, 44px);
  letter-spacing: -0.02em; color: var(--kc-ink);

}
.kcj-unit {
  font-weight: 700; font-size: 20px; color: var(--kc-primary);
}
.kcj-swap {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--kc-border); background: var(--kc-surface);
  color: var(--kc-text-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  align-self: center; margin-bottom: 6px;
}
.kcj-swap:hover { border-color: var(--kc-primary); color: var(--kc-primary); background: var(--kc-primary-soft); }
.kcj-divider { height: 1px; background: var(--kc-surface-2); margin: 4px 0; }
.kcj-presets {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.kcj-presets__label { font-size: 14px; font-weight: 600; color: var(--kc-text-muted); }
.kcj-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.kcj-chips .chip {
  height: 36px; padding: 0 14px; font-size: 14px;
  background: var(--kc-surface); border: 1.5px solid var(--kc-border);
  color: var(--kc-ink); cursor: pointer; font-weight: 500;
}
.kcj-chips .chip--on {
  border-color: var(--kc-primary); background: var(--kc-primary);
  color: var(--kc-on-primary); font-weight: 600;
}
.kcj-summary { margin-left: auto; font-size: 15px; }

.kcj-factors {
  display: flex; justify-content: center; align-items: center; gap: 20px;
  font-size: 16px;
}
.kcj-factors__sep { color: var(--kc-border); }

.kcj-grid {
  display: grid; gap: 32px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 840px) { .kcj-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; } }

.kcj-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kcj-table { padding: 12px 20px; }
.kcj-table table { width: 100%; border-collapse: collapse; }
.kcj-table thead th {
  font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--kc-text-muted); text-align: right; padding: 10px 0 8px;
  border-bottom: 1px solid var(--kc-surface-2);
}
.kcj-table thead th:first-child { text-align: left; }
.kcj-table tbody th { text-align: left; font-weight: 600; padding: 10px 8px 10px 0; }
.kcj-table tbody td { text-align: right; padding: 10px 0 10px 8px; color: var(--kc-ink); }
.kcj-table thead th { padding-right: 8px; }
.kcj-table thead th:last-child { padding-right: 0; padding-left: 8px; }
.kcj-table tbody tr { border-bottom: 1px solid var(--kc-surface-2); }
.kcj-table tbody tr:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .kcj-card { padding: 20px !important; }
  .kcj-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kcj-swap { transform: rotate(90deg); margin: 4px auto; align-self: center; }
  .kcj-input { height: 72px; padding: 0 18px; }
  .kcj-presets { flex-direction: column; align-items: stretch; gap: 12px; }
  .kcj-summary { margin-left: 0; text-align: center; }
  .kcj-factors { flex-direction: column; gap: 4px; font-size: 14px; }
  .kcj-factors__sep { display: none; }
}

/* ---------- Energibehov-beregneren ---------- */
.energy-grid {
  display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .energy-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
}
.energy-grid--bottom { gap: 32px; }
@media (min-width: 900px) {
  .energy-grid--bottom { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
}

.field-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.field-group .input { width: 100%; box-sizing: border-box; }
.field-label { font-size: 14px; font-weight: 600; color: var(--kc-text-muted); }
@media (max-width: 520px) {
  .energy-form { padding: 20px 16px !important; }
  .energy-3col .input { padding: 0 10px; }
}

.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  border-radius: 10px; background: var(--kc-surface-2);
  align-self: flex-start;
}
.seg__item {
  position: relative;
  height: 40px; padding: 0 24px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; font-weight: 500;
  color: var(--kc-ink);
}
.seg__item input { position: absolute; opacity: 0; pointer-events: none; }
.seg__item.is-on {
  background: var(--kc-surface); color: var(--kc-primary); font-weight: 600;
  box-shadow: var(--kc-shadow-sm);
}

.energy-3col {
  display: grid; gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 640px) { .energy-3col { gap: 16px; } }

.activity-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .activity-grid { grid-template-columns: 1fr 1fr; } }
.activity {
  position: relative;
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--kc-border); background: var(--kc-surface);
  cursor: pointer; min-width: 0;
}
.activity.is-on { border-color: var(--kc-primary); background: var(--kc-primary-soft); }
.activity input { position: absolute; opacity: 0; pointer-events: none; }
.activity__radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--kc-border);
  background: var(--kc-surface); margin-top: 2px; display: inline-block;
}
.activity.is-on .activity__radio {
  border-color: var(--kc-primary); background: var(--kc-primary);
  box-shadow: inset 0 0 0 3px var(--kc-surface);
}
.activity__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity__name { font-weight: 600; font-size: 15px; }
.activity__desc { font-size: 13px; color: var(--kc-text-muted); line-height: 1.4; }

.goal-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.goal {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 18px; border-radius: 10px;
  border: 1.5px solid var(--kc-border); background: var(--kc-surface);
  cursor: pointer; font-size: 15px; font-weight: 500; text-align: center;
}
.goal input { position: absolute; opacity: 0; pointer-events: none; }
.goal.is-on { border-color: var(--kc-primary); background: var(--kc-primary-soft); color: var(--kc-primary); font-weight: 600; }

/* Result-aside (sammenfatning) */
.energy-result { position: sticky; top: 20px; }
.energy-summary {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--kc-primary-soft);
  border-radius: 16px; padding: 24px 28px;
}
.energy-summary__eyebrow { font-size: 14px; font-weight: 600; color: var(--kc-ink); }
.energy-summary__big { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.energy-summary__big strong {
  font-size: clamp(44px, 2.5rem + 1.5vw, 60px);
  line-height: 1; font-weight: 700; letter-spacing: -0.02em;

}
.energy-summary__big span { font-size: 20px; font-weight: 500; color: var(--kc-text-muted); }
.energy-summary__kj { font-size: 15px; color: var(--kc-text-muted); }
.energy-summary__rows {
  margin-top: 16px; background: var(--kc-surface); border-radius: 12px; padding: 4px 16px;
}
.energy-summary__row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--kc-surface-2);
}
.energy-summary__row:last-child { border-bottom: 0; }
.energy-summary__row strong { font-size: 15px; display: block; }
.energy-summary__val { font-size: 16px; font-weight: 700; color: var(--kc-primary); }

/* Warning-tilstand (for lavt indtag) */
.energy-warning {
  display: grid; grid-template-columns: 24px 1fr; gap: 14px;
  background: var(--kc-warning-soft); color: var(--kc-ink);
  border-radius: 16px; padding: 20px 22px;
}
.energy-warning__icon { color: var(--kc-warning); margin-top: 2px; }

/* Andre beregnere (sidebar-list) */
.other-calc {
  display: grid; grid-template-columns: 36px 1fr 18px; gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 12px;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  text-decoration: none; color: var(--kc-ink);
}
.other-calc:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); }
.other-calc__glyph {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--kc-primary-soft); color: var(--kc-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.other-calc__name { font-weight: 600; font-size: 15px; }
.other-calc svg { color: var(--kc-text-muted); }

/* ---------- Deklaration · app chrome ---------- */
.site-header--app {
  background: var(--kc-ink); color: var(--kc-surface);
  border-bottom: 0;
}
.site-header--app .brand__name { color: var(--kc-surface); }
.site-header--app .brand__tld  { color: var(--kc-primary-soft); }
.app-crumb { color: rgba(255,255,255,0.6); font-size: 15px; font-weight: 500; }
.app-user {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--kc-surface); font-weight: 600; font-size: 14px;
}
.app-user__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--kc-primary-soft); color: var(--kc-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; letter-spacing: 0.02em;
}

/* App-shell: sidebar + main */
.app-shell {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  padding: 24px var(--kc-space-6) 72px;
  max-width: var(--kc-max-w); margin: 0 auto;
}
@media (min-width: 900px) { .app-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; } }

.app-sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.app-sidebar__link {
  padding: 12px 16px; border-radius: 10px;
  color: var(--kc-ink); text-decoration: none; font-size: 15px; font-weight: 500;
}
.app-sidebar__link:hover { background: var(--kc-surface-2); }
.app-sidebar__link--active { background: var(--kc-primary-soft); color: var(--kc-primary); font-weight: 600; }
@media (max-width: 899px) {
  .app-sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .app-sidebar__link { padding: 10px 14px; font-size: 14px; }
}

.app-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.app-main__header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Filter-row */
.app-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.app-filter__search {
  flex: 1 1 320px; min-width: 240px;
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  border: 1px solid var(--kc-border); border-radius: 10px;
  background: var(--kc-surface); color: var(--kc-text-muted);
}
.app-filter__search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 400 15px var(--kc-font); color: var(--kc-ink);
}
.app-filter__chips { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.chip--filter {
  height: 44px; padding: 0 20px; font-size: 14px; font-weight: 500;
  background: var(--kc-surface); border: 1.5px solid var(--kc-border);
  color: var(--kc-ink); cursor: pointer;
}
.chip--filter.chip--on {
  background: var(--kc-ink); border-color: var(--kc-ink);
  color: var(--kc-surface); font-weight: 600;
}

/* Produktliste */
.app-list { display: flex; flex-direction: column; gap: 10px; }
.app-row {
  display: grid; gap: 20px; align-items: center;
  grid-template-columns: minmax(0, 2fr) auto auto auto auto;
  padding: 16px 24px;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 12px;
  text-decoration: none; color: var(--kc-ink);
}
.app-row:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); }
.app-row__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-row__name strong { font-size: 16px; font-weight: 600; }
.app-row__sub { font-size: 13px; color: var(--kc-text-muted); }
.app-row__stat { display: flex; flex-direction: column; gap: 2px; min-width: 90px; }
.app-row__lbl { font-size: 12px; color: var(--kc-text-muted); }
.app-row__val { font-size: 14px; font-weight: 600; }

.app-pill {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.app-pill--klar   { background: var(--kc-primary-soft); color: var(--kc-primary); }
.app-pill--kladde { background: var(--kc-surface-2);    color: var(--kc-text-muted); }

@media (max-width: 760px) {
  .app-row {
    grid-template-columns: 1fr auto;
    gap: 10px; padding: 16px 18px;
  }
  .app-row__name { grid-column: 1 / -1; }
  .app-row__stat { min-width: 0; }
  .app-row__stat[data-pos="portion"] { grid-column: 1; grid-row: 2; }
  .app-row__stat[data-pos="per100"]  { grid-column: 2; grid-row: 2; }
  .app-row__stat[data-pos="updated"] { grid-column: 1; grid-row: 3; }
  .app-pill                          { grid-column: 2; grid-row: 3; justify-self: start; }
}

.app-subbox {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; margin-top: 12px;
  background: var(--kc-surface); border: 1px solid var(--kc-border); border-radius: 12px;
}

/* ---------- Deklaration · editor ---------- */
.app-shell--editor { grid-template-columns: 1fr; }

.editor-back a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--kc-primary); font-size: 14px; font-weight: 600;
  text-decoration: none; margin-bottom: 4px;
}
.editor-back a:hover { text-decoration: underline; }
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.editor-head__title { margin: 0; font-size: 28px; letter-spacing: -0.02em; flex: 1 1 auto; min-width: 0; }
.editor-title-input {
  font: inherit; color: inherit; border: 0; outline: 0; background: transparent;
  width: 100%; min-width: 0; padding: 2px 0;
}
.editor-title-input:focus { border-bottom: 2px solid var(--kc-primary); margin-bottom: -2px; }
.editor-status { display: inline-flex; align-items: center; gap: 10px; }

.editor-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) { .editor-grid { grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr); gap: 24px; align-items: start; } }
.editor-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.editor-col--right { position: sticky; top: 20px; }
@media (max-width: 999px) { .editor-col--right { position: static; } }

.editor-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.editor-card__title { margin: 0; font-size: 18px; }
.editor-card__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.editor-rows { display: flex; flex-direction: column; }
.editor-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 32px;
  gap: 12px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--kc-surface-2);
}
.editor-row:last-child { border-bottom: 0; }
.editor-row__name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.editor-row__name > span:first-child { font-weight: 500; font-size: 15px; }
.editor-row__allergen {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--kc-warning-soft); color: var(--kc-warning);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.editor-row__amount {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--kc-border); border-radius: 8px; background: var(--kc-surface);
}
.editor-row__amount input {
  width: 100%; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 500 15px var(--kc-font); text-align: right; color: var(--kc-ink);
}
.editor-row__amount span { color: var(--kc-text-muted); font-size: 13px; }
.editor-row__amount:focus-within { border-color: var(--kc-primary); }
.editor-row__remove {
  width: 32px; height: 32px; border: 0; background: transparent;
  color: var(--kc-text-muted); border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.editor-row__remove:hover { background: var(--kc-surface-2); color: var(--kc-ink); }

.editor-sum { display: flex; justify-content: space-between; font-size: 15px; color: var(--kc-text-muted); padding-top: 4px; }
.editor-sum strong { color: var(--kc-ink); }

.editor-3col {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .editor-3col { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

.editor-decl-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Toggle-switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track {
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--kc-border); position: relative; transition: background 0.15s;
}
.toggle__dot {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--kc-surface);
  transition: transform 0.15s;
}
.toggle input:checked + .toggle__track { background: var(--kc-primary); }
.toggle input:checked + .toggle__track .toggle__dot { transform: translateX(16px); }
.toggle__label { font-size: 14px; font-weight: 600; color: var(--kc-ink); }

/* Preview-kortet (SVG-style eksempel på etiket) */
.editor-decl-preview {
  background: var(--kc-surface-2); border: 1px solid var(--kc-border); border-radius: 10px;
  padding: 14px 16px;
  min-height: 120px;
}
.editor-decl-preview.hide-portion [data-portion-col] { display: none !important; }

.decl-mini { font-family: var(--kc-font); color: var(--kc-ink); }
.decl-mini__tabel table { width: 100%; border-collapse: collapse; font-size: 12px; }
.decl-mini__tabel th, .decl-mini__tabel td { padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.06); text-align: right; vertical-align: top; }
.decl-mini__tabel thead th { font-weight: 600; font-size: 11px; }
.decl-mini__tabel th:first-child { text-align: left; font-weight: 500; }
.decl-mini__tabel .is-bold th, .decl-mini__tabel .is-bold td { font-weight: 700; }
.decl-mini__tabel .is-indent th { padding-left: 10px; color: var(--kc-text-muted); font-size: 11px; font-weight: 400; }
.decl-mini__tabel .is-indent td { color: var(--kc-text-muted); font-size: 11px; }
.decl-mini__ingredients { margin: 10px 0 0; font-size: 11px; line-height: 1.5; }
.decl-mini__lineaer { display: none; font-size: 11px; line-height: 1.5; }
.decl-mini__lineaer p { margin: 0 0 8px; }
.editor-decl-preview.is-lineaer .decl-mini__tabel { display: none; }
.editor-decl-preview.is-lineaer .decl-mini__lineaer { display: block; }

.editor-exports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.editor-exports .btn { height: 44px; font-size: 14px; }
.ed-export--primary { background: var(--kc-primary); color: var(--kc-on-primary); }
.ed-export--primary:hover { background: var(--kc-primary-hover); }

@media (max-width: 640px) {
  .editor-card { padding: 20px 16px; }
  .editor-row {
    grid-template-columns: 1fr 110px 32px;
    row-gap: 8px;
  }
  .editor-row__name { grid-column: 1 / -1; grid-row: 1; flex-wrap: wrap; }
  .editor-row__amount { grid-column: 1 / 3; grid-row: 2; width: 110px; }
  .editor-row__remove { grid-column: 3; grid-row: 2; }
}

@media print {
  body > *:not(main) { display: none !important; }
  .app-shell { padding: 0; }
  .editor-col:not(.editor-col--right) { display: none; }
  .editor-exports, .editor-decl-controls, .editor-head, .editor-back { display: none; }
  .editor-decl-preview { background: #fff; border: 0; padding: 0; }
}

/* ---------- Mærkevare (produktside) ---------- */
.product-hero {
  display: grid; gap: 20px;
  grid-template-columns: 96px 1fr;
  align-items: start;
}
.product-hero__icon {
  width: 96px; height: 96px; border-radius: 12px;
  border: 1px solid var(--kc-border); background: var(--kc-surface-2);
  color: var(--kc-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-hero__icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-hero__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.product-hero__meta {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 14px; color: var(--kc-text-muted);
}
.product-hero__text h1 { margin: 0; }
@media (max-width: 640px) {
  .product-hero { grid-template-columns: 72px 1fr; gap: 14px; }
  .product-hero__icon { width: 72px; height: 72px; }
}

.off-warning {
  display: grid; grid-template-columns: 24px 1fr; gap: 14px;
  padding: 16px 20px;
  background: var(--kc-warning-soft); color: var(--kc-ink);
  border-radius: 12px;
}
.off-warning svg { color: var(--kc-warning); margin-top: 2px; }
.off-warning strong { color: var(--kc-warning); }
.off-warning p { color: var(--kc-ink); }
.off-warning a { color: var(--kc-warning); font-weight: 600; }

/* "Ikke oplyst" i tabeller */
.nutri em.muted { font-style: italic; font-size: 13px; }

/* ---------- Kategoriside ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chips .chip--filter { text-decoration: none; height: 44px; padding: 0 20px; }

.cat-table-wrap {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px; overflow: hidden;
}
.cat-table { width: 100%; border-collapse: collapse; }
.cat-table thead th {
  padding: 14px 20px;
  font-size: 13px; font-weight: 600; color: var(--kc-text-muted);
  border-bottom: 1px solid var(--kc-surface-2);
}
.cat-table__th a { color: inherit; text-decoration: none; display: inline-block; }
.cat-table__th a:hover { color: var(--kc-ink); }
.cat-table__th--left  { text-align: left; }
.cat-table__th--right { text-align: right; }
.cat-table__th.is-active a { color: var(--kc-primary); font-weight: 700; }

.cat-table tbody tr { border-bottom: 1px solid var(--kc-surface-2); }
.cat-table tbody tr:last-child { border-bottom: 0; }
.cat-table tbody tr:hover { background: var(--kc-primary-soft); }
.cat-table__name { padding: 14px 20px; text-align: left; font-weight: 500; }
.cat-table__name a { color: var(--kc-ink); font-weight: 600; text-decoration: none; display: block; }
.cat-table__name a:hover { color: var(--kc-primary); }
.cat-table__sub { display: block; font-size: 13px; color: var(--kc-text-muted); font-weight: 400; margin-top: 2px; }
.cat-table__num { padding: 14px 20px; text-align: right; font-size: 14px; }
.cat-table__num strong { font-size: 15px; }

@media (max-width: 760px) {
  .cat-table-wrap { display: none; }
  .cat-mobile { display: flex; flex-direction: column; gap: 14px; }
}
@media (min-width: 761px) {
  .cat-mobile { display: none; }
}

.cat-sort { display: flex; justify-content: flex-end; }
.cat-sort label { display: inline-flex; flex-direction: column; gap: 4px; }

.cat-cards { display: flex; flex-direction: column; gap: 10px; }
.cat-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  background: var(--kc-surface); border: 1px solid var(--kc-border); border-radius: 12px;
  text-decoration: none; color: var(--kc-ink);
}
.cat-card:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); }
.cat-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cat-card__head strong { font-size: 16px; }
.cat-card__kcal { font-size: 14px; color: var(--kc-text-muted); }
.cat-card__kcal strong { font-size: 17px; color: var(--kc-ink); margin-right: 2px; }
.cat-card__macros { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.cat-card__macros > span { display: flex; flex-direction: column; gap: 2px; }
.cat-card__lbl { font-size: 12px; color: var(--kc-text-muted); }
.cat-card__val { font-size: 14px; font-weight: 600; }

.cat-pager {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 4px 2px;
}
.cat-pager__nav { display: inline-flex; gap: 6px; align-items: center; }
.cat-pager__btn {
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 999px; border: 1.5px solid var(--kc-border); background: var(--kc-surface);
  color: var(--kc-ink); text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
}
.cat-pager__btn:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); color: var(--kc-primary); }
.cat-pager__btn.is-current {
  background: var(--kc-ink); border-color: var(--kc-ink); color: var(--kc-surface); font-weight: 700;
}
.cat-pager__gap { padding: 0 4px; color: var(--kc-text-muted); }

.cat-toplist {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 20px;
  background: var(--kc-surface); border: 1px solid var(--kc-border); border-radius: 12px;
  text-decoration: none; color: var(--kc-ink);
}
.cat-toplist:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); }
.cat-toplist svg { color: var(--kc-text-muted); }

/* ---------- 404 ---------- */
.not-found {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 20px;
}
.not-found__code {
  font-size: clamp(96px, 10vw + 24px, 160px);
  line-height: 1; font-weight: 700; letter-spacing: -0.04em;
  color: var(--kc-border-strong);

}
.not-found__title { margin: 4px 0 0; letter-spacing: -0.02em; }
.not-found__lead { color: var(--kc-text-muted); max-width: 540px; margin: 0; }
.not-found__search { width: 100%; max-width: 580px; margin: 10px 0 4px; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 8px; }
.not-found__links a { color: var(--kc-primary); font-weight: 600; text-decoration: none; }
.not-found__links a:hover { text-decoration: underline; }

/* ---------- Kontakt ---------- */
.kontakt-wrap {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .kontakt-wrap { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 40px; }
}
.kontakt-main  { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.kontakt-aside { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Om data ---------- */
.om-wrap {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .om-wrap { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
}
.om-toc {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 900px) { .om-toc { position: sticky; top: 20px; } }
.om-toc__title { font-size: 14px; font-weight: 700; }
.om-toc nav { display: flex; flex-direction: column; gap: 10px; }
.om-toc nav a { color: var(--kc-primary); text-decoration: none; font-size: 15px; font-weight: 500; }
.om-toc nav a:hover { text-decoration: underline; }

.om-main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.om-main h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0; }
.om-main p { line-height: 1.6; }

.om-sources { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .om-sources { grid-template-columns: 1fr 1fr; } }
.om-source { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.om-source strong { font-size: 17px; }

.om-table { width: 100%; border-collapse: collapse; }
.om-table thead th {
  text-align: left; padding: 14px 24px;
  font-size: 13px; font-weight: 600; color: var(--kc-text-muted);
  border-bottom: 1px solid var(--kc-surface-2);
}
.om-table tbody tr { border-bottom: 1px solid var(--kc-surface-2); }
.om-table tbody tr:last-child { border-bottom: 0; }
.om-table tbody th {
  padding: 16px 24px; text-align: left; font-weight: 600; font-size: 15px;
  vertical-align: top; min-width: 160px; width: 1%;
}
.om-table tbody td { padding: 16px 24px; font-size: 15px; line-height: 1.5; vertical-align: top; }
.om-table--cookies tbody th { font-weight: 500; font-family: var(--kc-font-mono); font-size: 14px; }
.om-table--cookies tbody th code { font-family: inherit; background: transparent; padding: 0; }

.om-report {
  background: var(--kc-primary-soft); border-color: transparent;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 24px 28px;
}

@media (max-width: 640px) {
  .om-table tbody th { padding: 14px 16px 4px; min-width: 0; display: block; }
  .om-table tbody td { padding: 0 16px 14px; display: block; color: var(--kc-text-muted); font-size: 14px; }
}

/* ---------- BMI · resultat-skala ---------- */
.bmi-card { border-top: 1px solid var(--kc-border); }
.bmi-summary {
  display: flex; flex-direction: column; gap: 20px;
  padding-top: 24px; border-top: 1px solid var(--kc-surface-2);
}
.bmi-summary__head {
  display: grid; grid-template-columns: auto auto 1fr; gap: 20px; align-items: baseline;
}
.bmi-summary__eyebrow { font-size: 15px; font-weight: 600; color: var(--kc-ink); }
.bmi-summary__big {
  font-size: clamp(44px, 2.2rem + 2vw, 60px);
  line-height: 1; font-weight: 700; letter-spacing: -0.02em;

}
.bmi-summary__sub { font-size: 15px; color: var(--kc-text-muted); max-width: 300px; }

.bmi-scale { position: relative; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.bmi-scale__bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  height: 10px;
}
.bmi-scale__seg { background: var(--kc-surface-2); border-radius: 3px; }
.bmi-scale__seg.is-on { background: var(--kc-ink); }
.bmi-scale__tick {
  position: absolute; top: 2px; width: 2px; height: 24px;
  background: var(--kc-ink); border-radius: 2px;
  transform: translateX(-50%);
}

.bmi-scale__labels {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.bmi-scale__lbl { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--kc-text-muted); }
.bmi-scale__range { font-weight: 500; }
.bmi-scale__name { font-size: 12px; }
.bmi-scale__lbl.is-on { color: var(--kc-ink); }
.bmi-scale__lbl.is-on .bmi-scale__range,
.bmi-scale__lbl.is-on .bmi-scale__name { font-weight: 700; }

.bmi-info ul { margin: 0; padding-left: 20px; }
.bmi-info li { padding-left: 4px; }

@media (max-width: 640px) {
  .bmi-summary__head {
    grid-template-columns: auto 1fr;
  }
  .bmi-summary__sub { grid-column: 1 / -1; }
  .bmi-scale__labels { font-size: 12px; }
  .bmi-scale__name { font-size: 11px; }
}

/* ---------- Forbrænding · aktivitet-pills ---------- */
.ex-activities {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}
.ex-act {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 92px; padding: 14px 10px;
  background: var(--kc-surface); border: 1.5px solid var(--kc-border); border-radius: 12px;
  cursor: pointer; text-align: center;
}
.ex-act:hover { border-color: var(--kc-border-strong); }
.ex-act.is-on { border-color: var(--kc-primary); background: var(--kc-primary-soft); color: var(--kc-primary); }
.ex-act input { position: absolute; opacity: 0; pointer-events: none; }
.ex-act__icon { color: var(--kc-ink); }
.ex-act.is-on .ex-act__icon { color: var(--kc-primary); }
.ex-act__name { font-weight: 600; font-size: 15px; }

/* ---------- Proteinbehov · eksempel-dag ---------- */
.protein-day {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 20px; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--kc-surface-2);
  text-decoration: none; color: var(--kc-ink);
}
.protein-day:hover { background: var(--kc-primary-soft); }
.protein-day__name { font-size: 15px; grid-column: 1; grid-row: 1; }
.protein-day__name strong { font-weight: 600; }
.protein-day__value { grid-column: 2; grid-row: 1; font-weight: 700; font-size: 16px; white-space: nowrap; }
.protein-day__bar {
  grid-column: 1 / -1; grid-row: 2;
  height: 6px; border-radius: 3px; background: var(--kc-surface-2); overflow: hidden;
}
.protein-day__fill { height: 100%; background: var(--kc-macro-protein); border-radius: 3px; }

.protein-day__sum {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--kc-surface-2);
  font-size: 15px;
}
.protein-day__sum strong { font-weight: 700; }

/* ---------- Beregnere · oversigt ---------- */
.calcs-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .calcs-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .calcs-grid { grid-template-columns: 1fr 1fr 1fr; } }
.calc-tile {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 22px 24px;
  background: var(--kc-surface); border: 1px solid var(--kc-border); border-radius: 14px;
  text-decoration: none; color: var(--kc-ink);
  min-height: 112px;
}
.calc-tile:hover { border-color: var(--kc-primary); box-shadow: var(--kc-shadow-sm); }
.calc-tile__icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.calc-tile__icon--teal { background: var(--kc-primary-soft); color: var(--kc-primary); }
.calc-tile__icon--warm { background: var(--kc-warning-soft); color: var(--kc-warning); }
.calc-tile__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.calc-tile__text strong { font-size: 17px; font-weight: 700; }
.calc-tile__text span { font-size: 14px; color: var(--kc-text-muted); line-height: 1.5; }

/* ---------- Topliste ---------- */
.tl-list { display: flex; flex-direction: column; gap: 10px; }
.tl-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 20px; align-items: center;
  padding: 16px 20px;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px;
  text-decoration: none; color: var(--kc-ink);
}
.tl-row:hover { border-color: var(--kc-primary); }
.tl-row__rank {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--kc-ink); color: var(--kc-surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; justify-self: center;
}
.tl-row__main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-row__name { font-weight: 600; font-size: 16px; }
.tl-row__sub  { font-size: 13px; color: var(--kc-text-muted); }
.tl-bar { height: 6px; border-radius: 3px; background: var(--kc-surface-2); overflow: hidden; }
.tl-bar__fill { height: 100%; background: var(--kc-macro-protein); border-radius: 3px; }
.tl-row__value { text-align: right; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.tl-row__value strong {
  font-size: 20px; font-weight: 700; color: var(--kc-ink);

}
.tl-row__u { font-size: 13px; font-weight: 500; color: var(--kc-text-muted); margin-left: 2px; }
.tl-row__caption { font-size: 12px; color: var(--kc-text-muted); }
.tl-affiliate { margin: 4px 0; }

@media (max-width: 640px) {
  .tl-row { grid-template-columns: 40px 1fr auto; gap: 12px; padding: 14px 16px; }
  .tl-row__rank { width: 28px; height: 28px; font-size: 13px; }
  .tl-row__value strong { font-size: 18px; }
}

/* ---------- Sammenligning ---------- */
.cmp-cards {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cmp-cards { grid-template-columns: 1fr 1fr; } }
.cmp-card {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 6px;
}
.cmp-card__title { color: var(--kc-ink); font-weight: 700; font-size: 17px; text-decoration: none; }
.cmp-card__title:hover { color: var(--kc-primary); text-decoration: underline; }
.cmp-card__big { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.cmp-card__big strong {
  font-size: clamp(44px, 2rem + 2.5vw, 60px);
  line-height: 1; font-weight: 700; letter-spacing: -0.02em;

}
.cmp-card__big span { font-size: 20px; font-weight: 500; color: var(--kc-text-muted); }
.cmp-card__sub { font-size: 14px; color: var(--kc-text-muted); }

.cmp-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cmp-swap { height: 44px; padding: 0 20px; font-size: 14px; }

.cmp-table-wrap {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px; overflow: hidden;
}
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table thead th {
  padding: 14px 20px; text-align: right; font-size: 13px; font-weight: 600;
  border-bottom: 1px solid var(--kc-surface-2);
}
.cmp-table thead th:first-child { text-align: left; color: var(--kc-text-muted); }
.cmp-table tbody tr { border-bottom: 1px solid var(--kc-surface-2); }
.cmp-table tbody tr:last-child { border-bottom: 0; }
.cmp-table tbody th { padding: 12px 20px; text-align: left; font-weight: 500; }
.cmp-table tbody td { padding: 12px 20px; text-align: right; font-size: 15px; }
.cmp-table .is-indent th { padding-left: 36px; color: var(--kc-text-muted); font-weight: 400; font-size: 14px; }
.cmp-table .is-indent td { color: var(--kc-text-muted); font-size: 14px; }
.cmp-table .is-bold th, .cmp-table .is-bold td { font-weight: 600; }
.cmp-table .is-mest { font-weight: 700; }
.cmp-chip {
  display: inline-block; margin-right: 8px;
  padding: 2px 8px; border-radius: 6px;
  border: 1px solid var(--kc-border-strong); color: var(--kc-text-muted);
  font-size: 11px; font-weight: 600; vertical-align: 2px;
}

.cmp-another {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 24px;
}
.cmp-another__search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cmp-another__pop { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.cmp-another__pop a { color: var(--kc-primary); text-decoration: none; font-size: 14px; font-weight: 600; }
.cmp-another__pop a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .cmp-controls { flex-direction: column; align-items: stretch; }
  .cmp-swap { align-self: flex-start; }
  .cmp-table thead th { padding: 10px 14px; }
  .cmp-table tbody th { padding: 10px 14px; }
  .cmp-table tbody td { padding: 10px 14px; }
}

/* ---------- Søgeresultater ---------- */
.search-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) { .search-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; } }

.search-filters { display: flex; flex-direction: column; gap: 20px; }
.search-filters__group { display: flex; flex-direction: column; gap: 10px; }
.search-filters__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-filters .chip--filter { height: 36px; padding: 0 14px; font-size: 13px; text-decoration: none; }

.search-results { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.search-results__ad { margin: 6px 0; }
.search-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 20px; align-items: center;
  padding: 18px 24px;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 12px;
  text-decoration: none; color: var(--kc-ink);
}
.search-row:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); }
.search-row__name { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.search-row__name strong { font-size: 17px; font-weight: 600; }
.search-row__meta { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--kc-text-muted); }
.search-row__cat  { color: var(--kc-text-muted); }
.search-row__kcal { text-align: right; display: inline-flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.search-row__kcal strong { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.search-row__unit { font-size: 12px; color: var(--kc-text-muted); }

@media (max-width: 760px) {
  .search-row { padding: 16px 18px; gap: 14px; }
  .search-row__name strong { font-size: 15px; }
  .search-row__kcal strong { font-size: 20px; }
}

/* ---------- Deklaration · landing ---------- */
.site-header--producer { background: var(--kc-surface); }
.chip-tag--producer {
  background: var(--kc-primary-soft); color: var(--kc-primary);
  padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.chip-tag--muted { background: var(--kc-surface-2); color: var(--kc-text-muted); }
.chip-tag--on-dark { background: var(--kc-primary-soft); color: var(--kc-primary); }

.decl-hero { background: var(--kc-surface); padding: 64px 0 72px; }
.decl-hero__inner {
  display: grid; gap: 48px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .decl-hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; } }
.decl-hero__text { display: flex; flex-direction: column; gap: 20px; max-width: 540px; }
.decl-hero__text h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.decl-hero__text .lead { margin: 0; max-width: 520px; }
.decl-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

.decl-preview {
  display: flex; flex-direction: column; gap: 14px;
  position: relative; max-width: 460px; justify-self: center;
}
.decl-preview__card {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px; padding: 22px 26px;
  box-shadow: var(--kc-shadow-lg);
  color: var(--kc-ink);
}
.decl-preview__title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.decl-preview__sub   { font-size: 13px; color: var(--kc-text-muted); margin-bottom: 18px; }
.decl-preview__table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  table-layout: fixed;
}
.decl-preview__table col.col-name { width: 50%; }
.decl-preview__table col.col-num  { width: 25%; }
.decl-preview__table th,
.decl-preview__table td {
  padding: 8px 6px; border-bottom: 1px solid var(--kc-surface-2);
  text-align: right; vertical-align: top; font-weight: 400;
  line-height: 1.4; white-space: nowrap;
}
.decl-preview__table th:first-child,
.decl-preview__table td:first-child { text-align: left; padding-left: 0; }
.decl-preview__table th:last-child,
.decl-preview__table td:last-child { padding-right: 0; }
.decl-preview__table thead th {
  font-weight: 600; font-size: 12px; color: var(--kc-text-muted);
  border-bottom: 1.5px solid var(--kc-ink); padding-bottom: 10px;
}
.decl-preview__bold th, .decl-preview__bold td { font-weight: 700; }
.decl-preview__table tr.decl-preview__sub th { padding-left: 14px; color: var(--kc-text-muted); font-size: 12px; font-weight: 400; margin-bottom: 0; }
.decl-preview__table tr.decl-preview__sub td { color: var(--kc-text-muted); font-size: 12px; }
.decl-preview__formats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Grå baggrund-sektion */
.decl-grey { background: var(--kc-bg); }
.decl-h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); margin: 0 0 24px; letter-spacing: -0.02em; }

.decl-steps { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .decl-steps { grid-template-columns: repeat(3, 1fr); } }
.decl-step {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px; padding: 24px 24px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.decl-step__num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--kc-primary); color: var(--kc-on-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.decl-step__title { font-size: 16px; }
.decl-step__desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--kc-text-muted); }

.decl-features { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .decl-features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .decl-features { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.decl-feature { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.decl-feature__icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--kc-primary-soft); color: var(--kc-primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.decl-feature strong { font-size: 15px; line-height: 1.3; display: block; }

.decl-prices { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .decl-prices { grid-template-columns: repeat(3, 1fr); } }
.decl-price {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.decl-price--featured { background: var(--kc-ink); color: var(--kc-surface); border-color: transparent; }
.decl-price--featured .decl-price__eyebrow { color: var(--kc-surface); }
.decl-price--featured .decl-price__list { color: rgba(255,255,255,0.9); }
.decl-price--featured .decl-price__list svg { color: var(--kc-primary-soft); }
.decl-price__eyebrow { font-size: 14px; font-weight: 700; }
.decl-price__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.decl-price__big { font-size: clamp(2rem, 1.5rem + 1vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: 4px; }
.decl-price__unit { font-size: 14px; font-weight: 500; color: var(--kc-text-muted); margin-left: 4px; }
.decl-price--featured .decl-price__unit { color: rgba(255,255,255,0.75); }
.decl-price__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; font-size: 14px; }
.decl-price__list li { display: flex; align-items: center; gap: 10px; }
.decl-price__list li::before {
  content: ''; width: 16px; height: 16px; flex-shrink: 0;
  background: no-repeat center/contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300756A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5L20 7'/></svg>");
}
.decl-price--featured .decl-price__list li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D6EAE8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5L20 7'/></svg>");
}
.decl-price__btn { background: var(--kc-primary-soft); color: var(--kc-primary); }
.decl-price__btn:hover { background: var(--kc-surface); color: var(--kc-primary); }
.decl-price .btn { align-self: stretch; }

.decl-faq-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.decl-faq { display: flex; flex-direction: column; gap: 10px; }
.decl-faq__item {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 12px; padding: 18px 22px;
}
.decl-faq__item summary {
  list-style: none; cursor: pointer; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.decl-faq__item summary::-webkit-details-marker { display: none; }
.decl-faq__sign {
  width: 20px; height: 20px; position: relative; flex-shrink: 0;
  color: var(--kc-text-muted);
}
.decl-faq__sign::before,
.decl-faq__sign::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  background: currentColor; transform: translate(-50%, -50%);
}
.decl-faq__sign::before { width: 14px; height: 2px; }
.decl-faq__sign::after  { width: 2px; height: 14px; transition: transform 0.15s; }
.decl-faq__item[open] .decl-faq__sign::after { transform: translate(-50%, -50%) scaleY(0); }
.decl-faq__item p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--kc-text-muted); }

.decl-disclaimer {
  display: grid; grid-template-columns: 24px 1fr; gap: 14px;
  padding: 20px 22px; background: var(--kc-surface);
  border: 1px solid var(--kc-border); border-radius: 12px;
  margin-top: 8px;
}
.decl-disclaimer svg { color: var(--kc-text-muted); margin-top: 2px; }
.decl-disclaimer p { margin: 6px 0 0; line-height: 1.6; color: var(--kc-text-muted); }

.decl-cta-band { background: var(--kc-primary); }
.decl-cta-band__btn { background: var(--kc-surface); color: var(--kc-primary); }
.decl-cta-band__btn:hover { background: var(--kc-primary-soft); color: var(--kc-primary); }

/* Minimal producer-footer */
.site-footer--producer { background: var(--kc-ink); color: var(--kc-surface); margin-top: 0; }
.site-footer--producer a { color: var(--kc-surface); text-decoration: none; opacity: 0.85; }
.site-footer--producer a:hover { opacity: 1; text-decoration: underline; }
.site-footer--producer .brand__name { color: var(--kc-surface); }
.site-footer--producer .brand__tld  { color: var(--kc-primary-soft); }

/* ---------- Opskriftsberegner ---------- */
.rc-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) { .rc-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 28px; } }

.rc-ingredients { display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; }
.rc-ingredients__title { font-size: 20px; margin: 0 0 6px; }

.rc-add {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 18px;
  border: 1.5px solid var(--kc-border-strong); border-radius: 12px;
  background: var(--kc-surface);
  color: var(--kc-text-muted);
}
.rc-add input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 500 16px var(--kc-font); color: var(--kc-ink);
}
.rc-add:focus-within { border-color: var(--kc-primary); }

.rc-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 70px 32px 28px;
  gap: 12px; align-items: center; padding: 10px 4px 4px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--kc-text-muted); border-bottom: 1px solid var(--kc-surface-2);
}
.rc-head span:nth-child(2), .rc-head span:nth-child(3) { text-align: right; }

.rc-list { display: flex; flex-direction: column; }
.rc-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 70px 32px 28px;
  gap: 12px; align-items: center; padding: 14px 4px;
  border-bottom: 1px solid var(--kc-surface-2);
}
.rc-row:last-child { border-bottom: 0; }
.rc-row__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-row__name a { color: var(--kc-ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.rc-row__name a:hover { color: var(--kc-primary); }
.rc-row__meta { font-size: 12px; color: var(--kc-text-muted); }
/* Desktop viser kcal i sin egen kolonne, så vi skjuler den inline-dubletten. */
.rc-row__meta-kcal, .rc-row__meta [aria-hidden] { display: none; }
.rc-row__hint { color: var(--kc-text-muted); }

.rc-row__amount {
  display: inline-flex; align-items: center; gap: 4px;
  height: 44px; padding: 0 12px;
  border: 1.5px solid var(--kc-border); border-radius: 10px;
  background: var(--kc-surface);
}
.rc-row__amount input {
  width: 100%; min-width: 0; border: 0; outline: 0; background: transparent;
  text-align: right; font: 500 15px var(--kc-font);
  color: var(--kc-ink);
}
.rc-row__amount span { color: var(--kc-text-muted); font-size: 13px; }
.rc-row__amount:focus-within { border-color: var(--kc-primary); }

.rc-row__kcal { text-align: right; font-weight: 600; font-size: 15px; }

.rc-row__nudge { display: inline-flex; flex-direction: column; gap: 2px; }
.rc-nudge {
  width: 28px; height: 20px; border: 1px solid var(--kc-border);
  background: var(--kc-surface); color: var(--kc-text-muted);
  border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.rc-nudge:hover { background: var(--kc-primary-soft); color: var(--kc-primary); border-color: var(--kc-primary); }

.rc-row__remove {
  width: 28px; height: 28px; border: 0; background: transparent;
  color: var(--kc-text-muted); cursor: pointer; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.rc-row__remove:hover { background: var(--kc-surface-2); color: var(--kc-ink); }

.rc-rawsum {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; font-size: 15px;
  color: var(--kc-text-muted);
}
.rc-rawsum strong { color: var(--kc-ink); font-size: 16px; }

/* Result-aside */
.rc-result {
  position: sticky; top: 20px;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 18px;
}
.rc-result__empty { padding: 8px 4px; }
.rc-result__header { display: flex; flex-direction: column; gap: 4px; }
.rc-result__big { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.rc-result__big strong {
  font-size: clamp(44px, 2rem + 2.5vw, 60px);
  line-height: 1; font-weight: 700; letter-spacing: -0.02em;

}
.rc-result__big span { font-size: 20px; font-weight: 500; color: var(--kc-text-muted); }

.rc-macros { display: flex; flex-direction: column; gap: 10px; }
.rc-macros__legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px;
  font-size: 13px;
}
.rc-macros__item { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.rc-macros__dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.rc-macros__name { color: var(--kc-text-muted); }
.rc-macros__pct { font-weight: 700; }

.rc-nutri { width: 100%; border-collapse: collapse; font-size: 14px; }
.rc-nutri thead th {
  padding: 6px 0 8px; text-align: right;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--kc-text-muted); font-weight: 600;
}
.rc-nutri thead th:first-child { text-align: left; }
.rc-nutri tbody th { text-align: left; font-weight: 500; padding: 7px 0; color: var(--kc-ink); }
.rc-nutri tbody td { text-align: right; padding: 7px 0; }
.rc-nutri tr { border-bottom: 1px solid var(--kc-surface-2); }
.rc-nutri tr:last-child { border-bottom: 0; }
.rc-nutri__sub th { padding-left: 14px; font-weight: 400; color: var(--kc-text-muted); font-size: 13px; }
.rc-nutri__sub td { color: var(--kc-text-muted); font-size: 13px; }
.rc-nutri__bold th, .rc-nutri__bold td { font-weight: 700; }

.rc-result__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-result__btns .btn { height: 44px; font-size: 14px; padding: 0 16px; }

/* Settings-row */
.rc-settings {
  display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start;
  padding: 20px 24px;
}
.rc-settings__col { display: flex; flex-direction: column; gap: 10px; }
.rc-stepper { display: inline-flex; align-items: center; gap: 4px; }
.rc-stepper__btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--kc-border); background: var(--kc-surface);
  cursor: pointer; font-size: 18px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.rc-stepper__btn:hover { background: var(--kc-primary-soft); color: var(--kc-primary); border-color: var(--kc-primary); }
.rc-stepper input {
  width: 48px; height: 36px; text-align: center;
  font: 700 16px var(--kc-font);
  border: 1px solid var(--kc-border); border-radius: 8px;
  background: var(--kc-surface); color: var(--kc-ink);
}

@media (max-width: 760px) {
  .rc-ingredients { padding: 20px 16px; }
  .rc-head { display: none; }
  .rc-row {
    grid-template-columns: 1fr auto;
    gap: 10px; padding: 16px 0;
    row-gap: 10px;
  }
  .rc-row__name { grid-column: 1; grid-row: 1; }
  .rc-row__remove { grid-column: 2; grid-row: 1; justify-self: end; }
  .rc-row__kcal { display: none; }                    /* dubletten er i meta nu */
  .rc-row__meta-kcal { display: inline; font-weight: 500; }
  .rc-row__meta [aria-hidden] { display: inline; }
  .rc-row__amount { grid-column: 1; grid-row: 2; width: 110px; }
  .rc-row__nudge { grid-column: 2; grid-row: 2; justify-self: end; flex-direction: row; gap: 6px; }
  .rc-nudge { width: 36px; height: 36px; }
  .rc-settings { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
}

/* ---------- Forside ---------- */
.home-hero--center .home-search { margin: 0 auto; }
.home-tries .chip--try {
  height: 32px; padding: 0 14px; font-size: 14px; font-weight: 500;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  color: var(--kc-ink); text-decoration: none;
}
.home-tries .chip--try:hover { background: var(--kc-primary-soft); border-color: var(--kc-primary); }

.trust-bar {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px 18px; padding: 16px 20px;
  border-top: 1px solid var(--kc-surface-2);
  border-bottom: 1px solid var(--kc-surface-2);
  font-size: 14px; color: var(--kc-text-muted);
}
.trust-bar__item { display: inline-flex; align-items: center; gap: 8px; }
.trust-bar__sep { color: var(--kc-border); }
.trust-bar__link { margin-left: auto; color: var(--kc-primary); font-weight: 600; text-decoration: none; }
.trust-bar__link:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .trust-bar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
  .trust-bar__sep { display: none; }
  .trust-bar__link { margin-left: 0; }
}

.link-arrow { color: var(--kc-primary); font-weight: 600; text-decoration: none; font-size: 14px; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow--sm { font-size: 13px; align-self: flex-start; margin-top: 4px; }

.home-calcs {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.home-calc {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: 14px;
  border: 1px solid var(--kc-border); background: var(--kc-surface);
  text-decoration: none; color: var(--kc-ink);
}
.home-calc:hover { border-color: var(--kc-primary); box-shadow: var(--kc-shadow-sm); }
.home-calc__glyph {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--kc-primary-soft); color: var(--kc-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.home-calc__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-calc__name { font-weight: 700; font-size: 16px; }
.home-calc__desc { font-size: 13px; color: var(--kc-text-muted); }

.home-split {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .home-split { grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr); gap: 40px; }
}

.food-grid-compact {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.food-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--kc-border); background: var(--kc-surface);
  text-decoration: none; color: var(--kc-ink);
}
.food-card:hover { border-color: var(--kc-primary); box-shadow: var(--kc-shadow-sm); }
.food-card__name { font-size: 14px; font-weight: 500; color: var(--kc-text-muted); }
.food-card__kcal { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: 4px; }
.food-card__u    { font-size: 12px; color: var(--kc-text-muted); }

.cat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.cat-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--kc-border); background: var(--kc-surface);
  text-decoration: none; color: var(--kc-ink); font-weight: 500;
  font-size: 14px;
}
.cat-pill:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); color: var(--kc-primary); }
.cat-pill__icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--kc-primary-soft); color: var(--kc-primary);
  display: inline-flex; align-items: center; justify-content: center;
}

.home-triplets {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .home-triplets { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.home-triplet {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 14px; padding: 20px;
}
.home-triplet__title { font-size: 16px; margin: 0 0 4px; }

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px;
  text-decoration: none; color: var(--kc-ink);
}
.rank-item:hover { background: var(--kc-primary-soft); }
.rank-item__badge {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--kc-ink); color: var(--kc-surface);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.rank-item__name { font-size: 14px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item__value { text-align: right; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.rank-item__value strong { font-size: 15px; font-weight: 700; }
.rank-item__unit { font-size: 10px; line-height: 1.2; color: var(--kc-text-muted); text-align: right; }

.compare-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.compare-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--kc-surface-2);
  text-decoration: none; color: var(--kc-ink); font-size: 14px; font-weight: 500;
}
.compare-link:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); }

.b2b-cta {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  background: var(--kc-ink); color: var(--kc-surface);
  padding: 28px 32px; border-radius: 16px;
}
.b2b-cta__text strong { font-size: 20px; display: block; margin-bottom: 4px; }
.b2b-cta__text p { margin: 0; opacity: 0.8; max-width: 640px; font-size: 15px; line-height: 1.5; }
.b2b-cta__btn { background: var(--kc-primary-soft); color: var(--kc-primary); }
.b2b-cta__btn:hover { background: var(--kc-surface); color: var(--kc-primary); }
@media (max-width: 720px) {
  .b2b-cta { grid-template-columns: 1fr; padding: 24px; }
  .b2b-cta__btn { justify-self: start; }
}

.cats {
  display: grid; gap: var(--kc-space-4);
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.cat {
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 12px; padding: var(--kc-space-4);
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--kc-ink);
}
.cat:hover { border-color: var(--kc-primary); box-shadow: var(--kc-shadow-sm); }
.cat__icon {
  width: 40px; height: 40px; border-radius: var(--kc-radius-md);
  background: var(--kc-primary-soft); color: var(--kc-primary);
  display: flex; align-items: center; justify-content: center;
}
.cat__name { font-weight: 600; font-size: 16px; }
.cat__count { font-size: 13px; color: var(--kc-text-muted); }

/* ---------- Autocomplete ---------- */
.ac {
  list-style: none; margin: 4px 0 0; padding: 0;
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: 12px;
  box-shadow: var(--kc-shadow-lg);
  max-height: 420px; overflow: auto;
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
}
.site-header__search, .home-search { position: relative; }
.ac__item {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--kc-surface-2);
  cursor: pointer; font-size: 15px;
  text-align: left;
}
.ac__item .ac__meta { text-align: right; }
.ac__item:last-of-type { border-bottom: 0; }
.ac__item.is-active, .ac__item:hover { background: var(--kc-primary-soft); color: var(--kc-primary-hover); }
.ac__name { font-weight: 600; }
.ac__meta {
  color: var(--kc-text-muted); font-size: 12px; white-space: nowrap; align-self: center;
  text-align: right; line-height: 1.3;
}
.ac__meta b { font-size: 16px; color: var(--kc-ink); font-weight: 700; display: block; }
.ac__footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--kc-bg); font-size: 13px;
}
.ac__footer a { font-weight: 600; }
.ac__hint { color: var(--kc-text-muted); font-family: var(--kc-font-mono); font-size: 12px; }

/* ---------- CMP banner ---------- */
#kc-cmp {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: 100;
  display: flex; justify-content: center;
  pointer-events: none;
}
#kc-cmp .kc-cmp__inner { pointer-events: auto; }
#kc-cmp .kc-cmp__inner {
  width: 100%; max-width: 520px;
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius-lg);
  box-shadow: var(--kc-shadow-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
#kc-cmp h2 { font-size: 17px; font-weight: 700; margin: 0; }
#kc-cmp p { font-size: 15px; line-height: 1.5; margin: 0; }
.kc-cmp__btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
#kc-cmp a { font-size: 14px; font-weight: 600; align-self: center; text-decoration: none; }

/* ---------- /foedevarer index ---------- */
.foods-cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1000px) { .foods-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .foods-cat-grid { grid-template-columns: 1fr; } }
.foods-cat-tile {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px;
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.foods-cat-tile:hover { border-color: var(--kc-primary); background: var(--kc-primary-soft); }
.foods-cat-tile__icon {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--kc-primary-soft); color: var(--kc-primary); border-radius: 10px;
}
.foods-cat-tile__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.foods-cat-tile__name { font-weight: 700; color: var(--kc-ink); }
.foods-cat-tile__ex { font-size: 13px; color: var(--kc-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foods-cat-tile__chev { color: var(--kc-text-muted); flex-shrink: 0; }

.foods-pop-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1000px) { .foods-pop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .foods-pop-grid { grid-template-columns: 1fr; } }
.foods-pop {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  border: 1px solid var(--kc-border); border-radius: 12px;
  background: var(--kc-surface); color: inherit; text-decoration: none;
}
.foods-pop:hover { border-color: var(--kc-primary); }
.foods-pop__name { font-size: 14px; font-weight: 600; color: var(--kc-ink); }
.foods-pop__val { display: inline-flex; align-items: baseline; gap: 6px; }
.foods-pop__val strong { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.foods-pop__val span { font-size: 12px; color: var(--kc-text-muted); }

.atoz { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.atoz__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.atoz__alfa { display: flex; gap: 6px; flex-wrap: wrap; }
.atoz__key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--kc-border); background: var(--kc-surface);
  color: var(--kc-ink); font-weight: 600; text-decoration: none;
  font-size: 14px;
}
.atoz__key:hover { border-color: var(--kc-primary); color: var(--kc-primary); }
.atoz__key.is-on { background: var(--kc-primary); border-color: var(--kc-primary); color: var(--kc-on-primary); }
.atoz__key.is-off { color: var(--kc-text-muted); opacity: .45; cursor: default; }
.atoz__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 32px; }
@media (max-width: 900px) { .atoz__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .atoz__list { grid-template-columns: 1fr; } }
.atoz__list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; color: var(--kc-ink); text-decoration: none;
  border-bottom: 1px solid var(--kc-surface-2);
}
.atoz__list a:hover { color: var(--kc-primary); }
.atoz__kcal { color: var(--kc-text-muted); font-size: 14px; }
.atoz__kcal strong { color: var(--kc-ink); font-weight: 700; }

.foods-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .foods-bottom { grid-template-columns: 1fr; } }
.rank-list--plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--kc-surface-2); color: var(--kc-ink); text-decoration: none; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { color: var(--kc-primary); }

.foods-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .foods-sources { grid-template-columns: 1fr; } }
.foods-source {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  background: var(--kc-surface);
  border: 1px solid var(--kc-border); border-radius: 14px;
}
.foods-source p { margin: 2px 0 0; font-size: 14px; color: var(--kc-text-muted); }
.foods-source__icon {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--kc-primary-soft); color: var(--kc-primary); border-radius: 10px; flex-shrink: 0;
}
.foods-source__icon--warm { background: #FDE8CF; color: #B45E09; }

/* ---------- Bruger-menu i app-chrome ---------- */
.app-user-menu { position: relative; }
.app-user-menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--kc-surface);
  color: var(--kc-ink); text-decoration: none;
}
.app-user-menu > summary::-webkit-details-marker { display: none; }
.app-user-menu > summary:hover { background: var(--kc-primary-soft); color: var(--kc-primary); }
.app-user-menu[open] > summary { background: var(--kc-primary-soft); color: var(--kc-primary); }
.app-user-menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px; z-index: 50;
  background: var(--kc-surface); border: 1px solid var(--kc-border);
  border-radius: 12px; box-shadow: var(--kc-shadow-lg);
  padding: 8px; display: flex; flex-direction: column;
}
.app-user-menu__email { padding: 10px 12px 6px; font-size: 12px; color: var(--kc-text-muted); overflow: hidden; text-overflow: ellipsis; }
.app-user-menu__panel a,
.app-user-menu__logout {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; background: transparent;
  color: var(--kc-ink); font: 500 14px var(--kc-font); text-decoration: none; cursor: pointer; border-radius: 8px;
}
.app-user-menu__panel a:hover,
.app-user-menu__logout:hover { background: var(--kc-primary-soft); color: var(--kc-primary); }
.app-user-menu__logout { color: #B23A2A; }
.app-user-menu__logout:hover { background: #FDE8CF; color: #B23A2A; }

.link-btn {
  background: transparent; border: 0; cursor: pointer; padding: 10px 12px;
  color: var(--kc-ink); font: inherit; font-weight: 600; border-radius: 8px;
}
.link-btn:hover { color: var(--kc-primary); }

/* ---------- Auth: Log ind / Opret / Glemt ---------- */
.site-header--minimal { background: var(--kc-bg); border-bottom: 0; }
.site-header--minimal .site-header__inner { height: 72px; }

.auth-wrap { background: var(--kc-bg); min-height: calc(100vh - 72px); padding: 24px 0 72px; }
.auth-grid {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
@media (max-width: 980px) {
  .auth-grid { grid-template-columns: 1fr; max-width: 440px; }
}
.auth-card {
  background: var(--kc-surface);
  border: 1px solid var(--kc-border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 18px;
}
.auth-card__head h2 { font-size: 24px; margin: 0 0 4px; letter-spacing: -0.01em; }
.auth-card__head p  { margin: 0; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field__label { font-size: 14px; font-weight: 700; color: var(--kc-ink); }
.auth-field__hint  { font-size: 13px; color: var(--kc-text-muted); }
.auth-field__err   { font-size: 13px; color: #B23A2A; margin-top: 2px; }
.auth-field .input { height: 48px; width: 100%; }
.auth-field .input.is-error {
  border-color: #D97757; background: #FDE8CF;
}
.auth-pw-toggle {
  background: transparent; border: 0; color: var(--kc-primary);
  font: 600 14px var(--kc-font); cursor: pointer; padding: 4px 0;
}
.auth-link {
  font-size: 14px; font-weight: 600; color: var(--kc-primary); text-decoration: underline;
  align-self: flex-start;
}
.auth-btn { width: 100%; justify-content: center; height: 48px; font-size: 16px; }
.auth-check {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  font-size: 14px; line-height: 1.4;
}
.auth-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--kc-primary); }
.auth-card__foot { text-align: center; margin: 0; font-size: 14px; color: var(--kc-text-muted); }
.auth-card__foot a { color: var(--kc-primary); font-weight: 600; text-decoration: underline; }
.auth-ok {
  background: var(--kc-primary-soft); color: var(--kc-primary-hover);
  padding: 14px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
}

/* ---------- Affiliate box ---------- */
.affiliate {
  background: var(--kc-surface);
  border: 1px dashed var(--kc-border-strong);
  border-radius: var(--kc-radius-lg);
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.affiliate__head {
  display: flex; justify-content: space-between; align-items: center;
}
.affiliate__label {
  font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  background: var(--kc-ink); color: var(--kc-surface);
}
.affiliate__body {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center;
}
.affiliate__img {
  width: 64px; height: 64px; border-radius: 10px;
  background: var(--kc-surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--kc-text-muted);
}
.affiliate__name { font-size: 15px; font-weight: 600; }
.affiliate__meta { font-size: 14px; color: var(--kc-text-muted); }
.affiliate__cta {
  height: 44px; padding: 0 16px; border-radius: var(--kc-radius-md);
  border: 1.5px solid var(--kc-primary);
  display: inline-flex; align-items: center; text-decoration: none;
  color: var(--kc-primary); font-weight: 600; font-size: 15px;
}
.affiliate__cta:hover { background: var(--kc-primary-soft); color: var(--kc-primary-hover); }
.affiliate__note { font-size: 12px; color: var(--kc-text-muted); line-height: 1.45; }

/* ---------- Utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Tempoberegner ---------- */
.pace-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .pace-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 32px; }
}
.pace-form { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 760px) { .pace-form { padding: 28px 32px; } }

.seg--xs { padding: 3px; gap: 2px; }
.seg--xs .seg__item { height: 36px; padding: 0 10px; font-size: 13px; }
.pace-mode { display: flex; width: 100%; align-self: stretch; }
.pace-mode .seg__item { flex: 1; min-width: 0; padding: 0 12px; }

.pace-fields { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 640px) {
  .pace-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px 20px; }
  .pace-field--full { grid-column: 1 / -1; }
}

.pace-row { display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.pace-row > .input { width: auto; flex: 1 1 0; min-width: 0; }
.pace-row > .seg { flex: 0 0 auto; align-self: center; }
.pace-input--time, .pace-input--pace {
  display: flex; align-items: center; justify-content: space-between;
}
.pace-input__hint {
  font-size: 13px; color: var(--kc-text-muted); padding-right: 4px; white-space: nowrap;
}
.pace-input--time input, .pace-input--pace input {
  font-variant-numeric: initial; font-weight: 700;
}
.select {
  height: 44px; padding: 0 36px 0 14px; border-radius: 10px;
  border: 1px solid var(--kc-border); background: var(--kc-surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 12px center;
  appearance: none; -webkit-appearance: none;
  font-size: 15px; color: var(--kc-ink); cursor: pointer;
  width: 100%;
}

/* Result card */
.pace-result {
  background: var(--kc-info-soft);
  border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  position: sticky; top: 20px;
}
.pace-result__label { font-size: 14px; color: var(--kc-text-muted); font-weight: 600; }
.pace-result__big {
  font-size: 56px; line-height: 1; font-weight: 800; color: var(--kc-ink);
  display: inline-flex; align-items: baseline; gap: 10px;
}
.pace-result__unit { font-size: 18px; font-weight: 600; color: var(--kc-text-muted); }
.pace-result__sub { font-size: 14px; color: var(--kc-text-muted); }
.pace-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px;
}
.pace-stat {
  background: var(--kc-surface); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.pace-stat strong { font-size: 20px; font-weight: 700; color: var(--kc-ink); }
.pace-stat span { font-size: 13px; color: var(--kc-text-muted); }

/* Known distances list */
.pace-list { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.pace-list h2 { margin: 0; font-size: 18px; }
.pace-list__rows { display: flex; flex-direction: column; }
.pace-list__row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--kc-border);
  font-size: 15px;
}
.pace-list__row:first-child { border-top: 0; }
.pace-list__label { color: var(--kc-ink); }
.pace-list__label.is-bold { font-weight: 700; }
.pace-list__value { font-weight: 700; color: var(--kc-ink); }

/* Splits */
.pace-splits { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.pace-splits h2 { margin: 0; font-size: 18px; }
.pace-splits__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pace-splits__rows { }
.pace-splits__rows summary { display: none; }
.pace-splits__grid {
  display: grid; gap: 0 24px;
  grid-auto-flow: column;
}
.pace-split {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0; font-size: 15px;
}
.pace-split__label { color: var(--kc-text-muted); }
.pace-split__value { font-weight: 700; color: var(--kc-ink); }
.pace-splits__toggle { align-self: flex-start; font-weight: 600; }

/* Promo card */
.pace-promo {
  display: grid; gap: 14px; padding: 20px 24px;
  grid-template-columns: 44px 1fr; align-items: center;
}
@media (min-width: 640px) { .pace-promo { grid-template-columns: 44px 1fr auto; } }
.pace-promo__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--kc-info-soft); color: var(--kc-info);
}
.pace-promo__text { display: flex; flex-direction: column; gap: 2px; }
.pace-promo__text strong { font-size: 16px; }
.pace-promo .btn { justify-self: start; }
@media (min-width: 640px) { .pace-promo .btn { justify-self: end; } }

@media (max-width: 760px) {
  .pace-result__big { font-size: 44px; }
  .pace-stats { grid-template-columns: 1fr 1fr; }
  .pace-splits__grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-flow: row;
    gap: 0;
  }
}
