/* =========================================================
   TutorConnect — Design system & components
   All brand colours, fonts, radii and shadows live in :root.
   Change them here to re-skin the whole portal.
   ========================================================= */

:root {
  /* Brand — midnight navy for trust */
  --brand-950: #0A1033;
  --brand-900: #101845;
  --brand-800: #18225E;
  --brand-700: #243282;
  --brand-600: #3647B8;
  --brand-200: #CBD2F3;
  --brand-100: #E4E8FA;
  --brand-50:  #F3F5FD;

  /* Accent — champagne gold for CTAs and highlights */
  --accent-300: #F0C868;
  --accent:     #E0A93B;
  --accent-600: #B98326;
  --accent-text:#8A5F12;
  --accent-100: #F7E9C8;
  --accent-50:  #FCF6E8;
  --on-accent:  #0A1033;

  /* Neutrals — warm ivory */
  --bg:       #FAF9F6;
  --surface:  #FFFFFF;
  --surface-2:#F7F6F2;
  --muted:    #F0EEE8;
  --text:     #0D1230;
  --text-2:   #474D66;
  --text-3:   #686E86;
  --border:   #E7E4DC;
  --border-2: #D5D1C6;

  /* On dark surfaces (footer, CTA bands, auth side) */
  --on-dark:   #E6E9F8;
  --on-dark-2: #A9B1D6;
  --line-dark: rgba(230, 233, 248, .12);

  /* Signature gradients */
  --grad-brand: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-700) 100%);
  --grad-gold:  linear-gradient(135deg, var(--accent-300) 0%, var(--accent) 55%, var(--accent-600) 100%);
  --grad-night: radial-gradient(700px 360px at 88% -10%, rgba(224, 169, 59, .22), transparent 60%),
                radial-gradient(600px 400px at -10% 110%, rgba(54, 71, 184, .35), transparent 60%),
                linear-gradient(160deg, var(--brand-950) 0%, var(--brand-900) 60%, var(--brand-800) 100%);

  /* Status */
  --success:    #15803D;
  --success-50: #F0FDF4;
  --success-100:#DCFCE7;
  --warning:    #B45309;
  --warning-50: #FFFBEB;
  --danger:     #DC2626;
  --danger-50:  #FEF2F2;

  /* Typography */
  --font-head: "Plus Jakarta Sans", "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape & depth */
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(10, 16, 51, .05);
  --shadow-sm: 0 1px 2px rgba(10, 16, 51, .04), 0 6px 18px -10px rgba(10, 16, 51, .14);
  --shadow:    0 1px 2px rgba(10, 16, 51, .04), 0 10px 24px -12px rgba(10, 16, 51, .16), 0 24px 48px -24px rgba(10, 16, 51, .18);
  --shadow-lg: 0 2px 4px rgba(10, 16, 51, .05), 0 18px 40px -16px rgba(10, 16, 51, .22), 0 40px 80px -32px rgba(10, 16, 51, .30);
  --shadow-gold: 0 10px 24px -10px rgba(185, 131, 38, .55);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, .22);
  --ring: 0 0 0 3px rgba(54, 71, 184, .25);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
::selection { background: var(--accent-100); color: var(--brand-950); }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-700); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.4vw, 3.75rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.06; }
h2 { font-size: clamp(1.65rem, 4.2vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }
.lead, .section-head p { text-wrap: pretty; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--brand-800); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }
[hidden] { display: none !important; }

/* Lucide icons */
.i, [data-lucide] { width: 20px; height: 20px; stroke-width: 1.9; flex-shrink: 0; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.section { padding: 56px 0; }
@media (min-width: 1024px) { .section { padding: 88px 0; } }
.section-alt { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-700); margin-bottom: 14px;
  padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
.eyebrow .i-sm, .eyebrow .i { color: var(--accent-600); }
.lead { font-size: 1.1rem; color: var(--text-2); line-height: 1.65; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.xs { font-size: .8rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid { gap: 24px; } }
/* Grid children must be allowed to shrink below their content width (prevents horizontal overflow on phones) */
.grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .dash-grid > *, .profile-layout > *, .search-layout > *, .results-grid > *, .hero-grid > * { min-width: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: .975rem; line-height: 1; white-space: nowrap; letter-spacing: -.005em;
  cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .2s, border-color .2s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--highlight), 0 8px 20px -10px rgba(10, 16, 51, .8); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--highlight), 0 14px 28px -12px rgba(10, 16, 51, .7); filter: brightness(1.12); }
