:root {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #f4f4f4;
  background: #000;
  color-scheme: dark;
  --accent: #f2c94c;
  --text: #f4f4f4;
  --muted: #a9a9a9;
  --border: #353535;
  --border-strong: #686868;
}

* {
  box-sizing: border-box;
}

html,
body {
  background: #000;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 42px 28px 70px;
  color: var(--text);
}

.page {
  width: min(900px, 100%);
  margin: 0 auto;
}

.site-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.site-header h1::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 12px;
  background: var(--accent);
}

.comparison-section,
.bee-section {
  position: relative;
}

.question-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
}

input,
button {
  font: inherit;
}

input {
  width: min(380px, 100%);
  padding: 10px 12px;
  color: #fff;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:hover {
  border-color: #8a8a8a;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(242, 201, 76, 0.16);
}

button {
  min-height: 38px;
  padding: 8px 13px;
  color: #fff;
  background: #111;
  border: 1px solid #4a4a4a;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

button:hover:not(:disabled) {
  background: #1b1b1b;
  border-color: #777;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

#answer-button {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}

#answer-button:hover:not(:disabled) {
  background: #ffe06f;
  border-color: #ffe06f;
}

.status {
  min-height: 1.25em;
  margin: 13px 0 0;
  color: var(--muted);
}

.result-area {
  margin-top: 18px;
  padding: 18px 0 2px;
  border-top: 1px solid var(--border);
}

.result-sentence {
  margin: 0 0 7px;
  font-size: 1.15rem;
  line-height: 1.45;
  font-weight: 800;
}

.bee-count-line {
  margin: 0 0 14px;
  color: #dedede;
  line-height: 1.5;
}

#why-button,
#learn-more-button {
  background: #000;
}

.bee-section {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

#bee-loading {
  color: var(--muted);
}

.bee-image {
  display: block;
  width: min(460px, 100%);
  height: auto;
  max-height: 460px;
  object-fit: contain;
  margin: 0 0 14px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.bee-identification {
  margin-bottom: 13px;
  line-height: 1.35;
}

#bee-name {
  font-size: 1.15rem;
  font-weight: 800;
}

.scientific-name {
  margin-top: 3px;
  color: #bdbdbd;
  font-style: italic;
}

.details-panel {
  margin-top: 18px;
  padding: 18px 0 4px;
  max-width: 800px;
  border-top: 1px solid var(--border);
}

.details-panel h2 {
  margin: 0 0 13px;
  font-size: 1.08rem;
}

.details-panel h3 {
  margin-top: 22px;
  font-size: 1rem;
}

.details-panel p,
.details-panel li,
.details-panel dd {
  line-height: 1.55;
}

.comparison-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
}

.comparison-table th,
.comparison-table td {
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: 0;
}

.comparison-table th:last-child,
.comparison-table td:last-child {
  border-right: 0;
}

.comparison-table thead th {
  color: #000;
  background: var(--accent);
  border-color: #cfae3e;
  font-weight: 800;
}

.comparison-table tbody th {
  width: 28%;
  color: #e5e5e5;
  font-weight: 700;
}

.cheeky {
  color: var(--accent);
  font-style: italic;
  font-weight: 600;
}

.estimate-note,
.image-credit {
  color: var(--muted);
  font-size: 0.9rem;
}

.bee-details-list {
  display: grid;
  grid-template-columns: minmax(130px, max-content) minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0;
}

.bee-details-list dt {
  color: #d9d9d9;
  font-weight: 700;
}

.bee-details-list dd {
  margin: 0;
  color: #f1f1f1;
}

#bee-facts {
  padding-left: 22px;
}

.image-credit a {
  color: var(--accent);
}

::selection {
  color: #000;
  background: var(--accent);
}

@media (max-width: 620px) {
  body {
    padding: 28px 18px 52px;
  }

  .site-header {
    margin-bottom: 22px;
  }

  .question-row {
    align-items: flex-start;
  }

  input {
    flex-basis: 100%;
  }

  .comparison-table {
    display: block;
    overflow-x: auto;
  }

  .comparison-table th,
  .comparison-table td {
    min-width: 140px;
  }

  .bee-details-list {
    display: block;
  }

  .bee-details-list dt {
    margin-top: 12px;
  }

  .bee-details-list dd {
    margin-top: 3px;
  }
}

/* ============================================================
   ASCII HEADLINER
   The text itself lives in index.html between the obvious
   ASCII HEADLINER START / END comments.
   ============================================================ */
