/* ── CALIBERS PAGE ─────────────────────────────────────────────────── */

body.calibers-page {
  background: var(--bg);
}

/* ── SEO INTRO ──────────────────────────────────────────────────────── */
.seo-intro {
  padding: 20px 0 4px;
  border-bottom: 0.5px solid var(--border);
}
.seo-intro p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
  max-width: 800px;
}

/* ── PAGE HEADER ────────────────────────────────────────────────────── */
.calibers-header {
  padding: 96px 0 32px;
  border-bottom: 0.5px solid var(--border);
}

.calibers-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.calibers-sub {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.breadcrumb {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb:hover { color: var(--text); }

/* ── FILTER BAR ─────────────────────────────────────────────────────── */
.filter-bar {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: rgba(7,7,26,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 12px 0;
}

.filter-row-1 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s;
}
.search-wrap:focus-within { border-color: rgba(255,212,59,0.35); }

.search-input-line {
  display: flex;
  align-items: center;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
  flex-shrink: 0;
}

#search {
  width: 100%;
  background: none;
  border: none;
  border-radius: 0;
  padding: 9px 36px 9px 34px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
}
#search::placeholder { color: var(--dim); }

.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.compare-btn {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.compare-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.filter-row-2 {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.chip-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip-group::-webkit-scrollbar { display: none; }

.chip-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--dim);
  margin-right: 2px;
  white-space: nowrap;
}

.chip {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.5px;
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--muted);
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.chip.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 700;
}

.db-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.result-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.db-sep {
  color: var(--dim);
  font-size: 10px;
}

.db-action-btn {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: color 0.15s;
}
.db-action-btn:hover { color: var(--muted); }

/* ── COMPARE BANNER ─────────────────────────────────────────────────── */
.compare-banner {
  background: rgba(255,212,59,0.06);
  border-bottom: 0.5px solid rgba(255,212,59,0.2);
  padding: 8px 0;
}

.compare-banner .container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compare-banner span {
  font-family: var(--mono);
  font-size: 11px;
}

#compare-count { color: var(--accent); font-weight: 700; }
.compare-hint { color: var(--muted); }

.compare-go {
  padding: 7px 16px !important;
  font-size: 10px !important;
  margin-left: auto;
}
.compare-go:disabled {
  opacity: 0.4;
  cursor: default;
}

.compare-cancel {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ── MAIN BODY LAYOUT ───────────────────────────────────────────────── */
.calibers-body {
  padding: 0 0 80px;
}

/* ── TABLE ──────────────────────────────────────────────────────────── */
.table-wrap {
  min-height: 400px;
}

.caliber-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
}

.caliber-table thead {
  position: sticky;
  top: var(--thead-top, 156px);
  z-index: 45;
}

.caliber-table thead tr {
  border-bottom: 0.5px solid var(--border);
}

