/* Hallmark · shape: app screen + landing · genre: modern-minimal · theme: custom (inherits the nørdix Educa reference the owner supplied)
 * idea: "the nearest person who knows it": every screen leads with distance, the hourly price and the next free hour · vibe: "trusted, electric blue, startup, close to home"
 * paper: oklch(98.4% 0.006 255) cool grey · accent: oklch(53% 0.235 263) electric blue on navy oklch(25.5% 0.068 257) · display: Montserrat (brand) · body: Montserrat
 * hero: search-first, the search card on a deep navy-to-blue field beside a live stack of real nearby tutor cards · nav: top bar, bottom tab bar under 48rem · signature: the tutor card (distance, price per hour, next free hour, save) · states: loading, empty, error, full
 * axes: light/grotesk-sans/cool · posture: committed, owner's brand: blue fills primary actions, the hero and dashboard figures · contrast: pass · v2.0.0 · also applied: emil-design-eng (press scale 0.97, ease-out under 220ms, no animation on keyboard routes), impeccable craft floor, taste house rules where Hallmark allows */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V5 · weakest: S, the owner asked for a startup look that many marketplaces share; the tutor card leads with distance and the next free hour, which no academy site shows */
/* Hallmark · waive 38iii · once, in the hero head · the owner's reference image sets "cerca de ti" in electric blue */
/* Hallmark · dismissed F4 · one filled primary recipe; selected segments and pills are states, not buttons */
/* Hallmark · dismissed F7 · cards share one recipe by the owner's reference */
/* Hallmark · dismissed F24 · the menu keeps its hairline so it reads on white */
/* note: cards, soft shadows and the blue gradient hero come from the owner's reference; filters live in memory because the host only passes a plain #name */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- base additions ---------- */
.sprite { position: absolute; }
.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-lg { width: 32px; height: 32px; }
.i-star { fill: var(--color-star); stroke: var(--color-star); width: 16px; height: 16px; }
body { font-size: 15.5px; }
h1, h2, h3 { letter-spacing: var(--tracking-display); line-height: 1.12; color: var(--color-ink); }
main { min-height: 70vh; outline: none; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-sm); background: var(--color-ink); color: var(--color-surface); }
.skip:focus-visible { top: var(--space-md); }
.muted { color: var(--color-muted); }
.h3 { font-size: var(--text-lg); font-weight: 700; }
.small { font-size: var(--text-sm); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 46px; padding: 0 var(--space-lg); border: 1px solid var(--color-rule-strong); border-radius: 12px; background: var(--color-surface); color: var(--color-ink); font: 600 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), transform 140ms var(--ease-out); }
.btn:hover { border-color: var(--color-accent); color: var(--color-accent-2); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.8; }
.btn--primary { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-accent-ink); box-shadow: var(--shadow-primary); }
.btn--primary:hover { background: var(--color-accent-2); border-color: var(--color-accent-2); color: var(--color-accent-ink); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--color-paper-2); border-color: transparent; }
.btn--light { border-color: var(--color-white-35); background: transparent; color: var(--color-navy-ink); }
.btn--light:hover { background: var(--color-white-10); border-color: var(--color-navy-ink); color: var(--color-navy-ink); }
.btn--danger { color: var(--color-error); }
.btn--danger:hover { border-color: var(--color-error); color: var(--color-error); }
.btn--sm { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); border-radius: 10px; }
.btn--block { width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--color-rule); border-radius: 12px; background: var(--color-surface); color: var(--color-ink-2); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform 140ms var(--ease-out); }
.iconbtn:hover { background: var(--color-paper-2); color: var(--color-accent); }
.iconbtn:active { transform: scale(0.94); }
.iconbtn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.iconbtn:disabled { opacity: 0.5; cursor: not-allowed; }
.fav[aria-pressed="true"] { color: var(--color-error); border-color: var(--color-error-soft); background: var(--color-error-soft); }
.fav[aria-pressed="true"] .i { fill: currentColor; }
.link { display: inline-flex; align-items: center; gap: var(--space-2xs); color: var(--color-accent); font-weight: 600; text-decoration: none; }
[data-abody] { display: grid; gap: var(--space-lg); }
.link:hover { text-decoration: underline; }
.link:active { color: var(--color-accent-2); }
.link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }

