/* kc-controls.css — data-entry controls from the control-language spec.
   Separate from kitcheck-design.css (the shared design system) because these styles
   target DOM built by control JS modules, so they must be global (not scoped). */

/* ---- Thermometer (§6) ----
   A glass tube with a rounded top and a reservoir bulb that bulges below and wider than the tube.
   Mercury rises from the bulb to the reading; the bulb is always full. Tube = the vertical slider. */
.kc-thermo { display: flex; gap: 0.6rem; align-items: center; user-select: none; }
.kc-thermo__stack { position: relative; padding-bottom: 34px; }
.kc-thermo__track {
  /* Narrow glass "neck" (agreed look): the mercury keeps its width, the glass hugs it. The wider bulb below
     gives the reservoir. Drag hit-area is padded out in the JS so the touch target stays comfortable. */
  position: relative; width: 34px; height: 138px;
  border-radius: 17px 17px 8px 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,0) 30%),
    var(--kc-surface-alt);
  border: 1.5px solid #BFCED6; box-shadow: inset 0 1px 2px rgba(20,40,60,.10);
  cursor: grab; touch-action: none; overflow: hidden; z-index: 1;
}
.kc-thermo__track:active { cursor: grabbing; }
.kc-thermo__track:focus-visible { outline: 3px solid color-mix(in srgb, var(--kc-blue) 60%, transparent); outline-offset: 2px; }
.kc-thermo__band {
  position: absolute; left: 3px; right: 3px; border-radius: 4px; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--kc-status-ok-edge) 70%, transparent),
    color-mix(in srgb, var(--kc-status-ok-edge) 70%, transparent) 6px,
    color-mix(in srgb, var(--kc-status-ok) 75%, transparent) 6px,
    color-mix(in srgb, var(--kc-status-ok) 75%, transparent) 12px);
  border-top: 2px solid var(--kc-status-ok-edge); border-bottom: 2px solid var(--kc-status-ok-edge);
}
.kc-thermo__fill {
  /* Mercury keeps its width; the glass narrows around it. Rises from the bottom (into the bulb) as one column. */
  position: absolute; left: 2px; right: 2px; bottom: 0; z-index: 2; min-height: 8px;
  border-radius: 999px 999px 0 0; pointer-events: none;
  transition: height .12s ease-out;
}
.kc-thermo__bulb {
  /* The reservoir: a circle wider than the tube, centred on the tube axis, bulging below it. */
  position: absolute; left: 50%; bottom: 0; width: 52px; height: 52px; z-index: 2;
  transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(20,40,60,.14);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.35), inset 0 -3px 6px rgba(20,40,60,.16);
}
.kc-thermo__read { align-self: center; }
.kc-thermo__val {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; font-size: 1.2rem; font-weight: 700; color: var(--kc-ink);
  white-space: nowrap;
}
.kc-thermo__val.is-ok { color: #12693A; }
.kc-thermo__val.is-fail { color: #8F2020; }
/* thermometer entry in a Checks equipment card — records on release, no Save button */
.kc-equip__entry--thermo { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }

/* ---- Liquid gauge (completion / % meter) ---- */
.kc-lg-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 0.45rem; }
.kc-lg-mount { width: 120px; height: 120px; }
/* The gauge fills its mount — the mount is the ONLY size knob (the strip shrinks it, /lab keeps 120). */
.kc-lg { position: relative; width: 100%; height: 100%; }
.kc-lg svg { display: block; width: 100%; height: 100%; }
.kc-lg__center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.kc-lg__num {
  font-size: 1.85rem; font-weight: 800; color: var(--kc-navy);
  font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.75);
}
.kc-lg__num small { font-size: 0.9rem; font-weight: 700; color: var(--kc-muted); }
.kc-lg__num--done { color: #2F9E5F; text-shadow: 0 1px 2px rgba(12, 32, 42, 0.38); }
.kc-lg-label { font-size: 0.9rem; font-weight: 700; color: var(--kc-navy); text-align: center; }

/* ---- Thumbwheel (§3) ---- */
.kc-wheel {
  position: relative; flex: 0 0 52px; height: 116px; overflow: hidden;
  touch-action: none; cursor: grab; perspective: 460px; border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--kc-surface-alt) 55%, var(--kc-surface)), var(--kc-surface-alt));
  border: 1px solid var(--kc-border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -5px 9px rgba(20, 40, 60, .12), inset 0 5px 9px rgba(20, 40, 60, .12);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 26%, #000 74%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 26%, #000 74%, transparent);
}
.kc-wheel--wide { flex-basis: 172px; }
.kc-wheel:active { cursor: grabbing; }
.kc-wheel:focus-visible { outline: 3px solid color-mix(in srgb, var(--kc-blue) 60%, transparent); outline-offset: 2px; }
.kc-wheel__list { position: absolute; left: 0; right: 0; top: 0; will-change: transform; transform-style: preserve-3d; }
.kc-wheel__item {
  height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 0.98rem; font-weight: 650; font-variant-numeric: tabular-nums;
  color: var(--kc-ink); white-space: nowrap; backface-visibility: hidden;
}
.kc-wheel__sel {
  position: absolute; left: 3px; right: 3px; top: calc(50% - 15px); height: 30px;
  border-radius: 7px; z-index: 2; pointer-events: none;
  background: color-mix(in srgb, var(--kc-blue) 14%, transparent);
  border-top: 1.5px solid var(--kc-blue); border-bottom: 1.5px solid var(--kc-blue);
}

/* ---- Tight time wheel (KcTimeWheel) ----
   The rolling wheel above shrunk to the size of the value itself, so a week of opening hours is fourteen
   of them and none has to be opened first. Global rather than scoped: the module builds these children,
   and Blazor's scoping attribute is only stamped on markup the compiler sees. */
.kc-twheel {
  display: inline-flex; align-items: baseline; gap: 1px; position: relative;
  padding: 0.1rem 0.35rem; border-radius: 0.375rem; cursor: ns-resize;
  border: 1px solid var(--kc-border-soft); background: var(--kc-surface);
  font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.8125rem; line-height: 1.3;
  color: var(--kc-ink); user-select: none; touch-action: none;
}
.kc-twheel:hover { border-color: var(--kc-blue-deep); }
.kc-twheel:focus-visible { outline: 3px solid color-mix(in srgb, var(--kc-blue) 60%, transparent); outline-offset: 1px; }
.kc-twheel.is-off { cursor: default; color: var(--kc-muted); background: var(--kc-surface-alt); }
.kc-twheel.is-off:hover { border-color: var(--kc-border-soft); }
.kc-twheel__part { display: inline-block; min-width: 1.35em; text-align: center; }
.kc-twheel__part:hover { color: var(--kc-blue-deep); }
.kc-twheel.is-off .kc-twheel__part:hover { color: inherit; }
.kc-twheel__sep { opacity: 0.55; }
.kc-twheel__dash { color: var(--kc-muted); }