.caliber-table th {
  background: rgba(7,7,26,0.97);
  backdrop-filter: blur(8px);

  padding: 10px 14px;
  text-align: left;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
th.sortable:hover { color: var(--text); }
th.sortable.sort-asc .sort-arrow::after  { content: '↑'; color: var(--accent); }
th.sortable.sort-desc .sort-arrow::after { content: '↓'; color: var(--accent); }
th.sortable.sort-asc .sort-arrow,
th.sortable.sort-desc .sort-arrow { color: transparent; }

.sort-arrow { opacity: 0.4; font-size: 9px; }

.caliber-table tbody tr {
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.1s;
}
.caliber-table tbody tr:hover    { background: rgba(255,255,255,0.03); }
.caliber-table tbody tr.active   { background: rgba(255,212,59,0.06); }
.caliber-table tbody tr.compare-selected { background: rgba(255,212,59,0.04); }

.caliber-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.col-name   { min-width: 160px; }
.col-type   { min-width: 72px; }
.col-year   { min-width: 56px; }
.col-dia    { min-width: 72px; }
.col-grains { min-width: 110px; }
.col-vel    { min-width: 100px; }
.col-energy { min-width: 100px; }
.col-military { min-width: 64px; }
.col-avail  { min-width: 80px; }

.td-name {
  font-weight: 700;
  color: #fff;
  font-size: 12px;
}
.td-alt {
  display: block;
  font-size: 9px;
  color: var(--dim);
  margin-top: 2px;
  font-weight: 400;
}

.td-type {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.5px;
}

.td-number { color: var(--text); }

.td-grains {
  color: var(--muted);
  font-size: 10px;
}

.td-vel, .td-energy {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.badge-military {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255,212,59,0.1);
  border: 0.5px solid rgba(255,212,59,0.25);
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.badge-avail {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.avail-abundant { background: rgba(46,204,113,0.1);  color: #2ecc71; border: 0.5px solid rgba(46,204,113,0.2); }
.avail-common   { background: rgba(52,152,219,0.1);  color: #3498db; border: 0.5px solid rgba(52,152,219,0.2); }
.avail-limited  { background: rgba(255,212,59,0.1);  color: var(--accent); border: 0.5px solid rgba(255,212,59,0.2); }
.avail-scarce   { background: rgba(231,76,60,0.1);   color: #e74c3c; border: 0.5px solid rgba(231,76,60,0.2); }

.compare-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
  transition: background 0.1s, border-color 0.1s;
  vertical-align: middle;
}
.compare-checkbox.checked {
  background: var(--accent);
  border-color: var(--accent);
}
.compare-checkbox.checked::after {
  content: '✓';
  font-size: 9px;
  color: var(--bg);
  font-weight: 900;
}

.table-empty {
  padding: 60px 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

/* ── DETAIL BACKDROP ────────────────────────────────────────────────── */
.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.detail-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ── DETAIL DRAWER ───────────────────────────────────────────────────── */
.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  max-width: 760px;
  min-width: 360px;
  z-index: 100;
  background: var(--bg);
  border-left: 0.5px solid var(--border);
  box-shadow: -24px 0 60px rgba(0,0,0,0.45);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-panel.open {
  transform: translateX(0);
}

.detail-overlay-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7,7,26,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}
.detail-back:hover { color: var(--text); }

.detail-inner {
  padding: 28px 24px 80px;
}

.detail-name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.2;
}

.detail-alt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 16px;
}

.detail-meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.detail-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 28px;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

.detail-section {
  margin-bottom: 28px;
}

.detail-section-title {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.spec-item {
  background: rgba(255,255,255,0.02);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}

.spec-label {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--dim);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.spec-value {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.spec-value.accent { color: var(--accent); }

.detail-history {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.mil-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mil-item {
  background: rgba(255,212,59,0.04);
  border: 0.5px solid rgba(255,212,59,0.15);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  padding: 10px 14px;
}

.mil-country {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.mil-years {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  margin-bottom: 4px;
}

.mil-conflicts {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.firearms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.firearm-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 10px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

.detail-trivia {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  font-style: italic;
  background: rgba(255,255,255,0.02);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
}

/* ── COMPARISON MODAL ───────────────────────────────────────────────── */
.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 16px;
  overflow-y: auto;
}

.compare-modal-inner {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
}

.compare-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
}

#compare-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.compare-scroll { overflow-x: auto; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
  min-width: 500px;
}

.compare-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
  background: rgba(255,255,255,0.02);
  min-width: 160px;
}

.compare-table th:first-child {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--dim);
  min-width: 120px;
}

.compare-table td {
  padding: 10px 16px;
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
  border-right: 0.5px solid var(--border);
  color: var(--muted);
  vertical-align: top;
}

.compare-table td:first-child {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--dim);
  font-weight: 700;
  background: rgba(255,255,255,0.01);
  text-transform: uppercase;
}

.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:last-child,
.compare-table th:last-child { border-right: none; }

/* ── FORM MODALS ─────────────────────────────────────────────────────── */
.form-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.form-modal-inner {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.form-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
}

.form-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.form-modal-body {
  padding: 20px 20px 24px;
}

.form-modal-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: rgba(255,212,59,0.4); }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--dim); }

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-field select option {
  background: var(--surface);
  color: var(--text);
}

.form-field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.req { color: var(--accent); }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.form-cancel {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.15s;
}
.form-cancel:hover { color: var(--text); }

.form-success {
  text-align: center;
  padding: 32px 20px;
}

