/* =========================================================================
   FORMA - the workshop bench
   Organizing idea: the page is a studio pegboard. Workshops are material
   samples taped to the board. Filtering opens a drawer; saving clips a
   sample to "my bench", tracked by a live tray.
   Shape system: squared (2px max), like a cut card.
   One accent: acid lime (a workshop hi-vis colour).
   ========================================================================= */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/artifacts/forma-frontend--v1--s4-whacky--deepseek-4.1-flash--taste--2026-09-18T23-31-27-245Z/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/artifacts/forma-frontend--v1--s4-whacky--deepseek-4.1-flash--taste--2026-09-18T23-31-27-245Z/assets/fonts/space-mono-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/artifacts/forma-frontend--v1--s4-whacky--deepseek-4.1-flash--taste--2026-09-18T23-31-27-245Z/assets/fonts/space-mono-700-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --ink: #15171a;          /* page background */
  --board: #1c2024;        /* pegboard surface */
  --card: #24282d;
  --card-hi: #2b3035;
  --line: #383f45;
  --hole: #101215;
  --paper: #f0f1ee;
  --muted: #9aa1a3;
  --muted-2: #949b9d;
  --accent: #d6f24b;       /* acid lime, single accent */
  --accent-ink: #15171a;   /* text on accent fill */
  --accent-text: #d6f24b;  /* accent used as text */
  --tape: rgba(214, 242, 75, 0.72);
  --tape-edge: rgba(214, 242, 75, 0.35);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.35);
  --radius: 2px;
  --topbar-h: 64px;
  --maxw: 1240px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --ink: #e7e9e4;
  --board: #eef0eb;
  --card: #fafbf8;
  --card-hi: #ffffff;
  --line: #c8cdc6;
  --hole: #cfd4cc;
  --paper: #171a18;
  --muted: #566058;
  --muted-2: #788178;
  --accent: #d6f24b;
  --accent-ink: #15171a;
  --accent-text: #3f5a00;
  --tape: rgba(214, 242, 75, 0.85);
  --tape-edge: rgba(140, 160, 40, 0.4);
  --shadow: 0 18px 40px rgba(30, 36, 30, 0.16);
  --shadow-soft: 0 8px 22px rgba(30, 36, 30, 0.12);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--paper);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

