/* Shared tokens & Roboto Variable font loaded from assets/shared/tokens.css (packages/ui) */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  min-width: 280px;
  transition: background 0.24s, color 0.24s;
}
body, button, input, select, textarea {
  font-family: var(--font-sans);
}
button, select, input, textarea { font-size: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  padding: 2px 6px;
  border-radius: 6px;
}
svg, img { max-width: 100%; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .app-card:focus-visible {
  outline: 3px solid #8eaaff;
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.shell { width: min(1210px, calc(100% - 64px)); margin: 0 auto; }
.catalog-shell { width: min(1440px, calc(100% - 64px)); }
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: #fff;
  color: #111;
  padding: 10px 16px;
  border-radius: 8px;
}
.skip:focus { top: 16px; }

/* ==================== HEADER & FAR-RIGHT AUTH SLOT ==================== */
.site-header {
  height: 78px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -1.1px;
  white-space: nowrap;
}
.accent-word { color: var(--blue); }
.brand-symbol {
  width: 28px;
  height: 27px;
  display: flex;
  align-items: center;
  gap: 3px;
  transform: rotate(-18deg);
}
.brand-symbol i {
  display: block;
  width: 6px;
  height: 17px;
  background: linear-gradient(180deg, #a5c4ff, #315ee7);
  border-radius: 7px;
}
.brand-symbol i:first-child { height: 12px; }
.brand-symbol i:last-child { height: 24px; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}
.nav-item {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--secondary);
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}
.nav-item:hover, .nav-item.active, .nav-dropdown.open > .nav-item {
  color: var(--ink);
  background: var(--panel-2);
}

/* Google DeepMind-inspired Floating Hover Mega-Menu */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.mega-menu {
  position: absolute;
  top: 100%;
  left: -12px;
  padding-top: 14px;
  z-index: 210;
  width: min(580px, calc(100vw - 48px));
  animation: megaEnter 0.16s ease-out;
}
@keyframes megaEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.mega-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 26px 26px;
  box-shadow: 0 26px 70px rgba(16, 25, 51, 0.16);
}
:root[data-theme="dark"] .mega-card {
  background: var(--panel);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.6);
}
.mega-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.mega-head strong {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.mega-explore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.16s, background 0.16s;
}
.mega-explore:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.mega-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.mega-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mega-col-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px 6px;
}
.mega-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.mega-item:hover {
  background: var(--panel-2);
  border-color: var(--line-soft);
}
.mega-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--blue);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(44, 68, 122, 0.06);
}
.mega-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mega-item-copy b {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.mega-item-copy small {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--secondary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  height: 40px;
}
.theme-button > span:first-child { font-size: 16px; width: 18px; text-align: center; }

.menu-button {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  width: 40px;
  height: 40px;
  padding: 9px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-button span {
  display: block;
  height: 2px;
  border-radius: 3px;
  background: var(--ink);
}

/* Far-right Auth / Account control */
.header-auth {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #345de9;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(52, 93, 233, 0.22);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.auth-entry-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(52, 93, 233, 0.28);
}
:root[data-theme="dark"] .auth-entry-btn {
  background: #7295ff;
  color: #080d1c;
}
.auth-entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-avatar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--blue) 45%, var(--line));
  background: linear-gradient(135deg, #5d86ff, #2f54da);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(47, 84, 218, 0.25);
  transition: transform 0.18s, border-color 0.18s;
}
.account-avatar-btn:hover {
  transform: scale(1.04);
  border-color: var(--blue);
}
.avatar-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #14b886;
  border: 2px solid var(--page);
}

.auth-popover,
.account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-pop);
  z-index: 200;
}
.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.popover-head strong { font-size: 15px; }
.popover-pill {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--blue);
}
.popover-desc {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--secondary);
}
.google-sso-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #d4dae6;
  background: #ffffff;
  color: #1f2937;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(16, 25, 51, 0.05);
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.google-sso-btn:hover {
  border-color: #b7c2d6;
  background: #f8fafc;
  box-shadow: 0 3px 10px rgba(16, 25, 51, 0.08);
}
:root[data-theme="dark"] .google-sso-btn {
  background: #171c28;
  border-color: #343d52;
  color: #f3f6fc;
}
:root[data-theme="dark"] .google-sso-btn:hover {
  background: #1f2636;
  border-color: #4b5875;
}
.google-svg { flex-shrink: 0; display: block; }
.popover-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--secondary);
}
.popover-status.warn {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
}
.popover-status.ok {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
}
.popover-foot {
  margin: 12px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}

