/* =========================================================
   OASSYSS — Design System 2026
   Inspirado en: Linear, Stripe, Vercel, Apple, Raycast, Notion
   ========================================================= */

/* ============== DESIGN TOKENS ============== */
:root {
  /* — Surfaces (dark) — */
  --bg-base:        #08080c;
  --bg-elevated:    #0e0e14;
  --bg-overlay:     #13131c;
  --bg-card:        #11111a;
  --bg-hover:       #1a1a26;
  --bg-active:      #20202e;

  /* — Borders — */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.09);
  --border-strong:  rgba(255, 255, 255, 0.14);
  --border-focus:   rgba(162, 89, 255, 0.55);

  /* — Brand: purple — */
  --brand:        #a259ff;
  --brand-hover:  #b370ff;
  --brand-soft:   rgba(162, 89, 255, 0.10);
  --brand-glow:   rgba(162, 89, 255, 0.35);
  --brand-glow-sm:rgba(162, 89, 255, 0.18);
  --brand-deep:   #7c3aed;
  --brand-darker: #5b21b6;
  --brand-light:  #c084fc;
  --brand-faint:  rgba(162, 89, 255, 0.04);

  /* — Accent: gold (premium) — */
  --gold:        #D4AF37;
  --gold-light:  #E8C76A;
  --gold-dark:   #9C7C2A;
  --gold-soft:   rgba(212, 175, 55, 0.10);
  --gold-glow:   rgba(212, 175, 55, 0.30);

  /* — Accent: cyan (info) — */
  --cyan:        #22d3ee;
  --cyan-soft:   rgba(34, 211, 238, 0.10);

  /* — Text — */
  --text-primary:   #f4f4f8;
  --text-secondary: #b4b4c2;
  --text-tertiary:  #8a8a9a;
  --text-muted:     #5a5a6a;
  --text-disabled:  #3a3a48;
  --text-inverse:   #08080c;

  /* — Status — */
  --success:        #22c55e;
  --success-soft:   rgba(34, 197, 94, 0.12);
  --warning:        #f59e0b;
  --warning-soft:   rgba(245, 158, 11, 0.12);
  --danger:         #ef4444;
  --danger-soft:    rgba(239, 68, 68, 0.12);
  --info:           #3b82f6;
  --info-soft:      rgba(59, 130, 246, 0.12);

  /* — Role colors — */
  --role-super-admin: #ef4444;
  --role-admin:       #f59e0b;
  --role-editor:      #3b82f6;
  --role-moderator:   #10b981;
  --role-gold:        #D4AF37;
  --role-user:        #6b7280;

  /* — Spacing (4px base, t-shirt sizes) — */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-9:  48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;

  /* — Radii — */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* — Shadows (layered, soft) — */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px var(--brand-soft), 0 8px 28px var(--brand-glow-sm);
  --shadow-gold: 0 0 0 1px var(--gold-soft), 0 8px 28px var(--gold-glow);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* — Typography — */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Sora', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', Consolas, monospace;

  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-base: 15px;
  --fs-md:   16px;
  --fs-lg:   18px;
  --fs-xl:   20px;
  --fs-2xl:  24px;
  --fs-3xl:  30px;
  --fs-4xl:  36px;
  --fs-5xl:  48px;
  --fs-6xl:  64px;

  --lh-tight:   1.15;
  --lh-snug:    1.3;
  --lh-base:    1.55;
  --lh-relaxed: 1.7;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-wider:  0.08em;

  /* — Motion — */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;

  /* — Layout — */
  --container-max: 1280px;
  --header-h: 64px;
  --sidebar-w: 240px;
}

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: 400;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 1200px 600px at 15% -10%, var(--brand-soft), transparent 50%),
    radial-gradient(ellipse 1000px 500px at 85% 0%, rgba(124, 58, 237, 0.06), transparent 60%),
    radial-gradient(ellipse 800px 400px at 50% 100%, var(--gold-soft), transparent 70%);
  background-attachment: fixed;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--brand-hover); }
::selection { background: var(--brand); color: var(--text-primary); }