.field { display: grid; gap: var(--space-2xs); }
.field > span, .field > label, legend { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 0 var(--space-md); border: 1px solid var(--color-rule-strong); border-radius: 12px; background: var(--color-surface); color: var(--color-ink); transition: border-color var(--dur-short) var(--ease-out); }
.textarea { padding-block: var(--space-sm); min-height: 110px; resize: vertical; }
.select { appearance: none; padding-right: var(--space-2xl); background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--color-muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-focus-ring); }
[aria-invalid="true"] { border-color: var(--color-error) !important; }
.input:disabled, .select:disabled { opacity: 0.55; cursor: not-allowed; }
.check { display: flex; gap: var(--space-xs); align-items: flex-start; min-height: 32px; font-size: var(--text-sm); line-height: 1.45; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--color-accent); flex-shrink: 0; }
.check a { color: var(--color-accent); font-weight: 600; }
.help { min-height: 1lh; font-size: var(--text-sm); color: var(--color-error); }
.seg { display: inline-flex; padding: var(--space-2xs); gap: var(--space-2xs); border-radius: 12px; background: var(--color-paper-2); }
.seg button { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 38px; padding: 0 var(--space-md); border: 0; border-radius: 9px; background: transparent; color: var(--color-ink-2); font-weight: 600; font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--color-surface); color: var(--color-accent); box-shadow: var(--shadow-card); }
.seg button:hover { color: var(--color-ink); }
.seg button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; padding: 0 var(--space-md); border: 1px solid var(--color-rule-strong); border-radius: 10px; background: var(--color-surface); font-size: var(--text-sm); font-weight: 600; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.choice input:checked + span { border-color: var(--color-accent); background: var(--color-sky); color: var(--color-sky-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.choice input:disabled + span { background: var(--color-paper-2); color: var(--color-muted); border-style: dashed; text-decoration: line-through; cursor: not-allowed; }
.choice:has(input:disabled):hover span { border-color: var(--color-rule-strong); }
.choice:hover span { border-color: var(--color-accent); }

/* ---------- small pieces ---------- */
.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; font-weight: 700; font-size: var(--text-sm); color: var(--color-surface); background: var(--gradient-deep); }
.avatar[data-tone="1"] { background: var(--gradient-avatar-1); }
.avatar[data-tone="2"] { background: var(--gradient-avatar-2); }
.avatar[data-tone="3"] { background: var(--gradient-avatar-3); }
.avatar--lg { width: 88px; height: 88px; border-radius: 22px; font-size: var(--text-xl); }
.avatar--xl { width: 132px; height: 132px; border-radius: 28px; font-size: var(--text-3xl); }
.rating { display: inline-flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-sm); }
.rating b { font-weight: 700; }
.rating span { color: var(--color-muted); }
.verified { display: inline-flex; color: var(--color-accent); vertical-align: -3px; }
.verified .i { width: 20px; height: 20px; fill: var(--color-accent); stroke: var(--color-surface); stroke-width: 1.6; }
.demo { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-xs); border-radius: 6px; background: var(--color-warn-soft); color: var(--color-warn); font: 600 var(--text-xs)/1 var(--font-body); vertical-align: 3px; }
.chip { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 30px; padding: 0 var(--space-sm); border-radius: var(--radius-pill); background: var(--color-sky); color: var(--color-sky-ink); font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.chip .i { width: 14px; height: 14px; }
.chip--experiencia { background: var(--color-paper-2); color: var(--color-ink-2); }
.chip--certificacion { background: var(--color-success-soft); color: var(--color-success); }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 var(--space-sm); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600; white-space: nowrap; background: var(--color-paper-2); color: var(--color-ink-2); }
.pill--confirmada, .pill--completada, .pill--resuelto { background: var(--color-success-soft); color: var(--color-success); }
.pill--pendiente, .pill--pago_pendiente, .pill--abierto { background: var(--color-warn-soft); color: var(--color-warn); }
.pill--rechazada, .pill--cancelada, .pill--disputa, .pill--suspendido { background: var(--color-error-soft); color: var(--color-error); }
.pill--aceptada, .pill--en_curso { background: var(--color-sky); color: var(--color-sky-ink); }
.price { display: grid; justify-items: end; line-height: 1.1; }
.price b { font: 800 var(--text-2xl)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price span { font-size: var(--text-sm); color: var(--color-muted); }
.express { display: inline-flex; align-items: center; gap: var(--space-2xs); margin-left: var(--space-sm); padding: 0 var(--space-xs); border-radius: 6px; background: var(--color-sky); color: var(--color-sky-ink); font-weight: 600; }
.express .i { width: 14px; height: 14px; }
.sep { display: inline-block; width: 4px; height: 4px; margin-inline: var(--space-xs); border-radius: 50%; background: var(--color-rule-strong); vertical-align: middle; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-surface); border-bottom: 1px solid var(--color-rule); }
.top__in { display: flex; align-items: center; gap: var(--space-xl); min-height: 72px; }
.logo { display: inline-grid; line-height: 0.92; text-decoration: none; color: var(--color-navy); }
.logo__n { font: 800 1.55rem/0.95 var(--font-display); letter-spacing: -0.035em; }
.logo__e { font: 700 1.12rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--color-accent); margin-left: 1px; }
.logo:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: 6px; }
.logo--light { color: var(--color-navy-ink); }
.logo--light .logo__e { color: var(--color-logo-light); }
.nav { display: flex; gap: var(--space-2xs); flex: 1; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-sm); border-radius: 10px; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); text-decoration: none; transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.nav a:hover { color: var(--color-accent); background: var(--color-paper-2); }
.nav a[aria-current="page"] { color: var(--color-accent); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--space-sm); right: var(--space-sm); bottom: -16px; height: 3px; border-radius: 3px; background: var(--color-accent); }
.top__actions { display: flex; align-items: center; gap: var(--space-xs); }
.top__menu { display: none; }
.bell { position: relative; }
.bell b { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 var(--space-2xs); border-radius: 9px; background: var(--color-error); color: var(--color-surface); font-size: 11px; line-height: 18px; }
.usermenu { position: relative; }
.usermenu > button { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-xs) 0 var(--space-2xs); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-surface); cursor: pointer; font-weight: 600; font-size: var(--text-sm); }
.usermenu > button:hover { border-color: var(--color-accent); }
.usermenu > button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.usermenu .avatar { width: 36px; height: 36px; font-size: var(--text-xs); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: var(--z-dropdown); min-width: 240px; padding: var(--space-xs); border: 1px solid var(--color-rule); border-radius: 14px; background: var(--color-surface); box-shadow: var(--shadow-lift); transform-origin: top right; animation: pop var(--dur-short) var(--ease-out); }
.menu a, .menu button { display: flex; align-items: center; gap: var(--space-sm); width: 100%; min-height: 42px; padding: 0 var(--space-sm); border: 0; border-radius: 9px; background: transparent; color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--color-paper-2); }
.menu a:focus-visible, .menu button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.menu hr { border: 0; border-top: 1px solid var(--color-rule); margin: var(--space-2xs) 0; }
.menu__label { padding: var(--space-xs) var(--space-sm) var(--space-2xs); font-size: var(--text-xs); color: var(--color-muted); }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.demo-bar { padding: var(--space-2xs) var(--gutter); background: var(--color-warn-soft); color: var(--color-warn); font-size: var(--text-xs); font-weight: 600; text-align: center; }
.drawer { position: fixed; inset: 72px 0 auto 0; z-index: var(--z-sticky); padding: var(--space-md) var(--gutter) var(--space-lg); background: var(--color-surface); border-bottom: 1px solid var(--color-rule); box-shadow: var(--shadow-lift); }
.drawer nav { display: grid; }
.drawer a { min-height: 48px; display: flex; align-items: center; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--color-rule); }

