.portal-container{max-width:1050px;margin:0 auto;padding:0 28px}.portal-home{padding-top:30px;padding-bottom:80px}.portal-page{padding-top:55px;padding-bottom:100px}.portal-page h1{font-size:clamp(34px,5vw,54px)}.portal-page h2{font-size:26px;margin-top:28px}.portal-page h3{font-size:20px}.portal-kicker{color:#364da4;font-size:12px;font-weight:850;letter-spacing:.13em}.portal-home h2{font-size:30px;margin:8px 0 28px}.portal-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.portal-card,.portal-panel{background:#fff;border:1px solid #dce2ee;border-radius:15px;padding:25px;box-shadow:0 9px 25px #17295412}.portal-card{display:flex;flex-direction:column;min-height:265px;transition:transform .18s,box-shadow .18s}.portal-card:hover{transform:translateY(-3px);box-shadow:0 15px 32px #17295420}.portal-card-symbol{font-size:27px;color:#273e91;background:#edf0fa;display:grid;place-items:center;border-radius:13px;width:48px;height:48px}.portal-card h3{font-size:20px;margin:18px 0 0}.portal-card p{font-size:14px;line-height:1.65;flex:1;color:#53647c}.portal-cta{font-weight:750;color:#223f94;text-decoration:underline;text-underline-offset:3px}.portal-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.portal-stack{display:grid;gap:24px;max-width:870px}.portal-panel img,.portal-panel video{width:100%;height:auto;border-radius:10px;max-width:100%;background:#0c142a}.portal-panel img{object-fit:contain}.portal-panel video{aspect-ratio:16/9}.portal-tabs{display:flex;overflow-x:auto;gap:10px;padding:12px 0 22px;border-bottom:1px solid #dbe1ed;margin:15px 0 25px}.portal-tabs a{white-space:nowrap;background:#fff;border:1px solid #bfcbe2;border-radius:9px;padding:11px 14px;font-weight:750;font-size:14px}.portal-tabs a.active,.portal-tabs a[aria-current="page"]{background:#273e91;color:#fff}.portal-pre{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}.portal-lede{font-size:19px;color:#4b5b73}.portal-essay{padding:25px;background:#fff;border:1px solid #dce2ee;border-radius:14px}.portal-empty{padding:35px;background:#fff;border:2px dashed #dce2ee;border-radius:14px;margin-top:25px}.portal-form{display:grid;gap:16px;margin-top:20px}.portal-form label{display:grid;gap:6px;font-weight:700;font-size:14px}.portal-form input:not([type="checkbox"]):not([type="radio"]),.portal-form select,.portal-form textarea,.portal-field input{border:1px solid #abb8cf;border-radius:8px;background:#fff;padding:11px 12px;max-width:100%;width:100%;font:inherit}.portal-form textarea{resize:vertical}.portal-form .portal-check,.portal-check{display:flex;align-items:start;gap:9px;font-size:14px}.portal-check input{margin-top:5px}.portal-fieldset{border:1px solid #d9dfec;border-radius:10px;padding:14px;display:grid;gap:12px}.portal-fieldset legend{font-weight:750;padding:0 8px}.portal-fieldset label{display:grid;gap:5px}.portal-options{border:0;padding:8px 0 15px;display:grid;gap:13px}.portal-options legend{font-weight:750;margin-bottom:9px}.portal-options label{cursor:pointer;display:flex;gap:8px;align-items:baseline}.portal-result{margin-top:20px;padding:18px;border-radius:10px;border:1px solid #aab7c8}.portal-correct{border-color:#579f71;background:#edf9ef}.portal-incorrect{border-color:#b97754;background:#fff3e9}.portal-progress{padding:14px;background:#edf0fb;border-radius:10px}.portal-manage-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:10px;border-top:1px solid #e6eaf1}.portal-danger{background:#fff;color:#913349;border:1px solid #b95e72;border-radius:8px;padding:8px 12px;cursor:pointer}.portal-danger:hover{background:#ffeef0}.skip-link{position:absolute;left:10px;top:-100px;background:#fff;color:#111;padding:12px;z-index:100}.skip-link:focus{top:10px}*:focus-visible{outline:3px solid #c65a00!important;outline-offset:3px!important}a{text-underline-offset:3px}.portal-footer-links{display:flex;gap:17px;justify-content:center;flex-wrap:wrap;margin-top:9px}.portal-footer-links a{text-decoration:underline}.portal-panel summary{cursor:pointer;font-weight:750;color:#273e91}.portal-panel details{margin-top:20px}.portal-field{display:grid;gap:8px;max-width:380px;margin-bottom:18px}.portal-field input{padding:11px}.portal-panel form button{margin-top:12px}.portal-panel h3{overflow-wrap:anywhere}
@media(max-width:800px){.portal-cards{grid-template-columns:1fr}.portal-two-col{grid-template-columns:1fr}.portal-card{min-height:0}.portal-page{padding-top:30px}.portal-container{padding-left:18px;padding-right:18px}}
@media(prefers-reduced-motion:reduce){.portal-card{transition:none}.portal-card:hover{transform:none}}

/* Responsive embeds for YouTube lessons and project demonstrations. */
.portal-video-embed { width: 100%; aspect-ratio: 16 / 9; }
.portal-video-embed iframe { width: 100%; height: 100%; border: 0; }
/* Dark mode for engineering pages */
html[data-theme="dark"] .portal-page,
html[data-theme="dark"] .portal-home {
  color: #e2e8f0;
}

html[data-theme="dark"] .portal-card,
html[data-theme="dark"] .portal-panel,
html[data-theme="dark"] .portal-essay,
html[data-theme="dark"] .portal-empty {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
  box-shadow: none;
}

/* Topic buttons */
html[data-theme="dark"] .portal-tabs {
  border-color: #475569;
}

html[data-theme="dark"] .portal-tabs a {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #64748b;
}

html[data-theme="dark"] .portal-tabs a:hover {
  background: #334155;
  color: #ffffff;
}

html[data-theme="dark"] .portal-tabs a.active,
html[data-theme="dark"] .portal-tabs a[aria-current="page"] {
  background: #2563eb;
  color: #ffffff;
  border-color: #93c5fd;
}

/* Text and links */
html[data-theme="dark"] .portal-kicker,
html[data-theme="dark"] .portal-cta,
html[data-theme="dark"] .portal-panel summary {
  color: #93c5fd !important;
}

html[data-theme="dark"] .portal-card p,
html[data-theme="dark"] .portal-lede {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .portal-card-symbol {
  background: #334155;
  color: #bfdbfe;
}

html[data-theme="dark"] .portal-pre,
html[data-theme="dark"] .portal-page code {
  background: #0f172a;
  color: #e2e8f0;
}

/* Forms */
html[data-theme="dark"] .portal-form input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .portal-form select,
html[data-theme="dark"] .portal-form textarea,
html[data-theme="dark"] .portal-field input {
  background: #0f172a;
  color: #f8fafc;
  border-color: #64748b;
}

html[data-theme="dark"] .portal-form input::placeholder,
html[data-theme="dark"] .portal-form textarea::placeholder,
html[data-theme="dark"] .portal-field input::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] .portal-fieldset,
html[data-theme="dark"] .portal-manage-row {
  border-color: #475569;
}

/* Progress and practice feedback */
html[data-theme="dark"] .portal-progress {
  background: #1e3a5f;
  color: #dbeafe;
}

html[data-theme="dark"] .portal-result {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #64748b;
}

html[data-theme="dark"] .portal-correct {
  background: #143829;
  color: #dcfce7;
  border-color: #4ade80;
}

html[data-theme="dark"] .portal-incorrect {
  background: #48251d;
  color: #ffedd5;
  border-color: #fb923c;
}

/* Delete buttons */
html[data-theme="dark"] .portal-danger {
  background: #40202b;
  color: #fecdd3;
  border-color: #fb7185;
}

html[data-theme="dark"] .portal-danger:hover {
  background: #592b39;
}