/* Focus visible (accessibility) */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ============== TYPOGRAPHY ============== */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); color: var(--text-primary); }
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }
@media (max-width: 768px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }
}
p { color: var(--text-secondary); line-height: var(--lh-relaxed); }
small { color: var(--text-tertiary); font-size: var(--fs-sm); }
code { font-family: var(--font-mono); font-size: 0.9em; padding: 2px 6px; background: var(--bg-overlay); border-radius: var(--radius-xs); color: var(--brand-light); }

.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-tertiary) !important; }
.text-gold { color: var(--gold) !important; }
.text-gradient {
  background: linear-gradient(135deg, var(--brand-light), var(--brand), var(--brand-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============== LAYOUT ============== */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-6); width: 100%; }
@media (max-width: 768px) { .container { padding: 0 var(--space-4); } }
.section { padding: var(--space-9) 0; }
@media (max-width: 768px) { .section { padding: var(--space-7) 0; } }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(162, 89, 255, 0.04), transparent 40%);
  pointer-events: none;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.site-logo .logo-mark {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px var(--brand-glow-sm);
  position: relative;
}
.site-logo .logo-mark::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  background: var(--text-primary);
  clip-path: polygon(20% 30%, 20% 70%, 80% 50%);
  border-radius: 1px;
}
.site-nav { display: flex; align-items: center; gap: var(--space-1); }
.site-nav a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
}
.site-nav a:hover { color: var(--text-primary); background: var(--bg-hover); }
.site-nav a.active { color: var(--text-primary); }
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
}
.site-nav a.gold-link { color: var(--gold); }
.site-nav a.gold-link.active { color: var(--gold-light); }
.site-nav a.gold-link.active::after { background: var(--gold); }

.site-header-actions { display: flex; align-items: center; gap: var(--space-2); }
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  min-width: 200px;
}
.search-trigger:hover { background: var(--bg-hover); border-color: var(--border-default); color: var(--text-secondary); }
.search-trigger kbd {
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg-active);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-tertiary);
  margin-left: auto;
}
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 12px 4px 4px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.user-menu-trigger:hover { background: var(--bg-hover); border-color: var(--border-default); }
.user-menu-trigger img, .user-menu-trigger .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}
.user-menu-trigger span { font-size: var(--fs-sm); font-weight: 500; color: var(--text-primary); }

/* Auth buttons group (Iniciar sesión / Registrarse) */
.auth-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-1);
  padding-left: var(--space-3);
  border-left: 1px solid var(--border-subtle);
}
.auth-actions .btn { font-weight: 600; }

@media (max-width: 1024px) {
  .search-trigger { min-width: 0; padding: var(--space-2); }
  .search-trigger .search-label, .search-trigger kbd { display: none; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
}
@media (max-width: 640px) {
  .search-trigger { display: none; }
  .auth-actions { padding-left: 0; border-left: none; }
  .auth-actions .btn-ghost { display: none; }
}
@media (max-width: 480px) {
  .user-menu-trigger span { display: none; }
  .user-menu-trigger { padding: 4px; }
}

/* Mobile menu trigger */
.menu-toggle { display: none; padding: var(--space-2); border-radius: var(--radius-md); }
.menu-toggle:hover { background: var(--bg-hover); }
@media (max-width: 900px) { .menu-toggle { display: inline-flex; } }

/* Mobile menu drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
}
.mobile-menu.open { display: block; }
.mobile-menu .mobile-menu-inner {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 280px;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-subtle);
  padding: var(--space-6);
  animation: slideInRight var(--dur-base) var(--ease-out);
}
.mobile-menu .mobile-menu-inner a {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--dur-fast);
}
.mobile-menu .mobile-menu-inner a:hover, .mobile-menu .mobile-menu-inner a.active { background: var(--bg-hover); color: var(--text-primary); }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
  user-select: none;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: var(--fs-xs); }
.btn-lg { padding: 14px var(--space-6); font-size: var(--fs-md); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }

.btn-primary {
  background: linear-gradient(180deg, var(--brand-hover), var(--brand));
  color: var(--text-primary);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--brand-hover), var(--brand-hover));
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--brand-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--brand-light);
  border-color: var(--brand);
}
.btn-outline:hover {
  background: var(--brand-soft);
  color: var(--brand-light);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { background: #f87171; }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--text-inverse);
  font-weight: 700;
  box-shadow: 0 4px 16px var(--gold-glow), var(--shadow-inset);
}
.btn-gold:hover {
  background: linear-gradient(180deg, var(--gold), var(--gold-light));
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--gold-glow);
}

/* ============== FORMS ============== */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.form-label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary); }
.form-label .required { color: var(--danger); }
.form-hint { font-size: var(--fs-xs); color: var(--text-tertiary); }
.form-error { font-size: var(--fs-xs); color: var(--danger); margin-top: 2px; }

