:root {
  --ink: #172238;
  --ink-soft: #556074;
  --paper: #fffaf3;
  --paper-deep: #f4ede2;
  --white: #fff;
  --red: #e7473c;
  --red-dark: #bd312b;
  --red-soft: #ffe4de;
  --mint: #dff5eb;
  --gold: #f0b84b;
  --line: rgba(23, 34, 56, 0.12);
  --shadow-sm: 0 12px 30px rgba(23, 34, 56, 0.08);
  --shadow-lg: 0 30px 80px rgba(23, 34, 56, 0.15);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
  word-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: radial-gradient(circle at 8% 0%, rgba(231,71,60,.12), transparent 28rem), radial-gradient(circle at 92% 20%, rgba(240,184,75,.14), transparent 24rem), var(--paper);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.nav { display: flex; align-items: center; justify-content: space-between; min-height: 188px; gap: 24px; padding-top: 26px; }
.brand-link { display: inline-flex; flex: 0 0 auto; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: 208px; height: auto; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.nav-cta, .nav-button { border: 0; padding: 0; color: var(--ink-soft); background: transparent; text-decoration: none; font-size: .9rem; font-weight: 700; cursor: pointer; transition: color 180ms ease; }
.nav-cta:hover, .nav-button:hover { color: var(--red); }
.nav-cta.nav-featured { padding: 10px 17px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); }
.nav-cta.nav-featured:hover { border-color: var(--red); color: var(--red); }
.auth-status { max-width: 180px; overflow: hidden; color: var(--ink-soft); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }

.hero { position: relative; overflow: hidden; padding-bottom: 88px; }
.hero::after { position: absolute; top: 72px; right: -100px; z-index: -1; width: 370px; height: 370px; border: 1px solid rgba(231,71,60,.16); border-radius: 50%; content: ""; box-shadow: 0 0 0 50px rgba(231,71,60,.035), 0 0 0 100px rgba(231,71,60,.025); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 820px); align-items: center; min-height: 560px; padding-top: 46px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 7px 11px; border: 1px solid rgba(231,71,60,.22); border-radius: 999px; color: var(--red-dark); background: rgba(255,228,222,.58); text-transform: uppercase; font-size: .73rem; font-weight: 800; letter-spacing: .1em; }
.eyebrow::before { width: 7px; height: 7px; border-radius: 50%; content: ""; background: var(--red); }
h1, h2, h3 { margin-top: 0; font-family: "Lora", serif; line-height: 1.18; letter-spacing: -.015em; word-spacing: .04em; text-wrap: balance; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(2.85rem,5.4vw,4.8rem); font-weight: 600; }
h1 em { color: var(--red); font-style: normal; }
h2 { margin-bottom: 18px; font-size: clamp(1.9rem,3.3vw,3rem); font-weight: 600; }
h3 { margin-bottom: 12px; font-size: 1.18rem; }
p { text-wrap: pretty; }
.lead, .section-lead { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.75; }
.lead { max-width: 620px; margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 8px; padding: 0 22px; border: 1px solid transparent; border-radius: 14px; text-decoration: none; font-weight: 800; cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: white; background: var(--red); box-shadow: 0 12px 24px rgba(231,71,60,.23); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 16px 30px rgba(189,49,43,.26); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.58); }
.hero-note { display: flex; align-items: center; margin-top: 28px; color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
.hero-note::before { width: 20px; height: 2px; margin-right: 10px; content: ""; background: var(--red); }

.trust-strip { display: grid; grid-template-columns: 1.1fr repeat(3,1fr); border-block: 1px solid var(--line); }
.trust-strip > div { padding: 26px 28px; border-right: 1px solid var(--line); }
.trust-strip > div:last-child { border-right: 0; }
.trust-strip strong { display: block; margin-bottom: 6px; font-size: .9rem; line-height: 1.4; }
.trust-strip span { display: block; color: var(--ink-soft); font-size: .78rem; line-height: 1.6; }
.trust-intro { display: flex; align-items: center; color: var(--red-dark); font-family: "Lora", serif; font-size: 1.12rem; font-weight: 600; line-height: 1.5; }

.section { padding: 110px 0; }
.section-soft { background: var(--paper-deep); }
.section-heading { display: grid; grid-template-columns: .9fr 1.1fr; align-items: end; gap: 70px; margin-bottom: 45px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.steps article { position: relative; min-height: 250px; padding: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.72); }
.steps article::after { position: absolute; right: -25px; bottom: -45px; color: rgba(231,71,60,.08); content: attr(data-step); font-family: "Lora", serif; font-size: 9rem; font-weight: 700; line-height: 1; }
.steps span { display: grid; width: 38px; height: 38px; margin-bottom: 52px; place-items: center; border-radius: 12px; color: white; background: var(--red); font-weight: 800; }
.steps p { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.7; }

.match-layout { display: grid; grid-template-columns: .72fr 1.28fr; align-items: start; gap: 60px; }
.match-copy { position: sticky; top: 30px; }
.match-form-content { display: contents; }
.login-required-panel { grid-column: 1 / -1; padding: clamp(26px,4vw,44px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.88); box-shadow: var(--shadow-sm); text-align: center; }
.login-required-panel h2 { max-width: 680px; margin-inline: auto; }
.login-required-panel .section-lead { max-width: 620px; margin-inline: auto; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.auth-message .auth-actions, .login-required-panel .auth-actions { justify-content: center; }
[hidden] { display: none !important; }
.check-list { display: grid; gap: 14px; margin: 30px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; gap: 11px; color: var(--ink-soft); font-size: .9rem; font-weight: 700; }
.check-list li::before { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: var(--red-dark); content: "✓"; background: var(--red-soft); font-size: .75rem; }
form { padding: clamp(24px,4vw,40px); border: 1px solid rgba(23,34,56,.1); border-radius: var(--radius); background: rgba(255,255,255,.86); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 28px; }
.form-grid-single { grid-template-columns: 1fr; }
.form-grid label:has(textarea) { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 9px; color: var(--ink); font-size: .82rem; font-weight: 700; line-height: 1.4; }
input, select, textarea { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid rgba(23,34,56,.14); border-radius: 12px; outline: none; color: var(--ink); background: var(--white); transition: border 180ms ease, box-shadow 180ms ease; }
input::placeholder, textarea::placeholder { color: #9299a6; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(231,71,60,.1); }
fieldset { margin: 0; padding: 0; border: 0; }
.choice-group { display: flex; flex-direction: column; gap: 11px; }
.choice-group-wide { grid-column: 1 / -1; }
.choice-group legend { margin-bottom: 9px; color: var(--ink); font-size: .82rem; font-weight: 800; line-height: 1.4; }
.level-subject-intro { margin-bottom: -4px; }
.subject-level-panel { padding: 15px; border: 1px solid rgba(23,34,56,.08); border-radius: 18px; background: rgba(255,255,255,.56); }
.subject-level-panel legend { padding: 0 4px; color: var(--red-dark); font-size: .9rem; }
.choice-options { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-card { display: inline-flex; min-height: 36px; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(23,34,56,.14); border-radius: 999px; background: var(--white); cursor: pointer; transition: border 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.choice-card:hover { border-color: rgba(231,71,60,.36); background: rgba(255,228,222,.24); }
.choice-card input { width: 14px; min-height: 14px; accent-color: var(--red); }
.choice-card:has(input:checked) { border-color: rgba(231,71,60,.58); background: var(--red-soft); box-shadow: 0 5px 12px rgba(231,71,60,.07); }
.results-wrap { padding-top: 0; }
.results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.placeholder { grid-column: 1/-1; margin: 0; padding: 24px; border: 1px dashed rgba(23,34,56,.23); border-radius: 16px; color: var(--ink-soft); background: rgba(255,255,255,.5); text-align: center; }
.placeholder a { color: var(--red-dark); font-weight: 800; }
.match-loading { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; margin: 0; padding: 30px; border: 1px solid rgba(231,71,60,.2); border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.72); text-align: center; box-shadow: var(--shadow-sm); }
.match-loading span:last-child { color: var(--ink-soft); font-size: .86rem; }
.spinner { width: 34px; height: 34px; border: 4px solid rgba(231,71,60,.16); border-top-color: var(--red); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tutor-card { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow-sm); }
.tutor-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.tutor-head h3 { margin-bottom: 0; }
.fit-score { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: var(--red-dark); background: var(--red-soft); font-size: .75rem; font-weight: 800; }
.meta { color: var(--ink-soft); font-size: .8rem; }

.footer { margin-top: 90px; padding: 48px 0; color: rgba(255,255,255,.72); background: var(--ink); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-logo-wrap { display: inline-flex; padding: 8px 12px; border-radius: 14px; background: var(--paper); }
.footer-logo { display: block; width: 224px; height: auto; }
.footer p { margin: 0; font-size: .78rem; }

.hero-compact { min-height: 330px; padding-bottom: 55px; background: linear-gradient(135deg,var(--paper-deep),var(--paper)); }
.hero-compact::after { top: -170px; }
.page-intro { max-width: 720px; padding-top: 45px; }
.hero-compact h1 { margin-bottom: 18px; font-size: clamp(2.4rem,4.4vw,3.8rem); }
.form-page { display: grid; grid-template-columns: .58fr 1.42fr; align-items: start; gap: 45px; padding-top: 65px; }
.form-aside { position: sticky; top: 30px; padding: 28px; border-radius: 22px; color: white; background: var(--ink); }
.form-aside h2 { font-size: 1.7rem; }
.form-aside p { color: rgba(255,255,255,.7); font-size: .86rem; }
.form-aside .check-list li { color: rgba(255,255,255,.83); }
.form-aside .check-list li::before { color: white; background: rgba(255,255,255,.12); }
.auth-shell { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; max-width: 1000px; padding-top: 70px; }
.auth-message { align-self: center; }
.auth-message h2 { font-size: clamp(2rem,4vw,3rem); }
.auth-message p { color: var(--ink-soft); }
.auth-message a { color: var(--red-dark); font-weight: 800; }
.auth-message .auth-actions .btn-primary, .login-required-panel .auth-actions .btn-primary { color: white; }
.btn-register-student, .btn-register-student:visited, .btn-register-student:hover, .btn-register-student:focus { color: #fff !important; -webkit-text-fill-color: #fff; }
.auth-message .auth-actions .btn-ghost, .login-required-panel .auth-actions .btn-ghost { color: var(--ink); }
.form-message { min-height: 24px; margin: 14px 0 0; font-size: .84rem; font-weight: 700; }
.form-message.success { color: #147451; }
.form-message.error { color: var(--red-dark); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 54px; }
.password-toggle { position: absolute; top: 50%; right: 8px; display: grid; width: 36px; min-height: 34px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 999px; color: var(--red-dark); background: rgba(255,255,255,.9); cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { border-color: rgba(231,71,60,.36); background: var(--red-soft); }
.eye-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.auth-link-button { display: inline-flex; margin: -10px 0 16px; padding: 0; border: 0; color: var(--red-dark); background: transparent; font-size: .84rem; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.auth-link-button:hover { color: var(--red); }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--ink-soft); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.btn-google { width: 100%; border-color: var(--line); color: var(--ink); background: var(--white); box-shadow: none; }
.btn-google:hover { border-color: rgba(231,71,60,.35); box-shadow: 0 10px 20px rgba(23,34,56,.08); }
.google-dot { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: white; background: #4285f4; font-size: .82rem; font-weight: 800; }

.reveal { opacity: 0; transform: translateY(18px); animation: reveal 700ms cubic-bezier(.22,1,.36,1) forwards; }
.reveal-delay { animation-delay: 120ms; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; } }
@media (max-width: 920px) {
  .hero-grid,.section-heading,.match-layout,.form-page,.auth-shell { grid-template-columns: 1fr; }
  .hero-grid { padding-top: 35px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip > div:nth-child(2) { border-right: 0; }
  .trust-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .steps article { min-height: 210px; }
  .match-copy,.form-aside { position: static; }
  .section-heading { align-items: start; gap: 18px; }
  .form-page { gap: 28px; }
}
@media (max-width: 700px) {
  .shell { width: min(100% - 28px,1180px); }
  .nav { min-height: 154px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 14px; padding-top: 22px; }
  .brand-logo { width: 164px; }
  .nav-links { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .nav-links .nav-cta, .nav-button { display: inline-flex; min-height: 38px; align-items: center; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.62); font-size: .76rem; line-height: 1; white-space: nowrap; }
  .nav-cta.nav-featured { padding: 8px 12px; font-size: .76rem; white-space: nowrap; }
  .auth-status { width: 100%; max-width: 100%; font-size: .74rem; }
  .hero { padding-bottom: 55px; }
  .hero-grid { min-height: auto; gap: 25px; }
  h1 { font-size: clamp(2.35rem,11.5vw,3.35rem); line-height: 1.2; letter-spacing: -.012em; }
  h2 { font-size: clamp(1.75rem,8.5vw,2.4rem); line-height: 1.25; }
  h3 { line-height: 1.35; }
  .lead,.section-lead { font-size: .95rem; line-height: 1.72; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip > div { padding: 22px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-strip > div:last-child { border-bottom: 0; }
  .section { padding: 72px 0; }
  .section-heading { gap: 12px; margin-bottom: 32px; }
  .steps { gap: 14px; }
  .steps article { min-height: auto; padding: 25px 22px 32px; }
  .steps span { margin-bottom: 40px; }
  .form-grid,.results { grid-template-columns: 1fr; }
  form { padding: 24px 18px; }
  .form-grid { gap: 18px; }
  .btn { width: 100%; padding-inline: 16px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .hero-compact { min-height: 290px; }
  .page-intro { padding-top: 36px; }
  .form-aside { padding: 24px 20px; }
  .auth-shell { gap: 34px; padding-top: 52px; }
}

.admin-shell { padding-top: 65px; }
.admin-panel { padding: clamp(22px,3vw,34px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.88); box-shadow: var(--shadow-sm); }
.admin-status-panel { display: grid; grid-template-columns: 1fr minmax(280px,420px); gap: 28px; align-items: center; margin-bottom: 22px; }
.admin-lead { margin-bottom: 0; }
.admin-setting-card { display: grid; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.admin-stat-grid div { padding: 16px; border-radius: 16px; background: var(--white); }
.admin-stat-grid span { display: block; color: var(--ink-soft); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.admin-stat-grid strong { display: block; margin-top: 4px; color: var(--red-dark); font-family: "Lora", serif; font-size: 2rem; line-height: 1; }
.admin-toggle { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; color: var(--ink); font-size: .88rem; line-height: 1.5; }
.admin-toggle input { width: 18px; min-height: 18px; margin-top: 3px; accent-color: var(--red); }
.admin-lists { display: grid; gap: 24px; margin-top: 24px; }
.admin-list-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.admin-list-head h2 { margin-bottom: 0; }
.admin-table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .84rem; }
.admin-table th { color: var(--ink-soft); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.admin-table td strong, .admin-table td span { display: block; }
.admin-table td span { margin-top: 3px; color: var(--ink-soft); font-size: .76rem; }
.admin-empty { color: var(--ink-soft); text-align: center; }
.danger-button { min-height: 34px; padding: 0 12px; border: 1px solid rgba(189,49,43,.28); border-radius: 999px; color: var(--red-dark); background: rgba(255,228,222,.55); font-size: .78rem; font-weight: 800; cursor: pointer; }
.danger-button:hover { border-color: var(--red-dark); background: var(--red-soft); }
.danger-button:disabled { opacity: .55; cursor: wait; }

@media (max-width: 760px) {
  .admin-status-panel { grid-template-columns: 1fr; }
  .admin-list-head { align-items: flex-start; flex-direction: column; }
}
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pill { display: inline-flex; width: max-content; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.status-certified { color: #147451; background: #dff5eb; }
.status-pending { color: #8a5a00; background: #fff2ce; }
.certify-button { min-height: 34px; padding: 0 12px; border: 1px solid rgba(20,116,81,.28); border-radius: 999px; color: #147451; background: #dff5eb; font-size: .78rem; font-weight: 800; cursor: pointer; }
.certify-button:hover { border-color: #147451; background: #cdf0df; }
.certify-button:disabled { opacity: .55; cursor: wait; }
.admin-remark-row td { padding: 0 12px 18px; background: rgba(255,250,243,.72); }
.admin-remark-row .admin-remark-control { max-width: 760px; margin: 12px 0 0; padding: 14px; border: 1px dashed rgba(231,71,60,.28); border-radius: 16px; background: var(--white); }
.admin-remark-row textarea { width: 100%; }
.admin-remark-control { display: grid; gap: 8px; min-width: 240px; margin-top: 14px; }
.admin-remark-control label { color: var(--red-dark); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.admin-remark-control textarea { min-height: 74px; padding: 10px 12px; resize: vertical; font-size: .8rem; line-height: 1.45; }
.remark-button { min-height: 32px; justify-self: start; padding: 0 11px; border: 1px solid rgba(23,34,56,.18); border-radius: 999px; color: var(--ink); background: var(--white); font-size: .76rem; font-weight: 800; cursor: pointer; }
.remark-button:hover { border-color: var(--red); color: var(--red-dark); }
.remark-button:disabled { opacity: .55; cursor: wait; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 16px; }
.admin-toolbar label { min-width: min(100%, 320px); gap: 7px; color: var(--ink-soft); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.admin-toolbar input { min-height: 42px; background: var(--white); }
.admin-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .8rem; font-weight: 800; }
.admin-pagination button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--white); font-size: .78rem; font-weight: 800; cursor: pointer; }
.admin-pagination button:hover:not(:disabled) { border-color: var(--red); color: var(--red-dark); }
.admin-pagination button:disabled { opacity: .45; cursor: not-allowed; }

.tutor-fee-promo-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(23,34,56,.48); backdrop-filter: blur(8px); animation: fadeIn 180ms ease both; }
.tutor-fee-promo { position: relative; display: grid; grid-template-columns: .85fr 1.15fr; width: min(820px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.54); border-radius: 30px; background: linear-gradient(135deg,#fffaf3 0%,#fff 48%,#ffe4de 100%); box-shadow: 0 34px 90px rgba(23,34,56,.28); }
.promo-art { display: grid; align-content: center; justify-items: center; min-height: 310px; padding: 38px; color: white; background: radial-gradient(circle at 25% 15%, rgba(255,255,255,.28), transparent 10rem), linear-gradient(145deg,var(--red),var(--red-dark)); text-align: center; }
.promo-art span { font-size: .78rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.promo-art strong { margin-top: 8px; font-family: "Lora", serif; font-size: clamp(4.5rem,12vw,8rem); line-height: .92; text-shadow: 0 14px 30px rgba(0,0,0,.2); }
.promo-copy { display: grid; align-content: center; padding: clamp(28px,5vw,48px); }
.promo-copy h2 { margin-bottom: 14px; }
.promo-copy p:last-child { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.75; }
.promo-copy strong { color: var(--red-dark); }
.promo-close { position: absolute; top: 14px; right: 14px; z-index: 1; width: 38px; height: 38px; border: 1px solid rgba(23,34,56,.12); border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.86); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.promo-close:hover { color: var(--red-dark); border-color: rgba(231,71,60,.36); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 700px) {
  .tutor-fee-promo { grid-template-columns: 1fr; }
  .promo-art { min-height: 190px; }
}
.login-role-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); }
.login-role-tab { min-height: 50px; border: 0; border-right: 1px solid var(--line); color: var(--ink-soft); background: transparent; font-weight: 900; cursor: pointer; }
.login-role-tab:last-child { border-right: 0; }
.login-role-tab.active { color: white; background: var(--red); box-shadow: inset 0 -3px 0 rgba(189,49,43,.35); }
.login-role-tab:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(231,71,60,.24); outline-offset: -3px; }
.login-role-note { margin: -4px 0 18px; color: var(--ink-soft); font-size: .84rem; font-weight: 700; }

.login-register-actions { justify-content: stretch; margin: 0 0 22px; }
.login-register-actions .btn { flex: 1 1 180px; }

body[data-user-role="tutor"] [data-tutor-hide],
body.tutor-home [data-student-home] { display: none !important; }
body.tutor-home .hero { padding-bottom: 22px; }
body.tutor-home .hero::after { opacity: .45; }
.tutor-dashboard { display: grid; grid-template-columns: .62fr 1.38fr; align-items: start; gap: 44px; padding-top: 48px; }
.tutor-dashboard[hidden] { display: none !important; }
.tutor-profile-aside { position: sticky; top: 28px; padding: clamp(24px,3vw,34px); border: 1px solid rgba(231,71,60,.16); border-radius: var(--radius); background: linear-gradient(145deg,rgba(255,255,255,.92),rgba(255,228,222,.46)); box-shadow: var(--shadow-sm); }
.tutor-profile-aside h1 { margin-bottom: 18px; font-size: clamp(2.2rem,4vw,3.6rem); }
.profile-status-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 26px; }
.profile-status-grid div { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.76); }
.profile-status-grid span { display: block; color: var(--ink-soft); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.profile-status-grid strong { display: block; margin-top: 5px; color: var(--red-dark); font-size: .9rem; line-height: 1.35; }

@media (max-width: 920px) {
  .tutor-dashboard { grid-template-columns: 1fr; }
  .tutor-profile-aside { position: static; }
}
@media (max-width: 700px) {
  .profile-status-grid { grid-template-columns: 1fr; }
}

.interest-button { width: 100%; margin-top: 14px; }
.interest-button:disabled { opacity: .82; cursor: wait; transform: none; }
.interest-button-sent, .interest-button-sent:disabled { background: #147451; box-shadow: 0 12px 24px rgba(20,116,81,.18); }
.admin-setting-card input[type="email"] { min-height: 44px; background: var(--white); }

/* Mobile overflow guard: keep all public pages inside the viewport. */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video { max-width: 100%; }

@media (max-width: 700px) {
  .shell { width: min(100% - 20px, 1180px); }
  .nav { width: min(100% - 20px, 1180px); min-height: auto; padding-top: 18px; }
  .nav-links { max-width: 100%; gap: 6px; }
  .nav-links .nav-cta, .nav-button { max-width: 100%; white-space: normal; }
  .brand-logo { width: min(156px, 58vw); }
  .footer-logo { width: min(190px, 72vw); }
  .hero::after { right: -210px; width: 300px; height: 300px; box-shadow: 0 0 0 35px rgba(231,71,60,.03); }
  .choice-options { gap: 7px; }
  .choice-card { max-width: 100%; white-space: normal; }
  .tutor-head { align-items: flex-start; flex-direction: column; }
  .fit-score, .status-pill { width: fit-content; max-width: 100%; }
  .login-required-panel, .tutor-card, .placeholder, .match-loading { padding: 20px 16px; }
  .admin-panel, form { max-width: 100%; }
}

.interested-tutor-card .delete-interest-button { margin-top: 12px; }
@media (max-width: 700px) { .interested-tutor-card .delete-interest-button { width: 100%; } }

.admin-table-wrap .admin-table.financial-table,
.admin-table-wrap .admin-table:has([data-request-fee]) { min-width: 1120px; }
.admin-compact-input,
.admin-compact-textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(23,34,56,.14);
  border-radius: 10px;
  background: var(--white);
  font-size: .78rem;
  line-height: 1.35;
}
.admin-compact-textarea { min-width: 190px; resize: vertical; }
.admin-table select.admin-compact-input { min-width: 150px; }
.admin-table input[type="number"].admin-compact-input { min-width: 95px; }

.footer-copy { display: grid; gap: 8px; justify-items: end; }
.footer-copy a { color: #fff; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.45); }
.footer-copy a:hover { border-bottom-color: #fff; }
.policy-page { max-width: 980px; }
.policy-card { background: rgba(255,255,255,.92); border: 1px solid rgba(61,43,35,.12); border-radius: 32px; box-shadow: var(--shadow); padding: clamp(28px, 5vw, 56px); }
.policy-card h2 { margin: 34px 0 10px; font-size: clamp(1.2rem, 2vw, 1.65rem); }
.policy-card h2:first-of-type { margin-top: 0; }
.policy-card p, .policy-card li { color: var(--muted); line-height: 1.75; }
.policy-card ul { padding-left: 22px; }
.policy-card a { color: var(--red); font-weight: 800; }
.policy-updated { margin: 0 0 28px; font-weight: 800; color: var(--red) !important; }
@media (max-width: 720px) {
  .footer-copy { justify-items: start; }
  .policy-card { border-radius: 24px; }
}

.otp-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(231, 71, 60, .18);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,244,241,.9));
}
.otp-panel strong { display: block; color: var(--ink); margin-bottom: 4px; }
.otp-panel span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.otp-actions { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; gap: 14px; align-items: end; }
.otp-actions label { margin: 0; }
#recaptchaContainer { min-height: 1px; }
@media (max-width: 760px) {
  .otp-actions { grid-template-columns: 1fr; }
}

.login-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(61, 43, 35, .06);
  margin: 16px 0;
}
[data-email-register], [data-phone-register], [data-email-login], [data-phone-login] { display: grid; gap: 18px; }
[data-email-register][hidden], [data-phone-register][hidden], [data-email-login][hidden], [data-phone-login][hidden] { display: none; }

#recaptchaContainer,
#loginRecaptchaContainer {
  display: flex;
  justify-content: center;
  min-height: 78px;
  padding-top: 6px;
  overflow: hidden;
}

.phone-verification-panel { padding-top: 26px; }
.phone-verification-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: start;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,244,241,.92));
  border: 1px solid rgba(231, 71, 60, .18);
  box-shadow: var(--shadow);
}
.phone-verification-card h2 { margin: 0 0 10px; }
#profileRecaptchaContainer { display: flex; justify-content: center; min-height: 78px; padding-top: 6px; overflow: hidden; }
@media (max-width: 860px) {
  .phone-verification-card { grid-template-columns: 1fr; }
}

.match-select-card {
  display: inline-grid;
  grid-template-columns: 15px auto;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  column-gap: 8px;
  margin-top: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(231, 71, 60, .18);
  border-radius: 999px;
  background: rgba(255, 244, 241, .42);
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.match-select-card:hover {
  border-color: rgba(231, 71, 60, .38);
  background: rgba(255, 228, 222, .58);
  color: var(--ink);
}
.match-select-card:has(input:checked) {
  border-color: rgba(20, 116, 81, .34);
  background: rgba(233, 248, 239, .86);
  color: #147451;
  box-shadow: 0 8px 18px rgba(20, 116, 81, .08);
}
.match-select-card input { width: 15px; height: 15px; min-height: 15px; margin: 0; accent-color: var(--red); justify-self: start; }
.tutor-card-selected { border-color: rgba(20, 116, 81, .34); background: linear-gradient(135deg, #fff, rgba(233, 248, 239, .92)); }
.match-selection-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0 0;
}
.match-selection-actions .interest-button { width: auto; margin-top: 0; }
.match-selection-actions .form-message { margin: 0; }
@media (max-width: 700px) { .match-selection-actions .interest-button { width: 100%; } }
