/* DeepARAM reference theme for pages embedded in the site (dashboard/, simulator/viewer/,
   tools/fun/, data/cook-builds/). Copy this into your page's stylesheet.
   Cool neutrals with a glacial blue accent; the prismatic gradient is the one flourish. */
@import url("/assets/fonts/fonts.css");

:root {
  color-scheme: light;
  --bg: #e7ebef;
  --surface: #f0f3f6;
  --raised: #e0e5eb;
  --fg: #1f252e;
  --muted: #525b68;
  --line: #d3dae2;
  --hover: #e3e8ee;
  --accent: #09659d;
  --accent-ink: #ffffff;
  --accent-soft: #d6e6f1;
  --good: #197048;
  --bad: #a83831;
  --gold: #80601a;
  --silver: #59626e;
  --prismatic: linear-gradient(100deg, #9fe7ff, #c9b8ff 40%, #ffb8e0 70%, #ffe2a3);
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 14px;
  --r-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #090b0f; --surface: #11151c; --raised: #181d26; --fg: #e8ecf2; --muted: #8b94a3; --line: #222936;
    --hover: #181d26; --accent: #5cc0ff; --accent-ink: #04121c; --accent-soft: #0f2533;
    --good: #4cc98b; --bad: #f0776f; --gold: #e0b45c; --silver: #a3adbb;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090b0f; --surface: #11151c; --raised: #181d26; --fg: #e8ecf2; --muted: #8b94a3; --line: #222936;
  --hover: #181d26; --accent: #5cc0ff; --accent-ink: #04121c; --accent-soft: #0f2533;
  --good: #4cc98b; --bad: #f0776f; --gold: #e0b45c; --silver: #a3adbb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }

/* Headings: mono eyebrow above a display-font heading. */
.eyebrow { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h1, h2.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: 0.95rem; font-weight: 600; }

/* Cards: white (or raised dark) surfaces, 1px line, 14px radius, no shadow. */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.15rem; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; }
.card-head a { font-size: 13px; }

/* Pills: segmented tabs, chips and tier badges. */
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--raised); border: 1px solid var(--line); border-radius: 999px; }
.segmented button { border: 0; background: none; color: var(--muted); font: 500 14px var(--sans); padding: 0.35rem 0.9rem; border-radius: 999px; cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.chip { display: inline-block; font: 500 11px/1 var(--mono); padding: 0.3rem 0.55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tier-prismatic { background: var(--prismatic); border-color: transparent; color: #1b1630; }
.tier-gold { color: var(--gold); border-color: var(--gold-edge); }
.tier-silver { color: var(--silver); }
.buff { color: var(--good); } .nerf { color: var(--bad); }

/* Inputs and buttons. */
input, select { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.5rem 0.75rem; }
input:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn { font: 500 14px var(--sans); border: 0; border-radius: 999px; padding: 0.5rem 1rem; background: var(--accent); color: var(--accent-ink); cursor: pointer; }

/* Tables: inside a bordered card, mono uppercase headers, tabular numbers. */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font: 500 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); }
td { padding: 0.55rem 0.9rem; border-top: 1px solid var(--line); }
tr:first-child td { border-top: 0; }
tbody tr:hover { background: var(--hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }

/* Meters: a thin accent bar for win rates and damage. */
.meter { height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* ---- Mayhem Info ---- */
main { padding: 16px; display: grid; gap: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nav { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.panel { display: grid; gap: 1rem; }
.panel[hidden] { display: none; }
.hero { width: 100%; border-radius: var(--r); display: block; aspect-ratio: 900 / 323; object-fit: cover; background: #1b1630; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.facts { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fact .value { font: 600 1.6rem/1.1 var(--display); letter-spacing: -0.02em; display: block; margin-top: 0.25rem; }
.row { display: flex; gap: 0.8rem; align-items: center; }
.icon { width: 44px; height: 44px; border-radius: 10px; background: #14161c; flex: none; object-fit: cover; }
.icon.round { border-radius: 50%; }
.title { font-weight: 600; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; }
ol.steps { list-style: none; display: grid; gap: 0.55rem; margin-top: 0.85rem; }
ol.steps li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.6rem; font-size: 14px; }
ol.steps .need { font: 500 13px var(--mono); text-align: right; color: var(--accent); padding-top: 1px; }
.reward { color: var(--muted); }
.note { margin-top: 0.75rem; font-size: 13px; color: var(--muted); font-style: italic; }
.tiers { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.6rem; }
.tiers span { font: 500 11px/1 var(--mono); padding: 0.3rem 0.45rem; border-radius: 999px; background: var(--raised); color: var(--muted); }
.tiers span.done { background: var(--accent-soft); color: var(--accent); }
.tiers span b { font-weight: 500; color: var(--fg); }
.lookup { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.lookup input { min-width: 0; flex: 1 1 180px; }
.progress { margin-top: 0.6rem; display: grid; gap: 0.3rem; font-size: 13px; }
h2.section { font-family: var(--display); font-size: 1.35rem; letter-spacing: -0.02em; }
@media (max-width: 640px) { input, select { font-size: 16px; } ol.steps li { grid-template-columns: 3.4rem 1fr; } }
.lookup[hidden] { display: none; }
td[rowspan] { vertical-align: top; }

/* ---- Colour pass: this page's hue (Info blue), the same in every theme */
:root {
  --a: #3fa7f5;
  --hue-gold: #e0a83c;
  /* Colour mixes are precomputed so browsers without colour mixing look the same. Light here, dark below. */
  --a-ink: #2d6088;
  --a-soft: rgba(63, 167, 245, 0.16);
  --a-edge: #90c3eb;
  --hue-gold-ink: #80601a;
  --gold-edge: rgba(128, 96, 26, 0.45);
  --accent-edge: rgba(9, 101, 157, 0.45);
  --silver-soft: rgba(89, 98, 110, 0.16);
  --silver-soft-2: rgba(89, 98, 110, 0.14);
  --silver-edge: rgba(89, 98, 110, 0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --a-ink: #72bcf4; --a-edge: #2f628c; --hue-gold-ink: #e0a83c; --gold-edge: rgba(224, 180, 92, 0.45);
    --accent-edge: rgba(92, 192, 255, 0.45); --silver-soft: rgba(163, 173, 187, 0.16);
    --silver-soft-2: rgba(163, 173, 187, 0.14); --silver-edge: rgba(163, 173, 187, 0.5);
  }
}
:root[data-theme="dark"] {
    --a-ink: #72bcf4; --a-edge: #2f628c; --hue-gold-ink: #e0a83c; --gold-edge: rgba(224, 180, 92, 0.45);
    --accent-edge: rgba(92, 192, 255, 0.45); --silver-soft: rgba(163, 173, 187, 0.16);
    --silver-soft-2: rgba(163, 173, 187, 0.14); --silver-edge: rgba(163, 173, 187, 0.5);
}
a { color: var(--a-ink); }
a:hover { color: var(--a); }
input:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible { outline-color: var(--a); }
.eyebrow.accent, .card > .eyebrow:first-child { color: var(--a-ink); }
.slot { color: var(--a-ink); }
.btn { background: linear-gradient(135deg, var(--a), #6495f9); color: #04121c; }
.btn:hover { filter: brightness(1.08) saturate(1.1); }

/* Active tabs and pills */
.segmented button[aria-selected="true"], .filters button[aria-pressed="true"] {
  background: var(--a-soft); color: var(--a-ink); box-shadow: inset 0 0 0 1px rgba(63, 167, 245, 0.4);
}
.segmented button:hover:not([aria-selected="true"]), .filters button:hover:not([aria-pressed="true"]) { color: var(--a-ink); }

/* Cards: a thin colour edge on top */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--a), rgba(63, 167, 245, 0.3));
}

/* Coloured hover on rows and cards */
tbody tr { transition: background 0.12s; }
tbody tr:hover, .build-row:hover, .aug-row:hover, .ability:hover { background: var(--a-soft); }
.build-row, .aug-row { border-radius: var(--r-sm); transition: background 0.12s; }
.champ, .style, .card.fact { transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.15s; }
.champ:hover, .style:hover {
  background: var(--a-soft); border-color: var(--a-edge);
  box-shadow: 0 10px 30px -18px var(--a); transform: translateY(-2px);
}
.champ:hover .title { color: var(--a-ink); }

/* Win rates and changes */
.wr-high { color: var(--good); font-weight: 600; }
.wr-low { color: var(--bad); }
.up, .down { font-size: 0.75em; }
.up { color: var(--good); } .down { color: var(--bad); }

/* Rarity chips: filled */
.chip.tier-gold { color: var(--hue-gold-ink); background: rgba(224, 168, 60, 0.18); border-color: rgba(224, 168, 60, 0.6); }
.chip.tier-silver { background: var(--silver-soft); border-color: var(--silver-edge); }
.chip.tier-prismatic { box-shadow: 0 0 12px -4px #c9b8ff; }

/* Phones: form fields at 16px or more, so Safari doesn't zoom in on focus */
@media (pointer: coarse) { input, select, textarea { font-size: max(16px, 1em); } }
