/* ============================================================================
   1n2.org · Vegas Wiki — wikipedia-vector-on-dark theme
   Pattern: curio-wiki's Wikipedia Vector 2022 layout + 1n2 dark-space accents.
   Used by every page in /vegas-wiki/.
   ============================================================================ */

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

:root {
  --bg:        #0b0d12;
  --surface:   #14171f;
  --surface-2: #1d2230;
  --surface-3: #11141c;
  --border:    #262b35;
  --border-2:  #2a3148;
  --text:      #e4e6eb;
  --text-mute: #94a3b8;
  --text-dim:  #6b6d7a;
  --link:      #7dd3fc;
  --link-vis:  #c084fc;
  --gold:      #ffd24a;
  --neon:      #ff4dd2;
  --pool:      #4ad9ff;
  --green:     #7fff9a;
  --red:       #ff5959;
  --warn:      #ffb84d;
  --star:      #b59cff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: var(--link-vis); }

/* === HEADER (sticky) === */
.wiki-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-2);
  padding: 0;
  display: flex;
  align-items: stretch;
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.wiki-logo {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.2em;
  color: var(--text);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.wiki-logo:hover { text-decoration: none; }
.wiki-logo span { font-weight: 700; color: var(--gold); }
.wiki-nav {
  display: flex;
  align-items: center;
  font-size: 0.875em;
  flex: 1;
  overflow-x: auto;
}
.wiki-nav a {
  color: var(--link);
  padding: 14px 12px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.wiki-nav a:hover {
  background: rgba(125,211,252,.06);
  text-decoration: none;
}
.wiki-nav .asof {
  margin-left: auto;
  padding: 0 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  color: var(--warn);
  letter-spacing: .12em;
  text-transform: uppercase;
  align-self: center;
}

/* === BODY LAYOUT === */
.wiki-body {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 0;
  background: var(--surface-3);
}
.wiki-sidebar {
  width: 220px;
  flex-shrink: 0;
  font-size: 0.875em;
  padding: 16px 0;
  border-right: 1px solid var(--border);
  background: var(--surface-3);
  min-height: calc(100vh - 50px);
}
.wiki-sidebar h3 {
  font-size: 0.7em;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 14px 4px;
  margin-top: 8px;
}
.wiki-sidebar h3:first-child { margin-top: 0; }
.wiki-sidebar ul { list-style: none; }
.wiki-sidebar a {
  color: var(--link);
  display: block;
  padding: 4px 14px;
  font-size: 0.92em;
}
.wiki-sidebar a:hover {
  background: rgba(125,211,252,.07);
  text-decoration: none;
}
.wiki-sidebar a.active {
  font-weight: 700;
  background: rgba(255,210,74,.07);
  border-left: 3px solid var(--gold);
  padding-left: 11px;
}

/* === CONTENT === */
.wiki-content {
  flex: 1;
  background: transparent;
  padding: 22px 36px 40px;
  min-height: calc(100vh - 50px);
  max-width: 1000px;
}

.article-title {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 2em;
  font-weight: 400;
  line-height: 1.2;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 0.2em;
  margin-bottom: 0.4em;
  color: #f3f4f6;
}
.article-subtitle {
  color: var(--text-mute);
  font-size: .95em;
  font-style: italic;
  margin-bottom: 1.2em;
}

.article { font-size: 0.95em; line-height: 1.65; }
.article h2 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.45em;
  font-weight: 400;
  line-height: 1.3;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 0.1em;
  margin: 1.4em 0 0.5em;
  color: #f3f4f6;
  clear: both;
}
.article h3 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.18em;
  font-weight: 700;
  margin: 1em 0 0.3em;
  color: #e8eaef;
}
.article p { margin-bottom: 0.6em; }
.article ul, .article ol { margin: 0.4em 0 0.7em 1.6em; }
.article li { margin-bottom: 0.25em; }

/* === INFOBOX (Wikipedia-style, on right) === */
.infobox {
  float: right;
  clear: right;
  width: 22em;
  margin: 0.4em 0 1em 1.6em;
  border: 1px solid var(--border-2);
  border-spacing: 0;
  background: var(--surface);
  font-size: 0.85em;
  line-height: 1.45;
}
.infobox .ib-title {
  background: var(--surface-2);
  padding: 0.45em 0.6em;
  font-size: 1.05em;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid var(--border-2);
  color: var(--gold);
}
.infobox .ib-sub {
  background: var(--surface-3);
  padding: 0.3em 0.6em;
  font-size: 0.85em;
  text-align: center;
  border-bottom: 1px solid var(--border-2);
  color: var(--text-mute);
  font-style: italic;
}
.infobox table { width: 100%; border-collapse: collapse; }
.infobox td, .infobox th {
  padding: 0.3em 0.6em;
  vertical-align: top;
  border-top: 1px solid var(--border);
  font-size: .92em;
}
.infobox th {
  text-align: left;
  font-weight: 600;
  background: rgba(45,52,73,.4);
  width: 36%;
  color: var(--text-mute);
}

/* === BREADCRUMB === */
.breadcrumb {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--link); }

/* === ASOF BANNER === */
.asof-banner {
  display: inline-block;
  background: rgba(255,184,77,.08);
  border-left: 3px solid var(--warn);
  padding: 6px 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--warn);
  margin: 8px 0 16px;
}

