:root {
  --ink: #17182a;
  --ink-soft: #565a70;
  --paper: #f5f6fa;
  --panel: #ffffff;
  --panel-soft: #eceef5;
  --line: #dfe2ec;
  --navy: #20165f;
  --navy-deep: #151044;
  --orange: #f47920;
  --orange-soft: #fff0e3;
  --green: #14845d;
  --red: #b43a47;
  --shadow: 0 18px 50px rgba(25, 25, 55, 0.09);
  --sidebar: 250px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.portal-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.suite-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 25px 18px 18px;
  overflow-y: auto;
  background: var(--navy-deep);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  padding: 0 8px 24px;
}

.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-family: "Manrope", sans-serif; font-size: 21px; letter-spacing: 0.04em; }
.brand small { margin-top: 5px; color: #aaa7cb; font-size: 10px; text-transform: uppercase; letter-spacing: 0.11em; }

.brand-mark { width: 33px; height: 33px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; transform: skewY(-7deg); }
.brand-mark i { display: block; border-radius: 3px; background: var(--orange); }
.brand-mark i:nth-child(2) { opacity: 0.72; transform: translateY(5px); }
.brand-mark i:nth-child(3) { opacity: 0.38; transform: translateY(10px); }

.suite-nav { display: grid; gap: 4px; }
.nav-label { margin: 21px 12px 7px; color: #7f7ba9; font-size: 10px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }

.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #bdbbd4;
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.is-active { background: rgba(244,121,32,0.15); color: #fff; box-shadow: inset 3px 0 var(--orange); }
.nav-icon { width: 19px; flex: 0 0 19px; text-align: center; font-size: 18px; }
.nav-dot { width: 9px; height: 9px; margin: 0 5px; border-radius: 50%; }
.nav-dot.public { background: #55b8ff; }
.nav-dot.customer { background: #f47920; }
.nav-dot.associate { background: #ae8cff; }
.nav-dot.academic { background: #48c49a; }

.sidebar-note { margin: auto 4px 20px; padding: 15px; border: 1px solid rgba(255,255,255,0.11); border-radius: 12px; background: rgba(255,255,255,0.045); }
.sidebar-note strong { display: block; font-size: 12px; }
.sidebar-note p { margin: 7px 0 0; color: #9e9bbd; font-size: 11px; line-height: 1.45; }
.note-signal { display: block; width: 24px; height: 3px; margin-bottom: 10px; border-radius: 2px; background: var(--orange); }

.sidebar-account { border-top: 1px solid rgba(255,255,255,0.09); padding: 17px 8px 2px; }
.account-mini { display: flex; align-items: center; gap: 10px; }
.account-avatar { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #343063; color: #fff; font-weight: 700; }
.account-copy { min-width: 0; display: grid; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 12px; }
.account-copy small { margin-top: 3px; color: #8f8bae; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }

.portal-workspace { grid-column: 2; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(22px, 4vw, 54px);
  border-bottom: 1px solid rgba(220,222,232,0.88);
  background: rgba(245,246,250,0.91);
  backdrop-filter: blur(15px);
}

.mobile-menu { display: none; border: 0; background: transparent; color: var(--navy); font-size: 24px; cursor: pointer; }
.portal-search { width: min(590px, 60vw); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 4px 16px rgba(25,25,55,0.035); }
.portal-search > span { color: #7e8295; font-size: 22px; transform: rotate(-15deg); }
.portal-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.portal-search input::placeholder { color: #9295a5; }
.portal-search:focus-within { border-color: #aaa4d0; box-shadow: 0 0 0 3px rgba(32,22,95,0.08); }
.portal-search kbd { padding: 2px 7px; border: 1px solid #dfe1e9; border-radius: 5px; background: #f7f7f9; color: #7c7f8d; font-size: 11px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.primary-button, .secondary-button, .quiet-button, .app-action {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.primary-button { border: 1px solid var(--navy); background: var(--navy); color: #fff; }
.primary-button:hover { background: #2c2178; }
.secondary-button { border: 1px solid var(--line); background: var(--panel); color: var(--navy); }
.secondary-button:hover { border-color: #bbb7d5; }
.quiet-button { min-height: 34px; padding: 7px 10px; border: 0; background: transparent; color: var(--ink-soft); }
.quiet-button:hover { background: var(--panel-soft); }
.wide { width: 100%; }

#main-content { width: min(1450px, 100%); flex: 1; margin: 0 auto; padding: clamp(30px, 5vw, 66px) clamp(22px, 4vw, 54px) 64px; }

.eyebrow { margin: 0 0 11px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.page-title { margin: 0; font-family: "Manrope", sans-serif; color: var(--navy); font-size: clamp(32px, 4.7vw, 61px); line-height: 1.02; letter-spacing: -0.045em; }
.page-intro { max-width: 700px; margin: 18px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr); gap: 25px; }
.hero-panel { position: relative; min-height: 338px; overflow: hidden; padding: clamp(28px, 5vw, 58px); border-radius: 24px; background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.hero-panel::before { content: ""; position: absolute; width: 380px; height: 380px; right: -130px; top: -155px; border: 70px solid rgba(244,121,32,0.14); border-radius: 50%; }
.hero-panel::after { content: ""; position: absolute; inset: auto 34px 34px auto; width: 105px; height: 7px; border-radius: 8px; background: var(--orange); box-shadow: 0 -15px rgba(255,255,255,0.12), 0 -30px rgba(255,255,255,0.06); }
.hero-panel .eyebrow { color: #ffad70; }
.hero-panel h1 { position: relative; z-index: 1; max-width: 690px; margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(34px, 4.8vw, 64px); line-height: 0.98; letter-spacing: -0.05em; }
.hero-panel p { position: relative; z-index: 1; max-width: 610px; margin: 20px 0 29px; color: #cbc9df; font-size: 16px; line-height: 1.6; }
.hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-panel .primary-button { border-color: var(--orange); background: var(--orange); }
.hero-panel .secondary-button { border-color: rgba(255,255,255,0.24); background: rgba(255,255,255,0.08); color: #fff; }

.account-panel { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); }
.account-panel h2 { margin: 2px 0 8px; font: 700 22px/1.2 "Manrope", sans-serif; color: var(--navy); }
.account-panel > p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.access-score { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0; }
.score-box { padding: 15px; border-radius: 13px; background: #f4f3fa; }
.score-box strong { display: block; color: var(--navy); font: 800 28px/1 "Manrope", sans-serif; }
.score-box span { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 11px; }
.account-panel .primary-button { margin-top: auto; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 52px 0 20px; }
.section-heading h2 { margin: 0; font: 700 clamp(23px, 3vw, 32px)/1.1 "Manrope", sans-serif; color: var(--navy); letter-spacing: -0.03em; }
.section-heading p { margin: 8px 0 0; color: var(--ink-soft); }
.text-button { border: 0; background: transparent; color: var(--navy); font-weight: 700; cursor: pointer; }
.text-button:hover { color: var(--orange); }

.layer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.layer-card { position: relative; min-height: 190px; padding: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); text-align: left; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease; }
.layer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.layer-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -33px; bottom: -33px; border-radius: 50%; background: var(--layer-color); opacity: 0.12; }
.layer-card .layer-line { width: 31px; height: 4px; margin-bottom: 24px; border-radius: 4px; background: var(--layer-color); }
.layer-card small { color: var(--layer-color); font-weight: 800; font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase; }
.layer-card h3 { margin: 7px 0 8px; color: var(--navy); font: 700 17px/1.2 "Manrope", sans-serif; }
.layer-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.layer-card[data-layer="public"] { --layer-color: #1c86cc; }
.layer-card[data-layer="customer"] { --layer-color: #db6410; }
.layer-card[data-layer="associate"] { --layer-color: #7654cf; }
.layer-card[data-layer="academic"] { --layer-color: #14845d; }

.software-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.app-card { min-height: 286px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 5px 20px rgba(25,25,55,0.035); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.app-card:hover { transform: translateY(-3px); border-color: #c8c4da; box-shadow: var(--shadow); }
.app-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.app-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; color: #fff; font: 800 16px/1 "Manrope", sans-serif; letter-spacing: -0.02em; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.app-mark.indigo { background: linear-gradient(135deg, #292075, #5b4fc4); }
.app-mark.violet { background: linear-gradient(135deg, #4f278f, #a36ddd); }
.app-mark.orange { background: linear-gradient(135deg, #d9560b, #ff9b35); }
.app-mark.amber { background: linear-gradient(135deg, #a86a08, #f4bc3e); }
.app-mark.teal { background: linear-gradient(135deg, #0e6970, #35a6a1); }
.app-mark.rose { background: linear-gradient(135deg, #972d58, #db6b8b); }
.app-mark.sky { background: linear-gradient(135deg, #246ea4, #61b4df); }
.app-mark.slate { background: linear-gradient(135deg, #3c4054, #747b91); }
.app-category { padding: 5px 8px; border-radius: 6px; background: #f1f2f6; color: #777b8b; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.app-card h3 { margin: 18px 0 8px; color: var(--navy); font: 700 19px/1.25 "Manrope", sans-serif; }
.app-description { margin: 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.55; }
.audience-pills { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0; }
.audience-pill { padding: 4px 7px; border-radius: 999px; background: #f0eff7; color: #605d75; font-size: 9px; font-weight: 700; }
.app-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid #ececf2; }
.access-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 10.5px; font-weight: 700; }
.access-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9da0ac; }
.access-status.available { color: var(--green); }
.access-status.available::before { background: var(--green); box-shadow: 0 0 0 3px rgba(20,132,93,0.1); }
.access-status.sign-in::before { background: var(--orange); }
.access-status.coming-soon::before { background: #8d90a0; }
.access-status.not-included::before { background: var(--red); }
.app-action { min-height: 34px; padding: 7px 11px; border: 1px solid var(--navy); background: var(--navy); color: #fff; }
.app-action:hover { background: #2d2377; }
.app-action.is-disabled { border-color: #dedfe6; background: #eeeff3; color: #979aa8; cursor: default; }

.directory-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 30px; }
.directory-header .page-intro { margin-top: 12px; }
.directory-stats { flex: 0 0 auto; display: flex; gap: 7px; }
.stat-pill { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-soft); font-size: 11px; }
.stat-pill strong { color: var(--navy); }
.empty-state, .error-state { padding: 50px 30px; border: 1px dashed #cbd0df; border-radius: 18px; background: rgba(255,255,255,0.55); text-align: center; }
.empty-state h2, .error-state h2 { color: var(--navy); font: 700 23px/1.2 "Manrope", sans-serif; }
.empty-state p, .error-state p { color: var(--ink-soft); }

.portal-footer { display: flex; justify-content: space-between; gap: 20px; padding: 23px clamp(22px, 4vw, 54px); border-top: 1px solid var(--line); color: #868998; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }

.auth-dialog { width: min(460px, calc(100vw - 28px)); padding: 36px; border: 0; border-radius: 21px; color: var(--ink); box-shadow: 0 35px 100px rgba(20,16,68,0.34); }
.auth-dialog::backdrop { background: rgba(16,13,45,0.68); backdrop-filter: blur(5px); }
.auth-dialog[open] { animation: dialog-in 180ms ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.dialog-close { position: absolute; top: 12px; right: 13px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0f1f5; color: var(--ink-soft); font-size: 22px; cursor: pointer; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; color: var(--navy); font: 800 17px/1 "Manrope", sans-serif; letter-spacing: 0.04em; }
.auth-brand .brand-mark { width: 29px; height: 29px; }
.auth-dialog h1 { margin: 0; color: var(--navy); font: 800 29px/1.12 "Manrope", sans-serif; letter-spacing: -0.035em; }
.dialog-copy { margin: 12px 0 25px; color: var(--ink-soft); line-height: 1.55; }
.auth-dialog form { display: grid; gap: 15px; }
.auth-dialog label { display: grid; gap: 7px; color: #4f5365; font-size: 12px; font-weight: 700; }
.auth-dialog input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d7dae5; border-radius: 9px; outline: 0; }
.auth-dialog input:focus { border-color: #9891c3; box-shadow: 0 0 0 3px rgba(32,22,95,0.08); }
.form-error { min-height: 17px; margin: 0; color: var(--red); font-size: 12px; }
.dialog-footnote { margin: 18px 0 0; color: #8d909f; font-size: 11px; text-align: center; }

.set-password-shell { max-width: 510px; margin: 4vh auto; padding: 35px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.set-password-shell form { display: grid; gap: 15px; margin-top: 27px; }
.set-password-shell label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.set-password-shell input { min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }

.loading-state { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--ink-soft); }
.loading-mark { width: 38px; height: 38px; border: 3px solid #dedee9; border-top-color: var(--orange); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-scrim { display: none; }

@media (max-width: 1050px) {
  .software-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .account-panel { min-height: 240px; }
}

@media (max-width: 760px) {
  :root { --sidebar: 270px; }
  .portal-shell { display: block; }
  .suite-sidebar { transform: translateX(-105%); transition: transform 180ms ease; box-shadow: 20px 0 60px rgba(15,12,45,0.3); }
  body.menu-open .suite-sidebar { transform: none; }
  .portal-workspace { min-height: 100vh; }
  .mobile-menu { display: block; }
  .workspace-header { padding: 11px 16px; }
  .portal-search { width: auto; flex: 1; }
  .portal-search kbd { display: none; }
  #main-content { padding: 28px 16px 45px; }
  .software-grid, .layer-grid { grid-template-columns: 1fr; }
  .directory-header { display: block; }
  .directory-stats { margin-top: 20px; flex-wrap: wrap; }
  .portal-footer { display: grid; text-align: center; }
  .mobile-scrim { position: fixed; z-index: 25; inset: 0; background: rgba(15,12,45,0.53); }
  body.menu-open .mobile-scrim { display: block; }
}

@media (max-width: 480px) {
  .hero-panel { min-height: 410px; padding: 30px 24px; }
  .hero-actions { display: grid; }
  .header-actions .account-chip { display: none; }
  .auth-dialog { padding: 30px 23px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
