:root {
  color-scheme: light;
  --ink: #12202f;
  --muted: #526173;
  --line: #d7e0ea;
  --soft: #f4f7fa;
  --panel: #ffffff;
  --brand: #0f766e;
  --brand-2: #164e63;
  --warn: #b45309;
  --bad: #991b1b;
  --good: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--soft);
  color: var(--ink);
}

a {
  color: inherit;
}

.site {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand span,
.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a,
.button,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button.primary,
button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.button:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hero {
  display: grid;
  align-items: end;
  min-height: 72vh;
  padding: clamp(52px, 8vw, 110px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.88), rgba(22, 78, 99, 0.84)),
    url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1800&q=80") center / cover;
  color: #fff;
}

.hero.narrow {
  min-height: 54vh;
}

.hero-inner,
.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 980px;
  font-size: clamp(42px, 7vw, 86px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
}

p {
  margin: 0;
}

.lead {
  max-width: 760px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.3vw, 25px);
  line-height: 1.5;
}

.section {
  padding: clamp(46px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.section.white {
  background: #fff;
}

.grid {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

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

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

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.card p,
.body {
  color: var(--muted);
  line-height: 1.7;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.flow span {
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #e7f6f4;
  color: #0f4f48;
  font-weight: 900;
  text-align: center;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  padding: 6px 10px;
  background: #e7f6f4;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.status.warn {
  background: #fff7ed;
  color: var(--warn);
}

.status.bad {
  background: #fef2f2;
  color: var(--bad);
}

.status.good {
  background: #ecfdf5;
  color: var(--good);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: start;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.list button {
  justify-content: flex-start;
  text-align: left;
  height: auto;
}

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

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

.audit {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
}

.audit-row {
  border-left: 4px solid var(--brand);
  background: #fff;
  padding: 12px;
}

.audit-row small {
  color: var(--muted);
}

.audit-row details {
  margin-top: 10px;
}

.audit-row pre {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.metric-label {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.route-note {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.checklist {
  display: grid;
  gap: 10px;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checklist input {
  width: auto;
}

.result {
  margin-top: 16px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  border-radius: 8px;
  padding: 14px;
  color: #075985;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .topbar,
  .admin-layout,
  .grid.two,
  .grid.three,
  .summary-grid,
  .form-row,
  .flow {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }
}