.btn-accent { background: var(--grad-gold); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--shadow-gold); }
.btn-accent:hover { color: var(--on-accent); transform: translateY(-1px); filter: brightness(1.05) saturate(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 16px 30px -12px rgba(185, 131, 38, .6); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-2); box-shadow: var(--shadow-xs); }
.btn-outline:hover { border-color: var(--brand-700); color: var(--brand-800); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--muted); color: var(--text); }
.btn-soft { background: var(--brand-50); color: var(--brand-800); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-800); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-white { background: #fff; color: var(--brand-900); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .5); }
.btn-white:hover { color: var(--brand-700); transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-sm { --h: 38px; padding: 0 14px; font-size: .875rem; border-radius: 10px; }
.btn-lg { --h: 54px; padding: 0 26px; font-size: 1.025rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { --h: 42px; width: 42px; padding: 0; border-radius: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 20px;
}
@media (min-width: 640px) { .card { padding: 26px; } }
.card-hover { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-100); }
.card-flat { box-shadow: none; }
.card-title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin: 0; }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.3;
  background: var(--muted); color: var(--text-2); border: 1px solid transparent; white-space: nowrap;
}
.badge .i { width: 14px; height: 14px; }
.badge-success { background: var(--success-50); color: var(--success); border-color: #BBF7D0; }
.badge-warning { background: var(--warning-50); color: var(--warning); border-color: #FDE68A; }
.badge-danger  { background: var(--danger-50); color: var(--danger); border-color: #FECACA; }
.badge-brand   { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.badge-accent  { background: var(--accent-50); color: var(--accent-text); border-color: var(--accent-100); }
.badge-dark    { background: var(--brand-950); color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--surface);
  font-size: .9rem; font-weight: 500; color: var(--text-2); cursor: pointer;
  transition: all .15s var(--ease); user-select: none;
}
.chip:hover { border-color: var(--brand-700); color: var(--brand-800); }
.chip[aria-pressed="true"], .chip.active { background: var(--grad-brand); border-color: var(--brand-800); color: #fff; box-shadow: var(--highlight), var(--shadow-xs); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--brand-50); color: var(--brand-800); font-size: .8rem; font-weight: 600; border: 1px solid var(--brand-100); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.label { font-size: .9rem; font-weight: 600; color: var(--text); }
.label .opt { font-weight: 400; color: var(--text-3); }
.hint { font-size: .82rem; color: var(--text-3); }
.error-text { font-size: .82rem; color: var(--danger); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface);
  font-size: 16px; /* prevents iOS zoom */
  box-shadow: inset 0 1px 2px rgba(10, 16, 51, .04);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: .85; }
.textarea { min-height: 110px; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: var(--ring); }
.input.invalid, .select.invalid { border-color: var(--danger); }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .prefix {
  display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-2); border-right: 0;
  border-radius: 12px 0 0 12px; background: var(--muted); color: var(--text-2); font-weight: 600;
}
.input-group .prefix + .input { border-radius: 0 12px 12px 0; }
.input-icon { position: relative; }
.input-icon .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input, .input-icon .select { padding-left: 42px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand-700); flex-shrink: 0; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.form-grid .field + .field { margin-top: 0; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
input[type="range"] { width: 100%; accent-color: var(--brand-700); height: 28px; }

/* Choice cards (role picker etc.) */
.choice {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: all .15s var(--ease);
}
.choice:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--brand-700); background: linear-gradient(180deg, var(--brand-50), var(--surface)); box-shadow: var(--ring); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }
.choice .choice-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-800); flex-shrink: 0; }

