/* ============================================================
   pathofexile.build — Main Stylesheet
   ============================================================ */

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

:root {
  --bg:       #0d0d10;
  --bg2:      #14141a;
  --bg3:      #1a1a22;
  --bg4:      #202029;
  --border:   #2a2a36;
  --border2:  #3a3a4a;
  --gold:     #c89640;
  --gold2:    #e8b455;
  --gold3:    #f5cc77;
  --goldglow: rgba(200,150,64,.15);

  /* Readable text — all pass WCAG AA on dark backgrounds */
  --text:     #d8d4cc;
  --text2:    #a09890;
  --text3:    #706860;

  --white:    #f0ece6;
  --green:    #4a9060;
  --green2:   #6abf84;
  --red:      #c04040;
  --yellow:   #d4aa48;
  --shadow:   0 8px 48px rgba(0,0,0,.7);
  --radius:   6px;
  --header-h: 64px;

  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Cinzel', Georgia, serif;
  --font-mono:    'JetBrains Mono', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(200,150,64,.04) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 10% 90%, rgba(80,40,10,.05) 0%, transparent 50%);
}

/* ---- Under construction banner ---- */

.construction-banner {
  background: rgba(200,150,64,.07);
  border-bottom: 1px solid rgba(200,150,64,.18);
  color: var(--text2);
  font-size: .875rem;
  text-align: center;
  padding: 9px 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.construction-icon { font-size: 1rem; }

/* ---- Layout ---- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  position: relative;
  z-index: 1;
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--gold2);
  line-height: 1.25;
  font-weight: 600;
}

/* Functional headings use Inter for readability */
.settings-section h2,
.comments-section h2,
.guides-header h1,
.profile-username,
.admin-panel h1,
.admin-panel h2 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--white);
}

h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin-bottom: .8rem; }
h3 { font-size: 1rem; margin-bottom: .5rem; }
h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold3); }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

p { margin-bottom: .9rem; }
p:last-child { margin-bottom: 0; }

strong { color: var(--white); font-weight: 600; }
em { color: var(--gold2); font-style: normal; }

code {
  font-family: var(--font-mono);
  font-size: .85rem;
  background: var(--bg3);
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--gold2);
}

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(13,13,16,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-gem {
  color: var(--gold);
  font-size: 1rem;
  filter: drop-shadow(0 0 6px rgba(200,150,64,.6));
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--gold2);
}
.logo-dot { color: var(--gold3); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}
.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text2);
  transition: color .15s;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--white); }

.site-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .9rem;
}
.user-link { color: var(--text2); font-weight: 500; }
.user-link:hover { color: var(--white); }
.admin-link {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(200,150,64,.1);
  border: 1px solid rgba(200,150,64,.25);
  padding: 3px 10px;
  border-radius: 3px;
}
.logout-link { color: var(--text3); font-size: .875rem; }
.logout-link:hover { color: var(--text2); }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
  font-size: .875rem;
  color: var(--text3);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2rem;
  align-items: center;
}
.footer-left, .footer-right { display: flex; align-items: center; gap: .6rem; }
.footer-sep { color: var(--border2); }
.footer-right a { color: var(--text3); }
.footer-right a:hover { color: var(--text2); }
.footer-legal { width: 100%; color: var(--text3); font-size: .8rem; }
.site-footer .logo-gem { color: var(--gold); font-size: .75rem; }

/* ---- Main content ---- */

