/* ═══════════════════════════════════════════════════════════════
   StoppingPower — stoppingpower.io
   Holo-cyan console look. Single stylesheet, no build step.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══ PALETTE ═══ */
body.holo {
  --accent-contrast: #021016;  /* text on solid --accent fills */
  --bg: #04080d; --surface: #0a121c; --surface2: #101c2a; --surface3: #16263a;
  --border: rgba(77,222,255,0.16); --border-hover: rgba(77,222,255,0.45); --border-hard: rgba(77,222,255,0.6);
  --text: #cfe6ee; --text-muted: #56788c; --text-dim: #1f3344;
  --accent: #4adeff; --accent2: #9af1ff; --accent-dim: rgba(77,222,255,0.08); --accent-glow: rgba(77,222,255,0.22);
  --header-bg: rgba(4,8,13,0.95);
  --radius: 2px; --radius-lg: 3px;
  --green: #50fa7b; --gold: #f1fa8c;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  font-family: var(--font-body);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 30% 0%, rgba(77,222,255,0.06) 0%, transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(77,222,255,0.03) 47px, rgba(77,222,255,0.03) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(77,222,255,0.03) 47px, rgba(77,222,255,0.03) 48px);
}

/* Subtle CRT scanlines */
body.holo::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px);
}

/* ═══ DAYLIGHT MODE ═══ */
body.holo.light {
  --bg: #eef3f6; --surface: #ffffff; --surface2: #e2ebf0; --surface3: #d3e1e9;
  --border: rgba(10,120,150,0.2); --border-hover: rgba(10,120,150,0.45); --border-hard: rgba(10,120,150,0.55);
  --text: #16323e; --text-muted: #5b7787; --text-dim: #b9cbd6;
  --accent: #0a90b4; --accent2: #066c88; --accent-dim: rgba(10,144,180,0.09); --accent-glow: rgba(10,144,180,0.16);
  --accent-contrast: #ffffff;
  --header-bg: rgba(255,255,255,0.92);
  --green: #189a4a; --gold: #9a7b0a;
  background-image:
    radial-gradient(ellipse 70% 45% at 30% 0%, rgba(10,144,180,0.05) 0%, transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(10,144,180,0.04) 47px, rgba(10,144,180,0.04) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(10,144,180,0.04) 47px, rgba(10,144,180,0.04) 48px);
}
body.holo.light::after { background: none; }
body.holo.light .sys-dot { background: #189a4a; box-shadow: 0 0 6px rgba(24,154,74,0.5); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

body { color: var(--text); min-height: 100vh; font-size: 15px; line-height: 1.5; }

/* ═══ TOP BAR ═══ */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  max-width: 1200px; margin: 0 auto; padding: 18px 28px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-logo {
  width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid var(--border-hard); background: var(--accent-dim); border-radius: var(--radius);
  box-shadow: 0 0 14px var(--accent-glow), inset 0 0 8px rgba(77,222,255,0.08);
}
.brand-logo svg { width: 100%; height: 100%; display: block; }
.brand-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.1; color: var(--text); }
.brand-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); opacity: 0.75; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.mode-toggle { display: flex; gap: 2px; }
.mode-btn { background: transparent; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); cursor: pointer; width: 28px; height: 26px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; padding: 0; }
.mode-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mode-btn:hover { border-color: var(--border-hover); color: var(--text); }
.mode-btn.active { border-color: var(--accent); color: var(--accent); }

/* ═══ LAYOUT ═══ */
.wrap { max-width: 1200px; margin: 0 auto; padding: 22px 28px 48px; }

.statusbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 28px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
}
.statusbar .crumb { color: var(--accent); opacity: 0.8; }
.status-right { display: flex; align-items: center; gap: 18px; min-height: 26px; }
.status-item { display: flex; align-items: center; gap: 6px; }
.sys-dot { width: 6px; height: 6px; border-radius: 50%; background: #50fa7b; box-shadow: 0 0 8px rgba(80,250,123,0.7); animation: pulse 2.4s ease-in-out infinite; }

.page-header { margin-bottom: 26px; }
.page-title { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.1; color: var(--text); text-shadow: 0 0 20px var(--accent-glow); }
.page-title .tick { color: var(--accent); }
.page-tagline { font-size: 13px; color: var(--text-muted); max-width: 560px; line-height: 1.6; margin-top: 6px; }

.site-foot { margin-top: 34px; border-top: 1px solid var(--border); padding-top: 14px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); line-height: 1.9; }
.site-foot a { color: var(--text-muted); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }

/* ═══ BUTTONS / PILLS ═══ */
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); padding: 7px 14px; border-radius: var(--radius); font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 6px; text-decoration: none; }
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface2); }
.btn-help { background: transparent; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); cursor: pointer; font-family: var(--font-display); font-size: 12px; font-weight: 700; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.btn-help:hover { border-color: var(--border-hover); color: var(--text); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); border: none; padding: 7px 16px; border-radius: var(--radius); font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer; transition: filter 0.15s; display: flex; align-items: center; gap: 6px; }
.btn-primary:hover { filter: brightness(1.12); }

.section-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); opacity: 0.7; margin-bottom: 8px; padding-left: 2px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 10px; }
.filter-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.pill:hover { border-color: var(--border-hover); color: var(--text); }
.pill.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.pill-count { font-size: 10px; opacity: 0.6; margin-left: 4px; font-family: var(--font-mono); }
.sub-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.sub-pills .pill { font-size: 10px; padding: 4px 11px; }
.sub-pills .pill.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-muted); fill: none; stroke-width: 2; pointer-events: none; }
.search-input { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 12px 7px 32px; color: var(--text); font-family: var(--font-mono); font-size: 12px; width: 220px; outline: none; transition: border-color 0.15s; }
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--border-hover); }

