/* ==========================================================================
   Orivo — host pages (entry, onboarding, dashboard)
   Builds on styles.css tokens and guest.css fields/buttons. The host side is
   a working tool: General Sans throughout, serif only on the entry page.
   ========================================================================== */
.host-ui { --line: rgba(36, 35, 31, .12); --line-strong: rgba(36, 35, 31, .22) }

/* ---------- Status badges ---------- */
.h-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 0 10px; border: 1px solid currentColor; border-radius: 6px; font: 500 12px/1 var(--sans); letter-spacing: .01em; white-space: nowrap; color: var(--muted) }
.h-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.h-badge.is-success { color: var(--color-success) }
.h-badge.is-warning { color: var(--color-warning) }
.h-badge.is-error { color: var(--color-error) }
.h-badge.is-ink { color: var(--ink) }

/* ---------- Shared surfaces ---------- */
.h-panel { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white) }
.h-panel + .h-panel { margin-top: 16px }
.h-note { padding: 14px 16px; border-left: 2px solid var(--ink); background: var(--sand); font-size: 13.5px; color: var(--ink); border-radius: 0 6px 6px 0 }
.h-note.is-warning { border-color: var(--color-warning) }
.h-note.is-error { border-color: var(--color-error) }
.h-muted { color: var(--muted); font-size: 13.5px }
.h-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px }
.h-link { font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px }
.h-link:hover { text-decoration-thickness: 2px }
.h-error { color: var(--color-error); font-size: 14px }
.h-error:empty, .h-ok:empty { display: none }
.h-ok { color: var(--color-success); font-size: 14px }

/* ---------- Entry page ---------- */
.h-hero { padding-block: clamp(8px, 2vw, 28px) clamp(48px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: end }
.h-hero h1 { font: 300 clamp(54px, 8.4vw, 132px)/.9 var(--serif); letter-spacing: -.035em }
.h-hero h1 em { font-style: italic }
.h-hero-copy p { max-width: 42ch; font-size: 17px; line-height: 1.6; color: var(--muted) }
.h-hero-copy .h-actions { margin-top: 32px }
.h-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--ink) }
.h-steps li { display: grid; gap: 12px; align-content: start }
.h-steps span { font: 500 11px/1 var(--sans); letter-spacing: .18em; color: var(--muted) }
.h-steps h2 { font: 500 22px/1.2 var(--sans); letter-spacing: -.02em }
.h-steps p { color: var(--muted); font-size: 15px; max-width: 36ch }
.h-who { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 80px); padding-block: clamp(48px, 7vw, 100px); border-top: 1px solid var(--line) }
.h-who h2 { font: 400 clamp(32px, 3.6vw, 52px)/1.02 var(--serif); letter-spacing: -.02em }
.h-who ul { display: grid; border-top: 1px solid var(--line) }
.h-who li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding-block: 20px; border-bottom: 1px solid var(--line) }
.h-who strong { font-weight: 500 }
.h-who li p { color: var(--muted); font-size: 15px }

/* ---------- Onboarding ---------- */
.h-flow main { max-width: 760px; margin-inline: auto }
.h-flow-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; border-bottom: 1px solid var(--line) }
.h-flow-bar .d-word svg { width: 88px }
.h-flow-bar .h-brand { display: flex; align-items: center; gap: 14px }
.h-flow-bar .h-brand small { padding-left: 14px; border-left: 1px solid var(--line-strong); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.h-flow-bar a:not(.d-word) { font-size: 14px }
.h-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: clamp(32px, 5vw, 48px); counter-reset: hstep }
.h-progress li { display: grid; gap: 10px; font-size: 13px; color: var(--grey); counter-increment: hstep }
.h-progress li::before { content: ""; height: 2px; border-radius: 2px; background: var(--stone); transition: background-color .5s var(--ease) }
.h-progress li.is-done { color: var(--muted) }
.h-progress li.is-done::before { background: var(--muted) }
.h-progress li.is-current { color: var(--ink); font-weight: 500 }
.h-progress li.is-current::before { background: var(--ink) }
.h-progress a { display: inline-flex; gap: 6px; align-items: center; min-height: 32px }
.h-progress a:hover { color: var(--ink) }
.h-progress .icon { width: 14px; height: 14px; stroke-width: 2 }
.h-step-head { margin-bottom: 28px }
.h-step-head p.h-kicker { margin-bottom: 10px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted) }
.h-step-head h1 { font: 500 clamp(28px, 3.4vw, 38px)/1.12 var(--sans); letter-spacing: -.03em }
.h-step-head p:not(.h-kicker) { margin-top: 10px; max-width: 58ch; color: var(--muted) }
.h-form { display: grid; gap: 22px }
.h-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0 }
.h-form legend { margin-bottom: 12px; padding: 0; font: 500 15px/1.4 var(--sans) }
.h-section-title { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); font: 500 15px/1.4 var(--sans) }
.h-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px }
.h-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.h-wide { grid-column: 1 / -1 }
.discovery .h-form label:not(.h-option):not(.c-check):not(.d-check) { letter-spacing: .12em }
.h-form small { display: block; margin-top: -2px; font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 400 }
.h-options { display: grid; gap: 10px }
.h-options.is-row { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.h-option { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--white); cursor: pointer; transition: border-color .25s, box-shadow .25s }
.h-option:hover { border-color: rgba(36, 35, 31, .45) }
.h-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink) }
.h-option:has(input:focus-visible) { outline: 1.5px solid var(--ink); outline-offset: 3px }
.h-option input { appearance: none; -webkit-appearance: none; grid-row: span 2; width: 18px; height: 18px; margin: 2px 0 0; border: 1px solid var(--field-border); border-radius: 50%; background: var(--white); display: grid; place-items: center; cursor: pointer }
.h-option input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .3s var(--ease) }
.h-option input:checked { border-color: var(--ink) }
.h-option input:checked::after { transform: scale(1) }
.h-option strong { font-weight: 500; font-size: 15px }
.h-option span { color: var(--muted); font-size: 13.5px; line-height: 1.5 }
.h-file { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--white) }
.h-file.is-done { border-style: solid }
.h-file input { position: absolute; width: 1px; height: 1px; opacity: 0 }
.h-file-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .2s, background-color .2s }
.h-file-button:hover { border-color: var(--ink) }
.h-file:has(input:focus-visible) .h-file-button { outline: 1.5px solid var(--ink); outline-offset: 2px }
.h-file-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--muted) }
.h-file.is-done .h-file-status { color: var(--color-success) }
.h-file.is-error .h-file-status { color: var(--color-error) }
.h-avatar-preview { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--stone) }
.h-form .c-check { font-size: 14.5px; line-height: 1.5 }
.h-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; padding-top: 24px; border-top: 1px solid var(--line) }
.h-form-foot .button { min-width: 180px }
.h-estimate { padding: 16px 18px; border-radius: var(--radius-md); background: var(--sand); font-size: 14px }
.h-estimate strong { font-weight: 500 }
.h-summary { display: grid; gap: 0; border-top: 1px solid var(--line) }
.h-summary section { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 8px 24px; padding-block: 22px; border-bottom: 1px solid var(--line) }
.h-summary h2 { font: 500 14px/1.5 var(--sans) }
.h-summary dl { display: grid; gap: 6px; font-size: 14px }
.h-summary dl div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px }
.h-summary dt { color: var(--muted) }
.h-done { text-align: left }
.h-done .h-check { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border: 1px solid var(--ink); border-radius: 50% }
.h-done .h-check .icon { width: 20px; height: 20px; stroke-width: 1.6 }

