:root {
  --bg-primary: #ffffff;
  --bg-subtle: #fafafa;
  --bg-muted: #f4f4f5;
  --surface: #ffffff;
  --border-default: #e4e4e7;
  --border-strong: #d4d4d8;
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;
  --accent-primary: #1967d0;
  --accent-hover: #1557b8;
  --accent-subtle: #e8f0fb;
  --accent-text: #0e3f8a;
  --success: #0f766e;
  --success-subtle: #ccfbf1;
  --warning: #b45309;
  --warning-subtle: #fef3c7;
  --coral: #e95c3f;
  --coral-subtle: #fff0ec;
  --ink: #09090b;
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(228, 228, 231, 0.86);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 14px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--text-secondary);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--bg-muted);
  color: var(--text-primary);
  outline: none;
}

.nav a.active {
  background: var(--accent-subtle);
  color: var(--accent-text);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: white;
  padding: 5px 9px 5px 6px;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.account-chip img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

main {
  padding: 28px 22px 72px;
}

.container {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.wide-container {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.page-hero,
.panel,
.band,
.rationale,
.metric-card,
.card {
  border: 1px solid var(--border-default);
  background: white;
}

.page-hero,
.panel,
.band,
.rationale {
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  overflow: hidden;
  min-height: 470px;
}

.page-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
}

.page-hero-media {
  position: relative;
  min-height: 420px;
  background: var(--bg-muted);
}

.page-hero-media img,
.media-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overline,
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 52px;
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 600;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
}

.lede,
.muted {
  color: var(--text-secondary);
  line-height: 1.65;
}

.lede {
  max-width: 680px;
  font-size: 16px;
}

.actions,
.chip-row,
.inline-row,
.tabs,
.toolbar,
.tier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.chip,
.tab,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
}

.button.primary {
  background: var(--accent-primary);
  color: white;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-hover);
}

.button.dark {
  background: var(--text-primary);
  color: white;
}

.button.secondary,
.chip,
.tab,
.icon-button {
  border-color: var(--border-default);
  background: white;
  color: var(--text-primary);
}

.button.secondary:hover,
.chip:hover,
.tab:hover,
.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.button.full {
  width: 100%;
}

.chip.active,
.tab.active {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
  color: var(--accent-text);
}

.chip.dark-active {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: white;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.panel {
  padding: 24px;
}

.band {
  margin-top: 22px;
  padding: 26px;
}

.card,
.metric-card {
  border-radius: 10px;
  padding: 16px;
}

.card.clickable {
  text-align: left;
}

.metric-card {
  display: grid;
  gap: 6px;
}

.metric-card span,
.small {
  color: var(--text-secondary);
  font-size: 12px;
}

.metric-card strong {
  font-size: 22px;
  font-weight: 600;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: white;
  color: var(--text-primary);
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(25, 103, 208, 0.12);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.88fr);
  gap: 22px;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
}

.studio-prompt {
  border: 2px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(120deg, #e95c3f, #f5b400 45%, #1967d0) border-box;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(25, 103, 208, 0.08);
}

.studio-prompt textarea {
  min-height: 150px;
  border: 0;
  padding: 6px 0 0;
  font-size: 19px;
  line-height: 1.55;
  box-shadow: none;
}

.credit-panel {
  position: sticky;
  top: 92px;
  align-self: start;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery img,
.product-card img,
.store-item img,
.render-box img,
.activation-photo img {
  width: 100%;
  border-radius: 9px;
  object-fit: cover;
  background: var(--bg-muted);
}

.gallery img {
  aspect-ratio: 1.5 / 1;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 24px;
}

.render-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-muted);
}

.render-box img {
  aspect-ratio: 5 / 4;
  border-radius: 12px;
}

.render-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
}

.quote-stack {
  display: grid;
  gap: 12px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-primary);
}

.dot.empty {
  border: 2px solid var(--border-strong);
  background: white;
}

.status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  background: var(--success-subtle);
  color: var(--success);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
}

.status.warn {
  background: var(--warning-subtle);
  color: var(--warning);
}

.status.blue {
  background: var(--accent-subtle);
  color: var(--accent-text);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  display: grid;
  gap: 12px;
}

.product-card img {
  aspect-ratio: 1 / 0.82;
}

.project-card.active,
.store-item.active {
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px var(--accent-primary);
}

.store-item {
  text-align: left;
}

.store-item img {
  aspect-ratio: 1 / 0.78;
}

.claim-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.activation-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
}

.activation-photo {
  position: relative;
  min-width: 180px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border-default);
}

.activation-photo img {
  aspect-ratio: 1.45 / 1;
  border-radius: 9px;
}

.activation-photo span {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 28px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  font-size: 11px;
  font-weight: 500;
}

.rationale {
  margin: 28px auto 0;
  padding: 24px;
  background: #ffffff;
}

.rationale-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
}

.rationale ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.footer {
  margin-top: 36px;
  border-top: 1px solid var(--border-default);
  padding-top: 20px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 420px;
  text-align: center;
}

.concept-compare .grid {
  align-items: stretch;
}

.concept-card {
  display: grid;
  gap: 10px;
  min-height: 210px;
}

