:root {
  --forest: #1d4a38;
  --forest-2: #16382b;
  --paper: #f6f3ea;
  --card: #fffdf8;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #e4ddcf;
  --lime: #d6ee7a;
  --danger: #8a2e24;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
}
h1, h2, h3, .wordmark {
  font-family: Fraunces, Georgia, serif;
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
a { color: var(--forest); }
img { max-width: 100%; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 3rem; }
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}
.wordmark { color: var(--forest); text-decoration: none; font-size: 1.45rem; }
.nav-wide { display: flex; gap: 1rem; }
.nav-wide a { text-decoration: none; color: var(--ink); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.nav-name { text-decoration: none; font-weight: 600; }
.footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem;
  color: var(--muted);
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}
.footer p { margin: 0.2rem 0; }

.hero { padding: 2.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 14ch; margin: 0.2rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--forest); font-weight: 700; margin: 0; }
.lede { font-size: 1.25rem; max-width: 42rem; }
.hero { border-left: 8px solid var(--lime); padding-left: 1.1rem; }

.steps, .card-grid, .split { display: grid; gap: 1rem; }
.steps { grid-template-columns: repeat(3, 1fr); margin: 1.5rem 0; }
.steps article, .app-card, .sheet, .note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
}
.card-grid { grid-template-columns: repeat(2, 1fr); }
.split { grid-template-columns: 1fr 1fr; }
.sheet.narrow { max-width: 40rem; }
.detail { display: grid; gap: 0.6rem; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.figure { font-family: Fraunces, Georgia, serif; font-size: 2rem; margin: 0.2rem 0; }
.section-head, .row, .stack { display: flex; gap: 0.75rem; }
.section-head { justify-content: space-between; align-items: end; flex-wrap: wrap; }
.stack { flex-direction: column; }
.quiet { color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.82rem; }
.pill-lime { background: var(--lime); border-color: transparent; }
.app-card h2, .app-card h3 { margin: 0.4rem 0; }
.app-card h2 a, .app-card h3 a { text-decoration: none; color: var(--ink); }
.metrics { display: flex; gap: 1.5rem; margin: 0; }
.metrics dt { color: var(--muted); font-size: 0.85rem; }
.metrics dd { margin: 0; font-weight: 700; }
.metrics dd.quiet { font-weight: 400; }

.bars { display: flex; align-items: end; gap: 4px; height: 72px; margin-top: 0.5rem; }
.bars span { flex: 1; background: var(--forest); border-radius: 4px 4px 0 0; min-height: 4px; }

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
}
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.text-button { background: none; border: 0; color: var(--forest); font: inherit; cursor: pointer; padding: 0; }
.banner, .alert {
  background: #fff6d8;
  border: 1px solid #e6d48a;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}
.alert { background: #fde8e4; border-color: #e7b2aa; color: var(--danger); }

.filters, .form-grid { display: grid; gap: 0.8rem; margin: 1rem 0; }
.filters { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; }
.form-grid { grid-template-columns: 1fr 1fr; }
.form-grid .wide, fieldset { grid-column: 1 / -1; }
label, fieldset { display: grid; gap: 0.3rem; font-weight: 600; }
input, select, textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.logo { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
pre {
  overflow: auto;
  background: var(--forest-2);
  color: var(--paper);
  padding: 0.8rem;
  border-radius: 12px;
}
.note-unread { box-shadow: inset 4px 0 0 var(--lime); }
ul.plain { list-style: none; padding: 0; }
ul.plain li { margin: 0.6rem 0; display: grid; }

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #8a2e24;
  color: white;
  padding: 0.6rem 1rem;
  z-index: 10;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 1rem 0; }
.stats article { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.8rem 1rem; }
.stats .figure { font-size: 1.6rem; }
.preview-frame { width: 100%; min-height: 320px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.issue-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.issue-list a { text-decoration: none; color: inherit; display: block; }

@media (max-width: 800px) {
  .steps, .card-grid, .split, .metric-row, .filters, .form-grid, .stats { grid-template-columns: 1fr 1fr; }
  .steps, .card-grid, .split, .metric-row, .filters, .form-grid { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .hero h1 { font-size: 2.4rem; }
}