.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-family: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.form-control:hover, input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.form-control::placeholder, input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 100px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a9a' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px;
  appearance: none;
  background: var(--bg-overlay);
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all var(--dur-fast);
  flex-shrink: 0;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 0px;
  width: 5px; height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-check { display: flex; align-items: center; gap: var(--space-2); }
.form-check label { font-size: var(--fs-sm); color: var(--text-secondary); cursor: pointer; }

/* Search input */
.search-input-wrap { position: relative; }
.search-input-wrap .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-input-wrap input { padding-left: 40px; }

/* ============== CARDS ============== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
}
.card-hover:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-image-wrap {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-overlay);
  overflow: hidden;
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.card-hover:hover .card-image { transform: scale(1.04); }
.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--bg-overlay), var(--bg-hover));
  color: var(--text-muted);
}
.card-badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.card-badges-right { position: absolute; top: var(--space-3); right: var(--space-3); display: flex; gap: var(--space-2); }
.card-body { padding: var(--space-5); }
.card-category {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--brand-light);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-2);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: var(--lh-snug);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--brand-hover); }
.card-excerpt {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  line-height: var(--lh-base);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Card variants */
.card-elevated {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
  box-shadow: var(--shadow-md);
}
.card-glass {
  background: rgba(17, 17, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border-subtle);
}

/* ============== GRIDS ============== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-6); }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }
.news-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.news-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5); }

/* ============== BADGES & CHIPS ============== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-light); border-color: rgba(162, 89, 255, 0.2); }
.badge-gold { background: var(--gold-soft); color: var(--gold-light); border-color: rgba(212, 175, 55, 0.25); }
.badge-success { background: var(--success-soft); color: #4ade80; border-color: rgba(34, 197, 94, 0.2); }
.badge-warning { background: var(--warning-soft); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); }
.badge-danger { background: var(--danger-soft); color: #f87171; border-color: rgba(239, 68, 68, 0.2); }
.badge-info { background: var(--info-soft); color: #60a5fa; border-color: rgba(59, 130, 246, 0.2); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--dur-fast);
  cursor: pointer;
}
.chip:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text-primary); }
.chip.active { background: var(--brand); color: white; border-color: var(--brand); }
.chip.removable { padding-right: 4px; }
.chip-remove {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  margin-left: 2px;
}
.chip-remove:hover { background: rgba(255, 255, 255, 0.2); }

/* ============== ALERTS ============== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  border: 1px solid;
  margin-bottom: var(--space-4);
}
.alert-icon { flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-success { background: var(--success-soft); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
.alert-error { background: var(--danger-soft); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.alert-warning { background: var(--warning-soft); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
.alert-info { background: var(--info-soft); color: #93c5fd; border-color: rgba(59, 130, 246, 0.3); }

/* ============== ROLE BADGES ============== */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
}

/* ============== AVATAR ============== */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: var(--fs-sm);
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-md); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--fs-xl); }
.avatar-2xl { width: 128px; height: 128px; font-size: var(--fs-3xl); }

/* ============== TABLES ============== */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table th, table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--border-subtle); }
table th {
  background: var(--bg-overlay);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-tertiary);
}
table tbody tr { transition: background var(--dur-fast); }
table tbody tr:hover { background: var(--bg-hover); }
table tbody tr:last-child td { border-bottom: 0; }

/* ============== PAGINATION ============== */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin-top: var(--space-7); }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--dur-fast);
}
.pagination a:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-default); }
.pagination .active { background: var(--brand); color: white; border-color: var(--brand); }
.pagination .disabled { opacity: 0.4; cursor: not-allowed; }

