.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.3fr 0.7fr;
  }
}

.hero p {
  max-width: 45ch;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-card {
  background: var(--pico-card-background-color);
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--pico-muted-border-color);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--pico-muted-border-color);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--pill-accent, inherit);
  border-color: var(--pill-accent, var(--pico-muted-border-color));
}

.muted {
  color: var(--pico-muted-color);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.highlights article {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 18px;
  padding: 1.5rem;
  background: var(--pico-card-background-color);
}

.flow-card {
  border: 1px dashed var(--pico-muted-border-color);
  border-radius: 20px;
  padding: 1.5rem;
  background: var(--pico-card-background-color);
}

.flow-card ul {
  margin: 0.8rem 0 1rem;
  padding-left: 1.1rem;
}

.flow-card ol {
  margin: 0.8rem 0 1rem;
  padding-left: 1.3rem;
}

.demo-result {
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--pico-muted-border-color);
  background: var(--pico-card-background-color);
}

.demos .demo-result {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  padding: 0.6rem 0.75rem;
}

.demos .demo-result + .demo-result {
  margin-top: 0.6rem;
}

.key-value-list {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  font-size: 0.82rem;
  color: var(--pico-muted-color);
}

.key-value-list li {
  margin: 0.2rem 0;
  word-break: break-word;
}

.trace-log {
  padding-top: 0.6rem;
}

.demos article {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 18px;
  padding: 1.25rem;
  background: var(--pico-card-background-color);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-meta {
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.flow-map {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.8rem 0 1rem;
}

.flow-map .step {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.flow-map .arrow {
  font-weight: 700;
  color: var(--pico-muted-color);
}

.highlights ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
}

button,
.button {
  border-radius: 999px;
  font-weight: 600;
}

a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
  text-decoration: none;
  border: none;
}

a.button.secondary {
  background: transparent;
  color: var(--pico-color);
  border: 1px solid var(--pico-muted-border-color);
}

button.secondary,
.button.secondary {
  background: transparent;
  border: 1px solid var(--pico-muted-border-color);
}

.chat-columns {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.chat-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-window {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 16px;
  padding: 1rem;
  background: var(--pico-card-background-color);
  min-height: 220px;
  height: 320px;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.chat-window header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.feature-gallery {
  margin-top: 2.5rem;
}

.portfolio-principles {
  margin-top: 2.5rem;
}

.portfolio-audit {
  margin-top: 2.5rem;
}

.principles-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .principles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.principle-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.5);
}

.principle-card h3 {
  margin-bottom: 0.4rem;
}

.principle-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--pico-muted-color);
  font-size: 0.88rem;
}

.audit-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .audit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.audit-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.5);
}

.audit-card h3 {
  margin-bottom: 0.4rem;
}

.audit-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--pico-muted-color);
  font-size: 0.88rem;
}

.feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.feature-layout {
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 960px) {
  .feature-layout {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.feature-grid {
  display: grid;
  gap: 1rem;
}

.feature-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.3));
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: radial-gradient(circle at top right, var(--accent-color), transparent 60%);
  pointer-events: none;
}

.feature-card h3 {
  margin-bottom: 0.4rem;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.2);
  color: var(--accent-color);
  margin-bottom: 0.6rem;
}

.feature-bullets {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--pico-muted-color);
  font-size: 0.88rem;
}

.accent-indigo {
  --accent-color: rgb(99, 102, 241);
}

.accent-emerald {
  --accent-color: rgb(16, 185, 129);
}

.accent-amber {
  --accent-color: rgb(245, 158, 11);
}

.accent-rose {
  --accent-color: rgb(244, 63, 94);
}

.diagram-grid {
  display: grid;
  gap: 1rem;
}

.diagram-panel {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.4);
}

.diagram-panel header {
  margin-bottom: 0.8rem;
}

.diagram-rows {
  display: grid;
  gap: 0.6rem;
}

.diagram-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.diagram-label {
  font-weight: 600;
}

.diagram-value {
  font-size: 0.82rem;
  color: var(--pico-muted-color);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
}

