/* LeaLink UI - built from design-reference/LeaLink-D3-final-screens.pdf (frame 00, style guide). */

/* ---------- Tokens ---------- */
:root {
  --bg: #FFFFFF;
  --surface: #F7F7F5;
  --border: #E9E9E7;
  --text: #37352F;
  --text-2: #787774;
  --text-3: #9B9A97;
  --muted-bg: #F1F1EF;

  --l600: #15803D; --l700: #166534; --l100: #DCFCE7; --l50: #F0FDF4;
  --t600: #2563EB; --t700: #1D4ED8; --t100: #DBEAFE; --t50: #EFF6FF;

  --pending-text: #B45309; --pending-bg: #FEF3C7;
  --accepted-text: #15803D; --accepted-bg: #DCFCE7;
  --declined-text: #787774; --declined-bg: #F1F1EF;
  --error: #DC2626;
  --star: #F59E0B;

  --overlay: rgba(55, 53, 47, .4);
  --shadow-sm: 0 4px 16px rgba(55, 53, 47, .08);
  --shadow-lg: 0 8px 32px rgba(55, 53, 47, .16);

  /* Role colour. Neutral by default (auth screens), overridden per role. */
  --r600: #37352F; --r700: #787774; --r100: #E9E9E7; --r50: #F7F7F5;
  --timer-fill: var(--pending-text);

  --pad: 64px;
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
  --brand-grad: linear-gradient(90deg, #2A2F9C 0%, #3552AE 30%, #5E8F9A 58%, #8FC48A 80%, #AAD675 100%);
  --brand-grad-diag: linear-gradient(135deg, #2A37B5 0%, #5E8F9A 55%, #AAD675 100%);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --header-h: 64px;
}
.role-learner, body[data-role="learner"] { --r600: var(--l600); --r700: var(--l700); --r100: var(--l100); --r50: var(--l50); }
.role-teacher, body[data-role="teacher"] { --r600: var(--t600); --r700: var(--t700); --r100: var(--t100); --r50: var(--t50); --timer-fill: var(--t600); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/24px "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11";
}
body.bg-surface { background: var(--surface); }
body.bg-teacher { background: var(--t50); }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--r600); outline-offset: 2px; }

.t-display { font-size: 56px; line-height: 60px; font-weight: 700; letter-spacing: -.03em; }
.t-h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -.02em; }
.t-h2 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; }
.t-h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.t-body { font-size: 15px; line-height: 24px; }
.t-small { font-size: 14px; line-height: 20px; }
.t-caption { font-size: 13px; line-height: 18px; font-weight: 500; }
.t-micro { font-size: 12px; line-height: 16px; }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--r700); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.strong { font-weight: 600; }
.lead { font-size: 16px; line-height: 24px; color: var(--text-2); }

.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Icons ---------- */
i[data-i] { display: inline-block; width: 16px; height: 16px; flex: none; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.i-fill { fill: currentColor; stroke: none; }
svg.i-12 { width: 12px; height: 12px; } svg.i-14 { width: 14px; height: 14px; }
svg.i-18 { width: 18px; height: 18px; } svg.i-22 { width: 22px; height: 22px; } svg.i-20 { width: 20px; height: 20px; } svg.i-24 { width: 24px; height: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: relative; height: var(--header-h); display: flex; align-items: center;
  padding: 0 40px; border-bottom: 1px solid var(--border); background: #fff; z-index: 50;
}
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { height: 28px; width: auto; flex: none; display: block; }
.logo-word { font-family: var(--font-display); font-size: 20px; line-height: 1; font-weight: 700; letter-spacing: -.01em; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 2px; }
.logo-lockup { display: inline-flex; flex-direction: column; gap: 4px; }
.logo-tagline { font-family: var(--font-display); font-size: 12px; letter-spacing: .02em; color: var(--text-3); }
.nav { display: flex; gap: 24px; margin-left: 40px; align-self: stretch; }
.nav a { display: flex; align-items: center; color: var(--text-2); font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); border-bottom-color: var(--r600); }
.role-switch { position: absolute; left: 50%; transform: translateX(-50%); display: flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.role-switch a { height: 32px; padding: 0 16px; border-radius: 6px; display: flex; align-items: center; font-size: 14px; color: var(--text-2); }
.role-switch a:hover { color: var(--text); background: var(--surface); }
.role-switch a.is-active { color: #fff; font-weight: 600; }
.role-switch a.is-active.learning { background: var(--l600); }
.role-switch a.is-active.teaching { background: var(--t600); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.header-center { position: absolute; left: 50%; transform: translateX(-50%); font-size: 14px; color: var(--text-2); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 6px; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; padding: 0; color: var(--text-2); }
.header-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-2); }
.header-link:hover { color: var(--text); }
.menu-btn { display: none; }

.menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 4px; z-index: 60; display: none; }
.menu.is-open { display: block; }
.menu a, .menu button.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 38px; padding: 0 10px; border: 0; background: none; border-radius: 6px; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; }
.menu a:hover, .menu .menu-item:hover { background: var(--surface); }
.menu .menu-item.is-selected { background: var(--surface); }
.menu .menu-item .check-mark { color: var(--r600); visibility: hidden; }
.menu .menu-item.is-selected .check-mark { visibility: visible; }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }

.drawer { display: none; }