/* OTP boxes */
.otp { display: flex; gap: 8px; justify-content: space-between; }
.otp input {
  width: 100%; max-width: 54px; aspect-ratio: 1 / 1.1; text-align: center;
  font-size: 1.4rem; font-weight: 700; font-family: var(--font-head);
  border: 1.5px solid var(--border-2); border-radius: 12px; background: var(--surface);
}
.otp input:focus { outline: none; border-color: var(--brand-600); box-shadow: var(--ring); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(250, 249, 246, .78); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s, background .25s;
}
.site-header.scrolled { background: rgba(250, 249, 246, .9); border-bottom-color: var(--border); box-shadow: 0 8px 24px -18px rgba(10, 16, 51, .35); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--brand-950); letter-spacing: -.03em; }
.logo:hover { color: var(--brand-950); }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-brand); color: var(--accent-300);
  box-shadow: var(--highlight), 0 0 0 1px rgba(224, 169, 59, .35), 0 8px 16px -8px rgba(10, 16, 51, .8);
}
.logo-mark svg { width: 20px; height: 20px; }
.logo .dot { color: var(--accent-text); }
.nav-desktop { display: none; gap: 2px; align-items: center; }
.nav-desktop a { position: relative; padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .95rem; }
.nav-desktop a:hover { color: var(--brand-900); background: rgba(10, 16, 51, .04); }
.nav-desktop a.active { color: var(--brand-900); font-weight: 600; }
.nav-desktop a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad-gold); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.cta-short { display: none; }
@media (max-width: 420px) {
  .site-header .container { gap: 8px; }
  .header-actions { gap: 4px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}
.header-actions .hide-sm { display: none; }
.menu-btn { display: inline-flex; }
@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .menu-btn { display: none; }
  .header-actions .hide-sm { display: inline-flex; }
}

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); z-index: 61;
  background: var(--surface); box-shadow: var(--shadow-lg); padding: 16px 20px 24px;
  transform: translateX(100%); transition: transform .3s var(--ease); display: flex; flex-direction: column; overflow-y: auto;
}
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer nav { display: flex; flex-direction: column; margin: 12px 0; }
.drawer nav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--muted); color: var(--text); font-weight: 500; }
.drawer .group-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--grad-night); color: var(--on-dark-2); padding: 64px 0 28px; margin-top: 0; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(224, 169, 59, .6), transparent); }
.site-footer a { color: var(--on-dark); opacity: .78; transition: opacity .15s, color .15s; }
.site-footer a:hover { opacity: 1; color: var(--accent-300); }
.site-footer .logo { color: #fff; }
.site-footer .logo .dot { color: var(--accent); }
.footer-note { max-width: 340px; color: var(--on-dark-2); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer-grid .brand-col { grid-column: 1 / -1; }
.footer-grid h4 { color: #fff; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .94rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .footer-grid .brand-col { grid-column: auto; } }
.footer-bottom { border-top: 1px solid var(--line-dark); margin-top: 44px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: var(--on-dark-2); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 40px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 760px; z-index: -1;
  background:
    radial-gradient(620px 320px at 12% 18%, rgba(54, 71, 184, .13), transparent 70%),
    radial-gradient(520px 300px at 88% 6%, rgba(224, 169, 59, .18), transparent 70%),
    radial-gradient(480px 260px at 60% 90%, rgba(54, 71, 184, .07), transparent 70%);
}
/* Fine dotted grid, faded at the edges */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(10, 16, 51, .09) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
}
.hero-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 80px 0 112px; } .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; } }
.hero h1 .hl { background: linear-gradient(120deg, var(--brand-800) 10%, var(--brand-600) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .underline { position: relative; white-space: nowrap; }
.hero h1 .underline::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: .02em; height: .2em; background: var(--grad-gold); opacity: .55; border-radius: 6px; z-index: -1; }
.hero .lead { max-width: 560px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: .85rem; font-weight: 500; color: var(--text-2); margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.pill b { background: var(--grad-brand); color: var(--accent-300); padding: 2px 10px; border-radius: 999px; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }

.search-card {
  background: rgba(255, 255, 255, .92); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 12px; display: grid; gap: 10px; margin-top: 30px;
  backdrop-filter: blur(10px);
}
.search-card .input, .search-card .select { border-color: var(--border); background-color: var(--surface-2); box-shadow: none; }
.search-card .input:focus, .search-card .select:focus { background-color: var(--surface); }
@media (min-width: 640px) {
  .search-card { grid-template-columns: 1fr 1fr; padding: 10px; gap: 8px; border-radius: 20px; }
}
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 24px; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--text-2); font-weight: 500; }
.trust-row .i { color: var(--accent-600); width: 18px; height: 18px; }

/* Promise strip under the hero */
.promise-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 40px; border-radius: var(--radius-lg); overflow: hidden; background: var(--border); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.promise-strip > div { background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.promise-strip b { font-family: var(--font-head); font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand-900); }
.promise-strip span { font-size: .85rem; color: var(--text-3); }
@media (min-width: 900px) { .promise-strip { grid-template-columns: repeat(4, 1fr); } .promise-strip > div { padding: 20px 24px; } }