/* ---------- landing ---------- */
.hero { position: relative; padding-block: var(--space-2xl) var(--space-3xl); background: var(--gradient-soft); overflow: clip; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: center; }
.hero h1 { font-size: var(--text-display); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; color: var(--color-navy); max-width: 13ch; }
.hero h1 span { color: var(--color-accent); }
.hero .lead { margin-top: var(--space-lg); font-size: var(--text-lead); color: var(--color-ink-2); max-width: 44ch; }
.searchbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--space-2xs); margin-top: var(--space-xl); padding: var(--space-xs); border: 1px solid var(--color-rule); border-radius: 18px; background: var(--color-surface); box-shadow: var(--shadow-lift); }
.searchbar label { display: grid; gap: 0; padding: var(--space-2xs) var(--space-sm); border-radius: 12px; }
.searchbar label:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--color-rule); border-radius: 12px 12px 0 0; padding-block: var(--space-xs); }
.searchbar label:first-child input { font-size: var(--text-lg); }
.searchbar label:focus-within { background: var(--color-paper-2); }
.searchbar label > span { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.searchbar input, .searchbar select { width: 100%; min-height: 30px; padding: 0; border: 0; background: transparent; color: var(--color-ink); font-weight: 600; outline: none; }
.searchbar .btn { min-height: 56px; align-self: stretch; }
.hero__alt { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.hero__visual { position: relative; min-height: 520px; border-radius: var(--radius-lg); background: var(--gradient-deep); padding: var(--space-xl); display: grid; align-content: center; gap: var(--space-md); color: var(--color-navy-ink); isolation: isolate; }
.hero__visual { box-shadow: var(--shadow-hero); }
.hero__visual > p { font-size: var(--text-sm); color: var(--color-navy-muted); }
.hero__visual .tcard { animation: rise 600ms var(--ease-out) both; }
.hero__visual .tcard:nth-of-type(2) { margin-left: var(--space-xl); animation-delay: 90ms; }
.hero__visual .tcard:nth-of-type(3) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero__float { position: absolute; right: var(--space-lg); top: var(--space-lg); display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: var(--color-white-12); font-size: var(--text-sm); font-weight: 600; }
.hero__float .i { color: var(--color-gold); }
.hero__photo { position: relative; margin: 0; padding: 0 0 var(--space-xl) var(--space-xl); }
.hero__frame { aspect-ratio: 770 / 704; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-hero); background: var(--gradient-deep); }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero__card { position: absolute; left: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; min-width: 300px; padding: var(--space-sm) var(--space-md) var(--space-sm) var(--space-sm); border-radius: 18px; background: var(--color-surface); color: var(--color-ink); text-decoration: none; box-shadow: var(--shadow-lift); animation: rise 600ms var(--ease-out) 120ms both; transition: transform var(--dur-short) var(--ease-out); }
.hero__card:hover { transform: translateY(-2px); }
.hero__card:active { transform: scale(0.98); }
.hero__card:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.hero__card b { display: block; font-weight: 700; }
.hero__card small { display: block; font-size: var(--text-sm); color: var(--color-muted); }
.hero__price { font: 800 var(--text-xl)/1 var(--font-display); color: var(--color-navy); white-space: nowrap; }
.hero__price small { display: inline; font: 500 var(--text-xs)/1 var(--font-body); }
.hero__photo .hero__float { top: var(--space-lg); right: var(--space-lg); z-index: 2; background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-card); }
.hero__photo .hero__float .i { color: var(--color-accent); }
.avatar--photo { padding: 0; overflow: hidden; background: var(--color-paper-3); }
.avatar--photo img { width: 100%; height: 100%; object-fit: cover; }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
.person { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-md); align-items: start; padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-surface); border: 1px solid var(--color-rule); }
.person__photo { display: block; aspect-ratio: 1; border-radius: 22px; overflow: hidden; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__photo { transition: box-shadow var(--dur-short) var(--ease-out); }
.person__photo:hover { box-shadow: 0 0 0 3px var(--color-accent); }
.person__photo:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.person__quote { font: 600 var(--text-md)/1.5 var(--font-body); color: var(--color-navy); }
.person__body { display: grid; gap: var(--space-sm); }
.person__who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); font-size: var(--text-sm); }
.person__who span:last-child { flex-basis: 100%; color: var(--color-muted); }
.teach .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.faces { display: inline-flex; }
.faces .avatar { width: 44px; height: 44px; border: 3px solid var(--color-navy); margin-left: calc(-1 * var(--space-sm)); }
.faces .avatar:first-child { margin-left: 0; }
.faces__t { font-size: var(--text-sm); color: var(--color-navy-muted); max-width: 22ch; }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-xl); }
.facts li { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.facts .i { color: var(--color-accent); }
.facts { list-style: none; padding: 0; }

.sec { padding-top: var(--section-gap); }
.sec__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-md) var(--space-xl); margin-bottom: var(--space-xl); }
.sec__head h2 { font-size: var(--text-section); font-weight: 800; color: var(--color-navy); max-width: 22ch; }
.sec__head p { color: var(--color-muted); max-width: 46ch; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: var(--space-md); }
.cat { display: grid; gap: var(--space-sm); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); text-decoration: none; transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.cat:hover { border-color: var(--color-accent); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.cat:active { transform: scale(0.98); }
.cat:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.cat__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--color-sky); color: var(--color-accent); }
.cat b { font-weight: 700; }
.cat span:last-child { font-size: var(--text-sm); color: var(--color-muted); }

