/* HLL Circle — Cursor-style markdown preview */
:root {
  --bg: #1e1e1e;
  --bg-sidebar: #181818;
  --bg-panel: #252526;
  --bg-code: #2d2d2d;
  --bg-table-head: #2a2a2a;
  --bg-table-stripe: #222222;
  --border: #3c3c3c;
  --text: #cccccc;
  --text-muted: #858585;
  --text-heading: #e8e8e8;
  --link: #4fc1ff;
  --link-hover: #75bfff;
  --accent: #007acc;
  --accent-soft: rgba(0, 122, 204, 0.15);
  --sidebar-w: 280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body.hll-circle {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 !important;
  padding: 0 !important;
}

/* Elementor full-bleed overrides */
body.hll-circle .elementor-section,
body.hll-circle .elementor-column,
body.hll-circle .elementor-widget-wrap,
body.hll-circle .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}
body.hll-circle .elementor-section .elementor-container {
  max-width: 100% !important;
  width: 100% !important;
}

.hll-app {
  display: flex;
  min-height: 100vh;
}

.hll-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.hll-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.hll-brand h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: 0.02em;
}
.hll-brand p {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hll-nav { padding: 0.75rem 0.5rem; flex: 1; }
.hll-nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.25rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s, color 0.15s;
}
.hll-nav button:hover { background: var(--bg-panel); color: var(--text-heading); }
.hll-nav button.active {
  background: var(--accent-soft);
  color: var(--link);
  border-left: 3px solid var(--accent);
  padding-left: calc(0.85rem - 3px);
}
.hll-nav .nav-title { display: block; font-weight: 600; font-size: 0.92rem; }
.hll-nav .nav-sub { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }

.hll-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hll-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  height: 100vh;
}

.hll-doc {
  display: none;
  max-width: 920px;
  padding: 2rem 2.5rem 4rem;
  margin: 0 auto;
}
.hll-doc.active { display: block; }
.hll-doc#doc-infantry { max-width: 1180px; }
.hll-doc#doc-recon { max-width: 920px; }
.hll-doc#doc-armor { max-width: 1180px; }

/* Recoil spray cards — canvas-style */
.hll-recoil-viz-mount { margin: 1.5rem 0 2rem; }
.hll-spray-section { margin-bottom: 2rem; }
.hll-spray-cat {
  font-size: 1.1rem;
  color: var(--text-heading);
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.hll-spray-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.hll-spray-card {
  background: #2a2a2a;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 10px 8px;
}
.hll-spray-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-heading);
}
.hll-spray-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
}
.hll-spray-svg {
  display: block;
  width: 100%;
  height: auto;
  background: #252526;
  border-radius: 4px;
}
.hll-recoil-loading, .hll-recoil-error {
  color: var(--text-muted);
  font-size: 0.9rem;
}
@media (max-width: 960px) {
  .hll-spray-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hll-spray-grid { grid-template-columns: 1fr; }
}

