/* ==========================================================================
   Second Shift · shared styles
   Order: reset → base type → layout → controls → header → shared components
          → footer → overlays → motion
   ========================================================================== */

/* ---------- Reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  min-height: 100vh;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  font-stretch: var(--wd-normal);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

::selection { background: var(--tag); color: var(--ink); }

/* Small surfaces carry the same material language as the larger page. */
html { scrollbar-width: thin; scrollbar-color: var(--field) var(--ghost); }
input, textarea { caret-color: var(--green-600); }
.brand-mark { width: 1.8rem; height: 1.8rem; flex: none; fill: currentColor; }
.brand-period { color: var(--green-600); }
.brand:hover .brand-mark { rotate: 180deg; }
.brand-mark { transition: rotate 700ms var(--ease-expo); }
.form-preview-note { font-size: .8125rem; line-height: 1.5; color: var(--muted); padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
button:disabled { cursor: wait; }
@media (max-width: 599px) {
  :root { --header-h: 4.5rem; }
  .brand { gap: .4rem; font-size: 1.05rem; }
  .brand-mark { width: 1.5rem; height: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .brand:hover .brand-mark { rotate: none; }
}

:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 3px;
  border-radius: var(--r-1);
}
.on-dark :focus-visible,
.on-dark:focus-visible { outline-color: var(--green-300); }

/* ---------- Type -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 680;
  line-height: var(--lh-head);
  text-wrap: balance;
}
p, li, dd, figcaption { text-wrap: pretty; }

.display {
  font-size: var(--fs-display);
  font-stretch: 112%;
  font-weight: 560;
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
}
.h2 {
  font-size: var(--fs-56);
  font-stretch: 103%;
  font-weight: 540;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.h3 {
  font-size: var(--fs-28);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.h4 {
  font-size: var(--fs-22);
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.lead {
  font-size: var(--fs-18);
  line-height: 1.6;
  max-width: 34em;
}
.prose { max-width: 66ch; }
.prose p + p { margin-top: 1em; }
.muted { color: var(--muted); }

/* Nameplate type: condensed, tabular. For data, never for headlines. */
.plate {
  font-stretch: var(--wd-condensed);
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.num { font-variant-numeric: tabular-nums; }
.caps {
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.link {
  color: var(--green-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-thickness var(--d-hover) var(--ease-out), color var(--d-hover);
}
.link:hover { text-decoration-thickness: 2px; color: var(--green-700); }
.on-dark .link { color: var(--green-300); }

/* Underline that draws in from the start edge */
.draw {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size var(--d-state) var(--ease-out);
  padding-bottom: 2px;
}
.draw:hover, .draw:focus-visible, .draw[aria-current="page"] { background-size: 100% 1px; }
[dir="rtl"] .draw { background-position: 100% 100%; }

/* ---------- Layout ------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
@media (max-width: 899px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 599px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.section { padding-block: var(--section); }
.section-tight { padding-block: var(--section-tight); }
.bg-ghost { background: var(--ghost); }
.on-dark {
  background: var(--green-900);
  color: var(--on-dark);
  line-height: calc(var(--lh-body) + 0.06);
}
.on-dark .muted { color: var(--on-dark-muted); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-5) var(--s-7);
  margin-bottom: clamp(2rem, 1.2rem + 3vw, 4rem);
}
.section-head > :first-child { max-width: 46rem; }
.section-head .lead { margin-top: var(--s-4); }

.rule-top { border-top: 1px solid var(--rule); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip {
  position: fixed;
  top: var(--s-3); left: var(--s-3);
  z-index: var(--z-tooltip);
  padding: var(--s-3) var(--s-4);
  background: var(--ink); color: var(--white);
  font-weight: 600;
  translate: 0 -200%;
  transition: translate var(--d-state) var(--ease-out);
}
.skip:focus { translate: 0 0; }

/* ---------- Icons ------------------------------------------------------- */
.i {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i-fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  --btn-bg: var(--green-600);
  --btn-fg: var(--white);
  --btn-bd: var(--btn-bg);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3rem;
  padding: 0 1.35rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-1);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-16);
  font-weight: 620;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--d-hover) var(--ease-out),
    color var(--d-hover) var(--ease-out),
    border-color var(--d-hover) var(--ease-out),
    scale var(--d-press) var(--ease-out);
}
.btn:hover { --btn-bg: var(--green-700); }
.btn:active { scale: 0.98; }
.btn .i { transition: translate var(--d-state) var(--ease-out); }
.btn:hover .i-arrow { translate: 0.22em 0; }
[dir="rtl"] .btn .i-arrow { scale: -1 1; }
[dir="rtl"] .btn:hover .i-arrow { translate: -0.22em 0; }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
}
.btn-ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--white); }
.on-dark .btn-ghost { --btn-fg: var(--on-dark); --btn-bd: var(--on-dark-muted); }
.on-dark .btn-ghost:hover { --btn-bg: var(--on-dark); --btn-fg: var(--green-900); --btn-bd: var(--on-dark); }
.on-dark .btn:not(.btn-ghost) { --btn-bg: var(--green-300); --btn-fg: var(--green-900); }
.on-dark .btn:not(.btn-ghost):hover { --btn-bg: var(--on-dark); }

