/* ─── CSS VARIABLES ─── */
:root {
  --bg: #0a0b0f;
  --bg2: #0f1117;
  --bg3: #161820;
  --bg4: #1c1e28;
  --border: #2a2d3e;
  --border-bright: #3d4060;
  --gold: #c8a96e;
  --gold-dim: #8a7248;
  --gold-glow: rgba(200,169,110,0.12);
  --purple: #7b5ea7;
  --purple-bright: #a37dd4;
  --purple-glow: rgba(123,94,167,0.2);
  --red: #c05050;
  --red-bright: #e06060;
  --cyan: #4abfcf;
  --cyan-dim: #2d8090;
  --text: #c8cad8;
  --text-dim: #7a7d94;
  --text-bright: #e8eaf5;
  --white: #f0f2ff;
}

/* ─── RESET & BASE ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 20px;
  line-height: 1.65;
  min-height: 100vh;
}

/* ─── BACKGROUND TEXTURE ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(123,94,167,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(200,169,110,0.04) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.012) 39px, rgba(255,255,255,0.012) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.008) 39px, rgba(255,255,255,0.008) 40px);
  pointer-events: none;
  z-index: 0;
}

/* ─── LAYOUT ─── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ─── NAV ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,11,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-nav a.logo {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-nav a.logo span { color: var(--text-dim); font-weight: 400; }

.toc-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.toc-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}
.toc-nav a:hover { color: var(--gold); background: var(--gold-glow); }

/* ─── SIDE NAV ─── */
.side-nav {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  align-items: stretch;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.4));
}
.side-nav-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  width: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 16px;
  padding: 0;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.side-nav-toggle:hover { background: var(--bg4); color: var(--gold); }
.side-nav-inner {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
  border-right: none;
  padding: 16px 14px;
  width: 220px;
  max-height: 80vh;
  overflow-y: auto;
  transition: width 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}
.side-nav.collapsed .side-nav-inner {
  width: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
}
.side-nav.collapsed .side-nav-arrow { transform: rotate(180deg); }
.side-nav-arrow { display: inline-block; transition: transform 0.25s ease; }
.side-nav-title {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.side-nav-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}
.side-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-nav-link {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-nav-link:hover { color: var(--text-bright); background: var(--bg4); }
.side-nav-link.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: var(--gold-glow);
}
.side-nav-top {
  font-size: 13px;
  color: var(--text-dim);
}

@media (max-width: 1300px) {
  .side-nav { display: none; }
}

/* ─── HERO ─── */
.hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 36px;
}
.hero-img {
  width: auto;
  height: 320px;
  object-fit: cover;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(123,94,167,0.35));
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(123,94,167,0.35)); }
  50% { filter: drop-shadow(0 0 20px rgba(163,125,212,0.55)); }
}
.hero-text { flex: 1; }
.hero-class {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 0 40px rgba(200,169,110,0.3);
}
.hero-subtitle {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 16px;
}
.hero-meta .label {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 1px;
}
.hero-meta .value { color: var(--text-bright); font-weight: 600; }
.hero-builds {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.build-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 14px;
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--purple-bright);
  cursor: pointer;
  transition: all 0.15s;
}
.build-badge:hover, .build-badge.active {
  background: var(--purple-glow);
  border-color: var(--purple);
  color: var(--white);
}
.hero-note {
  font-size: 17px;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.55;
  border-left: 2px solid var(--border-bright);
  padding-left: 14px;
  max-width: 600px;
}
.hero-note a { color: var(--gold-dim); }

/* ─── SECTIONS ─── */
.section {
  padding: 40px 0 0;
  scroll-margin-top: 60px;
}
.section + .section { border-top: 1px solid var(--border); margin-top: 40px; }

h2 {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-bright), transparent);
}
h3 {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: 0.08em;
  margin: 18px 0 10px;
}

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 18px;
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-bright); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── IDENTITY CARDS ─── */
.identity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.identity-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}
.identity-card h4 {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--purple-bright);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.identity-card p { font-size: 16.5px; color: var(--text); line-height: 1.6; }
.identity-card strong { color: var(--text-bright); }