/* ---------- Dashboard ---------- */
.host-app { background: var(--paper) }
.host-app main { padding: 0 !important; min-height: 0 }
.h-app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh }
.h-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 26px 18px 20px; border-right: 1px solid var(--line); background: var(--white) }
.h-side .h-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px }
.h-side .d-word svg { width: 78px }
.h-side .h-brand small, .h-topbar .h-brand small { padding-left: 12px; border-left: 1px solid var(--line-strong); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted) }
.h-nav { display: grid; gap: 2px }
.h-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 8px; font-size: 14px; color: var(--muted); transition: color .2s, background-color .2s }
.h-nav a .icon { width: 18px; height: 18px }
.h-nav a:hover { color: var(--ink); background: var(--sand) }
.h-nav a[aria-current] { color: var(--ink); font-weight: 500; background: var(--sand) }
.h-nav a[aria-current]::before { content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--ink) }
.h-side-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 12px }
.h-person { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center }
.h-initials { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 500; overflow: hidden }
.h-initials img { width: 100%; height: 100% }
.h-person strong { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.h-person small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.h-side-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted) }
.h-side-links a:hover, .h-side-links button:hover { color: var(--ink) }
.h-main { min-width: 0; padding: clamp(24px, 3.4vw, 48px) clamp(20px, 4vw, 56px) 80px }
.h-page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px }
.h-page-head h1 { font: 500 clamp(26px, 2.6vw, 32px)/1.15 var(--sans); letter-spacing: -.03em }
.h-page-head p { margin-top: 6px; color: var(--muted); font-size: 14.5px }
.h-page-head .button { min-height: 44px; padding-inline: 18px; font-size: 13.5px }
.h-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 20px; margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white) }
.h-status p { flex: 1 1 280px; font-size: 14px }
.h-status .button { min-height: 42px; padding-inline: 18px; font-size: 13px }
.h-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 36px; border-block: 1px solid var(--line) }
.h-figures div { padding: 20px 20px 22px 0 }
.h-figures div + div { padding-left: 20px; border-left: 1px solid var(--line) }
.h-figures dt { font-size: 12.5px; color: var(--muted) }
.h-figures dd { margin-top: 8px; font: 500 clamp(22px, 2.2vw, 28px)/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.h-block { margin-bottom: 40px }
.h-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px }
.h-block-head h2 { font: 500 16px/1.3 var(--sans) }
.h-block-head a { font-size: 13.5px; color: var(--muted) }
.h-block-head a:hover { color: var(--ink) }
.h-checklist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); overflow: hidden }
.h-checklist a { display: grid; gap: 6px; padding: 16px 18px; font-size: 13.5px; border-right: 1px solid var(--line) }
.h-checklist a:last-child { border-right: 0 }
.h-checklist a:hover { background: var(--sand) }
.h-checklist span { font-size: 12px; color: var(--muted) }
.h-checklist .is-done span { color: var(--color-success) }
.h-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white) }
.h-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums }
.h-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap }
.h-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle }
.h-table tr:last-child td { border-bottom: 0 }
.h-table tbody tr { transition: background-color .15s }
.h-table tbody tr:hover { background: rgba(239, 235, 227, .5) }
.h-table .num { text-align: right; white-space: nowrap }
.h-table small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px }
.h-table .h-thumb { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; min-width: 220px }
.h-table .h-thumb img, .h-table .h-thumb i { width: 48px; height: 36px; border-radius: 4px; background: var(--stone) }
.h-table a.h-link { white-space: nowrap; font-size: 13.5px }
.h-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--muted) }
.h-empty { padding: clamp(28px, 4vw, 48px); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); text-align: left }
.h-empty h2, .h-empty h3 { font: 500 17px/1.3 var(--sans) }
.h-empty p { margin-top: 8px; max-width: 56ch; color: var(--muted); font-size: 14px }
.h-empty .button, .h-empty .h-link { margin-top: 18px }
.h-tabs { display: flex; gap: 24px; margin-bottom: 18px; border-bottom: 1px solid var(--line) }
.h-tabs a { padding: 10px 0 12px; margin-bottom: -1px; font-size: 14px; color: var(--muted); border-bottom: 1.5px solid transparent }
.h-tabs a[aria-current] { color: var(--ink); border-color: var(--ink); font-weight: 500 }
.h-cal { --days: 30; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white) }
.h-cal-grid { display: grid; grid-template-columns: 200px repeat(var(--days), minmax(30px, 1fr)); min-width: 1100px; font-size: 12px }
.h-cal-grid > div { min-height: 44px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center }
.h-cal-grid .h-cal-name { position: sticky; left: 0; z-index: 1; justify-content: flex-start; padding: 0 16px; background: var(--white); border-right: 1px solid var(--line); font-size: 13.5px; font-weight: 500 }
.h-cal-grid .h-cal-day { flex-direction: column; gap: 2px; color: var(--muted); font-variant-numeric: tabular-nums }
.h-cal-grid .h-cal-day b { color: var(--ink); font-weight: 500 }
.h-cal-grid .is-weekend { background: rgba(239, 235, 227, .45) }
.h-cal-grid .is-booked { position: relative }
.h-cal-grid .is-booked::after { content: ""; position: absolute; inset: 10px 0; background: var(--ink) }
.h-cal-grid .is-booked.is-start::after { left: 4px; border-radius: 4px 0 0 4px }
.h-cal-grid .is-booked.is-end::after { right: 4px; border-radius: 0 4px 4px 0 }
.h-cal-legend { display: flex; gap: 20px; margin-top: 12px; font-size: 12.5px; color: var(--muted) }
.h-cal-legend span::before { content: ""; display: inline-block; width: 18px; height: 8px; margin-right: 8px; border-radius: 2px; background: var(--ink); vertical-align: middle }
.h-dl { display: grid; gap: 0; border-top: 1px solid var(--line) }
.h-dl div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 14px }
.h-dl dt { color: var(--muted) }
.h-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px }
.h-support li { display: flex; justify-content: space-between; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--line); font-size: 14px }
.h-support li:first-child { border-top: 1px solid var(--line) }