.site-main { min-height: calc(100vh - var(--header-h) - 120px); }

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  transition: all .18s;
  line-height: 1;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.btn-primary {
  background: linear-gradient(135deg, #7a4d18, #c8963e);
  color: #0a0807;
  box-shadow: 0 2px 12px rgba(200,150,64,.2);
  font-weight: 700;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #9a6020, #e8b455);
  color: #0a0807;
  box-shadow: 0 4px 20px rgba(200,150,64,.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-success {
  background: rgba(74,144,96,.2);
  color: var(--green2);
  border: 1px solid rgba(74,144,96,.4);
}
.btn-success:hover { background: rgba(74,144,96,.35); color: var(--white); }
.btn-danger {
  background: rgba(192,64,64,.15);
  color: #f09090;
  border: 1px solid rgba(192,64,64,.35);
}
.btn-danger:hover { background: rgba(192,64,64,.3); color: var(--white); }

.btn-sm   { padding: 7px 14px; font-size: .8rem; }
.btn-lg   { padding: 12px 30px; font-size: .95rem; }
.btn-full { width: 100%; }
.btn-pob  { background: rgba(80,140,200,.12); color: #9dcce8; border: 1px solid rgba(80,140,200,.28); }
.btn-yt   { background: rgba(200,50,50,.12);  color: #f0a0a0; border: 1px solid rgba(200,50,50,.28); }
.btn-pob:hover { background: rgba(80,140,200,.28); color: var(--white); }
.btn-yt:hover  { background: rgba(200,50,50,.28);  color: var(--white); }

.mt-sm { margin-top: .5rem; }

/* ---- Badges ---- */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
}
.badge-lg { font-size: .8rem; padding: 4px 12px; }
.badge-fresh    { color: var(--green2); border-color: rgba(74,144,96,.4);   background: rgba(74,144,96,.1); }
.badge-aging    { color: var(--yellow); border-color: rgba(200,160,64,.4);  background: rgba(200,160,64,.1); }
.badge-outdated { color: #f09090;       border-color: rgba(192,64,64,.4);   background: rgba(192,64,64,.1); }
.badge-budget   { color: var(--text2);  border-color: var(--border2);       background: var(--bg3); }
.badge-difficulty { color: var(--text2); border-color: var(--border2); background: var(--bg3); }

/* ---- Tags ---- */

.tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 3px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}
.tag-class  { color: var(--gold2); border-color: rgba(200,150,64,.25); background: rgba(200,150,64,.06); }
.tag-damage { color: #9dcce8;      border-color: rgba(80,140,200,.25); background: rgba(80,140,200,.06); }

/* ---- Flash messages ---- */

.flash {
  padding: .9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  font-size: .95rem;
  font-weight: 500;
}
.flash-error   { background: rgba(192,64,64,.1);  border: 1px solid rgba(192,64,64,.3);  color: #f09090; }
.flash-success { background: rgba(74,144,96,.1);  border: 1px solid rgba(74,144,96,.3);  color: var(--green2); }

/* ---- Creator badge ---- */

.creator-badge {
  display: inline-block;
  background: rgba(200,150,64,.12);
  border: 1px solid rgba(200,150,64,.3);
  color: var(--gold2);
  font-size: .7rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 3px;
  margin-right: 3px;
}
.creator-badge-lg { font-size: .78rem; padding: 2px 10px; }

/* ---- Hero ---- */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-title {
  font-size: clamp(1.9rem, 5vw, 3rem);
  color: var(--gold2);
  margin-bottom: 1rem;
  text-shadow: 0 0 60px rgba(200,150,64,.18);
}
.hero-title em { color: var(--gold3); font-style: normal; }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.current-league-badge {
  display: inline-block;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text3);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: 20px;
}
.current-league-badge strong { color: var(--gold); }

/* ---- Guide grid ---- */

.section-guides { padding: 2rem 0 3rem; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.section-header h2 { margin: 0; }
.see-all { font-size: .875rem; color: var(--text2); }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.guide-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: border-color .18s, transform .18s;
  position: relative; /* needed for ::after overlay */
  cursor: pointer;
}
.guide-card:hover { border-color: var(--gold); transform: translateY(-2px); }

/* Stretch the title link across the whole card */
.guide-card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  z-index: 1;
}

/* Keep author link and other interactive elements above the overlay */
.guide-card-footer a,
.guide-card-footer button {
  position: relative;
  z-index: 2;
}

.guide-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.guide-card-title { font-family: var(--font-display); font-size: .95rem; color: var(--white); line-height: 1.35; }
.guide-card-title a { color: var(--white); }
.guide-card:hover .guide-card-title a { color: var(--gold2); }
.guide-card-summary { font-size: .9rem; color: var(--text2); flex: 1; line-height: 1.6; }
.guide-card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.guide-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}
.guide-author { font-size: .85rem; color: var(--text2); font-weight: 500; }
.guide-author:hover { color: var(--gold); }
.guide-stats { display: flex; gap: 10px; font-size: .8rem; color: var(--text3); font-family: var(--font-mono); }

/* ---- Why section ---- */

.section-why { padding: 2rem 0 4rem; }
.section-why h2 { text-align: center; margin-bottom: 2rem; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.why-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.why-icon { font-size: 1.5rem; margin-bottom: .7rem; }
.why-card h3 {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: .5rem;
  text-transform: none;
  letter-spacing: 0;
}
.why-card p { font-size: .9rem; color: var(--text2); line-height: 1.65; }

/* ---- Guide list page ---- */

.guides-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 2rem 0; }
.filters-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  height: fit-content;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.filters-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 1.2rem;
}
.filter-group { margin-bottom: 1rem; }
.filter-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 5px;
}
.filter-group input, .filter-group select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color .15s;
}
.filter-group input:focus, .filter-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,150,64,.1);
}
.filter-group select option { background: var(--bg3); }
.guides-header { margin-bottom: 1.2rem; }
.guides-header h1 { margin: 0; }
.count { color: var(--text3); font-weight: 400; font-size: .85em; }
.empty-state { text-align: center; padding: 3rem; color: var(--text2); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 0; }
.page-info { font-size: .9rem; color: var(--text2); }

/* ---- Single guide ---- */

.guide-container { padding: 2rem 0 4rem; }
.guide-layout { display: grid; grid-template-columns: 1fr 260px; gap: 2.5rem; align-items: start; }
.guide-header { margin-bottom: 1.5rem; }
.guide-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 1rem; }
.guide-title {
  font-family: var(--font-display);
  color: var(--white);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  margin-bottom: .65rem;
}
.guide-summary { font-size: 1.05rem; color: var(--text2); margin-bottom: 1rem; line-height: 1.65; }
.guide-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: .9rem;
  color: var(--text2);
}
.meta-sep { color: var(--border2); }
.guide-author-link { color: var(--text2); font-weight: 500; }
.guide-author-link:hover { color: var(--gold); }

.guide-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.vote-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
}
.vote-btn:hover { border-color: var(--gold); color: var(--gold); }
.vote-btn.voted { border-color: var(--gold); color: var(--gold); background: var(--goldglow); }
.works-btn.voted { border-color: var(--green2); color: var(--green2); background: rgba(74,144,96,.1); }
.vote-btn:disabled { opacity: .45; cursor: not-allowed; }
.guide-links { display: flex; gap: 8px; flex-wrap: wrap; }

.freshness-warning {
  background: rgba(192,64,64,.08);
  border: 1px solid rgba(192,64,64,.28);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #f09090;
  font-size: .95rem;
  margin-bottom: 1.5rem;
}
.freshness-notice {
  background: rgba(200,160,64,.06);
  border: 1px solid rgba(200,160,64,.22);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--yellow);
  font-size: .95rem;
  margin-bottom: 1.5rem;
}