/* Hero visual (mock product) */
.hero-visual { position: relative; max-width: 440px; margin: 0 auto; width: 100%; }
.hero-visual .main { position: relative; z-index: 2; }
.hero-visual::before { content: ""; position: absolute; inset: 8% -6% 14% -6%; z-index: 1; border-radius: 40px; background: var(--grad-gold); opacity: .18; filter: blur(40px); }
.float {
  position: absolute; z-index: 3; background: rgba(255, 255, 255, .94); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600;
  animation: bob 6s ease-in-out infinite;
}
.float .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.float small { display: block; font-weight: 500; color: var(--text-3); font-size: .75rem; }
/* Floats sit on the card's edges/corners only, never over its content */
.hero-visual { padding-bottom: 44px; }
.float-1 { top: -26px; right: -24px; }
.float-2 { bottom: 0; left: -28px; animation-delay: -3s; }
.float-3 { bottom: 0; right: -24px; animation-delay: -1.5s; }
/* On phones keep one badge, above the card, so nothing covers its content */
@media (max-width: 639px) {
  .hero-visual { padding-top: 34px; padding-bottom: 0; }
  .float-1 { top: 0; right: 8px; }
  .float-2, .float-3 { display: none; }
}

/* ---------- Photography ---------- */
.ph { margin: 0; overflow: hidden; background: var(--muted); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero: framed photo with the product card overlapping its lower edge */
.hero-visual.has-photo { max-width: 480px; }
.hero-photo { position: relative; z-index: 2; aspect-ratio: 3 / 2; border-radius: 28px; border: 6px solid var(--surface); box-shadow: var(--shadow-lg); }
.hero-photo img { object-position: 30% 30%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 16, 51, .25)); pointer-events: none; }
.hero-visual.has-photo .main { z-index: 3; width: 90%; margin: -88px 0 0 auto; }
.hero-visual.has-photo .float { z-index: 4; }
.hero-visual.has-photo .float-1 { top: -18px; right: -18px; }
@media (max-width: 639px) {
  .hero-visual.has-photo { padding-top: 0; }
  .hero-visual.has-photo .main { width: 94%; margin-top: -52px; }
  .hero-visual.has-photo .float-1 { top: 12px; right: 12px; }
  .hero-photo { border-width: 4px; border-radius: 22px; }
}

/* Step cards with a photo header that bleeds to the card edges */
.step-media { margin: -20px -20px 0; aspect-ratio: 16 / 9; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
@media (min-width: 640px) { .step-media { margin: -26px -26px 0; } }
.step-media img { transition: transform .7s var(--ease); }
.step:hover .step-media img { transform: scale(1.05); }
.step-media + .num { position: relative; margin-top: -22px; border: 3px solid var(--surface); }

/* Split section: photo stack + copy */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }
.split > * { min-width: 0; }
.photo-stack { position: relative; padding-bottom: 48px; max-width: 560px; margin: 0 auto; width: 100%; }
.photo-stack .p-main { aspect-ratio: 4 / 3; border-radius: 28px; box-shadow: var(--shadow-lg); }
.photo-stack .p-inset { position: absolute; right: -12px; bottom: 0; width: 40%; aspect-ratio: 1; border-radius: 22px; border: 6px solid var(--surface); box-shadow: var(--shadow-lg); }
.photo-stack .float { top: 18px; left: -14px; }
@media (max-width: 639px) {
  .photo-stack .p-inset { right: 8px; border-width: 4px; }
  .photo-stack .float { left: 10px; top: 10px; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Avatar ---------- */
.avatar {
  --s: 56px; width: var(--s); height: var(--s); border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: calc(var(--s) * .36);
  background: linear-gradient(135deg, hsl(var(--h, 245) 60% 52%), hsl(calc(var(--h, 245) + 40) 70% 62%));
  position: relative;
}
.avatar.round { border-radius: 50%; }
.avatar-sm { --s: 40px; border-radius: 12px; }
.avatar-lg { --s: 96px; border-radius: 24px; }
.avatar .tick {
  position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--success); color: #fff; display: grid; place-items: center; border: 2.5px solid var(--surface);
}
.avatar .tick svg { width: 12px; height: 12px; stroke-width: 3; }

/* ---------- Rating ---------- */
.rating { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.stars { display: inline-flex; gap: 1px; color: var(--accent); }
.stars svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.stars .off { color: var(--border-2); }
.rating .count { color: var(--text-3); font-weight: 500; }

/* ---------- Tutor card ---------- */
.tutor-card { display: flex; flex-direction: column; gap: 14px; position: relative; }
.tutor-card .top { display: flex; gap: 14px; align-items: flex-start; }
.tutor-card .name { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--text); display: flex; align-items: center; gap: 6px; }
.tutor-card .name .i { color: var(--brand-600); width: 18px; height: 18px; }
.tutor-card .headline { font-size: .9rem; color: var(--text-2); margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tutor-card .meta { display: grid; gap: 6px; font-size: .88rem; color: var(--text-2); }
.tutor-card .meta div { display: flex; align-items: center; gap: 8px; }
.tutor-card .meta .i { width: 16px; height: 16px; color: var(--text-3); }
.tutor-card .fee { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; color: var(--brand-900); }
.tutor-card .fee small { font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--text-3); }
.tutor-card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.tutor-card .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--border); }
.save-btn { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-3); transition: all .15s; }
.save-btn:hover { color: var(--danger); border-color: #FECACA; }
.save-btn[aria-pressed="true"] { color: var(--danger); background: var(--danger-50); border-color: #FECACA; }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }
.match-ring { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--success); background: var(--success-50); padding: 4px 10px; border-radius: 999px; }

/* ---------- Feature / step blocks ---------- */
.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(145deg, var(--brand-50), var(--brand-100)); color: var(--brand-700);
  box-shadow: inset 0 0 0 1px rgba(36, 50, 130, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.icon-tile.amber { background: linear-gradient(145deg, var(--accent-50), var(--accent-100)); color: var(--accent-600); box-shadow: inset 0 0 0 1px rgba(185, 131, 38, .14), inset 0 1px 0 rgba(255, 255, 255, .9); }
.icon-tile.green { background: linear-gradient(145deg, var(--success-50), var(--success-100)); color: var(--success); box-shadow: inset 0 0 0 1px rgba(21, 128, 61, .1), inset 0 1px 0 rgba(255, 255, 255, .9); }
.icon-tile .i { width: 24px; height: 24px; }
.feature { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-100); }
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.step { position: relative; overflow: hidden; }
.step::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad-gold); opacity: 0; transition: opacity .3s; }
.step:hover::after { opacity: 1; }
.step .num {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-brand); color: var(--accent-300); font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; margin-bottom: 18px;
  box-shadow: var(--highlight), 0 8px 18px -10px rgba(10, 16, 51, .8);
}
.feature p, .step p { color: var(--text-2); font-size: .95rem; margin: 0; }

