/* alchemyV55.css . adds theme-dark, keeps existing class names working */

/* Base light theme (fallback) */
:root {
  --bg: #0e1116;
  --bg-elev: #161a22;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --link: #7ab7ff;
  --link-hover: #a6ceff;
  --accent: #3b82f6;
  --border: #2a2f39;
  --row-alt: #12161d;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Explicit dark theme class used by the renderer */
body.theme-dark {
  --bg: #0e1116;
  --bg-elev: #161a22;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --link: #7ab7ff;
  --link-hover: #a6ceff;
  --accent: #60a5fa;
  --border: #2a2f39;
  --row-alt: #12161d;
  background: var(--bg);
  color: var(--text);
}

.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 18px 60px;
}

/* Typography */
h1, h2, h3, h4 { color: var(--text); margin: 0 0 10px; }
.mega-title { font-size: 28px; font-weight: 700; letter-spacing: .2px; }

/* Links */
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a.unstyled-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--border); }
a.unstyled-link:hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }

/* Sections */
.section { margin: 18px 0 24px; padding: 16px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; }

/* Hero */
.hero .lead { color: var(--muted); display: flex; gap: 16px; align-items: flex-start; }
.hero .lead img { max-height: 220px; border-radius: 8px; border: 1px solid var(--border); }

/* Facts */
.facts2 { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 10px 16px; }
.facts2 .fact { display: contents; }
.facts2 .k { color: var(--muted); }
.facts2 .v { color: var(--text); }

/* Tables */
table { width: 100%; border-collapse: collapse; border-spacing: 0; }
table.sortable thead th {
  background: var(--bg-elev);
  position: sticky; top: 0;
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
table.sortable tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
table.sortable tbody tr:nth-child(2n) { background: var(--row-alt); }
.sort-indicator { opacity: .45; font-size: 12px; }

/* Attribute links */
a.attr-link { color: var(--link); }
a.attr-link:hover { color: var(--link-hover); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gallery img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }

/* Footer */
.footer { margin-top: 28px; color: var(--muted); text-align: center; font-size: 13px; }