/* Guide body */
.guide-body { font-size: 1rem; line-height: 1.85; }
.guide-body h1, .guide-body h2, .guide-body h3, .guide-body h4 { margin: 1.8rem 0 .7rem; }
.guide-body h2 { border-bottom: 1px solid var(--border); padding-bottom: .4rem; }
.guide-body ul, .guide-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.guide-body li { margin-bottom: .35rem; }
.guide-body blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  color: var(--text2);
  margin: 1rem 0;
  font-style: italic;
}
.guide-body hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.guide-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.guide-body th, .guide-body td { padding: 9px 12px; border: 1px solid var(--border); }
.guide-body th {
  background: var(--bg3);
  color: var(--gold2);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Sidebar */
.guide-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.sidebar-card h4 { margin-bottom: .8rem; color: var(--text3); }
.build-summary { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: .9rem; }
.build-summary dt {
  color: var(--text3);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  align-self: center;
}
.build-summary dd { color: var(--text); }

/* Comments */
.comments-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comment-form { margin: 1.5rem 0; }
.comment-form textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  line-height: 1.65;
  transition: border-color .15s;
}
.comment-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,150,64,.1);
}
.comment-form button { margin-top: .6rem; }
.login-prompt { color: var(--text2); margin: 1rem 0; }
.comments-list { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.5rem; }
.comment { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.comment-deleted { color: var(--text3); }
.comment-header { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.comment-author { font-size: .9rem; font-weight: 600; color: var(--text2); }
.comment-author:hover { color: var(--gold); }
.comment-date { font-size: .8rem; color: var(--text3); }
.comment-body { font-size: .975rem; line-height: 1.7; }
.empty-comments { color: var(--text3); }

/* ---- Auth pages ---- */

.auth-container { display: flex; justify-content: center; padding: 4rem 1rem; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
}
.auth-card h1 { text-align: center; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--text2); }

/* ---- Form fields ---- */

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}
.label-hint { color: var(--text3); font-size: .9em; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 13px;
  outline: none;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,150,64,.12);
}
.field small { display: block; margin-top: 5px; font-size: .8rem; color: var(--text3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---- Submit page ---- */

.submit-container { max-width: 780px; margin: 0 auto; padding: 2rem 0 4rem; }
.submit-intro { color: var(--text2); margin-bottom: 2rem; font-size: .975rem; }
.guide-form { display: flex; flex-direction: column; gap: .2rem; }
.editor-wrap { position: relative; }
.editor-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.tab {
  padding: 6px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px 3px 0 0;
  color: var(--text2);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.tab.active { background: var(--bg2); border-color: var(--gold); color: var(--gold); }
.preview-pane {
  min-height: 300px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
}
.submit-footer { margin-top: 1.5rem; text-align: center; }
.submit-note { margin-top: .8rem; font-size: .875rem; color: var(--text3); }

/* ---- Profile ---- */

.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.profile-username { font-size: clamp(1.3rem, 3vw, 1.9rem); display: flex; align-items: center; gap: 8px; }
.profile-bio { color: var(--text2); margin-top: .5rem; line-height: 1.65; font-size: .975rem; }
.profile-meta { color: var(--text3); font-size: .875rem; margin-top: .4rem; }

/* ---- Admin ---- */

.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--gold2); margin-bottom: .3rem; }
.stat-label { font-size: .8rem; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.admin-queue { display: flex; flex-direction: column; gap: .8rem; }
.admin-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}
.admin-card-info h3 { font-size: 1rem; color: var(--white); margin-bottom: .3rem; font-family: var(--font-body); font-weight: 600; }
.admin-meta { font-size: .875rem; color: var(--text3); margin-bottom: .4rem; }
.admin-card-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; align-items: flex-start; }

/* ---- Settings ---- */

.settings-container { max-width: 780px; margin: 0 auto; padding: 2rem 0 4rem; }
.settings-container h1 { margin-bottom: 1.5rem; }
.settings-layout { display: grid; grid-template-columns: 180px 1fr; gap: 3rem; align-items: start; }

.settings-nav {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text3);
  padding: 8px 12px;
  border-radius: 4px;
  transition: all .15s;
}
.settings-nav a:hover { color: var(--white); background: rgba(255,255,255,.04); }

.settings-sections { display: flex; flex-direction: column; }
.settings-section { padding: 1.8rem 0; }
.settings-section h2 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: .4rem; }
.settings-desc { font-size: .9rem; color: var(--text2); margin-bottom: 1.2rem; line-height: 1.6; }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.settings-danger .settings-section h2,
.settings-danger h2 { color: #f09090; }

.settings-section textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 13px;
  resize: vertical;
  outline: none;
  line-height: 1.65;
  transition: border-color .15s;
}
.settings-section textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,150,64,.12);
}

/* ---- Center content ---- */

.center-content { text-align: center; padding: 5rem 1rem; }
.center-content h1 { font-size: 4rem; color: var(--gold); margin-bottom: 1rem; }
.center-content p { color: var(--text2); margin-bottom: 1.5rem; }

.message-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 2.5rem 2rem;
  text-align: left;
}
.message-card h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  margin: 0 0 1rem;
}
.message-body {
  color: var(--text2);
  line-height: 1.65;
  margin: 0 0 .75rem;
}
.message-hint {
  color: var(--text3);
  font-size: .875rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.message-form {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .guides-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }
  .admin-card { flex-direction: column; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
  .guide-sidebar { grid-template-columns: 1fr; }
  .vote-buttons { flex-direction: column; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; margin-bottom: 1rem; }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   GUIDE EDIT / PREVIEW BANNER
   ============================================================ */

.guide-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(200,150,64,.08);
  border: 1px solid rgba(200,150,64,.2);
  border-radius: var(--radius);
  padding: .8rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: .875rem;
  color: var(--gold2);
}
.preview-actions { display: flex; gap: 6px; }

.guide-edit-link {
  font-size: .85rem;
  color: var(--text2);
  font-weight: 500;
}
.guide-edit-link:hover { color: var(--gold); }

/* ============================================================
   COMMENT DELETE
   ============================================================ */

.comment-delete-btn {
  background: none;
  border: none;
  color: var(--text3);
  font-size: .8rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color .15s, background .15s;
}
.comment-delete-btn:hover { color: #f09090; background: rgba(192,64,64,.1); }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */

.admin-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.5rem;
  padding: 2rem 0 4rem;
  align-items: start;
}

.admin-sidenav {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-sidenav-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text3);
  padding: 8px 12px;
  border-radius: 4px;
  transition: all .15s;
  display: block;
}
.admin-sidenav-link:hover { color: var(--white); background: rgba(255,255,255,.04); }
.admin-sidenav-link.active { color: var(--gold2); background: rgba(200,150,64,.08); }

