:root {
  color-scheme: light;
  --ink: #19231f;
  --muted: #66706b;
  --line: #dce2df;
  --surface: #f5f7f6;
  --brand: #176b52;
  --brand-dark: #0f513d;
  --danger: #a33131;
  --danger-bg: #fff2f2;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

.site-header,
main,
footer {
  width: min(1100px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.brand { color: var(--ink); font-weight: 750; text-decoration: none; }
nav { display: flex; gap: 24px; }
nav a { color: var(--muted); text-decoration: none; }
.user-name { color: var(--ink); font-weight: 650; }
.logout-form { margin: 0; }
.link-button { padding: 0; border: 0; color: var(--muted); background: transparent; font: inherit; cursor: pointer; }
.link-button:hover { color: var(--brand); text-decoration: underline; }

main { min-height: calc(100vh - 150px); padding-block: 54px 72px; }
footer { border-top: 1px solid var(--line); padding: 24px 0 36px; color: var(--muted); font-size: .88rem; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.025em; }
h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { margin: 0 0 14px; font-size: 1.5rem; }
p { margin-top: 0; }

.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.lead { max-width: 680px; color: var(--muted); font-size: 1.08rem; }
.muted, small { color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--muted); text-decoration: none; }
.narrow { max-width: 720px; }
.login-shell { display: grid; place-items: center; min-height: 60vh; }
.login-panel { width: min(100%, 480px); }

.page-header,
.meeting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--brand);
  border-radius: 7px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: #fff; background: var(--brand-dark); }
.button.secondary { color: var(--brand-dark); background: #fff; }
.button.secondary:hover { background: #eef7f3; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.card,
.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.empty-state { text-align: center; padding-block: 64px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); background: var(--surface); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child a { color: var(--ink); font-weight: 650; text-decoration: none; }

.status { display: inline-flex; width: fit-content; padding: 5px 10px; border-radius: 999px; color: #245643; background: #e5f3ed; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.status-error { color: var(--danger); background: var(--danger-bg); }
.status-uploaded { color: #66541b; background: #fff7da; }

.upload-form { margin-top: 32px; }
.field { display: grid; gap: 7px; margin-bottom: 24px; }
label { font-weight: 650; }
input[type="text"], input[type="file"] { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b8c2bd; border-radius: 6px; color: var(--ink); background: #fff; font: inherit; }
input:focus { outline: 3px solid #cce8dc; border-color: var(--brand); }
.validation { color: var(--danger); font-size: .9rem; }
.validation:empty { display: none; }

.progress-card { margin: 28px 0 38px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; gap: 8px; color: #8a938f; font-size: .92rem; }
.steps li.complete { color: var(--brand-dark); }
.steps li.active { color: var(--ink); font-weight: 700; }
.step-icon { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; }
.refresh-note { margin: 22px 0 0; color: var(--muted); font-size: .86rem; }

.error-panel { margin: 24px 0; padding: 18px 20px; border-left: 4px solid var(--danger); color: var(--danger); background: var(--danger-bg); }
.error-panel p { margin: 5px 0 0; overflow-wrap: anywhere; }
.downloads { margin: 38px 0; }
.report-preview { margin-top: 54px; border-top: 1px solid var(--line); padding-top: 38px; }
.section-heading { margin-bottom: 26px; }
.markdown-body { max-width: 820px; }
.markdown-body h1 { margin-top: 0; font-size: 2rem; }
.markdown-body h2 { margin-top: 34px; }
.markdown-body h3 { margin-top: 28px; }
.markdown-body p, .markdown-body li { color: #34413c; }

@media (max-width: 720px) {
  .site-header, main, footer { width: min(100% - 30px, 1100px); }
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
  nav { gap: 16px; font-size: .9rem; }
  main { padding-block: 36px 54px; }
  .page-header, .meeting-header { flex-direction: column; }
  .steps { grid-template-columns: 1fr 1fr; }
  th:nth-child(2), td:nth-child(2) { display: none; }
}
