@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --page: #121418;
  --side: #0f1114;
  --surface: #15181c;
  --surface-2: #1b1e24;
  --surface-3: #2a2e35;
  --line: #2a2e35;
  --line-strong: #3a3f48;
  --text: #e4e6ea;
  --text-strong: #ffffff;
  --text-2: #b0b5bd;
  --text-3: #8a909a;
  --accent: #5a9ef5;
  --accent-hover: #84bbff;
  --primary: #2f6fd6;
  --primary-hover: #3a7fe0;
  --primary-ink: #ffffff;
  --gold: #f5c84c;
  --coin-g: #f5c84c;
  --coin-s: #d4d8de;
  --coin-c: #f39c3c;
  --up: #4ade80;
  --down: #f87171;
  --series-1: #338ced;
  --grid: #23262d;
  --axis: #3a3f48;
  --tip-bg: #e4e6ea;
  --tip-ink: #121418;
  --heat-mid: #262a31;
  --heat-cheap: #1a9a7c;
  --heat-dear: #d9503f;
  --q0: #9d9d9d; --q1: #ffffff; --q2: #3fd46a; --q3: #4a9cf5; --q4: #b36bff; --q5: #ff8a1f; --q6: #e6cc80; --q7: #33ccff;
  --danger: #f87171;
  --radius: 6px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f6f7f9;
  --side: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e4e7ec;
  --line: #e2e5ea;
  --line-strong: #cdd1d7;
  --text: #1b1e24;
  --text-strong: #0b0c0e;
  --text-2: #5f656f;
  --text-3: #808792;
  --accent: #2766c6;
  --accent-hover: #1f509c;
  --primary: #2766c6;
  --primary-hover: #1f5ab3;
  --gold: #b7860b;
  --coin-g: #a87a00;
  --coin-s: #6b737e;
  --coin-c: #b5621c;
  --up: #15803d;
  --down: #c62828;
  --series-1: #257de0;
  --grid: #eceef2;
  --axis: #c2c6cd;
  --tip-bg: #1b1e24;
  --tip-ink: #ffffff;
  --heat-mid: #eceef2;
  --heat-cheap: #12806a;
  --heat-dear: #cc3d2c;
  --q0: #7d7d7d; --q1: #1b1e24; --q2: #148a2e; --q3: #0062c4; --q4: #8a2bd6; --q5: #c75f00; --q6: #8f7436; --q7: #0089a8;
  --danger: #c62828;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; color: var(--text-strong); font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.07rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 1em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 60; background: var(--surface); padding: 6px 10px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: .86rem; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { color: var(--text-strong); }