/* Mobile: a top bar and a full drawer, not a squeezed sidebar. */
.h-topbar { display: none }
.h-drawer { display: none }
@media (max-width: 900px) {
  .h-app { grid-template-columns: minmax(0, 1fr) }
  .h-side { display: none }
  .h-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); background: rgba(255, 253, 249, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px) }
  .h-topbar .h-brand { display: flex; align-items: center; gap: 12px }
  .h-topbar .d-word svg { width: 72px }
  .h-menu-button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13.5px; font-weight: 500 }
  .h-drawer { position: fixed; inset: 0; z-index: 60; display: block; visibility: hidden; pointer-events: none }
  .h-drawer.is-open { visibility: visible; pointer-events: auto }
  .h-drawer-scrim { position: absolute; inset: 0; background: rgba(23, 23, 20, .4); opacity: 0; transition: opacity .35s var(--ease) }
  .h-drawer.is-open .h-drawer-scrim { opacity: 1 }
  .h-drawer-panel { position: absolute; inset: 0 auto 0 0; width: min(88vw, 360px); display: flex; flex-direction: column; padding: 20px 20px 24px; background: var(--white); transform: translateX(-100%); transition: transform .45s var(--ease); overflow-y: auto }
  .h-drawer.is-open .h-drawer-panel { transform: none }
  .h-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px }
  .h-drawer .h-nav a { min-height: 52px; font-size: 17px }
  .h-drawer .h-nav a[aria-current]::before { left: -20px }
  .h-drawer .h-side-foot { padding-inline: 0 }
  .h-figures { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .h-figures div:nth-child(3) { padding-left: 0; border-left: 0 }
  .h-figures div:nth-child(n+3) { border-top: 1px solid var(--line) }
  .h-checklist { grid-template-columns: 1fr }
  .h-checklist a { border-right: 0; border-bottom: 1px solid var(--line) }
  .h-cols { grid-template-columns: 1fr }
}
@media (max-width: 760px) {
  .h-hero, .h-who { grid-template-columns: 1fr }
  .h-steps { grid-template-columns: 1fr }
  .h-who li { grid-template-columns: 1fr; gap: 4px }
  .h-grid, .h-grid-3, .h-options.is-row { grid-template-columns: minmax(0, 1fr) }
  .h-progress li { font-size: 0; gap: 0 }
  .h-progress li.is-current { font-size: 12.5px; gap: 8px }
  .h-summary section { grid-template-columns: 1fr }
  .h-summary dl div, .h-dl div { grid-template-columns: 1fr; gap: 2px }
  .h-form-foot .button { width: 100% }
}
@media (max-width: 520px) {
  .h-figures { grid-template-columns: 1fr }
  .h-figures div, .h-figures div + div { padding-left: 0; border-left: 0 }
  .h-figures div + div { border-top: 1px solid var(--line) }
  .h-flow-bar .h-brand small { display: none }
}