/* ─── SYNERGY BOX ─── */
.synergy-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.synergy-header {
  background: var(--bg4);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.synergy-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.synergy-icon img {
  max-width: min(256px, 100%);
  max-height: min(256px, 100%);
  width: auto;
  height: auto;
  display: block;
}
.synergy-header .synergy-label {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
}
.synergy-header .synergy-type {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.synergy-desc {
  padding: 12px 16px;
  font-size: 18px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  font-style: italic;
}
.synergy-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
}
.synergy-skill {
  background: var(--bg3);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17.5px;
}
.skill-icon-sm {
  width: 36px;
  height: 36px;
  background: var(--bg4);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.skill-icon-sm img {
  max-width: min(256px, 100%);
  max-height: min(256px, 100%);
  width: auto;
  height: auto;
  display: block;
}
.synergy-skill span { color: var(--text); }
.synergy-skill .dur { color: var(--text-dim); font-size: 16px; margin-left: 4px; }

/* ─── ARK PASSIVES ─── */
.ark-passives-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  overflow: hidden;
}
.ark-passive-header {
  text-align: center;
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 8px;
}
.ark-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}
.ark-col h4 {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  color: var(--text-bright);
  margin-bottom: 8px;
  text-align: center;
}

/* ─── ARK GRID CORES ─── */
.core-tabs {
  display: flex;
  gap: 0;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
}
.core-tab {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
}
.core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 28px;
  align-items: start;
  justify-items: center;
}
.core-col { min-width: 120px; }
.core-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.core-icon {
  width: 76px; height: 76px; background: var(--bg4); border-radius: 8px; display:flex; align-items:center; justify-content:center; overflow:hidden; border:1px solid var(--border-bright);
}
.core-icon img { width: 76px; height:76px; object-fit:cover; display:block; }
.core-label { font-size: 17px; color: var(--text-dim); text-align:center; max-width:160px; }

/* keep at least 3 columns until very narrow screens */
@media (max-width: 480px) {
  .core-grid { grid-template-columns: 1fr; }
}
.ark-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.ark-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  background: var(--bg4);
}
.ark-item .label {
  font-size: 16px;
  color: var(--text-dim);
  text-align: center;
}
.ark-item .small { font-size: 16px; color: var(--text-dim); }

.evo-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.evo-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}
.evo-row .ark-item { flex: 1; min-width: 0; }
.evo-row.single { justify-content: center; }
.evo-row.single .ark-item { flex: 0 0 auto; }