.concept-card.active {
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px var(--accent-primary);
}

.detail-list {
  margin-top: 16px;
}

.detail-list ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.logic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.logic-card {
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--bg-subtle);
  padding: 14px;
}

.logic-card span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.logic-card strong {
  display: block;
  margin-top: 10px;
}

.architecture-dashboard {
  border: 1px solid #202736;
  border-radius: 14px;
  background: #080d16;
  color: #f8fafc;
  padding: 28px;
  box-shadow: 0 28px 80px rgba(8, 13, 22, 0.26);
}

.architecture-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 34px;
}

.architecture-hero h1 {
  max-width: 980px;
  color: #f8fafc;
}

.architecture-dashboard .lede,
.architecture-dashboard p,
.architecture-dashboard em {
  color: #a8b0bd;
}

.arch-kicker,
.arch-section-title {
  color: #f7d938;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.arch-principle,
.arch-detail-panel,
.arch-node {
  border: 1px solid #252d3d;
  border-radius: 12px;
  background: #111827;
}

.arch-principle {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.arch-principle span {
  color: #a8b0bd;
  font-size: 12px;
}

.arch-principle strong {
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

.arch-section {
  margin-top: 30px;
}

.arch-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.arch-section-title span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}

.arch-grid {
  display: grid;
  gap: 14px;
}

.arch-grid.gold {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.arch-grid.trinity {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr) minmax(0, 0.88fr);
}

.arch-grid.core,
.arch-grid.specialist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.arch-grid.j {
  grid-template-columns: 1fr;
}

.arch-node {
  display: grid;
  gap: 12px;
  min-height: 204px;
  padding: 18px;
  text-align: left;
}

.arch-node strong {
  color: #f8fafc;
  font-size: 20px;
}

.arch-node em {
  font-style: normal;
}

.arch-node p {
  margin: 0;
  line-height: 1.55;
}

.arch-node.gold {
  border-top: 3px solid #f7d938;
}

.arch-node.trinity {
  border-left: 4px solid #7c8cff;
}

.arch-node.core {
  border-left: 4px solid #39d3c2;
}

.arch-node.j {
  min-height: 120px;
  border-left: 4px solid #94a3b8;
}

.arch-node.specialist {
  border-left: 4px solid #f472b6;
}

.arch-node.active,
.arch-node:hover,
.arch-node:focus-visible {
  border-color: #2dd4bf;
  outline: none;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.36), 0 18px 50px rgba(0, 0, 0, 0.26);
}

.arch-status {
  justify-self: end;
  border: 1px solid rgba(45, 212, 191, 0.76);
  border-radius: 7px;
  color: #2dd4bf;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.arch-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  margin-top: 32px;
}

.arch-detail-panel {
  padding: 22px;
}

.arch-detail-panel h2 {
  color: #f8fafc;
}

.arch-evidence {
  margin-top: 16px;
  border: 1px solid #263042;
  border-radius: 10px;
  background: #0b111d;
  padding: 14px;
}

.arch-evidence strong {
  color: #f8fafc;
}

.routing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.routing-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.routing-step {
  display: grid;
  gap: 8px;
  border: 1px solid #263042;
  border-radius: 10px;
  background: #0b111d;
  padding: 14px;
}

.routing-step span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #2dd4bf;
  color: #051014;
  font-size: 12px;
  font-weight: 700;
}

.routing-step strong {
  color: #f8fafc;
}

.chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  border-radius: 999px;
}

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: min(380px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.spinner {
  width: 72px;
  height: 72px;
  border: 8px solid var(--accent-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .topbar-inner {
    grid-template-columns: 1fr;
  }

  .account-chip {
    display: none;
  }

  .page-hero,
  .split,
  .studio-layout,
  .result-layout,
  .claim-shell,
  .rationale-grid,
  .architecture-hero,
  .arch-detail-grid {
    grid-template-columns: 1fr;
  }

  .credit-panel {
    position: static;
  }

  .grid.four,
  .grid.six,
  .product-grid,
  .gallery,
  .logic-grid,
  .arch-grid.gold,
  .arch-grid.trinity,
  .arch-grid.core,
  .arch-grid.specialist,
  .routing-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  main {
    padding: 18px 12px 48px;
  }

  .topbar-inner {
    padding: 12px;
  }

  .page-hero-copy,
  .panel,
  .band,
  .rationale,
  .architecture-dashboard {
    padding: 18px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 24px;
  }

  .page-hero-media {
    min-height: 300px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .grid.six,
  .product-grid,
  .gallery,
  .logic-grid,
  .arch-grid.gold,
  .arch-grid.trinity,
  .arch-grid.core,
  .arch-grid.specialist,
  .routing-chain {
    grid-template-columns: 1fr;
  }

  .timeline-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .timeline-row span:last-child {
    grid-column: 2;
  }

  .chat-launcher {
    position: static;
    width: calc(100% - 24px);
    margin: 0 12px 18px;
    border-radius: 8px;
  }

  .chat-panel {
    position: static;
    width: calc(100% - 24px);
    margin: 0 12px 18px;
  }
}