/* Guest form labels are uppercase micro-labels; option cards and file pickers aren't. */
.discovery.host-ui label.h-option:not(.c-check), .discovery.host-ui label.h-file:not(.c-check) { gap: 4px 14px; font: 400 14px/1.45 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink) }
.discovery.host-ui label.h-file:not(.c-check) { gap: 14px }
.discovery .h-option input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; border-radius: 50%; box-shadow: none }
.discovery .h-file input[type=file] { min-height: 0; padding: 0; border: 0 }
.h-option strong { color: var(--ink) }
.h-grid > label { align-content: start }
.h-summary ~ form .h-form-foot { border-top: 0; padding-top: 12px }
.h-drawer .h-brand { display: flex; align-items: center; gap: 12px } .h-drawer .h-brand small { padding-left: 12px; border-left: 1px solid var(--line-strong); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted) } .h-drawer .d-word svg { width: 72px }

/* ==========================================================================
   Listing editor
   ========================================================================== */
.h-editor main { max-width: none }
.h-editor-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 0 clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); background: rgba(247, 244, 238, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px) }
.h-editor-bar .h-brand { display: flex; align-items: center; gap: 12px; min-width: 0 }
.h-editor-bar .d-word svg { width: 72px }
.h-editor-bar .h-brand small { padding-left: 12px; border-left: 1px solid var(--line-strong); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap }
.h-editor-bar .h-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500 }
.h-save-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap }
.h-save-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-success) }
.h-save-state.is-saving::before { background: var(--color-warning); animation: h-pulse 1s infinite }
.h-save-state.is-error { color: var(--color-error) }
.h-save-state.is-error::before { background: var(--color-error) }
@keyframes h-pulse { 50% { opacity: .3 } }
.h-editor-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); width: min(100% - 32px, 1180px); margin: 0 auto; padding-block: 36px 96px }
.h-sections { position: sticky; top: 96px; align-self: start; display: grid; gap: 2px }
.h-sections a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 8px; font-size: 14px; color: var(--muted) }
.h-sections a:hover { color: var(--ink); background: var(--sand) }
.h-sections a[aria-current] { color: var(--ink); font-weight: 500; background: var(--white); box-shadow: inset 0 0 0 1px var(--line) }
.h-sections i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--grey); flex: none }
.h-sections i.is-done { background: var(--color-success); border-color: var(--color-success) }
.h-sections i.is-todo { border-color: var(--color-warning) }
.h-section { max-width: 760px }
.h-section > .h-step-head { margin-bottom: 26px }
.h-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line) }
.h-pager a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500 }
.h-pager a:hover { text-decoration: underline; text-underline-offset: 4px }
.h-pager .icon { width: 16px; height: 16px }
.h-count { float: right; font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--grey) }
.discovery .h-form textarea { min-height: 180px; line-height: 1.6 }
.h-beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px }
.h-map { height: 340px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--stone) }
.h-map .leaflet-container { font: inherit }
.h-map-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted) }
.h-chips { display: flex; flex-wrap: wrap; gap: 8px }
.h-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 6px 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13.5px; background: var(--white) }
.h-chip button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; color: var(--muted) }
.h-chip button:hover { background: var(--sand); color: var(--ink) }
.h-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end }
.h-inline .d-outline { min-height: 52px; border-radius: var(--radius-md) }
.h-privacy { display: grid; gap: 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); font-size: 14px }
.h-privacy strong { font-weight: 500 }
.h-privacy p { color: var(--muted) }
.h-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 18px }
.h-checks .d-check { min-height: 40px }
.h-follow { margin: 8px 0 4px; padding: 16px 18px; border-left: 2px solid var(--ink); background: var(--sand); border-radius: 0 8px 8px 0 }
.h-follow legend, .h-follow p.h-q { margin-bottom: 10px; font-size: 14px; font-weight: 500 }
.h-follow .h-options { gap: 8px }
.h-follow .h-option { padding: 12px 14px }
.h-amenity-group + .h-amenity-group { padding-top: 22px; border-top: 1px solid var(--line) }

