

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.optional { font-weight: 400; color: var(--muted); font-size: var(--step--1); }
.notice { padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.notice--error { border-color: #C0392B; display: grid; gap: 12px; justify-items: start; }
.btn--danger { background: transparent; color: #B42318; border-color: currentColor; }
.btn--danger:hover { background: #B42318; color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--danger { color: #FF8A80; }
}

.field { display: grid; gap: 6px; min-width: 0; }
.field label, .group__label { font-weight: 700; }
.field__hint { color: var(--muted); font-size: var(--step--1); }
.field__error { color: #B42318; font-weight: 700; font-size: var(--step--1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .field__error { color: #FF8A80; }
}
.field input, .field select, .field textarea, .admin textarea, .status-select {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 10px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  font: 400 max(17px, var(--step-0)) var(--font-body);
}
.field textarea, .admin textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .admin textarea:focus, .status-select:focus {
  outline: none; border-color: var(--accent);
}
[aria-invalid="true"] { border-color: #B42318 !important; }
.field-row { display: grid; grid-template-columns: 1fr 96px; gap: 12px; }
.field--inline { grid-template-columns: auto minmax(160px, 1fr); align-items: center; gap: 10px; }

.group { display: grid; gap: 10px; }
.choices { display: grid; gap: 8px; }
.choices--row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.choice, .check {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: 10px;
  border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700;
}
.check { align-items: flex-start; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.choice input, .check input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); margin: 0; }
.check input { margin-top: 3px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.intake { max-width: calc(44rem + 2 * var(--gutter)); padding-block: clamp(28px, 6vw, 56px) 64px; display: grid; gap: 24px; }
.intake__intro { display: grid; gap: 12px; }
.intake__intro h1, .intake__done h1 { font-size: var(--step-3); }
.intake__lead { font-size: var(--step-1); color: var(--muted); }
.intake__form { display: grid; gap: 18px; scroll-margin-top: 90px; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress span { height: 6px; border-radius: 3px; background: var(--line); }
.progress span.is-done { background: var(--accent); }
.progress__label { font: 700 var(--step--1)/1.2 var(--font-body); color: var(--muted); }
.form-step { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0; }
.form-step__title { font: 800 var(--step-2)/1.15 var(--font-display); padding: 0; margin-bottom: 4px; }
.form-step__title:focus { outline: none; }
.form-step__sub { font-size: var(--step-1); margin-top: 8px; }
.step-nav { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.step-nav .btn { flex: 1 1 140px; }
.form-error { padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, #B42318 10%, var(--surface)); color: var(--ink); font-weight: 700; }
.form-status { color: var(--muted); font-weight: 700; }

.hours { display: grid; gap: 8px; }
.hours-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
}
.hours-row__day { font-weight: 700; }
.hours-row__times { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.hours-row__times input { flex: 1; min-width: 0; min-height: 46px; padding: 6px 10px; border-radius: 8px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: 400 17px var(--font-body); }
.hours-row__times input:disabled { opacity: .45; }
.hours-row .check { min-height: 44px; padding: 6px 10px; border: 0; background: transparent; align-items: center; }
@media (min-width: 640px) {
  .hours-row { grid-template-columns: 120px auto 1fr; }
  .hours-row__times { grid-column: auto; }
}

.uploads { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.upload { position: relative; display: grid; place-items: center; min-height: 64px; padding: 12px; border-radius: 12px; border: 2px dashed var(--accent); background: var(--surface); cursor: pointer; text-align: center; font-weight: 700; }
.upload__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.upload:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__label { position: absolute; left: 0; bottom: 0; padding: 2px 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; font-weight: 700; border-top-right-radius: 8px; }
.thumb__remove { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }

.intake__done { display: grid; gap: 16px; justify-items: start; padding: clamp(24px, 5vw, 40px); border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.intake__done h1:focus { outline: none; }

.prose { max-width: calc(44rem + 2 * var(--gutter)); padding-block: clamp(28px, 6vw, 56px) 64px; display: grid; gap: 14px; }
.prose h1 { font-size: var(--step-3); }
.prose h2 { font-size: var(--step-1); margin-top: 14px; }
.prose__lead { font-size: var(--step-1); }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

.form-step { view-transition-name: form-step; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(form-step) { animation: 180ms ease-in both step-out; }
  ::view-transition-new(form-step) { animation: 260ms cubic-bezier(.2, .7, .3, 1) both step-in; }
  :root[data-step-direction="back"]::view-transition-old(form-step) { animation-name: step-out-back; }
  :root[data-step-direction="back"]::view-transition-new(form-step) { animation-name: step-in-back; }
}
@keyframes step-out { to { opacity: 0; transform: translateX(-28px); } }
@keyframes step-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes step-out-back { to { opacity: 0; transform: translateX(28px); } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-28px); } }

.admin { max-width: calc(60rem + 2 * var(--gutter)); padding-block: 20px 64px; display: grid; gap: 18px; align-content: start; }
.admin__title { font-size: var(--step-3); overflow-wrap: anywhere; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.topbar__actions { display: flex; gap: 8px; }
.admin-login { max-width: 380px; margin: 12vh auto 0; display: grid; gap: 16px; justify-items: start; width: 100%; }
.admin-login .field, .admin-login .btn { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 var(--step--1) var(--font-body); cursor: pointer; }
.chip-btn.is-active { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.req:hover { border-color: var(--brand); }
.req__main { display: grid; gap: 2px; min-width: 0; }
.req__name { font: 800 var(--step-1)/1.2 var(--font-display); overflow-wrap: anywhere; }
.req__meta, .req__age { color: var(--muted); font-size: var(--step--1); overflow-wrap: anywhere; }
.req__side { display: grid; gap: 6px; justify-items: end; align-content: start; text-align: right; }
.req__old { grid-column: 1 / -1; font-size: var(--step--1); font-weight: 700; color: var(--accent-text); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 700 13px/1.4 var(--font-body); background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.badge--new { background: var(--accent); color: var(--on-accent); }
.badge--building { background: var(--brand); color: var(--on-brand); }
.badge--won { background: #1E7B4D; color: #fff; }
.badge--lost { background: var(--surface-2); color: var(--muted); }
.empty { padding: 28px; border-radius: var(--radius); border: 2px dashed var(--line); color: var(--muted); text-align: center; }
.back-link { font-weight: 700; justify-self: start; }
.detail-head { display: grid; gap: 14px; }
@media (min-width: 760px) { .detail-head { grid-template-columns: 1fr minmax(240px, 300px); align-items: end; } }
.card { display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.card h2 { font-size: var(--step-1); }
.card--quiet { background: transparent; }
.card .btn { justify-self: start; }
.kv-list { margin: 0; display: grid; gap: 10px; }
.kv { display: grid; gap: 2px; }
@media (min-width: 640px) { .kv { grid-template-columns: 200px 1fr; gap: 16px; } }
.kv dt { color: var(--muted); font-weight: 700; font-size: var(--step--1); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pre-text { white-space: pre-wrap; }
.plain-list { margin: 0; padding-left: 1.1em; }
.mini-table { border-collapse: collapse; }
.mini-table th, .mini-table td { text-align: left; padding: 2px 16px 2px 0; font-weight: 400; }
.mini-table th { color: var(--muted); }
.counts-table { display: block; overflow-x: auto; }
.counts-table td { font-variant-numeric: tabular-nums; }
.counts-table thead th { font-weight: 700; vertical-align: bottom; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid li { display: grid; gap: 4px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.photo-grid__label { font-size: var(--step--1); color: var(--muted); }
.config { margin: 8px 0 0; padding: 14px; border-radius: 10px; background: var(--board); color: #E9EDF3; font: 13px/1.5 var(--font-mono); overflow-x: auto; max-height: 420px; }
.config--wrap { white-space: pre-wrap; overflow-wrap: anywhere; } 
details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
