.ores-main { width: min(1180px, calc(100% - 32px)); }
.ores-hero { align-items: center; }
.ores-hero h1 { max-width: 900px; font-size: clamp(38px, 6.5vw, 70px); }

.panel-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.panel-heading > * { min-width: 0; }
.panel-heading h2 { margin: 0; font-size: clamp(27px, 4vw, 39px); }
.data-badge {
  display: inline-flex;
  min-height: 28px;
  flex: 0 0 auto;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.data-badge.ready { border-color: #bcd8cf; background: #edf7f4; color: var(--green-dark); }
.data-badge.fixture { border-color: #e6c29d; background: #fff7ed; color: var(--amber); }

.prospecting-panel,
.ore-browser {
  min-width: 0;
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.prospecting-panel { border-color: #bcd8cf; background: linear-gradient(145deg, #f2faf7, #fff 34%); }
.fixture-notice {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-left: 3px solid var(--amber);
  background: #fff7ed;
  color: #6f451e;
  font-size: 12px;
  line-height: 1.55;
}
.mechanic-summary {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}
.mechanic-fact {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.mechanic-fact small,
.mechanic-fact strong,
.mechanic-fact span { display: block; }
.mechanic-fact small { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.mechanic-fact strong { margin-top: 5px; color: var(--green-dark); font-size: 22px; line-height: 1.2; }
.mechanic-fact span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.mechanic-tables {
  display: grid;
  min-width: 0;
  grid-template-columns: 1.15fr .85fr;
  gap: 12px;
  margin-top: 12px;
}
.mechanic-tables > section { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-2); }
.mechanic-tables h3 { margin: 0 0 10px; color: var(--green-dark); font-size: 14px; }
.compact-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.compact-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compact-table th,
.compact-table td { padding: 9px 10px; border-bottom: 1px solid #e7eeea; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.compact-table th { background: #f7faf8; color: var(--green-dark); font-size: 10px; letter-spacing: .03em; }
.compact-table td { color: #536861; font-size: 11px; line-height: 1.45; }
.compact-table tr:last-child td { border-bottom: 0; }
.compact-table td:first-child { color: var(--ink); font-weight: 800; }

.mechanic-rules {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.mechanic-rule { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.mechanic-rule b,
.mechanic-rule span,
.mechanic-rule small { display: block; }
.mechanic-rule b { color: var(--green-dark); font-size: 12px; }
.mechanic-rule span { margin-top: 6px; color: #536861; font-size: 12px; line-height: 1.55; }
.mechanic-rule small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.evidence-details {
  min-width: 0;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfdfc;
}
.evidence-details summary { color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 900; }
.evidence-details dl { display: grid; min-width: 0; grid-template-columns: 150px minmax(0, 1fr); gap: 7px 12px; margin: 12px 0 0; }
.evidence-details dt { color: var(--muted); font-size: 10px; font-weight: 900; }
.evidence-details dd { min-width: 0; margin: 0; color: #536861; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }

.browser-heading { align-items: center; }
#clear-ore-filters { flex: 0 0 auto; font-size: 12px; font-weight: 900; }
.filter-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}
.filter-field { display: grid; min-width: 0; gap: 5px; }
.filter-field span { color: var(--muted); font-size: 10px; font-weight: 900; }
.filter-field input,
.filter-field select { width: 100%; min-width: 0; min-height: 44px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.filter-field select:focus { border-color: var(--green); outline: 2px solid #0f766e24; }
.search-field { grid-column: span 2; }
.filter-help,
.result-status { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.result-status { color: var(--green-dark); font-weight: 800; }
.filter-invalid { margin-top: 10px; color: var(--red); font-size: 12px; font-weight: 800; }

.state-panel {
  display: grid;
  min-width: 0;
  gap: 7px;
  justify-items: center;
  padding: 25px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  text-align: center;
}
.state-panel[hidden] { display: none; }
.state-panel strong { color: var(--ink); font-size: 16px; }
.state-panel span { max-width: 760px; line-height: 1.55; overflow-wrap: anywhere; }
.state-panel button { margin-top: 4px; }
.state-error { border-style: solid; border-color: #e6c29d; background: #fff7ed; color: #8a4b12; }
.state-error strong { color: var(--amber); }
.state-empty { background: #f7faf8; }

.ore-list { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.ore-card {
  min-width: 0;
  scroll-margin-top: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 10px 28px #1d3a320c;
}
.ore-card[hidden] { display: none; }
.ore-card[open] { grid-column: 1 / -1; border-color: #bcd8cf; }
.ore-card > summary {
  display: grid;
  min-width: 0;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 15px;
  cursor: pointer;
  list-style: none;
}
.ore-card > summary::-webkit-details-marker { display: none; }
.ore-card > summary::after { content: "+"; align-self: center; color: var(--green); font-size: 24px; }
.ore-card[open] > summary::after { content: "−"; }
.ore-icon {
  display: block;
  grid-column: 1;
  width: 50px;
  height: 50px;
  object-fit: contain;
  padding: 4px;
  border: 1px solid #d5e0db;
  border-radius: 8px;
  background: #eef4f1;
  image-rendering: pixelated;
}
.ore-icon[hidden] { visibility: hidden; }
.ore-heading { min-width: 0; grid-column: 2; }
.ore-title-row { display: flex; min-width: 0; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; }
.ore-title-row h2 { margin: 0; font-size: 20px; line-height: 1.35; }
.ore-variant { color: var(--muted); font-size: 11px; font-weight: 800; }
.ore-registry { display: block; width: fit-content; max-width: 100%; margin-top: 3px; padding: 0; background: none; color: #71817c; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.ore-badges,
.chip-list { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.meta-chip,
.sample-badge,
.evidence-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.sample-badge.present { border-color: #bcd8cf; background: #edf7f4; color: var(--green-dark); }
.sample-badge.absent { color: #71817c; }
.evidence-badge.active,
.evidence-badge.confirmed { border-color: #bcd8cf; background: #edf7f4; color: var(--green-dark); }
.evidence-badge.unverified,
.evidence-badge.unresolved,
.evidence-badge.partial { border-color: #e6c29d; background: #fff7ed; color: var(--amber); }
.evidence-badge.contradicted { border-color: #efb8b2; background: #fff1f0; color: var(--red); }

.ore-preview { display: grid; min-width: 0; gap: 10px; padding: 0 15px 15px 78px; }
.ore-y { min-width: 0; }
.y-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.y-heading b { color: var(--green-dark); }
.y-track { position: relative; height: 10px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e5ede9; }
.y-range { position: absolute; top: 0; bottom: 0; left: var(--range-left); width: max(3px, var(--range-width)); border-radius: inherit; background: linear-gradient(90deg, var(--green-dark), #2aa190); }
.y-endpoints { display: flex; justify-content: space-between; margin-top: 3px; color: #8a9994; font-size: 9px; }
.y-anchor-note { margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid var(--green); background: #edf7f4; color: #315e55; font-size: 11px; line-height: 1.5; }
.preview-line { min-width: 0; color: #536861; font-size: 11px; line-height: 1.5; }
.preview-line b { color: var(--ink); }

.ore-details { display: grid; min-width: 0; gap: 13px; padding: 16px 18px 18px; border-top: 1px solid #edf2ef; }
.ore-section { min-width: 0; }
.ore-section h3 { margin: 0 0 8px; color: var(--green-dark); font-size: 13px; }
.ore-section p { margin: 0; color: #536861; font-size: 12px; line-height: 1.6; }
.stats-grid { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-card { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); }
.stat-card small,
.stat-card strong,
.stat-card span { display: block; }
.stat-card small { color: var(--muted); font-size: 9px; font-weight: 900; }
.stat-card strong { margin-top: 4px; color: var(--ink); font-size: 13px; line-height: 1.4; }
.stat-card span { margin-top: 3px; color: #71817c; font-size: 9px; line-height: 1.4; }
.condition-list { margin: 0; padding-left: 19px; }
.condition-list li { color: #536861; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.condition-list li + li { margin-top: 4px; }
.ledger-note { margin: -2px 0 14px; padding: 10px 12px; border: 1px solid #dbe8e2; border-radius: 9px; background: #f6faf8; color: #536861; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.boundary-note { padding: 11px 13px; border-left: 3px solid var(--amber); background: #fff7ed; color: #6f451e !important; }
.unresolved-note { padding: 10px 12px; border: 1px dashed #e6c29d; border-radius: 8px; color: var(--amber) !important; }
.ore-evidence-grid { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.ore-evidence-grid > div { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfc; }
.ore-evidence-grid b,
.ore-evidence-grid span { display: block; }
.ore-evidence-grid b { color: var(--muted); font-size: 9px; }
.ore-evidence-grid span { margin-top: 4px; color: #536861; font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.provenance-list { display: grid; min-width: 0; gap: 7px; margin: 0; padding: 0; list-style: none; }
.provenance-list li { min-width: 0; padding: 9px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: #60736d; font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }

.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }

@media (max-width: 900px) {
  .mechanic-summary,
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mechanic-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: span 2; }
}

@media (max-width: 820px) {
  .mechanic-tables,
  .ore-list { grid-template-columns: 1fr; }
  .ore-card[open] { grid-column: auto; }
}

@media (max-width: 620px) {
  .ores-main { width: calc(100% - 24px); }
  .ores-hero h1 { font-size: clamp(34px, 10.5vw, 48px); }
  .prospecting-panel,
  .ore-browser { padding: 15px 12px; }
  .panel-heading,
  .browser-heading { display: grid; gap: 10px; }
  .data-badge,
  #clear-ore-filters { justify-self: start; }
  .mechanic-summary,
  .mechanic-rules,
  .filter-grid,
  .stats-grid,
  .ore-evidence-grid { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .evidence-details dl { grid-template-columns: 1fr; gap: 3px; }
  .evidence-details dd + dt { margin-top: 7px; }
  .ore-card > summary { grid-template-columns: 44px minmax(0, 1fr) 16px; gap: 9px; padding: 12px; }
  .ore-icon { width: 42px; height: 42px; }
  .ore-preview { padding: 0 12px 12px; }
  .ore-details { padding: 13px 12px 14px; }
}