/* ============== BREADCRUMB ============== */
.breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--text-tertiary); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb .sep { color: var(--text-muted); }

/* ============== EMPTY STATE ============== */
.empty-state { text-align: center; padding: var(--space-11) var(--space-6); }
.empty-state-icon { font-size: 56px; margin-bottom: var(--space-4); opacity: 0.5; }
.empty-state h3 { font-size: var(--fs-xl); margin-bottom: var(--space-2); color: var(--text-primary); }
.empty-state p { color: var(--text-tertiary); margin-bottom: var(--space-5); }

/* ============== SKELETON ============== */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--bg-overlay) 0%, var(--bg-hover) 50%, var(--bg-overlay) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius-sm);
  color: transparent;
}
.skeleton-text { height: 14px; margin-bottom: var(--space-2); }
.skeleton-text-lg { height: 22px; margin-bottom: var(--space-3); }

/* ============== TOOLTIP ============== */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  background: var(--bg-active);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: var(--fs-xs);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-fast) var(--ease-out);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============== ANIMATIONS ============== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.fade-in { animation: fadeIn var(--dur-slow) var(--ease-out) both; }
.fade-in-1 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 50ms; }
.fade-in-2 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 100ms; }
.fade-in-3 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 150ms; }
.fade-in-4 { animation: fadeIn var(--dur-slow) var(--ease-out) both; animation-delay: 200ms; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-default);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============== PROSE (article body) ============== */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { font-size: var(--fs-2xl); margin: var(--space-9) 0 var(--space-4); }
.prose h3 { font-size: var(--fs-xl); margin: var(--space-7) 0 var(--space-3); }
.prose p { font-size: var(--fs-md); line-height: var(--lh-relaxed); margin-bottom: var(--space-5); color: var(--text-secondary); }
.prose a { color: var(--brand-light); border-bottom: 1px solid var(--brand-soft); }
.prose a:hover { color: var(--brand-hover); border-bottom-color: var(--brand); }
.prose ul, .prose ol { margin: var(--space-4) 0 var(--space-5) var(--space-6); }
.prose li { margin-bottom: var(--space-2); line-height: var(--lh-relaxed); color: var(--text-secondary); }
.prose img { border-radius: var(--radius-lg); margin: var(--space-6) 0; box-shadow: var(--shadow-md); }
.prose blockquote {
  border-left: 3px solid var(--brand);
  padding: var(--space-2) var(--space-5);
  margin: var(--space-5) 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--brand-faint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.prose code { font-size: 0.9em; }

/* ============== FOOTER ============== */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-9) 0 var(--space-6);
  margin-top: var(--space-12);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wider); color: var(--text-tertiary); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { font-size: var(--fs-sm); color: var(--text-secondary); }
.footer-col a:hover { color: var(--text-primary); }
.footer-brand p { font-size: var(--fs-sm); color: var(--text-tertiary); margin: var(--space-3) 0; max-width: 320px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); font-size: var(--fs-xs); color: var(--text-muted); flex-wrap: wrap; gap: var(--space-3); }
.footer-social { display: flex; gap: var(--space-2); }
.footer-social a { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--bg-overlay); color: var(--text-tertiary); transition: all var(--dur-fast); }
.footer-social a:hover { background: var(--brand-soft); color: var(--brand-light); }

/* ============== REVIEW SCORE ============== */
.review-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.review-score.score-9, .review-score.score-10 { background: linear-gradient(135deg, #10b981, #059669); }
.review-score.score-7, .review-score.score-8  { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.review-score.score-5, .review-score.score-6  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.review-score.score-low                       { background: linear-gradient(135deg, #ef4444, #dc2626); }
.review-score-lg { width: 96px; height: 96px; font-size: var(--fs-3xl); border-radius: var(--radius-lg); }

/* ============== COMMENT ============== */
.comment { display: flex; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle); }
.comment:last-child { border-bottom: none; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); flex-wrap: wrap; }
.comment-author { font-weight: 600; font-size: var(--fs-sm); color: var(--text-primary); }
.comment-time { font-size: var(--fs-xs); color: var(--text-muted); }
.comment-content { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); }
.comment-actions { display: flex; gap: var(--space-3); margin-top: var(--space-2); }
.comment-action { font-size: var(--fs-xs); color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--radius-sm); transition: all var(--dur-fast); }
.comment-action:hover { background: var(--bg-hover); color: var(--text-primary); }
.comment-reply { margin-left: var(--space-7); padding-left: var(--space-4); border-left: 2px solid var(--border-subtle); }

/* ============== TABS ============== */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--space-6); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: var(--space-3) var(--space-4);
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--dur-fast);
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--brand); }