.ascii-headliner {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  color: var(--text);
  background: transparent;
  border: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(0.72rem, 2vw, 1rem);
  line-height: 1.05;
  font-weight: 700;
  white-space: pre;
}

.ascii-headliner::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 12px;
  background: var(--accent);
}

.site-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  color: #fff;
  background: #111;
  border: 1px solid #4a4a4a;
  border-radius: 5px;
  font-weight: 700;
  text-decoration: none;
}

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-links .is-placeholder,
.site-footer .is-placeholder {
  opacity: 0.52;
  cursor: default;
}

@media (max-width: 620px) {
  .site-links {
    align-items: flex-start;
    flex-direction: column;
  }
}


.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #222;
}

.secondary-link {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.72;
}


.bee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}


.bee-search-wrap {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
  min-width: 220px;
}

#bee-search-input {
  width: 100%;
}

.bee-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: #050505;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}

.bee-search-option {
  display: grid;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #242424;
  border-radius: 0;
  background: #050505;
}

.bee-search-option:last-child {
  border-bottom: 0;
}

.bee-search-option:hover,
.bee-search-option.is-active {
  background: #171717;
}

.bee-search-common {
  font-weight: 800;
}

.bee-search-scientific {
  margin-top: 2px;
  color: #c8c8c8;
  font-style: italic;
}