/* ---------- Layout ---------- */
.container { max-width: 1440px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.page { padding-top: 32px; padding-bottom: 80px; }
.band { background: var(--r50); border-bottom: 1px solid var(--r100); }
.band .container { padding-top: 40px; padding-bottom: 36px; }
.band .back-link { margin-bottom: 16px; }
.band .eyebrow { margin-bottom: 8px; }
.band .lead { margin-top: 8px; }
.band-slim .container { padding-top: 18px; padding-bottom: 18px; }
.band-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.split-results { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 32px; align-items: start; }
.sticky { position: sticky; top: 24px; }
.section-gap > * + * { margin-top: 24px; }

.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.back-link:hover { color: var(--r700); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent;
  font: 500 14px/1 "Inter", system-ui, sans-serif; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s; text-decoration: none; user-select: none;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--r600); color: #fff; }
.btn-primary:hover { background: var(--r700); }
.btn-learner { background: var(--l600); color: #fff; } .btn-learner:hover { background: var(--l700); }
.btn-teacher { background: var(--t600); color: #fff; } .btn-teacher:hover { background: var(--t700); }
.btn-dark { background: var(--text); color: #fff; } .btn-dark:hover { background: var(--text-2); }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn:disabled, .btn.is-disabled { background: #EFEFED; color: var(--text-3); border-color: transparent; cursor: not-allowed; }
.btn-secondary:disabled, .btn-secondary.is-disabled { background: #fff; border-color: var(--border); }
.btn-ghost:disabled { background: transparent; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--r600); font-size: 14px; font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { color: var(--r700); text-decoration: underline; }
.link-muted { color: var(--text-2); font-weight: 400; }
.link-muted:hover { color: var(--text); }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fields { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label { font-size: 14px; line-height: 20px; color: var(--text); }
.label .req, .label .opt { color: var(--text-3); }
.from { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; }
.from-pill { font-size: 12px; color: var(--text-2); background: var(--surface); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.helper { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.helper .count { margin-left: auto; white-space: nowrap; }
.error-msg { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--error); }
.is-error .helper .count { color: var(--error); }

.input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); font: 400 15px/22px "Inter", system-ui, sans-serif;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--text-3); }
.input:focus, .input-group:focus-within { outline: none; border-color: var(--r600); box-shadow: 0 0 0 3px var(--r100); }
.input:disabled { background: var(--surface); color: var(--text-2); }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; display: block; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23787774' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.is-error .input, .input.is-error, .is-error .input-group { border-color: var(--error); }
.is-error .input:focus { box-shadow: 0 0 0 3px #FEE2E2; }
.input-icon { position: relative; }
.input-icon > svg.i, .input-icon > i[data-i] { position: absolute; left: 12px; top: 12px; color: var(--text-2); pointer-events: none; }
.input-icon .input { padding-left: 36px; }
.input-group { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.input-group input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0; height: 100%; font: 400 15px "Inter", system-ui, sans-serif; color: var(--text); background: transparent; }
.input-group .affix { color: var(--text-2); font-size: 15px; white-space: nowrap; }
.input-row { display: flex; gap: 12px; align-items: center; }

/* Segmented control */
.seg { display: flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.seg > button { flex: 1; height: 32px; border: 1px solid transparent; border-radius: 4px; background: none; font-size: 14px; color: var(--text-2); cursor: pointer; white-space: nowrap; padding: 0 12px; }
.seg > button:hover { color: var(--text); }
.seg > button.is-active { background: #fff; border-color: var(--border); color: var(--text); box-shadow: 0 1px 2px rgba(55, 53, 47, .06); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.is-error, .is-error > .chips, .is-error > .chip-box { border: 1px solid var(--error); border-radius: 6px; padding: 8px; }
.chip-box { display: grid; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--surface); }
.chip.is-selected { background: var(--r50); border-color: var(--r600); color: var(--r700); }
.chip.is-selected::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--mask-check) center / contain no-repeat; mask: var(--mask-check) center / contain no-repeat; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--muted-bg); font-size: 14px; color: var(--text); white-space: nowrap; }
.tag-chip .x { width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; color: var(--text-2); cursor: pointer; padding: 0; }
.tag-chip .x:hover { background: var(--border); color: var(--text); }
.add-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; background: none; color: var(--text-2); font-size: 14px; cursor: pointer; border-radius: 6px; }
.add-chip:hover { color: var(--text); background: var(--surface); }
.tag-box { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; }
.tag-box input { border: 0; outline: 0; width: 100%; font: 400 15px "Inter", sans-serif; margin-top: 10px; padding: 0 2px; color: var(--text); }
.tag-box input::placeholder { color: var(--text-3); }

/* Subject picker: a text box with search and a grouped dropdown list (same look as .menu). */
.combo { position: relative; }
.combo .input { padding-right: 40px; }
.combo-toggle { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 6px; color: var(--text-2); cursor: pointer; }
.combo-toggle:hover { background: var(--surface); color: var(--text); }
.combo-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 4px; z-index: 40; }
.combo-group { padding: 10px 10px 4px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.combo-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; background: none; border-radius: 6px; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; }
.combo-option small { color: var(--text-3); font-size: 13px; }
.combo-option:hover, .combo-option.is-active { background: var(--surface); }
.combo-option .check-mark { flex: none; color: var(--r600); }
.combo-option[aria-disabled="true"] { color: var(--text-2); cursor: default; }
.combo-empty { padding: 12px 10px; font-size: 14px; color: var(--text-2); }

/* Fields of one subject: grouped extras (NMT preparation, exams) sit in a light box. */
.subfields { display: grid; gap: 20px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.subfields .chip:not(.is-selected), .subfields .input, .subfields .seg { background-color: #fff; }
.subject-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.subject-card-head .eyebrow { margin-bottom: 4px; }
.chip:disabled { opacity: .45; cursor: not-allowed; background: #fff; }
[data-subject-fields]:empty, [data-w-offers]:empty { display: none; }
.field.is-error .avail .cell:not(.on) { border-color: #FCA5A5; }
.field.is-error .avatar { border-color: var(--error); }
.filters-panel [data-subject-fields] .grid-2 { grid-template-columns: minmax(0, 1fr); }
:root { --mask-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

/* Toggle, checkbox, radio */
.toggle { display: inline-flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 15px; line-height: 20px; }
.toggle input { appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 36px; height: 20px; border-radius: 999px; background: #E3E2E0; position: relative; cursor: pointer; transition: background .15s; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.toggle input:checked { background: var(--r600); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle input:disabled { opacity: .45; cursor: not-allowed; }
.toggle input:disabled + span { color: var(--text-3); }
.toggle .sub { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.check, .radio { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; line-height: 22px; }
.check input, .radio input { appearance: none; -webkit-appearance: none; flex: none; margin: 2px 0 0; width: 18px; height: 18px; border: 1px solid #CFCECB; background: #fff; cursor: pointer; }
.check input { border-radius: 4px; }
.check input:checked { background: var(--r600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--r600); }
.radio input { border-radius: 50%; }
.radio input:checked { border: 2px solid var(--r600); background: var(--r600); box-shadow: inset 0 0 0 3px #fff; }
.check input:disabled, .radio input:disabled { background: var(--surface); border-color: var(--border); cursor: not-allowed; }
.check input:disabled + span { color: var(--text-3); }
.check .sub { display: block; font-size: 13px; color: var(--text-2); }
.options { display: grid; gap: 12px; }

/* Range (budget) */
.range-head { display: flex; justify-content: space-between; align-items: baseline; }
.range-value { font-size: 14px; font-weight: 600; }
.range { position: relative; height: 22px; margin: 6px 8px 0; touch-action: none; }
.range-track { position: absolute; left: 0; right: 0; top: 10px; height: 3px; border-radius: 2px; background: #E3E2E0; }
.range-fill { position: absolute; top: 10px; height: 3px; background: var(--r600); }
.range-thumb { position: absolute; top: 3px; width: 17px; height: 17px; margin-left: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--r600); cursor: grab; }
.range-thumb:active { cursor: grabbing; }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.budget { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; align-items: end; }

/* Tabs */
.tabs { display: flex; gap: 8px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 15px; color: var(--text-2); cursor: pointer; }
.tab:hover { background: var(--surface); }
.tab .count { color: var(--text-3); }
.tab.is-active { background: var(--r600); border-color: var(--r600); color: #fff; }
.tab.is-active .count { color: rgba(255, 255, 255, .85); }

/* Badges and tags */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; }
.badge-pending { background: var(--pending-bg); color: var(--pending-text); }
.badge-accepted, .badge-match, .badge-trial { background: var(--accepted-bg); color: var(--accepted-text); }
.badge-declined { background: var(--declined-bg); color: var(--declined-text); }
.badge-active { background: var(--t100); color: var(--t700); }
.badge-role { background: var(--r100); color: var(--r700); }
.badge-verified { background: #fff; border: 1px solid var(--border); color: var(--text-2); }
.badge-wide { display: flex; height: 22px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; background: var(--muted-bg); color: var(--text-2); font-size: 13px; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* Timer */
.timer { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; width: 160px; flex: none; }
.timer-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; }
.timer-bar { width: 100%; height: 4px; border-radius: 999px; background: #E9E9E7; overflow: hidden; }
.timer-bar > span { display: block; height: 100%; background: var(--timer-fill); border-radius: 999px; }
.timer.is-urgent .timer-label { color: var(--pending-text); }
.timer.is-urgent .timer-bar > span { background: var(--pending-text); }

/* Avatar, rating, progress */
.avatar { --s: 48px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); font-weight: 700; font-size: calc(var(--s) * .34); letter-spacing: .02em; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-32 { --s: 32px; font-size: 11px; } .av-40 { --s: 40px; font-size: 14px; } .av-44 { --s: 44px; font-size: 15px; }
.av-48 { --s: 48px; } .av-56 { --s: 56px; } .av-72 { --s: 72px; } .av-112 { --s: 112px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.rating b { color: var(--text); font-weight: 600; }
.star { color: var(--star); }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars .off { color: #E3E2E0; }
.progress { height: 5px; border-radius: 999px; background: #E9E9E7; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--r600); border-radius: 999px; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 28px; }
.card-sm { padding: 20px; }
.card > h2 + *, .card-title + * { margin-top: 20px; }
.card-title { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.cards > * + * { margin-top: 24px; }
.list > * + * { margin-top: 16px; }
.list-sm > * + * { margin-top: 12px; }

/* Teacher card */
.tcard { display: grid; grid-template-columns: minmax(0, 1fr) 248px; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.tcard-main { display: flex; gap: 20px; padding: 24px; min-width: 0; }
.tcard-body { min-width: 0; }
.tcard-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tcard-name h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
.tcard-name h3 a:hover { text-decoration: underline; }
.tcard-headline { font-size: 16px; line-height: 24px; color: var(--text-2); margin-top: 6px; }
.tcard .tags { margin-top: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; line-height: 20px; color: var(--text-2); margin-top: 12px; }
.tcard-side { background: var(--surface); border-left: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tcard-side .row-between .link { color: var(--text-2); font-weight: 400; font-size: 13px; }
.price { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.01em; }
.price small { font-size: 14px; font-weight: 400; color: var(--text-2); letter-spacing: 0; margin-left: 2px; }
.price-lg { font-size: 34px; line-height: 40px; }
.tcard .mobile-report { display: none; }

/* Request / student cards */
.rcard { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px; }
.rcard-row { display: flex; align-items: center; gap: 16px; }
.rcard-info { flex: 1; min-width: 0; }
.rcard-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rcard-title h3 { font-size: 17px; line-height: 24px; font-weight: 700; }
.rcard-sub { font-size: 15px; line-height: 22px; color: var(--text-2); }
.rcard-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.note { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 8px 12px; border-radius: 6px; background: var(--surface); font-size: 14px; line-height: 20px; color: var(--text-2); }
.message { margin-top: 16px; padding: 12px 16px; border-radius: 6px; background: var(--surface); font-size: 15px; line-height: 22px; }
.inreq .tags { margin-top: 16px; }
.inreq-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; }
.scard { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; }
.scard h3 { font-size: 16px; line-height: 22px; font-weight: 700; }
.scard .rcard-sub { font-size: 14px; line-height: 20px; }
.scard .note-mobile { display: none; }

/* Feedback */
.empty { border: 1px dashed #DEDDDA; border-radius: 8px; padding: 72px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--text-2); margin-bottom: 20px; }
.empty h3 { font-size: 17px; line-height: 24px; font-weight: 700; }
.empty p { margin-top: 6px; max-width: 440px; color: var(--text-2); }
.empty .chips { justify-content: center; max-width: 520px; margin-top: 20px; }
.empty-actions { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.error-summary { display: flex; gap: 12px; padding: 13px 20px; border: 1px solid var(--error); border-radius: 8px; background: #fff; }
.error-summary > svg { color: var(--error); margin-top: 3px; }
.error-summary strong { display: block; color: var(--error); font-weight: 700; font-size: 15px; line-height: 20px; }
.error-summary span { font-size: 13px; color: var(--text-2); }

.toast-region { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 300; width: max-content; max-width: calc(100% - 32px); }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 8px; background: var(--text); color: #fff; font-size: 15px; line-height: 20px; box-shadow: var(--shadow-lg); animation: toast-in .18s ease-out; }
.toast button { border: 0; background: none; color: #fff; cursor: pointer; padding: 2px; display: grid; place-items: center; }
.toast .undo { font-weight: 700; text-decoration: underline; padding: 0 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

dialog.dialog { width: 520px; max-width: calc(100% - 32px); padding: 0; border: 0; border-radius: 8px; background: #fff; color: var(--text); box-shadow: var(--shadow-lg); margin: 160px auto auto; }
dialog.dialog::backdrop { background: var(--overlay); }
.dialog-head { display: flex; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.dialog-head h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.dialog-head p { margin-top: 4px; color: var(--text-2); }
.dialog-body { padding: 16px 24px 20px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); }
.star-input { display: flex; align-items: center; gap: 4px; }
.star-input button { border: 0; background: none; padding: 2px; cursor: pointer; color: #E3E2E0; }
.star-input button.on { color: var(--star); }
.star-input .star-label { margin-left: 12px; font-size: 15px; }

/* Disclosure, upload */
.disclosure { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.disclosure > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: var(--surface); cursor: pointer; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary strong { display: block; font-size: 15px; line-height: 20px; font-weight: 700; }
.disclosure > summary span { display: block; font-size: 13px; color: var(--text-2); }
.disclosure > summary .chev { transition: transform .15s; color: var(--text-2); }
.disclosure[open] > summary { border-bottom: 1px solid var(--border); }
.disclosure[open] > summary .chev { transform: rotate(180deg); }
.disclosure-body { padding: 20px 16px; display: grid; gap: 20px; }
.upload { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px dashed #DEDDDA; border-radius: 8px; cursor: pointer; }
.upload:hover { background: var(--surface); }
.upload-icon { width: 40px; height: 40px; border-radius: 6px; background: var(--surface); display: grid; place-items: center; color: var(--text-2); flex: none; }
.upload strong { display: block; color: var(--r600); font-weight: 500; font-size: 15px; }
.upload span { font-size: 13px; color: var(--text-2); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; }
.file-row strong { display: block; font-weight: 400; font-size: 15px; line-height: 20px; }
.file-row span { font-size: 12px; color: var(--text-2); }

/* Availability grid */
.avail { display: grid; grid-template-columns: 110px repeat(7, minmax(0, 1fr)); gap: 6px; align-items: center; }
.avail .day { text-align: center; font-size: 13px; font-weight: 600; color: var(--text-2); }
.avail .slot { font-size: 14px; line-height: 18px; }
.avail .slot small { display: block; font-size: 12px; color: var(--text-2); }
.avail .cell { height: 40px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); display: grid; place-items: center; color: #fff; padding: 0; }
.avail button.cell { cursor: pointer; }
.avail button.cell:hover { border-color: var(--r600); }
.avail .cell.on { background: var(--r600); border-color: var(--r600); }
.avail .cell:not(.on) > * { visibility: hidden; }
.avail .d-short { display: none; }

/* Facts (label/value) */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; }
.fact small { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.fact div { font-size: 15px; line-height: 22px; }

/* ---------- Teacher page ---------- */
.split-profile { grid-template-columns: minmax(0, 904px) 360px; justify-content: space-between; }
.profile-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 24px; row-gap: 2px; align-items: center; }
.profile-head .avatar { grid-row: 1 / span 2; }
.profile-head .tcard-name { gap: 10px; align-self: end; }
.profile-rest { grid-column: 2; align-self: start; }
.profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 10px; font-size: 15px; color: var(--text-2); }
.tp-section { padding: 36px 0; border-top: 1px solid var(--border); }
.profile-head + .tp-section, .profile-head + .show-mobile + .tp-section { border-top: 0; padding-top: 44px; }
.tp-section > h2, .tp-section h2 { font-size: 22px; line-height: 28px; font-weight: 700; margin-bottom: 16px; }
.about { color: var(--text-2); font-size: 16px; line-height: 24px; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.feature-list li { display: flex; align-items: center; gap: 10px; }
.feature-list svg { color: var(--text-2); }
.feature-list svg.ok { color: var(--l600); }
.review { padding: 20px 0; border-bottom: 1px solid var(--border); }
.review p { margin-top: 12px; }

/* ---------- Home: learner / teacher split (frame 01) ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.duo-half { min-height: 600px; display: flex; flex-direction: column; justify-content: center; padding: 64px 112px; }
.duo-half.learner { background: var(--l50); }
.duo-half.teacher { background: var(--t50); }
.duo-half .t-display { margin-top: 20px; }
.checklist { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 12px; font-size: 16px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist svg { color: var(--r600); margin-top: 4px; }
.duo-half .btn { align-self: flex-start; }
.or-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); }
.how { padding: 72px 112px 88px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.how-card { border: 1px solid var(--border); border-radius: 8px; padding: 28px; }
.how-card .step-no { font-size: 13px; font-weight: 600; color: var(--text-2); }
.how-card h3 { font-size: 22px; line-height: 28px; font-weight: 700; margin-top: 8px; }
.how-card ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.how-card li { position: relative; padding-left: 18px; color: var(--text-2); font-size: 16px; line-height: 24px; }
.how-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--l600); }
.how-card li.teacher::before { background: var(--t600); }
.how-card li b { color: var(--text); }
.site-footer { border-top: 1px solid var(--border); padding: 24px 112px; display: flex; justify-content: space-between; gap: 24px; font-size: 13px; color: var(--text-2); }

/* ---------- Auth ---------- */
.auth { padding: 80px 16px; display: flex; justify-content: center; align-items: flex-start; gap: 48px; }
.auth-card { width: 440px; max-width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 40px; }
.auth-card h1 { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.02em; }
.auth-card .sub { margin-top: 8px; color: var(--text-2); }
.auth-card .fields { margin-top: 24px; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.g-mark { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--text); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.auth-foot { text-align: center; color: var(--text-2); }
.auth-foot a { color: var(--text); font-weight: 700; }
.role-learner .auth-foot a, .role-teacher .auth-foot a { color: var(--r600); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-card { text-align: left; border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; background: #fff; cursor: pointer; }
.role-card strong { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.role-card span { font-size: 12px; color: var(--text-2); }
.role-card.is-selected { border-color: var(--r600); background: var(--r50); }
.role-card.is-selected strong { color: var(--r700); }
.role-card:not(.is-selected) strong svg { display: none; }
.summary-card { width: 360px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.summary-card h2 { font-size: 18px; line-height: 24px; font-weight: 700; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.summary-grid small { display: block; font-size: 13px; color: var(--text-2); }
.quote { color: var(--text-2); font-size: 15px; }

/* ---------- Learner / teacher home ---------- */
.home-layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.home-aside { background: var(--r50); border-right: 1px solid var(--r100); padding: 48px; }
.home-main { padding: 48px 64px 80px; }
.home-layout.teacher { grid-template-columns: minmax(0, 1fr) 400px; }
.home-layout.teacher .home-aside { border-right: 0; border-left: 1px solid var(--r100); order: 2; }
.home-layout.teacher .home-main { padding-right: 64px; max-width: 1040px; }
.limit-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.limit-num { font-size: 15px; color: var(--text-2); }
.limit-num b { font-size: 24px; color: var(--text); font-weight: 700; }
.page-hello { margin-top: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.profile-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.profile-card h3 { font-size: 18px; line-height: 24px; font-weight: 700; }
.review-note { color: var(--pending-text); font-size: 14px; margin-top: 16px; }

/* ---------- Wizard ---------- */
.wizard-band { background: var(--t50); border-bottom: 1px solid var(--t100); }
.wizard-band .container { padding-top: 20px; padding-bottom: 20px; }
.wizard-band .progress { height: 5px; margin-top: 12px; }
.wizard-band .progress > span { background: var(--t600); transition: width .25s; }
.wizard { display: grid; grid-template-columns: 264px minmax(0, 760px); gap: 64px; padding-top: 40px; padding-bottom: 80px; }
.steps { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px; border: 0; background: none; font-size: 15px; color: var(--text-2); cursor: pointer; text-align: left; }
.step:hover { background: var(--surface); }
.step-num { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); flex: none; }
.step.is-done { color: var(--text); }
.step.is-done .step-num { background: var(--t600); border-color: var(--t600); color: #fff; }
.step.is-done .step-num .n { display: none; }
.step:not(.is-done) .step-num svg { display: none; }
.step.is-current { background: var(--t50); color: var(--text); font-weight: 700; }
.step.is-current .step-num { background: #fff; border: 2px solid var(--t600); color: var(--t600); }
.step.is-current .step-num .n { display: inline; }
.step.is-current .step-num svg { display: none; }
.step.is-current.preview .step-num svg { display: block; }
.step.preview:not(.is-current) .step-num svg { display: block; }
.wizard-title { margin-top: 8px; }
.wizard-main .lead { margin-top: 12px; margin-bottom: 28px; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 24px; }
.wizard-panel > * + * { margin-top: 24px; }
.info-strip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; background: var(--surface); font-size: 14px; color: var(--text-2); }
.info-strip.role { background: var(--r50); color: var(--text); }
.info-strip.role svg { color: var(--r600); }
.preview-box { background: var(--surface); border-radius: 8px; padding: 24px; }
.preview-box .tcard { grid-template-columns: minmax(0, 1fr) 248px; }
.review-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; }
.review-steps strong { display: block; font-weight: 400; font-size: 15px; }
.review-steps p { font-size: 13px; color: var(--text-2); margin: 4px 0; }

/* ---------- Under review ---------- */
.status-card { max-width: 640px; margin: 80px auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 40px; }
.status-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--t100); color: var(--t700); display: grid; place-items: center; }
.timeline { display: grid; gap: 16px; margin: 28px 0; padding: 0; }
.timeline li { display: flex; gap: 14px; list-style: none; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1px solid var(--border); color: var(--text-2); }
.tl-dot.done { background: var(--t600); border-color: var(--t600); color: #fff; }
.tl-dot.now { border: 2px solid var(--t600); color: var(--t600); }
.timeline strong { display: block; font-weight: 400; font-size: 15px; line-height: 20px; }
.timeline span { font-size: 13px; color: var(--text-2); }

/* ---------- Chat ---------- */
body.chat-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.chat { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr); }
.chat-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.chat-list-head { padding: 24px 16px 12px; }
.chat-list-head h2 { font-size: 22px; line-height: 28px; font-weight: 700; margin-bottom: 16px; }
.conv { display: flex; gap: 12px; padding: 12px 16px; border-left: 3px solid transparent; cursor: pointer; background: none; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; }
.conv:hover { background: var(--surface); }
.conv.is-active { background: var(--r50); border-left-color: var(--r600); }
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top b { font-size: 15px; line-height: 20px; }
.conv-top time { font-size: 13px; color: var(--text-2); }
.conv-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.conv-bottom span { font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread { min-width: 20px; height: 20px; border-radius: 999px; background: var(--r600); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { padding: 16px 24px; border-bottom: 1px solid var(--border); background: #fff; }
.chat-head h2 { font-size: 18px; line-height: 24px; font-weight: 700; }
.chat-head .back, .chat-head .more, .chat-head .mobile-started { display: none; }
.req-summary { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 12px; padding: 10px 12px; border-radius: 6px; background: var(--surface); font-size: 13px; color: var(--text-2); }
.req-summary b { color: var(--text-2); font-weight: 700; }
.contact-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.thread { flex: 1; min-height: 0; overflow: auto; background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.thread .contact-line { display: none; }
.sys { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.msg { max-width: 62%; align-self: flex-start; }
.msg.me { align-self: flex-end; }
.bubble { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 15px; line-height: 22px; }
.msg.me .bubble { background: var(--r50); border-color: var(--r100); }
.msg time { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.msg.me time { text-align: right; }
.composer { display: flex; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); background: #fff; }
.composer .btn .lbl { display: inline; }

/* ---------- Settings ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 800px); gap: 48px; padding-top: 32px; padding-bottom: 80px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; align-self: start; }
.side-nav a { height: 36px; display: flex; align-items: center; padding: 0 12px; border-radius: 6px; color: var(--text-2); font-size: 15px; }
.side-nav a:hover { color: var(--text); }
.side-nav a.is-active { background: var(--surface); color: var(--text); }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-box { border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.role-box.is-current { border-color: var(--l600); background: var(--l50); }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; }
.setting-row + .setting-row { border-top: 1px solid var(--border); }
.setting-row strong { display: block; font-weight: 400; }
.setting-row span { font-size: 13px; color: var(--text-2); }

/* ---------- Style guide + screens index ---------- */
.sg-section { padding: 48px 0; border-top: 1px solid var(--border); }
.sg-section > h2 { font-size: 26px; line-height: 32px; font-weight: 700; }
.sg-section > p.muted { margin-top: 6px; margin-bottom: 28px; }
.sg-label { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.swatches.eight { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.swatch-chip { height: 64px; border-radius: 8px; border: 1px solid rgba(55, 53, 47, .08); }
.swatch b { display: block; margin-top: 8px; font-size: 14px; }
.swatch code { font-size: 12px; color: var(--text-2); }
.swatch span { display: block; font-size: 12px; color: var(--text-2); line-height: 16px; }
.type-row { display: grid; grid-template-columns: 140px 220px 1fr; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.type-row code { font-size: 12px; color: var(--text-2); }
.sg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
.sg-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.btn-table { display: grid; grid-template-columns: 220px repeat(3, 1fr); gap: 16px; align-items: center; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 16px 8px; }
.icon-grid div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: ui-monospace, monospace; font-size: 12px; color: var(--text-2); }
.icon-grid svg { color: var(--text); }
.screens-group { margin-top: 32px; }
.screens-group h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 12px; }
.screen-link { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.screen-link:hover { border-color: var(--text-3); }
.screen-link + .screen-link { margin-top: 8px; }
.screen-link code { font-size: 13px; color: var(--text-2); }
.screen-link small { display: block; color: var(--text-2); font-size: 13px; line-height: 18px; }

/* ---------- Helpers for responsive swaps ---------- */
@media (min-width: 900px) { .show-mobile { display: none !important; } }
.mobile-bar, .results-tools, .filters-close { display: none; }
.select-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 220px; cursor: pointer; text-align: left; }
.sort { display: flex; align-items: center; gap: 12px; }
.sort .menu { width: 220px; }

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
  :root { --pad: 32px; }
  .duo-half { padding: 56px 48px; }
  .how, .site-footer { padding-left: 48px; padding-right: 48px; }
  .home-aside { padding: 40px 32px; }
  .home-main { padding: 40px 32px 80px; }
  .home-layout { grid-template-columns: 340px minmax(0, 1fr); }
  .home-layout.teacher { grid-template-columns: minmax(0, 1fr) 340px; }
  .home-layout.teacher .home-main { padding-right: 32px; }
  .wizard { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .settings { grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
  .tcard { grid-template-columns: minmax(0, 1fr) 220px; }
}

/* ---------- Mobile (design frames 35-41, 375 px) ---------- */
@media (max-width: 899px) {
  :root { --pad: 16px; --header-h: 56px; }
  body { font-size: 15px; }
  .t-display { font-size: 36px; line-height: 40px; }
  .t-h1 { font-size: 24px; line-height: 32px; }
  .hide-mobile { display: none !important; }
  .sort { width: 100%; }
  .sort .select-btn, .sort .menu { width: 100%; }

  .site-header { padding: 0 16px; }
  .nav, .role-switch, .header-center, .account-btn .chev, .header-link .lbl-desktop { display: none; }
  .header-right { gap: 8px; }
  .menu-btn { display: grid; }
  .drawer { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); padding: 12px 16px 16px; }
  .drawer.is-open { display: block; }
  .drawer a.drawer-link { display: flex; height: 44px; align-items: center; font-size: 16px; color: var(--text-2); border-bottom: 1px solid var(--border); }
  .drawer a.drawer-link.is-active { color: var(--text); font-weight: 600; }
  .drawer .role-switch { display: flex; position: static; transform: none; margin-top: 16px; }
  .drawer .role-switch a { flex: 1; justify-content: center; }

  .band .container { padding-top: 24px; padding-bottom: 24px; }
  .band-row { flex-direction: column; align-items: stretch; }
  .split, .split-results { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .page { padding-top: 16px; padding-bottom: 48px; }
  .card { padding: 16px; }
  .card-title { font-size: 20px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }

  /* Home */
  .duo { grid-template-columns: 1fr; }
  .duo-half { min-height: 0; padding: 48px 16px 40px; }
  .duo-half .btn { align-self: stretch; }
  .checklist { font-size: 15px; margin: 20px 0 24px; }
  .or-badge { display: none; }
  .how { padding: 40px 16px; }
  .how-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .how-card { padding: 20px; }
  .how .row-between .muted { display: none; }
  .site-footer { padding: 24px 16px; flex-direction: column; gap: 4px; font-size: 12px; }

  /* Auth */
  .auth { flex-direction: column; align-items: stretch; padding: 24px 16px 48px; gap: 16px; }
  .auth-card { width: auto; padding: 24px 16px; }
  .auth-card h1 { font-size: 24px; line-height: 32px; }
  .summary-card { width: auto; }

  /* Teacher card (mobile variant) */
  .tcard { grid-template-columns: 1fr; }
  .tcard-main { padding: 16px; gap: 12px; display: grid; grid-template-columns: 56px 1fr; }
  .tcard-main .avatar { --s: 56px; font-size: 19px; }
  .tcard-body { display: contents; }
  .tcard-name { grid-column: 2; align-self: center; }
  .tcard-name h3 { width: 100%; font-size: 18px; line-height: 24px; }
  .tcard-rest { grid-column: 1 / -1; }
  .tcard-side { border-left: 0; border-top: 1px solid var(--border); padding: 16px; }
  .tcard-side .price-row { order: -1; display: flex; justify-content: space-between; align-items: center; }
  .tcard-side .side-top { display: none; }
  .tcard-side .btn-secondary { display: none; }
  .tcard .mobile-report { display: inline-flex; align-self: center; }
  .results-tools { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filters-panel { display: none; }
  .filters-panel.is-open { display: block; position: fixed; inset: 0; z-index: 120; overflow: auto; border-radius: 0; border: 0; padding: 16px 16px 96px; }
  .filters-close { display: flex !important; }

  /* Teacher page */
  .split-profile { grid-template-columns: minmax(0, 1fr); }
  .profile-head { grid-template-columns: 72px minmax(0, 1fr); column-gap: 16px; row-gap: 12px; }
  .profile-head .avatar { --s: 72px; font-size: 24px; grid-row: 1; }
  .profile-head .t-h1 { font-size: 24px; width: 100%; }
  .profile-head .tcard-name { gap: 8px; align-self: center; }
  .profile-rest { grid-column: 1 / -1; }
  .profile-rest .tcard-headline { font-size: 16px !important; margin-top: 0; }
  .profile-meta { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 14px; }
  .tp-section { padding: 28px 0; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: #fff; border-top: 1px solid var(--border); }
  .mobile-bar .btn { flex: 1; }
  body.has-mobile-bar { padding-bottom: 76px; }
  .avail { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 4px; }
  .avail .cell { height: 34px; }
  .avail .d-full { display: none; }
  .avail .d-short { display: inline; }
  .avail .slot small { font-size: 11px; }
  .review-head { flex-wrap: wrap; }

  /* Request form */
  .form-footer { flex-direction: column; align-items: stretch; }
  .form-footer .btn { display: none; }

  /* Homes */
  .home-layout, .home-layout.teacher { grid-template-columns: 1fr; min-height: 0; }
  .home-aside, .home-layout.teacher .home-aside { order: 0; border: 0; border-bottom: 1px solid var(--r100); padding: 24px 16px; }
  .home-main, .home-layout.teacher .home-main { padding: 24px 16px 48px; }
  .home-aside .t-h1 { margin-bottom: 0; }
  .tabs.fill { display: flex; }
  .tabs.fill .tab { flex: 1; justify-content: center; padding: 0 8px; }
  .rcard { padding: 16px; }
  .rcard-row { flex-wrap: wrap; align-items: flex-start; }
  .rcard-row .avatar { --s: 40px; font-size: 14px; }
  .rcard-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .rcard-actions .timer { width: 100%; align-items: flex-end; }
  .rcard-actions .btn { width: 100%; }
  .rcard-info .badge { order: 2; }
  .inreq .rcard-row .timer { width: 100%; }
  .inreq-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .inreq-actions .btn-ghost { display: none; }
  .scard { flex-wrap: wrap; padding: 16px; }
  .scard .rcard-actions { flex-direction: column; }
  .scard .rcard-sub .desk { display: none; }
  .scard .note-mobile { display: block; width: 100%; font-size: 14px; color: var(--text-2); }
  .section-head { flex-direction: column; gap: 4px; }
  .home-main > .hide-mobile + .section-head { margin-top: 0 !important; }

  /* Wizard */
  .wizard { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .steps { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .step { flex: none; }
  .step .lbl { display: none; }
  .step.is-current .lbl { display: inline; }
  .wizard-band .container { padding-top: 14px; padding-bottom: 14px; }
  .review-steps { grid-template-columns: 1fr; }
  .preview-box { padding: 12px; }
  .preview-box .tcard { grid-template-columns: 1fr; }

  /* Chat */
  .chat { grid-template-columns: 1fr; }
  .chat-list { display: none; border-right: 0; }
  .chat.show-list .chat-list { display: flex; }
  .chat.show-list .chat-main { display: none; }
  .chat-head { padding: 12px 16px; }
  .chat-head .back, .chat-head .more { display: grid; }
  .chat-head .head-actions { display: none; }
  .chat-head .mobile-started { display: flex; margin-top: 12px; }
  .chat-head .contact-line { display: none; }
  .thread .contact-line { display: flex; margin-top: 0; }
  .thread { padding: 16px; }
  .msg { max-width: 72%; }
  .composer { padding: 12px 16px; }
  .composer .btn .lbl { display: none; }
  .composer .btn { width: 40px; padding: 0; }

  /* Settings */
  .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .settings > *, .wizard > * { min-width: 0; }
  .label-row { flex-wrap: wrap; }
  .row:has(> .btn) { flex-wrap: wrap; }
  .side-nav { flex-direction: row; overflow-x: auto; position: static; }
  .role-cards { grid-template-columns: 1fr; }
  .status-card { margin: 24px 16px; padding: 24px 16px; }

  dialog.dialog { margin: auto auto 0; max-width: 100%; width: 100%; border-radius: 12px 12px 0 0; }

  .auth-card .btn-block { white-space: normal; height: auto; min-height: 48px; padding-top: 10px; padding-bottom: 10px; line-height: 20px; }
  .sg-grid > *, .sg-grid-4 > * { min-width: 0; }
  .sg-section .tabs, .sg-section .row { flex-wrap: wrap; }
  .swatches, .swatches.eight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-row { grid-template-columns: 1fr; gap: 4px; }
  .sg-grid, .sg-grid-4 { grid-template-columns: 1fr; }
  .btn-table { grid-template-columns: 1fr 1fr; }
  .screen-link { grid-template-columns: 40px 1fr; }
  .screen-link code { display: none; }
}

/* =====================================================================
   Motion + network hero.
   Principles from the "grid + nodes" hero brief, adapted to LeaLink:
   light palette instead of a video, learner green / teacher blue nodes,
   brand gradient from the logo. Gutter 20 px (mobile) / 35 px (md+).
   ===================================================================== */

/* ---------- Entrance animations (expo-out, 18 px / 20 px / 0.85) ---------- */
@keyframes fadeUp       { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn       { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft  { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn      { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes nodeIn       { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
@keyframes gridReveal   { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes gridRevealH  { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes barGrow      { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dialogIn     { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes backdropIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn      { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.anim-fade-up     { opacity: 0; animation: fadeUp .9s var(--ease-out) forwards; }
.anim-fade-in     { opacity: 0; animation: fadeIn .8s var(--ease-out) forwards; }
.anim-slide-left  { opacity: 0; animation: slideInLeft .8s var(--ease-out) forwards; }
.anim-slide-right { opacity: 0; animation: slideInRight .8s var(--ease-out) forwards; }
.anim-scale-in    { opacity: 0; animation: scaleIn .7s var(--ease-out) forwards; }
.anim-node-in     { opacity: 0; animation: nodeIn .7s var(--ease-out) forwards; }
.anim-grid-v      { opacity: 0; transform-origin: top;  animation: gridReveal 1.2s var(--ease-out) forwards; }
.anim-grid-h      { opacity: 0; transform-origin: left; animation: gridRevealH 1.2s var(--ease-out) forwards; }

/* Scroll / load reveal added by JS (stagger via --rd) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--rd, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

.progress > span, .timer-bar > span { transform-origin: left; animation: barGrow 1.1s var(--ease-out) .35s both; }
dialog.dialog[open] { animation: dialogIn .45s var(--ease-out); }
dialog.dialog[open]::backdrop { animation: backdropIn .35s var(--ease-out); }
[data-panel]:not([hidden]) { animation: panelIn .45s var(--ease-out); }
.menu.is-open { animation: panelIn .25s var(--ease-out); }
.nav a { position: relative; transition: color .2s; }
.btn, .chip, .tab, .seg > button, .conv, .step { transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.tcard, .rcard, .scard, .how-card { transition: border-color .25s var(--ease-out); }
.tcard:hover, .rcard:hover, .scard:hover, .how-card:hover { border-color: #D6D5D2; }

/* ---------- Grid lines + plus marks (shared by hero, bands, sections) ---------- */
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.gl-v { position: absolute; top: 0; height: 100%; width: 1px; background: rgba(55, 53, 47, .06); }
.gl-h { position: absolute; left: 0; width: 100%; height: 1px; background: rgba(55, 53, 47, .06); }
.plus { position: absolute; width: 0; height: 0; }
.plus::before, .plus::after { content: ""; position: absolute; background: rgba(55, 53, 47, .45); transform: translate(-50%, -50%); }
.plus::before { width: 10px; height: 1px; }
.plus::after { width: 1px; height: 10px; }
.band, .wizard-band { position: relative; }
.band > .container, .wizard-band > .container { position: relative; z-index: 1; }
.band .plus::before, .band .plus::after, .wizard-band .plus::before, .wizard-band .plus::after { background: var(--r600); opacity: .45; }
.band .gl-v, .wizard-band .gl-v { background: rgba(55, 53, 47, .045); }

/* ---------- Hero ---------- */
html { scroll-behavior: smooth; }
.hero { position: relative; height: 100vh; height: 100svh; min-height: 660px; overflow: hidden; background: linear-gradient(90deg, #F5FCF7 0%, #FFFFFF 42%, #FFFFFF 58%, #F4F8FF 100%); }
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; will-change: transform; }
.blob-l { width: 70vw; height: 70vw; left: -24vw; bottom: -34vw; background: radial-gradient(closest-side, rgba(21, 128, 61, .16), rgba(21, 128, 61, 0)); animation: driftA 22s ease-in-out infinite alternate; }
.blob-t { width: 64vw; height: 64vw; right: -22vw; top: -30vw; background: radial-gradient(closest-side, rgba(37, 99, 235, .15), rgba(37, 99, 235, 0)); animation: driftB 26s ease-in-out infinite alternate; }
.blob-m { width: 40vw; height: 40vw; left: 40vw; top: 26vh; background: radial-gradient(closest-side, rgba(111, 155, 151, .12), rgba(111, 155, 151, 0)); animation: driftC 30s ease-in-out infinite alternate; }
@keyframes driftA { to { transform: translate(8vw, -6vh) scale(1.08); } }
@keyframes driftB { to { transform: translate(-7vw, 8vh) scale(1.1); } }
@keyframes driftC { to { transform: translate(-10vw, 6vh) scale(.92); } }
.hero-layer { position: relative; z-index: 1; width: 100%; height: 100%; }

.hero-nav { position: absolute; top: 0; left: 0; z-index: 6; width: 100%; display: flex; align-items: center; padding: 27px 35px; }
.hero-nav-left { display: flex; align-items: center; gap: 40px; }
.hero-nav .logo-mark { height: 30px; }
.hero-nav .logo-word { font-size: 22px; }
.hero-links { display: flex; align-items: center; gap: 40px; }
.nav-item { position: relative; display: flex; align-items: baseline; gap: 3px; font-size: 14px; line-height: 17px; color: var(--text); white-space: nowrap; }
.nav-item .num { color: var(--text-3); font-size: 13px; }
.nav-item.l .num { color: rgba(21, 128, 61, .8); }
.nav-item.t .num { color: rgba(37, 99, 235, .8); }
.nav-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-io); }
.nav-item:hover::after { transform: scaleX(1); transform-origin: left; }
.hero-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.hero-fact { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 15.6px; color: var(--text-2); white-space: nowrap; }
.hero-chip { background: var(--text); color: #fff; border-radius: 3px; padding: 2px 5px; font-size: 12px; line-height: 15.6px; letter-spacing: .03em; }
.hero-right .btn { height: 36px; }
.hero-right .hero-chip + .btn { margin-left: 20px; }
.hamburger { display: none; position: relative; margin-left: auto; width: 40px; height: 40px; border: 0; background: none; padding: 0; color: var(--text); cursor: pointer; }
.hamburger > span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .3s var(--ease-io), transform .3s var(--ease-io); }
.hamburger .hb-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.hero.menu-open .hamburger .hb-open { opacity: 0; transform: rotate(90deg) scale(.5); }
.hero.menu-open .hamburger .hb-close { opacity: 1; transform: none; }

.hero-title { position: absolute; top: 178px; left: 35px; z-index: 4; max-width: 560px; margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 68px; line-height: 1em; letter-spacing: -.035em; color: var(--text); }
.hero-title .l { color: var(--l600); }
.hero-title .t { color: var(--t600); }
.hero-sub { position: absolute; left: 35px; top: calc(178px + 3em + 28px); z-index: 4; font-size: 68px; }
.hero-sub span { display: block; font-family: var(--font-display); font-size: 13px; line-height: 15.6px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }

/* Network (3D) */
.network { position: absolute; inset: 0; z-index: 2; pointer-events: none; perspective: 1400px; }
.network-3d { position: absolute; inset: 0; transform-style: preserve-3d; }
.net-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.node { position: absolute; transform: translate(-50%, -50%) translateZ(var(--z, 0px)); transform-style: preserve-3d; }
.node-float { transform-style: preserve-3d; animation: bob 7s ease-in-out infinite alternate; animation-delay: var(--fd, 0s); }
@keyframes bob { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
.node-in { position: relative; transform-style: preserve-3d; }
.sq { position: relative; display: block; width: 100px; height: 100px; border: 1px solid var(--r600); background: rgba(255, 255, 255, .72); }
.sq::after { content: ""; position: absolute; inset: 10px; border: 1px dashed var(--r100); }
.sq-depth { position: absolute; inset: 0; border: 1px solid var(--r100); background: var(--r50); transform: translate(12px, 12px) translateZ(-24px); }
.cube-wrap { --cs: 104px; width: var(--cs); height: var(--cs); transform-style: preserve-3d; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: cubeSpin 26s linear infinite; }
@keyframes cubeSpin { from { transform: rotateX(-22deg) rotateY(0deg); } to { transform: rotateX(-22deg) rotateY(360deg); } }
.face { position: absolute; inset: 0; display: grid; place-items: center; border: 1px solid rgba(55, 53, 47, .5); background: rgba(255, 255, 255, .8); }
.face .logo-mark { height: 46%; }
.face small { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--text-2); }
.f-front  { transform: translateZ(calc(var(--cs) / 2)); }
.f-back   { transform: rotateY(180deg) translateZ(calc(var(--cs) / 2)); }
.f-right  { transform: rotateY(90deg) translateZ(calc(var(--cs) / 2)); }
.f-left   { transform: rotateY(-90deg) translateZ(calc(var(--cs) / 2)); }
.f-top    { transform: rotateX(90deg) translateZ(calc(var(--cs) / 2)); background: linear-gradient(135deg, rgba(42, 55, 181, .14), rgba(170, 214, 117, .22)); }
.f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cs) / 2)); background: linear-gradient(135deg, rgba(42, 55, 181, .1), rgba(170, 214, 117, .16)); }
.net-label { position: absolute; }
.net-label b { display: block; font-size: 13px; line-height: 15.6px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; color: var(--text); }
.net-label b.l { color: var(--l700); }
.net-label b.t { color: var(--t700); }
.net-label p { margin-top: 4px; max-width: 170px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.flow-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; translate: -50% -50%; opacity: 0; animation: flow 3.8s var(--ease-io) infinite; }
.flow-dot.l { background: var(--l600); box-shadow: 0 0 0 4px rgba(21, 128, 61, .14); }
.flow-dot.t { background: var(--t600); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
@keyframes flow { 0% { left: var(--x1); top: var(--y1); opacity: 0; } 14% { opacity: 1; } 86% { opacity: 1; } 100% { left: var(--x2); top: var(--y2); opacity: 0; } }

/* Bottom row */
.hero-bottom { position: absolute; left: 35px; right: 35px; bottom: 35px; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 0; }
.hero-ctas { display: flex; gap: 12px; }
.hero-cta { height: auto; padding: 12px 20px; gap: 10px; font-size: 13px; line-height: 15.6px; letter-spacing: .025em; text-transform: uppercase; }
.hero-cta .star { font-size: 16px; line-height: 1; }
.info-card { max-width: 280px; }
.info-badge { display: inline-block; margin-bottom: 10px; padding: 2px 6px; background: var(--text); color: #fff; font-size: 12px; line-height: 15.6px; letter-spacing: .03em; }
.info-body { position: relative; padding: 20px; background: var(--brand-grad-diag); clip-path: polygon(0 0, 100% 0, 100% 100%, 30px 100%, 0 calc(100% - 30px)); }
.info-body::before { content: ""; position: absolute; inset: 1px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); clip-path: polygon(0 0, 100% 0, 100% 100%, 29.4px 100%, 0 calc(100% - 29.4px)); }
.info-body > * { position: relative; }
.info-body p { margin-bottom: 18px; font-size: 13px; line-height: 18px; color: var(--text); }
.info-link { font-size: 13px; line-height: 15.6px; font-weight: 600; letter-spacing: .03em; color: var(--t600); }
.info-link:hover { text-decoration: underline; }

/* Mobile menu overlay */
.hero-menu { position: fixed; inset: 0; z-index: 60; visibility: hidden; transition: visibility .5s var(--ease-io); }
.hero.menu-open .hero-menu { visibility: visible; }
.hero-menu-backdrop { position: absolute; inset: 0; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity .5s var(--ease-io); }
.hero.menu-open .hero-menu-backdrop { opacity: 1; }
.hero-menu-panel { position: relative; height: 100%; display: flex; flex-direction: column; padding: 96px 20px 40px; opacity: 0; transform: translateY(-16px); transition: opacity .5s var(--ease-io), transform .5s var(--ease-io); }
.hero.menu-open .hero-menu-panel { opacity: 1; transform: none; }
.hero-menu-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; padding: 0; color: var(--text); cursor: pointer; }
.hero-menu-list { display: flex; flex-direction: column; gap: 32px; }
.hero-menu-list a { display: flex; align-items: center; gap: 12px; opacity: 0; transform: translateX(-24px); transition: opacity .5s var(--ease-io), transform .5s var(--ease-io); transition-delay: 0ms; }
.hero.menu-open .hero-menu-list a { opacity: 1; transform: none; transition-delay: calc(150ms + var(--i) * 75ms); }
.hero-menu-list .num { font-size: 14px; line-height: 1; color: var(--text-3); }
.hero-menu-list .l .num { color: rgba(21, 128, 61, .8); }
.hero-menu-list .t .num { color: rgba(37, 99, 235, .8); }
.hero-menu-list .lbl { font-family: var(--font-display); font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.hero-menu-foot { margin-top: auto; padding-top: 40px; border-top: 1px solid var(--border); opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease-io), transform .5s var(--ease-io); transition-delay: 0ms; }
.hero.menu-open .hero-menu-foot { opacity: 1; transform: none; transition-delay: 450ms; }
.hero-menu-foot .row + .row, .hero-menu-foot .row + .btn { margin-top: 12px; }
body.menu-lock { overflow: hidden; }

/* Below the hero */
.duo .duo-half { position: relative; }
.how { position: relative; }
.how > * { position: relative; z-index: 1; }
.how-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em; }
.how-card { position: relative; background: #fff; }
.how-card::before, .how-card::after { content: ""; position: absolute; top: -6px; left: -6px; background: rgba(55, 53, 47, .45); }
.how-card::before { width: 11px; height: 1px; top: -1px; }
.how-card::after { width: 1px; height: 11px; left: -1px; }
.how-card .step-no .n { color: var(--text-3); margin-right: 3px; }
.site-footer .logo-lockup { gap: 6px; }

/* Hero breakpoints: nav collapses at 1024, network hides at 768, info card at 640 */
@media (max-width: 1199px) and (min-width: 768px) {
  .sq { width: 80px; height: 80px; }
  .cube-wrap { --cs: 84px; }
}
@media (max-width: 1023px) {
  .hero-links, .hero-right { display: none; }
  .hamburger { display: block; }
}
@media (min-width: 1024px) { .hero-menu { display: none; } }
@media (max-width: 767px) {
  .hero { min-height: 600px; }
  .hero-nav { padding: 20px; }
  .hero-nav .logo-mark { height: 26px; }
  .hero-nav .logo-word { font-size: 19px; }
  .hero-title { top: 150px; left: 20px; max-width: 440px; font-size: 48px; }
  .hero-sub { left: 20px; top: calc(150px + 3em + 20px); font-size: 48px; }
  .network .net-line, .network .net-label, .network .flow-dot, .network .node:not(.hub) { display: none; }
  .network .node.hub { left: 76% !important; top: 60% !important; }
  .cube-wrap { --cs: 72px; }
  .hero-bottom { left: 20px; right: 20px; bottom: 20px; flex-direction: column; align-items: stretch; gap: 20px; }
  .hero-ctas { flex-direction: column; }
  .hero-cta { padding: 12px 16px; font-size: 12px; justify-content: center; }
}
@media (max-width: 639px) {
  .hero-title { top: 128px; max-width: 320px; font-size: 38px; }
  .hero-sub { display: none; }
  .info-card { display: none; }
}

/* ---------- Reduced motion (override for review with ?motion=1) ---------- */
@media (prefers-reduced-motion: reduce) {
  :root:not(.force-motion) { scroll-behavior: auto; }
  :root:not(.force-motion) .anim-fade-up, :root:not(.force-motion) .anim-fade-in, :root:not(.force-motion) .anim-slide-left,
  :root:not(.force-motion) .anim-slide-right, :root:not(.force-motion) .anim-scale-in, :root:not(.force-motion) .anim-node-in,
  :root:not(.force-motion) .anim-grid-v, :root:not(.force-motion) .anim-grid-h { animation: none !important; opacity: 1 !important; transform: none !important; scale: 1 !important; }
  :root:not(.force-motion) .blob, :root:not(.force-motion) .node-float, :root:not(.force-motion) .progress > span,
  :root:not(.force-motion) .timer-bar > span, :root:not(.force-motion) dialog.dialog[open], :root:not(.force-motion) [data-panel]:not([hidden]) { animation: none !important; }
  :root:not(.force-motion) .cube { animation: none; transform: rotateX(-22deg) rotateY(-34deg); }
  :root:not(.force-motion) .flow-dot { display: none; }
}
