/* Headset Fit Finder: light editorial theme, ink navy + citrus green. */

:root {
  --ink: #0e1a3b;
  --ink-2: #23315b;
  --ink-soft: #4a5577;
  --paper: #f7f6f0;
  --surface: #ffffff;
  --line: #e0e2e8;
  --line-strong: #c3c8d4;
  --muted-bg: #f1f2f5;
  --citrus: #b6e02a;
  --citrus-soft: #eef8cf;
  --citrus-deep: #4b7300;
  --flag: #a3241a;
  --flag-bg: #fdecea;
  --tight: #7f5208;
  --tight-bg: #fff3d9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 26, 59, 0.06), 0 10px 28px -16px rgba(14, 26, 59, 0.28);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}

img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--ink); text-underline-offset: 3px; }
p { margin: 0 0 0.75em; }

:focus-visible { outline: 3px solid var(--citrus-deep); outline-offset: 2px; }

.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 14px 0; }

.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em;
}
.wordmark::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: var(--citrus); box-shadow: 0 0 0 3px var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(28px, 5vw, 64px) 0 clamp(32px, 4vw, 48px);
  background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.hero h1 {
  margin: 0 0 18px; max-width: 16ch;
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem); line-height: 1.04; letter-spacing: -0.02em;
}

.lede { margin: 0; max-width: 48ch; color: var(--ink-soft); font-size: clamp(1.02rem, 1.4vw, 1.18rem); }
.fit-guide-link { display: inline-block; margin-top: 14px; color: var(--citrus-deep); font-weight: 700; }

.hero-art {
  position: relative; margin: 0; overflow: hidden;
  aspect-ratio: 5 / 4; border-radius: 22px; box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 78% 18%, rgba(182, 224, 42, 0.5), transparent 42%),
    radial-gradient(circle at 12% 92%, rgba(182, 224, 42, 0.22), transparent 38%),
    linear-gradient(150deg, #1b2c5e 0%, var(--ink) 58%, #0a1430 100%);
}

/* Drawn headset shown until hero.webp loads, or permanently if it's missing. */
.hero-art::before {
  content: ""; position: absolute; left: 50%; top: 20%; width: 52%; aspect-ratio: 1;
  border-radius: 50%;
  border: clamp(8px, 1.4vw, 14px) solid rgba(255, 255, 255, 0.9);
  border-bottom-color: transparent; border-left-color: transparent;
  transform: translateX(-50%) rotate(-45deg);
}
.hero-art::after {
  content: ""; position: absolute; left: 16%; right: 16%; top: 42%; height: 30%;
  background:
    radial-gradient(closest-side, var(--citrus) 96%, transparent 100%) left center / 22% 100% no-repeat,
    radial-gradient(closest-side, var(--citrus) 96%, transparent 100%) right center / 22% 100% no-repeat;
}

.hero-art img {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.5s ease;
}
.hero-art.is-loaded img { opacity: 1; }

/* ---------- Presets ---------- */

.section-label {
  margin: 0 0 14px; color: var(--ink-soft);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}

.start { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }

.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.preset {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start;
  column-gap: 14px; row-gap: 4px; min-height: 124px; padding: 18px 18px 20px;
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.preset:hover { border-color: var(--ink); transform: translateY(-2px); }
.preset[data-preset="starter"] { grid-column: 1 / -1; background: var(--citrus-soft); border-color: var(--ink); }

.preset-icon {
  grid-row: 1 / 3; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--citrus-soft); color: var(--ink);
}
.preset-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.preset-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.preset-desc { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.4; }

