* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f7;
  color: #0f172a;
}
.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}
.app-header {
  margin-bottom: 24px;
}
.app-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}
.subtitle {
  color: #1d4ed8;
  font-size: 0.98rem;
}
.subtitle.subtle {
  color: #4b5563;
  font-size: 0.9rem;
  margin-top: 4px;
}
.screen {
  margin-bottom: 32px;
}
.hidden { display: none; }

.hero-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.4fr 1.6fr;
    align-items: stretch;
  }
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 20px 22px;
  box-shadow: 0 10px 25px rgba(15,23,42,0.08);
  border: 1px solid #e5e7eb;
}
.card-header {
  margin-bottom: 12px;
}
.card-header h2 {
  margin: 0 0 4px;
}
.tagline {
  color: #4b5563;
  font-size: 0.9rem;
}

.landing-intro p {
  margin-top: 0;
  color: #374151;
}

.role-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 720px) {
  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.role-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 16px 18px;
  border: 1px solid #e5e7eb;
}
.role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.role-title {
  font-weight: 600;
}
.role-chip {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid #0ea5e9;
  color: #0369a1;
  background: #e0f2fe;
}
.role-body p {
  margin: 6px 0;
  font-size: 0.9rem;
  color: #374151;
}
.role-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.88rem;
  color: #4b5563;
}

.button-primary {
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  margin-top: 10px;
  background: linear-gradient(to right, #2563eb, #0ea5e9);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.button-primary:hover { filter: brightness(1.05); }

.layout {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .layout {
    grid-template-columns: 1.6fr 1.2fr;
    align-items: flex-start;
  }
}

.metrics {
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px 14px 16px;
  border: 1px solid #e5e7eb;
}
.metrics h3 { margin-top: 0; }
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.metric-label {
  font-size: 0.82rem;
  color: #6b7280;
}
.metric-value {
  font-weight: 600;
  font-size: 0.92rem;
}
.metric-delta {
  font-size: 0.78rem;
}
.metric-delta.up { color: #16a34a; }
.metric-delta.down { color: #dc2626; }
.metric-delta.flat { color: #6b7280; }

.prompt { margin-bottom: 14px; }
.prompt h3 { margin-top: 0; }
.prompt p { color: #374151; }

.options { display: grid; gap: 10px; }
.option-btn {
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem;
}
.option-btn:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.badge {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid #e5e7eb;
  color: #374151;
  background: #f9fafb;
}
.badge-primary {
  border-color: #2563eb;
  background: #eff6ff;
}

.profile-panel {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  font-size: 0.84rem;
}
.profile-panel h3 { margin-top: 0; }

.explorer-header { margin-bottom: 16px; }

.hub-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 900px) {
  .hub-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}
.hub-tile {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 14px 16px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}
.hub-tile:hover {
  border-color: #2563eb;
  box-shadow: 0 10px 25px rgba(15,23,42,0.08);
}
.hub-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.hub-meta {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 6px;
}
.hub-outcome {
  font-size: 0.86rem;
  color: #111827;
}

.story-grid { display: block; }
.story-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 16px 18px;
  border: 1px solid #e5e7eb;
}
.story-meta {
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 4px;
}
.story-title {
  font-weight: 600;
  margin-bottom: 6px;
}
.story-tags { margin-bottom: 6px; }
.story-tag {
  display: inline-block;
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 1px 6px;
  margin-right: 4px;
  border: 1px solid #e5e7eb;
  color: #1d4ed8;
  background: #eff6ff;
}
.story-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}
.story-section {
  margin-top: 4px;
  font-size: 0.86rem;
}

.cta-panel {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 0.86rem;
}
.cta-panel h3 { margin-top: 0; }

.app-footer {
  margin-top: 24px;
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  font-size: 0.78rem;
  color: #6b7280;
}

.link-back {
  font-size: 0.82rem;
  color: #2563eb;
  cursor: pointer;
  margin-bottom: 8px;
}