/* === TABLES === */
table.wikitable {
  border-collapse: collapse;
  margin: 0.6em 0;
  background: var(--surface);
  font-size: 0.92em;
  width: 100%;
}
table.wikitable th, table.wikitable td {
  border: 1px solid var(--border-2);
  padding: 0.4em 0.7em;
  text-align: left;
  vertical-align: top;
}
table.wikitable th {
  background: var(--surface-2);
  color: var(--gold);
  font-weight: 600;
}
table.wikitable tr:nth-child(even) td { background: rgba(255,255,255,.015); }

/* === BACKLINKS panel === */
.backlinks {
  margin-top: 2em;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--pool);
  font-size: .9em;
}
.backlinks .label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .7rem;
  color: var(--pool);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.backlinks ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
}
.backlinks li {
  margin: 0;
  font-size: .9em;
}
.backlinks li::before { content: "→ "; color: var(--text-dim); }

/* === CATEGORIES === */
.categories {
  border-top: 1px solid var(--border-2);
  padding: 0.8em 0;
  margin-top: 1.5em;
  font-size: 0.85em;
  color: var(--text-mute);
}
.categories b { color: var(--text); font-weight: 600; }
.categories a { color: var(--link); }
.categories .sep { color: var(--text-dim); margin: 0 4px; }

/* === REFERENCES === */
.reflist {
  font-size: 0.88em;
  line-height: 1.55;
  list-style-type: decimal;
  margin-left: 1.7em;
  color: var(--text-mute);
}
.reflist li {
  margin-bottom: 0.4em;
  break-inside: avoid;
}
.reflist a { color: var(--link); }
sup.ref { font-size: 0.75em; line-height: 0; }
sup.ref a { color: var(--link); }

/* === INDEX CARDS === */
.idx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 12px 0 24px;
}
.idx-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: inherit;
  transition: border-color .15s, transform .12s;
}
.idx-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  text-decoration: none;
}
.idx-card .nm {
  font-weight: 700;
  color: var(--gold);
  font-size: .98rem;
  margin-bottom: 4px;
}
.idx-card .meta {
  font-size: .78rem;
  color: var(--text-mute);
  line-height: 1.35;
}

/* === STAT BOXES === */
.stat-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 22px;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 18px;
  text-align: center;
  flex: 1;
  min-width: 130px;
}
.stat-box .n {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.stat-box .l {
  font-size: .72rem;
  color: var(--text-mute);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* === SEARCH (jump-nav) === */
.search-wrap {
  margin: 12px 0 20px;
  position: relative;
}
.search-wrap input {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
}
.search-wrap input:focus {
  outline: none;
  border-color: var(--gold);
}
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-size: .9em;
  border-bottom: 1px solid var(--border);
}
.search-results a:hover {
  background: rgba(125,211,252,.06);
  text-decoration: none;
}
.search-results a .kind {
  display: inline-block;
  font-size: .7em;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-left: 8px;
}

/* === FOOTER === */
.wiki-footer {
  text-align: center;
  padding: 18px;
  font-size: 0.82em;
  color: var(--text-mute);
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 0;
}
.wiki-footer a { color: var(--link); }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .wiki-body { flex-direction: column; }
  .wiki-sidebar {
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
  }
  .wiki-sidebar h3 { padding: 4px 0; }
  .wiki-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
  }
  .wiki-sidebar a { padding: 4px 8px; font-size: 0.82em; }
  .wiki-content { padding: 16px; }
  .infobox { float: none; width: 100%; margin: 0.5em 0; }
}
@media (max-width: 600px) {
  .wiki-header { height: auto; flex-wrap: wrap; }
  .wiki-nav .asof { display: none; }
  .article-title { font-size: 1.5em; }
}

/* ============================================================================
   HOMEPAGE FLAGSHIP  —  "Who Owns Las Vegas" (index.html only)
   ============================================================================ */
.vw-banner {
  display: block;
  background: rgba(255,184,77,.09);
  border: 1px solid rgba(255,184,77,.32);
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  padding: 9px 15px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--warn);
  margin: 12px 0 18px;
  line-height: 1.5;
}
.vw-lead { font-size: 1.01em; line-height: 1.72; }
.vw-lead p { margin-bottom: 0.75em; }
.vw-lead b { color: #f3f4f6; }

.vw-section { margin-top: 2.1em; }
.vw-section > p { font-size: .96em; line-height: 1.7; margin-bottom: .7em; }

.vw-figure {
  margin: 18px 0 22px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  overflow-x: auto;
}
.vw-figure svg { width: 100%; height: auto; display: block; }
.vw-figure.vw-tall { text-align: center; }
.vw-figure.vw-tall svg { max-width: 680px; margin: 0 auto; }
.vw-figcap {
  font-size: .79rem;
  line-height: 1.55;
  color: var(--text-mute);
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}
.vw-figcap b { color: var(--gold); font-weight: 600; }

.vw-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}
.vw-jump a {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 6px 12px;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--link);
}
.vw-jump a:hover { border-color: var(--gold); text-decoration: none; }

.vw-browse {
  border-top: 2px solid var(--border-2);
  margin-top: 2.6em;
  padding-top: 0.4em;
}
sup.ref a { text-decoration: none; }

@media (max-width: 700px) {
  .vw-figure { padding: 8px; border-radius: 9px; }
  .vw-figure.vw-tall svg { max-width: 100%; }
}
