/* ═══════════════════════════════════════════════════════
   TBC Reputation Calculator — WoW Dark Fantasy Theme
   ═══════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────── */
:root {
  --gold:         #C8A96E;
  --gold-bright:  #F0C040;
  --gold-dim:     rgba(200, 169, 110, 0.55);
  --gold-border:  rgba(200, 169, 110, 0.28);
  --gold-glow:    rgba(200, 169, 110, 0.12);
  --gold-fill:    rgba(200, 169, 110, 0.08);

  --bg-deep:      #05070F;
  --bg-base:      #080C18;
  --bg-card:      rgba(8, 12, 28, 0.88);
  --bg-input:     rgba(4, 7, 18, 0.9);

  --text:         #B8C0D4;
  --text-bright:  #E4EAF8;
  --text-muted:   #5A6380;

  --border:       rgba(200, 169, 110, 0.2);
  --border-dim:   rgba(255, 255, 255, 0.055);

  --shadow:       0 8px 32px rgba(0, 0, 0, 0.65);
  --shadow-sm:    0 2px 12px rgba(0, 0, 0, 0.45);

  --green:        #4CAF50;
  --green-dim:    rgba(76, 175, 80, 0.35);
  --blue:         #5B8DD9;
  --blue-dim:     rgba(91, 141, 217, 0.35);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);

  /* WoW Shattrath City background — darkened for readability */
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg, rgba(5, 7, 15, 0.72) 0%, rgba(5, 7, 15, 0.60) 40%, rgba(5, 7, 15, 0.80) 100%),
    url('/shatt.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

/* ── Layout ─────────────────────────────────────────── */
#app {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.app-shell {
  display: grid;
  gap: 1.25rem;
}

/* ── Ornate Divider ──────────────────────────────── */
.ornate-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--gold-dim);
  font-size: 1rem;
  letter-spacing: 0.4em;
  -webkit-user-select: none;
  user-select: none;
}

.ornate-divider::before,
.ornate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border) 40%, var(--gold-border) 60%, transparent);
}

/* ── Hero Header ─────────────────────────────────── */
.hero {
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 40%),
    linear-gradient(145deg, rgba(14, 21, 53, 0.85) 0%, rgba(9, 13, 36, 0.80) 45%, rgba(17, 13, 42, 0.85) 100%);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

/* Top glow */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(200, 169, 110, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

/* Bottom fade */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

.eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.9rem);
  color: var(--gold-bright);
  text-shadow: 0 0 40px rgba(240, 192, 64, 0.45), 0 2px 6px rgba(0, 0, 0, 0.9);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.description {
  color: var(--text);
  font-style: italic;
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.page-links {
  margin: 0.75rem 0 0;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.page-links a {
  color: var(--gold);
  text-decoration: none;
}

.page-links a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

/* ── Faction Tabs ────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.4rem;
}

.tab-button {
  flex: 1;
  min-width: 130px;
  padding: 0.7rem 1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.tab-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.tab-icon {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1px solid var(--gold-border);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
  object-fit: cover;
  flex-shrink: 0;
}

.tab-button:hover {
  color: var(--gold);
  background: var(--gold-fill);
  border-color: var(--gold-border);
}

.tab-button.active {
  color: var(--gold-bright);
  background: linear-gradient(145deg, rgba(200, 169, 110, 0.18), rgba(200, 169, 110, 0.06));
  border-color: var(--gold-border);
  box-shadow: 0 0 18px rgba(200, 169, 110, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-shadow: 0 0 14px rgba(240, 192, 64, 0.5);
}

/* ── WoW Panel Cards ─────────────────────────────── */
.card {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.018) 0%, transparent 50%),
    var(--bg-card);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
}

/* Top edge highlight */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 169, 110, 0.45), transparent);
  border-radius: 999px;
}

/* ── Headings ────────────────────────────────────── */
h2 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 1.5rem 0 0.8rem;
}

/* ── Faction Info bar ────────────────────────────── */
.faction-info p {
  margin: 0.3rem 0;
  color: var(--text);
  font-size: 0.9rem;
}

.faction-info strong {
  color: var(--gold);
}

/* ── Input Grid ──────────────────────────────────── */
.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.38rem;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field-label .item-icon-sm {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid var(--gold-border);
  object-fit: cover;
}

