/* ═══════════════════════════════════════════════════════════
   TCL Roleplay — styles.css
   Theme: deep-navy base · ice-blue (sci-fi) · violet (supernatural)
   ═══════════════════════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
  --bg:        #06090f;
  --surface:   #090d16;
  --panel:     #0c1220;
  --border:    rgba(120,160,255,.09);
  --border-hi: rgba(160,200,255,.15);
  --text:      #dce8f8;
  --muted:     #7a94b8;
  --dim:       #3d536e;

  /* Ice-blue — sci-fi, terminals, data, structure */
  --accent:    #4da8e8;
  --accent-lo: rgba(77,168,232,.08);
  --accent-md: rgba(77,168,232,.18);

  /* Violet — supernatural, anomalies, the Imperium's shadow */
  --violet:    #9b6ef3;
  --violet-lo: rgba(155,110,243,.08);
  --violet-md: rgba(155,110,243,.18);

  /* Amber — donate, humanity, warmth */
  --warn:      #e8c14a;
  --warn-lo:   rgba(232,193,74,.08);
  --warn-md:   rgba(232,193,74,.18);

  /* Sage green — base building, survival mechanics, crafting */
  --green:     #6ab87a;
  --green-lo:  rgba(106,184,122,.08);
  --green-md:  rgba(106,184,122,.18);

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --r: 11px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Scanline texture ── */
body::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,.025) 2px, rgba(0,0,0,.025) 4px
  );
  z-index: 999;
}

/* ── Ambient glows ── */
body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 1000px 500px at 10% -10%, rgba(77,168,232,.08)  0%, transparent 65%),
    radial-gradient(ellipse 700px  400px at 90% 5%,  rgba(155,110,243,.06) 0%, transparent 60%);
  z-index: 0;
}

/* ── Layout ── */
.wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Header ── */
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
}

.brand { display: flex; align-items: center; gap: 13px; }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-hi);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

/* Corner tick marks */
.brand-mark::before,
.brand-mark::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  border-color: rgba(77,168,232,.5);
  border-style: solid;
  border-width: 0;
}
.brand-mark::before { top: 3px;    left: 3px;  border-top-width: 1px;    border-left-width: 1px; }
.brand-mark::after  { bottom: 3px; right: 3px; border-bottom-width: 1px; border-right-width: 1px; }

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.brand-icon { color: var(--accent); }

.brand-text h1 {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--text);
  line-height: 1.2;
}
.brand-text p {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.3;
  margin-top: 2px;
}

/* Donate button */
.btn-donate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .3px;
  border: 1px solid rgba(232,193,74,.3);
  background: var(--warn-lo);
  color: var(--warn);
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}
.btn-donate:hover { background: var(--warn-md); border-color: rgba(232,193,74,.5); }

/* ── Sticky nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(6,9,15,.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 9px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-link {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--dim);
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.04); border-color: var(--border); }

.nav-link.is-accent {
  color: var(--accent);
  border-color: rgba(77,168,232,.28);
  background: var(--accent-lo);
}
.nav-link.is-accent:hover { background: var(--accent-md); border-color: rgba(77,168,232,.4); }

.nav-link.is-warn {
  color: var(--warn);
  border-color: rgba(232,193,74,.25);
  background: var(--warn-lo);
}
.nav-link.is-warn:hover { background: var(--warn-md); }

.nav-link.is-violet {
  color: var(--violet);
  border-color: rgba(155,110,243,.28);
  background: var(--violet-lo);
}
.nav-link.is-violet:hover { background: var(--violet-md); border-color: rgba(155,110,243,.45); }

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--border-hi);
  margin: 0 6px;
  flex-shrink: 0;
}

/* ── Main ── */
main { position: relative; z-index: 1; padding: 6px 0 56px; }

/* ── Eyebrow labels ── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.eyebrow-line { flex: 1; height: 1px; background: var(--border); }

/* ── Cards ── */
.card {
  background: linear-gradient(155deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.008) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Top-left accent hairline */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .4;
}

