:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --text: #182018;
  --muted: #667066;
  --line: rgba(24, 32, 24, 0.12);
  --accent: #1d5d45;
  --accent-strong: #133a2b;
  --accent-soft: rgba(29, 93, 69, 0.1);
  --warning: #8a5a12;
  --danger: #a03b2e;
  --shadow: 0 18px 50px rgba(25, 35, 25, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(29, 93, 69, 0.12), transparent 35%),
    radial-gradient(circle at bottom right, rgba(19, 58, 43, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.app-shell,
.landing-shell {
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.landing-card,
.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.landing-card {
  width: min(760px, 100%);
  padding: 40px;
}

.brand-row,
.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-row {
  margin-bottom: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-mark-large {
  width: 72px;
  height: 72px;
}

.brand-kicker {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
  color: var(--text);
}

h1 { font-size: clamp(2.7rem, 6vw, 5rem); line-height: 0.95; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); line-height: 1.05; }
h3 { font-size: 1.1rem; line-height: 1.15; }

.lede,
.hero-copy,
.tiny-note {
  color: var(--muted);
  line-height: 1.6;
}

.lede { font-size: 1.06rem; max-width: 70ch; margin: 16px 0 0; }

.landing-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 30px rgba(29, 93, 69, 0.18);
}

.button.secondary,
.ghost-button {
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

.landing-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.landing-notes span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar h1 { max-width: 12ch; }

.status-pill,
.mini-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.status-pill.good,
.mini-status.good { color: var(--accent); }
.status-pill.warn,
.mini-status.warn { color: var(--warning); }
.status-pill.bad,
.mini-status.bad { color: var(--danger); }

.hero-grid,
.grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  margin-bottom: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact {
  gap: 12px;
}

.hero-card,
.panel {
  padding: 22px;
}

.hero-copy {
  font-size: 1.08rem;
  margin: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.stat .label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat .value {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  line-height: 1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 15px;
  font: inherit;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.subpanel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(29, 93, 69, 0.05);
  border: 1px solid rgba(29, 93, 69, 0.12);
}

.subpanel-title {
  margin: 0 0 12px;
  font-weight: 800;
  color: var(--accent-strong);
}

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

.output {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0f1712;
  color: #d4eadf;
  overflow: auto;
  white-space: pre-wrap;
  min-height: 72px;
}

.slot-list,
.stack-list {
  display: grid;
  gap: 12px;
}

.slot-card,
.request-card,
.person-card,
.timeline-card,
.table-row {
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.slot-card.selected {
  border-color: rgba(29, 93, 69, 0.42);
  background: rgba(29, 93, 69, 0.08);
}

.slot-card button,
.request-card button {
  margin-top: 10px;
}

.slot-top,
.request-top,
.person-top,
.timeline-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.slot-title,
.request-name,
.person-name,
.timeline-title,
.kind-label {
  font-weight: 800;
}

.kind-label {
  font-size: 0.92rem;
}

.tiny,
.meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(29, 93, 69, 0.1);
  color: var(--accent-strong);
}

.tag.good { background: rgba(29, 93, 69, 0.12); }
.tag.warn { background: rgba(138, 90, 18, 0.12); color: #6d4a15; }
.tag.bad { background: rgba(160, 59, 46, 0.12); color: #7c2b22; }

.section {
  margin-top: 20px;
}

.subsection {
  margin-top: 18px;
}

.subsection h3 {
  margin-bottom: 12px;
}

.table-wrap {
  display: grid;
  gap: 10px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 0.8fr 1fr;
  gap: 12px;
  align-items: center;
}

.table-row .kind-stack {
  display: grid;
  gap: 5px;
}

.table-head {
  background: rgba(29, 93, 69, 0.08);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 800;
}

.unlock-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.unlock-row input {
  flex: 1 1 260px;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-2,
  .table-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .brand-row,
  .brand-block {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .app-shell,
  .landing-shell {
    width: min(100vw - 20px, var(--max));
    padding-top: 16px;
  }

  .landing-card,
  .hero-card,
  .panel {
    padding: 18px;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3.8rem);
  }
}