.grid-t { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.grid-t .tcard:not(.tcard--compact) { grid-template-columns: auto minmax(0, 1fr); }
.grid-t .tcard:not(.tcard--compact) .tcard__side { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; padding-top: var(--space-sm); border-top: 1px solid var(--color-rule); }
.grid-t .tcard .price { justify-items: start; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: center; }
.teach { border-radius: var(--radius-lg); background: var(--gradient-deep); color: var(--color-navy-ink); padding: var(--space-2xl); }
.teach h2 { color: var(--color-navy-ink); font-size: var(--text-section); font-weight: 800; }
.teach p { color: var(--color-navy-muted); margin-top: var(--space-md); max-width: 46ch; }
.teach .actions { margin-top: var(--space-xl); }
.calc { padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-lift); display: grid; gap: var(--space-md); }
.calc h3 { color: var(--color-ink); font-size: var(--text-lg); }
.calc__out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.calc__out div { display: grid; gap: var(--space-2xs); }
.calc__out span { font-size: var(--text-xs); color: var(--color-muted); font-weight: 600; }
.calc__out b { font: 800 var(--text-xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.calc__out div:last-child b { color: var(--color-accent); }
.calc input[type="range"] { width: 100%; accent-color: var(--color-accent); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); counter-reset: s; }
.step { position: relative; padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-surface); border: 1px solid var(--color-rule); }
.step__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--color-accent); color: var(--color-accent-ink); margin-bottom: var(--space-md); }
.step b { display: block; font-weight: 700; margin-bottom: var(--space-2xs); }
.step p { font-size: var(--text-sm); color: var(--color-muted); }

.ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-md); }
.idea { display: grid; align-content: start; gap: var(--space-xs); padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-surface); border: 1px solid var(--color-rule); text-decoration: none; transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.idea:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.idea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.idea .i { color: var(--color-accent); width: 24px; height: 24px; }
.idea b { font-weight: 700; }
.idea span { font-size: var(--text-sm); color: var(--color-muted); }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: var(--space-md); }
.gal { position: relative; margin: 0; border-radius: var(--radius-card); overflow: hidden; }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.gal figcaption { position: absolute; left: var(--space-sm); bottom: var(--space-sm); padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-navy); font-size: var(--text-sm); font-weight: 600; box-shadow: var(--shadow-card); }
.gal--big { grid-column: span 2; grid-row: span 2; }
.gal--tall { grid-row: span 2; }
.gal--wide { grid-column: span 2; }
.gal__note { margin-top: var(--space-sm); }
.trust-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-lg); align-items: stretch; }
.trust__photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; min-height: 420px; }
.trust__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.trust { align-content: center; }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-lg) var(--space-xl); padding: var(--space-xl); border-radius: var(--radius-lg); background: var(--color-sky); }
.trust div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2xs) var(--space-sm); }
.trust .i { grid-row: span 2; color: var(--color-accent); width: 24px; height: 24px; margin-top: var(--space-3xs); }
.trust b { font-weight: 700; }
.trust span { font-size: var(--text-sm); color: var(--color-ink-2); }

