:root {
  --bg: #0b0d0e;
  --bg-soft: #111315;
  --panel: #171b18;
  --panel-2: #1c221e;
  --text: #e9f1e7;
  --muted: #9fb29b;
  --line: rgba(140, 255, 47, 0.18);
  --line-strong: rgba(140, 255, 47, 0.32);
  --lime: #8cff2f;
  --lime-2: #a8ff60;
  --danger: #ff6b6b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 12px 26px rgba(0, 0, 0, 0.28);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(140, 255, 47, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(140, 255, 47, 0.03), transparent 220px),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent 0 92%, rgba(140,255,47,0.04) 92% 93%, transparent 93% 100%),
    linear-gradient(to bottom, transparent 0 92%, rgba(140,255,47,0.03) 92% 93%, transparent 93% 100%);
  opacity: 0.35;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 14%, rgba(140,255,47,0.08), transparent 12%),
    radial-gradient(circle at 88% 20%, rgba(140,255,47,0.06), transparent 14%),
    radial-gradient(circle at 50% 100%, rgba(140,255,47,0.04), transparent 18%);
  opacity: 0.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(1120px, calc(100vw - 24px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px);
  background: rgba(11, 13, 14, 0.82); border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  border: 1px solid rgba(140,255,47,0.28);
  background: linear-gradient(180deg, rgba(140,255,47,0.18), rgba(140,255,47,0.06));
  box-shadow: 0 0 0 1px rgba(140,255,47,0.08), 0 10px 28px rgba(140,255,47,0.12);
  font-weight: 800; letter-spacing: 0.08em;
}
.brand-copy strong { display: block; font-size: 0.94rem; }
.brand-copy span { display: block; color: var(--muted); font-size: 0.78rem; }
.nav-desktop { display: none; gap: 10px; align-items: center; }
.nav-inline-form { margin: 0; }
.nav-button { font: inherit; }
.nav-link { padding: 10px 14px; border-radius: 999px; color: var(--muted); border: 1px solid transparent; }
.nav-link.is-active, .nav-link:hover { color: var(--text); border-color: var(--line); background: rgba(140,255,47,0.08); }
.page { padding: 24px 0 120px; }
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(140,255,47,0.14), rgba(140,255,47,0.03));
  border: 1px solid rgba(140,255,47,0.18);
  border-radius: 30px;
  padding: 28px 20px;
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(140,255,47,0.08), transparent 16%),
    linear-gradient(135deg, transparent 0 80%, rgba(140,255,47,0.08) 80% 81%, transparent 81% 100%),
    linear-gradient(35deg, transparent 0 86%, rgba(140,255,47,0.06) 86% 87%, transparent 87% 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(140,255,47,0.1), transparent 18%), linear-gradient(135deg, transparent 0 82%, rgba(140,255,47,0.1) 82% 83%, transparent 83% 100%);
  pointer-events: none;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 12px;
  background: rgba(140,255,47,0.08); border: 1px solid rgba(140,255,47,0.14); color: var(--lime-2);
  font-size: 0.83rem; margin-bottom: 12px;
}
.hero h1, .page h1, .page h2, .page h3 { margin: 0 0 10px; letter-spacing: -0.03em; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1.02; max-width: 11ch; }
.hero p { color: var(--muted); font-size: 1rem; max-width: 62ch; }
.hero-actions, .stack-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.button, .button-secondary, .button-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px;
  border-radius: 16px; border: 1px solid rgba(140,255,47,0.18); cursor: pointer; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.button:hover, .button-secondary:hover, .button-danger:hover,