.admin-content { min-width: 0; }

.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-page-header h1 {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}
.admin-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.admin-back {
  font-size: .85rem;
  color: var(--text3);
  display: block;
  margin-bottom: .3rem;
}
.admin-back:hover { color: var(--text2); }

/* ============================================================
   ADMIN STAT CARDS
   ============================================================ */

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.stat-card-warn { border-color: rgba(200,150,64,.3); background: rgba(200,150,64,.04); }
.stat-num  { font-family: var(--font-display); font-size: 2rem; color: var(--gold2); line-height: 1; }
.stat-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text3); }
.stat-sub  { font-size: .78rem; color: var(--text3); margin-top: .2rem; }

/* ============================================================
   ADMIN PANELS / SECTIONS
   ============================================================ */

.admin-panel-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.admin-panel-section h2 {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  text-transform: none;
}
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.admin-section-header h2 { margin: 0; }
.link-sm { font-size: .85rem; color: var(--text2); }
.link-sm:hover { color: var(--gold); }

.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-empty { color: var(--text3); font-size: .9rem; padding: .5rem 0; }
.admin-overflow { text-align: center; font-size: .85rem; padding: .5rem 0; }
.admin-hint { font-size: .8rem; color: var(--text3); margin-top: .6rem; }

.admin-danger-section {
  border-color: rgba(192,64,64,.3);
}
.admin-danger-section h2 { color: #f09090; }

/* ============================================================
   ADMIN QUEUE (DASHBOARD PENDING LIST)
   ============================================================ */

.admin-queue { display: flex; flex-direction: column; gap: .6rem; }

.admin-queue-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
}
.admin-queue-item:last-child { border-bottom: none; }
.admin-queue-info { flex: 1; min-width: 0; }
.admin-queue-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--white);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-queue-title:hover { color: var(--gold2); }
.admin-queue-meta { font-size: .8rem; color: var(--text3); margin-top: .2rem; }
.admin-queue-meta a { color: var(--text2); }
.admin-queue-actions { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; }

/* ============================================================
   ADMIN USER LIST (DASHBOARD)
   ============================================================ */

.admin-user-list { display: flex; flex-direction: column; gap: 0; }
.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  gap: .8rem;
}
.admin-user-row:last-child { border-bottom: none; }
.admin-user-info { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.admin-user-name { font-weight: 600; font-size: .9rem; color: var(--white); }
.admin-user-name:hover { color: var(--gold2); }
.admin-user-email { font-size: .78rem; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user-date { font-size: .78rem; color: var(--text3); flex-shrink: 0; }

/* ============================================================
   ADMIN TOOLBAR / TABS
   ============================================================ */

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.admin-tabs { display: flex; gap: 4px; }
.admin-tab {
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 4px;
  color: var(--text2);
  text-transform: capitalize;
  transition: all .15s;
  background: var(--bg2);
  border: 1px solid var(--border);
}
.admin-tab:hover { color: var(--white); border-color: var(--border2); }
.admin-tab.active { color: var(--gold2); border-color: rgba(200,150,64,.4); background: rgba(200,150,64,.06); }

.admin-search-form { display: flex; gap: 6px; }
.admin-search-form input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .875rem;
  padding: 7px 12px;
  outline: none;
  width: 220px;
  transition: border-color .15s;
}
.admin-search-form input:focus { border-color: var(--gold); }

/* ============================================================
   ADMIN TABLE
   ============================================================ */

.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.admin-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }

.table-title-link { font-weight: 600; color: var(--white); }
.table-title-link:hover { color: var(--gold2); }
.table-email { color: var(--text3); font-size: .8rem; }
.table-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-empty-cell { text-align: center; color: var(--text3); padding: 2rem; }

/* ============================================================
   ADMIN STATUS BADGES / ROLE BADGES
   ============================================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.status-published { background: rgba(74,144,96,.15);  color: var(--green2);  border: 1px solid rgba(74,144,96,.3); }
.status-pending   { background: rgba(200,150,64,.12); color: var(--gold2);   border: 1px solid rgba(200,150,64,.3); }
.status-rejected  { background: rgba(192,64,64,.12);  color: #f09090;        border: 1px solid rgba(192,64,64,.3); }
.status-draft     { background: rgba(255,255,255,.05); color: var(--text3);  border: 1px solid var(--border2); }

.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: 3px;
}
.role-admin { background: rgba(130,80,200,.15); color: #c0a0f0; border: 1px solid rgba(130,80,200,.3); }

/* ============================================================
   ADMIN DETAIL PAGES
   ============================================================ */

.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}

.admin-detail-main { display: flex; flex-direction: column; gap: 0; }
.admin-detail-side { display: flex; flex-direction: column; gap: 0; position: sticky; top: calc(var(--header-h) + 1rem); }

.admin-meta-list {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 4px 12px;
  font-size: .875rem;
}
.admin-meta-list dt { color: var(--text3); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; align-self: start; padding-top: 1px; }
.admin-meta-list dd { color: var(--text); word-break: break-all; }

.admin-status-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-status-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.admin-role-row { display: flex; flex-direction: column; gap: .8rem; }
.admin-role-item { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.admin-role-item > span:first-child { font-size: .9rem; font-weight: 500; color: var(--text); min-width: 100px; }

.admin-content-preview {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  background: var(--bg3);
}

/* ============================================================
   ADMIN COMMENTS
   ============================================================ */

.admin-comments-list { display: flex; flex-direction: column; gap: .5rem; }
.admin-comment {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .8rem 1rem;
}
.admin-comment.is-deleted { opacity: .55; }
.admin-comment-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .4rem;
  font-size: .8rem;
  color: var(--text3);
}
.admin-comment-header a { color: var(--text2); font-weight: 600; }
.admin-comment-body { font-size: .875rem; color: var(--text); line-height: 1.6; }