/* Media uploader */
.h-drop { display: grid; place-items: center; gap: 6px; padding: 36px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--white); text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s }
.h-drop:hover, .h-drop.is-over { border-color: var(--ink); background: var(--sand) }
.h-drop strong { font-size: 15px; font-weight: 500 }
.h-drop span { font-size: 13px; color: var(--muted) }
.h-drop input { position: absolute; width: 1px; height: 1px; opacity: 0 }
.h-drop:has(input:focus-visible) { outline: 1.5px solid var(--ink); outline-offset: 3px }
.h-media-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 18px 0 12px; font-size: 13.5px }
.h-media-meta span { color: var(--muted) }
.h-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px }
.h-photo { position: relative; display: grid; grid-template-rows: auto auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); overflow: hidden; transition: box-shadow .2s, opacity .2s, transform .2s }
.h-photo[draggable=true] { cursor: grab }
.h-photo.is-dragging { opacity: .4 }
.h-photo.is-target { box-shadow: 0 0 0 2px var(--ink) }
.h-photo-img { position: relative; aspect-ratio: 4 / 3; background: var(--stone) }
.h-photo-img img { pointer-events: none }
.h-photo-img .h-badge { position: absolute; top: 8px; left: 8px; background: var(--white); border-color: var(--white); color: var(--ink) }
.h-photo-num { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: rgba(23, 23, 20, .66); color: var(--paper); font-size: 12px }
.h-photo-body { display: grid; gap: 8px; padding: 10px }
.discovery .h-photo-body select { min-height: 38px; padding: 6px 36px 6px 10px; font-size: 13px; background-position: right 12px center }
.h-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12.5px }
.h-photo-actions button, .h-photo-actions label { min-height: 30px; display: inline-flex; align-items: center; color: var(--muted); cursor: pointer }
.h-photo-actions button:hover, .h-photo-actions label:hover { color: var(--ink) }
.h-photo-actions .h-move { margin-left: auto; display: flex; gap: 2px }
.h-photo-actions .h-move button { width: 28px; justify-content: center; border-radius: 4px }
.h-photo-actions .h-move button:hover { background: var(--sand) }
.h-photo-actions .h-move button:disabled { opacity: .3; cursor: default }
.h-photo-actions .is-danger:hover { color: var(--color-error) }
.h-progress-bar { height: 3px; background: var(--stone) }
.h-progress-bar span { display: block; height: 100%; width: var(--p, 0%); background: var(--ink); transition: width .2s }
.h-photo.is-uploading .h-photo-body { font-size: 12.5px; color: var(--muted) }
.h-photo.is-failed .h-photo-body { color: var(--color-error); font-size: 12.5px }
.h-video { display: grid; gap: 12px }
.h-video video { width: 100%; max-height: 420px; border-radius: var(--radius-md); background: var(--deep) }

/* Preview */
.h-preview-note { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 13px; color: var(--muted) }
.h-preview { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper) }
.h-preview-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 140px); gap: 6px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 24px }
.h-preview-gallery > :first-child { grid-row: span 2 }
.h-preview-gallery div { background: var(--stone) }
.h-preview h2 { font: 400 clamp(32px, 4vw, 48px)/1 var(--serif); letter-spacing: -.02em }
.h-preview .g-eyebrow { margin-bottom: 12px }
.h-preview .h-lede { margin-top: 10px; font-size: 16px }
.h-preview .h-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 }
.h-preview .h-pills span { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 99px; font-size: 12.5px }
.h-preview .h-desc { white-space: pre-line; color: var(--muted); max-width: 64ch }
.h-preview h3 { margin: 26px 0 10px; font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted) }
.h-preview ul.h-amen { columns: 2; column-gap: 24px; font-size: 14px }
.h-preview ul.h-amen li { padding-block: 3px; break-inside: avoid }
.h-preview-rate { display: flex; align-items: baseline; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line) }
.h-preview-rate strong { font: 400 30px/1 var(--serif) }
.h-issues { display: grid; gap: 0; margin: 24px 0 0; border-top: 1px solid var(--line) }
.h-issues li { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 14px }
@media (max-width: 900px) {
  .h-editor-layout { grid-template-columns: minmax(0, 1fr); padding-top: 0 }
  .h-sections { position: sticky; top: 64px; z-index: 20; display: flex; gap: 4px; margin-inline: -16px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; background: var(--paper); border-bottom: 1px solid var(--line) }
  .h-sections a { flex: none; min-height: 38px }
  .h-editor-bar .h-title { display: none }
}
@media (max-width: 560px) {
  .h-editor-bar .h-brand small { display: none }
  .h-photos { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .h-preview-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 160px 90px }
  .h-preview-gallery > :first-child { grid-row: auto; grid-column: span 2 }
  .h-preview-gallery > :nth-child(n+4) { display: none }
  .h-preview ul.h-amen { columns: 1 }
}
.discovery.h-editor main { padding: 0 }
.host-ui label.c-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin-block: 4px; font: 400 14.5px/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer }
.host-ui label.c-check input { margin-top: 2px; flex: none }
.h-section:focus, .h-main:focus { outline: none }
.discovery.host-ui textarea { width: 100%; font: 400 15px/1.6 var(--sans); letter-spacing: 0; text-transform: none; resize: vertical }
.discovery.host-ui label:has(> .h-count) { position: relative }
.h-count { position: absolute; top: 0; right: 0; float: none }
.discovery.host-ui label.h-drop:not(.c-check), .discovery.host-ui .h-photo-actions label:not(.c-check), .discovery.host-ui label.d-outline:not(.c-check) { font: 400 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: inherit }
.discovery.host-ui label.h-drop:not(.c-check) { display: grid; gap: 6px; color: var(--ink) }
.discovery.host-ui label.h-drop strong { font-size: 15px }
.discovery.host-ui label.h-drop span { color: var(--muted) }
.discovery.host-ui .h-photo-actions label:not(.c-check) { font-size: 12.5px; color: var(--muted) }
.h-photo { display: flex; flex-direction: column }
.h-photo-body { flex: 1; align-content: start }
.h-form-foot + .h-pager { margin-top: 8px; border-top: 0 }

