/* Heimdall network tools — shared styles. Monochrome on black; the bridge (prismatic rule) is the only colour. */
.hxt {
  --void: #000;
  --ink: #f3f2ef;
  --mute: #8d8c95;
  --faint: #4b4a53;
  --line: rgba(255, 255, 255, 0.1);
  --panel: #0b0b0e;
  --panel-2: #121216;
  --f-display: 'Anybody', 'Arial Narrow', sans-serif;
  --f-body: 'Hanken Grotesk', system-ui, sans-serif;
  --f-mono: 'Martian Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --bridge: linear-gradient(90deg, #ff2e63, #ff8a00, #ffe53b, #2bffa5, #1fd1ff, #6a5cff, #d83cff);
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { background: #000; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hxt * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.hxt *, .hxt *::before, .hxt *::after { box-sizing: border-box; }
.hxt a { color: inherit; text-decoration: none; }
.hxt :focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }
.hxt ::selection { background: var(--ink); color: #000; }
.hxt img { display: block; max-width: 100%; height: auto; }
.hxt [hidden] { display: none !important; }
.hxt button { font: inherit; color: inherit; }
.hxt-mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; }
.hxt-skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 8px 12px; background: #fff; color: #000; }
.hxt-skip:focus { top: 8px; }

/* Header */
.hxt-head { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px 24px; padding: 14px var(--gutter); background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hxt-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--bridge); opacity: 0.55; }
.hxt-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.hxt-brand svg { width: 16px; height: 24px; }
.hxt-nav { display: flex; gap: 22px; justify-content: center; font-size: 14px; color: var(--mute); }
.hxt-nav a:hover, .hxt-nav a[aria-current] { color: var(--ink); }
.hxt-lang { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; color: var(--mute); }
.hxt-lang:hover { color: var(--ink); border-color: var(--mute); }

/* Layout */
.hxt-main { padding: 0 var(--gutter) 64px; max-width: 1240px; margin: 0 auto; }
.hxt-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(20px, 3vw, 40px); }
.hxt-crumbs { color: var(--mute); margin: 0 0 18px; }
.hxt-crumbs a:hover { color: var(--ink); }
.hxt-h1 { font-family: var(--f-display); font-weight: 800; font-stretch: 90%; font-size: clamp(36px, 7vw, 84px); line-height: 0.98; letter-spacing: -0.03em; margin: 0; max-width: 16ch; }
.hxt-lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--mute); max-width: 62ch; margin: 22px 0 0; }
.hxt-h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 3.2vw, 38px); letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 20px; }
.hxt-h2 a:hover { text-decoration: underline; text-underline-offset: 6px; }
.hxt-sec { padding: clamp(28px, 4vw, 56px) 0; border-top: 1px solid var(--line); }
.hxt-count { color: var(--mute); margin: 0 0 20px; }
.hxt-count span:first-child { color: var(--ink); font-size: 14px; }