/* ─── BUILD COMPARE ─── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.compare-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.compare-header {
  background: var(--bg4);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.compare-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.compare-avatar.ne { background: linear-gradient(135deg, #1a2a4a, #2a4a8a); }
.compare-avatar.fmh { background: linear-gradient(135deg, #3a1a3a, #7a3a7a); }
.compare-header h3 { margin: 0; font-size: 15px; }
.compare-body { padding: 16px; }
.compare-summary {
  font-size: 16px;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 14px;
  border-left: 2px solid var(--border-bright);
  padding-left: 10px;
}
.pros-cons { display: flex; gap: 12px; }
.pc-col { flex: 1; }
.pc-label {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-block;
}
.pc-label.pros { color: #5caa7a; background: rgba(92,170,122,0.1); }
.pc-label.cons { color: var(--red-bright); background: rgba(192,80,80,0.1); }
.pc-list { list-style: none; }
.pc-list li {
  font-size: 15.5px;
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}
.pc-list li::before { position: absolute; left: 0; }
.pros .pc-list li::before { content: '+'; color: #5caa7a; font-weight: 700; }
.cons .pc-list li::before { content: '−'; color: var(--red-bright); font-weight: 700; }

/* ─── SKILL CARDS ─── */
.skill-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  transition: border-color 0.15s;
}
.skill-card { position: relative; }
.skill-card:hover { border-color: var(--border-bright); }
.skill-card + .skill-card { margin-top: 10px; }
.skill-img-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.skill-img {
  width: 60px;
  height: 60px;
  background: var(--bg4);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  position: relative;
  overflow: hidden;
}
.skill-img.large,
.skill-img.skill-img-large {
  width: 80px;
  height: 80px;
}
.skill-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.skill-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,94,167,0.15), transparent 60%);
}
.skill-level {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.skill-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* reserve space on the right so absolutely-positioned runes don't overlap text */
.skill-right { padding-right: 300px; min-width: 0; }

.skill-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.skill-name {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  min-width: 0; /* allow truncation when space is tight */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skill-runes {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  width: auto;
  max-width: 240px; /* keep rune block constrained so it doesn't push past card */
  position: absolute;
  right: 16px;
  top: 16px;
}
.rune {
  width: auto;
  height: 42px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.rune img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rune.with-label,
.rune.rune-with-label,
.rune-with-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  max-width: 240px;
  overflow: visible;
}
.rune.with-label img,
.rune.rune-with-label img,
.rune-with-label img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  display: block;
}
.rune.with-label span,
.rune.rune-with-label span,
.rune-with-label span {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--text);
  display: inline-block;
  max-width: 180px;
  overflow: visible;
  text-overflow: initial;
  white-space: normal;
}
.skill-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tag {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag-damage  { color: var(--red-bright);     border-color: rgba(192,80,80,0.4);   background: rgba(192,80,80,0.07); }
.tag-synergy { color: var(--cyan);           border-color: rgba(74,191,207,0.4);  background: rgba(74,191,207,0.07); }
.tag-meter   { color: var(--purple-bright);  border-color: rgba(163,125,212,0.4); background: rgba(163,125,212,0.07); }
.tag-counter { color: var(--gold);           border-color: rgba(200,169,110,0.4); background: rgba(200,169,110,0.07); }
.tag-utility { color: #5caa7a;              border-color: rgba(92,170,122,0.4);  background: rgba(92,170,122,0.07); }
.skill-tripods {
  font-size: 17px;
  color: var(--text-dim);
}
.skill-tripods li { list-style: none; padding-left: 14px; position: relative; }
.skill-tripods li::before { content: '▸'; position: absolute; left: 0; color: var(--gold-dim); font-size: 12px; top: 2px; }

/* ─── DATA TABLE ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.data-table th {
  background: var(--bg4);
  color: var(--text-dim);
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table td strong { color: var(--text-bright); }
.data-table td code {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  background: var(--bg4);
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--cyan);
}

/* ─── GEM PRIORITY ─── */
.gem-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.gem-type {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.gem-dmg { background: radial-gradient(circle, #d4401a, #8a1f0a); color: #fff; border: 2px solid #e05030; }
.gem-cdr { background: radial-gradient(circle, #1a6ab4, #0a3060); color: #fff; border: 2px solid #2a90e0; }
.gem-arr {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--text-dim);
}

/* Gems section card layout */
.gems-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.gem-card { display: flex; align-items: center; gap: 18px; padding: 14px; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
.gem-left { display: flex; align-items: center; gap: 12px; min-width: 170px; }
.gem-type { width: 76px; height: 76px; border-radius: 8px; background: var(--bg4); border: 1px solid var(--border-bright); overflow: hidden; display: flex; align-items:center; justify-content:center; }
.gem-type img { width: 68px; height: 68px; object-fit: cover; display:block; }
.gem-title { font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif; font-size: 14px; color: var(--text-bright); text-transform: uppercase; letter-spacing: 0.12em; }
.gem-icons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.skill-icon { width: 56px; height: 56px; background: var(--bg3); border-radius: 8px; display:flex; align-items:center; justify-content:center; border: 1px solid var(--border-bright); overflow:hidden; }
.skill-icon img { width: 100%; height: 100%; object-fit: cover; display:block; }

@media (max-width: 700px) {
  .gem-left { min-width: 120px; }
  .gem-type { width: 60px; height: 60px; }
  .gem-type img { width: 52px; height: 52px; }
  .skill-icon { width: 48px; height: 48px; }
}
.gem-skill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 12px;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
}
.gem-skill.priority-1 { border-color: var(--gold-dim); color: var(--gold); }
.gem-skill.priority-2 { border-color: var(--purple); color: var(--purple-bright); }

/* ─── DPS DISTRIBUTION ─── */
.dps-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.dps-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 20px;
}
.dps-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-dim);
}
.dps-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dps-charts {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
}
.dps-donut-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}
.dps-bar-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
  height: 280px;
}
.dps-note {
  font-size: 15px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 16px;
}

/* ─── ROTATION CARDS ─── */
.rotation-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rotation-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}
.rotation-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  max-width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding-right: 20px;
}
.rotation-phase {
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rotation-desc {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.5;
}
.rotation-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.rot-sep {
  font-family: 'Fira Code', monospace;
  font-size: 18px;
  color: var(--border-bright);
}
.skill-icon.rot-highlight {
  border-color: var(--gold-dim);
  box-shadow: 0 0 8px rgba(200,169,110,0.25);
}

@media (max-width: 768px) {
  .rotation-card { flex-direction: column; align-items: flex-start; }
  .rotation-left { max-width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; }
}

/* ─── RESOURCES ─── */
.resources-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.resource-link {
  font-family: 'Fira Code', monospace;
  font-size: 15px;
  color: var(--cyan-dim);
  text-decoration: none;
  padding: 2px 0;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.resource-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan-dim);
}
.resource-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.resource-note {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text-dim);
}
.resource-note a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border-bright);
  transition: color 0.15s, border-color 0.15s;
}
.resource-note a:hover {
  color: var(--text-bright);
  border-bottom-color: var(--text-dim);
}