/* ---------- Pricing ---------- */
.h-money { position: relative; display: block }
.h-money b { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-weight: 400; color: var(--muted); pointer-events: none }
.discovery.host-ui .h-money input { padding-left: 34px }
.h-money.is-pct b { left: auto; right: 16px }
.discovery.host-ui .h-money.is-pct input { padding-left: 16px; padding-right: 36px }
.h-seasons { display: grid; gap: 10px }
.h-season { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr .7fr .7fr auto; gap: 10px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white) }
.discovery.host-ui .h-season input { min-height: 44px; padding: 8px 10px; font-size: 14px }
.h-season-remove { min-height: 44px; padding: 0 6px; font-size: 13px; color: var(--muted) }
.h-season-remove:hover { color: var(--color-error) }
.h-estimate-box { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white) }
.h-est { display: grid; gap: 6px; font-size: 14px }
.h-est div { display: flex; justify-content: space-between; gap: 16px }
.h-est dt { color: var(--muted) }
.h-est dd { font-variant-numeric: tabular-nums; white-space: nowrap }
.h-est .is-total { padding-top: 8px; border-top: 1px solid var(--line); font-weight: 500 }
.h-est .is-total dt { color: var(--ink) }
.h-est .is-revenue { padding-top: 8px; border-top: 1px dashed var(--line-strong) }
.h-extra { display: grid; gap: 8px; padding-block: 4px }

