.portal-page { background:#090a10; }
.portal-page .site-header { background:rgba(10,10,16,.88); }
.portal-nav { display:flex; gap:24px; align-items:center; }
.portal-nav a { color:#cdd0da; font-weight:600; font-size:14px; text-decoration:none; }
.portal-nav a:hover,.portal-nav a:focus-visible { color:#ddc1ff; }
.portal-hero { position:relative; padding:112px 0 96px; overflow:hidden;
  background:radial-gradient(ellipse at 68% 31%,rgba(148,63,216,.23),transparent 55%),#0b0b15; }
.portal-hero::after { content:''; position:absolute; right:-180px; bottom:-260px;
  width:560px; height:560px; border:1px solid rgba(173,126,246,.16); border-radius:50%; pointer-events:none; }
.portal-hero-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:70px; align-items:center; }
.portal-hero h1 { color:#fff; font-size:clamp(54px,7vw,104px); letter-spacing:-.075em;
  line-height:.99; margin:26px 0 24px; max-width:730px; }
.portal-hero h1 em { font-style:normal; color:#c6a1ff; }
.portal-hero p { color:#b7bad0; max-width:580px; line-height:1.75; font-size:17px; }
.portal-hero-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:30px; }
.portal-outline { background:transparent!important; color:#f6edff!important; border:1px solid rgba(198,161,255,.45)!important; }
.portal-outline:hover { background:rgba(172,119,240,.1)!important; }
.portal-hero-meta { color:#adb0c2; font-weight:700; font-size:12px; letter-spacing:.02em; margin-top:32px; }
.portal-hero-meta span { color:#9f70d7; margin:0 8px; }
.portal-hero-card { position:relative; border:1px solid rgba(191,158,246,.19); border-radius:26px;
  padding:30px; background:linear-gradient(145deg,#241a36,#11121b 70%);
  box-shadow:0 30px 90px rgba(0,0,0,.35); z-index:1; }
.portal-card-eyebrow { color:#caa0ff; font-size:10px; font-weight:800; letter-spacing:.12em; }
.portal-exchange-row { display:flex; gap:15px; margin:21px 0; align-items:flex-start; }
.portal-exchange-row b { display:grid; place-items:center; width:35px; height:35px;
  flex:none; color:#d5aaff; background:rgba(205,158,255,.1); border-radius:11px; }
.portal-exchange-row strong { display:block; font-size:15px; color:#fff; }
.portal-exchange-row p { margin:5px 0 0; color:#9ea0b6; font-size:13px; line-height:1.5; }
.portal-exchange-divider { height:1px; background:rgba(255,255,255,.09); }
.portal-hero-card small { display:block; color:#9e9cb3; font-size:11px; margin-top:16px; }
.portal-content { padding:55px 0 98px; background:#0d0d16; }
.portal-availability { padding:20px 24px; border-radius:16px; color:#e2d4f2;
  background:#241c33; border:1px solid rgba(193,149,255,.21); margin-bottom:28px;
  font-size:14px; line-height:1.6; }
.portal-grid { display:grid; grid-template-columns:1fr 1fr; gap:22px; align-items:start; }
.portal-panel { border:1px solid rgba(185,154,233,.16); border-radius:25px;
  background:#171623; padding:clamp(22px,3.4vw,40px); color:#fff; min-width:0; }
.portal-kicker { display:block; color:#c39bed; letter-spacing:.13em; font-size:10px; font-weight:900; }
.portal-panel h2,.portal-directory h2 { font-size:clamp(26px,3.5vw,42px); letter-spacing:-.05em;
  line-height:1.13; margin:12px 0; color:#fff; }
.portal-lead,.portal-directory p { color:#aeb0c5; line-height:1.6; margin:0 0 24px; }
.portal-panel form { display:grid; gap:17px; }
.portal-panel form>label { display:grid; gap:8px; font-weight:700; color:#d8d9e6; font-size:13px; }
.portal-panel input:not([type=checkbox]),.portal-panel select,.portal-panel textarea {
  width:100%; max-width:100%; min-width:0; border-radius:12px; padding:13px 14px;
  border:1px solid rgba(167,160,191,.25); background:#0e0e18; color:#fff;
  font:inherit; font-weight:500; outline-offset:2px; }
.portal-panel input:focus-visible,.portal-panel select:focus-visible,.portal-panel textarea:focus-visible {
  outline:2px solid #b98df1; border-color:#b98df1; }
.portal-panel select option { background:#1d1a2b; color:#fff; padding:7px; }
.portal-subjects { display:grid; gap:13px; padding:17px; border:1px solid rgba(185,154,233,.25);
  border-radius:16px; background:rgba(8,8,16,.32); }
.portal-subject-top { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.portal-subject-top strong { font-size:13px; color:#e9e1f7; }
.portal-subject-top span { font-size:11px; font-weight:800; color:#d3affc;
  background:rgba(161,95,220,.17); padding:6px 10px; border-radius:999px; }
.portal-subject-search { display:grid; gap:7px; color:#c6bfd8; font-size:12px; font-weight:700; }
.portal-panel .portal-subject-search input { background:#171221; min-height:44px; }
.portal-subject-groups { max-height:342px; overflow-y:auto; overscroll-behavior:contain;
  scrollbar-color:#795196 #161321; display:grid; gap:17px; padding:4px 4px 4px 1px; }
.portal-subject-group h3 { color:#bda8d6; font-size:11px; font-weight:900; letter-spacing:.055em;
  text-transform:uppercase; margin:0 0 9px; }
.portal-subject-options { display:flex; flex-wrap:wrap; gap:8px; }
.portal-subject-option { display:inline-flex; align-items:center; gap:8px; min-height:42px;
  padding:8px 11px; border:1px solid rgba(178,161,207,.24); border-radius:12px;
  background:#191726; color:#ded8ec; font-size:12px; line-height:1.35; font-weight:650;
  cursor:pointer; transition:background .15s,border-color .15s; }
.portal-subject-option:hover { background:#292039; border-color:#a77bc9; }
.portal-subject-option:has(input:checked) { background:#3a2551; border-color:#c494f3; color:#fff; }
.portal-subject-option:focus-within { outline:2px solid #d6aafb; outline-offset:2px; }
.portal-subject-option input { width:16px; height:16px; min-width:16px; margin:0; accent-color:#b57af0; cursor:pointer; }
.portal-selected-subjects { display:flex; flex-wrap:wrap; gap:7px; }
.portal-selected-subjects:empty { display:none; }
.portal-subject-chip { min-height:33px; border:1px solid #9970c0; border-radius:999px;
  padding:6px 10px; background:#31213f; color:#efe2fd; font-size:11px;
  cursor:pointer; font-weight:700; }
.portal-subject-chip:hover,.portal-subject-chip:focus-visible { background:#4b2b63; }
.portal-subject-help,.portal-subject-empty { margin:0; color:#a8a0b7; font-size:12px; line-height:1.6; }
.portal-subject-error { color:#edbaea; font-size:12px; line-height:1.5; margin:0; }
.portal-subject-error:empty { display:none; }
.portal-panel label small { color:#9492ad; font-weight:400; }
.portal-grades { display:flex; flex-wrap:wrap; gap:11px 17px; padding:14px;
  border:1px solid rgba(167,160,191,.25); border-radius:14px; }
.portal-grades legend { padding:0 7px; color:#d8d9e6; font-size:13px; font-weight:700; }
.portal-grades label { display:flex; align-items:center; gap:6px; }
.portal-consent { display:flex!important; flex-direction:row!important; align-items:flex-start;
  gap:10px!important; line-height:1.5; font-size:12px!important; }
.portal-consent input { margin-top:3px; accent-color:#c29aff; }
.portal-panel button:disabled { opacity:.5; cursor:not-allowed; }
.portal-form-message { color:#c9b5ed; font-size:13px; line-height:1.5; min-height:1em; }
.portal-recovery { padding:19px; margin-top:20px; border-radius:16px;
  background:rgba(112,215,185,.08); border:1px solid rgba(126,218,191,.34); }
.portal-recovery p { color:#b0cfc4; font-size:13px; line-height:1.5; }
.portal-recovery code { display:block; overflow-wrap:anywhere; font-size:13px; padding:13px;
  border-radius:9px; color:#b9f8da; background:#0e1e1b; margin:10px 0; }
.portal-dashboard-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.portal-dashboard h3 { margin:16px 0 4px; font-size:21px; }
.portal-dashboard h4 { color:#fff; margin:28px 0 13px; font-size:16px; }
.portal-dashboard>p { color:#cbb2e9; font-size:13px; line-height:1.5; }
.portal-link { color:#e5c8ff; text-decoration:underline; border:0; background:none;
  padding:10px 0; font-weight:800; cursor:pointer; text-underline-offset:3px; }
.portal-note { color:#9290a6; border-top:1px solid rgba(255,255,255,.08);
  padding-top:19px; margin:24px 0 0; font-size:12px; line-height:1.6; }
.portal-empty { color:#aaa9c0; font-size:13px; line-height:1.6; }
.portal-request,.portal-response,.portal-tutor-card {
  border:1px solid rgba(184,163,218,.17); border-radius:16px; padding:17px;
  background:#201c2d; margin-bottom:12px; }
.portal-request h5 { font-size:15px; margin:0 0 7px; color:#fff; }
.portal-request p { color:#c1b6d0; font-size:13px; margin:0 0 7px; }
.portal-request small,.portal-response small { color:#a9a2b5; }
.portal-offer-form { margin-top:17px; gap:11px!important; }
.portal-offer-form label { display:grid; gap:7px; color:#bdb4ca; font-size:12px; }
.portal-offer-form .btn { width:fit-content; max-width:100%; }
.portal-response { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.portal-response strong { font-size:13px; }
.portal-negotiation { display:block; }
.portal-negotiation-main { display:flex; align-items:center; justify-content:space-between; gap:15px; flex-wrap:wrap; }
.portal-negotiation-main small { color:#d1b9ea; font-size:12px; }
.portal-negotiation-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:15px;
  border-top:1px solid rgba(255,255,255,.08); padding-top:14px; }
.portal-negotiation-actions input { min-height:39px; width:110px; min-width:0; border-radius:8px;
  background:#11101e; border:1px solid rgba(186,155,232,.35); padding:9px; color:#fff; font:inherit; font-size:12px; }
.portal-small-btn { border:1px solid rgba(196,168,237,.4); background:#242032;
  color:#dec8f7; font-size:11px; font-weight:800; border-radius:9px; min-height:39px;
  padding:9px 12px; cursor:pointer; }
.portal-small-primary { background:#9e44d4; color:#fff; border-color:#9e44d4; }
.portal-small-btn:hover { filter:brightness(1.13); }
.portal-negotiation-actions .portal-form-message { flex-basis:100%; margin:0; min-height:0; }
.portal-directory { margin-top:38px; padding:31px; border-radius:24px;
  border:1px solid rgba(166,155,215,.18); background:#151421; }
.portal-directory-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; margin-top:17px; }
.portal-tutor-card { margin:0; background:#222033; }
.portal-tutor-top { display:flex; gap:12px; align-items:center; justify-content:space-between; }
.portal-tutor-top strong { color:#fff; }
.portal-verified { font-size:10px; color:#86e0cd; white-space:nowrap; font-weight:900; }
.portal-tutor-card p { margin:9px 0; font-size:13px; color:#bfb8cc; }
.portal-tutor-tags { color:#b59ed2; font-size:11px; line-height:1.6; }
.portal-tutor-stars { color:#ffd07c; font-size:13px; font-weight:800; margin-top:12px; }
.portal-footer-notice { margin-top:23px; color:#8d8ba2; font-size:12px; line-height:1.6; }
.portal-page .footer-bottom a { color:#cdb0f5; }
@media(max-width:960px) {
  .portal-hero-grid { grid-template-columns:1fr; gap:30px; }
  .portal-hero { padding:70px 0 65px; }
  .portal-grid { grid-template-columns:1fr; }
  .portal-nav { gap:12px; }
}
@media(max-width:650px) {
  .portal-nav { display:none; }
  .portal-hero h1 { font-size:clamp(49px,13vw,72px); }
  .portal-hero-card { padding:23px; }
  .portal-panel { padding:22px; }
  .portal-directory { padding:22px; }
}

.portal-document{margin:18px 0;padding:17px;border:1px solid #514c78;background:rgba(88,63,126,.12);border-radius:16px}
.portal-document strong{display:block;margin-bottom:7px}
.portal-document input[type=file]{display:block;margin-top:9px;width:100%;padding:12px;background:rgba(10,12,23,.65);border:1px solid #5c5780;border-radius:12px;color:inherit}
.portal-document .portal-note{font-size:13px;line-height:1.6}
.portal-consent a{color:#b7f8c0;text-decoration:underline;text-underline-offset:3px}

.portal-danger{color:#f6a6ad!important;text-decoration:underline;text-underline-offset:3px}

/* Clear separation: public application lives on portal.html; the private
   workspace and its email/password sign-in live on tutor-dashboard.html. */
.portal-application-layout{grid-template-columns:minmax(0,1.55fr) minmax(290px,.78fr);gap:27px}
.portal-application-layout .portal-panel{padding:clamp(24px,4vw,48px)}
.portal-password-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.portal-password-pair label{display:grid;gap:8px;font-size:13px;font-weight:700;color:#d8d9e6}
.portal-login-inline,.portal-auth-help a{color:#d3b0ff;text-decoration:underline;text-underline-offset:4px;font-size:13px;font-weight:700}
.portal-apply-aside{position:sticky;top:100px;border:1px solid rgba(188,154,236,.22);
  border-radius:24px;background:linear-gradient(155deg,#231a34,#131420 68%);padding:32px;color:#fff}
.portal-apply-aside h3{font:750 clamp(26px,3vw,37px)/1.13 Outfit,sans-serif;
  letter-spacing:-.04em;margin:18px 0 27px;color:#fff}
.portal-process-list{list-style:none;margin:0;padding:0;display:grid;gap:26px}
.portal-process-list li{display:flex;gap:16px;align-items:flex-start}
.portal-process-list li>span{font:800 13px Outfit,sans-serif;color:#caa5ff;background:#39274e;
  padding:10px;border-radius:11px;flex:none}
.portal-process-list strong{color:#fff;font-size:14px}
.portal-process-list p,.portal-aside-signin p{margin:8px 0 0;color:#afacc2;font-size:13px;line-height:1.7}
.portal-aside-signin{padding:23px;margin-top:34px;background:rgba(157,116,210,.09);
  border:1px solid rgba(188,154,236,.2);border-radius:15px}
.portal-aside-signin strong{color:#fff;font-size:14px}
.portal-aside-signin .btn{display:inline-flex;margin-top:20px;font-size:12px}
.portal-workspace-hero{background:radial-gradient(ellipse at 80% 20%,rgba(161,92,232,.22),transparent 58%),#0c0c16;
  border-bottom:1px solid rgba(193,153,243,.12);padding:88px 0 73px}
.portal-workspace-hero h1{font:800 clamp(45px,6.4vw,82px)/1.02 Outfit,sans-serif;
  letter-spacing:-.065em;color:#fff;margin:20px 0 19px}
.portal-workspace-hero h1 em{font-style:normal;color:#c6a1ff}
.portal-workspace-hero p{max-width:640px;color:#b7b7cd;line-height:1.7;font-size:16px}
.portal-workspace-container{max-width:1120px}
.portal-auth-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.92fr);gap:25px;align-items:start}
.portal-signin-panel,.portal-upgrade-panel{min-height:370px}
.portal-signin-panel .btn{width:100%;justify-content:center}
.portal-auth-help{border-top:1px solid rgba(255,255,255,.08);padding-top:25px;
  margin:30px 0 0;color:#aeb0c5;font-size:13px}
.portal-upgrade-details{background:rgba(115,84,159,.11);border:1px solid rgba(186,150,233,.23);
  border-radius:14px;padding:17px}
.portal-upgrade-details summary{cursor:pointer;color:#d6b7ff;font-weight:800;font-size:13px}
.portal-upgrade-details summary:focus-visible{outline:2px solid #b98df1;outline-offset:5px}
.portal-upgrade-details form{margin-top:22px}
.portal-auth-side-note{background:rgba(105,200,171,.07);
  border:1px solid rgba(110,203,176,.15);border-radius:13px;padding:17px;margin-top:23px}
.portal-auth-side-note strong{color:#bce8d8;font-size:13px}
.portal-auth-side-note p{font-size:12px;color:#afc7bf;line-height:1.6;margin:8px 0 0}
.portal-member-panel{padding:clamp(20px,3.5vw,42px)}
.portal-member-panel .portal-dashboard-head h2{margin:13px 0;color:#fff}
.portal-status-banner{padding:17px 20px;border:1px solid rgba(187,151,243,.25);
  background:rgba(165,111,230,.1);border-radius:14px;color:#dcc0f5;font-size:14px}
.portal-member-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(250px,.7fr);
  gap:25px;margin-top:25px}
.portal-member-layout .portal-document{margin:0}
.portal-member-layout .portal-document h4{margin:0 0 12px}
.portal-workspace-actions{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:17px}
.portal-workspace-actions .portal-note{flex-basis:100%;margin:0}
.portal-workspace-help{border-radius:19px;padding:26px;
  border:1px solid rgba(183,148,234,.17);background:#201b2e}
.portal-workspace-help h3{font-size:24px;line-height:1.2;color:#fff;margin:15px 0}
.portal-workspace-help p{color:#b2aec5;line-height:1.7;font-size:13px}
.portal-workspace-help .btn{display:inline-flex;font-size:12px;margin:13px 0}
.portal-matches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:25px;margin-top:38px;border-top:1px solid rgba(255,255,255,.09);padding-top:33px}
.portal-matches h3{margin:10px 0 20px;color:#fff;font-size:21px}
@media(max-width:950px){
  .portal-application-layout,.portal-auth-layout,.portal-member-layout,.portal-matches{grid-template-columns:1fr}
  .portal-apply-aside{position:static}
}
@media(max-width:600px){
  .portal-password-pair{grid-template-columns:1fr}
  .portal-workspace-hero{padding:65px 0 45px}
  .portal-workspace-actions{gap:8px 17px}
  .portal-member-panel .portal-dashboard-head{align-items:flex-start}
}
