/* Campus refresh: cool surfaces, indigo actions and mint highlights.
   Screen rules leave the existing print layouts in charge. */
@media screen {
  body {font-size:16px;line-height:1.7}
  h1,h2,h3,.serif {font-family:var(--sans);font-weight:650}
  h1 {letter-spacing:-.045em;line-height:1.1}
  h2 {letter-spacing:-.035em;line-height:1.2}
  h3 {letter-spacing:-.025em;line-height:1.3}
  .container {width:min(1240px,calc(100% - 64px))}
  .eyebrow {font-size:11px;letter-spacing:1.5px}
  .text-link {color:var(--primary);font-size:14px;line-height:1.6}
  .text-link:hover {color:#293ba9;border-color:currentColor}
  :is(button,a,input,select,textarea,summary):focus-visible {outline:3px solid var(--primary);outline-offset:4px}
  .btn {background:var(--primary);border-color:var(--primary);border-radius:12px;min-height:46px;font-size:14px;padding:12px 20px}
  .btn:hover {background:#3443b5;border-color:#3443b5}
  .btn.gold {background:var(--gold);border-color:var(--gold);color:var(--night)}
  .btn.gold:hover {background:#a3f4e4;border-color:#a3f4e4}
  .btn.ghost {color:var(--primary);border-color:#bdc7e8}
  .btn.ghost:hover {background:var(--surface-soft)}
  .btn.light {color:white;background:#ffffff08;border-color:#9baada66}
  .btn.light:hover {background:#ffffff18}
  .btn.small {min-height:44px;font-size:13px;padding:9px 15px}
  .icon-btn {width:44px;height:44px;border-radius:12px;background:var(--white)}
  .icon-btn:hover {background:var(--surface-soft)}
  .icon-btn.saved {background:#fceaf2;color:#a33261}
  .tag {color:var(--primary);font-size:11px;padding:5px 9px}
  .pill {font-size:12px}
  #header {background:var(--white)}
  .topbar {height:80px;gap:22px}
  .brandmark {color:var(--primary);width:48px;height:48px}
  .brandmark img {display:block;width:100%;max-width:none;height:auto;aspect-ratio:1;object-fit:contain;background:#fff}
  .brand-name {font-family:var(--sans);font-size:23px;font-weight:700;letter-spacing:-1px}
  .brand-sub {color:var(--muted);font-size:9px;letter-spacing:1.6px}
  .main-nav {gap:18px}
  .main-nav a {font-size:12px;white-space:nowrap;padding:27px 0}
  .main-nav a:hover,.main-nav a.active {color:var(--primary)}
  .main-nav a.active:after {background:var(--primary);border-radius:4px}
  .search-trigger {min-height:44px;border-radius:12px;color:var(--body-text)}
  .search-trigger span,.search-trigger kbd {display:none}
  .search-trigger .icon {width:19px;height:19px}
  .top-progress {color:var(--muted);font-size:12px}
  .hero {background:radial-gradient(ellipse at 80% 45%,#334d8d55,transparent 60%),var(--night);color:#fff}
  .hero-grid {grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:44px;min-height:540px}
  .hero-copy {padding:64px 0}
  .hero h1 {font-size:clamp(42px,4.2vw,64px);font-weight:700;letter-spacing:-.05em;line-height:1.1;max-width:700px}
  .hero h1>span,.hero h1>em {display:block}
  .hero-copy>.hero-tagline {font-size:clamp(20px,2.1vw,27px);font-weight:500;line-height:1.45;color:var(--gold);margin:-6px 0 24px;max-width:600px}
  .hero h1 em {font-style:normal;font-weight:500;color:var(--gold);margin-top:10px}
  .hero .eyebrow {font-size:11px;letter-spacing:1.6px;margin-bottom:26px}
  .hero-copy>p {font-size:16px;max-width:540px;color:#ccd5ee;line-height:1.8}
  .hero .btn {font-size:14px;padding:12px 20px}
  .hero-foot {color:#bfcce9;font-size:12px;letter-spacing:0;gap:13px;flex-wrap:wrap}
  .hero-foot span+span:before {margin-right:13px}
  .academy-scene {min-width:0;margin:32px 0;padding:7px;border:1px solid #85ead640;border-radius:24px;background:#ffffff06;box-shadow:0 24px 60px #080f2b55,0 0 50px #8499ee0d}
  .academy-scene img {display:block;width:100%;height:auto;aspect-ratio:1280/853;border-radius:17px}
  .hero-stats {background:#111d40;border-top:1px solid #ffffff12}
  .stats-grid {gap:20px;padding:24px 0}
  .stat-item {gap:14px;min-width:0}
  .stat-number {font:650 32px/1.2 var(--sans);letter-spacing:-1px}
  .stat-label {font-size:12px;color:#ccd5ee}
  .welcome-row {grid-template-columns:minmax(0,1fr) minmax(260px,.43fr);gap:20px}
  .continue-card {padding:26px;gap:18px;min-width:0;box-shadow:var(--shadow)}
  .continue-body h3 {font-size:21px;font-weight:650;overflow-wrap:anywhere}
  .continue-icon {color:var(--primary)}
  .micro,.privacy-note {font-size:12px}
  .daily-card {display:flex;background:#e7f7f3;padding:24px;min-width:0}
  .daily-card .big {font-weight:650}
  .daily-card .icon-btn {background:var(--primary)}
  .section {padding:64px 0}
  .section-head {align-items:center}
  .theme-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
  .theme-card {min-width:0;padding:24px;border-radius:18px;min-height:240px}
  .theme-card:hover {border-color:var(--theme);box-shadow:var(--shadow)}
  .theme-top {margin-bottom:24px}
  .theme-icon {width:44px;height:44px;border-radius:13px}
  .theme-number {font-size:12px}
  .theme-card h3 {font-size:21px;font-weight:650;overflow-wrap:anywhere}
  .theme-card p {font-size:13px;line-height:1.65}
  .theme-bottom {font-size:12px;gap:10px}
  .home-lab {background:var(--surface-soft)}
  .lab-grid {grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr);gap:56px}
  .lab-grid p {font-size:15px}
  .lab-grid h2 {font-size:36px}
  .hypno-box {min-width:0;box-shadow:var(--shadow)}
  .chart-header {font-size:13px;gap:12px;flex-wrap:wrap}
  .chart-note {font-size:12px;line-height:1.7}
  .stage-buttons {gap:8px}
  .stage-buttons button {min-height:44px;min-width:44px;padding:8px 14px;font-size:12px}
  .stage-desc {font-size:14px;color:var(--body-text)}
  .revision-banner {background:var(--night);grid-template-columns:repeat(2,minmax(0,1fr));padding:42px}
  .revision-banner h2 {font-size:34px}
  .revision-banner p {font-size:15px;color:#ccd5ee}
  .revision-step {font-size:14px}
  .revision-step>span {flex-shrink:0;font-family:var(--sans)}
  .revision-step small {color:#bfcce9;font-size:12px}
  .page-top h1 {font-size:clamp(34px,4.4vw,54px);font-weight:700;letter-spacing:-.045em}
  .lead {font-size:16px}
  .breadcrumb {flex-wrap:wrap;font-size:12px}
  .breadcrumb a {color:var(--primary)}
  .lesson-grid,.labs-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
  .lesson-card,.lab-card,.mode-card,.metric,.source-card {min-width:0;border-radius:18px}
  .lesson-card h3 {font-weight:650;font-size:23px}
  .lesson-card p,.lab-card p,.source-card p {font-size:14px;line-height:1.75}
  .lesson-card .icon-btn {width:44px;height:44px;flex-shrink:0}
  .lesson-card-top {gap:10px}
  .theme-name {font-size:11px}
  .lesson-meta {font-size:12px;flex-wrap:wrap;gap:8px 16px}
  .lesson-footer {font-size:13px;min-height:48px}
  .filter-btn,.therapy-filters a {min-height:44px;display:inline-flex;align-items:center;font-size:13px;padding:9px 15px}
  .filter-btn.active {background:var(--primary);border-color:var(--primary)}
  .toolbar {align-items:stretch;flex-wrap:wrap}
  .input-wrap {min-width:min(100%,260px)}
  input,select,textarea {font-size:16px;min-width:0}
  .field,input[type=search],select,textarea,input[type=number],input[type=date] {border-radius:10px}
  .reader-layout {grid-template-columns:200px minmax(0,780px);gap:48px}
  .reader-content {font-size:16px;line-height:1.9}
  .reader-section h2 {font-size:29px;font-weight:650;letter-spacing:-.025em}
  .reader-content h3 {font-weight:650}
  .reader-content :is(.objectives ul,.trap-box ul,.source-box p,.source-box li) {font-size:14px}
  .toc {font-size:13px}
  .toc a {padding:9px 12px}
  .toc .eyebrow {font-size:11px}
  .essential {font-size:22px;font-weight:500;color:var(--ink)}
  .reader-content table {font-size:14px}
  .reader-content th {font-size:12px}
  .source-box h2,.source-box h3 {font-weight:650}
  .source-box a {color:var(--primary)}
  .source-box .access-tag,.section-citation {font-size:12px!important}
  .chapter-updates p {font-size:14px}
  .tab {min-height:44px;font-size:13px}
  .question {font-size:25px;font-weight:600}
  .option {font-size:15px;padding:15px 17px;border-radius:12px;min-height:48px}
  .option.selected {background:var(--surface-soft);border-color:var(--primary)}
  .feedback {font-size:14px}
  .source-card h3,.corpus-card h3,.registry-group summary,.update-group summary {font-weight:650}
  .source-card .text-link,.source-access,.access-tag {font-size:12px}
  .therapy-card {border-top-color:var(--primary)}
  .therapy-hub p {color:#ccd5ee}
  .therapy-workshop :is(h2,h3) {font-weight:650}
  .therapy-clue button {font-size:14px}
  .therapy-workshop :is(button,select,input,summary):focus-visible {outline-color:var(--primary)}
  .therapy-mode button {font-size:14px;min-height:44px}
  .therapy-case-picker select,.therapy-time-inputs input {font-size:16px}
  .therapy-time-inputs {flex-wrap:wrap}
  .therapy-time-inputs label {flex-basis:140px}
  .therapy-phase h3 {font-weight:650}
  .author-card {background:var(--surface-soft)}
  .author-monogram {font-family:var(--sans);font-weight:650}
  .legal-details dd {overflow-wrap:anywhere}
  #footer {background:var(--white);padding:38px 0}
  .footer-brand {font-family:var(--sans);font-weight:700}
  .footer-copy,.footer-links,.footer-bottom {font-size:12px}
  .footer-links a {padding:6px 0}
  .footer-links a:hover {color:var(--primary);text-decoration:underline}
  .footer-row>div {min-width:0}
  .search-dialog {background:var(--white);max-height:85dvh}
  .search-head input {font-size:16px;min-width:0}
  .search-head button {min-width:44px;min-height:44px;flex-shrink:0}
  .search-head input:focus-visible {outline-offset:0;outline-width:2px}
  .search-result strong {font-size:19px;font-weight:650}
  .search-result small {font-size:12px}
  .search-results {max-height:60dvh}
  .search-dialog::backdrop {background:#111d4099}
}

/* The menu changes before desktop navigation starts to compress. */
@media screen and (max-width:1120px) {
  .topbar {height:72px;position:relative}
  .nav-tools {margin-left:auto}
  .top-progress {display:none}
  .menu-toggle {display:inline-grid}
  .main-nav {display:none;position:absolute;top:calc(100% + 1px);left:0;right:0;margin:0;padding:12px;background:var(--white);border:1px solid var(--line);border-radius:0 0 18px 18px;box-shadow:0 18px 32px #17234c1a;max-height:calc(100dvh - 90px);overflow-y:auto;gap:5px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .main-nav.open {display:grid}
  .main-nav a {padding:13px 16px;font-size:15px;border-radius:10px;white-space:normal}
  .main-nav a:hover,.main-nav a.active {background:var(--surface-soft)}
  .main-nav a.active:after {display:none}
  .welcome-row {grid-template-columns:minmax(0,1fr)}
  .daily-card {padding:20px 24px}
  .daily-card .big {display:inline-block;margin-right:14px;font-size:30px}
  .theme-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .theme-card {min-height:220px}
  .hero-grid {gap:20px}
  .hero-copy {padding:48px 0}
  .hero h1 {font-size:clamp(40px,5vw,54px)}
  .lesson-grid,.labs-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .reader-layout {grid-template-columns:170px minmax(0,1fr);gap:30px}
  .lab-grid {gap:28px}
}
@media screen and (max-width:800px) {
  .container {width:calc(100% - 40px)}
  .hero-grid {grid-template-columns:minmax(0,1fr);gap:0;min-height:0}
  .hero-copy {padding:44px 0 12px}
  .hero h1 {font-size:clamp(37px,6.7vw,54px);max-width:680px}
  .hero-copy>p {max-width:600px}
  .hero-foot {font-size:12px;margin-top:24px}
  .academy-scene {width:min(100%,600px);margin:22px auto 36px}
  .stat-item {flex-direction:column;align-items:flex-start;gap:5px}
  .stat-item:first-child {justify-content:center}
  .stats-grid {gap:16px}
  .stat-label {font-size:12px}
  .stat-number {font-size:28px}
  .section {padding:44px 0}
  .section-head {flex-wrap:wrap;align-items:flex-start}
  .section-head h2 {font-size:30px}
  .section-head .text-link {font-size:14px;white-space:normal}
  .lab-grid {grid-template-columns:minmax(0,1fr);gap:24px}
  .lab-grid>div:first-child {max-width:620px}
  .revision-banner {grid-template-columns:minmax(0,1fr);padding:30px}
  .revision-steps {border-top:1px solid #ffffff26;padding-top:24px}
  .reader-layout {grid-template-columns:minmax(0,1fr)}
  .reader-content {max-width:720px}
  .mobile-toc {font-size:14px}
  .mobile-toc summary {min-height:28px}
  .mobile-toc a {padding:11px 0}
  .footer-links {gap:10px 24px}
  .therapy-case-top {flex-wrap:wrap}
}
@media screen and (max-width:540px) {
  .container {width:calc(100% - 36px)}
  .topbar {height:70px;gap:8px}
  .brand {gap:8px}
  .brand-name {font-size:19px;letter-spacing:-.6px}
  .brand-sub {font-size:8px;letter-spacing:1px}
  .brandmark,.brandmark svg {width:34px}
  .nav-tools {gap:5px}
  .search-trigger {width:44px;padding:10px;justify-content:center}
  .menu-toggle {width:44px;height:44px}
  .hero .eyebrow {font-size:10px;letter-spacing:1px;margin-bottom:22px;gap:8px}
  .hero .eyebrow:before {width:18px;flex-shrink:0}
  .hero h1 {max-width:none;font-size:clamp(32px,9.5vw,48px);letter-spacing:-.045em;line-height:1.13}
  .hero h1 em {margin-top:12px}
  .hero-copy>p {font-size:15px;line-height:1.75;margin-bottom:24px}
  .hero .btn {font-size:13px;padding:12px 14px}
  .hero .btn-row {display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:10px}
  .hero-foot {gap:7px;font-size:11px;letter-spacing:0}
  .hero-foot span+span:before {margin-right:7px}
  .academy-scene {padding:5px;border-radius:19px;margin:20px auto 28px}
  .academy-scene img {border-radius:13px}
  .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr));padding:22px 0;gap:22px 16px}
  .stat-item {flex-direction:row;justify-content:flex-start;align-items:center;gap:12px;border:0}
  .stat-item:first-child {justify-content:flex-start}
  .stat-number {font-size:29px}
  .stat-label {font-size:11px}
  .continue-card {display:grid;grid-template-columns:44px minmax(0,1fr);gap:16px;padding:22px}
  .continue-icon {width:44px;height:44px}
  .continue-body h3 {font-size:20px}
  .continue-card>.btn {grid-column:1/-1;margin:0;width:100%}
  .daily-card {padding:20px}
  .daily-card .big {display:block;font-size:30px}
  .daily-card .micro {display:block}
  .theme-grid {grid-template-columns:minmax(0,1fr);gap:14px}
  .theme-card {min-height:0;padding:22px}
  .theme-top {margin-bottom:18px}
  .theme-card h3 {font-size:22px}
  .theme-card p {font-size:14px;margin-bottom:18px}
  .theme-bottom {font-size:13px}
  .theme-icon {width:44px;height:44px}
  .lab-grid h2 {font-size:30px}
  .hypno-box {padding:20px 15px}
  .chart-header {font-size:12px}
  .revision-banner {padding:26px}
  .revision-banner h2 {font-size:29px}
  .revision-banner .btn {width:100%}
  .revision-step {align-items:flex-start}
  .lesson-grid,.labs-grid {grid-template-columns:minmax(0,1fr)}
  .toolbar>label {width:100%}
  .toolbar select {width:100%;font-size:16px}
  .filter-list {gap:8px}
  .filter-btn {font-size:12px}
  .reader-top h1 {font-size:34px;overflow-wrap:anywhere}
  .reader-meta {font-size:12px;gap:12px}
  .reader-meta .btn {font-size:13px}
  .reader-content {font-size:16px}
  .reader-section h2 {font-size:26px}
  .objectives {padding:22px}
  .essential {font-size:21px}
  .revision-panel {padding:22px 16px}
  .tab {font-size:12px;padding:10px}
  .question {font-size:23px}
  .option {font-size:14px;padding:14px}
  .rating-row {flex-wrap:wrap}
  .rating-row button {font-size:12px}
  .question-actions,.end-actions {flex-wrap:wrap}
  .calc-result {flex-wrap:wrap}
  .therapy-steps {flex-direction:column;gap:8px}
  .therapy-steps li {display:flex;gap:12px;border-top:0;border-left:3px solid var(--line);padding:8px 0 8px 12px;font-size:12px}
  .therapy-steps li.current,.therapy-steps li.past {border-left-color:var(--green)}
  .therapy-steps li span {margin:0}
  .therapy-card-meta {flex-wrap:wrap;font-size:12px}
  .therapy-status {white-space:normal}
  .therapy-mode button {flex-basis:120px}
  .therapy-workshop {padding:23px 18px}
  .author-card {flex-wrap:wrap}
  .footer-row {gap:24px}
  .footer-links {display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
  .footer-links a {min-height:38px}
  .search-head {padding:16px;gap:10px}
}
@media screen and (max-width:359px) {
  .container {width:calc(100% - 28px)}
  .brandmark {display:none}
  .hero .btn-row {grid-template-columns:minmax(0,1fr)}
  .main-nav {grid-template-columns:minmax(0,1fr)}
  .hero-foot span+span:before {display:none}
  .hero-foot {gap:6px 14px}
}