/* ============================================================
   ADMIN SESSIONS
   ============================================================ */

.admin-sessions-list { display: flex; flex-direction: column; gap: .4rem; }
.admin-session-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .8rem;
  color: var(--text3);
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.admin-session-row:last-child { border-bottom: none; }
.session-token { font-family: var(--font-mono); font-size: .75rem; color: var(--text2); }

/* ============================================================
   ADMIN INLINE FORM
   ============================================================ */

.admin-inline-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.admin-inline-form .field { margin-bottom: 0; }
.admin-inline-form input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 13px;
  outline: none;
  width: 100%;
  transition: border-color .15s;
}
.admin-inline-form input:focus { border-color: var(--gold); }

/* ============================================================
   ADMIN STATS PAGE
   ============================================================ */

.admin-stats-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-bar-list { display: flex; flex-direction: column; gap: .6rem; }
.admin-bar-item { display: flex; align-items: center; gap: .8rem; }
.admin-bar-label {
  min-width: 140px;
  max-width: 140px;
  display: flex;
  flex-direction: column;
}
.admin-bar-label a, .admin-bar-label span:first-child { font-size: .85rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-bar-label .muted { font-size: .75rem; color: var(--text3); }
.admin-bar-track { flex: 1; height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.admin-bar-fill  { height: 100%; background: var(--gold); border-radius: 3px; min-width: 2px; }
.admin-bar-value { font-size: .8rem; color: var(--text2); font-family: var(--font-mono); min-width: 40px; text-align: right; }

/* Sparkline chart */
.admin-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  padding: .5rem 0;
}
.spark-bar-wrap { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.spark-bar { width: 100%; background: var(--gold); border-radius: 2px 2px 0 0; opacity: .7; min-height: 2px; transition: opacity .15s; }
.spark-bar-wrap:hover .spark-bar { opacity: 1; }

/* ============================================================
   MISC ADMIN UTILITIES
   ============================================================ */

.mono { font-family: var(--font-mono); font-size: .8rem; }
.muted { color: var(--text3); }

.btn-xs { padding: 4px 10px; font-size: .75rem; }

/* ============================================================
   ADMIN RESPONSIVE
   ============================================================ */

@media (max-width: 1000px) {
  .admin-two-col { grid-template-columns: 1fr; }
  .admin-stats-two-col { grid-template-columns: 1fr; }
  .admin-detail-grid { grid-template-columns: 1fr; }
  .admin-detail-side { position: static; }
}

@media (max-width: 760px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidenav { position: static; flex-direction: row; flex-wrap: wrap; margin-bottom: 1rem; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-bar-label { min-width: 100px; max-width: 100px; }
}

@media (max-width: 500px) {
  .admin-stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   HEADER SEARCH
   ============================================================ */

.header-search {
  flex: 1;
  min-width: 160px;
  max-width: 320px;
  margin: 0 1rem;
}

.header-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text3);
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
  top: 50%;
  transform: translateY(-50%);
}

.header-search input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .875rem;
  padding: 7px 14px 7px 32px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
}

.header-search input::placeholder { color: var(--text3); }

.header-search input:focus {
  border-color: var(--gold);
  background: var(--bg4);
  box-shadow: 0 0 0 3px rgba(200,150,64,.1);
}

/* Cancel button on webkit search inputs */
.header-search input::-webkit-search-cancel-button { opacity: .5; cursor: pointer; }

/* ============================================================
   NAV TOGGLE (HAMBURGER)
   ============================================================ */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s;
}

.nav-toggle:hover { border-color: var(--border2); }
.nav-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
  transform-origin: center;
}

/* Animate to X when open */
.nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   MOBILE NAV DRAWER
   ============================================================ */

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  padding-top: calc(var(--header-h) + 1rem);
  min-height: 100%;
  gap: .2rem;
}

.mobile-search {
  margin-bottom: 1rem;
}

.mobile-search .header-search-inner input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .95rem;
  padding: 10px 14px 10px 36px;
  outline: none;
  transition: border-color .15s;
}
.mobile-search .header-search-inner input:focus { border-color: var(--gold); }
.mobile-search .header-search-inner input::placeholder { color: var(--text3); }

.mobile-nav-link {
  display: block;
  padding: 11px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 5px;
  transition: background .12s, color .12s;
}

.mobile-nav-link:hover {
  background: rgba(255,255,255,.04);
  color: var(--white);
}

.mobile-nav-link-muted { color: var(--text3); }

.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: .6rem 0;
}

/* Backdrop */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
  backdrop-filter: blur(2px);
}

.mobile-nav-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent scroll when nav open */
body.nav-open { overflow: hidden; }

/* ============================================================
   RESPONSIVE — SHOW/HIDE
   ============================================================ */

/* At 860px: hide desktop nav text links, show search + toggle */
@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-search { max-width: 200px; }
}

/* At 640px: hide header search (it's in the drawer instead) */
@media (max-width: 640px) {
  .header-search { display: none; }
  .header-search { max-width: none; }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.about-hero {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.about-hero h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.about-lead {
  font-size: 1.1rem;
  color: var(--text2);
  line-height: 1.7;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.about-section h2 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .9rem;
}

.about-section p {
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: .75rem;
}

.about-section p:last-child { margin-bottom: 0; }

.about-cta {
  display: flex;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   LEGAL PAGES (privacy, terms)
   ============================================================ */

.legal-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.legal-container h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--white);
  margin-bottom: .4rem;
}

.legal-updated {
  font-size: .85rem;
  color: var(--text3);
  margin-bottom: 2.5rem;
}

.legal-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .8rem;
}

.legal-section p {
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: .7rem;
  font-size: .95rem;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section a { color: var(--gold2); }
.legal-section a:hover { color: var(--gold3); }

.legal-section code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--text);
}

