:root {
  --paper: #f8f3e5;
  --paper-strong: #f1e7ce;
  --ink: #191714;
  --muted: #736e64;
  --line: rgba(25, 23, 20, 0.11);
  --yellow: #f4cb55;
  --yellow-deep: #dcae2f;
  --brown: #9a622d;
  --green: #197a50;
  --red: #c84f47;
  --white: #fffdf7;
  --shadow: 0 18px 60px rgba(75, 57, 25, 0.10);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(244,203,85,.28), transparent 28%),
    linear-gradient(180deg, #fbf7ed 0%, var(--paper) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(251,247,237,.78);
  border-bottom: 1px solid rgba(25,23,20,.06);
}

nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  letter-spacing: -.03em;
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  box-shadow: inset 0 -3px 0 rgba(112,75,14,.15);
  font-size: 23px;
}

.nav-links { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 14px; font-weight: 650; }
.nav-links a:hover { color: var(--ink); }

.nav-actions { display: flex; gap: 10px; }
.btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 17px;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.55); border: 1px solid var(--line); color: var(--ink); }
.btn-dark { background: var(--ink); color: white; box-shadow: 0 10px 25px rgba(25,23,20,.17); }
.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 10px 24px rgba(177,126,19,.18); }

.course-finder {
  padding: 44px 0 46px;
  scroll-margin-top: 88px;
}

.finder-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 26px;
}

.finder-copy h1 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(40px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.finder-copy > p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.finder-steps {
  margin: 0;
  padding: 15px 18px;
  list-style: none;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(25,23,20,.1);
  border-radius: var(--radius-lg);
  background: #f8d872;
  box-shadow: 0 16px 40px rgba(95,68,17,.09);
}
.finder-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px 6px;
}
.finder-steps li + li { border-top: 1px solid rgba(25,23,20,.1); }
.finder-steps li > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}
.finder-steps strong { display: block; font-size: 14px; }
.finder-steps small {
  display: block;
  margin-top: 3px;
  color: #6f5b2f;
  font-size: 11px;
  line-height: 1.35;
}

.status { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:7px 9px; font-size:11px; font-weight:850; white-space:nowrap; height: fit-content; }
.status.closed { color: #9d342d; background: #fae5e2; }
.status.open { color: #126b45; background: #dff3e8; }

.section { padding: 82px 0; }
.section-head { display:flex; justify-content:space-between; align-items:end; gap:30px; margin-bottom:28px; }
.section-head h2 { font-size: clamp(34px, 5vw, 54px); letter-spacing:-.05em; margin:0; max-width:720px; }
.section-head p { margin:0; color:var(--muted); line-height:1.65; max-width:440px; }
.dashboard {
  background: rgba(255,253,247,.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dash-top {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(280px, 2.5fr);
  align-items: end;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.5);
}
.control-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.control-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
}
.dash-top input, .dash-top select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 15px;
  padding: 13px 14px;
  outline: none;
}
.dash-top input:disabled,
.dash-top select:disabled {
  cursor: not-allowed;
  background: #f3efe5;
  color: #989287;
  opacity: .72;
}
.dash-top input:focus,
.dash-top select:focus {
  border-color: rgba(25,23,20,.35);
  box-shadow: 0 0 0 3px rgba(244,203,85,.24);
}
.home-paid-alerts {
  padding: 72px 0 82px;
}
.home-paid-alerts[hidden] { display:none; }
.home-paid-alerts .account-section-head { margin-bottom:18px; }
.home-paid-alerts .account-section-head h2 { font-size:30px; }
.home-paid-alerts .account-subscription-card { background:white; }
.course-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 20px; }
.course-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 20px;
  display:flex;
  flex-direction:column;
  min-height: 190px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.course-card:hover { transform:translateY(-3px); border-color:rgba(25,23,20,.2); box-shadow:0 18px 36px rgba(45,36,20,.08); }