/* Testimonials */
.quote-card { position: relative; }
.quote-card blockquote { margin: 12px 0 20px; font-size: 1.04rem; color: var(--text); line-height: 1.7; }
.quote-card .who { padding-top: 16px; border-top: 1px solid var(--muted); }
.quote-card .who { display: flex; align-items: center; gap: 12px; }
.quote-card .who b { display: block; font-size: .95rem; }
.quote-card .who span { font-size: .85rem; color: var(--text-3); }

/* Horizontal scroller (mobile) */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 16px; margin: 0 -16px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 640px) { .scroller { grid-auto-columns: 48%; } }
@media (min-width: 1024px) { .scroller { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 24px; } }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-xl); padding: 32px 24px; color: var(--on-dark);
  background: var(--grad-night); box-shadow: var(--shadow-lg);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 65%); mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 65%);
}
.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band .eyebrow, .auth-side .eyebrow { background: rgba(255, 255, 255, .06); border-color: rgba(224, 169, 59, .35); box-shadow: none; color: var(--accent-300); }
@media (min-width: 768px) { .cta-band { padding: 48px; } }
.dual-cta { display: grid; gap: 16px; }
@media (min-width: 900px) { .dual-cta { grid-template-columns: 1fr 1fr; gap: 24px; } }
.cta-light { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 32px 24px; background: radial-gradient(500px 260px at 100% 0%, var(--accent-100), transparent 70%), var(--accent-50); border: 1px solid var(--accent-100); box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .cta-light { padding: 48px; } }
.check-list { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .i { color: var(--success); margin-top: 3px; width: 18px; height: 18px; }
.cta-band .check-list .i { color: var(--accent); }

/* Page hero (inner pages) */
.page-hero { padding: 44px 0 36px; position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 260px at 10% 0%, rgba(54, 71, 184, .10), transparent 70%), radial-gradient(500px 220px at 95% 0%, rgba(224, 169, 59, .12), transparent 70%); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(10, 16, 51, .08) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.page-hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.breadcrumb { display: flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--text-3); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb .i { width: 14px; height: 14px; }

/* ---------- Accordion (FAQ) ---------- */
.accordion { display: grid; gap: 10px; }
.accordion details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow .25s, border-color .25s; }
.accordion details:hover { border-color: var(--border-2); }
.accordion details[open] { box-shadow: var(--shadow); border-color: var(--accent-100); }
.accordion summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-weight: 600; font-family: var(--font-head); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .i { transition: transform .2s var(--ease); color: var(--text-3); }
.accordion details[open] summary .i { transform: rotate(180deg); color: var(--accent-600); }
.accordion .body { padding: 0 20px 18px; color: var(--text-2); }

