/* ===== RSGOLDGUIDES — Design System ===== */
:root {
  --ink: #08070a;
  --void: #0d0b0e;
  --soil: #1a1410;
  --bark: #2a1f17;
  --bark-2: #3a2c20;
  --hide: #6b4f37;
  --hide-2: #8a6a4a;
  --parch: #c9a876;
  --parch-2: #d9bd8e;
  --bone: #ede2cf;
  --paper: #f5ecdb;
  --gilt: #e8c577;
  --ember: #d68b3c;
  --aether: #6fb8c0; /* cool futuristic accent — used very sparingly */
  --glow: 0 0 24px rgba(232, 197, 119, 0.18);
  --hairline: rgba(217, 189, 142, 0.14);
  --hairline-strong: rgba(217, 189, 142, 0.28);
  --noise-op: 0.045;

  --display: "Cinzel", "Trajan Pro", serif;
  --body: "Inter", "Helvetica Neue", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Menlo", monospace;
}

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

html, body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Body atmospheric backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 1200px 800px at 20% -10%, rgba(107, 79, 55, 0.18), transparent 60%),
    radial-gradient(ellipse 900px 600px at 95% 10%, rgba(232, 197, 119, 0.06), transparent 60%),
    radial-gradient(ellipse 1400px 700px at 50% 110%, rgba(42, 31, 23, 0.6), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.85   0 0 0 0 0.72   0 0 0 0 0.5  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: var(--noise-op);
  mix-blend-mode: overlay;
}

#root { position: relative; z-index: 2; }

/* ===== Type ===== */
.display { font-family: var(--display); font-weight: 600; letter-spacing: 0.02em; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--hide-2);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--soil); }
::-webkit-scrollbar-thumb { background: var(--bark-2); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--hide); }

/* ===== Reusable corners (futuristic-medieval frame) ===== */
.frame {
  position: relative;
  border: 1px solid var(--hairline-strong);
  background:
    linear-gradient(180deg, rgba(42, 31, 23, 0.55), rgba(13, 11, 14, 0.85));
  backdrop-filter: blur(2px);
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gilt);
  pointer-events: none;
}
.frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.frame-cross::before,
.frame-cross::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.frame-cross::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--gilt);
  border-left: 1px solid var(--gilt);
}
.frame-cross::after {
  top: -1px; right: -1px;
  border-top: 1px solid var(--gilt);
  border-right: 1px solid var(--gilt);
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: linear-gradient(180deg, rgba(8, 7, 10, 0.95), rgba(8, 7, 10, 0.72));
  border-bottom: 1px solid var(--hairline-strong);
  backdrop-filter: blur(8px);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.nav-mark {
  width: 38px;
  height: 38px;
  position: relative;
  flex-shrink: 0;
}
.nav-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 45deg, var(--gilt), var(--ember), var(--gilt), var(--parch), var(--gilt));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: markSpin 18s linear infinite;
}
.nav-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.nav-mark-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 16px;
  color: var(--gilt);
  z-index: 2;
}
@keyframes markSpin { to { transform: rotate(360deg); } }

.nav-title {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
}
.nav-sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--hide-2);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  position: relative;
  padding: 12px 18px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--parch);
  transition: color 240ms ease;
  white-space: nowrap;
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 1px;
  background: var(--gilt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms cubic-bezier(.65,.05,.36,1);
}
.nav-link:hover { color: var(--paper); }
.nav-link:hover::before,
.nav-link.active::before { transform: scaleX(1); }
.nav-link.active { color: var(--gilt); }

/* ===== Page container ===== */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 40px 96px;
  animation: pageIn 480ms cubic-bezier(.2,.7,.2,1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header { margin-bottom: 36px; }
.page-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--hide-2);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.page-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gilt);
}
.page-title {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 0.95;
}
.page-title em {
  font-style: italic;
  color: var(--gilt);
  font-weight: 400;
}
.page-subtitle {
  margin-top: 14px;
  font-size: 15px;
  color: var(--hide-2);
  max-width: 640px;
}