.section { margin-top: 10px; }

/* ── Hero two-column grid ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 10px;
  align-items: stretch;
  margin: 10px 0;
}

/* Left column: About + Getting Started stacked, each fills equal height */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}
.hero-left .card { flex: 1; }

/* Right column: Radio card fills full height */
.hero-right {
  display: flex;
  flex-direction: column;
}
.hero-right .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hero-right .radio-feed {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-left  { height: auto; }
}

/* ── About ── */
.about-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}
.about-body p + p { margin-top: 10px; }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.tag-chip {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-hi);
  background: rgba(255,255,255,.025);
  color: var(--dim);
}
.tag-chip.accent {
  border-color: rgba(77,168,232,.28);
  background: var(--accent-lo);
  color: rgba(77,168,232,.9);
}
.tag-chip.violet {
  border-color: rgba(155,110,243,.28);
  background: var(--violet-lo);
  color: rgba(155,110,243,.9);
}

/* ── Radio ── */
.radio-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.radio-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
}
.radio-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 5px var(--accent); }
  50%       { opacity: .25; box-shadow: none; }
}
.radio-freq {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: .5px;
}
.radio-feed { display: flex; flex-direction: column; gap: 6px; }

.radio-msg {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-left: 2px solid rgba(77,168,232,.35);
  border-radius: 7px;
  background: rgba(0,0,0,.22);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.radio-msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.radio-callsign {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--accent);
}
.radio-timestamp {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
}
.radio-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
}
.radio-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  opacity: .6;
}
.radio-footer-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.radio-footer-note.is-error { color: #e05555; }

/* ── Getting Started steps ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 860px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps-grid { grid-template-columns: 1fr; } }

.step {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  background: rgba(255,255,255,.015);
}
.step-num {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .6px;
  color: var(--accent);
  opacity: .65;
  margin-bottom: 7px;
}
.step-title {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.step p { font-size: 12.5px; color: var(--muted); }

/* ── Server Rules ── */
.rules-list { display: flex; flex-direction: column; gap: 5px; }

details.rule {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.015);
  overflow: hidden;
}
details.rule[open] { border-color: var(--border-hi); }

details.rule summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .12s;
}
details.rule summary::-webkit-details-marker { display: none; }
details.rule summary:hover { background: rgba(255,255,255,.02); }