/* ============== DROPDOWN ============== */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--dur-base) var(--ease-out);
  z-index: 100;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: all var(--dur-fast);
  cursor: pointer;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border-subtle); margin: var(--space-2) 0; }

/* ============== MODAL ============== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal-backdrop.open { display: flex; animation: fadeIn var(--dur-base) var(--ease-out); }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideInUp var(--dur-base) var(--ease-out);
}
.modal-header { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: var(--space-6); }
.modal-footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-subtle); display: flex; justify-content: flex-end; gap: var(--space-2); }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-tertiary); }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ============== PROGRESS ============== */
.progress { height: 6px; background: var(--bg-overlay); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-light)); border-radius: var(--radius-full); transition: width var(--dur-slow) var(--ease-out); }

/* ============== HERO ============== */
.hero { padding: var(--space-12) 0 var(--space-10); position: relative; overflow: hidden; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 14px; background: var(--brand-soft); border: 1px solid rgba(162, 89, 255, 0.2); border-radius: var(--radius-full); color: var(--brand-light); font-size: var(--fs-xs); font-weight: 600; margin-bottom: var(--space-5); }
.hero-title { font-size: clamp(var(--fs-4xl), 6vw, var(--fs-6xl)); font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: var(--space-5); color: var(--text-primary); }
.hero-subtitle { font-size: var(--fs-lg); color: var(--text-tertiary); max-width: 640px; line-height: var(--lh-relaxed); margin-bottom: var(--space-7); }
.hero-cta { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ============== FILTER BAR ============== */
.filter-bar { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}
.filter-pill:hover { color: var(--text-primary); background: var(--bg-hover); }
.filter-pill.active { background: var(--bg-overlay); color: var(--text-primary); border-color: var(--border-default); box-shadow: var(--shadow-xs); }
.filter-pill .icon { font-size: 14px; line-height: 1; }
.filter-pills { display: flex; gap: var(--space-1); flex-wrap: wrap; padding: var(--space-2); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pills .filter-pill { border-radius: var(--radius-full); }
.filter-pills .filter-pill.active { background: var(--brand); color: white; border-color: var(--brand); }

/* ============== DIVIDER ============== */
.divider { height: 1px; background: var(--border-subtle); margin: var(--space-6) 0; }
.divider-text { display: flex; align-items: center; gap: var(--space-3); color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-wider); margin: var(--space-6) 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

/* ============== UTILS ============== */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ============== ACCESSIBILITY ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ============== HERO (featured) ============== */
.hero-card {
  display: block;
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  transition: all var(--dur-slow) var(--ease-out);
  aspect-ratio: 21/9;
}
.hero-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); border-color: var(--border-default); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-9) var(--space-8);
  background: linear-gradient(180deg, transparent 0%, rgba(8, 8, 12, 0.4) 50%, rgba(8, 8, 12, 0.95) 100%);
}
.hero-card-overlay .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--brand-soft);
  border: 1px solid rgba(162, 89, 255, 0.3);
  color: var(--brand-light);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  width: fit-content;
  margin-bottom: var(--space-4);
  backdrop-filter: blur(8px);
}
.hero-card-overlay h1 {
  font-size: clamp(1.5rem, 3.5vw, var(--fs-4xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
  max-width: 700px;
}
.hero-card-overlay p {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  max-width: 600px;
  line-height: var(--lh-relaxed);
}
.hero-card-overlay .meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}
.hero-card-overlay .meta img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* ============== HOME LAYOUT (2 columns) ============== */
.home-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-8); padding: var(--space-7) 0 var(--space-9); }
@media (max-width: 1024px) { .home-layout { grid-template-columns: 1fr; } }