/* ===== Filter bar ===== */
.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--hairline-strong);
  background: linear-gradient(180deg, rgba(42, 31, 23, 0.4), rgba(13, 11, 14, 0.6));
}

.search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ink);
  border: 1px solid var(--hairline);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}
.search-input:focus-within {
  border-color: var(--gilt);
  box-shadow: var(--glow);
}
.search-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--paper);
  font-family: var(--body);
}
.search-input input::placeholder { color: var(--hide); }
.search-icon {
  width: 14px;
  height: 14px;
  color: var(--hide-2);
}

.select-input {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 36px 10px 14px;
  background: var(--ink);
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parch);
  cursor: pointer;
  transition: border-color 220ms ease;
}
.select-input:hover { border-color: var(--hide); }
.select-input::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--gilt);
  transform: translateY(-50%);
}
.select-input select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.chip {
  padding: 6px 14px;
  border: 1px solid var(--hairline-strong);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parch);
  cursor: pointer;
  transition: all 220ms ease;
  background: rgba(13, 11, 14, 0.6);
}
.chip:hover { color: var(--gilt); border-color: var(--gilt); }
.chip.active {
  background: var(--gilt);
  color: var(--ink);
  border-color: var(--gilt);
}

/* ===== Table ===== */
.table-wrap {
  position: relative;
  border: 1px solid var(--hairline-strong);
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.6), rgba(13, 11, 14, 0.95));
}
.table-wrap::before,
.table-wrap::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.table-wrap::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--gilt);
  border-left: 1px solid var(--gilt);
}
.table-wrap::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--gilt);
  border-right: 1px solid var(--gilt);
}

table.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.guide-table thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(42, 31, 23, 0.98), rgba(26, 20, 16, 0.98));
  border-bottom: 1px solid var(--gilt);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--parch-2);
  padding: 14px 18px;
  text-align: left;
  font-weight: 500;
  user-select: none;
  cursor: pointer;
  transition: color 220ms ease;
  z-index: 2;
}
.guide-table thead th:hover { color: var(--gilt); }
.guide-table thead th.sortable::after {
  content: "↕";
  margin-left: 8px;
  opacity: 0.35;
  font-size: 11px;
}
.guide-table thead th.sort-asc::after { content: "▲"; opacity: 1; color: var(--gilt); font-size: 9px; }
.guide-table thead th.sort-desc::after { content: "▼"; opacity: 1; color: var(--gilt); font-size: 9px; }

.guide-table tbody tr {
  border-bottom: 1px solid var(--hairline);
  transition: background 200ms ease;
  cursor: pointer;
}
.guide-table tbody tr:hover {
  background: rgba(232, 197, 119, 0.06);
}
.guide-table tbody tr:hover .row-method-name {
  color: var(--gilt);
}
.guide-table td {
  padding: 16px 18px;
  vertical-align: middle;
}
.row-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--hide);
  width: 50px;
}
.row-method {
  display: flex;
  align-items: center;
  gap: 14px;
}
.row-glyph {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline-strong);
  background: var(--ink);
}
.row-glyph svg { width: 16px; height: 16px; color: var(--parch); }
.row-method-name {
  font-size: 14.5px;
  color: var(--paper);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 220ms ease;
}
.row-gp {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--gilt);
  letter-spacing: 0.02em;
  font-weight: 500;
}
.row-gp-small { color: var(--hide-2); font-size: 10.5px; }
.row-cat {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parch);
  border: 1px solid var(--hairline-strong);
  background: rgba(26, 20, 16, 0.7);
}
.row-level {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--parch-2);
}
.afk-bars {
  display: flex;
  gap: 3px;
}
.afk-bar {
  width: 7px;
  height: 18px;
  background: rgba(232, 197, 119, 0.12);
}
.afk-bar.on { background: var(--gilt); box-shadow: 0 0 6px rgba(232, 197, 119, 0.5); }
.member-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.member-mark .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.member-mark.yes { color: var(--gilt); }
.member-mark.yes .dot { background: var(--gilt); box-shadow: 0 0 8px var(--gilt); }
.member-mark.no { color: var(--hide-2); }
.member-mark.no .dot { background: var(--hide); }