/* ============================================================
   NOTIFICATION BELL
   ============================================================ */

.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px 6px;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.notif-bell:hover { color: var(--white); background: var(--bg3); }
.notif-bell-icon { font-size: 1.1rem; line-height: 1; }

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--bg);
}
.notif-badge-inline {
  position: static;
  border: none;
  margin-left: 5px;
}

/* ============================================================
   NOTIFICATIONS PAGE
   ============================================================ */

.notifs-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.notifs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.notifs-header h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.notifs-header-actions { display: flex; gap: .5rem; }

.notifs-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text2);
}
.notifs-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; }

.notifs-list { display: flex; flex-direction: column; gap: 2px; }

.notif-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background .15s;
}
.notif-unread {
  background: var(--bg2);
  border-color: var(--border);
}
.notif-unread::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: .45rem;
}
.notif-read { background: transparent; opacity: .75; }
.notif-read::before { content: ''; width: 6px; flex-shrink: 0; } /* spacer */

.notif-type-icon {
  font-size: .85rem;
  color: var(--gold2);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
  margin-top: .1rem;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; color: var(--white); font-size: .9rem; }
.notif-message { color: var(--text2); font-size: .875rem; margin-top: .15rem; }
.notif-date { color: var(--text3); font-size: .78rem; margin-top: .3rem; font-family: var(--font-mono); }
.notif-actions { display: flex; gap: .25rem; flex-shrink: 0; align-self: center; }

/* ============================================================
   NOTIFICATION PREFERENCES
   ============================================================ */

.notif-prefs-form { max-width: 600px; }

.notif-prefs-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.notif-prefs-header {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  padding: .6rem 1rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: center;
}
.notif-prefs-header span:first-child { text-align: left; }

.notif-pref-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.notif-pref-row:last-child { border-bottom: none; }
.notif-pref-row:hover { background: var(--bg3); }

.notif-pref-info { display: flex; flex-direction: column; gap: .15rem; }
.notif-pref-info strong { font-size: .9rem; color: var(--white); }
.notif-pref-info .text-muted { font-size: .8rem; }

.toggle-wrap {
  display: flex;
  justify-content: center;
  cursor: pointer;
}
.toggle-wrap input[type="checkbox"] { display: none; }
.toggle {
  width: 36px;
  height: 20px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: 10px;
  position: relative;
  transition: background .2s, border-color .2s;
}
.toggle::after {
  content: '';
  width: 14px;
  height: 14px;
  background: var(--text3);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform .2s, background .2s;
}
.toggle-wrap input:checked + .toggle {
  background: var(--gold);
  border-color: var(--gold2);
}
.toggle-wrap input:checked + .toggle::after {
  transform: translateX(16px);
  background: var(--bg);
}

/* ============================================================
   REPORT PAGE
   ============================================================ */

.report-categories { display: flex; flex-direction: column; gap: .4rem; }

.report-cat-label {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.report-cat-label:hover { border-color: var(--border2); background: var(--bg3); }
.report-cat-label input[type="radio"] { margin-top: .2rem; flex-shrink: 0; accent-color: var(--gold); }
.report-cat-label:has(input:checked) { border-color: var(--gold); background: var(--bg3); }

.report-cat-content { display: flex; flex-direction: column; gap: .15rem; }
.report-cat-content strong { color: var(--white); font-size: .9rem; }
.report-cat-content span { color: var(--text2); font-size: .82rem; }

/* ============================================================
   SIDEBAR ADDITIONS
   ============================================================ */

.sidebar-verified-date { font-size: .85rem; color: var(--text2); }
.report-btn { color: var(--text3) !important; }
.report-btn:hover { color: var(--red) !important; border-color: var(--red) !important; }

/* ============================================================
   ADMIN — BULK ACTIONS
   ============================================================ */

.bulk-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg3);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.bulk-count {
  font-size: .85rem;
  color: var(--gold2);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-right: auto;
}

/* tab counts */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--red);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 9px;
  margin-left: 4px;
  line-height: 1;
}

/* ============================================================
   ADMIN — REPORTS
   ============================================================ */

.report-details {
  font-size: .82rem;
  color: var(--text2);
  max-width: 240px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================
   SETTINGS CONTAINER
   ============================================================ */

.settings-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.settings-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
}

/* ============================================================
   UTILITY
   ============================================================ */

.text-muted { color: var(--text3); }

/* ============================================================
   REPORTS
   ============================================================ */

.report-details summary { cursor: pointer; }
.report-trigger {
  font-size: .8rem;
  color: var(--text3);
  cursor: pointer;
  padding: .25rem 0;
  list-style: none;
}
.report-trigger:hover { color: var(--text2); }
.report-form {
  margin-top: .75rem;
  padding: .75rem;
  background: var(--bg-surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.report-form .field { margin-bottom: .75rem; }
.report-thanks {
  font-size: .85rem;
  color: var(--text3);
  padding: .5rem 0;
}
.report-details-text {
  color: var(--text3);
  font-size: .85rem;
  font-style: italic;
}

/* ---- Report modal ---- */

.report-modal-trigger {
  font-size: .8rem;
  color: var(--text3);
  border-color: transparent;
  text-align: left;
  justify-content: flex-start;
  padding: .4rem .5rem;
}
.report-modal-trigger:hover {
  color: var(--text2);
  background: rgba(255,255,255,.04);
  border-color: var(--border);
}

.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.report-modal-overlay[hidden] { display: none; }

.report-modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem .875rem;
  border-bottom: 1px solid var(--border);
}
.report-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  margin: 0;
}

.report-modal-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1rem;
  cursor: pointer;
  padding: .25rem .4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color .15s, background .15s;
}
.report-modal-close:hover {
  color: var(--white);
  background: rgba(255,255,255,.08);
}

.report-modal-form {
  padding: 1.25rem;
}
.report-modal-form .field { margin-bottom: 1rem; }
.report-modal-form .field:last-of-type { margin-bottom: 0; }