/* ─── NOTE BOX ─── */
.note-box {
  background: rgba(200,169,110,0.06);
  border: 1px solid var(--gold-dim);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  margin-top: 14px;
}
.note-box strong { color: var(--gold); }
.note-box ul { list-style: none; padding: 0; }
.note-box ul li { padding: 2px 0 2px 16px; position: relative; }
.note-box ul li::before { content: '•'; position: absolute; left: 4px; color: var(--gold-dim); }

/* ─── FAQ ─── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  background: var(--bg3);
  padding: 14px 18px;
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  color: var(--text-bright);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: background 0.15s;
}
.faq-q:hover { background: var(--bg4); }
.faq-arrow { color: var(--gold-dim); transition: transform 0.25s; font-size: 12px; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 14px 18px;
  font-size: 16.5px;
  color: var(--text);
  line-height: 1.65;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.faq-item.open .faq-a { display: block; }

/* ─── ENGRAVING PILLS ─── */
.engraving-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.engraving-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 18px;
  color: var(--text);
  transition: border-color 0.15s;
}
.engraving-pill:hover { border-color: var(--purple); }
.engraving-pill .e-icon {
  width: 76px;
  height: 76px;
  background: var(--bg4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.engraving-pill .e-icon img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  display: block;
}
.engraving-pill.core { border-color: var(--gold-dim); }
.engraving-pill.core .e-icon { background: linear-gradient(135deg, var(--bg4), rgba(200,169,110,0.1)); }

/* ─── ROTATION ─── */
.rotation-sequence {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.rot-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.rot-icon {
  width: 44px;
  height: 44px;
  background: var(--bg4);
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.rot-icon.highlight { border-color: var(--gold-dim); background: rgba(200,169,110,0.08); }
.rot-icon.purple    { border-color: var(--purple);   background: rgba(123,94,167,0.1); }
.rot-label {
  font-size: 10px;
  font-family: 'Fira Code', monospace;
  color: var(--text-dim);
  text-align: center;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rot-arrow { color: var(--text-dim); font-size: 14px; margin-top: -12px; }

/* ─── PILL NAV ─── */
.pill-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}
.pill-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'Jost Variable', Jost, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.06em;
}
.pill-btn:hover, .pill-btn.active {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* Panels used by pill-nav (e.g. Ark Passives) */
.ark-panel-group { display: none; }
.ark-panel-group.active { display: block; }

/* ─── ORNAMENT ─── */
.ornament {
  text-align: center;
  color: var(--border-bright);
  font-size: 12px;
  letter-spacing: 0.5em;
  margin: 8px 0 0;
}

/* ─── FOOTER ─── */
.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a {
  text-decoration: none;
}
.site-footer .back-top {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--text-dim);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hero-inner    { flex-direction: column; }
  .hero-img-placeholder { width: 100%; height: 160px; }
  .identity-grid { grid-template-columns: 1fr; }
  .compare-grid  { grid-template-columns: 1fr; }
  .toc-nav       { display: none; }
  .skill-card    { grid-template-columns: 1fr; }
  .skill-right   { padding-right: 0; }
  .skill-runes   { position: static; align-items: flex-start; margin-top: 8px; }
  .rune.with-label span { max-width: none; white-space: normal; }
}