.empty-state {
  padding: 80px 40px;
  text-align: center;
  color: var(--hide-2);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 12px 18px;
  border: 1px solid var(--hairline);
  background: rgba(26, 20, 16, 0.5);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-2);
}
.pagination-controls { display: flex; gap: 6px; }
.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--hairline-strong);
  color: var(--parch);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  transition: all 200ms ease;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--gilt);
  color: var(--gilt);
}
.page-btn.active {
  background: var(--gilt);
  color: var(--ink);
  border-color: var(--gilt);
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 84px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(217, 189, 142, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 189, 142, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 197, 119, 0.18), rgba(232, 197, 119, 0.04) 40%, transparent 70%);
  animation: orbDrift 28s ease-in-out infinite alternate;
}
@keyframes orbDrift {
  from { transform: translate(-12vw, -8vh) scale(1); }
  to { transform: translate(14vw, 6vh) scale(1.08); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 38px;
  height: 1px;
  background: var(--gilt);
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 0.92;
}
.hero-title em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--gilt);
  background: linear-gradient(180deg, var(--gilt), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tag {
  margin-top: 32px;
  font-size: 17px;
  color: var(--parch-2);
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.hero-stats {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-family: var(--display);
  font-size: 44px;
  color: var(--gilt);
  letter-spacing: 0.02em;
  font-weight: 600;
}
.hero-stat-label {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hide-2);
}

/* ===== Hero characters ===== */
.hero-chars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 22px;
  margin-bottom: 36px;
  flex-wrap: nowrap;
}
.hero-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: charIn 720ms cubic-bezier(.2,.7,.2,1) both;
}
.hero-char:nth-child(1) { animation-delay: 0ms; }
.hero-char:nth-child(3) { animation-delay: 120ms; }
.hero-char:nth-child(5) { animation-delay: 240ms; }
@keyframes charIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-char-img {
  position: relative;
  width: 140px;
  height: 240px;
  display: grid;
  place-items: end center;
  transition: transform 420ms cubic-bezier(.2,.7,.2,1), filter 420ms ease;
}
.hero-char-img::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 80%;
  height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(232, 197, 119, 0.22), transparent 70%);
  filter: blur(2px);
  z-index: 0;
}
.hero-char-img img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.6));
  transition: filter 420ms ease;
}
.hero-char:first-child .hero-char-img img { transform: scale(0.95); transform-origin: bottom center; }
.hero-char-mid .hero-char-img img { transform: translateY(-25px) scale(0.86); transform-origin: bottom center; }
.hero-char-end .hero-char-img img { transform: translateY(-125px) scale(0.64); transform-origin: bottom center; }

.hero-char:hover .hero-char-img img {
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.7)) drop-shadow(0 0 18px rgba(232, 197, 119, 0.45));
}
.hero-char-img img { transition: filter 420ms ease, transform 420ms ease; }

.hero-char figcaption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hide-2);
  transition: color 320ms ease;
}
.hero-char-end figcaption { color: var(--gilt); }
.hero-char:hover figcaption { color: var(--gilt); }

.hero-char-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 38px;
  opacity: 0.7;
}
.hero-char-arrow span {
  display: block;
  width: 6px;
  height: 1px;
  background: var(--gilt);
  animation: arrowFlow 1.8s ease-in-out infinite;
}
.hero-char-arrow span:nth-child(1) { animation-delay: 0ms; }
.hero-char-arrow span:nth-child(2) { animation-delay: 150ms; }
.hero-char-arrow span:nth-child(3) { animation-delay: 300ms; }
@keyframes arrowFlow {
  0%, 100% { opacity: 0.25; transform: translateX(0); }
  50%      { opacity: 1;    transform: translateX(2px); }
}