/* ---------- Tabs / segmented ---------- */
.segmented { display: inline-flex; padding: 4px; background: var(--muted); border-radius: 14px; gap: 4px; max-width: 100%; overflow-x: auto; }
.segmented button { border: 0; background: transparent; padding: 10px 16px; border-radius: 10px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; min-height: 42px; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--brand-900); box-shadow: var(--shadow-sm); }

/* ---------- Search page ---------- */
.search-layout { display: grid; gap: 24px; padding-top: 24px; padding-bottom: 56px; }
@media (min-width: 1024px) { .search-layout { grid-template-columns: 290px 1fr; align-items: start; } }
.filters { display: none; }
@media (min-width: 1024px) { .filters { display: block; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; } }
.filter-group { padding: 16px 0; border-bottom: 1px solid var(--muted); }
.filter-group:first-child { padding-top: 0; }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: .9rem; margin-bottom: 10px; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.results-bar .sort { width: auto; min-width: 180px; }
.mobile-filter-btn { display: inline-flex; }
@media (min-width: 1024px) { .mobile-filter-btn { display: none; } }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.active-filters button { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-800); border-radius: 999px; padding: 6px 10px 6px 12px; font-size: .82rem; font-weight: 600; cursor: pointer; }
.results-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .results-grid { grid-template-columns: 1fr 1fr; } }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .32s var(--ease);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--border-2); margin: 10px auto 4px; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 12px; border-bottom: 1px solid var(--muted); }
.sheet .sheet-body { overflow-y: auto; padding: 8px 20px 20px; }
.sheet .sheet-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--muted); display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.sheet-open .sheet { transform: none; }
.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
@media (min-width: 768px) { .sheet { left: 50%; right: auto; width: 560px; bottom: auto; top: 50%; border-radius: 24px; transform: translate(-50%, -40%) scale(.98); opacity: 0; pointer-events: none; transition: transform .25s var(--ease), opacity .2s; } .sheet-open .sheet { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; } .sheet .grab { display: none; } }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--muted) 25%, var(--surface-2) 37%, var(--muted) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 12px; margin: 8px 0; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 40px 20px; }
.empty .art { width: 120px; height: 120px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, var(--brand-50), transparent 70%); color: var(--brand-600); }
.empty .art .i { width: 44px; height: 44px; stroke-width: 1.5; }
.empty p { max-width: 380px; margin: 0 auto 20px; color: var(--text-2); }