.btn-sm { min-height: 2.5rem; padding: 0 1rem; font-size: var(--fs-14); }
.btn-lg { min-height: 3.5rem; padding: 0 1.75rem; font-size: var(--fs-18); }
.btn-block { width: 100%; }

.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .btn-label { opacity: 0; }
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 1.1rem; height: 1.1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  background: var(--white);
  color: var(--ink);
  transition: background-color var(--d-hover), border-color var(--d-hover), color var(--d-hover), scale var(--d-press);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { scale: 0.95; }
.icon-btn:disabled { color: var(--rule); border-color: var(--rule); cursor: default; }

/* Segmented control (currency, layout) */
.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  background: var(--white);
}
.seg button {
  display: inline-grid; place-items: center;
  min-width: 2.5rem; min-height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: 1px;
  font-size: var(--fs-14);
  font-weight: 600;
  font-stretch: var(--wd-condensed);
  color: var(--muted);
  transition: background-color var(--d-hover), color var(--d-hover);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }


/* ---------- Forms ------------------------------------------------------- */
.field { display: grid; gap: 0.4rem; align-content: start; }
.field > label, .legend {
  font-size: var(--fs-14);
  font-weight: 620;
}
.field .opt { font-weight: 400; color: var(--muted); }
.input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--field);
  border-radius: var(--r-1);
  background: var(--white);
  color: var(--ink);
  font-size: var(--fs-16);
  line-height: 1.4;
  transition: border-color var(--d-hover), box-shadow var(--d-hover);
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { border-color: var(--ink); }
.input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
textarea.input { min-height: 8rem; resize: vertical; }
select.input {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111b13' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1rem;
}
.field-hint { font-size: var(--fs-14); color: var(--muted); }
.field-error {
  display: flex; gap: 0.4rem; align-items: center;
  font-size: var(--fs-14);
  color: var(--danger);
  font-weight: 560;
}
.field[data-invalid] .input { border-color: var(--danger); }
.field[data-invalid] .input:focus { box-shadow: 0 0 0 3px oklch(0.52 0.19 27 / 0.15); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--field);
  border-radius: var(--r-pill);
  font-size: var(--fs-14);
  font-weight: 560;
  transition: background-color var(--d-hover), color var(--d-hover), border-color var(--d-hover);
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--green-600); outline-offset: 2px; }

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  transition: translate var(--d-state) var(--ease-out), border-color var(--d-state);
}
.site-header[data-scrolled] { border-bottom-color: var(--rule); }
.site-header[data-hidden] { translate: 0 -100%; }
.site-header:focus-within { translate: 0 0; }
.header-row {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-6);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 1.25rem;
  font-stretch: 108%;
  font-weight: 680;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand .led { width: 0.6rem; height: 0.6rem; }

.nav { margin-inline-start: var(--s-4); }
.nav ul { display: flex; gap: var(--s-5); }
.nav a {
  font-size: 0.8125rem;
  font-weight: 540;
}
.header-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.lang-btn, .shortlist-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 0.6rem;
  border-radius: var(--r-1);
  font-size: var(--fs-14);
  font-weight: 560;
  text-decoration: none;
  transition: background-color var(--d-hover);
}
.lang-btn:hover, .shortlist-link:hover { background: var(--ghost); }
.count {
  display: inline-grid; place-items: center;
  min-width: 1.4rem; height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: var(--r-pill);
  background: var(--mist);
  font-stretch: var(--wd-condensed);
  font-weight: 650;
  font-size: var(--fs-12);
  font-variant-numeric: tabular-nums;
  transition: background-color var(--d-state);
}
.count[data-filled] { background: var(--tag); }
.count.bump { animation: bump 420ms var(--ease-out); }

