:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5e6b65;
  --line: #cbd8d0;
  --panel: #ffffff;
  --bg: #f4f7f2;
  --accent: #246b5a;
  --accent-strong: #16483d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 14px;
}

button:hover,
button:focus-visible {
  background: var(--accent-strong);
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 8px 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

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

.topbar h1,
.status-band h2,
.panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gate-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 470px;
}

.gate-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef5ee;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
}

.workspace,
.results,
.guidance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guidance {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  margin-top: 14px;
}

.results {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0;
}

.panel,
.status-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.panel-heading {
  display: grid;
  gap: 4px;
}

.panel-heading p,
.status-band p {
  margin: 0;
  color: var(--muted);
}

.field-row,
.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.status-band {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
}

.status-band[data-state="ok"] {
  border-color: #99c9aa;
}

.status-band[data-state="warn"] {
  border-color: #d4b06f;
}

.metric-panel {
  align-content: start;
  min-height: 190px;
}

.guidance-panel {
  align-content: start;
}

.progress-list,
.support-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-top: 1px solid #edf1ee;
  padding-top: 9px;
}

.progress-marker {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  padding: 6px 8px;
  text-align: center;
  text-transform: uppercase;
}

.progress-item[data-complete="true"] .progress-marker {
  border-color: #99c9aa;
  background: #eef8f0;
  color: var(--accent-strong);
}

.progress-item strong,
.progress-item small {
  display: block;
}

.progress-item small,
.support-list li {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
}

.support-list li {
  border-top: 1px solid #edf1ee;
  padding-top: 9px;
}

dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.metric {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  border-top: 1px solid #edf1ee;
  padding-top: 8px;
}

.policy-boundary {
  display: grid;
  gap: 8px;
  border: 1px solid #d9e5dc;
  border-radius: 6px;
  background: #f8fbf7;
  margin-top: 2px;
  padding: 10px;
}

.policy-boundary dd {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  line-height: 1.35;
}

.policy-boundary strong {
  color: var(--accent-strong);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.timeline,
.due-reminder-queue {
  display: grid;
  gap: 8px;
}

.timeline-item,
.due-reminder-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 90px;
  gap: 10px;
  border-top: 1px solid #edf1ee;
  padding-top: 10px;
}

.due-reminder-item {
  grid-template-columns: 132px minmax(0, 1fr);
}

.due-reminder-state {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
  text-align: center;
  text-transform: uppercase;
}

.due-reminder-item[data-state="overdue"] .due-reminder-state,
.due-reminder-item[data-state="missing-proof"] .due-reminder-state {
  border-color: #d4b06f;
  background: #fff8e7;
  color: #6d4f15;
}

.due-reminder-item[data-state="upcoming"] .due-reminder-state {
  border-color: #99c9aa;
  background: #eef8f0;
  color: var(--accent-strong);
}

.due-reminder-item strong,
.due-reminder-item small {
  display: block;
}

.due-reminder-item small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
  margin-top: 3px;
}

.timeline-item strong,
.due-reminder-item strong {
  overflow-wrap: anywhere;
}

.empty {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 940px) {
  .topbar,
  .status-band {
    display: grid;
  }

  .gate-strip {
    justify-content: flex-start;
  }

  .workspace,
  .results,
  .guidance {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .field-row,
  .button-row,
  .action-grid,
  .timeline-item,
  .due-reminder-item {
    grid-template-columns: 1fr;
  }
}