.course-top { display:flex; justify-content:space-between; align-items:flex-start; gap:15px; }
.course-code { color:var(--brown); font-size:13px; font-weight:900; letter-spacing:.02em; }
.course-card h3 { margin:7px 0 8px; font-size:21px; letter-spacing:-.03em; }
.course-card p { margin:0; color:var(--muted); font-size:13px; line-height:1.55; }
.card-actions { display:flex; gap:8px; margin-top:auto; padding-top:18px; }
.card-actions button { flex:1; border:0; border-radius:13px; padding:11px 12px; font-weight:850; }
.watch-btn { background:var(--ink); color:white; }
.watch-btn.active { background:var(--yellow); color:var(--ink); }
.watch-btn.paid {
  background:#fff5cb;
  color:#6d4a13;
  border:1px solid #e6c35c;
}
.detail-btn { background:#f4efe2; color:var(--ink); }

.checkout-legal {
  margin:14px 0 0;
  color:rgba(25,23,20,.67);
  font-size:11px;
  line-height:1.55;
}
.checkout-legal a { text-decoration:underline; text-underline-offset:2px; }

.faq { display:grid; gap:12px; }
details { background:rgba(255,255,255,.58); border:1px solid var(--line); border-radius:18px; padding:18px 20px; }
summary { cursor:pointer; font-weight:850; }
details p { color:var(--muted); line-height:1.65; margin:13px 0 0; }

footer { padding:40px 0 60px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.footer-row { display:flex; justify-content:space-between; gap:25px; align-items:center; flex-wrap:wrap; }
.footer-links { display:flex; gap:14px; flex-wrap:wrap; }
.footer-links a:hover { color:var(--ink); }

.modal-backdrop {
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(13,12,10,.48);
  backdrop-filter:blur(8px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.modal-backdrop.show { display:flex; }
.modal {
  width:min(620px,100%);
  max-height:90vh;
  overflow:auto;
  background:var(--white);
  border-radius:28px;
  box-shadow:0 40px 120px rgba(0,0,0,.28);
  border:1px solid var(--line);
}
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:25px; border-bottom:1px solid var(--line); }
.modal-head > div { min-width:0; }
.modal-head h3 { margin:4px 0 0; font-size:28px; letter-spacing:-.04em; }
.close-btn { flex:0 0 38px; border:0; background:#f2ede2; width:38px; height:38px; border-radius:12px; font-size:20px; }
.modal-body { padding:25px; }
#modalDescription { color:var(--muted); line-height:1.65; margin-top:0; }
.modal-legal { padding-top:16px; border-top:1px solid var(--line); color:var(--muted); }
.section-row { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:16px 0; border-bottom:1px solid var(--line); }
.section-row:last-child { border-bottom:0; }
.section-main strong { display:block; }
.section-main span { color:var(--muted); font-size:13px; display:block; margin-top:5px; }
.section-action { border:0; border-radius:13px; padding:10px 12px; font-weight:850; background:var(--ink); color:white; }
.section-action.active { background:var(--yellow); color:var(--ink); }
.auth-modal { width:min(460px,100%); }
.auth-copy { margin:0 0 20px; color:var(--muted); line-height:1.6; }
.auth-form { display:grid; gap:12px; }
.auth-form input {
  width:100%;
  border:1px solid var(--line);
  background:white;
  border-radius:14px;
  padding:13px 14px;
  outline:none;
  font:inherit;
}
.auth-actions { display:flex; gap:10px; }
.auth-actions .btn { flex:0 0 auto; white-space:nowrap; }
.auth-actions input { flex:1; width:auto; min-width:0; }
.account-note {
  margin-top:16px;
  padding:13px 14px;
  border-radius:14px;
  background:#fff7dc;
  color:var(--brown);
  font-size:13px;
  line-height:1.5;
}
.account-summary {
  display:grid;
  gap:10px;
  margin-bottom:20px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#faf8f2;
}
.account-summary span { color:var(--muted); font-size:12px; font-weight:800; }
.account-summary strong { overflow-wrap:anywhere; }
.account-modal { width:min(760px,100%); }
.account-alerts { margin-top:22px; }
.account-section-head {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:12px;
}
.account-section-head span {
  color:var(--brown);
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
}
.account-section-head h4,
.home-paid-alerts h2,
.account-email h4 {
  margin:4px 0 0;
  font-size:19px;
  letter-spacing:-.025em;
}
.account-section-head > strong {
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.account-subscriptions {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.account-subscription-card {
  min-width:0;
  display:grid;
  gap:13px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:17px;
  background:#faf8f2;
}
.account-subscription-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.account-subscription-top > div { min-width:0; }
.account-subscription-top > div > span {
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
}
.account-subscription-top > div > strong {
  display:block;
  margin-top:4px;
  overflow-wrap:anywhere;
  font-size:15px;
}
.account-status {
  flex:0 0 auto;
  border-radius:999px;
  padding:6px 8px;
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
}
.account-status.active { color:#126b45; background:#dff3e8; }
.account-status.paused { color:#776f61; background:#ebe6db; }
.account-subscription-meta {
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}
.account-toggle {
  width:100%;
  border:0;
  border-radius:12px;
  padding:10px 12px;
  font-weight:850;
}
.account-toggle.pause { background:#eee9de; color:var(--ink); }
.account-toggle.resume { background:var(--ink); color:white; }
.account-toggle:disabled { cursor:wait; opacity:.55; }
.account-subscriptions-empty {
  grid-column:1/-1;
  display:grid;
  gap:5px;
  padding:22px;
  border:1px dashed rgba(25,23,20,.16);
  border-radius:16px;
  color:var(--muted);
  text-align:center;
  font-size:12px;
}
.account-subscriptions-empty strong { color:var(--ink); font-size:14px; }
.account-list-note {
  margin:10px 2px 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
.account-email .auth-copy { margin:8px 0 16px; font-size:13px; }
.account-divider { height:1px; background:var(--line); margin:22px 0; }
#logoutBtn { width:100%; }
.consent-modal { width:min(520px,100%); }
.consent-summary {
  display:grid;
  gap:7px;
  padding:16px;
  border-radius:16px;
  background:#fff7dc;
}
.consent-summary span { color:var(--muted); font-size:13px; line-height:1.55; }
.consent-restart-alert {
  display:grid;
  gap:7px;
  margin-top:14px;
  padding:16px;
  border:3px solid var(--yellow);
  border-radius:16px;
  background:var(--ink);
  color:white;
  box-shadow:0 12px 28px rgba(25,23,20,.2);
}
.consent-restart-alert strong {
  color:var(--yellow);
  font-size:18px;
  line-height:1.3;
}
.consent-restart-alert span,
.consent-restart-alert b {
  color:white;
  font-size:13px;
  line-height:1.55;
}
.consent-check {
  margin:18px 0;
  display:grid;
  grid-template-columns:20px 1fr;
  gap:11px;
  align-items:start;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
  cursor:pointer;
}
.consent-check input { width:18px; height:18px; margin:2px 0 0; accent-color:var(--ink); }
.consent-check span { min-width:0; overflow-wrap:anywhere; }
.consent-check a { color:var(--brown); text-decoration:underline; text-underline-offset:2px; }
.consent-actions { display:grid; grid-template-columns:1fr 1.5fr; gap:10px; }
.consent-actions .btn:disabled { cursor:not-allowed; opacity:.42; transform:none; }

.toast {
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translate(-50%, 20px);
  opacity:0;
  pointer-events:none;
  background:#171613;
  color:white;
  border-radius:16px;
  padding:13px 18px;
  z-index:150;
  font-weight:750;
  box-shadow:0 16px 40px rgba(0,0,0,.25);
  transition:all .22s ease;
}
.toast.show { opacity:1; transform:translate(-50%,0); }

.empty { grid-column:1/-1; text-align:center; padding:48px; color:var(--muted); }
.term-prompt { display:grid; gap:7px; }
.term-prompt strong { color:var(--ink); font-size:18px; }
.term-prompt span { font-size:13px; line-height:1.5; }

@media (max-width: 920px) {
  .nav-links { display:none; }
  .finder-head { grid-template-columns:1fr; gap:24px; }
  .finder-steps { max-width:620px; }
  .dash-top { grid-template-columns:minmax(180px,.8fr) minmax(260px,1.5fr); }
  .course-grid { grid-template-columns:repeat(2,1fr); }
  .section-head { align-items:flex-start; flex-direction:column; }
}

@media (max-width: 620px) {
  .shell { width:min(100% - 20px, 1180px); }
  nav { height:68px; }
  .brand { font-size:18px; }
  .brand-mark { width:38px; height:38px; border-radius:13px; }
  .nav-actions .btn-dark { display:none; }
  .course-finder { padding:38px 0 34px; }
  .finder-copy h1 { font-size:45px; }
  .finder-copy > p { font-size:16px; }
  .finder-steps { padding:14px; }
  .dash-top { grid-template-columns:1fr; padding:16px; }
  .home-paid-alerts { padding:54px 0 58px; }
  .section { padding:58px 0; }
  .course-grid { grid-template-columns:1fr; padding:12px; }
  .consent-modal .modal-head,
  .consent-modal .modal-body { padding:20px; }
  .consent-modal .modal-head h3 { font-size:24px; }
  .consent-actions { grid-template-columns:1fr; }
  .account-subscriptions { grid-template-columns:1fr; }
}
