/* One navigation shell for overview, modules, account and legal pages. */
.portal-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100svh; }
.portal-layout, .portal-layout * { box-sizing: border-box; }
.workspace-content { min-width: 0; }
.portal-sidebar { position: sticky; top: 0; align-self: start; z-index: 10; height: 100svh; overflow-y: auto; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 24px 16px 18px; border-right: 1px solid #2a2535; background: #100d17; color: #f4f0fa; font-family: "Space Grotesk", system-ui, sans-serif; }
.portal-sidebar a { text-decoration: none; }
.portal-brand { display: flex; align-items: center; gap: 12px; margin: 0 6px 20px; color: #f4f0fa; }
.portal-brand img { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid #b79ce777; }
.portal-brand > span { font-size: 25px; font-weight: 700; letter-spacing: 4px; }
.portal-brand small { display: block; font: 8px/2 monospace; letter-spacing: 1px; color: #a9a0bc; }
.sidebar-toggle { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; min-height: 38px; margin-bottom: 22px; border: 1px solid #393043; border-radius: 8px; background: #1b1525; color: #cfc1e2; cursor: pointer; font: 11px system-ui, sans-serif; }
.sidebar-toggle > span:first-child { font-size: 18px; }
.portal-sidebar .sidebar-link { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 0 0 5px; min-height: 46px; border: 1px solid transparent; border-radius: 9px; color: #b5abc4; font-size: 12px; }
.portal-sidebar .sidebar-link.selected { display: flex; background: #9f78e91b; border-color: #ab87f044; color: #ddcaff; }
.portal-sidebar .sidebar-link:last-of-type { display: flex; }
.portal-sidebar a:hover { color: #fff; background: #21192d; }
.guardian-icon { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.portal-sidebar .sidebar-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 4px; border: 1px solid #bf8cff30; border-radius: 9px; background: linear-gradient(135deg,#b685ff20,#3b246522); color: #99ffc2; }
.portal-sidebar .sidebar-link.selected .sidebar-icon, .portal-sidebar .sidebar-link:hover .sidebar-icon { border-color: #bf8cff70; background: #a878ff24; box-shadow: 0 0 16px #b16eff20; }
.portal-sidebar .sidebar-text { display: block; width: auto; font-size: inherit; text-align: left; }
.portal-sidebar .nav-label { display: block; margin: 28px 0 12px; padding: 0 10px; color: #a093b1; font: 10px monospace; letter-spacing: 1.3px; text-transform: uppercase; }
.sidebar-bottom { display: block; margin-top: auto; padding-top: 24px; }
.sidebar-upgrade, .portal-sidebar .sidebar-privacy { display: flex; align-items: center; gap: 12px; padding: 12px 10px; color: #bba5d6; font-size: 11px; border-radius: 8px; }
.sidebar-upgrade > span:first-child, .sidebar-privacy > span:first-child { width: 22px; flex: none; font-size: 22px; text-align: center; }
.sidebar-collapsed .portal-layout { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar-collapsed .portal-sidebar { padding: 24px 10px 18px; }
.sidebar-collapsed .portal-brand { margin: 0 auto 20px; justify-content: center; }
.sidebar-collapsed .portal-brand > span, .sidebar-collapsed .sidebar-text, .sidebar-collapsed .toggle-label { display: none; }
.sidebar-collapsed .sidebar-link, .sidebar-collapsed .sidebar-upgrade, .sidebar-collapsed .sidebar-privacy { justify-content: center; padding-inline: 8px; }
.sidebar-collapsed .nav-label { font-size: 0; padding: 0; margin: 18px 10px; border-top: 1px solid #342b41; }
.portal-sidebar a:focus-visible, .sidebar-toggle:focus-visible { outline: 2px solid #d2baff; outline-offset: 2px; }
#overview-content { display: grid; gap: 36px; min-width: 0; }
.hero-copy h1 { max-width: none; margin: 20px 0 18px; font-size: clamp(36px, 4vw, 64px); font-weight: 600; line-height: 1.12; letter-spacing: -2px; }
.hero-copy p { max-width: 420px; font-size: 14px; }
.hero-copy h1 span { color: #c5a2ff; }
.hero-copy .portal-primary { display: inline-flex; text-decoration: none; }
#tools { scroll-margin-top: 24px; }
#tools .section-heading p { max-width: 690px; line-height: 1.7; }
.module-page #modal { position: relative; inset: auto; margin: 0; width: 100%; max-width: none; height: auto; max-height: none; overflow: visible; box-shadow: none; border: 1px solid #393044; border-radius: 18px; background: #110d1a; }
.module-page #modal .modal-head { position: static; border-radius: 18px 18px 0 0; }
.module-page #modal #modal-body { height: auto; max-height: none; overflow: visible; }
.module-page .identity-results-grid { min-height: 420px; }
.module-page #module-content { min-width: 0; }
.module-page .portal-main { flex: 1; }
.photo-picker { display: grid; justify-items: start; gap: 18px; padding: 24px 0; }
.photo-picker .tool-icon { font-size: 32px; }
.workspace-content > .legal-shell { display: block; width: calc(100% - 64px); max-width: 1440px; min-width: 0; margin: 0 auto; }
.legal-card { min-width: 0; overflow-wrap: anywhere; }
.legal-card h1 { max-width: none; line-height: 1.12; }
.legal-card p, .legal-card li { font-size: 16px; }
.legal-card section h2 { line-height: 1.4; }
@media (max-width: 1100px) { .hero-copy { max-width: 76%; } }
@media (max-width: 780px) {
  .portal-layout, .sidebar-collapsed .portal-layout { grid-template-columns: minmax(0, 1fr); }
  .portal-sidebar, .sidebar-collapsed .portal-sidebar { height: auto; max-height: 85svh; width: 100%; padding: 10px 16px; border-right: 0; border-bottom: 1px solid #30263c; }
  .sidebar-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
  .portal-sidebar .portal-brand { margin: 0; gap: 9px; }
  .portal-brand img { width: 32px; height: 32px; }
  .portal-brand > span { font-size: 19px; }
  .portal-brand small { font-size: 6px; }
  .sidebar-collapsed .portal-brand > span { display: block; }
  .sidebar-toggle { width: auto; gap: 8px; margin: 0; padding: 0 10px; }
  .sidebar-collapsed .toggle-label { display: block; }
  #workspace-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; padding-top: 10px; }
  .portal-sidebar .sidebar-link { margin: 0; padding: 9px; min-height: 40px; }
  .portal-sidebar .nav-label { grid-column: 1 / -1; margin: 8px 0; }
  .sidebar-collapsed #workspace-links { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .sidebar-collapsed .portal-sidebar .sidebar-link { min-width: 0; padding-inline: 3px; }
  .sidebar-collapsed .portal-sidebar .nav-label { display: none; }
  .portal-sidebar .sidebar-bottom { display: none; }
  .hero-copy { max-width: 100%; padding: 26px; }
  .hero-copy h1 { font-size: clamp(34px, 7vw, 48px); letter-spacing: -1.5px; }
  .hero-copy p { max-width: 340px; }
  #tools { scroll-margin-top: 135px; }
  #overview-content { gap: 28px; }
  .workspace-content > .legal-shell { width: calc(100% - 32px); }
  .legal-card p, .legal-card li { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.hans-powered { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; color: #f2f5fc; white-space: nowrap; }
.hans-powered > span { font-size: 12px; color: #9c91ad; }
.hans-powered img { flex: none; border-radius: 7px; }
.hans-powered strong { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.identity-saved-permission { color: #b7acca; font-size: 12px; line-height: 1.7; margin: 14px 0; }
.identity-saved-permission button { display: inline-block; margin-top: 8px; min-height: 44px; padding: 8px 12px; color: #d4c2f0; background: #271b37; border: 1px solid #534064; border-radius: 8px; cursor: pointer; }
.identity-revalidating { position: relative; min-height: 180px; }
.identity-revalidating > * { visibility: hidden; }
.identity-revalidating::before { content: "Checking your account…"; position: absolute; top: 36px; left: 28px; color: #b7acca; font: 14px system-ui, sans-serif; }
@media (max-width: 520px) {
  .portal-topbar { height: auto; min-height: 70px; flex-wrap: wrap; gap: 6px 16px; padding: 10px 18px; }
  .hans-powered { flex: 1 0 100%; }
  .header-account-actions { margin-left: auto; }
}
.identity-recheck-failed::before { content: none; }
.identity-revalidating > .identity-recheck-error { visibility: visible; position: absolute; inset: 0; padding: 28px; background: #110d1a; }

.portal-sidebar .sidebar-earn { color: #f2f5fc; font-size: 13px; font-weight: 600; letter-spacing: .02em; margin-top: 18px; }
.earn-nav-logo { flex: none; display: block; }
@media(max-width:780px) { .portal-sidebar .sidebar-earn { margin-top: 0; } }
