/* Earth / field dossier. Every rule is scoped so Orange keeps its own palette.
   Shared tokens cover standard pages; local tokens cover specialist workspaces. */
html:is(:not([data-theme]),[data-theme=earth]) {
  --bg:#06110a; --surface:#0a1a10; --surface-high:#102d1c;
  --line:#365032; --text:#e0e8b1; --muted:#a6af7b;
  --olive:#cee254; --sand:#cee254; --cool:#c1cf85;
  --earth-band:#105132; --earth-grid:#cee25408;
  color-scheme:dark;
}
html:is(:not([data-theme]),[data-theme=earth]) body {
  background-color:var(--bg);
  background-image:linear-gradient(var(--earth-grid) 1px,transparent 1px),linear-gradient(90deg,var(--earth-grid) 1px,transparent 1px);
}
html:is(:not([data-theme]),[data-theme=earth]) ::selection { background:#cee254; color:#06110a; }
html:is(:not([data-theme]),[data-theme=earth]) :is(input,select,textarea) { accent-color:var(--olive); }
html:is(:not([data-theme]),[data-theme=earth]) :is(input,textarea)::placeholder { color:var(--muted); opacity:1; }
html:is(:not([data-theme]),[data-theme=earth]) .site-header {
  --header-fill:#06110a; --header-edge:#446332; --header-cell:#cee2540d;
}
html:is(:not([data-theme]),[data-theme=earth]) .site-header .nav-list>li:first-child>a::before {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 64' preserveAspectRatio='none'%3E%3Cpath d='M1 0V20L21 40V64' fill='none' stroke='%2368705a' stroke-width='1'/%3E%3C/svg%3E");
}
html:is(:not([data-theme]),[data-theme=earth]) :is(.site-footer,.account-dropdown) { background:var(--bg); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.panel,.card,.state,.server-status,.tab-component) { box-shadow:none; }
html:is(:not([data-theme]),[data-theme=earth]) .hero-art:after {
  background:linear-gradient(90deg,#06110aeb 0%,#06110abf 35%,#06110a50 68%,#06110a20 100%),linear-gradient(0deg,#06110a 0%,transparent 45%);
}
html:is(:not([data-theme]),[data-theme=earth]) :is(.notice,.terminal-toolbar,.tabs,.section-heading) { border-color:var(--line); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.notice,.terminal-toolbar) { background:var(--earth-band); }
html:is(:not([data-theme]),[data-theme=earth]) .button { border-color:#446332; }
html:is(:not([data-theme]),[data-theme=earth]) .button:not(.button-ghost):hover { background:#dce974; color:#06110a; }

/* Field protocols and species dossiers: olive title strips and quiet grey rules. */
html:is(:not([data-theme]),[data-theme=earth]) :is(.rules-navigation,.dossier-nav,.dossier-panel) { background:var(--surface); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.rules-panel-heading,.rules-pack-group h4) { background:var(--earth-band); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.rules-list li,.rules-pack-group,.rules-strike-steps li,.rules-future-limit,.dossier-card) { background:var(--surface); border-color:var(--line); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.rules-navigation li a,.rules-list li,.rules-pack-table tbody th,.rules-pack-group h4,.rules-strike-steps h3,.dossier-card p,.dossier-card li) { color:var(--text); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.rules-navigation li a span,.rules-step-label,.dossier-nav a,.dossier-visual-code,.dossier-visual figcaption) { color:var(--muted); }
html:is(:not([data-theme]),[data-theme=earth]) .dossier-card { border-top-color:#8b9f3e; }
html:is(:not([data-theme]),[data-theme=earth]) .dossier-visual { background:radial-gradient(ellipse at center,#cee2540c,transparent 65%),var(--bg); }
html:is(:not([data-theme]),[data-theme=earth]) .dossier-limitations { background:#102d1c; border-color:#62723b; }
html:is(:not([data-theme]),[data-theme=earth]) .dossier-limitations p { color:var(--text); }

/* The complete archive follows Earth, including locally themed specimen cards. */
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo,
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo :is(.archive-intro,.manual-guide,.species-card) {
  --archive-paper:#0a1a10; --archive-shade:#105132; --archive-ink:#e0e8b1;
  --archive-rule:#365032; --archive-accent:#cee254; --archive-soft:#a6af7b;
  --text:#e0e8b1; --muted:#a6af7b; --line:#365032; --olive:#cee254;
  color:var(--archive-ink); color-scheme:dark;
}
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo { background:transparent; }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo :is(.archive-intro,.manual-guide,.species-card,.compendium-library,.compendium-edition>span) {
  border-width:1px; box-shadow:none;
}
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .archive-intro>div:first-child { border-top:4px solid #8b9f3e; }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo :is(.archive-start,.archive-start:hover) { color:#06110a; background:var(--archive-accent); border-color:var(--archive-accent); box-shadow:none; }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo :is(.compendium-library,.compendium-tools,.library-key) { color:var(--archive-ink); background:var(--archive-shade); border-color:var(--archive-rule); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .compendium-tools :is(input,select) { color:var(--archive-ink); background:var(--archive-paper); border-color:var(--archive-rule); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo :is(.compendium-tools label,.compendium-count,.library-key,.reference-note) { color:var(--archive-soft); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo :is(.archive-readout,.species-card .species-image) {
  background-color:#0d2416; background-image:linear-gradient(var(--earth-grid) 1px,transparent 1px),linear-gradient(90deg,var(--earth-grid) 1px,transparent 1px);
}
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo :is(.archive-placeholder-art,.species-card .species-image .dino-art) { filter:grayscale(.6) brightness(1.1); opacity:.8; }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo .species-card:hover { box-shadow:0 0 0 1px var(--archive-accent); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .species-card .species-record-tag { background:var(--archive-shade); color:var(--archive-accent); border-color:var(--archive-rule); }

/* Gateway chrome only: terrain imagery and geographic marker semantics stay intact. */
html:is(:not([data-theme]),[data-theme=earth]) :is(.gateway-shell,.gateway-sidebar) { background:var(--surface); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.gateway-top,.gateway-bottom) { background:var(--earth-band); color:var(--text); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.gateway-tag,.gateway-north,.gateway-waypoint output,.gateway-bottom output) { color:var(--olive); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.gateway-help,.gateway-waypoint p) { color:var(--muted); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.gateway-sidebar input[type=search],.gateway-results button,.gateway-tools button) { background:var(--bg); border-color:var(--line); color:var(--text); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.gateway-results button:hover,.gateway-tools button:hover) { background:var(--earth-band); }

/* Live specimen instruments inherit a single restrained phosphor palette. */
html:is(:not([data-theme]),[data-theme=earth]) :is(body.live-dinosaur-view,.live-dinosaur-view #main,.content-wrap.live-dinosaur-page,.specimen-console) { background:#000; background-image:none; }
html:is(:not([data-theme]),[data-theme=earth]) .content-wrap.live-dinosaur-page {
  --signal:#cee254; --signal-line:#446332;
  --olive:#cee254; --sand:#cee254; --cool:#c1cf85; --muted:#a6af7b; --line:#365032;
}
html:is(:not([data-theme]),[data-theme=earth]) :is(.console-masthead,.live-dinosaur-page .terminal-toolbar,.live-dinosaur-page .tabs) { background:var(--earth-band); }
html:is(:not([data-theme]),[data-theme=earth]) .live-dinosaur-page .specimen-stage .specimen-scan-art { filter:grayscale(.65) sepia(.15); }

/* Private staff workspace also respects the visitor's Earth preference. */
html:is(:not([data-theme]),[data-theme=earth]) .admin-terminal-page {
  --staff-accent:#cee254; --staff-text:#e0e8b1; --staff-muted:#a6af7b; --staff-line:#446332;
  background:var(--bg); background-image:linear-gradient(var(--earth-grid) 1px,transparent 1px); background-size:100% 5px;
}
html:is(:not([data-theme]),[data-theme=earth]) .staff-panel { background:var(--surface); border-width:1px; box-shadow:none; }
html:is(:not([data-theme]),[data-theme=earth]) :is(.staff-panel>header,.case-list-heading,.suspect-filter,.suspect-owner-hint) { background:var(--earth-band); border-color:var(--line); }
html:is(:not([data-theme]),[data-theme=earth]) .staff-feed-empty { background-image:linear-gradient(var(--earth-grid) 1px,transparent 1px),linear-gradient(90deg,var(--earth-grid) 1px,transparent 1px); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.admin-notes-form textarea,.suspect-form input,.suspect-form select,.suspect-form textarea,.suspect-filter input,.suspect-filter select,.suspect-record.case-row) { background:var(--bg); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.case-row[open],.case-row-summary:hover,.case-status-review) { background:#cee2540c; }
html:is(:not([data-theme]),[data-theme=earth]) :is(.staff-integration,.staff-intake-types span,.staff-panel>footer,.staff-evidence,.staff-evidence>div+div,.staff-handover-row+.staff-handover-row,.case-row+.case-row,.case-record-meta,.suspect-pagination) { border-color:var(--line); }
html:is(:not([data-theme]),[data-theme=earth]) .case-status-closed { color:var(--muted); border-color:var(--line); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.suspect-filter button,.suspect-form-actions button:not(.suspect-remove),.admin-notes-form .button) { color:var(--bg); }

html:is(:not([data-theme]),[data-theme=earth]) {
  --instrument-160e07:#06110a;
  --instrument-482b16:#105132;
  --instrument-603b23:#446332;
  --instrument-633d23:#446332;
  --instrument-754a29:#446332;
  --instrument-81512c:#446332;
  --instrument-82542e:#446332;
  --instrument-82552e:#446332;
  --instrument-8d5b32:#446332;
  --instrument-925e34:#446332;
  --instrument-986437:#446332;
  --instrument-986c44:#446332;
  --instrument-9e6536:#a6af7b;
  --instrument-a57449:#a6af7b;
  --instrument-a58c73:#a6af7b;
  --instrument-a7754d:#a6af7b;
  --instrument-a98d74:#a6af7b;
  --instrument-aa7d54:#a6af7b;
  --instrument-aa815b:#a6af7b;
  --instrument-b29b85:#a6af7b;
  --instrument-b67f50:#a6af7b;
  --instrument-c39266:#a6af7b;
  --instrument-d3b594:#cee254;
  --instrument-d4a37a:#cee254;
  --instrument-dd9a5a:#cee254;
  --instrument-e49a4a14:#cee2540c;
  --instrument-e7ac72:#cee254;
  --instrument-e89b54:#cee254;
  --instrument-e99b4a13:#cee2540c;
  --instrument-e9b17b:#cee254;
  --instrument-eea263:#cee254;
  --instrument-efa15b:#cee254;
  --instrument-efb27b:#cee254;
  --instrument-efb37b:#cee254;
  --instrument-f0b47a:#cee254;
  --instrument-f2a25a:#cee254;
  --instrument-f2b77b:#cee254;
  --instrument-f4b278:#cee254;
  --instrument-f5b674:#cee254;
  --instrument-f8b577:#cee254;
  --instrument-ffb878:#cee254;
  --instrument-ffd1a0:#cee254;
}

html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo .species-card .species-image { background-color:#0d2416; background-image:linear-gradient(var(--earth-grid) 1px,transparent 1px),linear-gradient(90deg,var(--earth-grid) 1px,transparent 1px); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo .species-card .species-image .dino-art { filter:grayscale(.6) brightness(1.1); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo .species-card .species-record-tag { color:var(--archive-accent); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .compendium-library-key { background:var(--archive-shade); color:var(--archive-soft); border-color:var(--archive-rule); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .compendium-library-key :is(strong,b,a) { color:var(--archive-accent); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .compendium-library-key b { background:var(--archive-paper); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo :is(.reference-note p,.compendium-tools label>span) { color:var(--archive-soft); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .empty-inline { background:var(--archive-paper); color:var(--archive-ink); border-color:var(--archive-rule); }
html:is(:not([data-theme]),[data-theme=earth]) :is(th,.podium-first) { background:var(--earth-band); }
html:is(:not([data-theme]),[data-theme=earth]) .podium-card:not(.podium-first) { background:var(--surface); }
html:is(:not([data-theme]),[data-theme=earth]) :is(.podium-rank,.preview-notice) { color:var(--muted); }
html:is(:not([data-theme]),[data-theme=earth]) .preview-notice { background:var(--earth-band); }
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo .compendium-portal { color:var(--archive-accent); background:var(--archive-paper); border-color:var(--archive-rule); }
html:is(:not([data-theme]),[data-theme=earth]) .live-dinosaur-page :is(.console-panel-label,.stage-top .eyebrow,.stage-bottom,.vital-scale span,.condition .eyebrow,.facts dt) { color:var(--muted); }

/* Dossier-strip buttons: pale lettering retains contrast on the reference olive. */
html:is(:not([data-theme]),[data-theme=earth]) :is(.hero-discord,.community-discord),
html:is(:not([data-theme]),[data-theme=earth]) .compendium-neo :is(.archive-start,.archive-start:hover) { background:var(--earth-band); color:var(--text); border-color:#446332; }
html:is(:not([data-theme]),[data-theme=earth]) :is(.hero-discord,.community-discord):hover { background:#17462b; color:#eff5ce; }
html:is(:not([data-theme]),[data-theme=earth]) .live-dinosaur-page .terminal-toolbar { background:transparent; }

/* Reference palette: yellow-green #CEE254, paired with deep green #105132. */
html:is(:not([data-theme]),[data-theme=earth]) .site-header {
  --header-ink:#cee254; --header-accent:#cee254; --header-soft:#a6af7b;
  --header-hover:#cee25412;
}
html:is(:not([data-theme]),[data-theme=earth]) .compendium-page.compendium-neo :is(.species-card .species-record-tag.species-diet-herbivore,.library-diet-tag.species-diet-herbivore) {
  background:#105132; color:#cee254; border-color:#446332;
}
