:root {
  color-scheme: light;
  --ink: #17231d;
  --muted: #5d6b62;
  --line: #dce5de;
  --soft: #f5f8f1;
  --paper: #fffdf7;
  --leaf: #146c43;
  --leaf-2: #0f5132;
  --gold: #c98716;
  --rose: #b94c50;
  --blue: #2f69a1;
  --aqua: #0f766e;
  --shadow: 0 18px 50px rgba(23, 35, 29, 0.11);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--ink);
  color: white;
  padding: 0.7rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 8px;
  background: var(--leaf);
  color: white;
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a,
.nav-toggle,
.btn,
.chip,
.tab {
  min-height: 2.6rem;
  border-radius: 8px;
}

.site-nav a {
  padding: 0.65rem 0.8rem;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--soft);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

main {
  min-height: 70vh;
}

.env-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: #eef7f0;
  color: var(--leaf-2);
  font-size: 0.9rem;
}

.env-banner strong,
.env-banner span {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
}

.env-banner strong {
  border-radius: 8px;
  background: var(--leaf);
  color: white;
  padding: 0.2rem 0.5rem;
}

.section {
  padding: clamp(2.2rem, 5vw, 5rem) clamp(1rem, 4vw, 3rem);
}

.section.alt {
  background: var(--soft);
}

.hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 3rem);
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.96), rgba(255, 253, 247, 0.72)),
    url("data:image/svg+xml,%3Csvg width='1200' height='760' viewBox='0 0 1200 760' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='760' fill='%23f5f8f1'/%3E%3Cg opacity='.95'%3E%3Crect x='720' y='120' width='250' height='370' rx='8' fill='%23146c43'/%3E%3Crect x='755' y='168' width='180' height='36' rx='5' fill='%23fffdf7'/%3E%3Crect x='755' y='228' width='136' height='24' rx='5' fill='%23d7c082'/%3E%3Crect x='755' y='285' width='170' height='120' rx='8' fill='%23fffdf7'/%3E%3Ccircle cx='570' cy='300' r='90' fill='%23c98716'/%3E%3Crect x='470' y='390' width='220' height='130' rx='8' fill='%23ffffff'/%3E%3Cpath d='M470 434h220' stroke='%2317231d' stroke-width='10' opacity='.12'/%3E%3Cpath d='M470 478h180' stroke='%2317231d' stroke-width='10' opacity='.12'/%3E%3Crect x='820' y='510' width='190' height='74' rx='8' fill='%23b94c50'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.hero-inner {
  max-width: 760px;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.45rem 0.7rem;
  color: var(--leaf-2);
  font-weight: 700;
  font-size: 0.86rem;
}

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

h1 {
  max-width: 12ch;
  margin-top: 1rem;
  font-size: clamp(3.2rem, 11vw, 7.5rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  line-height: 1.65;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  background: white;
  padding: 0.72rem 1rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  border-color: var(--leaf);
  background: var(--leaf);
  color: white;
}

.btn.gold {
  border-color: var(--gold);
  background: var(--gold);
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.panel,
.metric,
.form-shell,
.table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.15rem;
}

.panel.accent {
  border-top: 5px solid var(--leaf);
}

.panel.warning {
  border-top: 5px solid var(--gold);
}

.panel.danger {
  border-top: 5px solid var(--rose);
}

.panel.info {
  border-top: 5px solid var(--blue);
}

.panel.success {
  border-top: 5px solid var(--leaf);
  background: #f7fcf8;
}

.compact-grid {
  margin-top: 1rem;
}

.kicker {
  color: var(--muted);
  font-size: 0.9rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 1.05fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.form-shell {
  padding: clamp(1rem, 3vw, 1.5rem);
}

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

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

.notice {
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  padding: 0.85rem 1rem;
  color: #60430d;
}

.success {
  border-left-color: var(--leaf);
  background: #edf8f0;
  color: var(--leaf-2);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.auth-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr);
  gap: 1rem;
  align-items: end;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff8e8;
}

.auth-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.chip {
  border: 1px solid var(--line);
  background: white;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  border-color: var(--leaf);
  background: var(--leaf);
  color: white;
}

.tab {
  border: 1px solid var(--line);
  background: white;
  padding: 0.55rem 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

.tab[aria-selected="true"] {
  border-color: var(--leaf);
  background: var(--leaf);
  color: white;
}

.status-row,
.timeline {
  display: grid;
  gap: 0.75rem;
}

.status-row {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.metric {
  padding: 1rem;
}

.metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.8rem;
}

.table-shell {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
}

th,
td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  color: var(--muted);
  font-size: 0.85rem;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  background: var(--soft);
  padding: 0.35rem 0.55rem;
  color: var(--leaf-2);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-layout {
  display: grid;
  grid-template-columns: 17rem 1fr;
  min-height: 100vh;
}

.admin-side {
  position: sticky;
  top: 4.5rem;
  height: calc(100vh - 4.5rem);
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #10251a;
  padding: 1rem;
  color: white;
}

.admin-side a {
  display: block;
  border-radius: 8px;
  padding: 0.7rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.admin-side a:hover,
.admin-side a:focus-visible {
  background: rgba(255, 255, 255, 0.11);
  color: white;
}

.qr {
  display: grid;
  width: 8rem;
  aspect-ratio: 1;
  place-items: center;
  border: 8px solid white;
  background:
    linear-gradient(90deg, var(--ink) 22%, transparent 22% 78%, var(--ink) 78%),
    linear-gradient(var(--ink) 22%, transparent 22% 78%, var(--ink) 78%),
    repeating-linear-gradient(45deg, var(--ink) 0 8px, white 8px 16px);
  box-shadow: var(--shadow);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  background: #10251a;
  color: white;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0 0.8rem;
  }

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 4.45rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 0.5rem;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .split,
  .admin-layout,
  .form-grid,
  .auth-strip {
    grid-template-columns: 1fr;
  }

  .auth-controls {
    justify-content: flex-start;
  }

  .admin-side {
    position: static;
    height: auto;
  }

  .site-footer {
    display: block;
  }

  .hero {
    min-height: auto;
  }
}
