/* Shared visual layer. Business rules and semantic status colors stay in their components. */
.portal-theme {
  --primary: #ff6b00;
  --portal-earth: url('../img/brand/earth-orange.webp');
  --primary-dark: #c95000;
  --dark: #090b0d;
  --light-bg: #f6f7f9;
  --border: #e6e8eb;
  --portal-shadow: 0 4px 22px rgb(15 23 42 / 4%);
  color: #17191c;
  background: var(--light-bg);
  -webkit-font-smoothing: antialiased;
}
.portal-theme :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #bd4f00;
  outline-offset: 4px;
}
.portal-theme .sidebar {
  width: 246px;
  padding: 18px 16px;
  background: linear-gradient(165deg, #090b0d 65%, #19130e);
  box-shadow: none;
  border-right: 1px solid #202327;
}
.portal-theme .brand { padding: 6px 0 24px; margin-bottom: 20px; }
.portal-theme .brand a { display: block; text-align: center; }
.portal-theme .brand img { display: block; width: 132px; margin: 0 auto; }
.portal-theme .menu a,
.portal-theme .menu-submenu > summary {
  padding: 12px 13px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.45;
  color: #cbd0d5;
  transition: background-color .15s ease;
}
.portal-theme .menu > a { display: flex; align-items: center; gap: 11px; }
.portal-theme .menu > a::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1px solid #747b83;
  border-radius: 2px;
  flex-shrink: 0;
}
.portal-theme .menu a:hover,
.portal-theme .menu-submenu > summary:hover { background: #202225; color: #fff; }
.portal-theme .menu a[aria-current="page"] {
  background: #23211f;
  box-shadow: inset 3px 0 var(--primary);
  color: #fff;
  font-weight: 600;
}
.portal-theme .menu a[aria-current="page"]::before { border-color: var(--primary); background: var(--primary); }
.portal-theme .menu-submenu a { margin-left: 10px; padding-left: 16px; font-size: 12px; }
.portal-brand-note { margin-top: auto; padding: 42px 13px 14px; color: #989fa7; font-size: 9px; line-height: 1.8; letter-spacing: 2.2px; }
.portal-brand-note span { display: block; width: 28px; height: 2px; background: var(--primary); margin-top: 15px; }
.portal-theme .topbar { height: 76px; padding: 0 34px; border-color: var(--border); }
.portal-theme .topbar-app-title { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.4px; }
.portal-theme .topbar-app-title span { color: var(--primary); font-size: 22px; margin-left: 4px; }
.portal-theme .topbar .hub-button { min-height: 38px; padding: 8px 13px; font-size: 12px; }
.portal-theme .user-avatar { background: #fff1e7; color: #a34200; border: 1px solid #ffd9bd; }
.portal-theme .user-info strong { font-size: 13px; }
.portal-theme .page { padding: 24px 34px 48px; }
.portal-theme .portal-page-actions { margin-bottom: 22px; }
.portal-theme .portal-page-actions a { color: #656d77; font-size: 12px; }
.portal-theme :is(.citizen-hub, .dashboard) { max-width: 1220px; margin-inline: auto; }
.portal-theme .citizen-hub { --hub-orange: #ff6b00; }
.portal-theme .hub-heading { margin-bottom: 26px; }
.portal-theme .hub-heading h1 { font-size: clamp(27px, 3vw, 36px); font-weight: 700; letter-spacing: -1.2px; margin: 6px 0 8px; }
.portal-theme .hub-heading p { font-size: 14px; max-width: 640px; }
.portal-theme :is(.hub-eyebrow, .portal-eyebrow) { font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.portal-theme .hub-heading .hub-eyebrow { color: #9f4500; }
.portal-theme :is(.card, .hub-card) { border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--portal-shadow); }
.portal-theme .hub-card { padding: 25px; }
.portal-theme .hub-card h2 { font-size: 21px; }
.portal-theme .hub-card p { font-size: 14px; }
.portal-theme .hub-grid { gap: 18px; margin-bottom: 24px; }
.portal-theme :is(.hub-card, .card, .form-group) { min-width: 0; }
.portal-theme .drive-checklist-form label:not(.drive-checklist-option) { display: block; margin-bottom: 8px; }
.portal-theme .drive-checklist-form .drive-checklist-option { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; line-height: 1.5; cursor: pointer; }
.portal-theme .drive-checklist-option input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }
.portal-theme .drive-checklist-form input[type="url"] { width: 100%; min-width: 0; }
.portal-theme .drive-checklist-form .errorlist { color: #9c2318; padding-left: 20px; }
.portal-theme .hub-button,
.portal-theme .btn-primary,
.portal-theme .login-right button {
  background: var(--primary);
  color: #17191c !important;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: none;
}
.portal-theme :is(.hub-button, .btn-primary, .login-right button):hover { background: #ff8329; }
.portal-theme .hub-button-secondary {
  background: #fff;
  border: 1px solid #dfe2e6;
  color: #25292e !important;
}
.portal-theme .hub-button-secondary:hover { background: #fff5ed; border-color: #f0be98; }
.portal-theme .hub-button:disabled { background: #e9eaec; color: #737982 !important; cursor: not-allowed; }
.portal-theme .hub-anchors { margin-top: 22px; gap: 8px; }
.portal-theme .hub-anchors a { border-radius: 8px; padding: 9px 13px; font-size: 12px; border-color: var(--border); }
.portal-theme .hub-anchors a:hover { border-color: var(--primary); background: #fff7f1; }
.portal-theme .hub-toolbar { padding: 17px 20px; background: #fff; border: 1px solid var(--border); border-radius: 12px; font-size: 13px; }
.portal-theme .hub-toolbar > a:not(.hub-button) { color: #9e4200; text-underline-offset: 3px; }
.portal-theme .hub-table th { background: #f8f9fb; font-size: 11px; letter-spacing: .3px; }
.portal-theme .hub-table :is(td, th) { padding: 17px 14px; border-color: var(--border); }
.portal-theme .hub-combat { border-radius: 14px; background: #101316; }
.portal-theme .hub-combat-aside { background: #1b1e22; border-color: #33383e; }
.portal-theme .hub-combat .hub-button-secondary { color: #25292e !important; }
.portal-theme .kpi-grid { gap: 18px; }
.portal-theme .kpi { padding: 23px; box-shadow: var(--portal-shadow); }
.portal-theme .kpi h4 { color: #626a75; font-size: 12px; font-weight: 500; }
.portal-theme .kpi h2 { font-size: 32px; letter-spacing: -1px; color: #17191c; margin-top: 12px; }
.portal-theme .kpi::after { content: ''; display: block; width: 26px; height: 3px; margin-top: 15px; background: var(--primary); border-radius: 2px; }
.portal-welcome { position: relative; isolation: isolate; overflow: hidden; border-radius: 14px; background: #090b0d; color: #fff; padding: 32px; margin: 0 0 30px; }
.portal-welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #090b0d 12%, rgb(9 11 13 / 90%) 42%, rgb(9 11 13 / 8%)), var(--portal-earth) right -10px center / 440px auto no-repeat;
}
.portal-welcome::after { content: none; }
.portal-welcome .hub-eyebrow { color: #ffab70; }
.portal-welcome h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.12; letter-spacing: -.9px; margin: 12px 0; max-width: 490px; color: #fff; }
.portal-welcome p { color: #c5c9ce; font-size: 14px; margin-bottom: 22px; max-width: 470px; }
.portal-welcome-tagline { position: absolute; right: 30px; bottom: 28px; text-align: right; font-size: 10px; letter-spacing: 2px; line-height: 1.8; color: #fff; }
.portal-theme .portal-materials-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-material-index { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid #ffdcc4; border-radius: 10px; background: #fff5ed; color: #a14500; font-weight: 700; font-size: 13px; margin-bottom: 7px; }
.portal-theme .portal-support-card { background: linear-gradient(135deg, #0c0e11, #202125); color: #fff; border-color: #22272d; }
.portal-theme .portal-support-card :is(h2, .hub-eyebrow) { color: #fff; }
.portal-theme .portal-support-card :is(p, small) { color: #c6cbd1; }
.portal-theme .portal-support-card a:not(.hub-button) { color: #ffb17a; }
.portal-theme .portal-support-card .hub-list > li { border-color: #373c43; }
.portal-theme .portal-support-card .hub-button { background: #fff; color: #16191d !important; }
.portal-theme .portal-support-card .hub-button:hover { background: #fff0e4; }
.portal-maker-heading { border-bottom: 1px solid var(--border); padding-bottom: 23px; }
.portal-maker-heading .hub-eyebrow::before { content: ''; display: inline-block; width: 17px; height: 2px; background: var(--primary); margin: 0 8px 3px 0; }
.portal-theme .citizen-roadmap .roadmap-hero { background: #111519; border-radius: 14px; }
.portal-theme .citizen-roadmap .roadmap-orbit { min-height: 200px; background: var(--portal-earth) center / contain no-repeat; mix-blend-mode: screen; }
.portal-theme .citizen-roadmap .roadmap-orbit svg, .portal-theme .citizen-roadmap .roadmap-orbit strong { visibility: hidden; }
.portal-theme .citizen-roadmap .roadmap-checklist { border-top: 3px solid var(--primary); }
.portal-theme .citizen-roadmap .roadmap-detail summary > span { color: #a24600; background: #fff0e4; }
/* Login uses the same local image as the welcome banner. */
.portal-theme.login-body { height: auto; min-height: 100vh; }
.portal-theme .login-container { min-height: 100vh; height: auto; }
.portal-theme .login-left { position: relative; isolation: isolate; overflow: hidden; width: 56%; min-height: 100vh; padding: 48px 9% 44px 6%; flex-direction: column; align-items: flex-start; justify-content: space-between; background: #07090b; color: #fff; }
.portal-theme .login-left::before { content: ''; position: absolute; z-index: -1; width: 720px; height: 720px; right: -340px; bottom: -200px; border-radius: 50%; background: #080b10 var(--portal-earth) center / cover no-repeat; box-shadow: none; opacity: .92; }
.portal-theme .login-left::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #07090b 5%, rgb(7 9 11 / 65%) 55%, transparent); }
.portal-theme .login-logo { width: 144px; max-width: 100%; margin: 0; }
.portal-login-story { padding: 64px 0; }
.portal-login-story .portal-eyebrow { color: #f8af78; font-size: 10px; letter-spacing: 3px; }
.portal-login-story h1 { color: #fff; font-size: clamp(40px, 4.6vw, 70px); line-height: 1.04; letter-spacing: -2.3px; margin: 22px 0; }
.portal-login-story h1 span { color: var(--primary); }
.portal-login-story p { font-size: 17px; line-height: 1.7; color: #d2d6dc; }
.portal-login-footnote { font-size: 10px; line-height: 1.8; letter-spacing: 3px; }
.portal-login-footnote::before { content: ''; display: block; width: 34px; height: 3px; background: var(--primary); margin-bottom: 18px; }
.portal-theme .login-right { width: 44%; padding: 56px 40px; background: #fff; }
.portal-theme .login-right-content { max-width: 380px; }
.portal-theme .login-right .portal-eyebrow { color: #a24600; display: block; margin-bottom: 13px; }
.portal-theme .login-right-content h2 { margin: 0 0 12px; font-size: 30px; letter-spacing: -.9px; font-weight: 700; }
.portal-theme .login-help-text { font-size: 13px; line-height: 1.7; color: #6c7480; margin-bottom: 23px; }
.portal-theme .login-right form { max-width: none; margin-top: 30px; }
.portal-theme .login-right label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.portal-theme .login-right input { min-height: 50px; border-color: #dadfe5; background: #fbfcfd; font: inherit; font-size: 16px; padding: 12px 14px; margin-bottom: 20px; }
.portal-theme .login-right button { min-height: 50px; font-size: 14px; }
.portal-theme .login-forgot { margin: 23px 0 15px; font-size: 12px; text-align: center; }
.portal-theme .login-forgot a { color: #9e4200; text-decoration: underline; text-underline-offset: 4px; }
.portal-theme.login-corporate-body { background: radial-gradient(ellipse at top, #26201b, #090b0d 70%); }
.portal-theme .login-corporate-card { border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 70px #0003; }
@media (min-width: 901px) {
  .portal-theme .sidebar { height: 100dvh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #434950 transparent; }
}
@media (max-width: 1100px) {
  .portal-theme .portal-materials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-welcome-tagline { display: none; }
}
@media (max-width: 900px) {
  .portal-theme .sidebar { width: min(280px, 88vw); padding-bottom: 25px; }
  .portal-theme .page { padding: 20px 18px 38px; }
  .portal-theme .topbar { height: auto; min-height: 68px; padding: 10px 14px; }
  .portal-theme .topbar-app-title { font-size: 13px; max-width: 39vw; }
  .portal-theme .topbar-app-title span { display: none; }
  .portal-theme .login-left { padding: 38px; width: 48%; }
  .portal-theme .login-right { width: 52%; padding: 38px 25px; }
  .portal-login-story h1 { font-size: 43px; }
}
@media (max-width: 640px) {
  .portal-theme .login-container { flex-direction: column; }
  .portal-theme .login-left { display: flex; width: 100%; min-height: 290px; padding: 24px; }
  .portal-theme .login-left::before { width: 390px; height: 390px; right: -180px; bottom: -230px; }
  .portal-theme .login-logo { width: 93px; }
  .portal-login-story { padding: 23px 0 5px; }
  .portal-login-story h1 { font-size: 37px; letter-spacing: -1.5px; margin: 12px 0; }
  .portal-login-story p { font-size: 13px; }
  .portal-login-story .portal-eyebrow { font-size: 8px; letter-spacing: 2px; }
  .portal-login-footnote { display: none; }
  .portal-theme .login-right { width: 100%; padding: 32px 24px; }
  .portal-theme .login-right-content { max-width: 440px; }
  .portal-theme .login-right-content h2 { font-size: 26px; }
  .portal-theme .login-right .portal-eyebrow { font-size: 8px; }
  .portal-theme .portal-materials-grid { grid-template-columns: 1fr; }
  .portal-welcome { padding: 25px; }
  .portal-welcome p { max-width: 270px; }
  .portal-theme .hub-card { padding: 22px; }
  .portal-theme .topbar-right { gap: 5px !important; }
  .portal-theme .topbar .hub-button { padding: 8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-theme *, .portal-theme *::before, .portal-theme *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Compact learning interface: a shared cover and one clear next action. */
.portal-theme [hidden] { display: none !important; }
.portal-theme .portal-page-actions { margin-bottom: 18px; }
.portal-theme .hub-heading p { margin-bottom: 0; }
.portal-theme .portal-welcome { min-height: 235px; padding: 28px 32px; }
.portal-theme .portal-welcome h2 { font-size: clamp(25px, 2.7vw, 34px); margin: 10px 0; }
.portal-theme .portal-welcome p { margin-bottom: 16px; font-size: 13px; }
.portal-theme .portal-section-title { margin: 25px 0 15px; }
.portal-theme .portal-section-title h2 { font-size: 22px; letter-spacing: -.6px; }
.portal-theme .portal-section-title p { font-size: 13px; color: #676f79; margin-top: 5px; }
.portal-theme .portal-course-card { padding: 0 0 20px; overflow: hidden; }
.portal-theme .portal-course-card h2 { margin: 20px 20px 16px; font-size: 18px; }
.portal-theme .portal-course-card .hub-button { margin: 0 20px; min-height: 42px; font-size: 13px; }
.portal-course-cover { position: relative; height: 150px; padding: 23px; background: linear-gradient(90deg,#07090b 8%,#07090b80 62%,transparent),var(--portal-earth) right -25px top -30px / 220px auto no-repeat #07090b; color:#fff; }
.portal-course-cover > span { display: block; font-size: 9px; letter-spacing: 2px; color:#ffb179; }
.portal-course-cover > strong { display:block; font-size:51px; line-height:1.1; margin-top:10px; font-weight:700; letter-spacing:-2px; }
.portal-progress-note { border: 1px solid #f0dac9; border-radius: 10px; background: #fff8f2; padding: 13px 16px; margin: 15px 0; font-size: 12px; color: #6d451f; }
.portal-progress-note summary { cursor:pointer; font-weight:600; }
.portal-progress-note summary span { font-weight:400; color:#745739; margin-left:10px; }
.portal-progress-note p { margin:12px 0 2px; line-height:1.6; }
.portal-login-help { font-size:12px; color:#626a75; text-align:center; margin-top:22px; }
.portal-login-help summary { cursor:pointer; }
.portal-login-help .login-help-text { font-size:12px; text-align:left; margin:12px 0 0; }
.portal-theme .citizen-onboarding { color:#17191c; }
.portal-theme .onboarding-hero { background:linear-gradient(90deg,#090b0d 25%,#090b0dc9 65%,#090b0d40),var(--portal-earth) right center / 380px auto no-repeat #090b0d; border-radius:14px; padding:30px; }
.portal-theme .onboarding-hero h1 { font-size:clamp(26px,3vw,38px); max-width:620px; }
.portal-theme .onboarding-hero > p:not(.onboarding-eyebrow) { font-size:14px; max-width:560px; }
.portal-theme .onboarding-nav { margin-top:20px; }
.portal-theme .onboarding-nav a { font-size:12px; border-radius:7px; padding:8px 12px; }
.portal-theme .onboarding-card { border-color:var(--border); border-radius:12px; }
.portal-theme .onboarding-highlight { background:#fff6ee; border-color:var(--primary); }
.portal-theme .onboarding-checklist input { accent-color:var(--primary); }
.portal-onboarding-section { background:#fff; border:1px solid var(--border); border-radius:12px; padding:20px 24px; margin-top:16px; scroll-margin-top:20px; }
.portal-onboarding-section > summary { cursor:pointer; font-size:17px; font-weight:700; }
.portal-onboarding-section[open] > summary { margin-bottom:20px; }
.portal-theme .citizen-onboarding .onboarding-infographic img { max-height:420px; object-fit:contain; }
.portal-theme .roadmap-checklist details > summary { cursor:pointer; font-size:13px; margin-top:16px; font-weight:600; }
.portal-theme .hub-heading .hub-eyebrow { color:#9e4200; }
@media(max-width:640px) {
  .portal-theme .portal-welcome { min-height:220px; padding:24px; }
  .portal-theme .portal-welcome::before { background-size:auto,330px auto; background-position:center,right -160px center; }
  .portal-progress-note summary span { display:block; margin:5px 0 0 15px; }
  .portal-course-cover { height:130px; }
  .portal-onboarding-section { padding:18px; }
  .portal-theme .onboarding-hero { padding:24px; }
  .portal-theme .user-info { display:none; }
}
.portal-theme .portal-roadmap-lesson > summary { cursor:pointer; font-size:17px; font-weight:600; }
.portal-theme .portal-roadmap-lesson[open] > summary { margin-bottom:18px; }