.report-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .625rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.admin-queue {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1rem;
}
.admin-queue-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 1rem;
  background: var(--bg-surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.admin-queue-title {
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
}
.admin-queue-title:hover { color: var(--primary); }
.admin-queue-meta {
  margin-top: .25rem;
  font-size: .8rem;
  color: var(--text3);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.admin-queue-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================================
   NOTIFICATIONS PAGE
   ============================================================ */

.notif-container {
  max-width: 720px;
  margin: 2rem auto;
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.notif-header h1 { font-family: var(--font-display); font-size: 1.75rem; }
.notif-list { display: flex; flex-direction: column; gap: .5rem; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: .875rem 1rem;
  background: var(--bg-surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.notif-unread {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-surface));
}
.notif-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: .1rem; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: .9rem; color: var(--white); }
.notif-message { font-size: .85rem; color: var(--text2); margin-top: .15rem; }
.notif-time { font-size: .75rem; color: var(--text3); margin-top: .25rem; }
.notif-actions { display: flex; gap: .375rem; flex-shrink: 0; align-items: center; }

/* ============================================================
   NOTIFICATION PREFERENCES
   ============================================================ */

.notif-prefs-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.notif-prefs-head {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  background: var(--bg-surface);
  padding: .625rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.notif-prefs-head span:first-child { text-align: left; }
.notif-prefs-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.notif-prefs-row:last-child { border-bottom: none; }
.notif-prefs-row:nth-child(even) { background: color-mix(in srgb, var(--bg-surface) 50%, transparent); }
.notif-prefs-label { display: flex; flex-direction: column; gap: .2rem; }
.notif-prefs-desc { font-size: .78rem; color: var(--text3); }

/* Toggle switch */
.toggle-label {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.toggle-label input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 36px; height: 20px;
  background: var(--bg-alt);
  border-radius: 10px;
  position: relative;
  transition: background .2s;
  border: 1px solid var(--border);
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--text3);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.toggle-label input:checked + .toggle-track { background: var(--primary); border-color: var(--primary); }
.toggle-label input:checked + .toggle-track .toggle-thumb {
  transform: translateX(16px);
  background: var(--white);
}

/* ============================================================
   GUIDE VERSION HISTORY
   ============================================================ */

.history-container {
  max-width: 760px;
  margin: 2rem auto;
}
.history-header { margin-bottom: 1.5rem; }
.history-header h1 { font-family: var(--font-display); font-size: 1.5rem; margin-top: .5rem; }
.history-list { display: flex; flex-direction: column; gap: 1rem; }
.history-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.history-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem 1rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  flex-wrap: wrap;
}
.history-version {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--primary);
}
.history-date { color: var(--text3); }
.history-editor { color: var(--text2); }
.history-changelog {
  color: var(--text2);
  font-style: italic;
  padding: .2rem .5rem;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 4px;
  border-left: 2px solid var(--primary);
}
.history-snapshot { padding: .75rem 1rem; }
.history-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem .75rem;
  font-size: .85rem;
}
.history-fields dt { color: var(--text3); }
.history-fields dd { color: var(--text2); }

/* ============================================================
   SIDEBAR REPORT
   ============================================================ */

.sidebar-report {
  padding: .875rem;
}

/* ============================================================
   ADMIN REJECTION DROP
   ============================================================ */

.reject-details { position: relative; }
.reject-form-drop {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 100;
}

/* ============================================================
   NOTIFICATION BELL BADGE (layout)
   ============================================================ */

.notif-bell { position: relative; display: flex; align-items: center; }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 3px;
  background: var(--danger, #e53e3e);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================================
   PASS 2 STYLES
   ============================================================ */

/* --- Comment Voting & Threading --- */
.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.comments-header h2 { margin: 0; }

.comments-sort {
  display: flex;
  gap: .375rem;
}
.sort-btn {
  padding: .25rem .75rem;
  border-radius: 2rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all .15s;
}
.sort-btn:hover { color: var(--gold); border-color: var(--gold); }
.sort-btn.active { background: var(--gold); color: var(--bg-dark); border-color: var(--gold); }

.comment-footer {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .5rem;
}

.comment-vote-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: .375rem;
  color: var(--text-muted);
  font-size: .8rem;
  padding: .125rem .5rem;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.comment-vote-btn:hover { border-color: var(--gold); color: var(--gold); }
.comment-vote-btn.voted { background: rgba(200,150,64,.12); border-color: var(--gold); color: var(--gold); }

.comment-vote-count {
  font-size: .8rem;
  color: var(--text-muted);
}

.comment-reply-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .8rem;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.comment-reply-toggle:hover { color: var(--gold); }

.comment-reply-form {
  margin-top: .75rem;
  padding: .75rem;
  background: var(--bg-card);
  border-radius: .5rem;
  border: 1px solid var(--border);
}
.comment-reply-form textarea {
  width: 100%;
  min-height: 5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: .375rem;
  color: var(--text);
  padding: .625rem .75rem;
  font-family: inherit;
  font-size: .875rem;
  resize: vertical;
  box-sizing: border-box;
}
.reply-actions {
  display: flex;
  gap: .5rem;
  margin-top: .5rem;
}
.btn-sm { padding: .3125rem .75rem; font-size: .8125rem; }
.btn-link { background: none; border: none; cursor: pointer; padding: 0; font: inherit; }

/* --- Tag skill links --- */
.tag-skill {
  background: rgba(139, 90, 43, .15);
  color: #c9884a;
  border: 1px solid rgba(139, 90, 43, .3);
  text-decoration: none;
  padding: .2rem .5rem;
  border-radius: .25rem;
  font-size: .75rem;
  font-weight: 500;
  transition: all .15s;
}
.tag-skill:hover { background: rgba(139, 90, 43, .3); color: var(--gold); }

.tag-links { display: flex; flex-wrap: wrap; gap: .375rem; }
.tag-link {
  background: rgba(139, 90, 43, .12);
  color: #c9884a;
  border: 1px solid rgba(139, 90, 43, .25);
  text-decoration: none;
  padding: .25rem .625rem;
  border-radius: .375rem;
  font-size: .8125rem;
  transition: all .15s;
}
.tag-link:hover { background: rgba(139, 90, 43, .25); color: var(--gold); }

.active-tag-filter {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .25rem;
}
.tag-clear {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  margin-left: .25rem;
}
.tag-clear:hover { color: var(--gold); }

/* --- Profile tabs & following grid --- */
.profile-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.profile-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 500;
  padding: .625rem 1rem;
  margin-bottom: -1px;
  transition: all .15s;
}
.profile-tab:hover { color: var(--text); }
.profile-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.profile-tab-panel { }

