:root {
  color-scheme: light;
  --paper: #f8f6f1;
  --ink: #202522;
  --muted: #68716d;
  --line: #d8ded6;
  --leaf: #4f7b5a;
  --water: #2d6d82;
  --sun: #c58a35;
  --berry: #8d4764;
  --panel: #ffffff;
  --shadow: 0 12px 30px rgba(31, 39, 35, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(32, 37, 34, 0.08);
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(79, 123, 90, 0.35);
  border-radius: 8px;
  background: #ffffff;
  color: var(--leaf);
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  border-radius: 6px;
  padding: 8px 10px;
  color: #38423d;
  font-size: 14px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: #e7eee6;
  color: #1e3325;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.96fr);
  gap: 42px;
  align-items: center;
  max-width: 1120px;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 52px 22px 40px;
}

.hero h1,
.page-title h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p,
.page-title p {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #2f4637;
  border-radius: 6px;
  padding: 0 16px;
  background: #2f4637;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  border-color: var(--line);
  background: #ffffff;
  color: #2f4637;
}

.button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(32, 37, 34, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.82)),
    linear-gradient(150deg, #9fc4b0 0%, #d7c68e 52%, #7ea3b1 100%);
  box-shadow: var(--shadow);
}

.sun {
  position: absolute;
  top: 42px;
  right: 58px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #f4cb6a;
}

.hill {
  position: absolute;
  right: -10%;
  bottom: -8%;
  width: 74%;
  height: 42%;
  border-radius: 50% 50% 0 0;
  background: #55795f;
}

.hill.left {
  left: -12%;
  right: auto;
  bottom: -3%;
  width: 82%;
  height: 36%;
  background: #385a46;
}

.tree {
  position: absolute;
  bottom: 23%;
  left: 14%;
  width: 34px;
  height: 120px;
  background: #6a5238;
}

.tree::before,
.tree::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: #315a40;
}

.tree::before {
  top: -98px;
}

.tree::after {
  top: -52px;
  width: 118px;
  height: 118px;
  background: #477057;
}

.animal-shape {
  position: absolute;
  right: 18%;
  bottom: 23%;
  width: 152px;
  height: 84px;
  border-radius: 52px 70px 38px 44px;
  background: #5b4532;
}

.animal-shape::before {
  content: "";
  position: absolute;
  right: -30px;
  top: 10px;
  width: 54px;
  height: 46px;
  border-radius: 42% 58% 45% 45%;
  background: #5b4532;
}

.animal-shape::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -34px;
  width: 100px;
  height: 38px;
  border-left: 14px solid #5b4532;
  border-right: 14px solid #5b4532;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 54px 22px;
}

.section.band {
  max-width: none;
  background: #ffffff;
}

.section.band > * {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  margin: 0 0 20px;
  font-size: 30px;
}

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

.card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(31, 39, 35, 0.04);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

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

.icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: #e7eee6;
  color: var(--leaf);
  font-size: 24px;
}

.page-title {
  max-width: 1120px;
  margin: 0 auto;
  padding: 62px 22px 32px;
}

.feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: stretch;
}

.feature-visual {
  min-height: 360px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55) 0 12%, transparent 13%),
    linear-gradient(145deg, var(--feature-a, #9fc4b0), var(--feature-b, #577a86));
  box-shadow: var(--shadow);
}

.feature-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.fact {
  border-left: 4px solid var(--accent, var(--leaf));
  padding: 8px 0 8px 14px;
}

.fact strong {
  display: block;
  margin-bottom: 4px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.timeline-item span {
  color: var(--accent, var(--leaf));
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid rgba(32, 37, 34, 0.08);
  padding: 24px 22px;
  color: var(--muted);
  text-align: center;
}

.admin-body {
  background: #f3f5f2;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
}

.login-box {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-box p {
  margin: 0 0 22px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  padding: 0 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.admin-shell {
  display: none;
  min-height: 100vh;
}

.admin-shell.active {
  display: block;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  background: #ffffff;
}

.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px;
}

.source-help {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: #39433e;
  font-size: 13px;
}

.investigation-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  font-size: 18px;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.candidate-card {
  border: 1px solid #e4e9e3;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.candidate-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.candidate-card p {
  margin: 8px 0;
  color: #3d4741;
  font-size: 13px;
}

.mini-kv {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 5px 8px;
  margin: 0;
  font-size: 12px;
}

.mini-kv dt {
  color: var(--muted);
  font-weight: 800;
}

.mini-kv dd {
  margin: 0;
  word-break: break-word;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

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

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 170px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

th,
td {
  border-bottom: 1px solid #eef1ed;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #fbfcfa;
  color: #4b5650;
  font-size: 12px;
  text-transform: uppercase;
}

.mono {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 4px 4px 0;
  border-radius: 6px;
  padding: 2px 7px;
  background: #eef1ed;
  color: #344039;
  font-size: 12px;
  font-weight: 700;
}

.badge.warn {
  background: #fff0d9;
  color: #7b4e0c;
}

.badge.hot {
  background: #ffe2e5;
  color: #893141;
}

.details {
  white-space: pre-wrap;
  word-break: break-word;
}

.compact-table table {
  min-width: 860px;
}

.compact-table td {
  line-height: 1.35;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 26, 23, 0.52);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  overflow: auto;
  padding: 18px 20px 22px;
}

.modal-section {
  border-bottom: 1px solid #eef1ed;
  padding: 0 0 16px;
  margin-bottom: 16px;
}

.modal-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.modal-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.modal-section ul {
  margin: 0;
  padding-left: 18px;
}

.kv {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0 0 12px;
}

.kv dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kv dd {
  margin: 0;
  word-break: break-word;
}

.error {
  min-height: 22px;
  color: #a13838;
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero,
  .feature {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .candidate-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero h1,
  .page-title h1 {
    font-size: 42px;
  }

  .visual,
  .feature-visual {
    min-height: 280px;
  }

  .grid,
  .facts,
  .metrics,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .modal-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    margin: 8px auto;
  }
}