.button:focus-visible, .button-secondary:focus-visible, .button-danger:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.button { color: #081001; background: linear-gradient(180deg, var(--lime-2), var(--lime)); font-weight: 800; }
.button-secondary { color: var(--text); background: rgba(140,255,47,0.06); }
.button-danger { color: white; background: rgba(255,107,107,0.18); border-color: rgba(255,107,107,0.22); }
.grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.panel, .stat-card, .card, .detail-grid > article, .form-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card, .panel, .form-panel, .stat-card { position: relative; }
.card::after, .panel::after, .form-panel::after, .stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.stat-card { padding: 18px; }
.stat-card .label { color: var(--muted); font-size: 0.86rem; }
.stat-card strong { display: block; margin-top: 8px; font-size: 1.8rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-heading p { color: var(--muted); margin: 0; }
.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.specimen-card { overflow: hidden; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.specimen-card:hover, .specimen-card:focus-visible { transform: translateY(-2px); border-color: var(--line-strong); }
.specimen-card-image {
  height: 240px; background: radial-gradient(circle at 70% 20%, rgba(140,255,47,0.14), transparent 20%), linear-gradient(140deg, #181d19, #101213);
  border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
}
.specimen-card-image img,
.detail-photo img,
.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.specimen-card-image.placeholder::after { content: "F.B.I."; font-weight: 800; letter-spacing: 0.18em; color: rgba(140,255,47,0.56); }
.specimen-card-copy { padding: 16px; }
.specimen-card-copy h3 { font-size: 1.15rem; }
.specimen-card-copy p { color: var(--muted); margin: 0 0 8px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px;
  background: rgba(140,255,47,0.08); border: 1px solid rgba(140,255,47,0.14); color: var(--lime-2); font-size: 0.78rem;
}
.badge.muted { color: var(--muted); background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.05); }
.badge.danger { color: #ffd8d8; background: rgba(255,107,107,0.14); border-color: rgba(255,107,107,0.18); }
.filters, .form-grid, .detail-grid, .dashboard-grid { display: grid; gap: 16px; }
.form-panel, .panel { padding: 18px; }
label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.88rem; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(140,255,47,0.12);
  background: rgba(8, 10, 10, 0.8); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(140,255,47,0.3); border-color: rgba(140,255,47,0.26); }
.list { display: grid; gap: 10px; }
.list-item { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); }
.list-item small { color: var(--muted); }
.detail-hero { display: grid; gap: 16px; }
.detail-photo { height: clamp(280px, 52vw, 520px); overflow: hidden; border-radius: 26px; background: linear-gradient(145deg, #191f1b, #101112); border: 1px solid var(--line); }
.detail-grid { margin-top: 18px; }
.detail-grid > article { padding: 18px; }
.definition-list { display: grid; gap: 12px; }
.definition-list div { padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.definition-list dt { color: var(--muted); font-size: 0.84rem; margin-bottom: 4px; }
.definition-list dd { margin: 0; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.gallery figure { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,0.02); display: grid; grid-template-rows: 180px auto; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { padding: 8px 10px; color: var(--muted); font-size: 0.8rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.notice, .alert { padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(140,255,47,0.15); background: rgba(140,255,47,0.08); }
.alert.error { background: rgba(255,107,107,0.14); border-color: rgba(255,107,107,0.18); }
.alert.success { background: rgba(140,255,47,0.1); }
.empty-state { padding: 24px; text-align: center; color: var(--muted); }
.bottom-nav {
  position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); width: min(680px, calc(100vw - 18px));
  border-radius: 22px; padding: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: rgba(15, 17, 18, 0.94);
  border: 1px solid var(--line); backdrop-filter: blur(16px); box-shadow: var(--shadow); z-index: 25;
}
.bottom-nav a, .bottom-nav button {
  min-height: 56px; border-radius: 16px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; font-size: 0.76rem; gap: 4px; padding: 4px;
}
.bottom-nav a.active, .bottom-nav button.active { color: var(--text); background: rgba(140,255,47,0.08); }
.bottom-nav form { margin: 0; }
.icon { width: 20px; height: 20px; border-radius: 999px; border: 1px solid currentColor; display: inline-grid; place-items: center; font-size: 0.7rem; }
.login-card { max-width: 460px; margin: 32px auto 0; }
.helper-text { color: var(--muted); font-size: 0.9rem; }
.kicker-grid { display: grid; gap: 10px; margin-top: 18px; }
.kicker-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(140,255,47,0.12);
  background: rgba(255,255,255,0.02);
}
.kicker-item strong { display: block; margin-bottom: 4px; }
.hide-mobile { display: none; }
@media (min-width: 760px) {
  .page { padding: 32px 0 120px; }
  .nav-desktop { display: flex; }
  .stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1.2fr 0.8fr 0.8fr 0.9fr auto; align-items: end; }
  .detail-hero { grid-template-columns: 1.1fr 0.9fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
  .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kicker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hide-mobile { display: block; }
}
@media (min-width: 980px) {
  .hero { padding: 38px 34px; }
  .detail-grid { grid-template-columns: 1fr 1fr 1fr; }
  .specimen-card-image { height: 260px; }
}
@media (max-width: 759px) {
  .container { width: min(100vw - 18px, 1120px); }
  .hero h1 { max-width: 100%; }
  .section-heading { align-items: start; flex-direction: column; }
  .table-wrap { margin: 0 -4px; }
}
@supports (padding: max(0px)) {
  .bottom-nav {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    width: min(680px, calc(100vw - 14px));
    bottom: max(8px, env(safe-area-inset-bottom));
  }
  .page { padding-bottom: calc(116px + env(safe-area-inset-bottom)); }
}

img { max-width: 100%; display: block; }
.simple-panel { padding: 16px; }
.compact-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.plain-link { color: inherit; }
.button[disabled], .button-secondary[disabled], input[disabled] { opacity: 0.55; cursor: not-allowed; }

.home-header {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}
.home-header h1 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 3.25rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.home-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}
.home-actions {
  display: grid;
  gap: 12px;
}
.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.group-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(140,255,47,0.06);
  border: 1px solid rgba(140,255,47,0.14);
  color: var(--text);
}
.chip-link span {
  color: var(--lime-2);
  font-size: 0.84rem;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.button-secondary.small, .button-danger.small {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.84rem;
}
.photo-actions form {
  margin: 0;
}
@media (min-width: 760px) {
  .home-header {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .home-actions {
    justify-items: end;
  }
  .home-search {
    min-width: 340px;
  }
}

.care-forms {
  margin-bottom: 18px;
}
.care-forms .panel,
.care-forms .form-panel {
  padding: 16px;
}
.compact-form {
  display: grid;
  gap: 12px;
}
.compact-form label {
  margin-bottom: 0;
}
.care-item {
  gap: 10px;
}
.care-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.care-item-head .meta-row {
  margin-top: 0;
}


.meta-note {
  color: var(--text-muted);
  font-size: 0.92rem;
}