.menu-btn { display: none; }

@media (max-width: 379px) {
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header-tools .menu-btn { width: 2.75rem; padding: 0; justify-content: center; }
  .brand { font-size: 1rem; }
}
@media (max-width: 479px) {
  .header-row { gap: var(--s-3); }
  .shortlist-link > span:not(.count) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shortlist-link { min-width: 2.75rem; justify-content: center; }
}
@media (max-width: 1099px) {
  .nav, .header-tools .lang-btn, .header-tools .btn { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    min-height: 2.75rem; padding: 0 0.85rem;
    border: 1px solid var(--ink);
    border-radius: var(--r-1);
    font-weight: 600; font-size: var(--fs-14);
  }
}

/* Language popover (top layer) */
.lang-pop {
  position: fixed;
  inset: auto;
  margin: 0;
  min-width: 13rem;
  padding: var(--s-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.lang-pop ul { display: grid; }
.lang-pop button {
  width: 100%;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-1);
  text-align: start;
  font-size: var(--fs-14);
}
.lang-pop button:hover { background: var(--ghost); }
.lang-pop button[aria-current="true"] { font-weight: 650; }
.lang-pop button[aria-current="true"]::after { content: "✓"; color: var(--green-600); }
.lang-pop .plate { color: var(--muted); }

/* Mobile menu */
.menu-dialog {
  width: 100%; max-width: none;
  height: 100%; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--green-900);
  color: var(--on-dark);
}
.menu-dialog::backdrop { background: transparent; }
.menu-inner {
  min-height: 100%;
  display: grid;
  grid-template-rows: var(--header-h) 1fr auto;
}
.menu-top { display: flex; align-items: center; justify-content: space-between; }
.menu-top .brand { color: var(--on-dark); }
.menu-close {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 0.85rem;
  border: 1px solid var(--on-dark-muted); border-radius: var(--r-1);
  font-weight: 600; font-size: var(--fs-14);
}
.menu-links { display: grid; align-content: center; gap: var(--s-2); padding-block: var(--s-7); }
.menu-links a {
  display: block;
  padding-block: var(--s-2);
  font-size: clamp(2rem, 1.2rem + 4vw, 3rem);
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-decoration: none;
}
.menu-foot { display: grid; gap: var(--s-4); padding-bottom: var(--s-6); }
.menu-langs { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.menu-langs button {
  min-height: 2.5rem; padding: 0 0.9rem;
  border: 1px solid var(--rule-dark); border-radius: var(--r-pill);
  font-size: var(--fs-14);
}
.menu-langs button[aria-current="true"] { background: var(--on-dark); color: var(--green-900); border-color: var(--on-dark); }

/* ---------- Standby LED + status --------------------------------------- */
.led {
  --led: var(--green-600);
  display: inline-block;
  width: 0.5rem; height: 0.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 0.2rem color-mix(in oklch, var(--led) 20%, transparent);
}
.on-dark .led, .led-dark { --led: var(--green-300); }
@media (prefers-reduced-motion: no-preference) {
  .led-live { animation: breathe 3.2s var(--ease-in-out) infinite; }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-14);
  font-stretch: var(--wd-condensed);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.status[data-status="reserved"] .led { --led: var(--amber); box-shadow: 0 0 0 0.2rem oklch(0.78 0.15 80 / 0.25); animation: none; }
.status[data-status="inspection"] .led { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); animation: none; }

/* ---------- Inspection tag (signature component) ----------------------- */
/* The wrap carries the string and the swing; the tag itself is masked so the
   punched hole is a real hole (whatever is behind shows through). */
