/* Lab stylesheet of the chrome: the first-screen header (canonical geometry
   from css/01-header.css, served read-only), the compact logo that takes its
   place, and the dock in the bottom-right corner (comprehensive task, second
   layer). One deliberate deviation from COMPONENTS.md law 2 is marked below;
   it is slated to move into the canonical file when this home becomes canon. */

:root {
  --lab-in: 300ms;      /* capsule arrives */
  --lab-out: 240ms;     /* capsule leaves */
  --lab-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --mini-width: 174px;
  /* The floating dock: its height and its distance from the bottom edge. The
     page reserves no floor below the footer for it (COMPONENTS.md law 7,
     20.09.2026) — the pill steps aside when it meets the frame. */
  --dock-h: 48px;
  --dock-gap: max(16px, env(safe-area-inset-bottom));
}

/* Deviation. Band 720…1079.98 shows one menu item; the canonical rule matches
   the exact value `#cases`, on sub-pages the same item is `/#cases`. Move the
   `$=` form into 01-header.css later. */
@media (min-width: 720px) and (max-width: 1079.98px) {
  .hdr-menu-item[href$="#cases"] { display: flex; }
}

/* Buttons law: labels of buttons never select and never flash on tap. */
.hdr-cta, .hdr-cta *, .hdr-menu-item, .hdr-logo, .mini, .dock button, .dock button *, .dock a {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Action button hover — COMPONENTS.md 3.5: the light capsule slides in from
   the left in 300 ms, leaves in 240 ms, cubic-bezier(.4,0,.2,1); the label goes
   dark linearly for the same time. Light on light needs an edge. */
.hdr-cta { position: relative; isolation: isolate; overflow: hidden; }
.hdr-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #f7f7f7;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 25, 0.16);
  clip-path: inset(0 100% 0 0 round 50px);
  transition: clip-path var(--lab-out) var(--lab-ease);
}
.hdr-cta-label { transition: color var(--lab-out) linear; }
.hdr-cta:hover::after, .hdr-cta:active::after, .hdr-cta:focus-visible::after { clip-path: inset(0 round 50px); transition-duration: var(--lab-in); }
.hdr-cta:hover .hdr-cta-label, .hdr-cta:active .hdr-cta-label, .hdr-cta:focus-visible .hdr-cta-label { color: #171719; transition-duration: var(--lab-in); }

/* Menu items of the bar: a quiet tint, the same curve; keyboard focus repeats it. */
.hdr-menu-item { border-radius: 999px; transition: background-color var(--lab-out) var(--lab-ease); }
.hdr-menu-item:hover, .hdr-menu-item:active, .hdr-menu-item:focus-visible { background-color: rgba(23, 23, 25, 0.08); transition-duration: var(--lab-in); }

/* Services and the four Special Offers share one navigation on all pages.
   Geometry belongs to this component, including the intermediate widths. */
.site-offers > summary { list-style: none; cursor: pointer; }
.site-offers > summary::-webkit-details-marker { display: none; }
.site-offers .offers-chevron { flex: none; margin-left: auto; transition: transform 180ms ease-out; }
.site-offers[open] > summary .offers-chevron { transform: rotate(180deg); }
.hdr-offers { position: relative; display: none; }
.hdr-offers-trigger { gap: 8px; }
.hdr-offers .offers-links {
  position: absolute; top: calc(100% + 10px); left: 0;
  width: min(340px, calc(100vw - 48px)); max-height: calc(100dvh - 120px);
  overflow: auto; margin: 0; padding: 8px; list-style: none;
  border-radius: 16px; background: var(--plate);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .24);
}
.hdr-offer-link {
  display: flex; align-items: center; min-height: 44px; padding: 10px 12px;
  border-radius: 10px; color: #171719; text-decoration: none;
  font: 400 15px/20px "Inter", sans-serif; white-space: normal;
}
.hdr-offer-link:hover, .hdr-offer-link:focus-visible { background: rgba(23, 23, 25, .08); }
.hdr-offer-link:focus-visible { outline: 2px solid #171719; outline-offset: -2px; }
.dock-offers { display: flex; align-items: center; gap: 2px; }
.dock-offers > a.dock-route { flex: 1; min-width: 0; width: auto; }
.dock-offers > .dock-offers-toggle,
.dock-submenu .dock-submenu-back {
  flex: 0 0 44px; width: 44px; height: 44px;
  justify-content: center; padding: 0; border-radius: 12px;
}
.dock-offers .offers-chevron, .dock-submenu .offers-chevron { flex: none; }
/* nav.js places this sibling of the scrolling parent panel. Keep its outer
   edge visible for the pointer bridge; only the links scroll on short screens. */
.dock-submenu {
  position: absolute; z-index: 3;
  width: min(300px, calc(100vw - 32px)); max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow: visible; padding: 8px; border-radius: 20px; background: #232325;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(234, 234, 234, .12);
}
.dock-submenu[hidden] { display: none; }
.dock-submenu .offers-links {
  display: grid; gap: 2px; margin: 0; padding: 0; list-style: none;
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow: auto; overscroll-behavior: contain;
}
.dock-submenu .offers-links .dock-route { font-weight: 400; }
.dock-submenu-head { display: none; }
.dock-submenu[data-covered] .dock-submenu-head {
  display: flex; align-items: center; gap: 4px; min-height: 44px;
  margin-bottom: 4px; padding-right: 12px; font: 500 15px/20px "Inter", sans-serif;
}
.dock-submenu[data-covered] .offers-links {
  max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px);
}
.dock-panel[data-submenu-covered] { visibility: hidden; }
.dock-submenu:not([data-covered])::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: -8px;
  width: 8px; pointer-events: auto;
}
@media (min-width: 1080px) {
  .hdr-left:has(.hdr-offers) { overflow: visible; }
  .hdr-offers { display: block; }
}
@media (min-width: 1080px) and (max-width: 1199.98px) {
  .hdr-menu:has(.hdr-offers) { gap: 8px; }
  .hdr-menu:has(.hdr-offers) .hdr-menu-item { padding-inline: 12px; }
}
@media (min-width: 720px) and (max-width: 1079.98px) {
  .hdr-menu-item[href="/cases/"] { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .site-offers .offers-chevron { transition: none; }
}

/* Keyboard focus. Inside .hdr-left the canonical overflow: hidden leaves 2 px
   of room, so the logo and the menu items take an inset ring. */
.hdr-cta:focus-visible { outline: 2px solid #171719; outline-offset: 3px; }
.hdr-logo:focus-visible, .hdr-menu-item:focus-visible { outline: 2px solid #171719; outline-offset: -3px; border-radius: 999px; }

/* Without a burger the bar's right group is the action button alone. */
.hdr-cta { margin-right: 2px; }

/* ---------- Compact logo: appears where the header left ---------- */
.mini, .mini-action {
  position: fixed;
  top: 12px;
  z-index: 99;
  display: flex;
  align-items: center;
  width: var(--mini-width);
  height: 44px;
  border-radius: 999px;
  background: var(--plate);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--lab-out) var(--lab-ease), transform var(--lab-out) var(--lab-ease), visibility 0s linear var(--lab-out);
}
.mini {
  left: var(--g, 24px);
  gap: 8px;
  padding: 2px 14px 2px 2px;
}
.mini-action {
  right: var(--g, 24px);
  padding: 2px;
}
.mini.is-on, .mini-action.is-on { opacity: 1; visibility: visible; transform: none; transition-duration: var(--lab-in), var(--lab-in), 0s; transition-delay: 0s; }
.mini-symbol { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.mini-word { display: block; width: 110px; height: 13px; }
.mini-action .hdr-cta {
  --hdr-control: 40px;
  --hdr-cta-side: 20px;
  display: flex;
  width: 100%;
  margin: 0;
}
.mini-action .hdr-cta-label { font: 600 13px/16px "Inter", sans-serif; }
.mini:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 719.98px) {
  .mini, .mini-action { top: 8px; width: auto; }
  .mini { padding-right: 2px; }
  .mini-word { display: none; }
  .mini-action .hdr-cta { width: auto; }
}

/* ---------- Dock: local control + global Menu ---------- */
.dock {
  position: fixed;
  right: var(--g, 24px);
  bottom: var(--dock-gap);
  z-index: 120;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: calc(100vw - 2 * var(--g, 24px));
  font-family: "Inter", sans-serif;
  color: var(--ink);
  transition: opacity var(--lab-in) linear, transform var(--lab-in) var(--lab-ease), visibility 0s;
}
/* Over the Improving scene the dock yields to the pinned card once they meet
   (js/nav.js sets the attribute; latched for the rest of the scene). */
.dock[data-yield] {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--lab-out) linear, transform var(--lab-out) var(--lab-ease), visibility 0s linear var(--lab-out);
}
.dock button { font-family: inherit; }

/* Type B capsule, dark on the page, light fill on hover (buttons law). */
.dock-menu {
  position: relative;
  isolation: isolate;
  flex: none;
  display: inline-grid;
  grid-template-areas: "label";
  place-items: center;
  height: var(--dock-h);
  min-height: var(--dock-h);
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 13px/16px "Inter", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: color var(--lab-out) linear;
}
.dock-menu::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background: #171719; box-shadow: inset 0 0 0 1px rgba(234, 234, 234, 0.2); }
.dock-menu::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--plate);
  clip-path: inset(0 100% 0 0 round 999px);
  transition: clip-path var(--lab-out) var(--lab-ease);
}
.dock-menu:hover::after, .dock-menu:active::after, .dock-menu:focus-visible::after, .dock-menu[aria-expanded="true"]::after { clip-path: inset(0 round 999px); transition-duration: var(--lab-in); }
.dock-menu:hover, .dock-menu:active, .dock-menu:focus-visible, .dock-menu[aria-expanded="true"] { color: #171719; transition-duration: var(--lab-in); }
.dock-menu:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* Alexa, 19.10.2026: light at rest with a dark edge and a dark label; hover,
   focus and the open menu fill it dark from the left with a white label.
   `.lab .dock` outranks the palette roles of home-palette.css. */
.lab .dock .dock-menu { color: var(--silver-action, #0d1015); }
.lab .dock .dock-menu::before { background: var(--plate, #e4e5e6); box-shadow: inset 0 0 0 1px var(--silver-action, #0d1015); }
.lab .dock .dock-menu::after { background: var(--silver-action, #0d1015); }
.lab .dock .dock-menu:is(:hover, :active, :focus-visible),
.lab .dock .dock-menu[aria-expanded="true"] { color: #fff; }
/* One trigger, two labels in one cell: Menu when closed, × Close when open
   (Alexa, 16.09.2026 — closing lives where opening does). The cell holds the
   wider label, so the pill never changes size between the states. */
.dock-menu-label { grid-area: label; display: inline-flex; align-items: center; gap: 8px; transition: opacity var(--lab-out) linear; }
.dock-menu-label--close { opacity: 0; }
.dock-menu[aria-expanded="true"] .dock-menu-label--menu { opacity: 0; }
.dock-menu[aria-expanded="true"] .dock-menu-label--close { opacity: 1; transition-duration: var(--lab-in); }
.dock-menu-x { display: block; flex: none; }

/* Floating panels open upward from the trigger, width-limited, over content. */
.dock-panel, .dock-list {
  position: absolute;
  bottom: calc(100% + 10px);
  width: min(300px, calc(100vw - 2 * var(--g, 24px)));
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  overflow: auto;
  padding: 12px 8px 8px;
  border-radius: 20px;
  background: #232325;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(234, 234, 234, 0.12);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity var(--lab-out) var(--lab-ease), transform var(--lab-out) var(--lab-ease);
}
.dock-panel { right: 0; transform-origin: right bottom; padding-top: 16px; }
.dock-panel.is-open, .dock-local.is-open .dock-list { opacity: 1; transform: none; transition-duration: var(--lab-in); }
.dock-list { left: 0; transform-origin: left bottom; width: min(320px, calc(100vw - 2 * var(--g, 24px))); }
.dock-panel ul, .dock-list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.dock-list-title { margin: 0; padding: 0 12px 8px; font: 500 11px/14px "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #a8a8ad; }
.dock-route, .dock-item {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font: 500 15px/20px "Inter", sans-serif;
  cursor: pointer;
  transition: color var(--lab-out) linear;
}
.dock-route::after, .dock-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--plate);
  clip-path: inset(0 100% 0 0 round 12px);
  transition: clip-path var(--lab-out) var(--lab-ease);
}
.dock-route:hover::after, .dock-route:active::after, .dock-route:focus-visible::after,
.dock-item:hover::after, .dock-item:active::after, .dock-item:focus-visible::after { clip-path: inset(0 round 12px); transition-duration: var(--lab-in); }
.dock-route:hover, .dock-route:active, .dock-route:focus-visible,
.dock-item:hover, .dock-item:active, .dock-item:focus-visible { color: #171719; transition-duration: var(--lab-in); }
.dock-route:focus-visible, .dock-item:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
/* The active route or item carries a mark, not a second fill. */
.dock-route[aria-current]::before, .dock-item[aria-current]::before, .dock-item[aria-pressed="true"]::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.dock-count { margin-left: auto; font: 400 13px/16px "Inter", sans-serif; color: #a8a8ad; }
.dock-item:hover .dock-count, .dock-item:focus-visible .dock-item { color: inherit; }

/* Case pages: the Menu panel opens on the cases (Alexa, 10.10.2026: cases
   first, the site menu second, on demand). The head — the label with the
   position and the two steps to the neighbouring cases, wrapping around — then
   the list with the current case marked, then the site menu folded under it.
   The same panel lives on the example sites in css/case-chrome.css. */
.dock-chead { display: flex; align-items: center; gap: 2px; min-height: 44px; margin: -8px 0 6px; padding-left: 12px; }
.dock-ck { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; margin: 0; font: 500 11px/14px "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #a8a8ad; }
.dock-ccount { letter-spacing: 0.04em; font-variant-numeric: tabular-nums; color: var(--ink); }
.dock-cstep {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--lab-out) var(--lab-ease);
}
.dock-cstep:hover, .dock-cstep:active, .dock-cstep:focus-visible { background: rgba(234, 234, 234, 0.1); transition-duration: var(--lab-in); }
.dock-cstep:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.dock-cstep-i { display: block; }
.dock-cstep--prev .dock-cstep-i { transform: translateX(-1.2px); }
.dock-cstep--next .dock-cstep-i { transform: translateX(1.2px); }
/* The site menu opens upward, above its own row, so the row stays under the finger. */
.dock-more { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(234, 234, 234, 0.12); }
.dock-site { padding-bottom: 2px; }
.dock-more-sum {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: #a8a8ad;
  font: 500 15px/20px "Inter", sans-serif;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--lab-out) linear;
}
.dock-more-sum::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--plate); clip-path: inset(0 100% 0 0 round 12px); transition: clip-path var(--lab-out) var(--lab-ease); }
.dock-more-sum:hover::after, .dock-more-sum:active::after, .dock-more-sum:focus-visible::after { clip-path: inset(0 round 12px); transition-duration: var(--lab-in); }
.dock-more-sum:hover, .dock-more-sum:active, .dock-more-sum:focus-visible { color: #171719; transition-duration: var(--lab-in); }
.dock-more-sum[aria-expanded="true"] { color: var(--ink); }
.dock-more-sum[aria-expanded="true"]:hover, .dock-more-sum[aria-expanded="true"]:active, .dock-more-sum[aria-expanded="true"]:focus-visible { color: #171719; }
.dock-more-sum:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
/* Folded: the mark points up, where the menu opens; open: down, where it folds. */
.dock-more-chev { flex: none; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(2px) rotate(-135deg); transition: transform var(--lab-out) var(--lab-ease); }
.dock-more-sum[aria-expanded="true"] .dock-more-chev { transform: translateY(-2px) rotate(45deg); }

/* Local control: the current item, the neighbours, the list. */
.dock-local {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  height: var(--dock-h);
  padding: 2px;
  border-radius: 999px;
  background: #232325;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(234, 234, 234, 0.14);
}
.dock-local[hidden] { display: none; }
.dock-step {
  flex: none;
  width: 40px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 400 22px/1 "Inter", sans-serif;
  cursor: pointer;
  transition: background-color var(--lab-out) var(--lab-ease), opacity var(--lab-out) linear;
}
.dock-step:hover, .dock-step:active, .dock-step:focus-visible { background: rgba(234, 234, 234, 0.1); transition-duration: var(--lab-in); }
.dock-step:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.dock-cur {
  position: relative;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 240px;
  height: 44px;
  padding: 0 32px 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--lab-out) var(--lab-ease);
}
.dock-cur:hover, .dock-cur:active, .dock-cur:focus-visible, .dock-cur[aria-expanded="true"] { background: rgba(234, 234, 234, 0.1); transition-duration: var(--lab-in); }
.dock-cur:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.dock-k { flex: none; padding: 0 2px 0 14px; font: 500 10px/12px "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #a8a8ad; }
.dock-cur-n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/16px "Inter", sans-serif; }
.dock-chev {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-30%) rotate(-135deg);
  transition: transform var(--lab-out) var(--lab-ease);
}
.dock-cur[aria-expanded="true"] .dock-chev { transform: translateY(-70%) rotate(45deg); }

@media (max-width: 719.98px) {
  .dock { gap: 6px; }
  .dock-step { display: none; }
  .dock-k { display: none; }
  .dock-cur { max-width: 46vw; padding: 0 30px 0 14px; }
  .dock-menu { padding: 0 16px; }
  /* On a phone the local list spans the gutters above the dock instead of
     hanging off its trigger, so it never leaves the viewport. */
  .dock-list { position: fixed; left: var(--g, 8px); right: var(--g, 8px); width: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 58px); transform-origin: center bottom; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --lab-in: 1ms; --lab-out: 1ms; }
}

@media (forced-colors: active) {
  .hdr-cta, .dock-menu, .dock-local, .dock-panel, .dock-list, .dock-route, .dock-item, .dock-cstep, .dock-more-sum, .mini, .mini-action { border: 1px solid ButtonText; }
  .hdr-cta::after, .dock-menu::after, .dock-route::after, .dock-item::after, .dock-more-sum::after { display: none; }
}