/* ---------- Profile ---------- */
.profile-layout { display: grid; gap: 24px; padding: 8px 0 120px; }
@media (min-width: 1024px) { .profile-layout { grid-template-columns: 1fr 360px; align-items: start; padding-bottom: 72px; } .book-card { position: sticky; top: calc(var(--header-h) + 16px); } }
.profile-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(4, 1fr); } }
.kv div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.kv span { display: block; font-size: .78rem; color: var(--text-3); font-weight: 500; }
.kv b { font-family: var(--font-head); font-size: 1.05rem; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--muted); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.avail-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: .78rem; }
.avail-grid .d { font-weight: 700; color: var(--text-3); }
.avail-grid .s { border-radius: 8px; padding: 8px 2px; background: var(--muted); color: var(--text-3); }
.avail-grid .s.on { background: var(--success-50); color: var(--success); font-weight: 600; }
.review { padding: 18px 0; border-bottom: 1px solid var(--muted); }
.review:last-child { border-bottom: 0; }
.reply { margin-top: 10px; padding: 12px 14px; background: var(--surface-2); border-left: 3px solid var(--brand-200); border-radius: 0 10px 10px 0; font-size: .9rem; color: var(--text-2); }
.rating-bars { display: grid; gap: 8px; }
.rating-bars .bar { display: grid; grid-template-columns: 96px 1fr 32px; gap: 10px; align-items: center; font-size: .85rem; color: var(--text-2); }
.progress { height: 8px; background: var(--muted); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-800), var(--brand-600)); border-radius: inherit; transition: width .5s var(--ease); }
.progress.amber > span { background: linear-gradient(90deg, var(--accent-600), var(--accent)); }
.progress.green > span { background: var(--success); }
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px;
}
@media (min-width: 1024px) { .mobile-cta { display: none; } }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.day-scroller { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.day-scroller::-webkit-scrollbar { display: none; }
.day-btn { flex: 0 0 64px; border: 1px solid var(--border-2); background: var(--surface); border-radius: 14px; padding: 10px 0; text-align: center; cursor: pointer; }
.day-btn b { display: block; font-family: var(--font-head); font-size: 1.15rem; }
.day-btn span { font-size: .75rem; color: var(--text-3); }
.day-btn[aria-pressed="true"] { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.day-btn[aria-pressed="true"] span { color: var(--brand-100); }
.day-btn:disabled { opacity: .4; cursor: not-allowed; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: .9rem; background: var(--brand-50); color: var(--brand-900); border: 1px solid var(--brand-100); }
.notice .i { flex-shrink: 0; margin-top: 2px; }
.notice.success { background: var(--success-50); color: #14532D; border-color: #BBF7D0; }
.notice.warning { background: var(--warning-50); color: #78350F; border-color: #FDE68A; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; }
@media (min-width: 1024px) { .auth-wrap { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; position: relative; overflow: hidden; isolation: isolate; color: var(--on-dark); padding: 56px; background: var(--grad-night); }
.auth-side::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(ellipse at 80% 0%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 80% 0%, #000, transparent 70%); }
.auth-main .card { box-shadow: var(--shadow-lg); }
.auth-side h2 { color: #fff; }
@media (min-width: 1024px) { .auth-side { display: flex; flex-direction: column; justify-content: center; } }
.auth-main { display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px 56px; }
@media (min-width: 640px) { .auth-main { align-items: center; } }
.auth-card { width: 100%; max-width: 440px; }

/* ---------- Wizard ---------- */
.wizard { max-width: 760px; margin: 0 auto; padding: 24px 0 120px; }
.wizard-progress { position: sticky; top: var(--header-h); z-index: 20; background: var(--bg); padding: 12px 0 14px; }
.wizard-steps { display: flex; gap: 6px; margin-top: 10px; }
.wizard-steps span { flex: 1; height: 6px; border-radius: 99px; background: var(--border); transition: background .3s; }
.wizard-steps span.done { background: var(--grad-brand); }
.wizard-steps span.current { background: var(--grad-gold); }
.wizard-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.wizard-nav .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.saved-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--success); font-weight: 600; }
.day-toggle-grid { display: grid; gap: 10px; }
.day-toggle { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.slot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-chips .chip { min-height: 36px; padding: 0 12px; font-size: .82rem; }
.upload {
  display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--border-2); border-radius: var(--radius);
  background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.upload:hover { border-color: var(--brand-600); background: var(--brand-50); }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload.has-file { border-style: solid; border-color: #BBF7D0; background: var(--success-50); }

/* ---------- Dashboard ---------- */
.dash { display: grid; min-height: calc(100vh - var(--header-h)); }
@media (min-width: 1024px) { .dash { grid-template-columns: 260px 1fr; } }
.dash-side { display: none; border-right: 1px solid var(--border); background: var(--surface); padding: 20px 14px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; }
@media (min-width: 1024px) { .dash-side { display: flex; flex-direction: column; } }
.dash-side a, .dash-side button.link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: .94rem; border: 0; background: none; width: 100%; cursor: pointer; text-align: left;
}
.dash-side a { position: relative; transition: background .15s, color .15s; }
.dash-side a:hover { background: var(--muted); color: var(--text); }
.dash-side a.active { background: linear-gradient(90deg, var(--brand-50), transparent); color: var(--brand-900); font-weight: 600; }
.dash-side a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad-gold); }
.dash-side a.active .i { color: var(--accent-600); }
.dash-side a .count { margin-left: auto; background: var(--grad-gold); color: var(--on-accent); font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.dash-user { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: linear-gradient(145deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); box-shadow: var(--shadow-xs); margin-bottom: 16px; }
.dash-main { padding: 20px 16px 110px; min-width: 0; }
@media (min-width: 640px) { .dash-main { padding: 28px 28px 110px; } }
@media (min-width: 1024px) { .dash-main { padding: 32px 40px 56px; } }
.dash-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.dash-title h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0; }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) { .bottom-nav { display: none; } }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: .7rem; font-weight: 600; color: var(--text-3); border-radius: 12px; border: 0; background: none; cursor: pointer; }
.bottom-nav a.active { color: var(--brand-900); }
.bottom-nav a.active .i { background: var(--accent-100); color: var(--brand-900); }
.bottom-nav .i { width: 40px; height: 28px; padding: 4px 10px; border-radius: 99px; box-sizing: border-box; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .label-row { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: .88rem; font-weight: 500; }
.stat .value { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.2rem, 5.2vw, 1.75rem); letter-spacing: -.03em; color: var(--brand-950); overflow-wrap: anywhere; }
.stats > * { min-width: 0; }
a.list-item { color: var(--text); }
a.list-item:hover .title { color: var(--brand-700); }
.stat .delta { font-size: .8rem; font-weight: 600; color: var(--success); }
.stat .icon-tile { width: 38px; height: 38px; margin: 0; border-radius: 11px; }
.stat .icon-tile .i { width: 20px; height: 20px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 1100px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.stats .card { padding: 18px; position: relative; overflow: hidden; }
.stats .card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, var(--accent-50), transparent 70%); pointer-events: none; }
.list { display: grid; }
.list-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--muted); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; font-size: .95rem; }
.list-item .sub { font-size: .84rem; color: var(--text-3); }
.date-tile { width: 52px; flex-shrink: 0; text-align: center; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background: var(--surface); }
.date-tile span { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; background: var(--grad-brand); color: var(--accent-300); padding: 2px 0; letter-spacing: .06em; }
.date-tile b { display: block; font-family: var(--font-head); font-size: 1.15rem; padding: 4px 0; }
.dash-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .dash-grid { grid-template-columns: 1.6fr 1fr; gap: 24px; } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-actions a { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .88rem; }
.quick-actions a:hover { border-color: var(--brand-200); background: var(--brand-50); }
.quick-actions .i { color: var(--brand-700); }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.bar-chart .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: .72rem; color: var(--text-3); }
.bar-chart .b i { width: 100%; max-width: 38px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--brand-600), var(--brand-800)); display: block; transition: height .6s var(--ease); }
.bar-chart .b.now i { background: linear-gradient(180deg, var(--accent-300), var(--accent-600)); }
.ring { --p: 60; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--muted) 0); flex-shrink: 0; }
.ring::before { content: attr(data-label); width: 74px; height: 74px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.status-dot.green { background: var(--success); } .status-dot.amber { background: var(--accent); } .status-dot.red { background: var(--danger); }

/* Chat */
.chat { display: grid; height: calc(100vh - var(--header-h) - 200px); min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); grid-template-rows: auto 1fr auto; }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; }
.chat-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: .94rem; line-height: 1.5; }
.msg.them { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--grad-brand); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.flagged { background: var(--warning-50); color: #78350F; border: 1px solid #FDE68A; }
.msg time { display: block; font-size: .7rem; opacity: .7; margin-top: 4px; }
.chat-foot { padding: 10px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 80; display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(30px); transition: transform .25s var(--ease); }
.modal-backdrop.open .modal { transform: none; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; } .modal { border-radius: 24px; padding: 28px; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.modal-head h3 { margin: 0; }

/* Toast */
.toast-wrap { position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 88px; display: grid; gap: 8px; pointer-events: none; }
@media (min-width: 640px) { .toast-wrap { left: auto; right: 24px; bottom: 24px; width: 380px; } }
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; background: var(--grad-brand); color: #fff; border-radius: 14px; padding: 14px 16px;
  border: 1px solid rgba(224, 169, 59, .25); box-shadow: var(--highlight), var(--shadow-lg); font-size: .92rem; animation: toastIn .3s var(--ease);
}
.toast .i { color: #4ADE80; margin-top: 1px; }
.toast.error .i { color: #FCA5A5; }
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* Demo banner */

/* Legal / prose */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 1.2em; }
.legal-layout { display: grid; gap: 32px; padding-top: 24px; padding-bottom: 72px; }
@media (min-width: 1024px) { .legal-layout { grid-template-columns: 240px 1fr; } .toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }
.toc a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-size: .92rem; }
.toc a:hover, .toc a.active { background: var(--brand-50); color: var(--brand-800); }

/* Pricing */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { position: relative; border: 1px solid transparent; box-shadow: var(--shadow-lg);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-gold) border-box; }
.price-card .price { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; letter-spacing: -.04em; color: var(--brand-950); }
.price-card .price small { font-size: .95rem; color: var(--text-3); font-weight: 500; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.grid-4 > .reveal:nth-child(4n+2), .steps > .reveal:nth-child(3n+2) { transition-delay: .06s; }
.grid-4 > .reveal:nth-child(4n+3), .steps > .reveal:nth-child(3n+3) { transition-delay: .12s; }
.grid-4 > .reveal:nth-child(4n+4) { transition-delay: .18s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
