:root {
  --bg: #f4efe7;
  --panel: rgba(255, 250, 245, 0.84);
  --ink: #1f1712;
  --muted: #6a5d54;
  --border: rgba(54, 35, 19, 0.14);
  --accent: #c95f2d;
  --accent-soft: #f0bf9f;
  --ok: #275c45;
  --bad: #8b322c;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 95, 45, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f1e8 0%, #efe4d6 100%);
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 320px 1fr;
}

.sidebar {
  padding: 28px;
  background: rgba(37, 23, 18, 0.92);
  color: #f6efe6;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-soft);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar h1,
.hero h2,
.panel h3 {
  margin: 0;
  line-height: 1;
}

.lede {
  color: rgba(246, 239, 230, 0.8);
  line-height: 1.6;
}

.demo-actions {
  display: grid;
  gap: 10px;
  margin: 24px 0 18px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.04);
}

pre {
  white-space: pre-wrap;
  overflow: auto;
}

#rpc-output {
  min-height: 160px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.main {
  padding: 28px;
}

.hero,
.panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(56, 31, 10, 0.08);
  backdrop-filter: blur(12px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
}

.hero h2 {
  max-width: 560px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.hero-note {
  max-width: 280px;
  color: var(--muted);
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 2.2rem;
}

.panel {
  padding: 22px;
  margin-top: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.two-up {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 48px;
  align-items: center;
  gap: 10px;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(31, 23, 18, 0.1);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c95f2d 0%, #e89457 100%);
}

.policy-form {
  display: flex;
  gap: 10px;
}

.policy-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
}

.policy-list {
  padding: 0;
  list-style: none;
}

.policy-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.status.call {
  background: rgba(39, 92, 69, 0.14);
  color: var(--ok);
}

.status.blocked,
.status.error {
  background: rgba(139, 50, 44, 0.12);
  color: var(--bad);
}

code {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .two-up {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 120px 1fr 48px;
  }
}