/* ---------- Availability ---------- */
.h-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px }
.h-cal-head strong { font-size: 16px; font-weight: 500 }
.h-cal-head .d-outline { width: 44px; padding: 0; border-radius: 8px }
.h-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; font-size: 12.5px; color: var(--muted) }
.h-legend li { display: inline-flex; align-items: center; gap: 8px }
.h-legend i { width: 18px; height: 14px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--white) }
.h-legend i.is-booked { background: var(--ink); border-color: var(--ink) }
.h-legend i.is-held { border: 1.5px dashed var(--ink) }
.h-legend i.is-blocked { background: repeating-linear-gradient(135deg, var(--stone) 0 3px, var(--white) 3px 6px) }
.h-legend i.is-unavailable { background: var(--stone) }
.h-legend i.is-season { box-shadow: inset 0 -3px 0 var(--color-warning) }
.h-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px }
.h-month h3 { margin-bottom: 10px; font: 500 14px/1.3 var(--sans) }
.h-week, .h-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px }
.h-week span { padding-bottom: 6px; font-size: 11px; color: var(--muted); text-align: center }
.h-day { position: relative; display: grid; align-content: space-between; min-height: 58px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); text-align: left; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; overflow: hidden }
.h-day:hover:not(:disabled) { border-color: var(--ink) }
.h-day-num { font-size: 13px; font-weight: 500 }
.h-day-rate, .h-day-tag { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.h-day-season { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--color-warning); font-size: 0 }
.h-day.is-booked { background: var(--ink); border-color: var(--ink); color: var(--paper) }
.h-day.is-booked .h-day-tag { color: rgba(247, 244, 238, .75) }
.h-day.is-held { border: 1.5px dashed var(--ink) }
.h-day.is-held .h-day-tag { color: var(--ink) }
.h-day.is-blocked { background: repeating-linear-gradient(135deg, var(--sand) 0 4px, var(--white) 4px 8px) }
.h-day.is-blocked .h-day-tag { color: var(--ink) }
.h-day.is-unavailable { background: var(--stone) }
.h-day.is-past { opacity: .4; cursor: default }
.h-day.is-selected { box-shadow: 0 0 0 2px var(--ink); z-index: 1 }
.h-day.is-booked.is-selected { box-shadow: 0 0 0 2px var(--color-warning) }
.h-cal-panel { display: grid; gap: 14px; margin-top: 22px; padding: 18px; border: 1px solid var(--ink); border-radius: var(--radius-lg); background: var(--white) }
.h-cal-sel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px }
.h-cal-sel strong { font-size: 16px; font-weight: 500 }
.h-cal-sel .h-link { margin-left: auto }
.h-cal-actions { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto auto; gap: 10px; align-items: end }
.h-cal-actions .button, .h-cal-actions .d-outline { min-height: 52px; white-space: nowrap }
.h-cal-actions .d-outline { border-radius: var(--radius-md) }
@media (max-width: 900px) {
  .h-season { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  .h-season-name { grid-column: 1 / -1 }
  .h-cal-actions { grid-template-columns: 1fr }
}
@media (max-width: 560px) {
  .h-season { grid-template-columns: 1fr 1fr }
  .h-day { min-height: 50px; padding: 4px }
  .h-day-rate { font-size: 9.5px }
  .h-day-tag { font-size: 9px }
}
.h-season { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.h-season .h-season-name { grid-column: span 2 }
.h-season-remove { justify-self: start }
@media (max-width: 560px) { .h-season { grid-template-columns: 1fr 1fr } }

/* ==========================================================================
   Dashboard operations
   ========================================================================== */
.h-figures-7 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.h-figures-7 div:nth-child(5) { padding-left: 0; border-left: 0 }
.h-figures-7 div:nth-child(n+5) { border-top: 1px solid var(--line) }
.h-actions-list { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); overflow: hidden }
.h-actions-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px }
.h-actions-list li:last-child { border-bottom: 0 }
.h-actions-list li.is-warning { box-shadow: inset 2px 0 0 var(--color-warning) }
.h-actions-list li.is-error { box-shadow: inset 2px 0 0 var(--color-error) }
.h-actions-list strong { font-weight: 500 }
.h-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px }
.h-filters label { flex: 1 1 180px; max-width: 260px }
.discovery.host-ui .h-filters input, .discovery.host-ui .h-filters select { min-height: 44px; padding-block: 8px; font-size: 14px }
.h-status-help { max-width: 30ch; white-space: normal }
.h-table td .h-link { display: inline-block; margin-top: 4px; font-size: 13px }
.h-table.h-click tbody tr { cursor: pointer }
.h-menu { position: relative; display: inline-block; text-align: left }
.h-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; cursor: pointer }
.h-menu summary::-webkit-details-marker { display: none }
.h-menu summary::after { content: ""; width: 10px; height: 10px; background: var(--chev) center / 10px no-repeat }
.h-menu[open] summary { border-color: var(--ink) }
.h-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: grid; min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); box-shadow: 0 16px 40px rgba(36, 35, 31, .12) }
.h-menu-list a, .h-menu-list button { display: flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 6px; font-size: 13.5px; text-align: left; white-space: nowrap }
.h-menu-list a:hover, .h-menu-list button:hover:not(:disabled) { background: var(--sand) }
.h-menu-list button:disabled { color: var(--grey); cursor: not-allowed }
.h-menu-list button + button, .h-menu-list a + button { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px }
.h-back { display: inline-block; margin-bottom: 16px; font-size: 13px; color: var(--muted) }
.h-back:hover { color: var(--ink) }
.h-account { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 20px }
.h-account strong { font-weight: 500 }
.h-account p { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums }
.h-account .h-wide { grid-column: 1 / -1 }
.h-account .d-outline { border-radius: 8px }
.h-cal-name small { margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--muted) }
.h-cal-grid a.is-booked { position: relative; display: block; min-height: 44px; border-bottom: 1px solid var(--line) }
.h-cal-grid .is-hold::after { background: none !important; border: 1.5px dashed var(--ink) }
.h-cal-grid .is-blocked { background: repeating-linear-gradient(135deg, var(--sand) 0 4px, var(--white) 4px 8px) }
.h-cal-legend span.is-hold::before { background: none; border: 1.5px dashed var(--ink) }
.h-cal-legend span.is-blocked::before { background: repeating-linear-gradient(135deg, var(--stone) 0 3px, var(--white) 3px 6px); border: 1px solid var(--line-strong) }
.h-cal-legend span + span { margin-left: 14px }
@media (max-width: 900px) {
  .h-figures-7 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .h-figures-7 div:nth-child(odd) { padding-left: 0; border-left: 0 }
  .h-figures-7 div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line) }
  .h-figures-7 div:nth-child(n+3) { border-top: 1px solid var(--line) }
  .h-filters label { max-width: none }
  .h-account { grid-template-columns: 1fr }
}
@media (max-width: 520px) {
  .h-figures-7 { grid-template-columns: 1fr }
  .h-figures-7 div:nth-child(even) { padding-left: 0; border-left: 0 }
  .h-figures-7 div + div { border-top: 1px solid var(--line) }
  .h-actions-list li { flex-direction: column; align-items: flex-start; gap: 6px }
}
.discovery.host-ui textarea { padding: 12px 16px; border: 1px solid var(--field-line); border-radius: var(--radius-md); background: var(--white); color: var(--ink); transition: border-color .3s, box-shadow .4s var(--ease) } .discovery.host-ui textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(36, 35, 31, .07) }
@media (min-width: 901px) {
  .h-figures-7 div:nth-child(n+5) { border-top: 0 }
  .h-figures-7 div:nth-child(-n+4) { border-bottom: 1px solid var(--line) }
}
@media (min-width: 901px) { .h-table-wrap { overflow: visible } .h-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-lg) } .h-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-lg) } }
.h-actions-list .h-link { white-space: nowrap; flex: none }
.h-tabs { overflow-x: auto; scrollbar-width: none } .h-tabs::-webkit-scrollbar { display: none } .h-tabs a { flex: none; white-space: nowrap }

/* ==========================================================================
   QA polish: errors, loading, small screens, contrast, touch
   ========================================================================== */
.h-field-error { margin-top: -12px; color: var(--color-error); font-size: 13px; line-height: 1.45 }
.h-field-error::before { content: "! "; font-weight: 600 }
.discovery.host-ui [aria-invalid=true] { border-color: var(--color-error) }
fieldset:has(+ .h-field-error) .h-option { border-color: rgba(139, 52, 52, .45) }

/* Skeletons */
@keyframes h-shimmer { from { background-position: -240px 0 } to { background-position: 240px 0 } }
.h-skel { border-radius: 8px; background: linear-gradient(90deg, var(--stone) 0, var(--sand) 120px, var(--stone) 240px) 0 0 / 480px 100%; animation: h-shimmer 1.2s linear infinite }
.h-skel-title { width: 280px; height: 34px; margin-bottom: 12px }
.h-skel-line { width: 160px; height: 14px; margin-bottom: 32px }
.h-skel-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px }
.h-skel-box { height: 84px }
.h-skel-table { height: 260px }
@media (prefers-reduced-motion: reduce) { .h-skel { animation: none } }