/* ═══ WEAPON LIST ═══ */
.weapon-group { margin-bottom: 1.5rem; }
.weapon-rows { display: flex; flex-direction: column; gap: 6px; }
.weapon-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 13px 18px; cursor: pointer; color: inherit; font-family: inherit; font-size: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.weapon-row:hover { border-color: var(--border-hover); background: var(--surface2); }
.weapon-row:hover .wr-name { color: var(--accent); }
.wr-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.04em; transition: color 0.15s; }
.wr-mfr { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.wr-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.wr-badge { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); padding: 3px 8px; border-radius: var(--radius); white-space: nowrap; }
.wr-arrow { color: var(--accent); font-family: var(--font-display); font-weight: 700; }
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.loading-state { text-align: center; padding: 4rem; color: var(--text-muted); font-size: 13px; }

/* ═══ DETAIL VIEW ═══ */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.1; text-shadow: 0 0 18px var(--accent-glow); }
.detail-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); opacity: 0.8; margin-top: 4px; }
.detail-note { font-size: 12px; color: #e8a80b; margin-top: 6px; }
body.holo.light .detail-note { color: #9a7b0a; }

.stat-strip { display: flex; flex-wrap: wrap; gap: 1px; background: var(--border); border: 1px solid var(--border-hard, var(--border)); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.25rem; }
.stat-box { background: var(--surface); padding: 12px 18px; flex: 1; min-width: 110px; }
.stat-box-label { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.stat-box-value { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1; }
.stat-box-sub { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); margin-top: 3px; }

.attach-row { margin-bottom: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.attach-row-label { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.attach-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.attach-pills .pill .attach-mods { pointer-events: none; }
.attach-mods { font-family: var(--font-mono); font-size: 9px; color: var(--accent); margin-left: 7px; white-space: nowrap; opacity: 0.85; }
.attach-pills .pill.active .attach-mods { color: var(--accent-contrast); opacity: 0.9; }
.attach-none { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.04em; }

.matrix-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }

/* ═══ MATRIX TABLE ═══ */
.table-wrap { background: var(--surface); border: 1px solid var(--border-hard, var(--border)); border-radius: var(--radius-lg); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); padding: 12px 16px; border-bottom: 1px solid var(--border-hard, var(--border)); font-weight: 400; white-space: nowrap; background: var(--surface2); }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
td { padding: 11px 16px; font-size: 13px; vertical-align: middle; }
.armor-name { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.num { font-family: var(--font-mono); font-size: 13px; }
.stk-val { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--accent); }
.stk-val.stk-improved { color: var(--green); }
.stk-val.stk-worse { color: #e8a80b; }
body.light .stk-val.stk-worse { color: #9a7b0a; }
tr.row-improved td { background: rgba(80,250,123,0.045); }
.stk-unit { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); margin-left: 3px; }
.ttk-instant { color: var(--green); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.craft-val { font-family: var(--font-mono); font-size: 12px; color: var(--gold, #f1fa8c); border: 1px solid rgba(232,168,11,0.3); background: rgba(232,168,11,0.07); padding: 3px 8px; border-radius: var(--radius); white-space: nowrap; }
body.light .craft-val { color: #9a7b0a; border-color: rgba(154,123,10,0.4); background: rgba(154,123,10,0.07); }
.craft-val.craft-met { color: #50fa7b; border-color: rgba(80,250,123,0.35); background: rgba(80,250,123,0.08); }
body.light .craft-val.craft-met { color: #189a4a; border-color: rgba(24,154,74,0.4); background: rgba(24,154,74,0.07); }
.craft-val.craft-unreachable { opacity: 0.35; border-style: dashed; }

.quality-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.quality-row-label { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
#qualitySlider { flex: 1; min-width: 160px; max-width: 360px; accent-color: var(--accent); cursor: pointer; }
.quality-readout { font-family: var(--font-mono); font-size: 12px; color: var(--accent); white-space: nowrap; }
.cell-none { color: var(--text-dim); }

.matrix-foot { margin-top: 10px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; color: var(--text-dim); line-height: 1.7; }
.matrix-foot strong { color: var(--text-muted); font-weight: 400; }

/* ═══ TOAST + MODAL + TUTORIAL (trimmed from VerseWorks app.css) ═══ */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border-hover); border-radius: var(--radius); padding: 10px 18px; font-size: 13px; color: var(--text); box-shadow: 0 4px 20px rgba(0,0,0,0.4); z-index: 999; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.toast.show { opacity: 1; }

.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border-hover); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 540px; margin: 1rem; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 16px; font-weight: 600; color: var(--text); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.modal-close:hover { color: var(--text); background: var(--surface2); }

.tutorial-modal { max-width: 500px; }
.tut-step { display: flex; flex-direction: column; gap: 12px; }
.tut-icon { font-size: 30px; line-height: 1; }
.tut-heading { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.2; }
.tut-p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.tut-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--border); }
.tut-dots { display: flex; gap: 6px; align-items: center; }
.tut-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-hover); transition: background 0.2s; }
.tut-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }
.tut-nav { display: flex; gap: 8px; }

/* ═══ MOBILE ═══ */
@media (max-width: 700px) {
  .topbar, .wrap { padding-left: 16px; padding-right: 16px; }
  .page-title { font-size: 24px; }
  .search-input { width: 150px; }
  .stat-box { min-width: 90px; padding: 10px 12px; }
  .detail-title { font-size: 21px; }
  td, thead th { padding: 9px 10px; }
}