/* ============== SECTION HEADERS ============== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); flex-wrap: wrap; gap: var(--space-3); }
.section-header h2 { font-size: var(--fs-2xl); font-weight: 700; }
.section-header a { font-size: var(--fs-sm); color: var(--text-tertiary); font-weight: 500; }
.section-header a:hover { color: var(--brand-hover); }

/* ============== SIDEBAR WIDGETS ============== */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.widget h3 { font-size: var(--fs-md); font-weight: 700; margin-bottom: var(--space-4); display: flex; align-items: center; gap: var(--space-2); }
.widget-list { display: flex; flex-direction: column; gap: var(--space-3); }
.widget-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  margin: calc(-1 * var(--space-2));
  border-radius: var(--radius-md);
  transition: background var(--dur-fast);
}
.widget-list-item:hover { background: var(--bg-hover); }
.widget-list-item .thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--bg-overlay); }
.widget-list-item .title { font-size: var(--fs-sm); color: var(--text-primary); font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.widget-list-item .meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.widget-list-item > div:not(.thumb) { flex: 1; min-width: 0; }

/* Widget podcast */
.widget-podcast { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); margin: calc(-1 * var(--space-2)); border-radius: var(--radius-md); }
.widget-podcast:hover { background: var(--bg-hover); }
.widget-podcast img { width: 60px; height: 60px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; }
.widget-podcast .podcast-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.widget-podcast .podcast-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; }

/* ============== POLL ============== */
.poll { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-4); }
.poll h4 { font-size: var(--fs-md); margin-bottom: var(--space-4); color: var(--text-primary); }
.poll-form { display: flex; flex-direction: column; gap: var(--space-2); }
.poll-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.poll-option:hover { background: var(--bg-hover); border-color: var(--border-default); }
.poll-option input { margin: 0; }
.poll-option:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }

/* ============== AVATAR (with initial fallback) ============== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  text-transform: uppercase;
  font-family: var(--font-display);
  user-select: none;
}
.user-menu-trigger .avatar { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.user-menu-trigger img { display: block; }

/* ============== COMMENT BUBBLE ============== */
.comment-section { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); margin-top: var(--space-7); }
.comment-section h3 { font-size: var(--fs-lg); margin-bottom: var(--space-5); }

/* ============== PROSE / ARTICLE ============== */
.article-hero { padding: var(--space-9) 0 var(--space-6); }
.article-hero h1 { font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl)); margin-bottom: var(--space-4); }
.article-meta { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-sm); color: var(--text-tertiary); margin-bottom: var(--space-6); }
.article-meta .author { display: flex; align-items: center; gap: var(--space-2); color: var(--text-secondary); font-weight: 500; }
.article-meta .author .avatar-sm { width: 28px; height: 28px; }
.article-cover { aspect-ratio: 21/9; border-radius: var(--radius-xl); overflow: hidden; margin-bottom: var(--space-7); box-shadow: var(--shadow-lg); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-tags { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-7); }

/* ============== FORUM ============== */
.forum-category { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); margin-bottom: var(--space-5); overflow: hidden; }
.forum-category-head { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: var(--space-3); }
.forum-category-head h2 { font-size: var(--fs-lg); }
.forum-subforum { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-subtle); transition: background var(--dur-fast); }
.forum-subforum:last-child { border-bottom: none; }
.forum-subforum:hover { background: var(--bg-hover); }
.forum-subforum-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); border-radius: var(--radius-md); font-size: 1.2rem; flex-shrink: 0; }
.forum-subforum-body { flex: 1; min-width: 0; }
.forum-subforum-title { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.forum-subforum-desc { font-size: var(--fs-sm); color: var(--text-tertiary); }
.forum-subforum-stats { display: flex; gap: var(--space-5); text-align: right; font-size: var(--fs-xs); color: var(--text-muted); }
.forum-subforum-stats strong { display: block; color: var(--text-primary); font-size: var(--fs-sm); }

.topic-list { display: flex; flex-direction: column; }
.topic-item { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-subtle); transition: background var(--dur-fast); }
.topic-item:last-child { border-bottom: none; }
.topic-item:hover { background: var(--bg-hover); }
.topic-pinned { color: var(--brand); }
.topic-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.topic-body { flex: 1; min-width: 0; }
.topic-title { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; display: flex; align-items: center; gap: var(--space-2); }
.topic-title a { color: inherit; }
.topic-title a:hover { color: var(--brand-hover); }
.topic-meta { font-size: var(--fs-xs); color: var(--text-tertiary); display: flex; align-items: center; gap: var(--space-2); }
.topic-stats { text-align: right; font-size: var(--fs-xs); color: var(--text-muted); }
.topic-stats strong { display: block; color: var(--text-primary); font-size: var(--fs-sm); }