/* Sniper infographics */
.hll-sniper-viz-mount { margin: 1.5rem 0 2.5rem; }
.hll-snip-grid { display: flex; flex-direction: column; gap: 2rem; }
.hll-snip-card {
  background: #8a8778;
  color: #111;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #6e6c60;
}
.hll-snip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1rem 0.5rem;
  background: #8a8778;
}
.hll-snip-short {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}
.hll-snip-nation { font-size: 0.85rem; font-weight: 700; margin-top: 0.25rem; }
.hll-snip-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 1rem;
  font-size: 0.72rem;
  text-align: right;
}
.hll-snip-meta span { display: block; opacity: 0.75; }
.hll-snip-meta strong { font-size: 0.82rem; }
.hll-snip-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.hll-snip-badges .badge {
  flex: 1 1 33%;
  padding: 0.35rem 0.5rem;
  text-align: center;
  border-top: 2px solid #111;
}
.hll-snip-badges .zero { background: #7a7768; color: #fff; }
.hll-snip-badges .walk { background: #ddd; color: #111; }
.hll-snip-badges .run { background: #111; color: #fff; }
.hll-snip-rows { display: flex; flex-direction: column; }
.hll-snip-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 0.5rem;
  align-items: stretch;
  border-top: 1px solid #6e6c60;
  background: #9a9888;
}
.hll-snip-row-text { padding: 0.6rem 0.75rem; }
.hll-snip-dist {
  color: #c0392b;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}
.hll-snip-stat { font-size: 0.78rem; margin: 0.15rem 0; }
.hll-snip-stat span { opacity: 0.8; margin-right: 0.35rem; }
.hll-snip-stat.run strong { color: #fff; background: #111; padding: 0 0.2rem; }
.hll-snip-diagram { width: 180px; height: 90px; display: block; }
.hll-snip-foot {
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  background: #7a7768;
  color: #eee;
}
.hll-sniper-loading, .hll-sniper-error { color: var(--text-muted); }
@media (max-width: 640px) {
  .hll-snip-row { grid-template-columns: 1fr; }
  .hll-snip-diagram { width: 100%; height: auto; }
}

/* Tank & AT viz */
.hll-tank-at-viz-mount { margin: 1.5rem 0 2.5rem; }
.hll-tank-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.hll-tank-tab {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}
.hll-tank-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--link); }
.hll-tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.hll-tank-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.hll-tank-head {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.65rem 0.75rem; background: #2a2a2a; border-bottom: 1px solid var(--border);
}
.hll-tank-thumb {
  width: 72px; height: 48px; object-fit: contain; flex-shrink: 0;
  background: #1a1a1a; border-radius: 3px; border: 1px solid var(--border);
}
.hll-tank-title { min-width: 0; }
.hll-tank-name { font-weight: 700; color: var(--text-heading); font-size: 0.92rem; }
.hll-tank-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }
.hll-tank-modules {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem;
  padding: 0.35rem 0.75rem 0.5rem; font-size: 0.68rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.hll-tank-modules span { white-space: nowrap; }
.hll-tank-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
}
.hll-tank-stats span { display: block; color: var(--text-muted); font-size: 0.68rem; }
.hll-tank-armour { padding: 0 0.75rem 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.hll-tank-arm {
  font-size: 0.68rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.hll-tank-foot {
  padding: 0.45rem 0.75rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.hll-tank-section, .hll-tank-ttk { margin: 2rem 0; }
.hll-tank-section h3, .hll-tank-ttk h3 {
  font-size: 0.95rem;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}
.hll-tank-table-wrap { overflow-x: auto; }
.hll-tank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}
.hll-tank-table th, .hll-tank-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.45rem;
  text-align: left;
}
.hll-tank-table th { background: var(--bg-table-head); color: var(--text-heading); }
.hll-tank-table tr:nth-child(even) td { background: var(--bg-table-stripe); }
.hll-tank-pen { font-weight: 700; font-size: 0.65rem; padding: 0.05rem 0.25rem; border-radius: 2px; }
.hll-tank-pen.yes { background: #1e4620; color: #7dce82; }
.hll-tank-pen.no { background: #4a1e1e; color: #e07070; }
.hll-tank-pen.na { color: var(--text-muted); }
.hll-tank-select { display: block; margin-bottom: 0.75rem; font-size: 0.8rem; }
.hll-tank-select select {
  margin-left: 0.5rem;
  background: var(--bg-code);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
}
.hll-tank-note, .hll-tank-loading, .hll-tank-error { font-size: 0.78rem; color: var(--text-muted); margin-top: 1rem; }

/* Markdown body — Cursor preview feel */
.hll-doc .md-body h1, .hll-doc .md-body h2, .hll-doc .md-body h3, .hll-doc .md-body h4 {
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  border-bottom: none;
}
.hll-doc .md-body h1 { font-size: 1.85rem; margin-top: 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.hll-doc .md-body h2 { font-size: 1.35rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--border); }
.hll-doc .md-body h3 { font-size: 1.1rem; }
.hll-doc .md-body p { margin: 0.75rem 0; }
.hll-doc .md-body a { color: var(--link); text-decoration: none; }
.hll-doc .md-body a:hover { color: var(--link-hover); text-decoration: underline; }
.hll-doc .md-body strong { color: var(--text-heading); font-weight: 600; }
.hll-doc .md-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}
.hll-doc .md-body ul, .hll-doc .md-body ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.hll-doc .md-body li { margin: 0.35rem 0; }
.hll-doc .md-body li::marker { color: var(--text-muted); }

.hll-doc .md-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: #ce9178;
}
.hll-doc .md-body pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.hll-doc .md-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.5;
}

.hll-doc .md-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
  display: block;
  overflow-x: auto;
}
.hll-doc .md-body th, .hll-doc .md-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.hll-doc .md-body th {
  background: var(--bg-table-head);
  color: var(--text-heading);
  font-weight: 600;
}
.hll-doc .md-body tr:nth-child(even) td { background: var(--bg-table-stripe); }

.hll-loading {
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hll-app { flex-direction: column; }
  .hll-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
  }
  .hll-main { height: auto; }
  .hll-doc { padding: 1.25rem 1rem 3rem; }
  .hll-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.5rem; }
  .hll-nav button { width: auto; flex: 1 1 45%; }
}