/* ---------- tutor card (signature) ---------- */
.tcard { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-md) var(--space-lg); align-items: center; padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-card); transition: box-shadow var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.tcard:hover { border-color: var(--color-accent-a45); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.tcard__link { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.tcard__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tcard__body, .tcard__side { position: relative; z-index: 1; pointer-events: none; }
.tcard__side a, .tcard__side button { pointer-events: auto; }
.tcard__body { display: grid; gap: var(--space-2xs); }
.tcard__name { font: 700 var(--text-lg)/1.2 var(--font-display); letter-spacing: -0.015em; display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2xs); }
.tcard__head { color: var(--color-accent-2); font-weight: 600; font-size: var(--text-sm); }
.tcard__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.tcard__meta .i { width: 16px; height: 16px; color: var(--color-muted); }
.tcard__type { font-size: var(--text-xs); color: var(--color-muted); font-weight: 600; }
.tcard__side { display: grid; justify-items: end; gap: var(--space-sm); }
.tcard__actions { display: flex; gap: var(--space-xs); }
.tcard--compact { grid-template-columns: auto minmax(0, 1fr) auto; }
.tcard--compact .avatar--lg { width: 56px; height: 56px; border-radius: 16px; font-size: var(--text-md); }
.tcard--compact .tcard__actions .btn { display: none; }

/* ---------- search ---------- */
.page { padding-block: var(--space-xl) var(--space-3xl); }
.page__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-md); margin-bottom: var(--space-lg); }
.page__head h1 { font-size: var(--text-3xl); font-weight: 800; color: var(--color-navy); }
.search-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-xs); margin-bottom: var(--space-lg); }
.search-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.filters { position: sticky; top: 120px; display: grid; gap: var(--space-lg); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); max-height: calc(100vh - 140px); overflow: auto; }
.filters h2 { font-size: var(--text-lg); font-weight: 700; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-xs); }
.filters .row1 { display: grid; gap: var(--space-xs); }
.filters .row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xs); }
.results__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.results__bar h2 { font-size: var(--text-xl); font-weight: 700; }
.results { display: grid; gap: var(--space-md); }
.more { display: flex; justify-content: center; margin-top: var(--space-lg); }
.skel { height: 136px; border-radius: var(--radius-card); background: linear-gradient(90deg, var(--color-paper-2), var(--color-paper-3), var(--color-paper-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: grid; justify-items: center; gap: var(--space-xs); padding: var(--space-2xl) var(--space-lg); border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-card); text-align: center; color: var(--color-muted); }
.empty .i { color: var(--color-accent); }
.empty__t { font-weight: 700; color: var(--color-ink); }
.empty .btn { margin-top: var(--space-sm); }
.filters-toggle { display: none; }

.mapbox { position: relative; border-radius: var(--radius-card); border: 1px solid var(--color-rule); background: var(--color-sky); overflow: hidden; aspect-ratio: 4 / 3.2; }
.mapbox svg.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .zone { fill: var(--color-white-55); stroke: var(--color-accent-a18); }
.map .road { fill: none; stroke: var(--color-white-90); stroke-width: 1.4; }
.map .lbl { font: 600 2.6px/1 var(--font-body); fill: var(--color-muted); }
.map .radius { fill: var(--color-accent-a08); stroke: var(--color-accent-a40); stroke-dasharray: 1 1; stroke-width: 0.3; }
.pinbtn { position: absolute; transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 32px; padding: 0 var(--space-sm); border: 2px solid var(--color-surface); border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font: 700 var(--text-xs)/1 var(--font-body); box-shadow: var(--shadow-lift); cursor: pointer; transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.pinbtn:hover, .pinbtn[aria-pressed="true"] { background: var(--color-navy); transform: translate(-50%, -100%) scale(1.06); }
.pinbtn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.map-note { position: absolute; left: var(--space-sm); bottom: var(--space-sm); padding: var(--space-2xs) var(--space-sm); border-radius: 8px; background: var(--color-white-90); font-size: var(--text-xs); color: var(--color-ink-2); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-md); align-items: start; }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-xl); align-items: start; }
.pcard { padding: var(--space-xl); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.phead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-lg); align-items: center; }
.phead h1 { font-size: var(--text-3xl); font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.phead p { color: var(--color-ink-2); }
.phead .chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-sm); }
.tabs { display: flex; gap: var(--space-2xs); margin-top: var(--space-xl); border-bottom: 1px solid var(--color-rule); overflow-x: auto; }
.tabs button { position: relative; min-height: 46px; padding: 0 var(--space-md); border: 0; background: transparent; color: var(--color-muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--color-accent); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-sm); right: var(--space-sm); bottom: -1px; height: 3px; border-radius: 3px; background: var(--color-accent); }
.tabs button:hover { color: var(--color-ink); }
.tabs button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; border-radius: 8px; }
.tabpanel { padding-top: var(--space-lg); display: grid; gap: var(--space-lg); }
.dl { display: grid; gap: var(--space-sm); margin: 0; }
.dl div { display: grid; grid-template-columns: 22px 140px minmax(0, 1fr); gap: var(--space-sm); align-items: start; }
.dl .i { color: var(--color-accent); }
.dl dt { font-weight: 700; }
.dl dd { margin: 0; color: var(--color-ink-2); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-xs); }
.week div { display: grid; align-content: start; gap: var(--space-2xs); padding: var(--space-sm) var(--space-xs); border-radius: 12px; background: var(--color-paper-2); text-align: center; min-height: 120px; }
.week b { font-size: var(--text-sm); }
.week span { padding: var(--space-2xs); border-radius: 8px; background: var(--color-surface); font-size: var(--text-xs); font-weight: 600; color: var(--color-sky-ink); }
.week em { font-style: normal; font-size: var(--text-xs); color: var(--color-muted); }
.review { display: grid; gap: var(--space-xs); padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-rule); }
.review:last-child { border-bottom: 0; }
.review header { display: flex; justify-content: space-between; gap: var(--space-sm); font-size: var(--text-sm); }
.side-book { position: sticky; top: 120px; display: grid; gap: var(--space-md); }
.side-book .price { justify-items: start; }
.rates { display: grid; gap: var(--space-xs); margin: 0; }
.rates div { display: flex; justify-content: space-between; gap: var(--space-sm); padding-block: var(--space-xs); border-bottom: 1px solid var(--color-rule); font-size: var(--text-sm); }
.rates dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.minimap { position: relative; height: 170px; border-radius: 14px; overflow: hidden; background: var(--color-sky); }
.minimap .map { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- booking & onboarding ---------- */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-xl); align-items: start; }
.form { display: grid; gap: var(--space-lg); }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-xs); }
.days .choice span { flex-direction: column; justify-content: center; width: 100%; min-height: 64px; gap: 0; padding: 0; }
.days .choice small { font-weight: 500; color: var(--color-muted); }
.summary { position: sticky; top: 120px; display: grid; gap: var(--space-md); }
.summary .rates .total { border-bottom: 0; padding-top: var(--space-sm); font-size: var(--text-md); }
.summary .rates .total dd { font-size: var(--text-xl); color: var(--color-navy); }
.note { display: flex; gap: var(--space-sm); padding: var(--space-md); border-radius: 12px; background: var(--color-sky); color: var(--color-ink-2); font-size: var(--text-sm); }
.note .i { color: var(--color-accent); margin-top: 1px; }
.note--warn { background: var(--color-warn-soft); color: var(--color-ink-2); }
.note--warn .i { color: var(--color-warn); }
.progress { display: grid; gap: var(--space-xs); margin-bottom: var(--space-xl); }
.progress__bar { height: 8px; border-radius: 8px; background: var(--color-paper-3); overflow: hidden; }
.progress__bar span { display: block; height: 100%; border-radius: 8px; background: var(--color-accent); transform-origin: left; transition: transform var(--dur-long) var(--ease-out); }
.progress__meta { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--color-muted); font-weight: 600; }
.wizard { max-width: 760px; margin-inline: auto; }
.wizard h1 { font-size: var(--text-3xl); font-weight: 800; color: var(--color-navy); }
.wizard__nav { display: flex; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-xl); }
.slide { animation: slidein var(--dur-long) var(--ease-out); }
@keyframes slidein { from { opacity: 0; transform: translateX(12px); } }
[data-sbody] { display: grid; gap: var(--space-md); }
.preview { display: grid; gap: var(--space-md); }