.following-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
}
.following-card {
  display: flex;
  align-items: center;
  gap: .375rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: .5rem .875rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: .875rem;
  transition: all .15s;
}
.following-card:hover { border-color: var(--gold); color: var(--gold); }

/* --- Guide history link in sidebar --- */
.btn-full + .btn-full { margin-top: .375rem; }

/* --- Guides header layout with tag filter --- */
.guides-header { margin-bottom: 1.25rem; }

/* ============================================================
   FEEDBACK / TICKETING
   ============================================================ */

.feedback-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.ticket-row {
  display: grid;
  grid-template-columns: 10rem 1fr auto;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .625rem;
  padding: .875rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s;
}
.ticket-row:hover { border-color: var(--gold); }

.ticket-type {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.ticket-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-meta {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.ticket-replies { color: var(--gold); }
.ticket-submitter-name { color: var(--text-muted); }

.ticket-status {
  display: inline-block;
  padding: .125rem .5rem;
  border-radius: .25rem;
  font-size: .75rem;
  font-weight: 600;
}
.status-open        { background: rgba(34,197,94,.12); color: #4ade80; }
.status-progress    { background: rgba(251,191,36,.12); color: #fbbf24; }
.status-resolved    { background: rgba(99,102,241,.12); color: #818cf8; }
.status-closed      { background: rgba(100,100,120,.12); color: var(--text-muted); }

.ticket-priority {
  display: inline-block;
  padding: .125rem .5rem;
  border-radius: .25rem;
  font-size: .75rem;
  font-weight: 600;
}
.priority-low      { background: rgba(100,100,120,.1);  color: var(--text-muted); }
.priority-normal   { background: rgba(100,100,120,.1);  color: var(--text-muted); }
.priority-high     { background: rgba(251,146,60,.12);  color: #fb923c; }
.priority-critical { background: rgba(239,68,68,.12);   color: #f87171; }

/* Feedback form */
.feedback-form-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0;
}
.feedback-form { margin-top: 1.5rem; }

.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: .375rem;
}
.radio-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .875rem 1rem;
  border: 1px solid var(--border);
  border-radius: .625rem;
  cursor: pointer;
  transition: border-color .15s;
}
.radio-label:has(input:checked) { border-color: var(--gold); background: var(--goldglow); }
.radio-label input { margin-bottom: .25rem; accent-color: var(--gold); }
.radio-label span  { font-weight: 600; }
.radio-label small { color: var(--text-muted); font-size: .8rem; }

/* Ticket detail */
.ticket-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
}
.ticket-nav { margin-bottom: 1.5rem; }

.ticket-header {
  margin-bottom: 1.5rem;
}
.ticket-header-top {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: .75rem;
}
.ticket-type-badge {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gold2);
}
.ticket-title-h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  line-height: 1.3;
}
.ticket-submitter {
  font-size: .875rem;
  color: var(--text-muted);
}

.ticket-body-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  line-height: 1.7;
}

.ticket-replies {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.ticket-reply {
  border-radius: .625rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
}
.reply-staff {
  background: rgba(200,150,64,.06);
  border-color: rgba(200,150,64,.2);
}
.reply-user { background: var(--bg-card); }
.reply-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .625rem;
  font-size: .875rem;
}
.reply-author { font-weight: 600; }
.reply-date   { color: var(--text-muted); font-size: .8rem; }
.reply-body   { white-space: pre-wrap; line-height: 1.7; }

.ticket-reply-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.ticket-reply-form h3 { margin: 0 0 1rem; font-size: 1rem; }
.ticket-reply-form textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: .375rem;
  color: var(--text);
  padding: .75rem;
  font-family: inherit;
  font-size: .9rem;
  resize: vertical;
  box-sizing: border-box;
}

.ticket-admin-controls {
  background: rgba(100,100,120,.06);
  border: 1px solid var(--border);
  border-radius: .625rem;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}
.ticket-admin-controls h4 { margin: 0 0 .875rem; font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.ticket-admin-form { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.ticket-admin-form .field { margin: 0; }

.ticket-list-admin .ticket-row {
  grid-template-columns: 9rem 1fr auto;
}

.req { color: #f87171; }

/* ============================================================
   FEEDBACK BANNER
   ============================================================ */

.feedback-banner {
  background: rgba(200,150,64,.07);
  border-bottom: 1px solid rgba(200,150,64,.18);
  padding: 9px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.feedback-banner-text {
  font-size: .875rem;
  color: var(--text2);
}

.feedback-banner-actions {
  display: flex;
  gap: .625rem;
}

.feedback-banner-btn {
  font-size: .8125rem;
  font-weight: 500;
  padding: .3rem .85rem;
  border-radius: 4px;
  border: 1px solid rgba(200,150,64,.35);
  color: var(--gold2);
  background: rgba(200,150,64,.07);
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.feedback-banner-btn:hover {
  background: rgba(200,150,64,.15);
  border-color: rgba(200,150,64,.55);
  color: var(--gold);
}

.footer-feedback-link {
  color: var(--gold3) !important;
}
.footer-feedback-link:hover {
  color: var(--gold) !important;
}