@media (max-width: 720px) {
  .hero-chars { gap: 8px; }
  .hero-char-img { width: 80px; height: 140px; }
  .hero-char-arrow { margin-bottom: 24px; }
  .hero-char-arrow span { width: 4px; }
  .hero-char figcaption { font-size: 8.5px; letter-spacing: 0.22em; }
}

/* ===== Popup / Modal ===== */
.modal-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 7, 10, 0.78);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: veilIn 360ms ease;
}
@keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
.modal-veil.closing { animation: veilOut 280ms ease forwards; }
@keyframes veilOut { to { opacity: 0; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background:
    radial-gradient(ellipse 700px 400px at 50% 0%, rgba(232, 197, 119, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(42, 31, 23, 0.92), rgba(13, 11, 14, 0.98));
  border: 1px solid var(--hairline-strong);
  padding: 28px 28px 32px;
  animation: modalIn 520ms cubic-bezier(.16,.84,.3,1);
}
.modal::before,
.modal::after,
.modal-corner-tl,
.modal-corner-tr,
.modal-corner-bl,
.modal-corner-br {
  position: absolute;
  pointer-events: none;
}
.modal::before {
  content: "";
  top: -1px; left: -1px;
  width: 28px; height: 28px;
  border-top: 1px solid var(--gilt);
  border-left: 1px solid var(--gilt);
}
.modal::after {
  content: "";
  top: -1px; right: -1px;
  width: 28px; height: 28px;
  border-top: 1px solid var(--gilt);
  border-right: 1px solid var(--gilt);
}
.modal-corner-bl, .modal-corner-br {
  width: 28px; height: 28px; bottom: -1px;
}
.modal-corner-bl {
  left: -1px;
  border-bottom: 1px solid var(--gilt);
  border-left: 1px solid var(--gilt);
}
.modal-corner-br {
  right: -1px;
  border-bottom: 1px solid var(--gilt);
  border-right: 1px solid var(--gilt);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-veil.closing .modal { animation: modalOut 280ms ease forwards; }
@keyframes modalOut {
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline-strong);
  color: var(--parch);
  background: rgba(13, 11, 14, 0.8);
  transition: all 220ms ease;
  z-index: 3;
}
.modal-close:hover {
  border-color: var(--gilt);
  color: var(--gilt);
  transform: rotate(90deg);
}
.modal-close svg { width: 10px; height: 10px; }

.modal-eyebrow {
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.modal-eyebrow::before,
.modal-eyebrow::after {
  content: "";
  width: 18px; height: 1px;
  background: var(--gilt);
}
.modal-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
  text-align: center;
  line-height: 1.1;
}
.modal-title em { font-style: italic; color: var(--gilt); font-weight: 400; }
.modal-sub {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--hide-2);
  text-align: center;
  max-width: 320px;
  line-height: 1.5;
  margin-left: auto;
  margin-right: auto;
}

.choice-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.choice {
  position: relative;
  padding: 18px 16px 18px 18px;
  border: 1px solid var(--hairline-strong);
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.6), rgba(13, 11, 14, 0.9));
  cursor: pointer;
  transition: all 320ms cubic-bezier(.2,.7,.2,1);
  text-align: left;
  overflow: hidden;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
}
.choice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(232, 197, 119, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 320ms ease;
}
.choice:hover {
  border-color: var(--gilt);
  transform: translateY(-2px);
}
.choice:hover::before { opacity: 1; }
.choice-emblem {
  position: relative;
  width: 36px;
  height: 36px;
  margin-bottom: 0;
}
.choice-emblem svg {
  width: 36px;
  height: 36px;
  color: var(--gilt);
  filter: drop-shadow(0 0 8px rgba(232, 197, 119, 0.35));
}
.choice-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--hide-2);
  margin-bottom: 3px;
}
.choice-name {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0;
}
.choice-desc {
  display: none;
}
.choice-meta {
  margin-top: 5px;
  padding-top: 0;
  border-top: none;
  display: flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hide-2);
}
.choice-meta strong { color: var(--gilt); font-weight: 500; }
.choice-arrow {
  position: static;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--gilt);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 320ms ease;
}
.choice:hover .choice-arrow {
  opacity: 1;
  transform: translateX(0);
}