/* ---------- dashboards ---------- */
.dash { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 96px); }
.side { position: sticky; top: 96px; align-self: start; display: grid; align-content: start; gap: var(--space-2xs); padding: var(--space-lg) var(--space-md); height: calc(100vh - 96px); background: var(--color-navy); color: var(--color-navy-ink); overflow: auto; }
.side h2 { padding: 0 var(--space-sm) var(--space-sm); font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--color-navy-muted); letter-spacing: 0; }
.side a, .side button { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; padding: 0 var(--space-sm); border: 0; border-radius: 10px; background: transparent; color: var(--color-navy-ink); font: 500 var(--text-sm)/1 var(--font-body); text-decoration: none; cursor: pointer; text-align: left; transition: background-color var(--dur-short) var(--ease-out); }
.side a:hover, .side button:hover { background: var(--color-white-08); }
.side a[aria-current="page"] { background: var(--color-accent); color: var(--color-accent-ink); }
.side a:focus-visible, .side button:focus-visible { outline: 2px solid var(--color-navy-ink); outline-offset: -2px; }
.side .i { width: 18px; height: 18px; }
.dash__main { padding: var(--space-xl) var(--gutter) var(--space-3xl); display: grid; gap: var(--space-xl); align-content: start; min-width: 0; }
.dash__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-md); }
.dash__head h1 { font-size: var(--text-3xl); font-weight: 800; color: var(--color-navy); }
.dash__head p { color: var(--color-muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--space-md); }
.stat { display: grid; gap: var(--space-2xs); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.stat span { font-size: var(--text-sm); color: var(--color-muted); font-weight: 600; }
.stat b { font: 800 var(--text-3xl)/1.05 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--color-navy); }
.stat small { font-size: var(--text-xs); color: var(--color-muted); }
.panel { padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); display: grid; gap: var(--space-md); align-content: start; min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); }
.panel__head h2 { font-size: var(--text-lg); font-weight: 700; }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
.next { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; padding: var(--space-lg); border-radius: var(--radius-card); background: var(--gradient-deep); color: var(--color-navy-ink); }
.next h2 { color: var(--color-navy-ink); font-size: var(--text-lg); }
.next p { color: var(--color-navy-muted); font-size: var(--text-sm); }
.list { display: grid; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm) var(--space-md); align-items: center; padding-block: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
.li:last-child { border-bottom: 0; }
.li b { font-weight: 600; }
.li p { font-size: var(--text-sm); color: var(--color-muted); }
.li__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-xs); }
.li .err { grid-column: 1 / -1; color: var(--color-error); font-size: var(--text-sm); font-weight: 600; }
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.t th { padding: var(--space-sm); text-align: left; font-weight: 600; color: var(--color-muted); border-bottom: 1px solid var(--color-rule-strong); white-space: nowrap; }
.t td { padding: var(--space-sm); border-bottom: 1px solid var(--color-rule); vertical-align: middle; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tr:hover td { background: var(--color-paper); }
.chart { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); align-items: end; gap: var(--space-xs); height: 200px; padding-top: var(--space-md); border-bottom: 1px solid var(--color-rule-strong); }
.chart div { position: relative; height: var(--h); min-height: 4px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, var(--color-accent), var(--color-chart-2)); transform-origin: bottom; animation: grow 500ms var(--ease-out) both; }
.chart div:hover { background: var(--color-navy); }
.js .chart div span { opacity: 0; }
.chart div span { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font-size: var(--text-xs); font-weight: 600; white-space: nowrap; transition: opacity var(--dur-micro) var(--ease-out); }
.js .chart div:hover span, .js .chart div:focus-visible span { opacity: 1; }
.chart-x { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); text-align: center; }
@keyframes grow { from { transform: scaleY(0); } }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.toolbar .input { max-width: 280px; min-height: 40px; }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: min(680px, calc(100vh - 200px)); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); overflow: hidden; }
.convs { display: grid; align-content: start; border-right: 1px solid var(--color-rule); overflow: auto; }
.conv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); align-items: center; padding: var(--space-md); border: 0; border-bottom: 1px solid var(--color-rule); background: transparent; text-align: left; cursor: pointer; }
.conv:hover { background: var(--color-paper); }
.conv[aria-current="true"] { background: var(--color-sky); }
.conv:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.conv b { font-weight: 600; font-size: var(--text-sm); }
.conv p { font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; }
.thread__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
.msgs { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-lg); overflow: auto; background: var(--color-paper); }
.msg { max-width: 72%; padding: var(--space-sm) var(--space-md); border-radius: 16px 16px 16px 4px; background: var(--color-surface); border: 1px solid var(--color-rule); font-size: var(--text-sm); }
.msg--me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--color-accent); color: var(--color-accent-ink); border-color: var(--color-accent); }
.msg small { display: block; margin-top: var(--space-2xs); font-size: 11px; opacity: 0.75; }
.compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-xs); padding: var(--space-sm); border-top: 1px solid var(--color-rule); }
.stars-in { display: flex; gap: var(--space-2xs); }
.stars-in button { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; color: var(--color-rule-strong); border-radius: 8px; }
.stars-in button .i { width: 28px; height: 28px; fill: currentColor; stroke: currentColor; }
.stars-in button[aria-pressed="true"] { color: var(--color-star); }
.stars-in button:hover { color: var(--color-star); }
.stars-in button:focus-visible { outline: 2px solid var(--color-focus); }