/* ============== COMMUNITY POST ============== */
.community-post { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-4); transition: border-color var(--dur-fast); }
.community-post:hover { border-color: var(--border-default); }
.community-post-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.community-post-author { font-weight: 600; color: var(--text-primary); font-size: var(--fs-sm); }
.community-post-time { font-size: var(--fs-xs); color: var(--text-muted); }
.community-post-content { font-size: var(--fs-md); color: var(--text-secondary); line-height: var(--lh-relaxed); }
.community-post-actions { display: flex; gap: var(--space-4); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border-subtle); }
.community-post-action { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-tertiary); padding: 4px 8px; border-radius: var(--radius-sm); transition: all var(--dur-fast); }
.community-post-action:hover { background: var(--bg-hover); color: var(--brand-light); }

/* ============== PROFILE ============== */
.profile-header { background: linear-gradient(180deg, var(--brand-soft), transparent 60%); padding: var(--space-10) 0; border-bottom: 1px solid var(--border-subtle); }
.profile-header-inner { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; color: white; box-shadow: var(--shadow-glow); }
.profile-info h1 { font-size: var(--fs-3xl); margin-bottom: var(--space-1); }
.profile-info .username-handle { color: var(--text-tertiary); font-size: var(--fs-sm); }
.profile-bio { color: var(--text-secondary); margin-top: var(--space-3); max-width: 600px; line-height: var(--lh-relaxed); }
.profile-stats { display: flex; gap: var(--space-6); margin-top: var(--space-5); }
.profile-stat strong { display: block; font-size: var(--fs-xl); color: var(--text-primary); }
.profile-stat span { font-size: var(--fs-xs); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: var(--tracking-wider); }

/* ============== AUTH (login/register) ============== */
.auth-container { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: var(--space-7) var(--space-4); }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: var(--radius-2xl); padding: var(--space-8); box-shadow: var(--shadow-xl); }
.auth-card h1 { font-size: var(--fs-2xl); margin-bottom: var(--space-2); text-align: center; }
.auth-subtitle { color: var(--text-tertiary); text-align: center; margin-bottom: var(--space-6); font-size: var(--fs-sm); }
.auth-card .btn-block { margin-top: var(--space-2); }
.auth-footer { text-align: center; margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--text-tertiary); }
.auth-divider { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0; color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-wider); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

