:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --muted: #747474;
  --line: #e7e7e7;
  --line-strong: #d4d4d4;
  --paper: #fff;
  --wash: #f7f7f5;
  --good: #245b36;
  --warn: #8a5b10;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
}

h3 {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
}

p + p,
ul + p,
p + .actions {
  margin-top: 14px;
}

button,
.button {
  border: 1px solid #222;
  background: #222;
  color: #fff;
  padding: 7px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  text-decoration: none;
  font: inherit;
}

button.secondary,
.button.secondary {
  background: #fff;
  color: #222;
  border-color: #d8d8d8;
}

button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-header,
.shell {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.page-header {
  padding: 42px 0 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.boundary {
  width: min(360px, 100%);
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.shell {
  display: grid;
  gap: 14px;
  padding-bottom: 64px;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 18px;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.eyebrow,
.label,
.help {
  color: var(--muted);
  font-size: 11px;
}

.eyebrow,
.label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin-bottom: 6px;
}

.help {
  margin-top: 10px;
}

.status-grid,
.module-grid {
  display: grid;
  gap: 10px;
}

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

.status-card,
.module-card {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.status-card strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
}

.status-card.ready strong { color: var(--good); }
.status-card.pending strong { color: var(--warn); }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.module-grid {
  margin-top: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card p,
.boundary-list,
.empty-state {
  color: var(--muted);
  font-size: 12px;
}

.module-card h3 {
  margin: 4px 0 6px;
}

.module-card.active {
  border-top-color: #222;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.boundary-list {
  margin: 0;
  padding-left: 18px;
}

.boundary-list li + li {
  margin-top: 5px;
}

.empty-state {
  margin-top: 14px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .page-header {
    display: block;
  }

  .boundary {
    margin-top: 10px;
    text-align: left;
  }

  .intro-panel,
  .module-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-header,
  .shell {
    width: calc(100% - 32px);
  }

  .section-header {
    display: grid;
  }

  button,
  .button {
    width: 100%;
  }
}