/* ---------- plans, legal ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.plan { display: grid; align-content: start; gap: var(--space-md); padding: var(--space-xl); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.plan--pro { border: 2px solid var(--color-accent); box-shadow: var(--shadow-lift); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-xs); }
.plan li { display: flex; gap: var(--space-xs); font-size: var(--text-sm); }
.plan li .i { color: var(--color-accent); width: 18px; height: 18px; }
.plan .price { justify-items: start; }
.legal { max-width: 760px; display: grid; gap: var(--space-md); }
.legal h1 { font-size: var(--text-3xl); font-weight: 800; color: var(--color-navy); }
.legal h2 { font-size: var(--text-lg); margin-top: var(--space-md); }
.legal ul { padding-left: var(--space-lg); display: grid; gap: var(--space-2xs); }

/* ---------- footer, tab bar ---------- */
.foot { margin-top: var(--section-gap); background: var(--color-navy); color: var(--color-navy-muted); padding-block: var(--space-2xl) var(--space-lg); }
.foot__in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }
.foot__brand { display: grid; gap: var(--space-md); align-content: start; }
.foot__brand .logo__n { font-size: 2rem; }
.foot__brand .logo__e { font-size: 1.4rem; }
.foot nav { display: grid; gap: var(--space-xs); align-content: start; }
.foot h2 { font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--color-navy-ink); margin-bottom: var(--space-2xs); letter-spacing: 0; }
.foot nav a { font-size: var(--text-sm); text-decoration: none; color: var(--color-navy-muted); }
.foot nav a:hover { color: var(--color-navy-ink); text-decoration: underline; }
.foot__base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md); padding-top: var(--space-lg); border-top: 1px solid var(--color-white-12); font-size: var(--text-sm); }
.signed { display: inline-flex; align-items: center; gap: var(--space-xs); }
.signed__logo { padding: var(--space-2xs) var(--space-xs); border-radius: 6px; background: var(--color-surface); color: var(--color-navy); font: 800 var(--text-sm)/1 var(--font-display); letter-spacing: -0.02em; }
.tabbar { display: none; }
body[data-app] .foot { margin-top: 0; }