.preset[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.preset[aria-pressed="true"] .preset-desc { color: #c9cfe0; }
.preset[aria-pressed="true"] .preset-icon { background: var(--citrus); }

/* Secondary starting points use a native disclosure. */
.more-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 48px; padding: 10px 16px;
  list-style: none; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  font-weight: 700; font-size: 0.95rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.more-summary::-webkit-details-marker { display: none; }
.more-summary:hover { border-color: var(--ink); }
.more-summary:focus-visible { outline: 3px solid var(--citrus-deep); outline-offset: 3px; }
.more-label { flex: 1 1 auto; }
.more-summary::after {
  content: ""; flex: none; width: 8px; height: 8px;
  border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.more-starts[open] > .more-summary::after { transform: rotate(-135deg); }
.more-starts[open] > .more-summary { border-color: var(--ink); }
.more-starts.has-selection > .more-summary { border-color: var(--ink); background: var(--citrus-soft); }
.more-selected {
  padding: 2px 10px; border-radius: 99px; background: var(--ink); color: #fff;
  font-size: 0.8rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere;
}
.more-selected[hidden] { display: none; }
.more-starts > .preset-grid { margin-top: 14px; }

/* Fit needs */

.needs { padding: 4px 20px 16px; background: var(--surface); }
.needs-title { margin: 0 0 4px; font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
.needs > .hint { margin: 0 0 12px; }

.need-toggles { display: grid; gap: 8px; }
.need {
  display: grid; gap: 2px; min-height: 44px; padding: 10px 12px 10px 38px; position: relative;
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 10px;
}
.need:hover { border-color: var(--ink); }
.need::before {
  content: ""; position: absolute; left: 12px; top: 13px; width: 16px; height: 16px;
  border: 1.5px solid var(--ink-soft); border-radius: 5px; background: var(--surface);
}
.need-title { font-weight: 700; font-size: 0.95rem; line-height: 1.25; }
.need-desc { color: var(--ink-soft); font-size: 0.8rem; line-height: 1.35; }
.need[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.need[aria-pressed="true"] .need-desc { color: #c9cfe0; }
.need[aria-pressed="true"]::before {
  background: var(--citrus) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%230e1a3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  border-color: var(--citrus);
}

.size-choice { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.size-choice legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 0.92rem; }
.size-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.size-opt { position: relative; display: block; cursor: pointer; }
.size-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.size-opt span {
  display: grid; place-items: center; min-height: 44px; padding: 6px;
  border: 1.5px solid var(--line-strong); border-radius: 10px; font-weight: 600; font-size: 0.9rem;
}
.size-opt:hover span { border-color: var(--ink); }
.size-opt input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.size-opt input:focus-visible + span { outline: 3px solid var(--citrus-deep); outline-offset: 2px; }
.size-choice .hint { margin: 8px 0 0; }

.size-prompt-slot:empty { display: none; }
.size-prompt-slot { margin-top: 8px; }
.size-prompt-slot .hint { margin: 0 0 8px; }
.btn-small { min-height: 40px; padding: 6px 14px; }

.needs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.needs-status { margin: 0; color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; }
.needs-status[hidden] { display: none; }

/* Same controls, repeated above results */
.needs-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin: 0 0 12px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.needs-bar[hidden], .needs-notes[hidden] { display: none; }
.needs-bar .size-prompt-slot { flex: 1 1 100%; margin: 0; }
.need-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.need-chip {
  min-height: 44px; padding: 6px 14px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 99px;
  font-weight: 600; font-size: 0.88rem;
}
.need-chip:hover { border-color: var(--ink); }
.need-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.need-chip[aria-pressed="true"]::before { content: "\2713\00a0"; color: var(--citrus); font-weight: 800; }
.size-inline { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.88rem; }
.size-inline select { width: auto; min-width: 96px; }

.audience-filter {
  min-width: 0; margin: 0 0 10px; padding: 12px 14px 10px;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--citrus-soft);
}
.audience-filter[hidden] { display: none; }
.audience-filter legend { padding: 0 6px; font-family: var(--serif); font-size: 1.12rem; font-weight: 700; }
.audience-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.audience-opt { position: relative; display: block; cursor: pointer; }
.audience-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.audience-opt span {
  display: grid; place-items: center; min-height: 44px; padding: 7px 10px;
  border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-weight: 700;
}
.audience-opt:hover span { border-color: var(--ink); }
.audience-opt input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.audience-opt input:focus-visible + span { outline: 3px solid var(--citrus-deep); outline-offset: 2px; }
.audience-filter .hint { margin: 8px 0 0; }
.hearing-caution {
  margin: 0 0 12px; padding: 10px 14px; background: var(--muted-bg);
  border-left: 4px solid var(--citrus-deep); border-radius: 0 10px 10px 0; font-size: 0.88rem;
}
.hearing-caution[hidden] { display: none; }
.hearing-caution a { font-weight: 700; text-decoration-color: var(--citrus-deep); }

.needs-notes {
  margin: 0 0 12px; padding: 10px 14px; font-size: 0.85rem;
  background: var(--muted-bg); border-radius: 10px;
}
.needs-notes p { margin: 0; }
.needs-notes p + p { margin-top: 8px; }
.needs-notes p[hidden] { display: none; }

.not-applicable { color: var(--ink-soft); font-style: italic; }

.browse-all {
  margin-top: 16px; padding: 8px 2px; cursor: pointer;
  background: none; border: 0; font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--citrus);
  text-decoration-thickness: 3px; text-underline-offset: 6px;
}
.browse-all:hover { text-decoration-color: var(--citrus-deep); }

/* ---------- Workspace ---------- */

/* Results come first in the DOM; on wide screens the refine panel sits in the left column. */
.workspace {
  display: grid; grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px); align-items: start;
  padding: 40px 0 64px;
}
.workspace > .refine { grid-column: 1; grid-row: 1; }
.workspace > .results { grid-column: 2; grid-row: 1; }

.preset-note {
  margin: 0 0 12px; padding: 10px 14px; background: var(--citrus-soft);
  border-left: 4px solid var(--citrus-deep); border-radius: 0 10px 10px 0; font-size: 0.88rem;
}
.preset-note[hidden] { display: none; }

/* ---------- Refine panel ---------- */

.refine {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}

.refine-summary {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  list-style: none; cursor: pointer;
  font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
}
.refine-summary::-webkit-details-marker { display: none; }
.refine-summary > span:first-child { flex: 1; }
.refine-summary::after {
  content: ""; width: 9px; height: 9px; margin-left: 4px;
  border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg) translateY(-3px);
}
.refine[open] .refine-summary::after { transform: rotate(-135deg) translateX(-3px); }

.refine-active {
  padding: 2px 10px; border-radius: 99px;
  background: var(--citrus); font: 700 0.75rem/1.6 var(--sans);
}
.refine-active:empty { display: none; }

.refine-form { padding: 0; }

/* Optional groups: each folds away so results stay near the top. */
.fold { border-top: 1px solid var(--line); }
.fold > summary {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-height: 48px; padding: 12px 20px;
  list-style: none; cursor: pointer;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary > span { flex: 1 1 auto; }
.fold > summary small { color: var(--ink-soft); font-size: 0.78rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.fold > summary::after {
  content: ""; width: 8px; height: 8px; align-self: center;
  border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg);
}
.fold[open] > summary::after { transform: rotate(-135deg); }

.group { margin: 0; padding: 4px 20px 6px; border: 0; min-width: 0; }
.refine-form > .hint { padding: 12px 20px 0; margin: 0; border-top: 1px solid var(--line); }

.field { margin: 0 0 14px; }
.field label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; font-weight: 600; font-size: 0.92rem; }

select,
input[type="number"] {
  width: 100%; min-height: 44px; padding: 8px 12px;
  background-color: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 10px;
}
select {
  appearance: none; padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
select:hover, input[type="number"]:hover { border-color: var(--ink-soft); }
input[aria-invalid="true"] { border-color: var(--flag); background: var(--flag-bg); }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trio .field { margin-bottom: 8px; }

.check { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.check small { display: block; color: var(--ink-soft); font-weight: 400; font-size: 0.82rem; }
.check.radio { padding: 5px 0; }

.hint { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.45; margin: 6px 0 12px; }

.must {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  background: var(--ink); color: #fff;
  font: 700 0.62rem/1.6 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
}

.mini { margin: 0 0 12px; font-size: 0.85rem; }
.mini summary { cursor: pointer; font-weight: 700; color: var(--citrus-deep); padding: 4px 0; }
.mini ul { margin: 6px 0 0; padding: 10px 12px 10px 28px; background: var(--muted-bg); border-radius: 10px; }
.mini li + li { margin-top: 4px; }

.form-actions {
  position: sticky; bottom: 0; display: flex; gap: 10px;
  margin: 0; padding: 14px 20px 18px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.form-actions .btn { flex: 1; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; cursor: pointer;
  border: 1.5px solid transparent; border-radius: 10px;
  font-weight: 700; font-size: 0.92rem; line-height: 1.2; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-amazon { background: var(--citrus); border-color: #9cc31c; color: var(--ink); }
.btn-amazon:hover { background: #c5ec3e; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Results ---------- */

.results { min-width: 0; }

.results-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--ink);
}
.results h2 {
  margin: 0; font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.1; letter-spacing: -0.01em;
}
.results-count { margin: 6px 0 0; color: var(--ink-soft); font-weight: 600; font-size: 0.92rem; }
.results-count:empty { display: none; }
.refine-jump { display: none; }
.results-body + .needs-bar { margin-top: 14px; }

.results-context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.results-context[hidden] { display: none; }
.context-label {
  margin-right: 4px; color: var(--ink-soft);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.context-chip { padding: 3px 11px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 0.82rem; font-weight: 600; }
.context-intent { background: var(--citrus-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

.disclosure {
  margin: 0 0 12px; padding: 10px 14px; font-size: 0.85rem;
  background: var(--citrus-soft); border-left: 4px solid var(--citrus-deep); border-radius: 0 10px 10px 0;
}

.legend { margin-bottom: 18px; font-size: 0.88rem; }
.legend summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.legend ul { display: grid; gap: 8px; margin: 0; padding: 12px 0 0; list-style: none; }
.legend .kind { margin-right: 6px; }

.placeholder {
  padding: 44px 24px; text-align: center; color: var(--ink-soft);
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
}
.placeholder p:last-child { margin: 0; }
.placeholder strong { color: var(--ink); font-family: var(--serif); font-size: 1.2rem; }

.card-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 18px; align-items: start; margin: 0; padding: 0; list-style: none;
}

.show-all { display: flex; margin: 22px auto 0; }

/* ---------- Card ---------- */

.card {
  display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.results .card { transition: border-color 0.15s ease; }
.results .card:focus-within { border-color: var(--ink-2); }

@media (hover: hover) and (pointer: fine) {
  .results .card:hover { border-color: var(--ink-2); }
}

@media (prefers-reduced-motion: no-preference) {
  .results .card { animation: card-settle 240ms ease-out 1; }
}

@keyframes card-settle {
  from { transform: translateY(4px); }
  to { transform: translateY(0px); }
}

.card-head { display: flex; align-items: flex-start; gap: 14px; }
.rank {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: var(--citrus);
  font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
}
.card-meta {
  margin: 0 0 2px; color: var(--ink-soft);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.card-title { margin: 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; }
.card-title:focus { outline: none; }
.card-title:focus-visible { outline: 3px solid var(--citrus-deep); outline-offset: 2px; }
.card-summary { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { padding: 3px 10px; border-radius: 99px; background: var(--muted-bg); font-size: 0.8rem; font-weight: 600; }
.chip-unknown { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-soft); }

.fit { display: grid; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.fit-label {
  margin: 0 0 6px; color: var(--ink-soft);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}

.reasons, .caveats, .notes { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; }

.reasons li { position: relative; padding-left: 22px; }
.reasons li::before {
  content: ""; position: absolute; left: 2px; top: 0.4em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--citrus-deep); border-bottom: 2.5px solid var(--citrus-deep);
  transform: rotate(-45deg);
}

.caveat { padding: 6px 10px; border-radius: 8px; background: #eef1f8; }
.caveat-tag { margin-right: 4px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.caveat-flag { background: var(--flag-bg); color: var(--flag); }
.caveat-tight { background: var(--tight-bg); color: var(--tight); }
.caveat-unknown { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-soft); }

.note { padding-left: 12px; border-left: 3px solid var(--citrus); }
.sound-note { display: grid; gap: 6px; padding: 12px 14px; border-left: 3px solid var(--ink); background: var(--muted-bg); border-radius: 0 10px 10px 0; font-size: 0.92rem; }
.sound-note p { margin: 0; }
.note-heading { font-weight: 700; }

.kind {
  display: inline-block; padding: 1px 7px; border-radius: 5px; vertical-align: 1px; white-space: nowrap;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.kind-manufacturer { background: #e3e8f5; color: var(--ink); }
.kind-listing { background: #e3e8f5; color: var(--ink); }
.kind-measured { background: var(--citrus); color: var(--ink); }
.kind-review { background: #eee8f8; color: #4a2f78; }
.kind-none,
.kind-unknown { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-soft); }

.source { color: var(--ink-soft); font-size: 0.8rem; overflow-wrap: anywhere; }
a.source { text-decoration-color: var(--citrus-deep); }
a.source:hover { color: var(--ink); }

/* Evidence drawer */

.evidence { padding-top: 12px; border-top: 1px solid var(--line); }
.evidence summary {
  display: flex; align-items: center; gap: 10px; min-height: 36px;
  list-style: none; cursor: pointer; font-weight: 700; font-size: 0.92rem;
}
.evidence summary::-webkit-details-marker { display: none; }
.evidence summary::before {
  content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--citrus-soft); color: var(--citrus-deep); font-weight: 800;
}
.evidence[open] summary::before { content: "\2212"; }

.evidence-caveat { margin: 10px 0 14px; padding: 8px 10px; border-radius: 8px; background: var(--muted-bg); font-size: 0.82rem; }
.evidence-label {
  margin: 16px 0 8px; color: var(--ink-soft);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.evidence-note { margin: 8px 0 0; color: var(--ink-soft); font-size: 0.82rem; }

.spec-list { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 0.88rem; }
.spec-list dt { color: var(--ink-soft); font-weight: 600; }
.spec-list dd { margin: 0; }

.evidence-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.evidence-list li { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.evidence-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.evidence-empty { color: var(--ink-soft); font-size: 0.85rem; margin: 0; }

/* Card footer */

.card-foot { display: grid; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-meta { margin: 0; color: var(--ink-soft); font-size: 0.8rem; }

/* Empty state */

.empty {
  padding: 32px clamp(20px, 4vw, 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.empty h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.4rem; }
.empty p { max-width: 60ch; color: var(--ink-soft); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer p { margin: 0; padding: 22px 0; color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .start { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 960px) {
  .start > .preset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .start > .preset-grid .preset { min-height: 92px; }
}

@media (max-width: 899px) {
  .workspace { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .workspace > .refine, .workspace > .results { grid-column: auto; grid-row: auto; }
  .refine-jump { display: inline-flex; }
  .refine { position: static; max-height: none; overflow: visible; }
  .form-actions { position: static; }
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; aspect-ratio: 16 / 7; max-height: 200px; border-radius: 16px; }
  .hero h1 { max-width: none; }
}

@media (max-width: 560px) {
  .wrap { width: min(1240px, 100% - 28px); }
  .hero { padding: 16px 0 22px; }
  .hero-grid { gap: 14px; margin-bottom: 18px; }
  .hero h1 { margin-bottom: 8px; font-size: 1.9rem; }
  .hero-art { max-height: 110px; }
  .section-label { margin-bottom: 10px; }
  .preset-grid { gap: 8px; }
  .more-summary { padding: 8px 12px; }
  .more-starts > .preset-grid { margin-top: 8px; }
  .preset { position: relative; grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 12px; row-gap: 6px; box-shadow: none; }
  .preset-icon { grid-row: auto; width: 34px; height: 34px; border-radius: 10px; }
  .preset-icon svg { width: 22px; height: 22px; }
  .preset-title { font-size: 1rem; }
  /* Short descriptions stay available to screen readers; only Not sure shows its text on phones. */
  .preset:not([data-preset="starter"]) .preset-desc {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .preset[data-preset="starter"] { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
  .preset[data-preset="starter"] .preset-icon { grid-row: 1 / 3; }
  .workspace { padding: 20px 0 40px; }
  .placeholder { padding: 24px 16px; }
  .fold > summary, .group, .needs, .form-actions { padding-left: 16px; padding-right: 16px; }
  .refine-form > .hint { padding-left: 16px; padding-right: 16px; }
  .spec-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .spec-list dd { margin-bottom: 8px; }
  .card { padding: 18px 16px 16px; }
  .card-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .preset:hover { transform: none; }
}