.bee-search-context {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.bee-search-empty {
  padding: 11px 12px;
  color: var(--muted);
}

@media (max-width: 620px) {
  .bee-search-wrap {
    flex-basis: 100%;
    max-width: none;
  }
}


.random-bee-fact {
  margin: 0 0 24px;
  padding: 12px 14px;
  color: #e8e8e8;
  background: #080808;
  border-left: 3px solid var(--accent);
  border-top: 1px solid #242424;
  border-right: 1px solid #242424;
  border-bottom: 1px solid #242424;
  border-radius: 4px;
  line-height: 1.5;
}

.fact-label {
  color: var(--accent);
  font-weight: 800;
  margin-right: 5px;
}

.fact-source {
  margin-left: 8px;
  color: var(--muted);
  font-size: .86rem;
}

.bottom-fact-area { margin-top: 28px; }
.random-bee-fact { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.fact-source { color:#aaa; font-size:.82rem; text-decoration:underline; white-space:nowrap; }
.site-link-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.bee-conservation-alert { margin:0 0 18px; padding:16px 18px; border:2px solid #555; border-radius:6px; background:#171717; color:#fff; display:grid; gap:6px; }
.bee-conservation-alert[hidden] { display:none !important; }
.bee-conservation-alert strong { font-size:1.18rem; letter-spacing:.035em; }
.bee-conservation-alert a { width:max-content; }
.bee-conservation-alert.status-safe { background:#06270f; border-color:#25a244; }
.bee-conservation-alert.status-safe strong { color:#70e38b; }
.bee-conservation-alert.status-unknown { background:#171717; border-color:#666; }
.bee-conservation-alert.status-unknown strong { color:#c7c7c7; }
.bee-conservation-alert.status-near-threatened { background:#2a2500; border-color:#d2b82c; }
.bee-conservation-alert.status-near-threatened strong { color:#f1d94d; }
.bee-conservation-alert.status-vulnerable { background:#2c1700; border-color:#dc861e; }
.bee-conservation-alert.status-vulnerable strong { color:#ffad42; }
.bee-conservation-alert.status-endangered { background:#310707; border-color:#d93030; }
.bee-conservation-alert.status-endangered strong { color:#ff6262; }
.bee-conservation-alert.status-critical { background:#240000; border-color:#ff2424; box-shadow:inset 0 0 0 1px #6d0000; }
.bee-conservation-alert.status-critical strong { color:#ff4545; font-size:1.35rem; }
.bee-conservation-alert.is-extinct {
  background:
    repeating-linear-gradient(135deg, #050505 0, #050505 12px, #181818 12px, #181818 24px);
  border-color:#777;
}
.bee-conservation-alert.is-extinct strong { color:#d0d0d0; font-size:1.3rem; }
@media (max-width:700px) { .random-bee-fact { align-items:flex-start; flex-direction:column; } }

#bee-vanta {position:fixed;inset:0;z-index:0;pointer-events:none;}
body > main {position:relative;z-index:1;}
.page, .admin-page {background:rgba(0,0,0,.86);border-radius:16px;padding:20px;}
.image-failure {display:block;margin:10px 0;overflow-wrap:anywhere;}
@media (prefers-reduced-motion:reduce) {#bee-vanta {display:none;}}


/* Beetabase community tools */
.beetabase-stats, .pronunciation-widget { margin-top:20px; padding:16px; border:1px solid var(--border-strong); border-radius:8px; background:rgba(12,12,12,.92); }
.beetabase-stats summary, .pronunciation-widget summary { cursor:pointer; color:var(--accent); font-weight:600; padding:6px 0; }
#bee-total-badge {display:inline-block; border:1px solid var(--accent); padding:2px 8px; border-radius:20px; margin-left:8px;}
#beetabase-stats-list {display:grid; grid-template-columns:1fr auto; gap:8px 20px; max-width:480px;}
#beetabase-stats-list dd {margin:0; font-weight:bold; color:var(--accent);}
.pronunciation-widget {max-width:100%;}
.pronunciation-widget .scientific-name {font-size:1.3rem; overflow-wrap:anywhere; margin-bottom:12px;}
.pronunciation-widget p, .beetabase-stats p {font-size:.87rem; line-height:1.5;}
.pronunciation-widget .muted, .beetabase-stats .muted {color:var(--muted);}
.pronunciation-widget details {border-top:1px solid var(--border); margin-top:12px; padding-top:8px;}
.pronunciation-widget label {display:block; margin:12px 0; font-size:.95rem;}
.pronunciation-widget label input:not([type=checkbox]) {display:block; width:100%; margin-top:6px;}
.pronunciation-widget .consent {display:flex; gap:10px; align-items:flex-start; line-height:1.5;}
.pronunciation-widget input[type=checkbox] {width:auto; margin-top:5px; flex-shrink:0;}
.pronunciation-actions {display:flex; flex-wrap:wrap; gap:8px;}
.pronunciation-widget audio {display:block; max-width:100%; margin:10px 0;}
.pronunciation-widget audio[hidden], .pronunciation-widget [hidden] {display:none;}
.community-pronunciation {padding:12px 0; border-bottom:1px solid var(--border);}
.community-pronunciation p {margin:6px 0; overflow-wrap:anywhere;}

.conservation-library {margin:44px 0 28px; padding:26px 0; border-top:1px solid var(--border-strong);}
.conservation-library h2 {font-size:clamp(1.5rem,4vw,2.2rem); max-width:650px; line-height:1.18; margin:10px 0 14px;}
.conservation-library > p {max-width:680px; color:#c9c9c9; line-height:1.7;}
.conservation-library .eyebrow {color:var(--accent);font-size:.75rem;letter-spacing:.14em;font-weight:bold;}
.conservation-collection {margin:16px 0; padding:18px; background:rgba(13,13,13,.94);border:1px solid #4c4736;border-radius:8px;}
.conservation-collection > summary {cursor:pointer;font-weight:bold;color:var(--accent);font-size:1.08rem;}
.conservation-collection p {line-height:1.6;}
.extinction-collection {border:1px solid #a26355;border-left:4px solid #cf8a73;}
.extinction-collection > summary {color:#f2b49d;}
.extinction-message {font-size:1.4rem;font-weight:bold;color:#f4c5b4;max-width:600px;}
.conservation-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:14px;margin-top:18px;}
.conservation-species {display:flex;flex-direction:column;min-width:0;padding:14px;background:#111;border:1px solid #383838;border-radius:6px;}
.conservation-species img {width:100%;height:160px;object-fit:cover;background:#080808;border-radius:4px;}
.conservation-species h4 {margin:12px 0 3px;font-size:1rem;}
.conservation-species .latin {font-style:italic;color:#b9b9b9;margin:3px 0;font-size:.85rem;overflow-wrap:anywhere;}
.conservation-species .status-tag {font-size:.8rem;color:#f3cf6a;font-weight:bold;}
.conservation-species p {font-size:.85rem;margin:8px 0;}
.conservation-species a {font-size:.8rem;color:#c9c9c9;margin:8px 0;}
.conservation-species button {align-self:flex-start;margin-top:auto;}
.photo-note {color:var(--muted);font-size:.78rem;margin-top:6px;}
#bee-image-original {display:block;max-width:100%;}
.bee-search-thumb {width:42px;height:42px;object-fit:cover;border-radius:4px;float:left;margin-right:10px;}

/* AMSR spacing and yellow-edge visual trial / 2026-10-23 */
.bottom-fact-area{margin-top:12px}.site-link-row a, #random-button, #new-fact-button{border-left:3px solid var(--accent)}
