/* ---------------- detail page ---------------- */
.detail-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dim);
  font-size: 12px;
  padding: 4px 0;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 12px; height: 12px; }

.detail-head {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  position: relative;
}
.detail-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 2px;
  background: var(--accent-tier, var(--text-faint));
  border-radius: 1px;
}
.detail-head[data-tier="0"] { --accent-tier: var(--tier-0); }
.detail-head[data-tier="1"] { --accent-tier: var(--tier-1); }
.detail-head[data-tier="2"] { --accent-tier: var(--tier-2); }
.detail-head[data-tier="3"] { --accent-tier: var(--tier-3); }
.detail-head[data-tier="safe"] { --accent-tier: var(--tier-safe); }
.detail-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.15;
}
.detail-head .one-liner {
  color: var(--text-dim);
  margin: 0 0 14px;
  max-width: 64ch;
  font-size: 13.5px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.section h3 {
  font-size: 10.5px;
  color: var(--text-faint);
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.section p { color: var(--text-dim); margin: 0; font-size: 12.5px; }
.section.dev { opacity: 0.7; border: 1px dashed var(--border); padding: 10px; border-radius: var(--radius-sm); }

.need-get-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .need-get-row { grid-template-columns: 1fr; }
}
.need-get-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px 12px;
}
.need-get-panel h3 {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.need-get-panel h3 .accent {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}
.need-get-panel.get h3 .accent { background: var(--tier-1); }
.need-get-panel.need h3 .accent { background: var(--tier-2); }
.need-get-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.need-get-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.need-get-item .name { font-size: 13px; color: var(--text); }
.need-get-item .notes { color: var(--text-dim); font-size: 12px; line-height: 1.4; }

.loot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.loot-table th, .loot-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.loot-table th { color: var(--text-faint); font-weight: 400; font-size: 10.5px; }
.loot-table td.qty {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  width: 80px;
  white-space: nowrap;
}
.loot-table td.loc { color: var(--text-dim); }

.util-grid, .bring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}
.util-cell, .bring-cell {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  background: var(--surface);
}
.util-cell .top, .bring-cell .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 1px;
}
.util-cell .name, .bring-cell .name { font-size: 12.5px; color: var(--text); }
.util-cell .count { font-variant-numeric: tabular-nums; color: var(--text-faint); font-size: 11px; }
.util-cell .notes, .bring-cell .notes { color: var(--text-dim); font-size: 11.5px; line-height: 1.4; }

ol.steps {
  margin: 0;
  padding: 0;
  counter-reset: step;
  list-style: none;
}
ol.steps li {
  position: relative;
  padding: 6px 0 6px 28px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.5;
}
ol.steps li:last-child { border-bottom: none; }
ol.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

ul.tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
ul.tips li {
  position: relative;
  padding-left: 12px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
}
ul.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 3px;
  height: 3px;
  background: var(--text-faint);
  border-radius: 50%;
}

.pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pair-pill {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  transition: border-color 120ms ease, background 120ms ease;
}
.pair-pill:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

/* ---- new (2026) detail sections ---- */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px 12px;
  font-size: 12.5px;
}
.kv-grid > div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--border); }
.kv-grid .k { color: var(--text-faint); }
.kv-grid .v { color: var(--text); }

.raid-line {
  font-size: 12.5px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.raid-line:last-child { border-bottom: none; }

.minimap-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0 4px;
}

/* ---- calculator ---- */
.calc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-faint);
}
.calc-field select, .calc-field input[type="number"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--text);
  min-width: 220px;
}
.calc-field input[type="number"] { min-width: 80px; }
.calc-field.switch-field {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.calc-table td:first-child { white-space: nowrap; }
.calc-table tr.best-eco td { color: var(--tier-1); }
.calc-table tr.best-eco td.muted { color: color-mix(in srgb, var(--tier-1) 70%, var(--text-faint)); }
.eco-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--tier-1) 50%, var(--border));
  color: var(--tier-1);
  border-radius: 999px;
  vertical-align: middle;
}

/* ---- compare table ---- */
.cmp-table {
  margin-top: 18px;
}
.cmp-table th:first-child {
  width: 130px;
  color: var(--text-faint);
  font-weight: 400;
  text-align: right;
  padding-right: 14px;
}
.cmp-table thead th {
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  padding-bottom: 8px;
}
.cmp-row td {
  vertical-align: top;
  color: var(--text);
}
.muted-row td { color: var(--text-faint); }

/* ---- patches timeline ---- */
.patch-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.patch-entry {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
}
.patch-rail { display: flex; justify-content: center; padding-top: 4px; position: relative; }
.patch-rail::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: -20px;
  width: 1px;
  background: var(--border);
}
.patch-entry:last-child .patch-rail::before { display: none; }
.patch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  z-index: 1;
}
.patch-dot.current { background: var(--tier-1); border-color: var(--tier-1); }
.patch-body { padding: 0 0 10px; border-bottom: 1px solid var(--border); }
.patch-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 4px;
}
.patch-date {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.patch-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
}
