/* =====================================================================
   BBR Mod Hub — professional design system
   Tokens (dark default + light override), base, shell, components.
   ===================================================================== */

:root{
  /* palette — dark default */
  --bg:            #0a0b0d;
  --bg-raise:      #101215;
  --bg-raise-2:    #15181c;
  --panel:         #0f1114;
  --panel-2:       #13161a;
  --line:          #1f2328;
  --line-2:        #272c33;
  --line-soft:     #181b1f;

  --ink:           #f5f6f7;
  --ink-2:         #c9ccd1;
  --muted:         #8a8f98;
  --muted-2:       #60666e;
  --dim:           #3a3f47;

  --accent:        #ff6a2b;
  --accent-2:      #ff8652;
  --accent-soft:   rgba(255,106,43,.14);
  --accent-edge:   rgba(255,106,43,.35);

  --ok:            #3ecf8e;
  --ok-soft:       rgba(62,207,142,.14);
  --warn:          #f0b64a;
  --warn-soft:     rgba(240,182,74,.14);
  --danger:        #ef5b5b;
  --danger-soft:   rgba(239,91,91,.14);
  --info:          #6aa5ff;
  --info-soft:     rgba(106,165,255,.14);

  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     14px;

  --shadow-sm:     0 1px 0 rgba(255,255,255,.03) inset, 0 1px 2px rgba(0,0,0,.4);
  --shadow:        0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px rgba(0,0,0,.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1240px;

  --nav-h: 60px;
}

html[data-theme="light"]{
  --bg:            #f7f7f8;
  --bg-raise:      #ffffff;
  --bg-raise-2:    #fbfbfc;
  --panel:         #ffffff;
  --panel-2:       #f4f5f6;
  --line:          #e4e6ea;
  --line-2:        #d3d6dc;
  --line-soft:     #edeef1;

  --ink:           #0e1013;
  --ink-2:         #2e3239;
  --muted:         #6a6f78;
  --muted-2:       #8e939b;
  --dim:           #b4b8bf;

  --accent:        #e8541a;
  --accent-2:      #ff6a2b;
  --accent-soft:   rgba(232,84,26,.10);
  --accent-edge:   rgba(232,84,26,.30);

  --shadow-sm:     0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(14,16,19,.06);
  --shadow:        0 1px 0 rgba(255,255,255,.7) inset, 0 12px 30px rgba(14,16,19,.08);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01","cv02","cv11";
  min-height: 100%;
}
a{ color: inherit; text-decoration: none; }
code, kbd, pre{ font-family: var(--font-mono); }
code{
  font-size: .88em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink-2);
}
h1,h2,h3,h4{ margin:0; font-weight:700; letter-spacing:-.01em; color: var(--ink); }
h1{ font-size: 40px; line-height:1.08; letter-spacing:-.025em; }
h2{ font-size: 24px; line-height:1.2; letter-spacing:-.015em; }
h3{ font-size: 16px; line-height:1.3; }
p{ margin:0; color: var(--ink-2); }
img{ max-width:100%; display:block; }