.form-success-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(46,204,113,0.15);
  border: 0.5px solid rgba(46,204,113,0.3);
  color: #2ecc71;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.form-success p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

/* ── COLUMN HELP BUTTON ─────────────────────────────────────────────── */
.col-help {
  background: none;
  border: none;
  color: #fff;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0 0 4px;
  vertical-align: super;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.col-help:hover { opacity: 1; }

/* ── HELP POPOVER ───────────────────────────────────────────────────── */
.help-popover {
  position: fixed;
  z-index: 500;
  background: #12142a;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  display: none;
}
.help-popover.open { display: block; }
.help-popover-title {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.help-popover-body {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
}

/* ── INLINE CTA ─────────────────────────────────────────────────────── */
.calibers-cta {
  background: var(--bg2);
  border-top: 0.5px solid var(--border);
  padding: 56px 0;
}

.cta-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.cta-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-content p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 400px;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* Full-screen drawer on mobile */
  .detail-panel {
    width: 100%;
    min-width: unset;
    max-width: unset;
    border-left: none;
    box-shadow: none;
  }


  .filter-row-2 { gap: 8px; }
  .chip-group { gap: 3px; }
  .chip { padding: 3px 8px; font-size: 8px; }
  .compare-btn { padding: 9px 10px; font-size: 9px; }
  .db-sep { display: none; }
  .db-actions { gap: 8px; }

  .col-grains, .col-energy, .col-military { display: none; }

  .cta-content { grid-template-columns: 1fr; }
  .email-capture { flex-direction: column; }
  .email-input, .btn-primary { width: 100%; }

  .form-modal { align-items: flex-end; padding: 0; }
  .form-modal-inner { border-radius: 16px 16px 0 0; max-width: 100%; }
}

@media (max-width: 520px) {
  .col-dia { display: none; }
  .result-count { display: none; }
}

@media (max-width: 420px) {
  .col-year { display: none; }
  .db-action-btn { font-size: 8px; }
}

/* ── ZEBRA STRIPING ─────────────────────────────────────────────────── */
.caliber-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.025);
}

/* ── CHIP COUNT BADGE ───────────────────────────────────────────────── */
.chip-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 8px;
  opacity: 0.55;
  font-weight: 400;
}
.chip.active .chip-count {
  opacity: 0.75;
}

/* ── AVAILABILITY LEGEND ────────────────────────────────────────────── */
.avail-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.avail-legend-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.8px;
  color: var(--dim);
  margin-right: 2px;
  white-space: nowrap;
}
.avail-legend .badge-avail {
  font-size: 7px;
  padding: 2px 5px;
}
@media (max-width: 960px) {
  .avail-legend { display: none; }
}

/* ── COLUMN CHOOSER ─────────────────────────────────────────────────── */
.col-chooser-btn {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.col-chooser-btn.active {
  border-color: rgba(255,212,59,0.4);
  color: var(--text);
}

.col-chooser-popover {
  position: fixed;
  z-index: 500;
  background: #12142a;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 190px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  display: none;
}
.col-chooser-popover.open { display: block; }

.col-chooser-title {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.col-chooser-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  transition: color 0.12s;
  user-select: none;
}
.col-chooser-item:hover { color: var(--text); }
.col-chooser-item input[type="checkbox"] {
  width: 12px;
  height: 12px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── SEARCH HIGHLIGHT ───────────────────────────────────────────────── */
mark.search-hl {
  background: rgba(255,212,59,0.25);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}

/* ── COLUMN VISIBILITY (column chooser) ─────────────────────────────── */
.col-hidden-type    .col-type    { display: none; }
.col-hidden-year    .col-year    { display: none; }
.col-hidden-dia     .col-dia     { display: none; }
.col-hidden-grains  .col-grains  { display: none; }
.col-hidden-vel     .col-vel     { display: none; }
.col-hidden-energy  .col-energy  { display: none; }
.col-hidden-military .col-military { display: none; }
.col-hidden-avail   .col-avail   { display: none; }

/* ── DETAIL FULL-PAGE LINK ──────────────────────────────────────────── */
.detail-page-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.3px;
  padding: 4px 10px;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.detail-page-link:hover {
  color: var(--accent);
  border-color: rgba(255,212,59,0.3);
}