.rule-num {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  width: 16px;
  flex-shrink: 0;
}
.rule-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.rule-caret { font-size: 9px; color: var(--dim); transition: transform .2s; }
details.rule[open] .rule-caret { transform: rotate(180deg); }
.rule-body {
  padding: 0 14px 12px 40px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Tips & Tricks ── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px;
}
.tip {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  background: rgba(255,255,255,.015);
  position: relative;
  overflow: hidden;
}
/* Violet corner bracket — supernatural flourish */
.tip::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 28px; height: 28px;
  border-top: 1px solid rgba(155,110,243,.25);
  border-left: 1px solid rgba(155,110,243,.25);
  border-radius: 7px 0 0 0;
}
.tip-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--violet);
  opacity: .9;
  margin-bottom: 7px;
}
.tip p { font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* ── Shared button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3px;
  border: 1px solid rgba(77,168,232,.28);
  background: var(--accent-lo);
  color: var(--accent);
  transition: background .2s, border-color .2s;
}
.btn:hover { background: var(--accent-md); border-color: rgba(77,168,232,.5); }

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 20px 0 14px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-left {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); opacity: .5; }
.footer-right {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  opacity: .4;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Mobile tweaks ── */
@media (max-width: 540px) {
  .brand-text p { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   PAGE-SPECIFIC STYLES
   (rules.html, lore.html, 404.html)
   ═══════════════════════════════════════════════════════════ */

/* ── Page hero (sub-pages) ── */
.page-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.page-hero-eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.page-hero h2 {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.2px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.page-hero p {
  font-size: 14px;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.65;
}

/* ── Active nav indicator (current page) ── */
.nav-link.is-active {
  color: var(--text);
  background: rgba(255,255,255,.05);
  border-color: var(--border-hi);
}

/* ── Full rules page ── */
.rules-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 700px) {
  .rules-page-grid { grid-template-columns: 1fr; }
}

.rule-category {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--violet);
  opacity: .85;
  margin-bottom: 10px;
}

.rule-full {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,.015);
  padding: 14px 16px;
}
.rule-full + .rule-full { margin-top: 8px; }

.rule-full-num {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.rule-full-title {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.rule-full-body {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.rules-note {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(232,193,74,.2);
  border-radius: 9px;
  background: rgba(232,193,74,.05);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.rules-note strong {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--warn);
  display: block;
  margin-bottom: 5px;
}

/* ── Lore page faction cards ── */
.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.faction-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255,255,255,.015);
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.faction-card:hover { border-color: var(--border-hi); }

/* Colour-coded left edge per faction alignment */
.faction-card.is-antagonist { border-left: 3px solid rgba(155,110,243,.5); }
.faction-card.is-ally       { border-left: 3px solid rgba(77,168,232,.5); }
.faction-card.is-neutral    { border-left: 3px solid rgba(61,80,100,.6); }
.faction-card.is-cosmic     { border-left: 3px solid rgba(232,193,74,.4); }

.faction-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.faction-card-name {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.faction-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  flex-shrink: 0;
}
.faction-badge.antagonist { color: rgba(155,110,243,.9); background: rgba(155,110,243,.1); border: 1px solid rgba(155,110,243,.25); }
.faction-badge.ally       { color: rgba(77,168,232,.9);  background: rgba(77,168,232,.1);  border: 1px solid rgba(77,168,232,.25); }
.faction-badge.neutral    { color: var(--dim);            background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.faction-badge.cosmic     { color: rgba(232,193,74,.9);  background: rgba(232,193,74,.08); border: 1px solid rgba(232,193,74,.2); }

.faction-card-quote {
  font-size: 11.5px;
  color: var(--dim);
  font-style: italic;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}
.faction-card-body {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* Lore resource link list */
.lore-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.lore-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.015);
  transition: border-color .18s, background .18s;
  text-decoration: none;
  color: inherit;
}
.lore-link-card:hover {
  border-color: var(--border-hi);
  background: rgba(255,255,255,.03);
}
.lore-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.lore-link-icon.blue   { background: var(--accent-lo); border: 1px solid rgba(77,168,232,.2); }
.lore-link-icon.violet { background: var(--violet-lo); border: 1px solid rgba(155,110,243,.2); }
.lore-link-icon.amber  { background: var(--warn-lo);   border: 1px solid rgba(232,193,74,.2); }

.lore-link-text {}
.lore-link-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.lore-link-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   TIPS & TRICKS PAGE (tips.html)
   ═══════════════════════════════════════════════════════════ */

/* ── Two-panel reference layout ── */
/* .ref-section sits inside .card — no border/radius/margin needed here */
.ref-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  overflow: hidden;
}

/* Left panel */
.ref-label-col {
  padding: 22px 20px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.025) 0%, rgba(255,255,255,.008) 100%);
  position: relative;
}

/* Top accent hairline — color matches section theme */
.ref-label-col::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .5;
}
.ref-label-col.is-violet::before { background: linear-gradient(90deg, var(--violet), transparent); }
.ref-label-col.is-warn::before   { background: linear-gradient(90deg, var(--warn),   transparent); }
.ref-label-col.is-green::before  { background: linear-gradient(90deg, var(--green),  transparent); }

.ref-section-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1.3;
}
.ref-section-title.is-violet { color: var(--violet); }
.ref-section-title.is-warn   { color: var(--warn); }
.ref-section-title.is-green  { color: var(--green); }

.ref-section-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

