:root {
  --primary: #f37a1f;
  --page: #101211;
  --surface: #1b211d;
  --text: #f4f2ed;
  --muted: #a9b59d;
  color: var(--text);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
}
.login-screen {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}
.login-screen[hidden] {
  display: none;
}
.login-card {
  background: #f2f0eb;
  color: #182414;
  display: grid;
  gap: 18px;
  max-width: 420px;
  padding: 36px;
  width: calc(100% - 40px);
}
.login-card h1 {
  color: #182414;
  font-size: 38px;
}
.login-card input {
  width: 100%;
}
.login-error {
  color: #a02c18;
  min-height: 1.2em;
}
.shell {
  max-width: 80%;
  margin: auto;
  padding: 48px 32px 80px;
}
.header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 56px;
}
.brand-mark {
  display: block;
  height: auto;
  object-fit: contain;
  width: 112px;
}
.login-card .brand-mark {
  width: 132px;
}
.eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 8px;
}
.title-line {
  align-items: center;
  display: flex;
  gap: 14px;
}
.title-line .eyebrow {
  margin: 0;
}
.prototype {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  color: var(--text);
  font-size: clamp(38px, 7vw, 76px);
  letter-spacing: -0.055em;
  line-height: 0.95;
  margin: 0;
}
h2 {
  color: var(--text);
  font-size: 28px;
  letter-spacing: -0.03em;
  margin: 0;
}
.search-panel {
  background: #f2f0eb;
  color: #182414;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 20px 50px #0005;
}
.search-row {
  display: flex;
  gap: 10px;
}
.field-label {
  align-items: center;
  display: flex;
  gap: 5px;
}
.info-icon {
  align-items: center;
  background: #53633a;
  border-radius: 50%;
  color: #f2f0eb;
  cursor: help;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  height: 15px;
  justify-content: center;
  line-height: 1;
  text-transform: none;
  width: 15px;
}
.info-icon:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
input,
select {
  border: 1px solid #c9c8c0;
  background: white;
  border-radius: 2px;
  color: #182414;
  font: inherit;
  padding: 14px 16px;
}
input {
  flex: 1;
  font-size: 17px;
}
button {
  border: 0;
  border-radius: 2px;
  background: var(--primary);
  color: #182414;
  cursor: pointer;
  font-weight: 800;
  padding: 0 24px;
}
button:hover {
  background: #d96512;
}
.filters {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
select {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  text-transform: none;
}
select[multiple] {
  height: 82px;
  min-height: 82px;
  overflow-y: auto;
}
select[multiple] option {
  padding: 7px 8px;
}
.multi-label::after {
  color: #53633a;
  content: "⌘/Ctrl-click to select multiple";
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.advanced-settings {
  border-top: 1px solid #d7d5cc;
  margin-top: 20px;
  padding-top: 16px;
}
.advanced-settings summary {
  color: #53633a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.advanced-settings summary::marker {
  color: var(--primary);
}
.advanced-settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}
.threshold {
  min-width: 0;
}
.threshold output {
  color: #53633a;
  font-size: 12px;
}
.threshold input,
.threshold wa-slider {
  accent-color: var(--primary);
  padding: 0;
  width: 100%;
}
.threshold wa-slider {
  display: block;
  min-width: 210px;
}
.clear,
wa-button.clear {
  background: transparent;
  color: #53633a;
  padding: 10px 0;
}
.search-action::part(base) {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.search-action::part(base):hover {
  background: #d96512;
  border-color: #d96512;
}
.search-row wa-input {
  flex: 1;
  min-width: 0;
}
.available {
  grid-column: 1 / -1;
  grid-row: 3;
  color: #53633a;
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
  padding-bottom: 10px;
}
@media (max-width: 900px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .advanced-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .threshold,
  .threshold:nth-of-type(5) {
    grid-column: auto;
    grid-row: auto;
  }
  .available {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
@media (max-width: 640px) {
  .filters {
    grid-template-columns: 1fr;
  }
  .advanced-settings-grid {
    grid-template-columns: 1fr;
  }
  .available {
    grid-column: auto;
  }
}
.results-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 64px 0 20px;
}
.card-meta span {
  background: #303630;
  border-radius: 99px;
  color: #c7cec2;
  font-size: 10px;
  padding: 4px 8px;
  text-transform: uppercase;
}
.card-meta .relevance {
  background: #d8f3dc;
  color: #20752e;
}
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid #7a7a7a;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}
.card:focus-visible {
  outline: 3px solid var(--primary);
}
.card img {
  aspect-ratio: 4 / 3;
  background: #293126;
  display: block;
  object-fit: cover;
  width: 100%;
}
.card-body {
  padding: 18px;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
h3 {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 0;
}
.empty {
  color: var(--muted);
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
}
.theme-toggle {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 9px;
  margin-left: auto;
}
.theme-toggle input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}
.toggle-track {
  background: #59625a;
  border-radius: 99px;
  display: inline-flex;
  height: 24px;
  padding: 3px;
  transition: background 0.2s;
  width: 44px;
}
.toggle-thumb {
  background: #fff;
  border-radius: 50%;
  display: block;
  height: 18px;
  transform: translateX(0);
  transition: transform 0.2s;
  width: 18px;
}
.theme-toggle input:checked + .toggle-track {
  background: var(--primary);
}
.theme-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}
dialog {
  background: var(--surface);
  border: 1px solid #465044;
  border-radius: 8px;
  color: var(--text);
  max-width: 760px;
  padding: 0;
  width: calc(100% - 32px);
}
dialog::backdrop {
  background: #0009;
}
#details-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: 28px;
  padding: 28px;
}
#details-content > div:first-of-type {
  grid-column: 2;
  grid-row: 1;
}
#details-content > div:last-of-type {
  grid-column: 1 / -1;
  grid-row: 2;
}
#details-content img {
  border-radius: 4px;
  max-height: 70vh;
  object-fit: contain;
  width: 100%;
}
.description {
  color: var(--muted);
  line-height: 1.6;
}
dl {
  display: grid;
  gap: 10px;
  grid-template-columns: 100px 1fr;
}
dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
dd {
  margin: 0;
}
.close-details {
  background: transparent;
  color: var(--text);
  font-size: 28px;
  padding: 4px 12px;
  position: absolute;
  right: 0;
  top: 0;
}
.light-mode {
  --page: #f5f3ee;
  --surface: #fff;
  --text: #000;
  --muted: #333;
}
.light-mode .search-panel {
  color: #000;
}
.light-mode body {
  background: var(--page);
}
@media (max-width: 640px) {
  .shell {
    padding: 28px 18px;
  }
  .search-row {
    flex-direction: column;
  }
  button,
  wa-button {
    min-height: 48px;
  }
  .results-head {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  .title-line {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }
  #details-content {
    grid-template-columns: 1fr;
  }
  #details-content > div:first-of-type,
  #details-content > div:last-of-type {
    grid-column: 1;
    grid-row: auto;
  }
}