.tag-wrap {
  --tag-rot: -5deg;
  --hole-x: 15px;
  position: relative;
  display: inline-block;
  transform-origin: var(--hole-x) 50%;
  rotate: var(--tag-rot);
  transition: rotate 700ms var(--ease-expo);
  pointer-events: none;
}
.tag-wrap::after {                /* the string: painted over the tag, from the hole up */
  content: "";
  position: absolute;
  left: calc(var(--hole-x) - 0.75px);
  bottom: 50%;
  z-index: 2;
  width: 1.5px;
  height: 2.6rem;
  border-radius: 1px;
  background: var(--ink);
  transform-origin: 50% 100%;
  rotate: 28deg;
}
.tag::before {                    /* reinforcing eyelet around the punched hole */
  content: "";
  position: absolute;
  left: calc(var(--hole-x) - var(--hole-r, 5px) - 3px);
  top: calc(50% - var(--hole-r, 5px) - 3px);
  width: calc(var(--hole-r, 5px) * 2 + 6px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px oklch(0.6 0.17 44);
}
.tag {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.85rem 0.55rem 2rem;
  border-radius: var(--r-2);
  background: var(--tag);
  color: var(--ink);
  line-height: 1.15;
  -webkit-mask: radial-gradient(circle at var(--hole-x) 50%, transparent 5px, #000 5.5px);
          mask: radial-gradient(circle at var(--hole-x) 50%, transparent 5px, #000 5.5px);
  box-shadow: inset 0 0 0 1px oklch(0.21 0.022 152 / 0.12);
}
.tag-grade {
  font-size: 1.85rem;
  font-stretch: 118%;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.04em;
}
.tag-body {
  display: grid;
  gap: 0.1rem;
  padding-inline-start: 0.7rem;
  border-inline-start: 1px dashed oklch(0.21 0.022 152 / 0.45);   /* perforation */
  font-stretch: var(--wd-condensed);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tag-title { font-size: 0.6875rem; font-weight: 720; letter-spacing: 0.09em; text-transform: uppercase; }
.tag-id    { font-size: 0.9375rem; font-weight: 680; }
.tag-meta  { font-size: 0.75rem; font-weight: 520; }

.tag-sm .tag { gap: 0.5rem; padding: 0.4rem 0.6rem 0.4rem 1.7rem; }
.tag-sm { --hole-x: 12px; --hole-r: 4px; }
.tag-sm .tag { -webkit-mask: radial-gradient(circle at 12px 50%, transparent 4px, #000 4.5px); mask: radial-gradient(circle at 12px 50%, transparent 4px, #000 4.5px); }
.tag-sm .tag-grade { font-size: 1.35rem; }
.tag-sm .tag-body { padding-inline-start: 0.5rem; }
.tag-sm .tag-id { font-size: 0.8125rem; }
.tag-sm .tag-meta { display: none; }
.tag-sm::after { height: 1.9rem; }

/* ---------- Unit (equipment listing) ----------------------------------- */
.unit {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.9rem;
}
/* Stretched link: the name is the link, its ::after covers the whole unit */
.unit-link { color: inherit; text-decoration: none; }
.unit-link::after { content: ""; position: absolute; inset: 0; z-index: var(--z-raised); }
.unit-link:focus-visible { outline: none; }
.unit-link:focus-visible::after { outline: 2px solid var(--green-600); outline-offset: 6px; }
.unit-media {
  position: relative;
  height: var(--unit-h, clamp(13rem, 10rem + 9vw, 17rem));
  overflow: hidden;
  background: var(--mist);
}
.unit-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale 1100ms var(--ease-expo);
}
.unit .tag-wrap {
  position: absolute;
  top: 2.1rem; inset-inline-start: 0.85rem;
  z-index: var(--z-raised);
}
.unit-pin {
  position: absolute;
  top: 0.75rem; inset-inline-end: 0.75rem;
  z-index: calc(var(--z-raised) + 1);
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--r-1);
  background: var(--white);
  color: var(--ink);
  transition: background-color var(--d-hover), color var(--d-hover), scale var(--d-press);
}
.unit-pin:hover { background: var(--ink); color: var(--white); }
.unit-pin:active { scale: 0.92; }
.unit-pin[aria-pressed="true"] { background: var(--green-600); color: var(--white); }
.unit-pin[aria-pressed="true"] .i { fill: currentColor; }

.unit-body { display: grid; gap: 0.5rem; }
.unit-meta { font-size: var(--fs-14); color: var(--muted); }
.unit-name {
  font-size: var(--fs-22);
  font-weight: 580;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.unit-specs {
  display: flex; flex-wrap: wrap; gap: 0.15rem 1rem;
  font-size: var(--fs-14);
}
.unit-specs div { display: flex; gap: 0.35rem; }
.unit-specs dt { color: var(--muted); }
.unit-specs dd { font-weight: 600; }
.unit-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-top: 0.45rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
}
.price { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.price-cur { font-size: var(--fs-14); font-weight: 600; color: var(--muted); }
.price-val {
  font-size: var(--fs-22);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.price-terms { font-size: var(--fs-12); color: var(--muted); }

@media (hover: hover) {
  .unit:hover .unit-media img { scale: 1.04; }
  .unit:hover .tag-wrap { --tag-rot: 2deg; }
  .unit:hover .unit-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
}
.unit:has(.unit-link:focus-visible) .tag-wrap { --tag-rot: 2deg; }

/* ---------- Rail -------------------------------------------------------- */
.rail-shell { position: relative; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(15.5rem, 12rem + 12vw, 21rem);
  gap: clamp(1.25rem, 0.8rem + 1.5vw, 2rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--margin);
  padding-inline: max(var(--margin), calc((100vw - var(--max)) / 2 + var(--margin)));
  padding-bottom: var(--s-2);
  scrollbar-width: none;
  cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rail.is-dragging a { pointer-events: none; }
.rail > * { scroll-snap-align: start; }
.rail > .is-wide { grid-column: span 2; }
@media (max-width: 599px) { .rail > .is-wide { grid-column: span 1; } }
.rail-controls { display: flex; align-items: center; gap: var(--s-3); }
.rail-progress {
  position: relative;
  height: 2px;
  margin-top: var(--s-6);
  background: var(--rule);
  overflow: hidden;
}
.rail-progress span {
  position: absolute; inset: 0 auto 0 0;
  width: var(--thumb, 25%);
  translate: var(--pos, 0) 0;
  background: var(--ink);
}

/* ---------- Life bar: first shift / intake / second shift ------------ */
.lifebar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  margin-bottom: var(--s-4);
  font-size: var(--fs-14);
}
.lifebar-track {
  position: relative;
  height: clamp(3.25rem, 2.4rem + 2.6vw, 5rem);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.lb-seg {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--a) * 10%);
  width: calc((var(--b) - var(--a)) * 10%);
  transform-origin: 0 50%;
}
[dir="rtl"] .lb-seg { left: auto; right: calc(var(--a) * 10%); transform-origin: 100% 50%; }
.lb-first  { background: var(--field); }
.lb-intake { background: repeating-linear-gradient(135deg, var(--tag) 0 6px, var(--tag-soft) 6px 12px); }
.lb-second { background: var(--green-600); }
.lifebar-now {
  position: absolute;
  top: -0.75rem; bottom: -0.75rem;
  left: calc(var(--at) * 10%);
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
}
.lifebar-now span {
  position: absolute;
  bottom: 100%;
  left: 50%;
  translate: -50% -0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-12);
  white-space: nowrap;
}
.lifebar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  margin-top: var(--s-5);
  font-size: var(--fs-14);
}
.lifebar-legend p { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.key { display: inline-block; width: 0.75rem; height: 0.75rem; translate: 0 0.08em; }
.key-first { background: var(--field); }
.key-intake { background: repeating-linear-gradient(135deg, var(--tag) 0 3px, var(--tag-soft) 3px 6px); }
.key-second { background: var(--green-600); }
.lifebar-axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s-4);
  padding: 0;
  list-style: none;
  font-size: var(--fs-12);
  color: var(--muted);
}
.lifebar-axis li { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.lifebar-axis li:first-child { justify-content: flex-start; }
.lifebar-axis li:last-child { justify-content: flex-end; }

@media (max-width: 599px) {
  .lifebar-axis li:nth-child(even) { visibility: hidden; }
}

/* ---------- Disclosure (FAQ etc.) -------------------------------------- */
.disclosure { border-top: 1px solid var(--rule); }
.disclosure:last-child { border-bottom: 1px solid var(--rule); }
.disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: 1.35rem;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-22);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary .pm {
  position: relative;
  flex: none;
  width: 1.75rem; height: 1.75rem;
  border: 1px solid var(--field);
  border-radius: 50%;
  transition: background-color var(--d-hover), border-color var(--d-hover);
}
.disclosure summary .pm::before,
.disclosure summary .pm::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.7rem; height: 1.5px;
  background: currentColor;
  translate: -50% -50%;
  transition: rotate var(--d-state) var(--ease-out);
}
.disclosure summary .pm::after { rotate: 90deg; }
.disclosure[open] summary .pm { background: var(--ink); border-color: var(--ink); color: var(--white); }
.disclosure[open] summary .pm::after { rotate: 0deg; }
.disclosure summary:hover .pm { border-color: var(--ink); }
.disclosure-body { padding-bottom: 1.6rem; max-width: 62ch; color: var(--ink); }
.disclosure-body p + p { margin-top: 0.8em; }
@supports (interpolate-size: allow-keywords) {
  .disclosure { interpolate-size: allow-keywords; }
  .disclosure::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size var(--d-state) var(--ease-out), content-visibility var(--d-state) allow-discrete;
  }
  .disclosure[open]::details-content { block-size: auto; }
}