input[type='number'],
input[type='text'],
select {
  width: 100%;
  padding: 0.58rem 0.75rem;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  color: var(--text-bright);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}

input[type='number']:focus,
input[type='text']:focus,
select:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.12);
}

input[type='number']:disabled,
input[type='text']:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23C8A96E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

/* ── Price input with suffix ─────────────────────── */
.price-wrap {
  position: relative;
}

.price-wrap input {
  padding-right: 2rem;
}

.price-suffix {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.coin-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
}

.price-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.prices-help {
  margin: -0.35rem 0 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Human Racial Toggle ─────────────────────────── */
.human-toggle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: rgba(200, 169, 110, 0.06);
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.18s, border-color 0.18s;
  grid-column: 1 / -1;
}

.human-toggle:hover {
  background: rgba(200, 169, 110, 0.11);
  border-color: rgba(200, 169, 110, 0.4);
}

.human-toggle input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--gold-bright);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.human-toggle-text strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.human-toggle-text small {
  font-family: Georgia, serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Rep Progress Bar ────────────────────────────── */
.rep-progress-wrap {
  margin-bottom: 1.25rem;
}

.rep-progress-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.38rem;
}

.rep-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-dim);
  background: rgba(0, 0, 0, 0.55);
  display: block;
}

.rep-progress-bar::-webkit-progress-bar {
  background: rgba(0, 0, 0, 0.55);
}