/* Fixed pegboard holes. pointer-events-none, never on a scrolling layer. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--hole) 1.7px, transparent 1.8px);
  background-size: 26px 26px;
  opacity: 0.85;
}

img { display: block; max-width: 100%; }

button,
input,
select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

a { color: var(--accent-text); }

h1, h2, h3 { margin: 0; line-height: 0.98; letter-spacing: -0.03em; }

p { margin: 0; }

.visually-hidden {
  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-link {
  position: fixed;
  top: -100px; left: 12px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

body.has-tray { padding-bottom: 84px; }

/* z-index scale: 0 board / 20 topbar / 40 tray / 60 dialog */
/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  background: var(--ink);
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.topbar__inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  white-space: nowrap;
  min-width: 0;
}
.brand__mark {
  width: 14px; height: 14px;
  background: var(--accent);
  align-self: center;
  transform: rotate(45deg);
  flex: none;
}
.brand__name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
}
.brand__sub {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.topbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 22px);
}
.topbar__link {
  font-size: 14px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  white-space: nowrap;
}
.topbar__link:hover { border-bottom-color: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.theme-toggle:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 40px) clamp(24px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.hero__text { max-width: 30ch; }
.hero__text h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  font-weight: 700;
  max-width: 14ch;
  font-variation-settings: "opsz" 72;
}
.hero__sub {
  margin-top: 22px;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.5;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 13px 22px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.hero__text .btn { margin-top: 30px; }

.hero__figure {
  position: relative;
  margin: 0;
  transform: rotate(-1.6deg);
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  filter: saturate(0.92) contrast(1.02);
}

/* Masking-tape decoration. Pure CSS, not an icon. */
.tape {
  position: absolute;
  display: block;
  background: var(--tape);
  border-left: 1px dashed var(--tape-edge);
  border-right: 1px dashed var(--tape-edge);
  height: 26px;
  width: 96px;
  z-index: 2;
  pointer-events: none;
}
.tape--hero { top: -13px; left: 50%; transform: translateX(-50%) rotate(-3deg); }

/* ---------- Controls (the drawer) ---------- */
.bench {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) clamp(16px, 4vw, 40px) clamp(48px, 7vw, 96px);
}
.controls {
  position: sticky;
  top: calc(var(--topbar-h) + 10px);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--board);
  background: color-mix(in srgb, var(--board) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--search { flex: 1 1 260px; min-width: 200px; }
.field label,
.field__label {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input[type="search"],
.field select {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--paper);
  font-size: 15px;
  min-height: 44px;
}
.field input[type="search"]::placeholder { color: var(--muted); }
.field input[type="search"]:hover,
.field select:hover { border-color: var(--muted-2); }
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field--toggle { margin-left: auto; }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 13px;
  min-height: 44px;
  color: var(--paper);
  font-size: 13px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.switch:hover { border-color: var(--accent); }
.switch__track {
  position: relative;
  width: 34px; height: 18px;
  border: 1px solid var(--line);
  background: var(--board);
  flex: none;
}
.switch__knob {
  position: absolute;
  top: 1px; left: 1px;
  width: 14px; height: 14px;
  background: var(--muted);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.2s ease;
}
.switch[aria-pressed="true"] { border-color: var(--accent); }
.switch[aria-pressed="true"] .switch__knob {
  transform: translateX(16px);
  background: var(--accent);
}
.controls__count {
  flex-basis: 100%;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Bench board ---------- */
.bench__board { margin-top: 30px; }
.bench__grid {
  column-count: 3;
  column-gap: 26px;
}

.sample {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  break-inside: avoid;
  box-shadow: var(--shadow-soft);
  transform: rotate(var(--tilt, 0deg));
  opacity: 0;
  translate: 0 22px;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1),
              opacity 0.5s ease,
              translate 0.5s cubic-bezier(0.2, 0.9, 0.3, 1),
              box-shadow 0.28s ease,
              border-color 0.28s ease;
}
.sample.is-in {
  opacity: 1;
  translate: 0 0;
}
.sample:hover,
.sample:focus-within {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
  z-index: 3;
}
.sample__tape {
  top: -13px;
  left: 50%;
  transform: translateX(-50%) rotate(var(--tape-tilt, -2deg));
}
.sample__frame {
  position: relative;
  overflow: hidden;
  background: var(--board);
  border: 1px solid var(--line);
}
.sample__frame img {
  width: 100%;
  aspect-ratio: var(--ratio, 4 / 3);
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1), filter 0.3s ease;
  filter: saturate(0.94);
}
.sample:hover .sample__frame img,
.sample:focus-within .sample__frame img {
  transform: scale(1.035);
  filter: saturate(1.05);
}
.sample__body { padding: 14px 4px 4px; }
.sample__cat {
  display: inline-block;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 3px 7px;
  border-radius: 1px;
}
.sample__title {
  margin-top: 11px;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.02;
}
.sample__meta {
  margin-top: 11px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.sample__meta dt { color: var(--muted-2); }
.sample__meta dd { margin: 0; color: var(--paper); }
.sample__footer {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sample__price {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 15px;
  font-weight: 700;
}
.sample__price span { color: var(--muted-2); font-size: 11px; font-weight: 400; }
.open-item {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.open-item::after { content: ""; position: absolute; inset: 0; }
.open-item:hover,
.sample:hover .open-item {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.sample__bench-flag {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  pointer-events: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 1px;
  display: none;
}
.sample[data-saved="true"] .sample__bench-flag { display: block; }
.sample[data-saved="true"] { border-color: var(--accent); }

/* ---------- Empty state ---------- */
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}
.empty__mark {
  display: inline-block;
  width: 44px; height: 44px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
  margin-bottom: 22px;
}
.empty h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.empty p { margin-top: 12px; color: var(--muted); }
.empty .btn { margin-top: 24px; }

.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 16px;
  background: var(--card);
}

/* ---------- Tray ---------- */
.tray {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(760px, calc(100vw - 24px));
  padding: 9px 14px;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tray__label {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
}
.tray__items { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.tray-thumb {
  position: relative;
  width: 46px; height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 1px;
  overflow: hidden;
  padding: 0;
  background: var(--board);
}
.tray-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tray-thumb:hover { border-color: var(--accent); }

/* ---------- Detail dialog ---------- */
.detail {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
  max-height: min(92dvh, 900px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  overflow: visible;
  margin: auto;
}
.detail::backdrop {
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.detail__sheet {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: min(92dvh, 900px);
  animation: draw-out 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes draw-out {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.detail__media {
  position: relative;
  background: var(--board);
  min-height: 260px;
  overflow: hidden;
}
.detail__media img {
  width: 100%; height: 100%;
  min-height: 260px;
  object-fit: cover;
}
.detail__content {
  padding: clamp(22px, 3vw, 40px);
  overflow-y: auto;
  max-height: min(92dvh, 900px);
}
.detail__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.detail__cat {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 4px 8px;
  border-radius: 1px;
}
.close-detail {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 40px; height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  color: var(--paper);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.close-detail:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.detail__title {
  margin-top: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}
.detail__teacher {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}
.detail__body {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.55;
}
.detail__specs {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.spec {
  background: var(--card);
  padding: 13px 14px;
}
.spec dt {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.spec dd {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 500;
}
.detail__actions {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.save-item {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: filter 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.14s ease;
}
.save-item:active { transform: translateY(1px) scale(0.99); }
.save-item:hover { filter: brightness(1.08); }
.save-item[aria-pressed="true"] {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.save-item[aria-pressed="true"]:hover { border-color: var(--accent); color: var(--accent-text); }
.detail__hint {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--board);
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px);
}
.footer__row {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 20px 40px;
  align-items: start;
}
.footer__brand { font-weight: 800; letter-spacing: 0.04em; font-size: 18px; }
.footer__note {
  max-width: 42ch;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- View transitions (shared sample image) ---------- */
::view-transition-old(root) { animation-duration: 0.22s; }
::view-transition-new(root) { animation-duration: 0.22s; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .bench__grid { column-count: 2; }
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero__text { max-width: 26ch; }
  .hero__figure { transform: rotate(-1deg); }
  .footer__row { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .bench__grid { column-count: 1; }
  .brand__sub { display: none; }
  .controls {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .field--search, .field--toggle { width: 100%; }
  .field--toggle { margin-left: 0; }
  .switch { width: 100%; justify-content: flex-start; }
  .hero { padding-top: 24px; }
  .hero__text h1 { font-size: clamp(2.4rem, 12vw, 3.4rem); max-width: 12ch; }
  .hero__figure { display: none; } /* keep the first screen about the task */
  .detail {
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
  }
  .detail__sheet {
    grid-template-columns: 1fr;
    grid-template-rows: 34dvh 1fr;
    max-height: 100dvh;
    height: 100dvh;
    border: 0;
  }
  .detail__content { max-height: none; overflow-y: auto; }
  .detail__media { max-height: none; min-height: 0; }
  .detail__media img { min-height: 0; height: 34dvh; }
  .detail__specs { grid-template-columns: 1fr; }
  .footer__row { grid-template-columns: 1fr; }
  body.has-tray .footer { padding-bottom: 92px; }
}

/* ---------- Reduced transparency ---------- */
@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .controls,
  .tray {
    background: var(--card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .detail::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .sample { opacity: 1; translate: none; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
