/* Catering Danmark brand: green wordmark, three rhombi (blue / sand / lime), cream and pale-blue
   panels, Roboto in light weights, outlined buttons with .5em radius. */
:root {
  --cream: #f6f3ec;
  --paper: #ffffff;
  --pale-blue: #e5eef5;
  --green: #006248;
  --blue: #1b66a0;
  --ink: #000000;
  --muted: #5f6b6a;
  --grey: #989eac;
  --pass: #a3b21c;
  --warn: #d9a441;
  --fail: #b5432f;
  --fail-tint: #f8e6e2;
  --pending: #989eac;
  --radius: .5em;
  --shadow: 0 2px 12px rgba(92, 78, 40, .09);
  --ease: 220ms cubic-bezier(.2, .7, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Roboto, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.5; font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  padding-bottom: env(safe-area-inset-bottom);
  min-height: 100dvh;
}
/* iOS Safari ignores overflow-x on body alone; clip on both so nothing can widen the page. */
html, body { overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
/* faint brand rhombi behind the page, as on cateringdanmark.dk */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 62vw; height: 62vw; max-width: 420px; max-height: 420px; border-radius: 10%;
  transform: rotate(45deg);
}
body::before { top: 120px; right: -34vw; background: var(--pale-blue); opacity: .45; }
body::after { top: 640px; left: -40vw; background: #e9edc9; opacity: .5; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 8px 12px; border-radius: var(--radius); background: var(--green); color: #fff; text-decoration: none;
}
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---- header: cream bar with the real logo, like cateringdanmark.dk */
.top {
  background: var(--cream);
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; min-width: 0; }
.brand img { height: 44px; width: auto; display: block; }
.brand h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.lang select {
  font: inherit; font-size: 15px; padding: 7px 10px; border-radius: var(--radius);
  border: 2px solid var(--green); background: var(--paper); color: var(--green);
  transition: background-color var(--ease), color var(--ease);
}
.lang select:hover { background: var(--pale-blue); }

main { max-width: 640px; margin: 0 auto; padding: 6px 18px 18px; }

/* ---- page title in the site's light uppercase style */
.page-title {
  margin: 10px 0 4px; font-weight: 300; font-size: 30px; line-height: 1.1;
  letter-spacing: .01em; text-transform: uppercase; color: var(--green);
  text-wrap: balance;
}
.intro { margin: 0 0 16px; color: var(--muted); max-width: 34em; text-wrap: pretty; }

/* ---- overall result: pale-blue panel with a rhombus in the status colour */
.overall {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 18px 18px 20px; border-radius: var(--radius);
  background: var(--pale-blue); color: var(--blue); font-size: 18px; font-weight: 400;
}
.overall-icon {
  flex: none; width: 26px; height: 26px; margin: 0 6px; border-radius: 5px;
  transform: rotate(45deg); background: var(--pending);
  transition: background-color var(--ease);
}
.overall.pass .overall-icon { background: var(--pass); }
.overall.warn .overall-icon { background: var(--warn); }
.overall.fail .overall-icon { background: var(--fail); }
.overall.testing .overall-icon { animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .overall.testing .overall-icon { animation: none; } }

/* ---- buttons: solid green primary, outlined black secondary like the site's "Læs mere" */
button.primary, button.secondary {
  display: block; width: 100%; margin: 16px 0 6px;
  font: inherit; font-size: 19px; font-weight: 500;
  padding: 15px; border-radius: var(--radius); cursor: pointer;
  transition: background-color var(--ease), color var(--ease), transform 120ms ease, box-shadow var(--ease);
}
button.primary:not(:disabled):hover { background: #07533e; border-color: #07533e; box-shadow: 0 4px 14px rgba(0, 98, 72, .22); }
button.secondary:hover { background: var(--paper); }
button.primary:not(:disabled):active, button.secondary:active { transform: translateY(1px) scale(.99); box-shadow: none; }
button.primary { background: var(--green); color: #fff; border: 2px solid var(--green); }
button.primary:disabled { opacity: .6; cursor: default; }
button.secondary { background: transparent; color: var(--ink); border: 2px solid var(--ink); font-size: 17px; }
.hint { color: var(--muted); font-size: 15px; margin: 4px 0 12px; text-align: center; }

/* ---- check list: white cards, rhombus badge in the status colour */
.checks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.check {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
  animation: rise 480ms cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: rotate(45deg) scale(.6); } 60% { transform: rotate(45deg) scale(1.25); } 100% { transform: rotate(45deg) scale(1); } }
.badge.pop, .overall-icon.pop { animation: pop 420ms cubic-bezier(.34, 1.56, .64, 1); }
.guide { animation: rise 360ms cubic-bezier(.16, 1, .3, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .check, .guide, .badge.pop, .overall-icon.pop { animation: none; }
}
.check-head { display: flex; align-items: center; gap: 14px; }
.badge {
  flex: none; width: 22px; height: 22px; margin: 0 5px; border-radius: 4px;
  transform: rotate(45deg); background: var(--pending);
  transition: background-color var(--ease);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px; line-height: 1;
}
.badge::before { transform: rotate(-45deg); }
.pass .badge { background: var(--pass); } .pass .badge::before { content: "✓"; }
.warn .badge { background: var(--warn); } .warn .badge::before { content: "!"; }
.fail .badge { background: var(--fail); } .fail .badge::before { content: "✕"; }
.pending .badge { background: var(--pending); animation: pulse 1s infinite alternate; } .pending .badge::before { content: "…"; }
@media (prefers-reduced-motion: reduce) { .pending .badge { animation: none; } }
.check-title { font-weight: 500; }
.check-detail { margin: 6px 0 0 46px; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; text-wrap: pretty; }

/* ---- fix guide: pale-blue panel for warnings, warm tint for failures */
.guide { margin: 12px 0 2px 46px; padding: 12px 14px; border-radius: var(--radius); background: var(--pale-blue); color: var(--blue); }
.fail .guide { background: var(--fail-tint); color: var(--ink); }
.guide h3 { margin: 0 0 6px; font-size: 15px; font-weight: 500; }
.guide ol { margin: 0; padding-left: 20px; }
.guide li { margin: 5px 0; }
.guide-shot {
  display: block; width: min(100%, 280px); height: auto; margin: 8px 0 6px;
  border-radius: 12px; border: 1px solid rgba(0, 0, 0, .1); background: #fff;
}

.actions { margin-top: 20px; }
.foot { text-align: center; color: var(--grey); padding: 8px 18px 24px; word-break: break-all; font-size: 11px; }

/* ---- full-screen guide for a failed check */
body.modal-open { overflow: hidden; }
.overlay {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--cream); padding: calc(16px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  animation: rise 320ms cubic-bezier(.16, 1, .3, 1) both;
}
.overlay[hidden] { display: none; }
.overlay-inner { max-width: 640px; margin: 0 auto; }
.overlay-head { display: flex; align-items: flex-start; gap: 18px; padding: 8px 4px 14px; }
.overlay-icon {
  flex: none; width: 34px; height: 34px; margin: 10px 8px 0 8px; border-radius: 7px;
  transform: rotate(45deg); background: var(--fail); transition: background-color var(--ease);
}
.overlay.warn .overlay-icon { background: var(--warn); }
.overlay.pass .overlay-icon { background: var(--pass); }
.overlay-title { margin: 0; font-weight: 300; font-size: 28px; line-height: 1.1; text-transform: uppercase; color: var(--green); text-wrap: balance; }
.overlay-detail { margin: 6px 0 0; color: var(--muted); }
.overlay .guide { margin: 0; padding: 14px 16px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.overlay .guide h3 { font-size: 17px; }
.overlay .guide li { margin: 10px 0; font-size: 18px; }
.overlay .guide-shot { width: 100%; max-width: 360px; }
.overlay .guide .link { display: none; }
.overlay-status {
  margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius);
  background: var(--pale-blue); color: var(--blue); text-align: center;
}
.overlay.pass .overlay-status { background: #eef3d6; color: #4f5a10; }
.overlay-actions { margin-top: 10px; }
.overlay-actions button { margin: 10px 0 0; }
.overlay.pass .overlay-actions { display: none; }

/* small text button on a check row that reopens the full-screen guide */
button.link {
  display: inline-block; margin: 0 0 8px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--blue); text-decoration: underline; cursor: pointer;
}
@media (prefers-reduced-motion: reduce) { .overlay { animation: none; } }