/* ---------- modal & toasts ---------- */
.modal { width: calc(100% - 32px); max-width: 560px; max-height: calc(100dvh - 48px); padding: var(--space-xl); border: 0; border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-lift); }
.modal[open] { animation: pop var(--dur-short) var(--ease-out); }
.modal::backdrop { background: var(--color-scrim); backdrop-filter: blur(3px); }
.modal__x { position: absolute; top: var(--space-md); right: var(--space-md); }
.modal__body { display: grid; gap: var(--space-md); }
.modal h2 { font-size: var(--text-xl); font-weight: 800; padding-right: var(--space-2xl); }
.toasts { position: fixed; left: 50%; bottom: var(--space-lg); z-index: var(--z-toast); display: grid; gap: var(--space-xs); transform: translateX(-50%); width: calc(100% - 32px); max-width: 420px; }
.toast { padding: var(--space-sm) var(--space-md); border-radius: 12px; background: var(--color-navy); color: var(--color-navy-ink); font-size: var(--text-sm); font-weight: 600; box-shadow: var(--shadow-lift); animation: pop var(--dur-short) var(--ease-out); transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.toast--err { background: var(--color-error); }
.toast[data-out] { opacity: 0; transform: translateY(8px); }

/* ---------- responsive: the app ---------- */
@media (max-width: 68rem) {
  .nav { display: none; }
  .top__menu { display: inline-grid; }
  .top__in { justify-content: space-between; }
  .hero__grid, .split, .profile, .flow, .cols, .map-layout { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { min-height: 0; }
  .people { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .trust-split { grid-template-columns: minmax(0, 1fr); }
  .trust__photo { min-height: 260px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; max-height: none; }
  .filters[data-collapsed] { display: none; }
  .filters-toggle { display: inline-flex; }
  .side-book, .summary { position: static; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; display: flex; overflow-x: auto; padding: var(--space-xs); gap: var(--space-2xs); }
  .side h2 { display: none; }
  .side a, .side button { flex-shrink: 0; }
  .foot__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 48rem) {
  body { padding-bottom: 76px; }
  .top__actions .btn--ghost, .top__actions [data-hide-sm] { display: none; }
  .searchbar { grid-template-columns: minmax(0, 1fr); }
  .grid-t, .plans, .steps, .form .row { grid-template-columns: minmax(0, 1fr); }
  .tcard { grid-template-columns: auto minmax(0, 1fr); }
  .tcard__side { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; }
  .tcard .avatar--lg { width: 64px; height: 64px; border-radius: 18px; font-size: var(--text-md); }
  .hero__visual .tcard:nth-of-type(2) { margin-left: 0; }
  .hero__visual { padding: var(--space-md); }
  .hero__photo { order: -1; padding: 0 0 var(--space-2xl); }
  .hero__frame { aspect-ratio: 4 / 3; }
  .hero { padding-top: var(--space-lg); }
  .hero__card { left: var(--space-sm); right: var(--space-sm); min-width: 0; }
  .hero__photo .hero__float { top: var(--space-sm); right: var(--space-sm); font-size: var(--text-xs); }
  .people { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-auto-rows: 150px; gap: var(--space-sm); }
  .gal--tall { grid-row: span 1; }
  .gal--wide { grid-column: span 1; }
  .gal figcaption { font-size: var(--text-xs); }
  .person__quote { font-size: var(--text-md); }
  .hero__float { position: static; justify-self: start; }
  .teach { padding: var(--space-lg); }
  .cat { padding: var(--space-md); }
  .hero__visual .tcard:nth-of-type(3) { display: none; }
  .phead { grid-template-columns: minmax(0, 1fr); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dl div { grid-template-columns: 22px minmax(0, 1fr); }
  .dl dd { grid-column: 2; }
  .chat { grid-template-columns: minmax(0, 1fr); height: auto; }
  .convs { border-right: 0; border-bottom: 1px solid var(--color-rule); max-height: 220px; }
  .msgs { min-height: 340px; }
  .calc__out { grid-template-columns: minmax(0, 1fr); }
  .foot { margin-bottom: 0; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky-nav); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--color-rule); background: var(--color-surface); }
  .tabbar a { display: grid; justify-items: center; gap: var(--space-3xs); min-height: 64px; padding-top: var(--space-xs); font-size: 11px; font-weight: 600; color: var(--color-muted); text-decoration: none; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--color-accent); }
  .tabbar a:active { transform: scale(0.95); }
  .tabbar a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -4px; border-radius: 10px; }
  .toasts { bottom: 88px; }
  .next { grid-template-columns: auto minmax(0, 1fr); }
  .next .avatar--lg { width: 56px; height: 56px; border-radius: 16px; font-size: var(--text-md); }
  .next .btn { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
  .stat { padding: var(--space-md); }
  .stat b { font-size: var(--text-2xl); }
  .li { grid-template-columns: auto minmax(0, 1fr); }
  .li__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .dash__main { padding-top: var(--space-lg); gap: var(--space-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__visual .tcard, .hero__card, .chart div, .slide, .menu, .modal[open], .toast, .skel { animation: none; }
  .tcard:hover, .cat:hover, .idea:hover, .hero__card:hover { transform: none; }
}