.status-active {
  background: rgb(34, 197, 94);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
}

.status-passive {
  background: rgb(148, 163, 184);
}

.status-warning {
  background: rgb(245, 158, 11);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.status-info {
  background: rgb(56, 189, 248);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

.chat-window .role {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pico-muted-color);
}

.chat-message .meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-message .timestamp {
  font-size: 0.75rem;
  color: var(--pico-muted-color);
}

.chat-messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: 100%;
}

.network-log-panels {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.network-log-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.network-log-scroll {
  max-height: 320px;
  overflow: scroll;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  scrollbar-gutter: stable both-edges;
  box-shadow:
    inset 12px 0 12px -12px rgba(0, 0, 0, 0.35),
    inset -12px 0 12px -12px rgba(0, 0, 0, 0.35);
}

.live-log-panels {
  display: flex;
  flex-direction: column;
}

.live-log-entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.log-entry {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
}

.log-timestamp {
  font-variant-numeric: tabular-nums;
  font-size: 0.6rem;
  line-height: 1;
}

.log-message {
  font-weight: 600;
  white-space: nowrap;
}

.log-fields {
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.data-table th,
.data-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.data-table th {
  text-align: left;
  color: var(--pico-muted-color);
  font-weight: 600;
  white-space: nowrap;
}

.data-table-chat td:last-child {
  min-width: 140px;
}

.log-groups {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.log-group {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.02);
}

.log-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.log-level {
  text-transform: uppercase;
}

.log-level-info {
  border-color: rgba(80, 160, 255, 0.6);
  color: rgba(120, 190, 255, 0.9);
}

.log-level-warn {
  border-color: rgba(255, 196, 80, 0.7);
  color: rgba(255, 196, 80, 0.95);
}

.log-level-error {
  border-color: rgba(255, 96, 96, 0.7);
  color: rgba(255, 128, 128, 0.95);
}

.log-level-debug {
  border-color: rgba(140, 210, 140, 0.65);
  color: rgba(160, 220, 160, 0.9);
}

.log-level-trace {
  border-color: rgba(160, 160, 180, 0.6);
  color: rgba(180, 180, 200, 0.85);
}

.log-target {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--pico-muted-color);
}

.pill.method {
  text-transform: uppercase;
}

.pill.path {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.01em;
}

.method-get {
  border-color: rgba(120, 190, 255, 0.6);
  color: rgba(140, 210, 255, 0.95);
}

.method-post {
  border-color: rgba(140, 210, 140, 0.7);
  color: rgba(160, 220, 160, 0.95);
}

.method-put,
.method-patch {
  border-color: rgba(255, 196, 80, 0.7);
  color: rgba(255, 196, 80, 0.95);
}

.method-delete {
  border-color: rgba(255, 120, 120, 0.75);
  color: rgba(255, 140, 140, 0.95);
}

.method-other {
  border-color: rgba(180, 180, 200, 0.6);
  color: rgba(200, 200, 220, 0.9);
}

.pill.status {
  font-variant-numeric: tabular-nums;
}

.status-2xx {
  border-color: rgba(120, 210, 140, 0.7);
  color: rgba(150, 220, 160, 0.95);
}

.status-3xx {
  border-color: rgba(120, 190, 255, 0.6);
  color: rgba(140, 210, 255, 0.95);
}

.status-4xx {
  border-color: rgba(255, 196, 80, 0.7);
  color: rgba(255, 196, 80, 0.95);
}

.status-5xx {
  border-color: rgba(255, 120, 120, 0.75);
  color: rgba(255, 140, 140, 0.95);
}

.status-unknown {
  border-color: rgba(180, 180, 200, 0.6);
  color: rgba(200, 200, 220, 0.9);
}

.pill.badge-secondary {
  background: transparent;
  color: var(--pico-color);
  border: 1px solid var(--pico-muted-border-color);
}

.pill.badge-you {
  background: #0f766e;
  color: #f8fafc;
  border-color: #0f766e;
}

.pill.badge-demo {
  background: #f59e0b;
  color: #1f2937;
  border-color: #f59e0b;
}
