:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f8fafc;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 44px 20px 72px;
}

main {
  width: min(960px, 100%);
  margin: auto;
}

header {
  width: min(960px, 100%);
  margin: 0 auto 32px;
}

.eyebrow {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -.04em;
}

header p {
  max-width: 720px;
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

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

article {
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 28px #0f172a08;
}

article h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

article > p {
  margin: 0 0 18px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.snippet {
  margin-top: 14px;
}

.snippet summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  user-select: none;
}

.snippet pre {
  margin: 10px 0 0;
  border-radius: 10px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.55;
}

.snippet pre code.hljs {
  padding: 14px;
  border-radius: 10px;
}

.snippet code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre;
}

.demo-surface {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  padding: 18px 20px;
  border-radius: 14px;
}

.basic-surface {
  background: #f3e8ff;
  color: #581c87;
}

.jsx-surface {
  background: #ffedd5;
  color: #9a3412;
}

.component-surface {
  background: #e0f2fe;
  color: #075985;
}

.mvvm-surface {
  background: #dcfce7;
  color: #166534;
}

.lsisv-surface {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: #fef3c7;
  color: #92400e;
}

.stateful-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  background: #fff;
}

.stateful-card h3 {
  margin: 0;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.lsisv-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #92400e;
}

.lsisv-header p {
  margin: 0;
  color: #b45309;
  font-size: 14px;
  line-height: 1.5;
}

.action-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: #d97706;
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.action-button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.action-button:active {
  transform: translateY(0);
}

.conditional-surface,
.keyed-surface,
.fragment-surface {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
}

.conditional-surface {
  background: #e0f2fe;
  color: #075985;
}

.keyed-surface {
  background: #dcfce7;
  color: #166534;
}

.fragment-surface {
  background: #fef3c7;
  color: #92400e;
}

.conditional-surface > h3,
.keyed-surface > h3,
.fragment-surface > h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.conditional-surface > p,
.keyed-surface > p,
.fragment-surface > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.conditional-surface > p {
  color: #0369a1;
}

.keyed-surface > p {
  color: #15803d;
}

.fragment-surface > p {
  color: #b45309;
}

.fragment-surface > h4 {
  margin: 6px 0 2px;
  font-size: 14px;
}

.conditional-panel {
  padding: 16px;
  border: 1px solid #7dd3fc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px #0ea5e91a;
}

.conditional-panel h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.keyed-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyed-button {
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #166534;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.keyed-button:hover {
  background: #f0fdf4;
}

.keyed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keyed-item {
  padding: 8px 10px;
  border: 1px solid #86efac;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.fragment-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  background: #fff;
  color: #92400e;
}

.fragment-child {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
}

.fragment-child-a {
  background: #eef6ff;
  color: #075985;
}

.fragment-child-b {
  background: #f1f8ed;
  color: #166534;
}

.like-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
}

.like-row strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.like-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: #e11d48;
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.like-button:hover {
  background: #be123c;
  transform: translateY(-1px);
}

.like-button:active {
  transform: translateY(0);
}

.like-button:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  transform: none;
}

.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

footer {
  margin-top: 28px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.source-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (max-width: 520px) {
  body {
    padding: 28px 14px 48px;
  }
  
  article {
    padding: 16px;
  }
  
  .demo-surface {
    padding: 14px;
  }
  
  .stateful-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

.adoption-surface,
.messenger-surface {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
}

.adoption-surface {
  background: #ede9fe;
  color: #5b21b6;
}

.messenger-surface {
  background: #e0f2fe;
  color: #075985;
}

.adoption-surface > h3,
.messenger-surface > h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.adoption-surface > p,
.messenger-surface > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.adoption-surface > p {
  color: #6d28d9;
}

.messenger-surface > p {
  color: #0369a1;
}

.server-list {
  margin: 0;
  background: #fff;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  padding: 12px 12px 12px 32px;
}

.messenger-surface .server-list {
  border-color: #7dd3fc;
}

.server-list li {
  padding: 4px 0;
}

.status-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
  border: 1px dashed #c4b5fd;
}

.messenger-surface .status-note {
  border-color: #7dd3fc;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-input {
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid #7dd3fc;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}

.cross-update-surface {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  background: #fef3c7;
  color: #92400e;
}

.cross-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.cross-card {
  background: #fff;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cross-card h4 {
  margin: 0;
  font-size: 16px;
  color: #92400e;
}

.cross-count {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #78350f;
}

.cross-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