/* ---------- Footer ------------------------------------------------------ */
.site-footer { padding-top: var(--section-tight); padding-bottom: var(--s-6); }
.footer-statement {
  font-size: clamp(2.75rem, 1.2rem + 5vw, 6rem);
  font-stretch: 105%;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  max-width: 18ch;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--s-7) var(--gutter);
  margin-top: var(--s-9);
  padding-top: var(--s-6);
  border-top: 1px solid var(--rule-dark);
}
.footer-grid h2 {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--on-dark-muted);
  margin-bottom: var(--s-4);
}
.footer-grid ul { display: grid; gap: 0.55rem; }
.footer-grid a { text-decoration: none; }
.warehouse {
  display: grid; gap: 0.55rem;
  align-content: start;
  font-size: var(--fs-14);
}
.footer-grid .warehouse h2 { margin-bottom: calc(var(--s-4) - 0.55rem); }
.warehouse-row { display: flex; align-items: center; gap: 0.6rem; }
.warehouse time { font-stretch: var(--wd-condensed); font-variant-numeric: tabular-nums; font-weight: 600; }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4) var(--s-7);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule-dark);
  font-size: var(--fs-14);
  color: var(--on-dark-muted);
}
.footer-legal p { max-width: 62ch; }

/* ---------- Dialog ------------------------------------------------------ */
.modal {
  width: min(100% - 2rem, 38rem);
  max-height: min(100% - 2rem, 52rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-2);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.modal::backdrop { background: oklch(0.26 0.055 152 / 0.62); }
.modal-head {
  position: sticky; top: 0;
  display: flex; align-items: start; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) var(--s-5) var(--s-4);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  z-index: var(--z-raised);
}
.modal-body { padding: var(--s-5); }
@media (prefers-reduced-motion: no-preference) {
  .modal[open], .menu-dialog[open] { animation: rise var(--d-state) var(--ease-out); }
}
.modal[open]::backdrop, .menu-dialog[open]::backdrop { animation: fade var(--d-state) var(--ease-out); }