/* Right panel */
.ref-content-col {
  padding: 20px;
  background: rgba(255,255,255,.008);
}

/* Section intro — separator line before content */
.ref-intro {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* Mobile: stack panels */
@media (max-width: 700px) {
  .ref-section { grid-template-columns: 1fr; }
  .ref-label-col { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── Overview body ── */
.overview-body {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Item type groups ── */
.item-type-header {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.item-type-header.armor   { color: var(--accent); }
.item-type-header.alchemy { color: var(--warn); }
.item-type-header.base    { color: var(--green); }

.item-type-group + .item-type-group { margin-top: 18px; }

/* ── Item rows ── */
.item-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.015);
  align-items: start;
  transition: border-color .15s, background .15s;
}
.item-row + .item-row { margin-top: 5px; }
.item-row:hover { border-color: var(--border-hi); background: rgba(255,255,255,.025); }

@media (max-width: 620px) {
  .item-row { grid-template-columns: 1fr; gap: 8px; }
}

.item-row-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  padding-top: 1px;
}
.item-row-body {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}
.item-row-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  flex-shrink: 0;
}
@media (max-width: 620px) {
  .item-row-tags { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
}

/* ── Item badges ── */
.item-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.item-badge.armor   { color: rgba(77,168,232,.9);  background: rgba(77,168,232,.1);  border: 1px solid rgba(77,168,232,.25); }
.item-badge.alchemy { color: rgba(232,193,74,.9);  background: rgba(232,193,74,.08); border: 1px solid rgba(232,193,74,.2); }
.item-badge.base    { color: rgba(106,184,122,.9); background: rgba(106,184,122,.08); border: 1px solid rgba(106,184,122,.2); }
.item-badge.tag     { color: var(--dim); background: rgba(255,255,255,.03); border: 1px solid var(--border-hi); }

/* ── Mechanic rows ── */
.mechanic-list { display: flex; flex-direction: column; gap: 6px; }

.mechanic-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.015);
  align-items: start;
  transition: border-color .15s;
}
.mechanic-row:hover { border-color: var(--border-hi); }

@media (max-width: 580px) {
  .mechanic-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Severity left-border accent */
.mechanic-row.sev-high { border-left: 2px solid rgba(224,85,85,.55); }
.mechanic-row.sev-med  { border-left: 2px solid rgba(232,193,74,.45); }
.mechanic-row.sev-low  { border-left: 2px solid rgba(77,168,232,.4); }
.mechanic-row.sev-lore { border-left: 2px solid rgba(155,110,243,.4); }
.mechanic-row.sev-base { border-left: 2px solid rgba(106,184,122,.4); }

.mechanic-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 1px;
}
.mechanic-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.mechanic-sev {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .7px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  width: fit-content;
}
.mechanic-sev.high { color: #e05555;       background: rgba(224,85,85,.1);  border: 1px solid rgba(224,85,85,.25); }
.mechanic-sev.med  { color: var(--warn);   background: var(--warn-lo);      border: 1px solid rgba(232,193,74,.25); }
.mechanic-sev.low  { color: var(--accent); background: var(--accent-lo);    border: 1px solid rgba(77,168,232,.25); }
.mechanic-sev.lore { color: var(--violet); background: var(--violet-lo);    border: 1px solid rgba(155,110,243,.25); }
.mechanic-sev.base { color: var(--green);  background: var(--green-lo);     border: 1px solid rgba(106,184,122,.25); }

.mechanic-body {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Tips callout note ── */
.tips-callout {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(232,193,74,.2);
  border-radius: 8px;
  background: rgba(232,193,74,.05);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}
.tips-callout strong {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--warn);
  display: block;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════
   404 PAGE (404.html)
   ═══════════════════════════════════════════════════════════ */

.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  min-height: 60vh;
}
.page-404-code {
  font-family: var(--mono);
  font-size: 72px;
  font-weight: 600;
  color: var(--border-hi);
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 8px;
}
.page-404-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 20px;
}
.page-404 h2 {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.page-404 p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.65;
  margin-bottom: 28px;
}
.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   STAFF PORTAL STYLES
   (staff/index.html, staff/dashboard.html)
   ═══════════════════════════════════════════════════════════ */