.rep-progress-bar::-webkit-progress-value {
  background: linear-gradient(90deg, #1A5C1A, #4CAF50, #90EE90);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.rep-progress-bar::-moz-progress-bar {
  background: linear-gradient(90deg, #1A5C1A, #4CAF50, #90EE90);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

/* ── Summary Stats Grid ──────────────────────────── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.summary-stat {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-dim);
  border-radius: 11px;
  padding: 0.8rem 1rem;
}

.summary-label {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.summary-value {
  margin: 0.28rem 0 0;
  font-family: 'Cinzel', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1;
}

.summary-value.is-gold {
  font-size: 1.25rem;
  text-shadow: 0 0 14px rgba(240, 192, 64, 0.2);
}

/* ── Shopping List Table ─────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 11px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead {
  background: rgba(200, 169, 110, 0.07);
}

th {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.75rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--gold-border);
  white-space: nowrap;
}

td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(200, 169, 110, 0.04);
}

.item-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 160px;
}

.item-cell img {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  border: 1px solid var(--gold-border);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.item-cell span {
  color: var(--text-bright);
  font-family: Georgia, serif;
  font-size: 0.88rem;
}

/* Phase badges */
.phase-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.phase-badge.pre {
  background: rgba(45, 107, 45, 0.22);
  color: #86CF86;
  border: 1px solid rgba(45, 107, 45, 0.45);
}

.phase-badge.post {
  background: rgba(77, 120, 201, 0.22);
  color: #8EB2E8;
  border: 1px solid rgba(77, 120, 201, 0.45);
}

.gold-val {
  color: var(--text-bright);
  font-weight: 600;
}

.currency {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.currency-gold {
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(240, 192, 64, 0.25);
}

.currency-silver {
  color: #c0c7d4;
  text-shadow: 0 0 8px rgba(192, 199, 212, 0.15);
}

.currency-coin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
  margin-right: 0.25rem;
}

.note {
  margin: 1rem 0 0;
  font-style: italic;
  font-size: 0.87rem;
  color: var(--text-muted);
}

.note strong {
  color: var(--gold);
  font-style: normal;
}

/* ── SEO text content / FAQ ───────────────────────── */
.seo-content p {
  margin: 0.5rem 0;
  color: var(--text);
}

.seo-content ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.seo-content li {
  margin: 0.45rem 0;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.faq-list article {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.faq-list h4 {
  margin: 0 0 0.35rem;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.faq-list p {
  margin: 0;
  color: var(--text);
}

/* ── Donation Footer ─────────────────────────────── */
.donation-footer {
  text-align: center;
  padding: 2rem 1rem 0.5rem;
  border-top: 1px solid var(--border);
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 1.6rem;
  background: linear-gradient(145deg, #6B4E1E, #8A6525);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  color: var(--gold-bright);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 20px rgba(200, 169, 110, 0.1);
}

.donate-btn:hover {
  background: linear-gradient(145deg, #8A6525, #A8801E);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 28px rgba(200, 169, 110, 0.18);
  transform: translateY(-2px);
}

.footer-sub {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
  #app {
    padding: 0.75rem 0.75rem 2.5rem;
  }

  h1 {
    font-size: 1.55rem;
  }

  .hero {
    padding: 1.75rem 1rem 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .tab-button {
    min-width: 90px;
    font-size: 0.7rem;
    padding: 0.6rem 0.65rem;
  }

  .summary-value {
    font-size: 1.15rem;
  }

  th, td {
    padding: 0.55rem 0.5rem;
  }
}

/* ═══════════════════════════════════════════════════════
   Site shell: tabs, hubs, tools, footer. Same theme as styles.css
   ═══════════════════════════════════════════════════════ */
.skip-link { position: absolute; left: -999px; top: 0; padding: 0.6rem 1rem; background: var(--bg-base); color: var(--gold-bright); z-index: 20; }
.skip-link:focus { left: 0; }

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(5, 7, 15, 0.94); border-bottom: 1px solid var(--gold-border); }
.site-bar { width: min(1280px, 100%); margin: 0 auto; padding: 0.45rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.site-brand { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 700; font-size: 0.95rem; color: var(--gold-bright); text-decoration: none; white-space: nowrap; }
.site-tabs { display: flex; gap: 0.15rem; overflow-x: auto; scrollbar-width: thin; min-width: 0; }
.site-tab { font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; color: #A9B0C6; text-decoration: none; padding: 0.6rem 0.65rem; border-radius: 8px; border: 1px solid transparent; white-space: nowrap; }
.site-tab:hover { color: var(--gold-bright); background: var(--gold-fill); }
.site-tab.active { color: var(--gold-bright); border-color: var(--gold-border); background: rgba(200, 169, 110, 0.14); }
a:focus-visible, button:focus-visible, .table-wrap:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

.page { width: min(1080px, 100%); margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.app-shell > * { min-width: 0; }
.crumbs { font-size: 0.82rem; color: #A9B0C6; }
.crumbs a { color: var(--gold); }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 0.75rem; }
.hub-card { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: 11px; background: rgba(0, 0, 0, 0.3); text-decoration: none; transition: border-color 0.18s, background 0.18s; }
.hub-card:hover { border-color: var(--gold-dim); background: var(--gold-fill); }
.hub-card img { width: 34px; height: 34px; border-radius: 5px; border: 1px solid var(--gold-border); object-fit: cover; flex-shrink: 0; }
.hub-card strong { display: block; font-family: 'Cinzel', serif; font-size: 0.82rem; color: var(--gold); }
.hub-card small { color: var(--text); font-size: 0.82rem; }

.prose p, .prose li { color: var(--text); }
.prose a, .checked a { color: var(--gold); }
.prose strong { color: var(--text-bright); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }
.faq-list h3 { margin: 0 0 0.35rem; color: var(--gold); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: none; }
.checked { font-size: 0.8rem; color: #A9B0C6; margin: 0; }

.coin-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.35rem; }
.coin-row input { min-width: 0; border-left-width: 3px; }
.coin-row .coin-gold { border-left-color: #F0C040; }
.coin-row .coin-silver { border-left-color: #C0C7D4; }
.coin-row .coin-copper { border-left-color: #C77B4A; }
.field-help { color: #A9B0C6; font-size: 0.76rem; }
.field-label { color: #A9B0C6; }
.input-grid > .human-toggle { grid-column: auto; }
.tool-results { margin-top: 1.25rem; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; grid-column: 1 / -1; }
.tool-actions.end { justify-content: flex-end; margin-top: 0.75rem; }
.tool-btn { font-family: 'Cinzel', serif; font-size: 0.76rem; font-weight: 700; color: var(--gold-bright); background: linear-gradient(145deg, #6B4E1E, #8A6525); border: 1px solid var(--gold-border); border-radius: 8px; padding: 0.65rem 1rem; cursor: pointer; }
.tool-btn.ghost { background: transparent; color: var(--gold); }
.tool-btn:hover { filter: brightness(1.15); }
.note, .footer-sub, .summary-label { color: #A9B0C6; }

.ad-slot { min-height: 280px; display: block; text-align: center; }

.site-footer { width: min(1080px, 100%); margin: 0 auto; padding: 0 1.25rem 2.5rem; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin: 1.25rem 0 0.75rem; }
.footer-links a { color: var(--gold); font-size: 0.85rem; padding: 0.35rem 0; }
.legal { font-size: 0.75rem; color: #A9B0C6; max-width: 640px; margin: 0 auto; }

@media (max-width: 640px) {
  .site-bar { flex-direction: column; align-items: stretch; gap: 0.2rem; padding: 0.4rem 0.75rem; }
  .page { padding: 0.75rem 0.75rem 1.5rem; }
  .site-tab { padding: 0.7rem 0.7rem; }
}

.site-badge { display: inline-block; margin-left: 0.55rem; padding: 0.15rem 0.45rem; border: 1px solid var(--gold-border); border-radius: 6px; font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.06em; color: var(--gold); vertical-align: middle; }

/* Coins and item pictures */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.money { white-space: nowrap; }
.money-part { position: relative; display: inline-flex; align-items: center; gap: 0.22rem; }
.money .currency-coin { margin-right: 0.1rem; }
.item-name { display: inline-flex; align-items: center; gap: 0.5rem; }
img.item-icon { width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--gold-border); vertical-align: middle; }
.prose img.shot { display: block; max-width: 100%; height: auto; margin: 1rem auto; border: 1px solid var(--gold-border); border-radius: 10px; }
.coin-row input { background-repeat: no-repeat; background-position: right 0.4rem center; background-size: 14px 14px; padding-right: 1.4rem; }
.coin-row .coin-gold { background-image: url(/currency/gold-coin.jpg); }
.coin-row .coin-silver { background-image: url(/currency/silver-coin.jpg); }
.coin-row .coin-copper { background-image: url(/currency/copper-coin.jpg); }
#tool .input-grid { align-items: start; }

/* Forever pages: our own Forever screenshot instead of Shattrath, once public/shots/forever-bg.jpg exists. */
body.forever {
  background-image:
    linear-gradient(180deg, rgba(5, 7, 15, 0.72) 0%, rgba(5, 7, 15, 0.60) 40%, rgba(5, 7, 15, 0.80) 100%),
    url('/shots/forever-bg.jpg');
}

/* Buttons for a short choice (pills fields), such as faction or region. */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.5rem; padding: 0.35rem 0.8rem; border: 1px solid var(--border); border-radius: 9px; background: rgba(0, 0, 0, 0.35); color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.pill img { width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--gold-border); }
.pill:hover { border-color: var(--gold-dim); }
.pill.on { border-color: var(--gold); background: var(--gold-fill); color: var(--gold); font-weight: 600; }
.pill:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Live data: a green "online" dot and when the data was read. */
.live-badge { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem; padding: 0.5rem 0.8rem; border: 1px solid rgba(74, 222, 128, 0.35); border-radius: 9px; background: rgba(34, 197, 94, 0.08); color: #b7f5c8; font-size: 0.85rem; }
.live-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.eyebrow-live { display: inline-flex; align-items: center; gap: 0.45rem; }


/* Sheets: tools with text boxes and a share link (public/tools/sheet.js) */
#tool .field.wide { grid-column: 1 / -1; }
#tool textarea { width: 100%; min-height: 9rem; padding: 0.6rem 0.75rem; font-family: Consolas, 'Courier New', monospace; font-size: 0.86rem; line-height: 1.45; color: var(--text-bright); background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; resize: vertical; box-sizing: border-box; }
#tool textarea:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.12); }
#tool .share-link { width: 100%; margin-top: 0.6rem; padding: 0.5rem 0.75rem; font-size: 0.78rem; color: var(--text-bright); background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; }
#tool td { overflow-wrap: break-word; }

/* Refresh button on live tools: the icon spins while it works. */
.refresh-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.refresh-icon { display: inline-block; font-size: 1.05rem; line-height: 1; }
.refresh-btn.spinning .refresh-icon { animation: refresh-spin 0.8s ease-in-out; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn.spinning .refresh-icon { animation: none; } }

/* Sidebar ad on wide screens: the page becomes content plus a 300 px column that stays in view. */
.ad-rail { display: none; }
@media (min-width: 1440px) {
  .page.has-rail { width: min(1404px, 100%); display: grid; grid-template-columns: minmax(0, 1040px) 300px; gap: 24px; justify-content: center; align-items: start; }
  .ad-rail { display: block; position: sticky; top: 5.5rem; width: 300px; height: 600px; }
}