.modal-secondary {
  margin-top: 16px;
  text-align: center;
}
.modal-secondary button {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hide-2);
  padding: 6px 12px;
  border: 1px solid transparent;
  transition: all 220ms ease;
}
.modal-secondary button:hover {
  color: var(--parch);
  border-color: var(--hairline-strong);
}

/* ===== YouTube grid ===== */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.yt-card {
  border: 1px solid var(--hairline-strong);
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.6), rgba(13, 11, 14, 0.92));
  cursor: pointer;
  transition: all 280ms ease;
}
.yt-card:hover {
  border-color: var(--gilt);
  transform: translateY(-2px);
}
.yt-thumb {
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(45deg, rgba(232, 197, 119, 0.04) 0 6px, transparent 6px 12px),
    linear-gradient(135deg, var(--bark), var(--soil));
  border-bottom: 1px solid var(--hairline-strong);
  position: relative;
  display: grid;
  place-items: center;
}
.yt-thumb::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border: 1px solid var(--gilt);
  border-radius: 50%;
  transition: all 280ms ease;
}
.yt-thumb::after {
  content: "";
  position: absolute;
  width: 0; height: 0;
  border-left: 14px solid var(--gilt);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
  transition: all 280ms ease;
}
.yt-card:hover .yt-thumb::before {
  background: var(--gilt);
  box-shadow: 0 0 32px rgba(232, 197, 119, 0.6);
}
.yt-card:hover .yt-thumb::after {
  border-left-color: var(--ink);
}
.yt-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 8px;
  background: rgba(8, 7, 10, 0.88);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--paper);
  letter-spacing: 0.06em;
  border: 1px solid var(--hairline);
  z-index: 2;
}
.yt-meta { padding: 18px 20px; }
.yt-cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: 10px;
}
.yt-title {
  font-family: var(--display);
  font-size: 17px;
  color: var(--paper);
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 10px;
}
.yt-stat-row {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--hide-2);
  letter-spacing: 0.06em;
}

/* ===== Tips ===== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
}
.tip-card {
  position: relative;
  padding: 28px 28px 26px;
  border: 1px solid var(--hairline-strong);
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.5), rgba(13, 11, 14, 0.85));
  transition: all 260ms ease;
}
.tip-card:hover {
  border-color: var(--gilt);
  transform: translateY(-2px);
}
.tip-num {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--display);
  font-size: 22px;
  color: var(--hide);
  letter-spacing: 0.05em;
}
.tip-card:hover .tip-num { color: var(--gilt); }
.tip-icon-wrap {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline-strong);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--gilt);
}
.tip-icon-wrap svg { width: 18px; height: 18px; }
.tip-title {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--paper);
  margin-bottom: 12px;
  line-height: 1.3;
}
.tip-body {
  font-size: 14px;
  color: var(--parch);
  line-height: 1.6;
}

/* ===== Section divider ===== */
.section-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 48px 0 28px;
}
.section-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-strong), transparent);
}
.section-divider .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--hide-2);
}

/* ===== Footer ===== */
.footer {
  padding: 56px 40px 40px;
  border-top: 1px solid var(--hairline-strong);
  background: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hide);
}

/* ===== Misc utilities ===== */
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--hairline-strong);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--parch);
}

/* Responsive */
@media (max-width: 980px) {
  .nav { padding: 14px 20px; gap: 14px; }
  .nav-links { display: none; }
  .page { padding: 40px 20px 64px; }
  .page-title { font-size: 38px; }
  .modal { padding: 40px 24px 48px; }
  .modal-title { font-size: 28px; }
  .choice-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .guide-table thead th, .guide-table td { padding: 12px 10px; font-size: 12px; }
  .row-index, .afk-bars { display: none; }
}
