/* Återkallats webbplats. Bygger på färgerna och typsnittet i styles.css, men utan appens menyrad. */
body.site { padding-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 10px; }
.fill { background: #fac775; color: #633806; border-radius: 6px; padding: 0 4px; font-weight: 700; }
a { color: var(--brand-2); }
@media (prefers-color-scheme: dark) { a { color: var(--accent); } }

/* Huvud */
.site-header { background: var(--brand); color: var(--brand-ink); padding-top: env(safe-area-inset-top, 0px); }
.site-header-inner {
  max-width: 1040px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.site-header .brand { color: #ffffff; text-decoration: none; font-size: 1.25rem; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--brand-ink); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 6px 12px; border-radius: 999px;
}
.site-header nav a:hover { background: rgba(255, 255, 255, .1); }
.site-header nav a[aria-current="page"] { background: var(--brand-ink); color: var(--brand); }
.site-header nav a:focus-visible, .site-header .brand:focus-visible { outline: 2px solid var(--brand-muted); outline-offset: 2px; }

.site-main { max-width: 1040px; margin: 0 auto; padding: 0 16px 40px; display: flex; flex-direction: column; gap: 20px; }
.site-main h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-top: 8px; }
.site-main h2 { font-size: 1.3rem; }

/* Startsidans hjälte */
/* Ett eget grönt kort med en vit remsa mot menyn ovanför. */
.site-hero {
  margin: 14px 0 0; padding: 28px 20px 32px; background: var(--brand); color: var(--brand-ink);
  border-radius: 28px; display: flex; flex-direction: column; gap: 14px;
}
.group-row { display: flex; flex-wrap: wrap; gap: 8px; }
.group-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem;
}
.group-chip .ic { width: 18px; height: 18px; }
.group-chip span { color: var(--muted); font-weight: 600; }
.group-chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.group-chip[aria-current="page"] span { color: var(--brand-muted); }
.toggle-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.toggle-link .ic { width: 18px; height: 18px; }
.se-badge {
  display: inline-block; align-self: flex-start; background: #e6f1fb; color: #0c447c; border-radius: 999px;
  padding: 1px 9px; font-size: .78rem; font-weight: 800;
}
.site-hero h1 { color: #ffffff; max-width: 760px; margin: 0; }
.site-hero p { color: var(--brand-muted); max-width: 680px; font-size: 1.05rem; }
@media (min-width: 720px) { .site-hero { margin-top: 20px; padding: 36px 32px 40px; border-radius: 32px; } }

/* Sök */
.search { display: flex; gap: 8px; flex-wrap: wrap; max-width: 760px; }
.search input { flex: 1 1 240px; min-height: 48px; border-radius: 999px; padding-inline: 18px; }
.search select { font: inherit; min-height: 48px; border-radius: 999px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.search .btn { display: inline-flex; align-items: center; gap: 6px; }
.filters { max-width: none; }

/* Typ av fara */
.hz-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hz {
  display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; text-decoration: none;
  padding: 4px 11px; border-radius: 999px; background: #e1f5ee; color: #085041;
}
.hz span { background: rgba(0, 0, 0, .08); border-radius: 999px; padding: 0 7px; }
.hz-salmonella, .hz-listeria, .hz-mikrober { background: #f7c1c1; color: #791f1f; }
.hz-allergener { background: #fac775; color: #633806; }
.hz-foremal { background: #d3d1c7; color: #2c2c2a; }
.hz-kemiskt { background: #cecbf6; color: #3c3489; }
.hz-markning { background: #b5d4f4; color: #0c447c; }
.hz-ovrigt { background: #e4dfd2; color: #444441; }

/* Listor */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head a { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; text-decoration: none; }
.site-section { display: flex; flex-direction: column; gap: 10px; }
.row-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.row-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.row-card > a { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 3px; }
.row-card > a:hover .row-title { text-decoration: underline; }
.row-meta { font-size: .82rem; color: var(--muted); font-weight: 700; }
.row-title { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.row-text { color: var(--muted); font-size: .92rem; }
.row-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.alert-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
/* Startsidan: bara en rad, så många kort som ryms på skärmen. Övriga rader får höjden 0 och döljs. */
.alert-grid.one-row { grid-template-rows: auto; grid-auto-rows: 0; row-gap: 0; overflow: hidden; }
.alert-card a {
  display: flex; flex-direction: column; gap: 3px; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
}
.alert-card img, .alert-card .ph { width: 100%; aspect-ratio: 1; object-fit: contain; background: #ffffff; border-radius: 12px; margin-bottom: 6px; display: grid; place-items: center; }
.alert-card .ph .ic { width: 40px; height: 40px; color: var(--muted); }
.alert-card .row-title { font-size: .95rem; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.pager a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.crumbs { font-size: .88rem; color: var(--muted); margin-top: 16px; }
.crumbs a { text-decoration: none; }

/* En återkallelse */
.recall { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.recall header { display: flex; flex-direction: column; gap: 8px; }
.recall h1 { overflow-wrap: anywhere; }
.recall section { display: flex; flex-direction: column; gap: 8px; }
.recall ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.todo { background: var(--high-bg); border: 1px solid var(--high); border-radius: var(--radius); padding: 16px 18px; }
.todo h2 { color: var(--high); display: flex; align-items: center; gap: 8px; }
.todo h2 .ic { width: 22px; height: 22px; }
.app-cta {
  background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.app-cta .btn, .promo .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.recall-source a { display: inline-flex; align-items: center; gap: 4px; }
.recall-source .ic { width: 15px; height: 15px; }
.pictures { margin: 0; display: flex; gap: 8px; overflow-x: auto; flex-wrap: wrap; }
.pictures img { height: 180px; border-radius: 14px; background: #ffffff; }
.pictures figcaption { width: 100%; font-size: .8rem; color: var(--muted); }

/* Erbjudanden */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.promo {
  background: var(--brand); color: var(--brand-ink); border-radius: 24px; padding: 22px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.promo > .ic { width: 30px; height: 30px; color: var(--brand-muted); }
.promo h2 { color: #ffffff; }
.promo p { color: var(--brand-muted); }
.promo-light { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.promo-light h2 { color: var(--ink); }
.promo-light p { color: var(--muted); }
.promo-light > .ic { color: var(--brand-2); }

/* Löptext (Om, För leverantörer) */
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 12px; line-height: 1.65; }
.prose ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.prose h2 { margin-top: 10px; }
.lead { font-size: 1.12rem; }
.center { text-align: center; }

/* Fot */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 20px; }
.site-footer-inner { max-width: 1040px; margin: 0 auto; padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
@media (max-width: 560px) {
  /* Alla menyval ryms på en rad utan att sidan scrollar i sidled. */
  .site-header nav { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .site-header nav a { white-space: nowrap; padding: 6px 8px; font-size: .88rem; }
}

/* ---------- Leverantörsportalen ---------- */
.portal-form { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.portal-form.narrow { max-width: 420px; gap: 8px; }
.portal-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.portal-form legend { font-weight: 900; font-size: 1.05rem; padding: 0 6px; }
.portal-form label { font-weight: 700; font-size: .9rem; }
.portal-form select, .portal-form input[type="file"] { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.portal-form .check { font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.portal-form .check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.portal-form .btn { align-self: flex-start; }
.portal-form .confirm { border-color: var(--alert-line); }
.grid2, .grid3 { display: grid; gap: 10px; }
.grid2 > div, .grid3 > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
.items { display: flex; flex-direction: column; gap: 6px; }
.items-head, .items-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 6px; }
.items-head { font-size: .8rem; font-weight: 800; color: var(--muted); }
@media (max-width: 640px) {
  .items-head { display: none; }
  .items-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
}
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-row .btn, .actions-row a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.versions { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.stats dd { font-weight: 900; font-variant-numeric: tabular-nums; }
.end-form { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--low); }
.verified .ic { width: 16px; height: 16px; }
.product-block { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 640px) { .product-block.has-img { grid-template-columns: 200px 1fr; } }
.product-block img { width: 100%; max-width: 260px; border-radius: 16px; background: #ffffff; border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.pack-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pack-table th, .pack-table td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.pack-table th { font-weight: 800; color: var(--muted); border-top: 0; }

/* Kamerarutan i leverantörsformuläret */
.camera-fill { border-color: var(--brand) !important; background: #eef6f2 !important; }
.camera-fill label.btn { cursor: pointer; }
.snaps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.snaps:empty { display: none; }
.snaps li { position: relative; }
.snaps img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #ffffff; }
.snaps button {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: var(--ink); color: #ffffff; font-weight: 900; cursor: pointer; line-height: 1;
}
.portal-form .filled { background: #fff6d6; }
.gtin-cell { display: flex; gap: 4px; min-width: 0; }
.gtin-cell input { flex: 1; min-width: 0; }
.scan-btn {
  flex: none; width: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.scan-btn .ic { width: 20px; height: 20px; }
.scan-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.scan-overlay[hidden] { display: none; }
.scan-box { background: var(--surface); border-radius: var(--radius); padding: 16px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 10px; }
.scan-box h2 { margin: 0; font-size: 1.15rem; }
#portal-reader { width: 100%; min-height: 220px; background: #111111; border-radius: 12px; overflow: hidden; }