.account-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.account-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b91ff, #3257db);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.account-meta { min-width: 0; flex: 1; }
.account-meta strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-meta > span {
  display: block;
  font-size: 11.5px;
  color: var(--secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.role-pill, .org-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--secondary);
}
.role-pill.owner {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
}
.role-pill.org_admin {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: color-mix(in srgb, var(--green) 10%, var(--panel));
}
.role-pill.user {
  color: var(--ink);
}
.dropdown-sep {
  height: 1px;
  background: var(--line-soft);
  margin: 13px 0;
}
.dropdown-links {
  display: grid;
  gap: 4px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--panel-2); }
.dropdown-logout {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line));
  background: color-mix(in srgb, var(--red) 8%, var(--panel));
  color: var(--red);
  font-size: 12.5px;
  font-weight: 800;
  transition: background 0.15s;
}
.dropdown-logout:hover {
  background: color-mix(in srgb, var(--red) 15%, var(--panel));
}

.mobile-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 78px;
  padding: 12px 24px 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a {
  display: block;
  padding: 12px 10px;
  color: var(--ink);
  font-weight: 650;
  border-radius: 10px;
}
.mobile-nav a.active {
  background: var(--panel-2);
  color: var(--blue);
}

/* ==================== VIEWS & OVERVIEW ==================== */
.view { min-height: 65vh; animation: enter 0.25s ease; }
.view:not(.active) { display: none; }
@keyframes enter {
  from { opacity: 0.55; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  min-height: 580px;
  padding-top: 48px;
  padding-bottom: 36px;
  gap: 20px;
}
.eyebrow, .section-index, .tiny-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow-line { height: 2px; width: 23px; background: var(--blue); }
.hero-copy { padding: 20px 0 28px; position: relative; z-index: 2; }
.hero-copy h1 {
  font-family: var(--font-sans);
  font-size: clamp(44px, 4.8vw, 72px);
  line-height: 1.1;
  letter-spacing: -1.6px;
  font-weight: 800;
  margin: 24px 0 22px;
}
.blue-text {
  background: linear-gradient(94deg, #3860e4, #659dff 70%, #8d9fff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero-description {
  max-width: 530px;
  font-size: 16px;
  line-height: 1.82;
  color: var(--secondary);
  margin: 0 0 28px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  min-height: 46px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary {
  background: #345de9;
  color: #fff;
  box-shadow: 0 12px 24px rgba(52, 93, 233, 0.18);
}
:root[data-theme="dark"] .button.primary { background: #7295ff; color: #080d1c; }
.button.soft { background: var(--panel); color: var(--ink); border-color: var(--line); }
.button.ghost { background: transparent; color: var(--secondary); border-color: var(--line); }
.button.danger { background: var(--red); color: #fff; }
.button.small { min-height: 38px; padding: 8px 13px; font-size: 12px; gap: 7px; }
.full-width { width: 100%; }

.micro-note {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  background: #14b886;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(20, 184, 134, 0.14);
}
.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--secondary);
  border: 1px solid var(--line);
  border-radius: 100px;
  white-space: nowrap;
}
.mini-label.live-pill {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, var(--line));
}

.hero-illustration {
  height: 485px;
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  border-radius: 34px;
  background: radial-gradient(circle at 50% 44%, rgba(142, 182, 255, 0.32), transparent 48%), linear-gradient(120deg, transparent 20%, rgba(120, 162, 250, 0.12) 100%);
}
.hero-field {
  position: absolute;
  border: 1px solid rgba(102, 150, 255, 0.18);
  border-radius: 50%;
  height: 440px;
  width: 440px;
  left: 8%;
  top: 3%;
  transform: rotate(-22deg) scaleY(0.47);
}
.field-2 { width: 600px; height: 580px; left: -9%; top: -15%; transform: rotate(-26deg) scaleY(0.54); }
.field-3 { width: 720px; height: 680px; left: -14%; top: -25%; transform: rotate(42deg) scaleY(0.68); }
.ring {
  position: absolute;
  border: 1.5px solid rgba(89, 130, 255, 0.27);
  border-radius: 50%;
  transform: rotate(-35deg);
  box-shadow: 0 0 20px rgba(132, 166, 255, 0.07);
}
.ring-one { width: 470px; height: 170px; left: 7%; top: 32%; }
.ring-two { width: 540px; height: 190px; left: 1%; top: 28%; }
.ring-three { width: 620px; height: 235px; left: -7%; top: 23%; }
.core-object {
  position: absolute;
  width: 208px;
  height: 265px;
  left: 48%;
  top: 49%;
  transform: translate(-50%, -45%) rotate(-4deg);
  filter: drop-shadow(0 22px 35px rgba(43, 82, 200, 0.25));
}
.object-top { position: absolute; top: 5px; left: 7px; width: 193px; height: 91px; clip-path: polygon(50% 0, 100% 47%, 51% 100%, 0 50%); background: linear-gradient(130deg, #f8fbff, #b0cfff 75%); }
.object-left { position: absolute; left: 7px; top: 52px; width: 99px; height: 193px; clip-path: polygon(0 0, 100% 25%, 100% 100%, 0 75%); background: linear-gradient(140deg, #a9c9ff, #4e86e9 80%); }
.object-right { position: absolute; right: 8px; top: 54px; width: 98px; height: 188px; clip-path: polygon(0 25%, 100% 0, 100% 75%, 0 100%); background: linear-gradient(160deg, #7daaff, #2e52ca 80%); }
.object-logo { position: absolute; left: 50%; top: 59%; transform: translate(-50%, -50%); z-index: 1; font-weight: 900; letter-spacing: 4px; color: #fff; font-size: 20px; text-shadow: 0 1px 12px rgba(37, 62, 130, 0.7); }
.object-logo span { opacity: 0.65; }
.float-panel {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 40px rgba(45, 75, 144, 0.1);
  backdrop-filter: blur(12px);
  padding: 11px 14px;
  z-index: 2;
  color: #20345c;
}
.float-panel-top { top: 58px; right: 20px; }
.float-panel-bottom { bottom: 64px; left: 12px; }
.float-panel b { font-size: 10px; letter-spacing: 0.8px; display: block; }
.float-panel small { display: block; color: #64789f; font-size: 10px; margin-top: 3px; }
.float-icon { width: 34px; height: 34px; border-radius: 10px; background: #e7efff; display: grid; place-items: center; color: #4e75df; font-size: 22px; }
.hero-caption { position: absolute; bottom: 20px; right: 26px; font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: 1.5px; }
.hero-caption span { margin-left: 16px; color: var(--blue); }
:root[data-theme="dark"] .hero-illustration { background: radial-gradient(circle at 48% 50%, rgba(81, 111, 214, 0.2), transparent 50%), linear-gradient(135deg, #101724, #152342); }
:root[data-theme="dark"] .float-panel { background: rgba(21, 30, 49, 0.84); border-color: rgba(146, 170, 230, 0.2); color: #eff4ff; }
:root[data-theme="dark"] .float-panel small { color: #abbade; }
:root[data-theme="dark"] .float-icon { background: #243454; color: #8eaafc; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 20px 15px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
  gap: 12px;
}
.principles > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 10px;
  border-right: 1px solid var(--line);
}
.principles > div:last-child { border: 0; }
.principles b, .principles small { display: block; }
.principles b { font-size: 14px; }
.principles small { color: var(--secondary); font-size: 12px; margin-top: 4px; }
.p-symbol { font-size: 24px; font-weight: 700; color: var(--blue); width: 32px; text-align: center; flex-shrink: 0; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 88px 0 28px;
}
.section-heading h2 {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.8px;
  font-weight: 800;
  margin: 10px 0;
}
.section-heading p { margin: 0; color: var(--secondary); line-height: 1.65; max-width: 640px; }
.dot { color: #6b8dff; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--link);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  margin-bottom: 8px;
}
.text-link:hover { text-decoration: underline; }

.shelf-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.shelf-footer .text-link { margin-bottom: 0; }
.shelf-arrows {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.shelf-arrows[hidden] { display: none; }
.shelf-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  transition: border-color 0.16s, background 0.16s, color 0.16s, opacity 0.16s;
}
.shelf-btn:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--panel-2);
}
.shelf-btn:disabled {
  opacity: 0.34;
  cursor: default;
}

/* Five full cards and half of the next card on wide screens. */
.card-shelf {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.card-shelf::-webkit-scrollbar { display: none; }
.card-shelf .app-card {
  flex: 0 0 calc((100% - 90px) / 5.5);
  min-width: 0;
  scroll-snap-align: start;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.card-shelf .app-card.is-peeking-right,
.card-shelf .app-card.is-peeking-left {
  opacity: 0.76;
}
.card-shelf .app-card.is-peeking-right:hover {
  opacity: 0.98;
  transform: translateX(-3px);
}
.card-shelf .app-card.is-peeking-left:hover {
  opacity: 0.98;
  transform: translateX(3px);
}
.card-shelf .card-art { height: 116px; }
.card-shelf .card-glyph { font-size: 54px; right: 14px; top: 12px; }
.card-shelf .card-content { padding: 16px; }
.card-shelf .card-meta { font-size: 10px; letter-spacing: 0.5px; }
.card-shelf .card-title { font-size: 16px; margin: 8px 0 8px; }
.card-shelf .card-desc { font-size: 13px; line-height: 1.5; min-height: 4.5em; margin: 0 0 14px; }
.card-shelf .card-trace { margin: 0 0 16px; }
.card-shelf .trace-chip,
.card-shelf .proof-pill { font-size: 10.5px; padding: 4px 8px; }
.card-shelf .card-footer { padding-top: 12px; }
.card-shelf .card-footer small { font-size: 12px; }
.card-shelf .card-arrow { width: 28px; height: 28px; font-size: 13px; }

.application-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.app-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(44, 68, 122, 0.055);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.app-card:hover {
  transform: translateY(-3px);
  border-color: #96b4ff;
  box-shadow: 0 18px 44px rgba(46, 74, 134, 0.12);
}
.card-art {
  height: 108px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #b8cdff, #759eea);
  border-bottom: 1px solid var(--line-soft);
}
.card-art.learning-monitor { background: radial-gradient(circle at 70% 40%, #a9d6ff, transparent 55%), linear-gradient(128deg, #b4befe, #597de0 85%); }
.card-art.core-cv { background: radial-gradient(circle at 35% 65%, #a3e4d7, transparent 52%), linear-gradient(135deg, #3c78b8, #6d8ef5); }
.card-art.gemma-dev-agent { background: radial-gradient(circle at 45% 30%, #c6c2ff, transparent 50%), linear-gradient(145deg, #6477d4, #969cf7); }
.card-art.app-agent { background: radial-gradient(circle at 60% 35%, #b6d9ff, transparent 50%), linear-gradient(145deg, #5685d6, #7c9ae8); }
.card-glyph {
  position: absolute;
  font-family: var(--font-sans);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: -2px;
  font-size: 62px;
  right: 14px;
  top: 12px;
}
.card-art:before, .card-art:after {
  content: '';
  position: absolute;
  width: 190px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: rotate(-24deg);
  left: 10%;
  top: 28%;
}
.card-art:after { width: 250px; height: 100px; left: 0; top: 12%; }
.card-content { padding: 14px 16px 15px; display: flex; flex-direction: column; flex: 1; }
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--blue);
  font-size: 9.5px;
  letter-spacing: 0.9px;
  font-weight: 800;
  line-height: 1.4;
  min-height: 2.8em;
}
.card-meta > :first-child {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta .meta-version {
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.card-trace {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}
.trace-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  color: var(--secondary);
  font-size: 10.5px;
  font-weight: 600;
}
.trace-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.trace-dot.benchmark, .trace-dot.released { background: var(--green); }
.trace-dot.pilot { background: var(--yellow); }
.proof-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--blue) 36%, var(--line));
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.16s, transform 0.16s;
}
a.proof-pill:hover {
  background: color-mix(in srgb, var(--blue) 16%, var(--panel));
  transform: translateY(-1px);
}
.card-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 16.5px;
  line-height: 1.32;
  margin: 10px 0 6px;
  letter-spacing: -0.2px;
  min-height: 2.64em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  font-size: 12.5px;
  line-height: 1.56;
  min-height: 4.68em;
  color: var(--secondary);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  gap: 8px;
}
.card-footer small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-arrow {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--link);
  font-size: 12px;
  flex-shrink: 0;
}

.platform-intro { margin-top: 104px; }
.subtle-heading { color: var(--secondary); }
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }
.capability {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 27px;
  min-height: 215px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.cap-icon { font-size: 28px; color: var(--blue); margin-bottom: 24px; }
.capability b { font-size: 15.5px; }
.capability p { font-size: 13px; line-height: 1.65; color: var(--secondary); margin: 9px 0 18px; }
.capability small { margin-top: auto; font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: 1.3px; }

.about-strip {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: var(--strip);
  padding: 72px 68px;
  margin-top: 96px;
  min-height: 430px;
  color: #fff;
  isolation: isolate;
}
.about-strip > div:first-child { position: relative; z-index: 2; width: min(580px, 100%); }
.about-strip > div > span:first-child { font-size: 11px; letter-spacing: 2.2px; font-weight: 800; }
.about-strip h2 { font-family: var(--font-sans); font-weight: 800; font-size: clamp(36px, 4.2vw, 58px); line-height: 1.15; letter-spacing: -1.2px; margin: 20px 0; }
.about-strip h2 span { color: #365be0; }
.about-strip p { max-width: 500px; font-size: 15px; line-height: 1.85; margin: 0 0 28px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.about-button {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  background: #f6f8ff;
  color: #142348;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}
.about-button.ghost-light {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
}
.about-rings { position: absolute; right: -195px; top: -100px; width: 780px; height: 780px; opacity: 0.72; pointer-events: none; }
.about-rings i { position: absolute; border: 1px solid rgba(255, 255, 255, 0.62); border-radius: 50%; width: 620px; height: 620px; left: 30px; top: 40px; }
.about-rings i:nth-child(2) { width: 790px; height: 790px; left: -55px; top: -44px; opacity: 0.7; }
.about-rings i:nth-child(3) { width: 950px; height: 950px; left: -135px; top: -122px; opacity: 0.35; }
.about-mark { position: absolute; bottom: 28px; right: 42px; font-weight: 800; letter-spacing: 3px; font-size: 11px; color: rgba(255, 255, 255, 0.85); }

/* ==================== INNER PAGES & COMMON PANELS ==================== */
.section-page { padding: 52px 0 72px; }
.page-heading { max-width: 880px; margin-bottom: 36px; }
.page-heading h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.16;
  letter-spacing: -1px;
  margin: 12px 0;
}
.page-heading p { max-width: 740px; color: var(--secondary); font-size: 14.5px; line-height: 1.8; margin: 0; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.segmented {
  background: var(--panel);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 9px 15px;
  color: var(--secondary);
  font-weight: 800;
  font-size: 12px;
}
.segmented button.selected { background: var(--blue); color: #fff; }
:root[data-theme="dark"] .segmented button.selected { color: #080d19; }
.toolbar-note { font-size: 12px; color: var(--secondary); }

.explain-panel {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 26px;
  background: var(--panel-2);
}
.explain-panel p { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.72; }
.explain-panel strong { color: var(--ink); }
.explain-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 50%;
  flex: none;
  font-size: 12px;
  font-weight: 800;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel-divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
.panel-description { line-height: 1.72; font-size: 13px; color: var(--secondary); margin: 0 0 16px; }
.section-mini-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-mini-heading b { font-size: 15px; }
.section-mini-heading > span { font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: 1px; }
.link-button { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 800; font-size: 12px; }
.link-button:hover { text-decoration: underline; }

.feedback-banner {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--secondary);
  font-size: 12.5px;
  line-height: 1.65;
  margin-bottom: 18px;
}
.feedback-banner.ok {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, var(--line));
  background: color-mix(in srgb, var(--green) 8%, var(--panel));
}
.feedback-banner.warn {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
  background: color-mix(in srgb, var(--red) 8%, var(--panel));
}

/* ==================== ARCHITECTURE ==================== */
.architecture-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
}
.workbench-main { min-width: 0; }
.map-layers { display: grid; gap: 14px; }
.arch-layer {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: var(--panel-2);
  position: relative;
}
.arch-layer:after {
  content: '↓';
  position: absolute;
  left: 50%;
  bottom: -20px;
  color: var(--muted);
  font-size: 14px;
  z-index: 3;
}
.arch-layer:last-child:after { display: none; }
.arch-title { color: var(--secondary); font-size: 10px; letter-spacing: 1.4px; font-weight: 800; margin-bottom: 10px; }
.arch-nodes { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.arch-node {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 11px;
  padding: 10px 12px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  min-width: 130px;
  flex: 1;
  transition: background 0.18s, border-color 0.18s;
}
.arch-node:hover, .arch-node.selected {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 9%, var(--panel));
}
.arch-node em { display: block; font-style: normal; font-size: 9.5px; color: var(--muted); margin-top: 5px; font-weight: 600; }
.node-inspector { align-self: start; position: sticky; top: 96px; }
.node-inspector h2 { margin: 14px 0 10px; font-size: 20px; letter-spacing: -0.5px; }
.node-inspector p { font-size: 13px; line-height: 1.72; color: var(--secondary); margin: 0; }
.node-data { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; display: grid; gap: 11px; }
.node-data div { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; }
.node-data div b { color: var(--secondary); flex-shrink: 0; }
.node-data div span { text-align: right; color: var(--ink); }

/* ==================== WORKSPACE ==================== */
.workspace-layout { display: grid; grid-template-columns: 315px minmax(0, 1fr); gap: 22px; }
.identity-panel { align-self: start; }
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, #779bff, #3a54d8);
  margin: 18px 0 14px;
}
.identity-panel h2 { font-size: 20px; letter-spacing: -0.4px; margin: 0 0 4px; }
.ws-email { color: var(--secondary); font-size: 12.5px; margin: 0 0 12px; word-break: break-all; }
.ws-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-org-list { display: grid; gap: 8px; margin-top: 10px; }
.ws-org-item {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.ws-org-item strong { display: block; font-size: 12.5px; }
.ws-org-item small { color: var(--muted); font-size: 11px; }
.ws-org-picker { margin-top: 14px; }
.ws-side-actions { margin-top: 16px; }
.identity-notice {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
}
.identity-notice span:first-child { color: var(--blue); font-size: 16px; }

.workspace-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.workspace-top h2 { font-size: 21px; margin: 6px 0 0; }
.workspace-apps { display: grid; gap: 12px; }
.workspace-app {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 17px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 16px;
  min-width: 0;
}
.app-square {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #355bcf;
  background: linear-gradient(135deg, #e4edff, #c2d5ff);
  font-size: 19px;
  font-weight: 900;
  flex: none;
}
.workspace-app .app-summary { flex: 1 1 220px; min-width: 180px; }
.workspace-app .btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 0; margin-left: auto; }
.workspace-app b, .workspace-app small { display: block; }
.workspace-app b { font-size: 14.5px; }
.workspace-app small { margin-top: 4px; font-size: 11.5px; color: var(--secondary); line-height: 1.5; }
.access-chip {
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 100px;
  background: rgba(14, 152, 118, 0.12);
  color: var(--green);
  white-space: nowrap;
}
.access-chip.denied { color: var(--yellow); background: rgba(173, 124, 44, 0.13); }
.access-chip.disabled { color: var(--red); background: rgba(213, 74, 94, 0.12); }

.permissions-panel { margin-top: 22px; }
.permissions-panel p { font-size: 13px; line-height: 1.75; color: var(--secondary); margin: 0; }
.permission-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.permission-steps span {
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  padding: 9px 11px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.permission-steps b { color: var(--blue); }

/* ==================== ORGANIZATION & ADMIN ==================== */
.sim-banner {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  background: var(--card-grad);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 20px;
}
.sim-banner span { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: 1px; white-space: nowrap; }
.sim-banner p { font-size: 12.5px; line-height: 1.6; color: var(--secondary); margin: 0; }

.org-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}
.org-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 340px;
  gap: 20px;
  align-items: start;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-tab {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--secondary);
  font-weight: 800;
  font-size: 12.5px;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.admin-tab.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}
:root[data-theme="dark"] .admin-tab.active { color: #080d19; }
.admin-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; align-items: start; }
.admin-bottom { margin-top: 20px; }

.registry-rows { display: grid; gap: 11px; }
.registry-row {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--panel-2);
  padding: 14px 15px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.registry-row b { display: block; font-size: 13.5px; }
.registry-row small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--secondary); line-height: 1.5; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.form-stack { display: grid; gap: 12px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-label { display: block; color: var(--secondary); font-size: 11px; font-weight: 800; margin-bottom: 6px; }
.label-inline { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
}
.input-compact { width: auto; min-width: 150px; padding: 7px 10px; font-size: 12px; }
.textarea { resize: vertical; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.mt-16 { margin-top: 16px; }

.artifact-checklist {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}
.artifact-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  font-size: 12px;
  cursor: pointer;
}
.artifact-check-row input { margin-top: 2px; }
.artifact-check-row strong { display: block; font-size: 12.5px; }
.artifact-check-row small { display: block; color: var(--secondary); font-size: 11px; margin-top: 2px; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th, .data-table td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.data-table th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  font-weight: 800;
}
.data-table td small { display: block; color: var(--secondary); font-size: 11px; margin-top: 2px; }
.badge-list { display: flex; flex-wrap: wrap; gap: 5px; }

.audit-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-footer { margin-top: 16px; display: flex; justify-content: center; }
.empty-note { color: var(--muted); font-size: 12.5px; margin: 6px 0; }

/* ==================== DIALOG, TOAST, FOOTER ==================== */
.app-dialog {
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 21px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.24);
  max-width: min(92vw, 535px);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.app-dialog::backdrop { background: rgba(12, 18, 35, 0.55); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-close { border: 1px solid var(--line); width: 34px; height: 34px; display: grid; place-items: center; background: var(--panel-2); border-radius: 10px; color: var(--ink); }
.dialog-art { margin: 18px 0 20px; padding: 24px; border-radius: 15px; background: var(--card-grad); color: var(--blue); font-size: 42px; font-weight: 900; letter-spacing: -2px; }
.app-dialog h2 { font-family: var(--font-sans); font-weight: 800; font-size: 25px; line-height: 1.24; letter-spacing: -0.4px; margin: 0 0 12px; }
.app-dialog p { font-size: 13px; line-height: 1.75; color: var(--secondary); }
.dialog-stats { display: grid; gap: 8px; margin: 18px 0; }
.dialog-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; font-size: 12px; }
.dialog-stats b { color: var(--secondary); white-space: nowrap; flex-shrink: 0; }
.dialog-stats span { text-align: right; }

.dialog-timeline-wrap {
  margin: 18px 0 4px;
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}
.dialog-timeline-head { margin-bottom: 12px; }
.dialog-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--line);
  display: grid;
  gap: 12px;
}
.timeline-entry {
  position: relative;
  padding-left: 8px;
}
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--panel-2);
}
.timeline-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
}
.timeline-top strong { color: var(--ink); font-weight: 700; }
.timeline-date { color: var(--muted); font-size: 11px; }
.timeline-summary {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--secondary);
}
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dialog-actions-center { justify-content: center; margin-top: 20px; }
.dialog-actions-center .button { min-width: 220px; }
.dialog-feedback { color: var(--secondary); font-size: 12px; line-height: 1.65; margin-top: 14px; }
.dialog-feedback-center { text-align: center; }

.auth-modal { max-width: min(92vw, 430px); padding: 26px 26px 24px; }
.auth-modal .dialog-head {
  position: relative;
  justify-content: center;
  min-height: 36px;
  margin-bottom: 18px;
}
.auth-modal .dialog-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.auth-modal-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.auth-modal-brand h2 { font-size: 22px; margin: 0; letter-spacing: -0.3px; }
.small-brand { transform: rotate(-18deg) scale(0.86); flex-shrink: 0; }
.auth-modal .popover-status { margin: 0 0 14px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--secondary);
}
.auth-switch .link-button {
  font-size: 12.5px;
  margin-left: 3px;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}
.password-field .input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.pw-toggle:hover { color: var(--ink); background: var(--line-soft); }
.pw-toggle .icon-eye-open { display: none; }
.pw-toggle.is-visible .icon-eye-closed { display: none; }
.pw-toggle.is-visible .icon-eye-open { display: block; color: var(--blue); }

.pw-strength {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}
.pw-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.pw-bars i {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  transition: background 0.2s;
}
.pw-bars[data-level="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-bars[data-level="2"] i:nth-child(-n+2) { background: var(--yellow); }
.pw-bars[data-level="3"] i:nth-child(-n+3) { background: var(--blue); }
.pw-bars[data-level="4"] i:nth-child(-n+4) { background: var(--green); }
.pw-strength-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--secondary);
  margin-bottom: 6px;
}
.pw-strength-head strong.lv1 { color: var(--red); }
.pw-strength-head strong.lv2 { color: var(--yellow); }
.pw-strength-head strong.lv3 { color: var(--blue); }
.pw-strength-head strong.lv4 { color: var(--green); }
.pw-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.pw-rules li.pass { color: var(--green); font-weight: 600; }

.knowledge-list { display: grid; gap: 10px; }
.knowledge-item {
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.knowledge-item strong { display: block; font-size: 13.5px; }
.knowledge-item small { display: block; color: var(--secondary); font-size: 11.5px; margin-top: 3px; line-height: 1.5; }
.card-art.knowledge-cv-notes {
  background: radial-gradient(circle at 40% 35%, #a7e8d8, transparent 52%), linear-gradient(135deg, #4b80c7, #6d95eb);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 250;
  padding: 13px 18px;
  border-radius: 13px;
  background: #1c2845;
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  max-width: 360px;
}

.footer {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  margin-top: 84px;
}
.footer-brand { font-weight: 900; letter-spacing: -1px; font-size: 18px; }
.footer-brand span { color: var(--blue); }
.footer p { font-size: 11.5px; color: var(--secondary); margin: 0; }
.footer p b { color: var(--ink); }
.footer > div { display: flex; gap: 16px; font-size: 11.5px; color: var(--secondary); flex-wrap: wrap; }
.footer small { color: var(--muted); font-size: 10px; letter-spacing: 1px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1160px) {
  .card-shelf .app-card { flex: 0 0 calc((100% - 72px) / 4.5); }
}
@media (max-width: 1080px) {
  .primary-nav { gap: 2px; margin-left: 4px; }
  .nav-item { padding: 8px 10px; font-size: 13px; }
  .application-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .org-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .nav-shell { gap: 14px; }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; gap: 10px; padding-top: 38px; }
  .hero-copy h1 { font-size: clamp(40px, 7.5vw, 62px); letter-spacing: -1.4px; }
  .hero-illustration { height: 370px; }
  .card-shelf .app-card { flex: 0 0 calc((100% - 54px) / 3.5); }
  .application-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-grid { grid-template-columns: 1fr; }
  .workspace-layout, .architecture-workbench { grid-template-columns: 1fr; }
  .node-inspector { position: static; }
  .org-toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .card-shelf .app-card { flex: 0 0 calc((100% - 36px) / 2.5); }
}
@media (max-width: 650px) {
  .shell { width: min(100% - 28px, 1210px); }
  .site-header { height: 68px; }
  .mobile-nav { top: 68px; }
  .brand { font-size: 20px; }
  .nav-actions { gap: 7px; }
  .theme-button { padding: 7px 9px; height: 38px; }
  .theme-button span:last-child { display: none; }
  .menu-button { width: 38px; height: 38px; }
  .auth-entry-btn { height: 38px; padding: 0 12px; font-size: 12px; }
  .account-avatar-btn { width: 38px; height: 38px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
  .shelf-arrows { display: none; }
  .principles, .form-two { grid-template-columns: 1fr; }
  .principles > div { justify-content: flex-start; border-right: 0; border-bottom: 1px solid var(--line); }
  .principles > div:last-child { border: 0; }
  .about-strip { padding: 40px 24px; min-height: 360px; }
  .about-rings { right: -540px; opacity: 0.25; }
  .workspace-app { flex-wrap: wrap; }
  .workspace-app button { width: 100%; }
  .sim-banner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .panel { padding: 18px; }
}
@media (max-width: 580px) {
  .primary-nav { display: none; }
  .menu-button { display: flex; }
  .card-shelf .app-card { flex: 0 0 calc((100% - 18px) / 1.4); }
  .application-grid { grid-template-columns: 1fr; }
}
@media (hover: none) and (pointer: coarse) {
  .shelf-arrows { display: none; }
}
@media (max-width: 360px) {
  .auth-entry-btn { width: 38px; padding: 0; justify-content: center; }
  .auth-entry-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