/* ============================================================== Nav */
.nav{
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand{
  display:flex; align-items:center; gap: 10px;
  font-weight: 700;
}
.brand-mark{
  width: 34px; height: 34px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  background: #6a2acb;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 4px 12px rgba(106,42,203,.3);
}
.brand-mark img{
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.brand-name{ font-size: 14px; letter-spacing:-.01em; color: var(--ink); }
.brand-dim{ color: var(--muted); font-weight: 500; }

.nav-links{ display:flex; gap: 4px; align-items: center; }
.nav-links a{
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  padding: 7px 12px; border-radius: 6px;
  transition: color .12s, background .12s;
  display: inline-flex; align-items: center;
}
.nav-links a:hover{ color: var(--ink); background: var(--panel-2); }
.nav-links a.active{ color: var(--ink); background: var(--panel-2); }
.nav-links a .ext{
  font-family: var(--font-mono); font-size: 10px; color: var(--muted-2);
  margin-left: 4px;
}

.nav-right{ display:flex; align-items:center; gap: 10px; }
.nav-user{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 6px; border-radius: 8px;
  color: var(--ink);
  transition: background .12s;
}
.nav-user:hover{ background: var(--panel-2); }
.nav-user span.nav-user-name{ font-size: 13px; font-weight: 500; }
.nav-logout{
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--muted); border: 1px solid transparent;
  transition: color .12s, background .12s, border-color .12s;
}
.nav-logout:hover{ color: var(--danger); background: var(--danger-soft); border-color: color-mix(in oklab, var(--danger) 30%, transparent); }
.nav-logout svg{ width:14px; height:14px; }

/* Theme toggle */
.theme-toggle{
  all: unset;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.theme-toggle:hover{ color: var(--ink); border-color: var(--line-2); background: var(--panel-2); }
.theme-toggle svg{ width:16px; height:16px; }
.theme-toggle .theme-icon-moon{ display: none; }
.theme-toggle .theme-icon-sun{ display: block; }
html[data-theme="light"] .theme-toggle .theme-icon-sun{ display: none; }
html[data-theme="light"] .theme-toggle .theme-icon-moon{ display: block; }

/* ============================================================== Buttons */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: background .12s, border-color .12s, color .12s, transform .06s;
  line-height: 1;
  background: transparent;
  color: var(--ink);
}
.btn:active{ transform: translateY(.5px); }
.btn svg{ width:14px; height:14px; flex-shrink:0; }
.btn-primary{
  background: var(--accent);
  color: #fff;
  border-color: color-mix(in oklab, var(--accent) 90%, #fff 10%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 1px 0 rgba(0,0,0,.15);
}
.btn-primary:hover{ background: var(--accent-2); color: #fff; }
.btn-ghost{
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover{ background: var(--panel-2); border-color: var(--line-2); }
.btn-subtle{
  background: var(--panel-2);
  color: var(--ink);
  border-color: var(--line);
}
.btn-subtle:hover{ background: var(--bg-raise-2); border-color: var(--line-2); }
.btn-danger{
  background: transparent;
  color: var(--danger);
  border-color: color-mix(in oklab, var(--danger) 40%, transparent);
}
.btn-danger:hover{ background: var(--danger-soft); }
.btn-lg{ padding: 12px 18px; font-size: 14px; border-radius: 10px; }
.btn-sm{ padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.btn-block{ width: 100%; }

.icon{ width: 14px; height: 14px; stroke-width: 2; flex-shrink: 0; }

/* ============================================================== Containers */
.wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow{ max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ============================================================== Atoms */
.kicker{
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.kicker.muted{ color: var(--muted-2); }

.pill{
  display: inline-flex; align-items:center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.pill-accent{ background: var(--accent-soft); color: var(--accent); border-color: var(--accent-edge); }
.pill-ok{ background: var(--ok-soft); color: var(--ok); border-color: color-mix(in oklab, var(--ok) 30%, transparent); }
.pill-warn{ background: var(--warn-soft); color: var(--warn); border-color: color-mix(in oklab, var(--warn) 30%, transparent); }
.pill-info{ background: var(--info-soft); color: var(--info); border-color: color-mix(in oklab, var(--info) 30%, transparent); }

.pill-dot{ width:6px; height:6px; border-radius:50%; background: currentColor; }

.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.divider{ height: 1px; background: var(--line); margin: 24px 0; border: 0; }

/* avatar */
.avatar{
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #2a2f36, #171a1e);
  display:grid; place-items:center;
  font-size: 11px; font-weight: 700; color: var(--ink);
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--line);
}
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.avatar.sm{ width:20px; height:20px; font-size: 9px; }
.avatar.md{ width: 32px; height: 32px; font-size: 12px; }
.avatar.lg{ width:96px; height:96px; font-size: 32px; border-radius: 14px; }
.avatar.accent{ background: linear-gradient(135deg, var(--accent), #ff2e7a); color: #fff; }

/* avatar fallback legacy class */
.avatar-fallback{
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #2a2f36, #171a1e);
  display:grid; place-items:center;
  font-size: 11px; font-weight: 700; color: var(--ink);
  border: 1px solid var(--line);
}
.avatar-fallback.sm{ width:20px; height:20px; font-size: 9px; }
.avatar-fallback.lg{ width:112px; height:112px; font-size: 44px; border-radius: 20px; }

/* fields */
.field{ display:block; margin-bottom: 14px; }
.field > span{
  display:flex; align-items:center; gap:6px;
  font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px;
}
.field > span em{ color: var(--accent); font-style: normal; }
.field > span small{ color: var(--muted); font-weight: 400; font-size: 11px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="search"],
.field input[type="file"],
.field textarea,
.field select{
  width: 100%;
  background: var(--bg-raise);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.field textarea{ font-family: var(--font-sans); resize: vertical; min-height: 100px; }
.field input::placeholder, .field textarea::placeholder{ color: var(--muted-2); }
.field input:focus,
.field textarea:focus,
.field select:focus{
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[type="file"]{
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.file-picked{
  display: block;
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 6px;
}

/* code blocks */
pre.code, pre.docs-ascii{
  margin: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px; line-height: 1.65;
  color: var(--ink-2);
  overflow: auto;
  white-space: pre;
}

/* scrollbar */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-thumb{ background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track{ background: transparent; }

/* utility */
.row{ display:flex; align-items:center; gap: 10px; }
.row-between{ display:flex; align-items:center; justify-content: space-between; gap: 10px; }
.stack{ display:flex; flex-direction:column; gap: 10px; }
.mono{ font-family: var(--font-mono); }
.muted{ color: var(--muted); }
.tabnum{ font-variant-numeric: tabular-nums; }
.hidden{ display: none !important; }

/* ============================================================== Flash */
.flash-wrap{
  max-width: var(--maxw);
  margin: 16px auto 0;
  padding: 0 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.flash{
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
}
.flash-error{
  background: var(--danger-soft);
  border-color: color-mix(in oklab, var(--danger) 35%, transparent);
  color: var(--danger);
}
.flash-ok{
  background: var(--ok-soft);
  border-color: color-mix(in oklab, var(--ok) 35%, transparent);
  color: var(--ok);
}

/* ============================================================== Footer */
.footer{
  border-top: 1px solid var(--line);
  margin-top: 80px;
  background: var(--bg);
}
.footer-inner{
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 24px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
}
.footer h4{
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 12px;
}
.footer a{
  display: block; color: var(--ink-2); font-size: 13px; margin-bottom: 6px;
}
.footer a:hover{ color: var(--ink); }
.footer-brand{ display:flex; align-items:center; gap:10px; margin-bottom: 10px; }
.footer-brand .brand-name{ color: var(--ink); }
.footer-tag{ color: var(--muted); font-size: 13px; max-width: 280px; }
.footer-bar{
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px 36px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px; font-family: var(--font-mono); color: var(--muted-2);
  display:flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}

@media (max-width: 800px){
  .footer-inner{ grid-template-columns: 1fr 1fr; }
}

/* ============================================================== Home / Hero */
.hero{
  position: relative;
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before{
  content:"";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(255,106,43,.08), transparent 60%),
    radial-gradient(ellipse 40% 40% at 85% 10%, rgba(255,46,122,.05), transparent 70%);
  pointer-events: none;
}
.hero-grid{
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  opacity: .5;
  pointer-events: none;
}
.hero-inner{ position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hero-eyebrow{
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px; border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.hero-eyebrow::before{
  content:""; width:6px; height:6px; border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero-title{
  font-size: 72px;
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 700;
  max-width: 920px;
  margin-bottom: 24px;
}
.hero-title .dim{ color: var(--muted); }
.hero-sub{
  font-size: 18px;
  line-height: 1.55;
  max-width: 640px;
  color: var(--ink-2);
  margin-bottom: 40px;
}
.hero-sub b{ color: var(--ink); font-weight: 600; }

.hero-ctas{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-ctas .btn-lg{ padding: 14px 22px; font-size: 14px; }
.hero-download-meta{
  display:flex; align-items:center; gap: 14px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  margin-left: 4px;
}
.hero-download-meta span + span::before{
  content:"·"; margin-right: 14px; color: var(--dim);
}

.hero-stats{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
  max-width: 720px;
}
.hero-stats > div{
  padding: 20px 0 0;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}
.hero-stats > div:last-child{ border-right: 0; }
.hero-stats > div:not(:first-child){ padding-left: 24px; }
.hero-stats b{
  display: block;
  font-size: 28px; font-weight: 700; letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hero-stats small{
  display: block;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 4px;
}

@media (max-width: 700px){
  .hero{ padding: 64px 0 56px; }
  .hero-title{ font-size: 44px; }
  .hero-sub{ font-size: 16px; }
  .hero-stats{ grid-template-columns: 1fr 1fr; }
  .hero-stats > div{ border-right: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .hero-stats > div:not(:first-child){ padding-left: 0; }
}

/* ============================================================== How it works */
.how{
  padding: 96px 0 40px;
  border-bottom: 1px solid var(--line);
}
.section-head{
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px 48px;
  display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.section-head-l h2{ font-size: 32px; letter-spacing: -.02em; }
.section-head-l .kicker{ margin-bottom: 10px; display: block; }
.section-head-l p{ max-width: 480px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.section-more{
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items:center; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.section-more:hover{ background: var(--panel-2); color: var(--ink); }
.section-more svg{ width: 14px; height: 14px; }

.how-grid{
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
}
.how-card{
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  position: relative;
}
.how-card:last-child{ border-right: 0; }
.how-card .how-num{
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; color: var(--accent);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.how-card .how-num::after{
  content:""; flex:1; height:1px; background: var(--line);
}
.how-card h3{ font-size: 18px; margin-bottom: 8px; letter-spacing:-.01em; }
.how-card p{ font-size: 14px; line-height: 1.55; color: var(--muted); }
.how-card-icon{
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel-2);
  display:grid; place-items:center;
  margin-bottom: 20px;
  color: var(--accent);
}
.how-card-icon svg{ width: 20px; height: 20px; }

@media (max-width: 900px){
  .how-grid{ grid-template-columns: 1fr; }
  .how-card{ border-right: 0; border-bottom: 1px solid var(--line); }
  .how-card:last-child{ border-bottom: 0; }
}

/* ============================================================== Mod list (data-dense rows) */
.mod-section{ padding: 80px 0 20px; }
.mod-list{
  max-width: min(var(--maxw), 100% - 48px);
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
}
.mod-list-head{
  display: grid;
  grid-template-columns: 56px 2fr 1.3fr .7fr .6fr .6fr 120px;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2);
  align-items: center;
}
.mod-row{
  display: grid;
  grid-template-columns: 56px 2fr 1.3fr .7fr .6fr .6fr 120px;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  transition: background .1s;
  cursor: pointer;
  color: inherit;
}
.mod-row:last-child{ border-bottom: 0; }
.mod-row:hover{ background: var(--panel-2); }
.mod-thumb{
  width: 56px; height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a1e23, #0f1114);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--muted-2);
  flex-shrink: 0;
}
.mod-thumb img{ width:100%; height:100%; object-fit: cover; display: block; }
.mod-thumb svg{ width: 18px; height: 18px; }
.mod-thumb.c-sunset{ background: linear-gradient(135deg, #ff6a2b, #ff2e7a); }
.mod-thumb.c-ocean{  background: linear-gradient(135deg, #22d3ee, #2563eb); }
.mod-thumb.c-jungle{ background: linear-gradient(135deg, #a3e635, #059669); }
.mod-thumb.c-violet{ background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.mod-thumb.c-amber{  background: linear-gradient(135deg, #f59e0b, #dc2626); }
.mod-thumb.c-mint{   background: linear-gradient(135deg, #34d399, #06b6d4); }
.mod-thumb.c-carbon{ background: linear-gradient(135deg, #374151, #0b0d10); border-color: var(--line-2); }
.mod-thumb.c-royal{  background: linear-gradient(135deg, #6366f1, #8b5cf6); }

.mod-name-col{ display:flex; flex-direction: column; gap: 4px; min-width: 0; }
.mod-name{ font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.mod-desc{
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mod-author{ display:flex; align-items:center; gap: 8px; font-size: 13px; color: var(--ink-2); min-width:0;}
.mod-author b{ font-weight: 500; }
.mod-meta{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.mod-meta.dim{ color: var(--muted); }
.mod-target{ display: flex; gap: 4px; flex-wrap: wrap; }
.mod-target .pill{ padding: 2px 6px; font-size: 9px; }

.mod-action{
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
}
.mod-dl-pill{
  display: inline-flex; align-items:center; gap: 6px;
  padding: 6px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.mod-dl-pill svg{ width: 11px; height: 11px; color: var(--muted); }
.mod-row:hover .mod-dl-pill{ border-color: var(--accent-edge); color: var(--accent); background: var(--accent-soft); }
.mod-row:hover .mod-dl-pill svg{ color: var(--accent); }

@media (max-width: 900px){
  .mod-list-head{ display: none; }
  .mod-row{
    grid-template-columns: 56px 1fr 110px;
    gap: 12px;
    padding: 12px 16px;
  }
  .mod-row .mod-author,
  .mod-row .mod-meta:not(.mod-dl-pill),
  .mod-row .mod-target{ display: none; }
  .mod-list{ max-width: min(var(--maxw), 100% - 32px); }
}

/* ============================================================== CTA band */
.cta-band{
  max-width: var(--maxw); margin: 80px auto 0; padding: 0 24px;
}
.cta-band-inner{
  position: relative;
  padding: 56px 48px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cta-band-inner::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(ellipse 50% 80% at 100% 50%, rgba(255,106,43,.10), transparent 70%);
  pointer-events:none;
}
.cta-band-inner > *{ position: relative; }
.cta-band h2{
  font-size: 32px; letter-spacing: -.02em; margin: 10px 0 10px;
}
.cta-band p{ color: var(--muted); font-size: 15px; margin-bottom: 24px; max-width: 540px; }
.cta-actions{ display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================== Browse */
.browse-head{
  max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 24px;
}
.browse-head h1{ font-size: 36px; letter-spacing:-.02em; margin-bottom: 8px; }
.browse-head p{ color: var(--muted); font-size: 14px; }
.browse-kicker{ display:block; margin-bottom: 14px; }

.browse-toolbar{
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px 16px;
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
}
.search-box{ position: relative; }
.search-box svg{
  position: absolute; top: 50%; left: 12px; transform: translateY(-50%);
  color: var(--muted-2); width: 14px; height: 14px;
}
.search-box input{
  width: 100%; padding: 10px 12px 10px 36px;
  background: var(--bg-raise);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-sans); font-size: 13px;
  outline: none;
}
.search-box input:focus{ border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box .kbd-hint{
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted-2);
  padding: 2px 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.sort-tabs{
  display: flex; gap: 2px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px;
}
.sort-tab{
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent;
}
.sort-tab:hover{ color: var(--ink-2); }
.sort-tab.active{ background: var(--bg-raise); color: var(--ink); box-shadow: var(--shadow-sm); }
.sort-tab svg{ width: 12px; height: 12px; }

.result-summary{
  max-width: var(--maxw); margin: 0 auto; padding: 8px 24px 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  display:flex; justify-content: space-between;
}

.browse-list{
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.browse-list .mod-list{
  margin-left: 0; margin-right: 0;
}

.pager{
  max-width: var(--maxw); margin: 24px auto 0; padding: 20px 24px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.pager a, .pager span{
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-2);
}
.pager a:hover{ background: var(--panel-2); color: var(--ink); }
.pager .cur{ background: var(--accent-soft); color: var(--accent); border-color: var(--accent-edge); }

@media (max-width: 700px){
  .browse-toolbar{ grid-template-columns: 1fr; }
}

/* ============================================================== Mod detail */
.detail-wrap{
  max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 0;
}
.breadcrumb{
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  display: flex; align-items: center; gap: 8px; margin-bottom: 28px;
  flex-wrap: wrap;
}
.breadcrumb a{ color: var(--muted); }
.breadcrumb a:hover{ color: var(--ink); }
.breadcrumb .sep{ color: var(--dim); }

.detail-grid{
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px;
  align-items: start;
}
@media (max-width: 900px){ .detail-grid{ grid-template-columns: 1fr; } }

.detail-main h1{
  font-size: 40px; letter-spacing: -.025em; margin-bottom: 12px; line-height: 1.1;
}
.detail-kicker{
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-author{
  display:flex; align-items:center; gap: 10px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  width: fit-content; margin: 16px 0 24px;
}
.detail-author .avatar{ width: 32px; height: 32px; font-size: 12px; }
.detail-author b{ font-weight: 600; color: var(--ink); }
.detail-author .muted{ font-size: 12px; color: var(--muted); }

.detail-thumb-big{
  aspect-ratio: 16/9;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff6a2b, #ff2e7a);
  border: 1px solid var(--line);
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
}
.detail-thumb-big img{ width: 100%; height: 100%; object-fit: cover; }
.detail-thumb-big.empty::after{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(0,0,0,.3), transparent 60%);
}

.detail-desc{ margin-bottom: 32px; }
.detail-desc h3{
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 12px;
}
.detail-desc p{
  font-size: 15px; color: var(--ink-2); line-height: 1.65; margin-bottom: 14px;
  white-space: pre-wrap;
}
.detail-desc ol, .detail-desc ul{
  color: var(--ink-2); line-height: 1.7; padding-left: 20px; font-size: 14px;
}
.detail-desc li{ margin-bottom: 6px; }

.chip-row{ display:flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }

/* Side panel: install card */
.install-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: sticky; top: calc(var(--nav-h) + 20px);
}
.install-head{
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.install-head .kicker{ font-size: 10px; margin-bottom: 6px; display: block; }
.install-head .file{
  font-family: var(--font-mono); font-size: 14px; color: var(--ink);
  font-weight: 500; margin-bottom: 4px; word-break: break-all;
}
.install-head .size{
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.install-body{ padding: 18px 20px; }
.install-body .btn{ width: 100%; }
.install-body .btn + .btn{ margin-top: 8px; }

.facts{
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--line);
}
.facts > div{
  padding: 14px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts > div:nth-child(2n){ border-right: 0; }
.facts > div:nth-last-child(-n+2){ border-bottom: 0; }
.facts small{
  display: block;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 4px;
}
.facts b{
  display: block; font-size: 14px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums;
}

.checksum-row{
  padding: 14px 20px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.checksum-row svg{ width: 12px; height: 12px; flex-shrink: 0; }
.checksum-row span.hash{ color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }

.mod-admin{
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* ============================================================== Upload */
.upload-wrap{
  max-width: 860px; margin: 0 auto; padding: 48px 24px 0;
}
.upload-head{ margin-bottom: 28px; }
.upload-head h1{ font-size: 36px; letter-spacing:-.02em; margin-bottom: 8px; }
.upload-head p{ color: var(--muted); font-size: 14px; max-width: 560px; }

.step-rail{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-bottom: 28px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); overflow: hidden;
}
.step{
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  border-right: 1px solid var(--line);
  position: relative;
}
.step:last-child{ border-right: 0; }
.step .num{
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.step .num svg{ width: 12px; height: 12px; }
.step.done .num{ background: var(--accent); color:#fff; border-color: var(--accent); }
.step.cur .num{ background: var(--accent-soft); color: var(--accent); border-color: var(--accent-edge); }
.step .l{ display: flex; flex-direction: column; }
.step .l b{ font-size: 13px; color: var(--ink); font-weight: 600; }
.step .l small{ font-size: 11px; color: var(--muted); }

.upload-form{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 28px 24px;
}

.drop-zone{
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-raise);
  transition: border-color .15s, background .15s;
  cursor: pointer;
  position: relative;
}
.drop-zone:hover{ border-color: var(--accent-edge); background: var(--panel-2); }
.drop-zone input[type="file"]{
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  padding: 0;
}
.drop-icon{
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--line);
  display: grid; place-items: center; margin: 0 auto 14px;
  color: var(--accent);
}
.drop-icon svg{ width: 24px; height: 24px; }
.drop-title{ font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.drop-sub{ color: var(--muted); font-size: 13px; }
.drop-sub code{ margin: 0 2px; }
.drop-picked{
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ok);
}

.upload-progress{
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-raise-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.upload-progress[hidden]{ display: none; }
.up-label{
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px; letter-spacing: .04em;
}
.up-label .up-phase{ color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
.up-label .up-pct{ font-variant-numeric: tabular-nums; }
.up-bar{
  height: 6px; background: var(--panel-2);
  border-radius: 999px; overflow: hidden;
  position: relative;
}
.up-bar-fill{
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #ff2e7a);
  border-radius: 999px;
  transition: width .25s cubic-bezier(.4,0,.2,1);
}
.upload-progress.processing .up-bar-fill{
  width: 100%;
  background: linear-gradient(90deg,
    var(--accent-soft) 0%, var(--accent) 40%,
    #ff2e7a 60%, var(--accent) 80%, var(--accent-soft) 100%);
  background-size: 200% 100%;
  animation: up-shimmer 1.1s linear infinite;
  transition: none;
}
@keyframes up-shimmer{
  from{ background-position: 200% 0; }
  to  { background-position: -200% 0; }
}

.manifest-preview{
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  overflow: hidden;
}
.mp-head{
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.mp-head .kicker{ color: var(--ok); display: flex; align-items: center; gap: 6px; font-size: 10px; }
.mp-head .kicker::before{ content:""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.mp-body{
  display: grid; grid-template-columns: 120px 1fr; gap: 0;
}
.mp-thumb{
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #ff6a2b, #ff2e7a);
  border-right: 1px solid var(--line);
  position: relative;
}
.mp-thumb::after{
  content:""; position:absolute; inset:0;
  background: radial-gradient(ellipse 60% 50% at 20% 20%, rgba(255,255,255,.2), transparent 60%);
}
.mp-meta{ padding: 14px 20px; min-width: 0; }
.mp-meta .name{ font-size: 17px; font-weight: 700; margin-bottom: 4px; color: var(--ink); letter-spacing:-.01em; }
.mp-meta .sub{
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); display:flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
}
.mp-meta .sub b{ color: var(--ink-2); font-weight: 500; }
.mp-meta .tags{ display:flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 600px){
  .mp-body{ grid-template-columns: 1fr; }
  .mp-thumb{ aspect-ratio: 16/6; border-right: 0; border-bottom: 1px solid var(--line); }
}

.form-actions{
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.form-actions .note{
  font-size: 12px; color: var(--muted); max-width: 420px; flex: 1; min-width: 200px;
}

/* ============================================================== Docs */
.docs-wrap{
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 0;
  display: grid; grid-template-columns: 240px 1fr; gap: 48px;
  align-items: start;
}
@media (max-width: 900px){ .docs-wrap{ grid-template-columns: 1fr; } .docs-toc{ position: static !important; max-height: none !important; } }

.docs-toc{
  position: sticky; top: calc(var(--nav-h) + 20px);
  max-height: calc(100vh - var(--nav-h) - 40px);
  overflow: auto;
}
.docs-toc h4{
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 14px;
}
.docs-toc a{
  display: block;
  font-size: 13px; color: var(--muted); padding: 5px 0;
  border-left: 2px solid transparent; padding-left: 12px; margin-left: -12px;
}
.docs-toc a:hover{ color: var(--ink); }
.docs-toc a.active{ color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.docs-toc-sub{ display: flex; flex-direction: column; }
.docs-toc-sub a{ font-size: 12px; color: var(--muted-2); padding-left: 24px; }

.docs-body{
  max-width: 760px;
}
.docs-header{ margin-bottom: 48px; }
.docs-header h1{
  font-size: 44px; letter-spacing:-.025em; line-height: 1.1; margin-bottom: 14px;
}
.docs-header p{
  font-size: 17px; color: var(--muted); line-height: 1.55; margin-bottom: 0;
  max-width: 620px;
}
.docs-kicker{
  display: block; margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2);
}
.docs-body section{ margin-bottom: 56px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.docs-body section h2{
  font-size: 26px; letter-spacing:-.02em; margin-bottom: 16px;
  padding-top: 4px;
  position: relative;
}
.docs-body section h2::before{
  content:""; position:absolute; left: -20px; top: 14px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.docs-body section h3{
  font-size: 16px; letter-spacing:-.005em; margin: 28px 0 10px;
  color: var(--ink);
}
.docs-body p{ font-size: 15px; color: var(--ink-2); line-height: 1.7; margin-bottom: 14px; }
.docs-body ul, .docs-body ol{ color: var(--ink-2); line-height: 1.75; padding-left: 22px; margin-bottom: 14px; font-size: 15px; }
.docs-body li{ margin-bottom: 6px; }
.docs-body a:not(.docs-piece-link):not(.btn){ color: var(--accent); border-bottom: 1px solid var(--accent-edge); }
.docs-body a:hover{ color: var(--accent-2); }

.callout{
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14px;
  color: var(--ink-2);
}
.callout strong{ color: var(--ink); }
.callout.warn{ border-left-color: var(--warn); }
.callout.info{ border-left-color: var(--info); }

.docs-grid-3{
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 700px){ .docs-grid-3{ grid-template-columns: 1fr; } }
.docs-piece{
  display: block;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.docs-piece .docs-piece-num{
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--accent);
  margin-bottom: 12px;
}
.docs-piece h3{ margin: 0 0 6px; font-size: 15px; }
.docs-piece p{ margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.docs-piece-link{
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  border-bottom: 0 !important;
}

.docs-table{
  width: 100%; border-collapse: collapse;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  margin: 12px 0 22px;
}
.docs-table thead{ background: var(--panel-2); }
.docs-table th{
  padding: 10px 14px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); text-align: left; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.docs-table td{
  padding: 10px 14px; font-size: 13px; color: var(--ink-2);
  border-bottom: 1px solid var(--line-soft);
}
.docs-table tr:last-child td{ border-bottom: 0; }

.docs-pill{
  display: inline-block;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--line);
}
.docs-pill.green{ background: var(--ok-soft); color: var(--ok); border-color: color-mix(in oklab, var(--ok) 30%, transparent); }
.docs-pill.amber{ background: var(--warn-soft); color: var(--warn); border-color: color-mix(in oklab, var(--warn) 30%, transparent); }

.docs-cta{
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
}
.docs-cta h2{ margin-bottom: 8px; }
.docs-cta p{ margin-bottom: 20px; }
.docs-cta-actions{ display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ============================================================== Profile */
.profile-wrap{
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 0;
}
.profile-header{
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px;
  align-items: start;
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
@media (max-width: 760px){
  .profile-header{ grid-template-columns: 1fr; }
}
.profile-header .avatar-fallback.lg,
.profile-header .avatar.lg{
  width: 112px; height: 112px; font-size: 40px;
  background: linear-gradient(135deg, #ff6a2b, #ff2e7a);
  color: #fff; border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.profile-header .avatar.lg img,
.profile-header .avatar-fallback.lg img{
  width:100%; height:100%; object-fit: cover;
}
.profile-meta h1{
  font-size: 34px; letter-spacing:-.02em; margin-bottom: 4px;
}
.profile-handle{
  font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.profile-bio{
  color: var(--ink-2); font-size: 14px; max-width: 520px; margin-bottom: 12px; line-height: 1.55;
}
.profile-website{
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
}

.profile-stats{
  display: flex; gap: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  overflow: hidden;
}
.profile-stats > div{
  padding: 14px 22px; border-right: 1px solid var(--line);
}
.profile-stats > div:last-child{ border-right: 0; }
.profile-stats b{
  display: block; font-size: 20px; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.profile-stats small{
  display: block;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); margin-top: 2px;
}

.profile-panel-head{
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
  gap: 16px; flex-wrap: wrap;
}
.profile-panel-head h2{ font-size: 18px; }

.edit-panel{
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 20px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 32px;
}
.edit-panel h3{
  grid-column: 1 / -1;
  font-size: 14px; font-weight: 600; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.edit-panel h3 svg{ width: 14px; height: 14px; color: var(--accent); }
.edit-panel .field{ margin: 0; }
.edit-panel .full{ grid-column: 1 / -1; }
.edit-panel .actions{ grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); margin-top: 6px; }
@media (max-width: 600px){ .edit-panel{ grid-template-columns: 1fr; } }

/* ============================================================== Auth */
.auth-wrap{
  max-width: 460px; margin: 0 auto; padding: 64px 24px 40px;
}
.auth-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
}
.auth-head{ margin-bottom: 24px; text-align: left; }
.auth-head .kicker{ display: block; margin-bottom: 10px; }
.auth-head h1{ font-size: 26px; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-head p{ color: var(--muted); font-size: 13px; }

.auth-form .field input{ padding: 11px 12px; }
.auth-form .btn-block{ margin-top: 4px; padding: 12px; font-size: 14px; }

.auth-alt{
  text-align: center; font-size: 13px; color: var(--muted);
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft);
}
.auth-alt a{ color: var(--accent); font-weight: 500; }
.auth-alt a:hover{ color: var(--accent-2); }

.forgot-row{
  display: flex; justify-content: flex-end; margin-top: -8px; margin-bottom: 14px;
}
.forgot-row a{ font-size: 12px; color: var(--muted); }
.forgot-row a:hover{ color: var(--ink); }

.field-password{ position: relative; }
.field-password input{ padding-right: 42px !important; }
.pw-toggle{
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
  transition: color .12s, background .12s;
}
.pw-toggle:hover{ color: var(--ink); background: var(--panel-2); }
.pw-toggle svg{ width: 16px; height: 16px; }
.pw-toggle .pw-eye-off{ display: none; }
.pw-toggle.on .pw-eye{ display: none; }
.pw-toggle.on .pw-eye-off{ display: block; }

.password-hints{
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap;
}
.password-hints span::before{
  content: "○ "; color: var(--dim);
}
.password-hints span.ok::before{ content: "● "; color: var(--ok); }

/* ============================================================== Empty state + error page */
.empty-state{
  max-width: 560px; margin: 48px auto; padding: 56px 24px; text-align: center;
}
.empty-state h1{ font-size: 44px; letter-spacing: -.025em; margin-bottom: 10px; color: var(--ink); }
.empty-state h2{ font-size: 24px; margin-bottom: 10px; }
.empty-state p{ color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.empty-state.big{ padding: 80px 24px; }
.empty-state.big h1{
  font-family: var(--font-mono); font-size: 96px; letter-spacing: -.04em; color: var(--accent);
}

/* ============================================================== Cursor */
.mod-row[href]{ text-decoration: none; }

/* ============================================================== Modal */
.modal{
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  width: min(440px, calc(100% - 32px));
  max-width: 440px;
  margin: auto;
}
.modal::backdrop{
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modal-fade .15s ease-out;
}
.modal[open]{
  animation: modal-pop .16s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes modal-fade{
  from{ opacity: 0; }
  to  { opacity: 1; }
}
@keyframes modal-pop{
  from{ opacity: 0; transform: translateY(6px) scale(.985); }
  to  { opacity: 1; transform: translateY(0)   scale(1); }
}
.modal-inner{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 26px 22px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.03) inset;
  text-align: left;
}
.modal-icon{
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in oklab, var(--danger) 32%, transparent);
  color: var(--danger);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.modal-icon svg{ width: 22px; height: 22px; }
.modal-icon.warn{
  background: var(--warn-soft);
  border-color: color-mix(in oklab, var(--warn) 32%, transparent);
  color: var(--warn);
}
.modal-title{
  font-size: 18px;
  letter-spacing: -.01em;
  margin-bottom: 8px;
  color: var(--ink);
}
.modal-body{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 22px;
}
.modal-body b{ color: var(--ink-2); font-weight: 600; }
.modal-actions{
  display: flex; justify-content: flex-end; gap: 8px;
  flex-wrap: wrap;
}
.btn-danger-solid{
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger-solid:hover{
  background: color-mix(in oklab, var(--danger) 88%, #000 12%);
  color: #fff;
  border-color: var(--danger);
}

/* =====================================================================
   Mobile responsive pass
   - Burger menu + slide-out drawer under 820px
   - Tighter container padding, smaller headings, 1-col footer, touch targets
   - Stacked form actions, stacked detail install card
   ===================================================================== */

/* Default (desktop) — hide the burger + drawer */
.nav-burger{ display: none; }
.mobile-drawer[hidden]{ display: none; }

/* Burger button — visible below 820px */
.nav-burger{
  width: 36px; height: 36px;
  display: none;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  position: relative;
}
.nav-burger span{
  position: absolute; left: 9px; right: 9px;
  height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease, top .18s ease;
}
.nav-burger span:nth-child(1){ top: 11px; }
.nav-burger span:nth-child(2){ top: 17px; }
.nav-burger span:nth-child(3){ top: 23px; }
.nav-burger[aria-expanded="true"] span:nth-child(1){ top: 17px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3){ top: 17px; transform: rotate(-45deg); }

/* Drawer structure */
.mobile-drawer{
  position: fixed; inset: 0; z-index: 100;
  display: flex; justify-content: flex-end;
  pointer-events: none;
}
.mobile-drawer.open{ pointer-events: auto; }
.mobile-drawer-scrim{
  position: absolute; inset: 0;
  background: rgba(4, 6, 9, 0.72);
  opacity: 0;
  transition: opacity .2s ease;
}
.mobile-drawer.open .mobile-drawer-scrim{ opacity: 1; }
.mobile-drawer-panel{
  position: relative;
  width: min(360px, 88vw);
  height: 100%;
  background: var(--bg-raise);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 60px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s ease;
  overflow-y: auto;
}
.mobile-drawer.open .mobile-drawer-panel{ transform: translateX(0); }
.mobile-drawer-head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer-close{
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
}
.mobile-drawer-close:hover{ color: var(--ink); border-color: var(--line-2); }
.mobile-drawer-close svg{ width: 18px; height: 18px; }
.mobile-drawer-user{
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.mobile-drawer-user .avatar.lg{
  width: 48px; height: 48px; font-size: 18px; border-radius: 12px;
}
.mobile-drawer-user-meta{ display: flex; flex-direction: column; gap: 2px; }
.mobile-drawer-user-meta b{ font-size: 15px; font-weight: 600; color: var(--ink); }
.mobile-drawer-user-meta small{ font-size: 12px; color: var(--muted); }
.mobile-drawer-links{
  flex: 1;
  display: flex; flex-direction: column;
  padding: 10px 10px 14px;
  gap: 2px;
}
.mobile-drawer-links a{
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  min-height: 44px;
}
.mobile-drawer-links a:hover{ background: var(--panel-2); color: var(--ink); }
.mobile-drawer-links a.active{ background: var(--accent-soft); color: var(--accent); }
.mobile-drawer-links a svg{ width: 18px; height: 18px; flex-shrink: 0; color: var(--muted-2); }
.mobile-drawer-links a.active svg{ color: var(--accent); }
.mobile-drawer-links a .ext{
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted-2);
}
.mobile-drawer-foot{
  padding: 14px 18px 22px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 8px;
}
.mobile-drawer-foot .btn{ min-height: 42px; }

/* Lock the page scroll while the drawer is open */
body.drawer-open{ overflow: hidden; touch-action: none; }

/* ---------- Nav shell: hide desktop links / buttons under 820px ---------- */
@media (max-width: 820px){
  :root{ --nav-h: 56px; }
  .nav-inner{
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    padding: 0 16px;
  }
  .brand-name .brand-dim{ display: none; }
  .nav-links{ display: none; }
  .nav-right{ gap: 6px; }
  .nav-right .btn-sm.nav-upload,
  .nav-right .btn-sm.nav-login,
  .nav-right .btn-sm.nav-signup,
  .nav-right .nav-user .nav-user-name,
  .nav-right .nav-logout{
    display: none;
  }
  .nav-burger{ display: grid; }
  /* Avatar stays visible as a quick profile shortcut */
  .nav-user{ padding: 2px 4px; }
}

/* Remove avatar shortcut too on very narrow screens to avoid clutter */
@media (max-width: 420px){
  .nav-right .nav-user{ display: none; }
}

/* ---------- Hero scaling past the existing 700px breakpoint ---------- */
@media (max-width: 540px){
  .hero{ padding: 48px 0 40px; }
  .hero-inner{ padding: 0 18px; }
  .hero-eyebrow{ font-size: 10px; padding: 5px 10px; margin-bottom: 20px; }
  .hero-title{ font-size: 34px; letter-spacing: -.02em; margin-bottom: 18px; }
  .hero-sub{ font-size: 15px; margin-bottom: 28px; }
  .hero-ctas{ gap: 8px; margin-bottom: 32px; width: 100%; }
  .hero-ctas .btn,
  .hero-ctas .btn-lg{ flex: 1 1 auto; min-width: 140px; justify-content: center; }
  .hero-download-meta{ display: none; }
  .hero-stats{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px){
  .hero-title{ font-size: 28px; }
  .hero-stats{ grid-template-columns: 1fr; }
  .hero-stats > div{ padding: 14px 0; }
}

/* ---------- Sections + section heads ---------- */
@media (max-width: 700px){
  .how, .mod-section{ padding-top: 56px; padding-bottom: 24px; }
  .cta-band{ margin-top: 48px; padding: 0 16px; }
  .cta-band-inner{ padding: 36px 24px; }
  .cta-band h2{ font-size: 24px; }
  .section-head{ padding: 0 18px 28px; }
  .section-head-l h2{ font-size: 24px; }
  .wrap, .wrap-narrow{ padding-left: 18px; padding-right: 18px; }
}

/* ---------- Mod list: on the narrowest screens, give each row more breathing room ---------- */
@media (max-width: 540px){
  .mod-list{ border-radius: 12px; }
  .mod-row{
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    padding: 12px 12px;
  }
  .mod-thumb{ width: 48px; height: 48px; }
  .mod-name{ font-size: 13px; }
  .mod-desc{ font-size: 11px; }
  .mod-dl-pill{ padding: 5px 8px; font-size: 10px; }
}

/* ---------- Browse page ---------- */
@media (max-width: 600px){
  .browse-head{ padding: 32px 18px 16px; }
  .browse-head h1{ font-size: 26px; }
  .browse-toolbar{ padding: 0 18px 12px; gap: 10px; }
  .sort-tabs{ overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .result-summary{ padding: 6px 18px 10px; }
  .browse-list{ padding: 0 18px; }
  .pager{ padding: 16px 18px; flex-wrap: wrap; }
  .pager a, .pager span{ min-height: 36px; display: inline-flex; align-items: center; }
}

/* ---------- Mod detail ---------- */
@media (max-width: 700px){
  .detail-wrap{ padding: 24px 18px 0; }
  .detail-main h1{ font-size: 28px; }
  .detail-thumb-big{ border-radius: 10px; margin-bottom: 20px; }
  .detail-author{ width: 100%; }
}
@media (max-width: 900px){
  /* Stop the install card from sticking above the fold on mobile */
  .install-card{ position: static !important; }
}

/* ---------- Upload form ---------- */
@media (max-width: 600px){
  .upload-wrap{ padding-left: 18px !important; padding-right: 18px !important; }
  .upload-head h1{ font-size: 26px; }
  .upload-head p{ font-size: 13px; }
  .step-rail{ flex-wrap: wrap; gap: 8px; }
  .step{ flex: 1 1 calc(50% - 8px); }
  .drop-zone{ padding: 32px 16px; }
  .drop-title{ font-size: 15px; }
  .drop-sub{ font-size: 12px; }
  .form-actions{
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions > div{ width: 100%; }
  .form-actions .btn{ flex: 1 1 auto; justify-content: center; }
  .form-actions .note{ max-width: none; }
}

/* ---------- Profile ---------- */
@media (max-width: 600px){
  .profile-wrap{ padding: 28px 18px 0; }
  .profile-header{ padding: 20px 0 24px; margin-bottom: 24px; gap: 18px; }
  .profile-header .avatar.lg,
  .profile-header .avatar-fallback.lg{ width: 80px; height: 80px; font-size: 28px; border-radius: 16px; }
  .profile-meta h1{ font-size: 24px; }
  .profile-stats{ flex-direction: column; border-radius: 10px; }
  .profile-stats > div{ border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 12px 18px; }
  .profile-stats > div:last-child{ border-bottom: 0; }
}

/* ---------- Docs ---------- */
@media (max-width: 700px){
  .docs-wrap{ padding: 28px 18px 0; gap: 24px; }
  .docs-header h1{ font-size: 30px; }
  .docs-header p{ font-size: 15px; }
  .docs-body section h2{ font-size: 22px; }
  .docs-body section h2::before{ display: none; }
  .docs-body p, .docs-body ul, .docs-body ol{ font-size: 14px; }
  .docs-table{ display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---------- Auth (login / register) ---------- */
@media (max-width: 520px){
  .auth-wrap{ padding: 36px 16px 24px; }
  .auth-card{ padding: 28px 20px 22px; border-radius: 14px; }
}

/* ---------- Footer ---------- */
@media (max-width: 520px){
  .footer{ padding: 40px 0 20px; }
  .footer-inner{ grid-template-columns: 1fr; gap: 22px; padding: 0 18px; }
  .footer-bar{ padding: 20px 18px; flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- Flash messages ---------- */
@media (max-width: 600px){
  .flash-wrap{ padding-left: 18px; padding-right: 18px; }
  .flash{ font-size: 13px; }
}

/* ---------- Touch target stabilization ---------- */
@media (max-width: 820px){
  .btn-sm{ min-height: 36px; padding: 8px 12px; }
  .btn{ min-height: 40px; }
  .sort-tab{ min-height: 34px; }
  .theme-toggle{ width: 36px; height: 36px; }
  /* Prevent horizontal overflow from long, unbreakable tokens (URLs, hashes) */
  .detail-desc p, .detail-desc li, .docs-body p{ overflow-wrap: anywhere; }
}