/* Contrast: secondary text uses the darker muted tone, not the light grey. */
.host-ui .c-optional, .host-ui label .c-optional, .h-count, .h-progress li, .h-progress li.is-done, .h-week span { color: var(--muted) }
.h-sections i { border-color: var(--muted) }

/* Touch targets */
.h-menu summary { min-height: 44px }
.h-tabs a { min-height: 44px; display: inline-flex; align-items: center }
@media (pointer: coarse) {
  .h-photo-actions button, .h-photo-actions label { min-height: 44px }
  .h-photo-actions .h-move button { width: 44px; height: 44px }
  .h-chip button { width: 36px; height: 36px }
  .h-side-links a, .h-side-links button { min-height: 44px; display: inline-flex; align-items: center }
}

/* Tables become stacked cards on narrow screens instead of scrolling sideways. */
@media (max-width: 760px) {
  .h-table-wrap { overflow: visible; border: 0; background: none }
  .h-table, .h-table tbody, .h-table tr, .h-table td { display: block; width: 100% }
  .h-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
  .h-table tbody { display: grid; gap: 12px }
  .h-table tr { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white) }
  .h-table td { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 6px 0; border: 0; text-align: left }
  .h-table td::before { content: attr(data-label); font-size: 12px; color: var(--muted) }
  .h-table td.num { text-align: left }
  .h-table td:first-child { display: block; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line) }
  .h-table td:first-child::before { display: none }
  .h-table td:last-child:has(.h-menu) { display: flex; justify-content: flex-end; padding-top: 10px }
  .h-table td:last-child:has(.h-menu)::before { display: none }
  .h-table td[data-label=""]::before { display: none }
  .h-table td[data-label=""] { display: block }
  .h-table .h-thumb { min-width: 0 }
  .h-menu-list { right: 0; left: auto }
  .h-skel-row { grid-template-columns: 1fr 1fr }
}
@media (max-width: 760px) {
  .h-table td > * { grid-column: 2; justify-self: start }
  .h-table td::before { grid-row: span 4 }
  .h-table td:first-child > * { grid-column: auto }
  .h-table td .h-status-help { max-width: none }
}
@media (max-width: 520px) {
  .h-figures-7 { grid-template-columns: 1fr 1fr }
  .h-figures-7 div, .h-figures-7 div + div { padding: 14px 12px 14px 0; border-left: 0; border-top: 0 }
  .h-figures-7 div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line) }
  .h-figures-7 div:nth-child(n+3) { border-top: 1px solid var(--line) }
  .h-figures-7 dd { font-size: 19px }
  .h-figures-7 div:last-child:nth-child(odd) { grid-column: 1 / -1 }
}
.h-cell { display: contents }
@media (max-width: 760px) {
  .h-table td::before { grid-row: auto }
  .h-table td > .h-cell { display: grid; gap: 3px; justify-items: start; min-width: 0 }
  .h-table td:first-child > .h-cell { display: block }
  .h-table td > * { grid-column: auto }
}

/* WCAG 1.4.11: every control edge at 3:1 or better. */
.h-file-button, .h-menu summary, .h-menu-button, .h-chip, .h-filters input, .h-filters select { border-color: var(--field-border) }
.h-file { border-color: var(--field-border) }
.h-sections a[aria-current] { box-shadow: inset 0 0 0 1px var(--field-border) }
.h-topbar, .h-editor-bar { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none }
.h-topbar { background: var(--white) }

/* Touch targets: standalone text links get at least 44px of height. */
.h-topbar .h-link, .h-flow-bar .h-link, .d-footer a:not(.d-word) { display: inline-flex; align-items: center; min-height: 44px }
/* Scroll containers must contain their absolutely positioned children
   (screen-reader labels), or those widen the page on phones. */
.h-table-wrap, .h-cal, .h-tabs { position: relative }
/* Text links in tables, the calendar and cards: at least 24px tall to tap. */
.h-table a, .h-ref, .h-link, .h-cal a, .h-block-head a, .h-pager a { display: inline-flex; align-items: center; min-height: 24px }
.h-cal-legend { flex-wrap: wrap; align-items: center; row-gap: 8px }
.h-cal-legend span { white-space: nowrap }
.h-cal-legend span + span { margin-left: 0 }
.h-cal-legend .h-cal-help { white-space: normal }
.h-cal-legend .h-cal-help::before { display: none }
@media (max-width: 600px) {
  /* A narrower name column so more days fit on a phone. */
  .h-cal-grid { grid-template-columns: 128px repeat(var(--days), 34px); min-width: max-content }
  .h-cal-grid .h-cal-name { padding: 6px 12px; font-size: 13px; line-height: 1.25 }
  .h-cal-name small { display: block; margin: 2px 0 0 }
  .h-cal-legend { gap: 8px 16px }
  .h-cal-legend .h-cal-help { flex-basis: 100% }
}
@media (max-width: 520px) {
  /* "Step N of 5" sits right below, so the bar alone is enough here. */
  .h-progress .h-progress-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
  .h-progress li { position: relative }
  .h-progress a { min-width: 100%; min-height: 32px }
}