/* ── Staff login page ── */
.staff-login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 400px;
  margin: 80px auto 0;
  padding: 36px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  background: linear-gradient(155deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.008) 100%);
  position: relative;
  overflow: hidden;
}

.staff-login-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .5;
}

.staff-login-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border-hi);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
}

.staff-login-eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}

.staff-login-wrap h2 {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.staff-login-wrap p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Discord login button */
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  border: 1px solid rgba(88, 101, 242, .45);
  background: rgba(88, 101, 242, .12);
  color: #8ea0f8;
  transition: background .2s, border-color .2s, color .2s;
  text-decoration: none;
}
.btn-discord:hover {
  background: rgba(88, 101, 242, .22);
  border-color: rgba(88, 101, 242, .65);
  color: #b0bcff;
}

/* Error note below login button */
.staff-error-note {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 7px;
  border: 1px solid rgba(224, 85, 85, .3);
  background: rgba(224, 85, 85, .07);
  font-family: var(--mono);
  font-size: 11px;
  color: #e05555;
  line-height: 1.5;
  text-align: left;
  width: 100%;
}

/* ── Dashboard header bar ── */
.staff-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

/* User badge (avatar + name + role) */
.staff-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border-hi);
  border-radius: 9px;
  background: var(--panel);
}

.staff-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  object-fit: cover;
  flex-shrink: 0;
}

.staff-username {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.staff-role-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
}

/* Logout button */
.btn-logout {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3px;
  border: 1px solid var(--border-hi);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  transition: background .2s, border-color .2s, color .2s;
  text-decoration: none;
}
.btn-logout:hover {
  background: rgba(224, 85, 85, .08);
  border-color: rgba(224, 85, 85, .3);
  color: #e05555;
}

/* ── Dashboard layout grid ── */
.staff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.staff-grid-full {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .staff-grid { grid-template-columns: 1fr; }
}

/* ── Staff resource links ── */
.staff-link-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.staff-resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.015);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, background .18s;
}
.staff-resource-link:hover {
  border-color: var(--border-hi);
  background: rgba(255,255,255,.03);
}

.staff-resource-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.staff-resource-icon.amber  { background: var(--warn-lo);   border: 1px solid rgba(232,193,74,.2); }
.staff-resource-icon.violet { background: var(--violet-lo); border: 1px solid rgba(155,110,243,.2); }
.staff-resource-icon.blue   { background: var(--accent-lo); border: 1px solid rgba(77,168,232,.2); }

.staff-resource-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.staff-resource-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

/* ── Loading dots ── */
.staff-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.staff-loading-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .4;
  animation: staff-pulse 1.2s ease-in-out infinite;
}
.staff-loading-dot:nth-child(2) { animation-delay: .2s; }
.staff-loading-dot:nth-child(3) { animation-delay: .4s; }

@keyframes staff-pulse {
  0%, 100% { opacity: .2; transform: scale(.85); }
  50%       { opacity: 1;  transform: scale(1); }
}

/* ── Event list ── */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.015);
  transition: border-color .15s;
}
.event-item:hover { border-color: var(--border-hi); }

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 6px 4px;
  border-radius: 7px;
  border: 1px solid var(--border-hi);
  background: var(--panel);
  flex-shrink: 0;
}

.event-date-day {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.event-date-mon {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .6px;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 2px;
}

.event-name {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}

.event-meta {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

.event-tag {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-hi);
  background: rgba(255,255,255,.025);
  color: var(--dim);
  align-self: flex-start;
}

/* radio msg header (dashboard uses radio-msg-header, not radio-msg-meta) */
.radio-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.radio-time {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
}

.radio-msg-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
}