/* ============== ERROR PAGES ============== */
.error-page { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: var(--space-7); text-align: center; }
.error-code { font-family: var(--font-display); font-size: clamp(6rem, 15vw, 12rem); font-weight: 800; line-height: 0.9; background: linear-gradient(135deg, var(--brand-light), var(--brand-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: var(--space-4); }
.error-page h1 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.error-page p { color: var(--text-tertiary); margin-bottom: var(--space-6); max-width: 480px; }

/* ============== PROFILE BADGES (Gold, etc.) ============== */
.profile-badges { display: flex; gap: var(--space-2); margin-top: var(--space-3); }

/* ============== RESPONSIVE FIXES ============== */
@media (max-width: 768px) {
  .home-layout { padding: var(--space-5) 0; gap: var(--space-5); }
  .hero-card-overlay { padding: var(--space-6) var(--space-5); }
  .section { padding: var(--space-7) 0; }
  .auth-card { padding: var(--space-6); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .hero-card { aspect-ratio: 4/3; }
  .hero-card-overlay h1 { font-size: var(--fs-2xl); }
  .hero-card-overlay p { font-size: var(--fs-sm); }
  .profile-header-inner { flex-direction: column; text-align: center; }
  .profile-stats { justify-content: center; }
  .profile-avatar { width: 96px; height: 96px; font-size: 2.5rem; }
}

/* =========================================================
   PREMIUM REFINEMENTS 2026
   ========================================================= */

/* — Subtle grain texture for premium feel — */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* — Premium card with subtle gradient border — */
.card-premium {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
}
.card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(162, 89, 255, 0.3), transparent 40%, rgba(212, 175, 55, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.card-premium:hover::before { opacity: 1; }

/* — Stat card (for admin/widgets) — */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--brand-soft), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur-base);
  pointer-events: none;
}
.stat-card:hover { border-color: var(--border-default); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card:hover::after { opacity: 1; }
.stat-label { font-size: var(--fs-xs); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: var(--tracking-wider); font-weight: 600; margin-bottom: var(--space-2); }
.stat-value { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: var(--space-2); }
.stat-trend { font-size: var(--fs-xs); color: var(--success); display: inline-flex; align-items: center; gap: 4px; }
.stat-trend.down { color: var(--danger); }

/* — Premium button with shine effect — */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s var(--ease-out);
}
.btn-shine:hover::before { left: 100%; }

/* — Refined focus ring (accessibility) — */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
  transition: outline-offset var(--dur-fast);
}

/* — Smooth image loading — */
img { background: var(--bg-overlay); }

/* — Skeleton loader enhancement — */
.skeleton {
  background: linear-gradient(90deg, var(--bg-overlay) 0%, var(--bg-active) 50%, var(--bg-overlay) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* — Premium scrollbar — */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: var(--radius-full); border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* — Refined dropdown with backdrop — */
.dropdown-menu {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(14, 14, 20, 0.85);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.04) inset;
}

/* — Card hover lift enhancement — */
.card-hover {
  transition: all var(--dur-base) var(--ease-out);
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-default);
}

/* — Premium divider with gradient — */
.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-default), transparent);
  margin: var(--space-7) 0;
}

/* — Better mobile header — */
@media (max-width: 900px) {
  .site-header { height: 56px; }
  .site-header .container { gap: var(--space-2); }
  .site-logo span:not(.logo-mark) { font-size: var(--fs-md); }
}

/* — Improved hero for mobile — */
@media (max-width: 640px) {
  .hero { padding: var(--space-7) 0 var(--space-5); }
  .hero-card { aspect-ratio: 16/10; }
  .hero-card-overlay { padding: var(--space-5); }
  .hero-card-overlay h1 { font-size: var(--fs-xl); }
}

/* — Print styles — */
@media print {
  .site-header, .site-footer, .mobile-menu, .dropdown-menu { display: none !important; }
  body { background: white; color: black; }
}

/* =========================================================
   HOME 2026 — premium refinements
   ========================================================= */

.section-block { margin-bottom: var(--space-9); }
.section-block:first-child { padding-top: 0; }

.section-header h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all var(--dur-fast) var(--ease-out);
}
.section-link:hover {
  color: var(--brand-light);
  background: var(--brand-soft);
}

.home-sidebar { display: flex; flex-direction: column; gap: var(--space-4); position: sticky; top: calc(var(--header-h) + var(--space-5)); align-self: start; }
@media (max-width: 1024px) { .home-sidebar { position: static; } }

.widget-rank {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-overlay);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.widget-list-item:hover .widget-rank { background: var(--brand-soft); color: var(--brand-light); }

.widget-gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(162, 89, 255, 0.06));
  border-color: rgba(212, 175, 55, 0.25);
  position: relative;
  overflow: hidden;
}
.widget-gold::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15), transparent 70%);
  pointer-events: none;
}
.widget-gold > * { position: relative; }
.widget-gold-icon {
  font-size: 28px;
  margin-bottom: var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--gold-soft), rgba(212, 175, 55, 0.2));
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.widget-gold p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
  line-height: var(--lh-relaxed);
}

/* — Hero card premium overlay — */
.hero-card-overlay h1 {
  background: linear-gradient(180deg, #ffffff, #e0e0e8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
}