.side > .brand { padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 57px; }
.side-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.side-label { font-size: .86rem; color: var(--text-2); margin: 4px 0 -6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .side-link { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 4px; color: var(--text); font-size: .93rem; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.nav a:hover, .side-link:hover { background: var(--surface-2); color: var(--text-strong); }
.nav a.active { background: var(--surface-2); color: var(--text-strong); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.nav svg, .side-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; color: var(--text-2); }
.side-foot { border-top: 1px solid var(--line); padding: 10px 12px 14px; font-size: .74rem; color: var(--text-3); line-height: 1.35; }
.side-foot p { margin: 8px 4px 0; }
.side-foot .side-link { font-size: .9rem; color: var(--text-2); }
main { padding: 28px 40px 64px; outline: none; min-width: 0; max-width: 1312px; width: 100%; margin: 0 auto; }
.mobile-bar { display: none; }
.side-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 35; }

/* realm card in sidebar */
.realm-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 11px 11px; background: var(--surface); }
.realm-card .pick { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; padding-right: 22px; cursor: pointer; border-radius: 4px; }
.realm-card .pick:hover strong { color: var(--accent-hover); }
.realm-card .pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.realm-card .pick strong { display: block; color: var(--text-strong); font-size: 1rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.realm-card .pick span { display: block; font-size: .78rem; color: var(--text); }
.realm-card .pick::after { content: ""; position: absolute; right: 4px; top: 8px; width: 7px; height: 7px; border-right: 1.6px solid var(--text-2); border-bottom: 1.6px solid var(--text-2); transform: rotate(45deg); }
.realm-card .updated { font-size: .82rem; color: var(--text-2); margin: 6px 0 8px; }
.factions { display: flex; gap: 4px; margin-top: 8px; }
.factions a { min-width: 30px; text-align: center; padding: 1px 7px; border-radius: 3px; font-size: .8rem; font-weight: 700; background: var(--surface-2); }
.factions a.alliance { color: #6fa8ff; }
.factions a.horde { color: #ff6b6b; }
.factions a.neutral { color: #f5c84c; }
.factions a.on { background: var(--surface-3); box-shadow: inset 0 -2px 0 currentColor; }
.realm-empty { color: var(--text-2); font-size: .86rem; padding: 4px 2px; }

/* professions in sidebar */
.profs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.profs a { display: grid; place-items: center; padding: 3px; border-radius: 4px; }
.profs a:hover { background: var(--surface-2); }
.profs img { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--line-strong); }

/* ---------- form controls ---------- */
input[type="text"], input[type="search"], input[type="url"], select {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; min-height: 32px; color: var(--text);
}
input:hover, select:hover { border-color: var(--line-strong); }
input:focus, select:focus { border-color: var(--accent); outline: none; }
input::placeholder { color: var(--text-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 12px; min-height: 32px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-weight: 500; color: var(--text); white-space: nowrap; font-size: .93rem; }
.btn:hover { background: var(--surface-3); color: var(--text-strong); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.block { width: 100%; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 3px 10px; cursor: pointer; color: var(--text-2); font-size: .86rem; border-radius: 3px; }
.seg button:hover { color: var(--text-strong); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text-strong); font-weight: 600; }

/* ---------- search ---------- */
.search { position: relative; }
.search input { width: 100%; }
.side .search input { padding-left: 32px; background: var(--surface); }
.side .search::before, .search.big::before { content: ""; position: absolute; left: 11px; top: 50%; width: 9px; height: 9px; border: 1.6px solid var(--text-3); border-radius: 50%; transform: translateY(-62%); pointer-events: none; }
.side .search::after, .search.big::after { content: ""; position: absolute; left: 20px; top: 50%; width: 5px; height: 1.6px; background: var(--text-3); transform: translateY(3px) rotate(45deg); pointer-events: none; }
.search.big input { font-size: 1rem; padding: 10px 14px 10px 36px; min-height: 42px; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(460px, 92vw); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); list-style: none; margin: 0; padding: 4px; max-height: 440px; overflow: auto; z-index: 50; }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 4px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-3); }
.suggest .meta { margin-left: auto; padding-left: 12px; font-size: .8rem; color: var(--text-3); }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card, .stack > * + *, .tiles + .card, .card + .tiles, .tiles + .tiles { margin-top: 16px; }
.card.flush { padding: 0; }
.card.flush > .card-head { padding: 12px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.card h2 { display: flex; align-items: center; gap: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 1.07rem; margin: 30px 0 12px; color: var(--text-strong); }
.section-title svg { width: 17px; height: 17px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.grid-2 + .card, .grid-2 + .tiles { margin-top: 16px; }
.grid-2 > .card + .card { margin-top: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin-bottom: 4px; }
.crumbs { font-size: .84rem; color: var(--text-3); margin-bottom: 6px; }
.crumbs a { color: var(--text-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 8px 12px; color: var(--text-2); font-size: 1rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text-strong); }
.tabs a.active { color: var(--text-strong); font-weight: 600; border-bottom-color: var(--accent); }
.empty { text-align: center; color: var(--text-2); padding: 40px 10px; }
.notice { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; color: var(--text-2); font-size: .9rem; }
.error { color: var(--danger); }
.loading { color: var(--text-2); padding: 40px 0; text-align: center; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- money & items ---------- */
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.coin + .coin { margin-left: .3em; }
.coin.g { color: var(--coin-g); }
.coin.s { color: var(--coin-s); }
.coin.c { color: var(--coin-c); }
.coin i { font-style: normal; font-size: .72em; margin-left: 1px; opacity: .75; }
.icon { border-radius: 4px; border: 1px solid var(--line-strong); vertical-align: middle; background: var(--surface-2); flex: none; }
.item-link { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; }
.item-link:hover span { text-decoration: underline; }
.q0 { color: var(--q0); } .q1 { color: var(--q1); } .q2 { color: var(--q2); } .q3 { color: var(--q3); }
.q4 { color: var(--q4); } .q5 { color: var(--q5); } .q6 { color: var(--q6); } .q7 { color: var(--q7); }
.delta { white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.up::first-letter, .delta.down::first-letter { font-size: .8em; }
.star { background: none; border: 0; cursor: pointer; line-height: 1; color: var(--text-2); padding: 4px; display: inline-grid; place-items: center; }
.star svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.star:hover { color: var(--text-strong); }
.star[aria-pressed="true"] { color: var(--gold); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 3px; background: var(--surface-3); color: var(--text); vertical-align: middle; }
.badge.alliance { color: #6fa8ff; } .badge.horde { color: #ff6b6b; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .86rem; color: var(--text-2); font-weight: 500; white-space: nowrap; border-bottom-color: var(--line-strong); }
th.num, td.num { text-align: right; }
th button { all: unset; cursor: pointer; }
th button:hover { color: var(--text-strong); }
th button:focus-visible { outline: 2px solid var(--accent); }
th button[aria-sort]::after { content: ' ↓'; }
th button[aria-sort="ascending"]::after { content: ' ↑'; }
tbody tr:hover { background: var(--surface-2); }
tr.sub td { background: var(--surface-2); font-size: .9rem; }
.card > table td:first-child, .card > .table-wrap td:first-child, .card > table th:first-child, .card > .table-wrap th:first-child { padding-left: 0; }
.card > table td:last-child, .card > .table-wrap td:last-child, .card > table th:last-child, .card > .table-wrap th:last-child { padding-right: 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--text-2); font-size: .88rem; }
.chev { display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(-45deg); margin: 0 6px 1px 2px; transition: transform .12s; }
[aria-expanded="true"] > .chev { transform: rotate(45deg); }

/* ---------- browse ---------- */
.browse { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.cats { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; font-size: .92rem; }
.cats .side-label { margin: 0 0 6px; }
.cats button { all: unset; display: flex; align-items: center; gap: 4px; width: 100%; box-sizing: border-box; padding: 3px 6px; border-radius: 3px; cursor: pointer; color: var(--text); }
.cats button:hover { background: var(--surface-2); color: var(--text-strong); }
.cats button:focus-visible { outline: 2px solid var(--accent); }
.cats button[aria-pressed="true"] { background: var(--surface-2); color: var(--text-strong); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.cats button .label { flex: 1; }
.cats .subcats { padding-left: 16px; }
.cats .count { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: .82rem; }
.cats .nochev { display: inline-block; width: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.filters input[type="search"] { flex: 1; min-width: 200px; max-width: 290px; }

/* ---------- item page ---------- */
.item-head { display: flex; gap: 14px; align-items: flex-start; }
.item-head h1 { margin: 0; font-size: 1.45rem; }
.item-head .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-head .meta { font-size: .86rem; color: var(--text-2); margin-top: 3px; display: flex; gap: 14px; flex-wrap: wrap; }
.item-head .meta b { color: var(--text); font-weight: 500; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 6px; cursor: pointer; color: var(--text); font-size: .93rem; border-radius: 4px; }
.link-btn:hover { background: var(--surface-2); color: var(--text-strong); }
.link-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lede { color: var(--text); margin: 14px 0 16px; max-width: 900px; }

/* joined stat strip */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile { padding: 12px 14px 13px; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.tile .label { font-size: .84rem; color: var(--text-2); }
.tile .value { font-size: 1.45rem; font-weight: 600; margin: 2px 0 1px; letter-spacing: -.01em; color: var(--text-strong); line-height: 1.3; }
.tile .value.sm { font-size: 1.05rem; }
.tile .sub { font-size: .82rem; color: var(--text-2); }
.tiles.weeks .value { font-size: 1.15rem; }
.stats-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.stats-list dt { color: var(--text-2); }
.stats-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart-title { text-align: center; font-weight: 600; color: var(--text-strong); margin: 4px 0 6px; font-size: .93rem; }
.chart-svg { display: block; overflow: visible; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .grid line.baseline { stroke: var(--axis); }
.chart .axis { fill: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: .14; }
.chart .cross { stroke: var(--text-3); stroke-width: 1; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .bar path { fill: var(--series-1); }
.chart .bar.on path { filter: brightness(1.2); }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--text-2); background: var(--surface-2); border-radius: var(--radius); }
.tip { position: absolute; display: none; pointer-events: none; background: var(--tip-bg); color: var(--tip-ink); padding: 6px 10px; border-radius: 4px; font-size: .82rem; white-space: nowrap; z-index: 5; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.tip strong { display: block; font-size: .95rem; font-variant-numeric: tabular-nums; }
.tip span { opacity: .75; }

/* heatmap: day rows × hour columns, coloured against that day's average */
.heat { position: relative; }
.heat-grid { display: grid; grid-template-columns: 52px repeat(24, minmax(0, 1fr)) 64px; gap: 3px; font-size: 11px; color: var(--text-2); align-items: center; }
.heat-grid .cell { height: 22px; border-radius: 2px; min-width: 0; background: var(--heat-mid); }
.heat-grid .cell.none { background: transparent; }
.heat-grid .cell:hover, .heat-grid .cell:focus { outline: 2px solid var(--text-strong); outline-offset: -1px; }
.heat-h { text-align: center; font-variant-numeric: tabular-nums; }
.heat-h.now { color: var(--up); font-weight: 700; }
.heat-d { white-space: nowrap; }
.heat-d.weekend { color: var(--text-strong); }
.heat-avg { text-align: right; font-size: 11px; }
.heat-legend { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: .78rem; color: var(--text-2); margin-top: 12px; }
.heat-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
details.table-view summary { cursor: pointer; color: var(--text-2); font-size: .86rem; margin-top: 10px; }
details.table-view table { margin-top: 8px; font-size: .88rem; }

/* ---------- home ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 24px; align-items: start; }
.ask { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-strong); margin: 0 0 10px; font-size: .98rem; }
.ask svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.best { padding: 0; }
.best > h2 { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.best ul { list-style: none; margin: 0; padding: 0; }
.best li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.best li:last-child { border-bottom: 0; }
.best .nm { min-width: 0; }
.best .nm a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.best .nm span { font-size: .82rem; color: var(--text-2); }
.best .pr { text-align: right; font-size: .95rem; }
.best .pr small { display: block; color: var(--up); font-size: .75rem; }
.house-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.house-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); }
.house-card:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.house-card .name { font-weight: 650; font-size: 1.07rem; color: var(--text-strong); margin-bottom: 2px; }
.house-card .meta { font-size: .86rem; color: var(--text); }
.house-card .meta + .meta { font-size: .8rem; color: var(--text-2); margin-top: 2px; }
.link-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px 24px; }
.link-cols a { font-size: .98rem; }
.link-cols span { color: var(--text-2); font-size: .82rem; margin-left: 6px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px 32px; }
.features strong { display: block; margin-bottom: 4px; color: var(--text-strong); font-weight: 600; }
.features span { color: var(--text-2); font-size: .9rem; }

/* ---------- dialog ---------- */
dialog { border: 1px solid var(--line-strong); border-radius: 8px; padding: 0; background: var(--surface); color: var(--text); width: min(480px, 94vw); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog form { padding: 20px 22px; display: grid; gap: 12px; }
dialog label { display: grid; gap: 4px; font-size: .88rem; color: var(--text-2); }
dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dialog .buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  main { padding: 24px 24px 56px; }
  .home-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 8px 12px; background: var(--side); border-bottom: 1px solid var(--line); }
  .icon-btn { background: none; border: 1px solid var(--line); border-radius: 4px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; color: var(--text); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .18s ease; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
  .browse { grid-template-columns: minmax(0, 1fr); }
  .cats { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; }
  .cats .side-label, .cats .subcats, .cats .chev, .cats .nochev { display: none; }
  .cats button { width: auto; border: 1px solid var(--line); padding: 3px 9px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 > .card + .card { margin-top: 16px; }
  .heat-grid { grid-template-columns: 40px repeat(24, minmax(0, 1fr)) 0; gap: 2px; }
  .heat-avg { visibility: hidden; }
  .heat-h:nth-child(even) { visibility: hidden; }
}
@media (max-width: 560px) {
  main { padding: 16px 12px 40px; }
  h1 { font-size: 1.35rem; }
  .hide-sm { display: none; }
  .tile .value { font-size: 1.2rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (forced-colors: active) {
  .chart .line { stroke: CanvasText; }
  .heat-grid .cell { forced-color-adjust: none; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* home: profession panel + realm links */
.searching { font-size: .84rem; color: var(--text-2); margin-top: 8px; }
.searching b { color: var(--text-strong); font-weight: 500; }
.prof-panel { margin-top: 22px; }
.prof-panel h2 { margin-bottom: 14px; }
.prof-grid { display: flex; flex-wrap: wrap; gap: 12px 0; justify-content: space-between; }
.prof-grid a { display: grid; justify-items: center; gap: 6px; width: 76px; font-size: .78rem; color: var(--text-2); text-align: center; border-radius: 6px; padding: 6px 2px; }
.prof-grid a:hover { background: var(--surface-2); color: var(--text-strong); }
.prof-grid img { width: 54px; height: 54px; border-radius: 6px; border: 1px solid var(--line-strong); }
.home-sub { font-size: .98rem; margin: 0 0 14px; }