/* Typing replaces the digits in place — same box, same width, no dialog. */
.kc-twheel__input {
  position: absolute; inset: 0; width: 100%; border: 0; border-radius: 0.375rem; padding: 0 0.35rem;
  font: inherit; font-variant-numeric: tabular-nums; text-align: center; color: var(--kc-ink);
  background: var(--kc-surface); outline: none;
}
.kc-twheel.is-typing { border-color: var(--kc-blue-deep); }

/* A one-frame nudge in the direction of travel: enough to read as motion on a fast roll, not enough to
   lag behind it. Suppressed when the reader asked for less. */
@keyframes kc-twheel-down { from { transform: translateY(-2px); } to { transform: none; } }
@keyframes kc-twheel-up { from { transform: translateY(2px); } to { transform: none; } }
.kc-twheel.is-rolling-down .kc-twheel__part { animation: kc-twheel-down 90ms ease-out; }
.kc-twheel.is-rolling-up .kc-twheel__part { animation: kc-twheel-up 90ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .kc-twheel.is-rolling-down .kc-twheel__part,
  .kc-twheel.is-rolling-up .kc-twheel__part { animation: none; }
}

/* ---- Yes/No (§3) ---- */
.kc-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.kc-yesno__btn {
  min-height: var(--kc-touch-min); border-radius: 12px; border: 2px solid #C7D5DC;
  background: var(--kc-surface-alt); color: var(--kc-subtle); font: inherit; font-weight: 700;
  font-size: 0.98rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 0.45rem; transition: all 0.15s ease;
}
.kc-yesno__btn:active { transform: scale(0.97); }
.kc-yesno__glyph { font-size: 1.2rem; font-weight: 800; }
.kc-yesno__btn.is-yes { background: var(--kc-status-ok); border-color: var(--kc-status-ok-edge); color: #12693A; }
.kc-yesno__btn.is-no { background: var(--kc-status-failed); border-color: var(--kc-status-failed-edge); color: #8F2020; }

/* ---- Pick-or-type (§4) ---- */
.kc-pot { display: flex; flex-direction: column; gap: 0.5rem; }
.kc-pot__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.kc-pot__chip {
  min-height: 40px; padding: 0.45rem 0.8rem; border-radius: var(--kc-radius-pill);
  border: 1.5px solid #C7D5DC; background: var(--kc-surface-alt); color: var(--kc-ink);
  font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.kc-pot__chip:active { transform: scale(0.96); }
.kc-pot__chip.is-on { background: var(--kc-blue); border-color: var(--kc-navy); color: #08313f; }
.kc-pot__input { width: 100%; }
.kc-pot__src { font-size: 0.72rem; color: var(--kc-muted); }

/* ---- Pass/fail segmented (§3) ---- */
.kc-seg { display: inline-flex; border-radius: 12px; overflow: hidden; border: 2px solid #C7D5DC; }
.kc-seg__btn {
  min-width: 56px; min-height: var(--kc-touch-min); border: 0; border-right: 1px solid #C7D5DC;
  background: var(--kc-surface-alt); color: var(--kc-subtle); font: inherit; font-size: 1.2rem;
  font-weight: 800; cursor: pointer; transition: all 0.14s ease;
}
.kc-seg__btn:last-child { border-right: 0; }
.kc-seg__btn:active { transform: scale(0.97); }
.kc-seg__btn.is-on.kc-seg__btn--na { background: var(--kc-status-empty); color: var(--kc-ink); }
.kc-seg__btn.is-on.kc-seg__btn--fail { background: var(--kc-status-failed); color: #8F2020; }
.kc-seg__btn.is-on.kc-seg__btn--pass { background: var(--kc-status-ok); color: #12693A; }

/* ---- Free text with Klar (§1) ---- */
.kc-freetext { display: flex; flex-direction: column; gap: 0.5rem; }
.kc-freetext__area { width: 100%; resize: vertical; font-family: var(--kc-font-body); }
.kc-freetext__foot { display: flex; align-items: center; justify-content: flex-end; gap: 0.7rem; }
.kc-freetext__state { font-size: 0.8rem; color: #12693A; font-weight: 650; }

/* ---- Photo / evidence capture (§3) ---- */
.kc-capture { display: flex; align-items: center; gap: 0.8rem; }
.kc-capture__tile {
  width: 64px; height: 64px; border-radius: 12px; border: 2px dashed #C7D5DC;
  background: var(--kc-surface-alt); display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--kc-muted); cursor: pointer; flex: 0 0 auto;
}
.kc-capture__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
/* The real file field is invisible (opacity 0), so Tab reached it and nothing showed where focus was. The tile it sits in wears
   the focus ring instead — the navy 3 px ring every button has (.kc-btn:focus-visible) — and only while the field has KEYBOARD
   focus. A mouse click on the tile focuses the field too, so :focus-within would light the ring for everyone who clicks; the
   field's own :focus-visible does not match for a mouse click. At rest, and under the mouse, the tile is as it was. */
.kc-capture__tile:has(.kc-capture__input:focus-visible) { outline: 3px solid var(--kc-navy); outline-offset: 2px; }
.kc-capture__thumb {
  width: 64px; height: 64px; border-radius: 12px; border: 1px solid #C7D5DC; flex: 0 0 auto;
  background-size: cover; background-position: center; position: relative;
}
/* A picture the page never reads (the public demo): nothing to draw, so the tile is a plain well with its tick. */
.kc-capture__thumb--kept { background-color: var(--kc-surface-alt); }
.kc-capture__thumb::after {
  content: "✓"; position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--kc-status-ok-edge); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem;
  border: 2px solid var(--kc-surface);
}
.kc-capture__note { font-size: 0.85rem; color: var(--kc-subtle); }
.kc-capture__note b { color: var(--kc-ink); }
.kc-capture__clear {
  font: inherit; font-size: 0.8rem; font-weight: 650; border: 1.5px solid #C7D5DC;
  background: transparent; color: var(--kc-subtle); border-radius: 9px; padding: 0.35rem 0.7rem;
  cursor: pointer; min-height: 36px;
}

/* ---- Checklist / multi-point inspection (§3) ---- */
.kc-checklist { display: flex; flex-direction: column; border: 1px solid var(--kc-border-soft); border-radius: 10px; overflow: hidden; }
.kc-checklist__row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
  padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--kc-border-soft);
}
.kc-checklist__row:last-child { border-bottom: 0; }
.kc-checklist__label { font-size: 0.92rem; }
.kc-checklist__marks { display: inline-flex; gap: 0.3rem; }
.kc-checklist__mark {
  min-width: 44px; min-height: 40px; border-radius: 9px; border: 1.5px solid #C7D5DC;
  background: var(--kc-surface-alt); color: var(--kc-subtle); font: inherit; font-size: 1.05rem;
  font-weight: 800; cursor: pointer;
}
.kc-checklist__mark--pass.is-on { background: var(--kc-status-ok); border-color: var(--kc-status-ok-edge); color: #12693A; }
.kc-checklist__mark--fail.is-on { background: var(--kc-status-failed); border-color: var(--kc-status-failed-edge); color: #8F2020; }

/* ---- Corrective-action popup (§7) ---- */
.kc-overlay {
  position: fixed; inset: 0; background: rgba(20, 30, 40, .55);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 200;
  isolation: isolate;
}
.kc-modal {
  background: var(--kc-surface); border-radius: 16px; border: 1px solid var(--kc-border-soft);
  box-shadow: var(--kc-shadow-lift); width: 100%; max-width: 420px; padding: 1.3rem;
}
.kc-modal__flag {
  display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 800; font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: #8F2020;
  background: var(--kc-status-failed); border: 1.5px solid var(--kc-status-failed-edge);
  padding: 0.3rem 0.6rem; border-radius: var(--kc-radius-pill);
}
.kc-modal__title { margin: 0.7rem 0 0.1rem; font-size: 1.2rem; }
.kc-modal__sub { margin: 0 0 1rem; color: var(--kc-muted); font-size: 0.9rem; }
.kc-modal__q { margin: 0 0 0.5rem; font-weight: 700; font-size: 0.9rem; }
.kc-modal__actions { display: flex; flex-direction: column; gap: 0.5rem; }
.kc-modal__actions button {
  width: 100%; min-height: 48px; border-radius: 11px; border: 1.5px solid #C7D5DC;
  background: var(--kc-surface-alt); color: var(--kc-ink); font: inherit; font-weight: 650;
  font-size: 0.94rem; cursor: pointer; text-align: left; padding: 0.55rem 0.85rem;
}
.kc-modal__actions button.is-on { background: var(--kc-blue); border-color: var(--kc-navy); color: #08313f; }
.kc-modal__notify { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #C7D5DC; }
.kc-btn-notify {
  width: 100%; min-height: 48px; border-radius: 11px; border: 2px solid var(--kc-navy);
  background: transparent; color: var(--kc-ink); font: inherit; font-weight: 700; cursor: pointer;
}
.kc-btn-notify.sent { background: var(--kc-status-ok); border-color: var(--kc-status-ok-edge); color: #12693A; cursor: default; }
.kc-modal__foot { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.2rem; }
.kc-modal__foot button { font: inherit; font-weight: 650; border-radius: 10px; padding: 0.55rem 1.1rem; min-height: var(--kc-touch-min); cursor: pointer; }
.kc-modal__cancel { border: 1.5px solid #C7D5DC; background: transparent; color: var(--kc-subtle); }
.kc-modal__done { border: 1.5px solid var(--kc-navy); background: var(--kc-blue); color: #08313f; }
.kc-modal__done:disabled { opacity: 0.5; cursor: default; }

/* ---- Schema-driven check card (§4) ---- */
.kc-check {
  background: color-mix(in srgb, var(--tc) 28%, var(--kc-surface));
  border: 1.5px solid var(--kc-border-soft); border-radius: var(--kc-radius-card);
  box-shadow: var(--kc-shadow-card); padding: 1.1rem;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.kc-check.is-ok { background: color-mix(in srgb, var(--kc-status-ok) 60%, var(--kc-surface)); box-shadow: 0 0 0 1.5px var(--kc-status-ok-edge), var(--kc-shadow-card); }
.kc-check.is-fail { background: color-mix(in srgb, var(--kc-status-failed) 60%, var(--kc-surface)); box-shadow: 0 0 0 1.5px var(--kc-status-failed-edge), var(--kc-shadow-card); }
.kc-check.is-handled {
  box-shadow: 0 0 0 1.5px var(--kc-status-missed-edge), var(--kc-shadow-card);
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--kc-status-missed) 55%, var(--kc-surface)) 0,
    color-mix(in srgb, var(--kc-status-missed) 55%, var(--kc-surface)) 14px,
    color-mix(in srgb, var(--kc-status-ok) 55%, var(--kc-surface)) 14px,
    color-mix(in srgb, var(--kc-status-ok) 55%, var(--kc-surface)) 28px);
}
.kc-check__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.9rem; }
.kc-check__title { margin: 0; font-size: 1.15rem; }
.kc-check__verdict {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 700;
  padding: 0.35rem 0.7rem; border-radius: var(--kc-radius-pill); white-space: nowrap;
  border: 1.5px solid var(--kc-status-empty); background: var(--kc-status-empty); color: var(--kc-subtle);
}
.kc-check__verdict[data-state="ok"] { background: var(--kc-status-ok); border-color: var(--kc-status-ok-edge); color: #12693A; }
.kc-check__verdict[data-state="fail"] { background: var(--kc-status-failed); border-color: var(--kc-status-failed-edge); color: #8F2020; }
.kc-check__verdict[data-state="handled"] { background: var(--kc-status-missed); border-color: var(--kc-status-missed-edge); color: #7A5B12; }
.kc-check__verdict[data-state="missed"] { background: var(--kc-status-missed); border-color: var(--kc-status-missed-edge); color: #7A5B12; }
.kc-check.is-missed { background: color-mix(in srgb, var(--kc-status-missed) 45%, var(--kc-surface)); box-shadow: 0 0 0 1.5px var(--kc-status-missed-edge), var(--kc-shadow-card); }
.kc-check__done { margin: 0.6rem 0 0; color: var(--kc-muted); font-weight: 600; font-size: 0.85rem; }

/* Dagens kontroller — group = a view (type), each unit its own compact check card (storage-checks.html). */
.kc-group { background: color-mix(in srgb, var(--tc, var(--kc-surface)) 30%, var(--kc-surface)); border: 1.5px solid var(--kc-border-soft); border-radius: var(--kc-radius-card); box-shadow: var(--kc-shadow-card); padding: 1.1rem; display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.4rem; }
.kc-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.kc-group__title { margin: 0; font-size: 1.15rem; color: var(--kc-navy); }
.kc-group__type { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kc-muted); font-weight: 700; margin-left: 0.5rem; }
.kc-group__sum { font-size: 0.78rem; color: var(--kc-subtle); font-weight: 600; }
.kc-group__sum b { color: var(--kc-ink); font-variant-numeric: tabular-nums; }
.kc-group__close { font: inherit; font-size: 1rem; font-weight: 700; min-width: 40px; min-height: 40px; border-radius: 10px;
    border: 1.5px solid var(--kc-border-soft); background: var(--kc-surface); color: var(--kc-subtle); cursor: pointer; }
.kc-group__instr { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }

/* The type popup: backdrop click / mobile BACK / all-done closes it — back to the gauge screen. */
.kc-boardoverlay { position: fixed; inset: 0; z-index: 60; background: rgba(20, 30, 40, 0.55); backdrop-filter: blur(2px);
    display: flex; align-items: flex-start; justify-content: center; padding: 2.5vh 1rem; overflow-y: auto; }
.kc-overlaypanel { width: min(1160px, 100%); max-height: 94vh; overflow-y: auto; border-radius: var(--kc-radius-card);
    background: var(--kc-surface-alt); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4); }
.kc-overlaypanel .kc-group { margin-top: 0; border-radius: var(--kc-radius-card); }
@media (max-width: 640px) { .kc-boardoverlay { padding: 0; } .kc-overlaypanel { width: 100%; max-height: 100dvh; border-radius: 0; } }
/* The day-board overview strip: the liquid gauges ARE the navigation — one gauge per type per due horizon;
   clicking one opens that type's checks below. Bare gauges, no boxes. */
/* Each horizon (Idag / Denna vecka / Senare) is a CAPSULE — its gauges visibly belong together. A white card
   on the board's blue frame, so it needs no border of its own; the frame's column does the spacing. */
.kc-horizon { background: var(--kc-surface); border-radius: var(--kc-radius-panel); box-shadow: var(--kc-shadow-card); padding: 14px 20px 18px; min-width: 0; }
.kc-root .kc-gaugestrip__hlabel { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kc-heading-ink); font-weight: 700; margin: 0 0 10px; }
.kc-gaugestrip { display: flex; flex-wrap: wrap; gap: 0.8rem 1.1rem; align-items: flex-start; margin: 0; }
.kc-gaugestrip__item { display: flex; flex-direction: column; align-items: center; width: 108px; padding: 0.35rem 0.2rem;
    font: inherit; background: transparent; border: 2px solid transparent; border-radius: var(--kc-radius-card); cursor: pointer;
    transition: border-color 0.2s, background 0.2s; }
.kc-gaugestrip__item:hover { background: color-mix(in srgb, var(--tc, var(--kc-surface-alt)) 24%, transparent); }
.kc-gaugestrip__item.is-sel { border-color: var(--kc-navy); background: color-mix(in srgb, var(--tc, var(--kc-surface-alt)) 30%, var(--kc-surface)); }
.kc-gaugestrip__item .kc-lg-mount { width: 92px; height: 92px; }
.kc-gaugestrip__item .kc-lg__num { font-size: 1.35rem; }
.kc-gaugestrip__item .kc-lg__num small { font-size: 0.7rem; }
/* Long type names hyphenate on Swedish rules ("Rengörings-kontroll"), never a raw mid-word cut. */
.kc-gaugestrip__item .kc-lg-label { font-size: 0.68rem; line-height: 1.25; max-width: 100px; hyphens: auto; overflow-wrap: break-word; }
/* Phones: three gauges per row. */
@media (max-width: 480px) {
  .kc-gaugestrip { gap: 0.5rem 0.4rem; }
  .kc-gaugestrip__item { width: 31%; padding: 0.25rem 0.1rem; }
  .kc-gaugestrip__item .kc-lg-mount { width: 76px; height: 76px; }
  .kc-gaugestrip__item .kc-lg__num { font-size: 1.15rem; }
  .kc-gaugestrip__item .kc-lg-label { max-width: 100%; }
  .kc-horizon { padding: 12px 10px 14px; }
  .kc-root .kc-gaugestrip__hlabel { margin: 0 0 8px 6px; }
}

/* The day board on the blue page frame (.kc-blueframe in kitcheck-design.css), at the page's ordinary width
   (owner, 2026-10-09). What is due today runs the full width; the two horizons further out sit side by side
   under it when both have something, stack when the column is too narrow for two, and a lone one takes the
   whole row — auto-fit collapses the empty track. */
.kc-board__later { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }

/* "X av Y klara idag", on the blue beside the title: today's progress at a glance, read off the same Idag
   checks as the gauges under it. A thin bar under the count, in the gauge's own "done" green. */
.kc-board__today { min-width: 220px; font-size: 0.875rem; }
.kc-board__today strong { font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kc-board__todaybar, .kc-blueframe__bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.7); }
.kc-board__todaybar { width: 220px; }
.kc-board__todayfill, .kc-blueframe__barfill { background: var(--kc-gauge-full); }

/* The same bar in any framed page's head — the learner's course page, parts done — under the status line, at the
   title block's width (at most 320px) rather than the day board's fixed 220px beside it. Same track, same green. */
.kc-blueframe__bar { width: min(320px, 100%); margin-top: 6px; }

/* Beside the title or under it, and nothing in between. The head is a wrapping row, so the count drops under
   the title the moment the two stop fitting side by side — and that moment is the head's own width, not the
   viewport's: the title's 560px basis + the 24px gap + the count's 220px. Asked of the head as a container, so
   the stacked layout (full width, from the left, the bar across the column) starts exactly where the wrap
   does. On a viewport query it started at the phone's 760px while the wrap began near 856, and a tablet held
   up in portrait got the desktop count dropped under the title: a 220px box on the left with its text pushed
   to the right inside it. */
.kc-board > .kc-blueframe__head { container: kc-board-head / inline-size; }
@container kc-board-head (width < 804px) {
  .kc-board__today { flex-basis: 100%; min-width: 0; align-items: flex-start; }
  .kc-board__todaybar { width: 100%; }
}

/* The page's own status lines — "Välj ett kök …", "Inga kontroller planerade idag.", "Laddar…" — on the
   frame's white card at the size they had as loose text (.kc-summary). Above the kitchens that line is the
   whole page, read off a phone in a kitchen; the frame's compact notice is for the data surfaces. */
.kc-board > .kc-blueframe__notice { font-size: 1.1rem; }

/* The cards that used to stand alone under the hero now sit in the frame's column, which spaces them. Two
   classes deep: .kc-notready is KcKitchenReadiness's scoped rule, whose attribute selector loads after this
   sheet and would otherwise win at equal weight. */
.kc-blueframe.kc-board .kc-startup,
.kc-blueframe.kc-board .kc-notready { margin-top: 0; }
.kc-board__sheet { padding: 14px 20px 18px; }

/* A phone, as the phone mockup has it: the column a little tighter (12px between the blocks, 4px under the
   title block), the count's figure and the title a size down. Scoped to the board, so the frame's other
   pages keep the spacing and title they have. */
@media (max-width: 760px) {
  .kc-blueframe.kc-board { gap: 12px; }
  .kc-board > .kc-blueframe__head { padding-bottom: 4px; }
  .kc-board__today strong { font-size: 1.25rem; }
  .kc-root .kc-board .kc-blueframe__title { font-size: 1.625rem; }
  .kc-board__sheet { padding: 12px 12px 14px; }
}

/* Two board grids (from the prototypes): compact unit tiles (storage-checks.html) sit many-up;
   rich cards (temp-family/reheat/hygiene/ankomst) sit two-up at ~900px and scale to more columns
   on large screens, one column on phones. */
.kc-unit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 280px)); gap: 0.8rem; align-items: start; }
.kc-card-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; align-items: start; }
/* auto-fit + a generous track cap: a lone card grows to 620px on a big screen instead of leaving a dead band. */
@media (min-width: 760px) { .kc-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 620px)); } }
.kc-unit-grid > *, .kc-card-grid > * { min-width: 0; }

/* THE CHECK CARD (prototype .check / .unit): pending = the check-type colour (--tc), verdicts override. */
.kc-card {
  background: color-mix(in srgb, var(--tc, var(--kc-surface)) 32%, var(--kc-surface));
  border: 1.5px solid var(--kc-border-soft); border-radius: var(--kc-radius-card); box-shadow: var(--kc-shadow-card);
  padding: 1.1rem; display: flex; flex-direction: column; gap: 0.8rem;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.kc-card--compact { padding: 0.7rem 0.6rem 0.6rem; border-radius: 12px; gap: 0.5rem; }
.kc-card.is-ok { border-color: var(--kc-status-ok-edge); background: color-mix(in srgb, var(--kc-status-ok) 62%, var(--kc-surface)); box-shadow: 0 0 0 1.5px var(--kc-status-ok-edge), var(--kc-shadow-card); }
.kc-card.is-fail { border-color: var(--kc-status-failed-edge); background: color-mix(in srgb, var(--kc-status-failed) 62%, var(--kc-surface)); box-shadow: 0 0 0 1.5px var(--kc-status-failed-edge), var(--kc-shadow-card); }
.kc-card.is-missed { border-color: var(--kc-status-missed-edge); background: color-mix(in srgb, var(--kc-status-missed) 45%, var(--kc-surface)); }
.kc-card.is-handled { border-color: var(--kc-status-missed-edge); box-shadow: 0 0 0 1.5px var(--kc-status-missed-edge), var(--kc-shadow-card);
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--kc-status-missed) 42%, var(--kc-surface)) 0, color-mix(in srgb, var(--kc-status-missed) 42%, var(--kc-surface)) 10px,
    color-mix(in srgb, var(--kc-status-ok) 42%, var(--kc-surface)) 10px, color-mix(in srgb, var(--kc-status-ok) 42%, var(--kc-surface)) 20px); }