/* Controls */
.hxt-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 2.5vw, 28px); }
.hxt-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.hxt-field { display: grid; gap: 8px; }
.hxt-field > span, .hxt-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.hxt-select, .hxt-input { appearance: none; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 11px 14px; font: inherit; min-width: 160px; }
.hxt-select { padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238d8c95' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; }
.hxt-input[type=number] { min-width: 110px; }
.hxt-input:focus, .hxt-select:focus { border-color: var(--mute); outline: none; }
.hxt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hxt-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--mute); background: transparent; }
.hxt-chip.is-match, .hxt-chip[aria-pressed=true] { color: #000; background: var(--ink); border-color: var(--ink); }
button.hxt-chip { cursor: pointer; transition: border-color 0.15s, color 0.15s; }
button.hxt-chip:hover { border-color: var(--mute); color: var(--ink); }
button.hxt-chip[aria-pressed=true]:hover { color: #000; }
.hxt .hxt-btn, .hxt a.hxt-btn { color: #000; }
.hxt .hxt-btn-ghost, .hxt a.hxt-btn-ghost { color: var(--ink); }
.hxt-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #000; font-weight: 600; font-size: 14px; border: 1px solid var(--ink); cursor: pointer; transition: transform 0.15s; }
.hxt-btn:hover { transform: translateY(-1px); }
.hxt-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.hxt-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.hxt-btn-ghost:hover { border-color: var(--mute); }
.hxt-btn-big { font-family: var(--f-display); font-weight: 800; font-size: clamp(20px, 3vw, 30px); padding: 18px 34px; letter-spacing: -0.02em; }
.hxt-note { color: var(--mute); font-size: 14px; margin: 14px 0 0; }
.hxt-empty { color: var(--mute); padding: 28px 0; }
.hxt-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #000; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 60; }
.hxt-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Venue cards */
.hxt-venues { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.hxt-venue { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.hxt-venue:hover { border-color: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
.hxt-venue.is-closed .hxt-venue-img img { filter: grayscale(1) brightness(0.6); }
.hxt-venue-img { aspect-ratio: 1200 / 630; background: var(--panel-2); }
.hxt-venue-img img { width: 100%; height: 100%; object-fit: cover; }
.hxt-venue-body { padding: 18px 18px 20px; display: grid; gap: 12px; align-content: start; }
.hxt-venue-kicker { margin: 0; color: var(--mute); }
.hxt-closed { color: #ff8a00; }
.hxt-venue-name { font-family: var(--f-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
.hxt-venue-name a:hover { text-decoration: underline; text-underline-offset: 5px; }
.hxt-venue-short { margin: 0; color: #c9c8cf; font-size: 15px; }
.hxt-venue-facts { margin: 0; display: grid; gap: 6px; text-transform: none; letter-spacing: 0; color: var(--mute); }
.hxt-venue-facts div { display: grid; grid-template-columns: 86px 1fr; gap: 10px; }
.hxt-venue-facts dt { color: var(--faint); }
.hxt-venue-facts dd { margin: 0; color: var(--mute); }
.hxt-venue-actions { margin: 4px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.hxt-venue-badge { position: absolute; top: 12px; left: 12px; z-index: 1; background: rgba(0, 0, 0, 0.78); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }
.hxt-venue-rank { position: absolute; top: 12px; right: 12px; z-index: 1; font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1; color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 10px #000; }

/* Tool grid */
.hxt-toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.hxt-tool { position: relative; display: grid; gap: 10px; align-content: start; padding: 22px 20px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; transition: border-color 0.2s, transform 0.2s; min-height: 190px; }
.hxt-tool:hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.hxt-tool::before { content: ''; position: absolute; inset: auto 20px 0 20px; height: 2px; background: var(--bridge); opacity: 0; transition: opacity 0.2s; }
.hxt-tool:hover::before { opacity: 1; }
.hxt-tool svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hxt-tool-num { position: absolute; top: 20px; right: 20px; color: var(--faint); }
.hxt-tool-name { font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1.05; }
.hxt-tool-desc { color: var(--mute); font-size: 14px; }
.hxt-toolgrid-compact .hxt-tool { min-height: 0; }
.hxt-citygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.hxt-city { display: grid; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color 0.2s; }
.hxt-city:hover { border-color: rgba(255, 255, 255, 0.3); }
.hxt-city-name { font-family: var(--f-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.hxt-city .hxt-mono { color: var(--mute); }
.hxt-cities { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.hxt-cities a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; }
.hxt-cities a:hover { border-color: var(--mute); }

/* Results list / rows */
.hxt-results { margin-top: 28px; }
.hxt-rows { display: grid; gap: 10px; }
.hxt-rowcard { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.hxt-rowcard-n { font-family: var(--f-display); font-weight: 800; font-size: 26px; color: var(--mute); min-width: 34px; }
.hxt-rowcard-name { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.hxt-rowcard-sub { color: var(--mute); font-size: 14px; }

/* Map */
.hxt-map { height: min(70vh, 640px); min-height: 360px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.hxt-map .leaflet-container { background: #06060a; font-family: var(--f-body); }
.hxt-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.72) contrast(1.15) saturate(0.35); }
.hxt-map .leaflet-popup-content-wrapper, .hxt-map .leaflet-popup-tip { background: #0b0b0e; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
.hxt-map .leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.4; }
.hxt-map .leaflet-popup-content b { font-family: var(--f-display); font-size: 17px; }
.hxt-map .leaflet-popup-content a { text-decoration: underline; text-underline-offset: 3px; }
.hxt-map .leaflet-popup-close-button { color: var(--mute) !important; }
.hxt-map .leaflet-control-attribution { background: rgba(0, 0, 0, 0.7) !important; color: var(--mute) !important; font-size: 10px; }
.hxt-map .leaflet-control-attribution a { color: var(--mute) !important; }
.hxt-map .leaflet-bar a { background: #0b0b0e; color: var(--ink); border-color: var(--line); }

/* Quiz */
.hxt-quiz-q { font-family: var(--f-display); font-weight: 800; font-size: clamp(26px, 4vw, 44px); letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 24px; }
.hxt-answers { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.hxt-answer { text-align: left; padding: 16px 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 16px; transition: border-color 0.15s, transform 0.15s; }
.hxt-answer:hover { border-color: var(--mute); transform: translateY(-1px); }
.hxt-progress { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 0 0 24px; }
.hxt-progress > span { display: block; height: 100%; background: var(--bridge); transition: width 0.3s; }
.hxt-verdict { font-family: var(--f-display); font-weight: 800; font-size: clamp(34px, 6vw, 72px); letter-spacing: -0.03em; line-height: 0.98; margin: 0 0 8px; }

/* Compare table */
.hxt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hxt-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.hxt-table th, .hxt-table td { text-align: left; vertical-align: top; padding: 14px 14px; border-top: 1px solid var(--line); font-size: 15px; }
.hxt-table th { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); font-weight: 500; width: 140px; }
.hxt-table thead th { font-family: var(--f-display); font-size: 22px; letter-spacing: -0.02em; text-transform: none; color: var(--ink); font-weight: 800; border-top: 0; width: auto; }
.hxt-table img { width: 100%; aspect-ratio: 1200/630; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }

/* Dice */
.hxt-dice-stage { text-align: center; padding: clamp(24px, 5vw, 60px) 0; }
.hxt-dice-name { font-family: var(--f-display); font-weight: 800; font-size: clamp(40px, 9vw, 110px); letter-spacing: -0.04em; line-height: 0.95; min-height: 1em; margin: 0 0 10px; }
.hxt-dice-name.is-rolling { color: var(--mute); }
.hxt-dice-sub { color: var(--mute); font-size: 18px; min-height: 1.6em; margin: 0 0 24px; }

/* Budget */
.hxt-budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.hxt-total { display: grid; gap: 6px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); position: relative; overflow: hidden; }
.hxt-total::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--bridge); }
.hxt-total-num { font-family: var(--f-display); font-weight: 800; font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.03em; line-height: 1; }
.hxt-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; margin-top: 20px; }
.hxt-breakdown { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--mute); }
.hxt-breakdown li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--line); padding: 6px 0; }

/* Invite */
.hxt-invite { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.hxt-invite canvas { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: #000; }
@media (max-width: 820px) { .hxt-invite { grid-template-columns: 1fr; } }

/* Footer */
.hxt-foot { border-top: 1px solid var(--line); padding: 32px var(--gutter) 40px; color: var(--mute); display: grid; gap: 10px; max-width: 1240px; margin: 0 auto; }
.hxt-foot p { margin: 0; }
.hxt-foot a:hover { color: var(--ink); }
.hxt-foot-by { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); }

@media (max-width: 720px) {
  .hxt-head { grid-template-columns: 1fr auto; }
  .hxt-nav { grid-column: 1 / -1; justify-content: flex-start; gap: 16px; order: 3; overflow-x: auto; white-space: nowrap; }
  .hxt-venue-facts div { grid-template-columns: 76px 1fr; }
  .hxt-rowcard { grid-template-columns: auto 1fr; }
  .hxt-rowcard > :last-child { grid-column: 2; }
}