/* ---------- Toast ------------------------------------------------------- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  translate: -50% 0;
  display: grid;
  gap: var(--s-2);
  justify-items: center;
  pointer-events: none;
}
.toast {
  display: inline-flex; align-items: center; gap: 0.7rem;
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 0.8rem 1.1rem;
  border-radius: var(--r-2);
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-14);
  font-weight: 540;
  box-shadow: var(--shadow-pop);
  animation: rise var(--d-state) var(--ease-out);
}
.toast .led { --led: var(--green-300); }
.toast.is-leaving { animation: fade-out 260ms var(--ease-out) forwards; }

/* ---------- Keyframes --------------------------------------------------- */
@keyframes breathe {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0.2rem color-mix(in oklch, var(--led) 22%, transparent); }
  50%      { opacity: 0.55; box-shadow: 0 0 0 0.38rem color-mix(in oklch, var(--led) 0%, transparent); }
}
@keyframes bump { 0% { scale: 1; } 35% { scale: 1.28; } 100% { scale: 1; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes rise { from { opacity: 0; translate: 0 0.75rem; } to { opacity: 1; translate: 0 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; translate: 0 0.4rem; } }

@media (prefers-reduced-motion: reduce) {
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
  @keyframes bump { from { opacity: 0.4; } to { opacity: 1; } }
  .tag-wrap { transition: none; }
  .unit-media img { transition: none; }
  .unit:hover .unit-media img { scale: 1; }
}