.kc-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.kc-card__name { margin: 0; font-size: 1.15rem; color: var(--kc-navy); line-height: 1.2; }
.kc-card--compact .kc-card__name { font-size: 0.9rem; font-weight: 650; }
.kc-card__type { display: block; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kc-muted); font-weight: 700; margin-top: 0.15rem; }
/* "Visa hur": the small "?" beside a card's name (only the cards that have a walkthrough get the row). A 22 px mark with a 44 px tap target. */
.kc-card__titlerow { display: flex; align-items: center; gap: 0.4rem; }
.kc-card__help {
  position: relative; flex: none; width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--kc-navy); background: rgba(255, 255, 255, 0.85); color: var(--kc-navy);
  font: inherit; font-size: 0.72rem; font-weight: 800; line-height: 1; cursor: pointer;
  display: inline-grid; place-items: center;
}
.kc-card__help::after { content: ""; position: absolute; inset: -13px; }
.kc-card__help:hover { background: var(--kc-navy); color: #fff; }
.kc-card__help:focus-visible { outline: 3px solid var(--kc-blue-deep); outline-offset: 2px; }
.kc-card__cd { font-size: 0.72rem; font-weight: 600; color: var(--kc-subtle); font-variant-numeric: tabular-nums; }
.kc-card__cd b { font-weight: 800; }
.kc-card--compact .kc-card__cd { font-size: 0.66rem; }
.kc-card__cd.is-urgent b, .kc-card__cd.is-over b { color: #8F2020; }
.kc-card__rule { font-size: 0.8rem; color: var(--kc-subtle); background: color-mix(in srgb, var(--kc-surface) 65%, transparent); border: 1px dashed var(--kc-border-soft); border-radius: 9px; padding: 0.4rem 0.65rem; }
.kc-card__rule b { color: var(--kc-ink); font-weight: 700; }
.kc-card__instr { display: flex; flex-direction: column; gap: 0.3rem; }
.kc-card__instrtoggle { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem; font: inherit; font-size: 0.74rem; font-weight: 700; color: var(--kc-blue-deep, var(--kc-navy)); background: transparent; border: none; padding: 0; cursor: pointer; }
.kc-card__chev { font-size: 0.65rem; }
.kc-card__instrtext { margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--kc-subtle); background: color-mix(in srgb, var(--kc-surface) 65%, transparent); border: 1px solid var(--kc-border-soft); border-radius: 9px; padding: 0.5rem 0.7rem; white-space: pre-line; }
.kc-card__body { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.kc-card--compact .kc-card__body { flex-direction: row; align-items: center; justify-content: center; gap: 0.4rem; }
.kc-card__attr { font-size: 0.78rem; font-weight: 600; color: var(--kc-subtle); }

.kc-card__verdict {
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; flex: 0 0 auto;
  font-size: 0.78rem; font-weight: 700; padding: 0.3rem 0.65rem; border-radius: 999px;
  border: 1.5px solid var(--kc-status-empty); background: var(--kc-status-empty); color: var(--kc-subtle);
}
.kc-card--compact .kc-card__verdict { font-size: 0.7rem; padding: 0.2rem 0.5rem; }
.kc-card__verdict[data-v="ok"] { background: var(--kc-status-ok); border-color: var(--kc-status-ok-edge); color: #12693A; }
.kc-card__verdict[data-v="fail"] { background: var(--kc-status-failed); border-color: var(--kc-status-failed-edge); color: #8F2020; }
.kc-card__verdict[data-v="handled"] { background: var(--kc-status-missed); border-color: var(--kc-status-missed-edge); color: #7A5B12; }
/* Ej utförd — Historik's own missed tone, so the two surfaces name the same fact the same way. The fill is
   --kc-status-missed (a pale wash, never a text colour); the text is the readable --kc-warn-text on it. */
.kc-card__verdict[data-v="missed"] { background: var(--kc-status-missed); border-color: var(--kc-status-missed-edge); color: var(--kc-warn-text); font-weight: 800; }

/* Inline corrective — expands the card DOWNWARD (owner decision; no modal). */
.kc-card__corr { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.7rem; border-radius: 12px; background: color-mix(in srgb, var(--kc-status-failed) 22%, var(--kc-surface)); border: 1.5px solid var(--kc-status-failed-edge); }
.kc-card__corrflag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #8F2020; }
.kc-card__corrq { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--kc-ink); }
.kc-card__actions { display: flex; flex-direction: column; gap: 0.4rem; }
.kc-card__actions button { text-align: left; font: inherit; font-size: 0.88rem; font-weight: 600; padding: 0.5rem 0.7rem; border-radius: 10px; border: 1.5px solid var(--kc-border-soft); background: var(--kc-surface); color: var(--kc-ink); cursor: pointer; min-height: 44px; }
.kc-card__actions button.is-on { background: var(--kc-blue); border-color: var(--kc-navy); color: #08313f; }
.kc-card__notify { font: inherit; font-size: 0.85rem; font-weight: 700; padding: 0.5rem 0.7rem; border-radius: 10px; border: 2px solid var(--kc-navy); background: transparent; color: var(--kc-ink); cursor: pointer; min-height: 44px; }
.kc-card__notify.is-sent { background: var(--kc-status-ok); border-color: var(--kc-status-ok-edge); color: #12693A; cursor: default; }
.kc-card__corrfoot { display: flex; gap: 0.5rem; justify-content: flex-end; }
.kc-card__cancel { font: inherit; font-size: 0.85rem; font-weight: 650; padding: 0.5rem 0.9rem; border-radius: 10px; border: 1.5px solid var(--kc-border-soft); background: transparent; color: var(--kc-subtle); cursor: pointer; min-height: 44px; }
.kc-card__done { font: inherit; font-size: 0.88rem; font-weight: 700; padding: 0.5rem 0.9rem; border-radius: 10px; border: 1.5px solid var(--kc-navy); background: var(--kc-blue); color: #08313f; cursor: pointer; min-height: 44px; }
.kc-card__done:disabled { opacity: 0.5; cursor: default; }
.kc-card__handledline { text-align: left; font: inherit; font-size: 0.8rem; font-weight: 700; color: #7A5B12; background: transparent; border: none; padding: 0; cursor: pointer; }
.kc-card__trigger { font: inherit; font-size: 0.9rem; font-weight: 700; padding: 0.55rem 0.8rem; border-radius: 11px; border: 1.5px solid var(--kc-status-failed-edge); background: var(--kc-status-failed); color: #8F2020; cursor: pointer; min-height: 46px; animation: kc-pulse 1.6s ease-in-out infinite; }
@keyframes kc-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kc-status-failed-edge) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .kc-card__trigger { animation: none; } }

/* Thermometer sizing follows the prototypes: compact tile = 1.2rem value (storage-checks.html);
   a rich card = the larger 36×160 tube with the 1.7rem readout (temp-family.html). */
.kc-card:not(.kc-card--compact) .kc-thermo__track { width: 36px; height: 160px; border-radius: 18px 18px 8px 8px; }
.kc-card:not(.kc-card--compact) .kc-thermo__val { font-size: 1.7rem; }

/* Field scaffolding inside rich cards. */
.kc-fieldlabel { font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--kc-muted); font-weight: 700; }
.kc-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.kc-fieldrow { display: flex; align-items: flex-start; gap: 1.2rem; flex-wrap: wrap; }
.kc-stamp { font-size: 0.72rem; font-weight: 600; color: var(--kc-subtle); font-variant-numeric: tabular-nums; }

/* Holding family — thermometer + the hold-time wheel (part of the verdict). */
.kc-holding { display: flex; align-items: flex-start; gap: 1.2rem; flex-wrap: wrap; }
.kc-holding__hold { display: flex; flex-direction: column; gap: 0.35rem; }

/* Process family — start/target readings + time, with kl-stamps. */
.kc-process { display: flex; flex-direction: column; gap: 0.8rem; }
.kc-process__inputs { display: flex; align-items: flex-start; gap: 1.2rem; flex-wrap: wrap; }
.kc-process__field { display: flex; flex-direction: column; gap: 0.35rem; }
.kc-process__rule { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--kc-subtle); background: color-mix(in srgb, var(--kc-surface) 65%, transparent); border: 1px dashed var(--kc-border-soft); border-radius: 9px; padding: 0.45rem 0.7rem; }
.kc-process__tag { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; color: var(--kc-muted); }
.kc-process__target { font-weight: 700; color: var(--kc-ink); font-variant-numeric: tabular-nums; }

/* Composite family — stacked fields. */
.kc-composite { display: flex; flex-direction: column; gap: 0.8rem; }
.kc-composite__field { display: flex; flex-direction: column; gap: 0.3rem; }

/* Gauge family — numeric value vs threshold. */
.kc-gauge { display: flex; align-items: center; gap: 0.5rem; }
.kc-gauge__input { max-width: 7rem; text-align: center; }

/* Dagens kontroller — day board grouped by area. */
.kc-daygroup { margin-top: 1.6rem; }
.kc-daycount { font-size: 0.78rem; font-weight: 700; color: var(--kc-muted); margin-left: 0.5rem; }
.kc-checkgrid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.kc-checkgrid > * { min-width: 0; }   /* let a card shrink to its column instead of overflowing onto a neighbour */
@media (min-width: 760px) { .kc-checkgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); align-items: start; } }
.kc-check__fields { display: flex; flex-direction: column; gap: 0.9rem; }
.kc-check__field { display: flex; flex-direction: column; gap: 0.4rem; }
.kc-check__label { font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--kc-muted); font-weight: 700; }
.kc-check__method { font-size: 0.8rem; color: var(--kc-subtle); background: var(--kc-surface-alt); border-radius: 8px; padding: 0.4rem 0.6rem; }
.kc-check__todo { font-size: 0.85rem; color: var(--kc-muted); font-style: italic; }
.kc-check__foot { display: flex; justify-content: flex-end; margin-top: 1rem; }
.kc-check__save { min-width: 120px; }
.kc-check__save:disabled { opacity: 0.5; cursor: default; }

/* Number field — inline value + unit. */
.kc-check__numrow { display: flex; align-items: center; gap: 0.5rem; }
.kc-check__num { max-width: 8rem; }
.kc-check__unit { color: var(--kc-muted); font-weight: 700; }

/* Corrective flow (spec §7): a fail prompts an action before Spara; once handled it shows striped. */
.kc-check__corr { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
    margin-top: 0.9rem; padding: 0.6rem 0.8rem; border-radius: var(--kc-radius-card);
    background: var(--kc-status-failed); color: var(--kc-navy); }
.kc-check__corrtext { font-weight: 600; font-size: 0.9rem; }
.kc-check__handled { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.9rem; padding: 0.6rem 0.8rem;
    border-radius: var(--kc-radius-card); background: var(--kc-surface-alt); color: var(--kc-navy); font-weight: 700; }

/* ---- Lab page ---- */
.lab-wheelrow { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.lab-colon { font-weight: 800; color: var(--kc-muted); font-size: 1.2rem; }
.lab-big {
  margin-left: 0.4rem; font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; font-size: 1.4rem; font-weight: 700; color: var(--kc-navy);
}
.lab-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
@media (min-width: 640px) { .lab-grid { grid-template-columns: 1fr 1fr; } }
.lab-card {
  background: color-mix(in srgb, var(--tc, var(--kc-surface)) 28%, var(--kc-surface));
  border: 1.5px solid var(--kc-border-soft); border-radius: var(--kc-radius-card);
  box-shadow: var(--kc-shadow-card); padding: 1.1rem;
}
.lab-card h3 { margin: 0 0 0.15rem; }
.lab-rule { margin: 0 0 0.7rem; font-size: 0.85rem; color: var(--kc-muted); }
.lab-verdict { margin: 0.7rem 0 0; font-weight: 650; }

/* ---- Avvikelsetavlan (CN-056): the NCR lifecycle AS the layout — one column per step ---- */
.kc-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: start;
}
.kc-kcol {
  background: var(--kc-surface-alt, #F3F8FA);
  border: 1.5px solid var(--kc-border-soft);
  border-radius: var(--kc-radius-card);
  padding: 0.6rem 0.6rem 0.8rem;
  min-height: 120px;
}
.kc-kcol__head {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.6rem; padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--kc-border-soft);
}
.kc-kcol__name { font-weight: 700; color: var(--kc-navy); font-size: 0.95rem; }
.kc-kcol__count {
  margin-left: auto; min-width: 1.6em; text-align: center;
  background: var(--kc-surface); border: 1px solid var(--kc-border-soft);
  border-radius: 999px; font-size: 0.8rem; font-weight: 700; padding: 0.05rem 0.45rem;
}
.kc-kcol__empty { color: var(--kc-muted); text-align: center; margin: 0.6rem 0; }

.kc-ncr {
  background: var(--kc-surface);
  border: 1.5px solid var(--kc-border-soft);
  border-left: 4px solid var(--kc-blue-light, #7AC0DA);
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  margin-bottom: 0.55rem;
  box-shadow: var(--kc-shadow-card);
}
/* A food-safety deviation is not just another card — the edge says so before you read it. */
.kc-ncr.is-safety { border-left-color: #E4643B; }
.kc-ncr__top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.3rem; }
.kc-ncr__ref { font-weight: 700; font-size: 0.85rem; color: var(--kc-navy); letter-spacing: 0.02em; }
.kc-ncr__badge {
  font-size: 0.7rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px;
  background: var(--kc-surface-alt, #EEF4F7); border: 1px solid var(--kc-border-soft); color: var(--kc-navy);
}
.kc-ncr__badge--safety { background: #FECACA; border-color: #F0A0A0; color: #7f1d1d; }
.kc-ncr__title { font-weight: 650; font-size: 0.95rem; }
.kc-ncr__desc {
  margin: 0.2rem 0 0.35rem; font-size: 0.85rem; color: var(--kc-subtle);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.kc-ncr__meta {
  display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem;
  font-size: 0.75rem; color: var(--kc-muted);
}
.kc-ncr__action { margin-top: 0.35rem; font-size: 0.78rem; color: var(--kc-navy); }
/* Spärrad vara and the art. 19 notification: two facts a tillsyn asks for first, so they sit on the card. */
.kc-ncr__flags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
/* What the verifier saw — the record's own words, not a phrase the page invented. */
.kc-ncr__verify {
  margin-top: 0.35rem; font-size: 0.78rem; color: var(--kc-navy);
  border-left: 3px solid var(--kc-status-ok-edge); padding-left: 0.5rem;
}
.kc-ncr__actions { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.kc-ncr__actions .kc-btn { width: 100%; }
/* The verification and follow-up panels: they open in place on the card, the way the corrective popup
   opens on a check card — the work happens where the record is, not on another page. */
.kc-ncr__panel {
  margin-top: 0.5rem; padding: 0.55rem; border-radius: 8px;
  background: var(--kc-surface-alt, #EEF4F7); border: 1px solid var(--kc-border-soft);
}
.kc-ncr__panel .kc-input { font-size: 0.85rem; }
.kc-ncr__self {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-top: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--kc-navy);
}

/* Phones: the columns stack, so the board is a readable list rather than four slivers. */
@media (max-width: 900px) {
  .kc-kanban { grid-template-columns: 1fr; }
  .kc-kcol { min-height: 0; }
}

/* ── The deviation card, opened ───────────────────────────────────────────────────────────────────
   A kanban card is a summary and a door. Everything that needs room — the full description, the
   pictures, the verification box and the whole CAPA form — lives in this panel instead of inside a
   column one quarter of the page wide, which is what used to burst the board apart when a card was
   expanded. Rides the day board's own overlay (.kc-boardoverlay / .kc-overlaypanel above), so a
   deviation opens the same way a check type does. */
.kc-ncrfull { padding: 1.1rem 1.25rem 1.35rem; border-left: 5px solid var(--kc-blue-light, #7AC0DA); border-radius: var(--kc-radius-card); }
.kc-ncrfull.is-safety { border-left-color: #E4643B; }
.kc-ncrfull__head { display: flex; align-items: flex-start; gap: 0.9rem; padding-bottom: 0.7rem; border-bottom: 1.5px solid var(--kc-border-soft); }
.kc-ncrfull__ref { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--kc-muted); }
.kc-ncrfull__title { margin: 0.1rem 0 0; font-size: 1.35rem; color: var(--kc-navy); }
.kc-ncrfull__badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-left: auto; align-items: center; }
.kc-ncrfull__head .kc-group__close { margin-left: 0.35rem; }

/* Story on the left, facts on the right. The facts column is fixed so the prose keeps a readable
   measure however wide the screen gets. */
.kc-ncrfull__body { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1.4rem; margin-top: 0.9rem; }
.kc-ncrfull__h { margin: 1rem 0 0.3rem; font-size: 0.72rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--kc-hero-ink); font-weight: 800; }
.kc-ncrfull__main > .kc-ncrfull__h:first-child { margin-top: 0; }
.kc-ncrfull__desc { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--kc-navy); white-space: pre-wrap; }
.kc-ncrfull__dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.7rem; font-size: 0.85rem; }
.kc-ncrfull__dl dt { color: var(--kc-muted); }
.kc-ncrfull__dl dd { margin: 0; color: var(--kc-navy); }
.kc-ncrfull__side { background: var(--kc-surface); border: 1.5px solid var(--kc-border-soft); border-radius: var(--kc-radius-card); padding: 0.8rem 0.9rem; align-self: start; }

/* The pictures. Thumbnails that open the full file — a photograph of a deviation is often a label or a
   thermometer reading, and neither is legible at card size. */
.kc-ncrfull__shots { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.kc-ncrfull__shot { display: block; width: 190px; height: 145px; border-radius: 10px; overflow: hidden;
  border: 1.5px solid var(--kc-border-soft); background: var(--kc-surface); box-shadow: var(--kc-shadow-card); }
.kc-ncrfull__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kc-ncrfull__shot:hover { border-color: var(--kc-navy); }

.kc-ncrfull__foot { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1.5px solid var(--kc-border-soft); }
.kc-ncrfull__panel { margin-top: 0.9rem; background: var(--kc-surface); border: 1.5px solid var(--kc-border-soft); border-radius: var(--kc-radius-card); padding: 0.9rem 1rem 1rem; }

/* The card in the column: a door, and it says so. */
.kc-ncr { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.kc-ncr:hover { border-color: var(--kc-navy); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13); }
.kc-ncr:focus-visible { outline: 3px solid var(--kc-navy); outline-offset: 2px; }
.kc-ncr__more { margin-top: 0.45rem; font-size: 0.76rem; font-weight: 700; color: var(--kc-hero-ink); }

@media (max-width: 900px) {
  .kc-ncrfull__body { grid-template-columns: minmax(0, 1fr); }
  .kc-ncrfull__side { order: -1; }
}

/* Evidence in the journal. Same idea as the deviation panel's thumbnails, smaller: Historik lists many
   records at once, and a picture here is a cross-check while reading rather than the subject of the page. */
.kc-hist__shots { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.4rem; }
.kc-hist__shot { display: block; width: 132px; height: 100px; border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--kc-border-soft); background: var(--kc-surface); }
.kc-hist__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kc-hist__shot:hover { border-color: var(--kc-navy); }

/* Documents on a record. Rows, not tiles: the name and the size are what tell a reader whether to open a
   file, and neither survives being cropped into a thumbnail. */
.kc-ncrfull__docs { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.kc-ncrfull__docs a {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem;
  border: 1.5px solid var(--kc-border-soft); border-radius: 8px; background: var(--kc-surface);
  color: var(--kc-navy); text-decoration: none;
}
.kc-ncrfull__docs a:hover { border-color: var(--kc-navy); }
.kc-ncrfull__docico { font-size: 1.15rem; line-height: 1; }
.kc-ncrfull__docname { font-weight: 600; overflow-wrap: anywhere; }
.kc-ncrfull__docsize { margin-left: auto; font-size: 0.78rem; color: var(--kc-muted); white-space: nowrap; }

/* Adding one. A file input styled as the button it should have looked like all along — the native control
   announces "no file chosen", which on a record that already has four attachments is simply untrue. */
.kc-ncrfull__add {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; padding: 0.45rem 0.8rem;
  border: 1.5px dashed var(--kc-border-soft); border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: 0.85rem; color: var(--kc-hero-ink); background: var(--kc-surface);
}
.kc-ncrfull__add:hover { border-color: var(--kc-navy); color: var(--kc-navy); }
.kc-ncrfull__add input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kc-ncrfull__add:focus-within { outline: 3px solid var(--kc-navy); outline-offset: 2px; }
.kc-ncrfull__uperr { margin: 0.5rem 0 0; font-size: 0.82rem; color: #b91c1c; }

/* The admin correction, folded away. Collapsed by default because moving a record backwards or deleting it
   is the exception, and an exception presented at the same weight as the daily action gets used as one. */
.kc-ncrfull__admin { margin-top: 1rem; border: 1.5px solid var(--kc-border-soft); border-radius: var(--kc-radius-card); background: var(--kc-surface); }
.kc-ncrfull__admin > summary { cursor: pointer; padding: 0.6rem 0.9rem; font-weight: 700; font-size: 0.85rem; color: var(--kc-muted); }
.kc-ncrfull__admin[open] > summary { border-bottom: 1.5px solid var(--kc-border-soft); color: var(--kc-navy); }
.kc-ncrfull__adminbody { padding: 0.8rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.kc-ncrfull__warn { margin: 0; padding: 0.6rem 0.7rem; border-radius: 8px; font-size: 0.82rem;
  background: #FEF2F2; border: 1.5px solid #F0A0A0; color: #7f1d1d; }

/* The first screen a new company sees. Deliberately not a warning: nothing is wrong, the work simply has
   not been done yet, and the tone that gets someone started is not the tone that reports a fault. */
.kc-startup {
  background: var(--kc-surface); border: 1.5px solid var(--kc-border-soft);
  border-radius: var(--kc-radius-card); box-shadow: var(--kc-shadow-card);
  padding: 1.2rem 1.4rem 1.4rem; margin-top: 1rem; max-width: 46rem;
}
.kc-startup__title { margin: 0 0 0.4rem; font-size: 1.2rem; color: var(--kc-navy); }
.kc-startup__body { margin: 0 0 0.9rem; color: var(--kc-subtle); line-height: 1.5; }
.kc-startup__steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.7rem; }
.kc-startup__steps li { color: var(--kc-navy); }
.kc-startup__steps a { font-weight: 700; color: var(--kc-navy); text-decoration-color: var(--kc-blue-light, #7AC0DA); text-underline-offset: 3px; }
.kc-startup__steps a:hover { color: var(--kc-hero-ink, var(--kc-navy)); text-decoration-color: currentColor; }
.kc-startup__steps .kc-fhint { margin-top: 0.1rem; }
