/* ════════════════════════════════════════════════════════════════════
   SAR design system — modelled on the reference content platform
   Tokens, components and layout rewritten from scratch.
   ════════════════════════════════════════════════════════════════════ */

/* ─────────────── tokens ─────────────── */
:root {
  /* surfaces (dark) */
  --bg:  #16181c;
  --s2:  #1d1f23;
  --s3:  #27292e;
  --s4:  #34363c;
  --s5:  #42444a;
  /* legacy aliases */
  --s1: var(--bg);
  --panel: var(--s2);
  --divider: var(--s4);

  /* text */
  --heading: #ecf9fb;
  --text:    #b7c5d1;
  --muted-c: #8595a3;

  /* brand + semantic */
  --brand:           #1bd96a;
  --brand-highlight: rgba(27, 217, 106, .15);
  --brand-shadow:    rgba(27, 217, 106, .35);
  --green-bg:        rgba(27, 217, 106, .12);
  --red:    #ff496e;
  --orange: #ffa347;
  --blue:   #4f9cff;
  --purple: #c78aff;

  /* effects */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-btn:      0 1px 2px rgba(0, 0, 0, .25);
  --shadow-panel:    0 2px 8px rgba(0, 0, 0, .18);
  --shadow-inset:    inset 0 1px 0 rgba(255, 255, 255, .04);
  --focus-ring:      0 0 0 4px var(--brand-shadow);
  --hover-brightness: 1.2;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, 'PingFang SC',
          'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
}

/* ─────────────── reset / base ─────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; transition: filter .15s ease-out; }
a:hover { filter: brightness(1.15); }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--divider); margin: 20px 0; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
::selection { background: rgba(27, 217, 106, .3); }

.mono { font-family: var(--mono); }
.small { font-size: 13px; }
.muted { color: var(--muted-c); }
.muted a { color: var(--text); text-decoration: underline; }
.center { text-align: center; }
.hidden { display: none !important; }
.d-block { display: block; }
.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;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 200;
  background: var(--brand); color: #000; font-weight: 700;
  padding: 8px 16px; border-radius: var(--radius-md);
  transition: top .15s ease-out;
}
.skip-link:focus { top: 8px; box-shadow: none; }

/* ─────────────── layout ─────────────── */
.container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 24px;
  width: 100%;
}
.narrow-wide { max-width: calc(80rem - 18.75rem - 24px); }

.site-main { min-height: calc(100vh - 220px); padding-bottom: 48px; }
.page-inner { padding-top: 20px; }

/* ─────────────── header ─────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--s2);
  border-bottom: 1px solid var(--s4);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  max-width: 80rem; margin-inline: auto; padding: 10px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand:hover { filter: none; opacity: .92; }
.brand-logo { display: grid; place-items: center; }
.brand-name { font-size: 19px; font-weight: 800; color: var(--heading); letter-spacing: -.01em; }
.link-brand { color: var(--heading); font-weight: 600; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav > a {
  color: var(--text); font-weight: 600; font-size: 15px;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.main-nav > a:hover { background: var(--s3); color: var(--heading); filter: none; }
.main-nav > a.active, .main-nav > a.current { background: var(--s4); color: var(--heading); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-search { position: relative; }
.header-search input, .inline-search input {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--s4); border-radius: var(--radius-md);
  padding: 8px 14px; font: inherit; font-size: 14px; width: 210px;
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.header-search input:focus, .inline-search input:focus {
  border-color: var(--brand); box-shadow: var(--focus-ring); outline: none;
}
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--s3); color: var(--heading); font-weight: 600; font-size: 14px;
}
.user-chip:hover { background: var(--s4); filter: none; }
.user-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.nav-toggle { display: none; }
.nav-admin { color: var(--purple); }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 120;
  min-width: 190px; background: var(--s3);
  border: 1px solid var(--s4); border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel); padding: 6px; display: none;
}
.dropdown.open .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text); background: none; border: 0; font: inherit; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--s4); color: var(--heading); filter: none; }

/* announcement bar */
.announce-bar {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, rgba(27, 217, 106, .16), rgba(79, 156, 255, .12));
  border-bottom: 1px solid var(--s4);
  padding: 9px 24px; font-size: 14px;
}
.announce-bar a { font-weight: 600; }
.announce-close {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  color: var(--muted-c); font-size: 17px; line-height: 1; padding: 4px;
}
.announce-close:hover { color: var(--heading); }

/* flash messages */
.flash-stack { max-width: 80rem; margin: 14px auto 0; padding-inline: 24px; }

/* ─────────────── footer ─────────────── */
.site-footer { background: var(--s2); border-top: 1px solid var(--s4); margin-top: 48px; }
.footer-inner {
  max-width: 80rem; margin-inline: auto; padding: 32px 24px;
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 800; font-size: 17px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: var(--text); font-size: 14px; }
.footer-links a:hover { color: var(--heading); filter: none; }
.footer-note { width: 100%; color: var(--muted-c); font-size: 13px; }

/* ═════════ BUTTONS — exact reference specs ═════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 0; white-space: nowrap; border: none; text-decoration: none !important;
  cursor: pointer; user-select: none; touch-action: manipulation;
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.25;
  transition: all .15s ease-out;
}
.btn:hover:not(.disabled) { filter: brightness(120%); text-decoration: none; }
.btn:active:not(.disabled) { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn-primary, .btn-secondary, .btn-ghost { height: 36px; padding: 0 12px; border-radius: var(--radius-md); }

/* colored: brand green + black text */
.btn-primary { background: var(--brand); color: #000; }
.btn-primary:hover:not(.disabled) { box-shadow: 0 0 0 4px var(--brand-shadow); }

/* base: raised surface */
.btn-secondary { background: var(--s4); color: #ecf9fb; box-shadow: var(--shadow-inset); }
.btn-secondary:hover:not(.disabled) { background: var(--s5); }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover:not(.disabled) { background: var(--s4); color: var(--heading); }

.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-danger-ghost:hover:not(.disabled) { background: rgba(255, 73, 110, .12); }

.btn-lg { height: 44px; padding: 0 18px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 14px; border-radius: 10px; }
.btn-icon { width: 36px; height: 36px; padding: 0; flex-shrink: 0; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.is-following { color: var(--brand) !important; box-shadow: inset 0 0 0 1px rgba(27, 217, 106, .5); }

/* ─────────────── forms ─────────────── */
input[type="text"], input[type="search"], input[type="url"], input[type="email"],
input[type="password"], input[type="number"], input[type="date"], input[type="file"],
select, textarea {
  display: block; width: 100%;
  background: var(--bg); color: var(--heading);
  border: 1px solid var(--s5); border-radius: var(--radius-sm);
  padding: 9px 12px; font: inherit; font-size: 15px;
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
input::placeholder, textarea::placeholder { color: var(--muted-c); opacity: 1; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--focus-ring);
}
input[type="file"] { padding: 7px; cursor: pointer; }
input[type="file"]::file-selector-button {
  background: var(--s4); color: var(--heading);
  border: 0; border-radius: var(--radius-sm);
  padding: 6px 12px; margin-right: 10px; font: inherit; font-size: 14px; cursor: pointer;
  transition: background .15s ease-out;
}
input[type="file"]::file-selector-button:hover { background: var(--s5); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238595a3' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px; cursor: pointer;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
label { display: block; color: var(--heading); font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
label .muted { font-weight: 400; color: var(--muted-c); }
fieldset {
  border: 1px solid var(--divider); border-radius: var(--radius-md);
  padding: 4px 16px 16px; margin: 18px 0 0;
}
legend { color: var(--heading); font-weight: 700; font-size: 14px; padding-inline: 6px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; align-items: center; }
.form-panel { max-width: 520px; }
.field-error { color: var(--red); font-size: 13px; margin-top: 4px; }

/* ─────────────── chips & badges ─────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px;
  background: var(--s4); color: var(--text);
  border: 1px solid transparent; border-radius: 999px;
  font-size: 13px; font-weight: 500; line-height: 1;
  white-space: nowrap; transition: all .15s ease-out;
}
a.chip:hover { background: var(--s5); color: var(--heading); filter: none; }
.chip-checkable { cursor: pointer; height: 32px; padding: 0 14px; font-size: 14px; }
.chip-checkable input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.chip-checkable:has(input:checked) {
  background: var(--brand-highlight); border-color: var(--brand); color: var(--brand);
}
.chip-checkable:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.chip-active { background: var(--brand-highlight) !important; border-color: var(--brand) !important; color: var(--brand) !important; }
.chip-hover:hover { background: var(--s5); }
.chip-gv { border-color: rgba(150, 162, 176, .3); color: var(--muted-c); background: transparent; }
.chip-type { border-color: rgba(27, 217, 106, .4); color: var(--brand); background: var(--brand-highlight); }
.chip-with-icon svg, .chip-with-icon i { flex-shrink: 0; }
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select-scroll { max-height: 180px; overflow-y: auto; }

/* loader brand colours */
.chip-loader { background: transparent; border: 1px solid var(--s5); }
.chip[data-tag="fabric"]   { color: #dbb69b; border-color: rgba(219, 182, 155, .4); }
.chip[data-tag="forge"]    { color: #959eef; border-color: rgba(149, 158, 239, .4); }
.chip[data-tag="neoforge"] { color: #f99e6b; border-color: rgba(249, 158, 107, .4); }
.chip[data-tag="quilt"]    { color: #c796f9; border-color: rgba(199, 150, 249, .4); }
.chip[data-tag]:hover { border-color: currentColor; background: transparent; filter: none; }
.chip-dim { opacity: .42; filter: grayscale(.4); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px;
  border: 1px solid var(--s5); border-radius: 999px;
  color: var(--muted-c); background: transparent;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.badge-type { border-color: rgba(27, 217, 106, .4); color: var(--brand); background: var(--brand-highlight); }
.badge-warn { border-color: rgba(255, 163, 71, .45); color: var(--orange); background: rgba(255, 163, 71, .1); }
.badge-danger { border-color: rgba(255, 73, 110, .45); color: var(--red); background: rgba(255, 73, 110, .1); }
.badge-channel-release { border-color: rgba(27, 217, 106, .5); color: var(--brand); }
.badge-channel-beta    { border-color: rgba(255, 163, 71, .5); color: var(--orange); }
.badge-channel-alpha   { border-color: rgba(255, 73, 110, .5); color: var(--red); }
.badge-status-approved { border-color: rgba(27, 217, 106, .5); color: var(--brand); }
.badge-status-pending  { border-color: rgba(255, 163, 71, .5); color: var(--orange); }
.badge-status-draft    { border-color: var(--s5); color: var(--muted-c); }
.badge-status-rejected, .badge-status-archived { border-color: rgba(255, 73, 110, .5); color: var(--red); }
.badge-role-admin { border-color: rgba(199, 138, 255, .5); color: var(--purple); }
.badge-role-moderator { border-color: rgba(79, 156, 255, .5); color: var(--blue); }
.badge-dep-required     { border-color: rgba(27, 217, 106, .5); color: var(--brand); }
.badge-dep-optional     { border-color: rgba(79, 156, 255, .5); color: var(--blue); }
.badge-dep-incompatible { border-color: rgba(255, 73, 110, .5); color: var(--red); }
.badge-dep-embedded     { border-color: var(--s5); color: var(--muted-c); }

/* ─────────────── alerts ─────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--s5); border-radius: var(--radius-md);
  padding: 12px 16px; margin: 14px 0; font-size: 14px;
}
.alert-error { border-color: rgba(255, 73, 110, .5); background: rgba(255, 73, 110, .08); color: #ffb3c2; }
.alert-warn  { border-color: rgba(255, 163, 71, .5); background: rgba(255, 163, 71, .08); color: #ffd39e; }
.alert-info  { border-color: rgba(79, 156, 255, .5); background: rgba(79, 156, 255, .08); color: #bfdcff; }

/* ─────────────── panels ─────────────── */
.panel {
  background: var(--s2);
  border: 1px solid var(--s4);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.panel h3 { margin-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-head h2 { margin: 0; }

/* ═══════════════ HOME ═══════════════ */
.hero { text-align: center; padding: 56px 0 36px; }
.hero h1 { font-size: 2.4rem; letter-spacing: -.02em; margin-bottom: 10px; }
.hero-sub { color: var(--muted-c); font-size: 17px; max-width: 560px; margin: 0 auto; }
.hero-search { max-width: 560px; margin: 26px auto 0; }
.hero-search .search-box input { height: 46px; border-radius: 14px; font-size: 16px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.home-stats-strip {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  margin: 34px 0 8px;
}
.stat {
  background: var(--s2); border: 1px solid var(--s4); border-radius: var(--radius-lg);
  padding: 14px 26px; text-align: center; min-width: 130px;
}
.stat b { display: block; color: var(--heading); font-size: 1.45rem; font-weight: 800; }
.stat span { color: var(--muted-c); font-size: 13px; }

.featured-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--s2); border: 1px solid var(--s4); border-radius: var(--radius-lg);
  padding: 16px; transition: border-color .15s ease-out, transform .15s ease-out;
}
.featured-card:hover { border-color: var(--s5); transform: translateY(-2px); }
.card-icon, .card-icon-img { width: 72px; height: 72px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; }
.card-body { min-width: 0; flex: 1; }
.card-summary {
  color: var(--text); font-size: 14px; margin: 4px 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.carousel { position: relative; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--s3); border: 1px solid var(--s4); color: var(--heading);
  cursor: pointer; display: grid; place-items: center;
  transition: all .15s ease-out;
}
.carousel-btn:hover { background: var(--s4); filter: none; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.home-block { margin-top: 34px; }
.feed-title { color: var(--heading); font-weight: 700; }
.feed-meta { color: var(--muted-c); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.feed-compact { display: flex; flex-direction: column; gap: 8px; }

/* ═══════════════ BROWSE ═══════════════ */
.browse-type-nav { margin: 4px 0 18px; flex-wrap: wrap; }
.pill-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pill-tabs a {
  height: 32px; display: inline-flex; align-items: center;
  padding: 0 16px; border-radius: 999px;
  background: transparent; color: var(--text);
  font-size: 14px; font-weight: 600;
  transition: all .15s ease-out;
}
.pill-tabs a:hover { background: var(--s3); color: var(--heading); filter: none; }
.pill-tabs a.active { background: var(--brand); color: #000; }
.tab-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-pills .chip { height: 32px; padding: 0 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab-pills .chip:hover { background: var(--s5); filter: none; }
.tab-pills .chip-active { background: var(--brand-highlight); border-color: var(--brand); color: var(--brand); }

.browse-layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px; align-items: start;
}
.filters { position: sticky; top: 76px; }
.filter-panel { padding: 6px 14px 14px; margin-bottom: 0; }
.filter-group { border-bottom: 1px solid var(--divider); }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group summary {
  display: flex; align-items: center; cursor: pointer; list-style: none;
  color: var(--heading); font-weight: 700; font-size: 15px;
  padding: 13px 2px 9px; user-select: none;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex-shrink: 0;
  border-right: 2px solid var(--muted-c); border-bottom: 2px solid var(--muted-c);
  transform: rotate(45deg); transition: transform .15s ease-out;
}
.filter-group[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.filter-rows { display: flex; flex-direction: column; gap: 2px; padding: 0 0 12px; }
.filter-rows.scrollable { max-height: 260px; overflow-y: auto; padding-right: 4px; }
.filter-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
  transition: background .12s ease-out, color .12s ease-out;
}
.filter-row:hover { background: var(--s3); color: var(--heading); filter: none; }
.filter-row.active { background: var(--brand-highlight); color: var(--heading); }
.filter-row .fr-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.filter-row .fr-check { opacity: 0; color: var(--brand); transition: opacity .12s ease-out; flex-shrink: 0; }
.filter-row.active .fr-check, .filter-row:hover .fr-check { opacity: 1; }

.results-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted-c); pointer-events: none;
}
.search-box input { padding-left: 38px; height: 40px; }
.sort-select { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--muted-c); font-weight: 500; }
.sort-select select { width: auto; height: 40px; padding: 0 34px 0 12px; }
.results-count { margin: 0 0 14px; font-size: 14px; }

.result-list { display: flex; flex-direction: column; gap: 12px; }
.result-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 16px 18px;
  color: var(--text); transition: border-color .15s ease-out, transform .15s ease-out;
}
.result-card:hover { border-color: var(--s5); transform: translateY(-2px); filter: none; color: var(--text); }
.rc-icon, .rc-icon img { width: 58px; height: 58px; flex-shrink: 0; }
.rc-icon img { border-radius: var(--radius-md); object-fit: cover; display: block; }
.rc-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.rc-title-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rc-title { font-size: 17px; font-weight: 700; color: var(--heading); line-height: 1.25; }
.result-card:hover .rc-title { color: var(--brand); }
.rc-author { color: var(--muted-c); font-size: 14px; }
.rc-author:hover { color: var(--text); }
.rc-summary {
  color: var(--text); font-size: 14px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rc-tags .badge, .rc-tags .chip { font-size: 12px; height: 24px; padding: 0 9px; }
.rc-stats {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  gap: 10px; flex-shrink: 0; margin-left: auto;
  color: var(--muted-c); font-size: 13px;
}
.rc-stats .pair { display: flex; gap: 16px; }
.rc-stats .pair span { display: inline-flex; align-items: center; gap: 5px; }
.rc-stats b { color: var(--heading); font-weight: 600; }
.when { white-space: nowrap; }

.empty-state {
  text-align: center; padding: 60px 20px;
  border: 1px dashed var(--s5); border-radius: var(--radius-lg);
  color: var(--muted-c);
}
.empty-state p:first-child { color: var(--heading); font-size: 17px; font-weight: 600; margin-top: 0; }

/* pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span, .pagination-pages a, .pagination-pages span {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md); background: var(--s2);
  border: 1px solid var(--s4); color: var(--text); font-size: 14px; font-weight: 600;
}
.pagination a:hover, .pagination-pages a:hover { background: var(--s3); filter: none; color: var(--heading); }
.pagination .active, .pagination-pages .current, .pagination span.active {
  background: var(--brand); border-color: var(--brand); color: #000; pointer-events: none;
}

/* ═══════════════ PROJECT PAGES ═══════════════ */
.project-header { padding: 26px 0 18px; }
.ph-top { display: flex; gap: 22px; align-items: flex-start; }
.hero-icon-img, .ph-top > svg, .ph-top > .ti-wrap { width: 96px; height: 96px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; }
.ph-info { min-width: 0; flex: 1; }
.project-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.project-title-row h1 { margin: 0; font-size: 1.65rem; letter-spacing: -.01em; }
.ph-summary { color: var(--text); font-size: 16px; margin: 8px 0 0; max-width: 70ch; }
.ph-metadata {
  display: flex; flex-wrap: wrap; gap: 6px 0; align-items: center;
  color: var(--muted-c); font-size: 14px; margin-top: 12px;
}
.ph-metadata > span { display: inline-flex; align-items: center; gap: 6px; }
.ph-metadata > span + span::before { content: "·"; margin: 0 10px; color: var(--s5); }
.ph-metadata b { color: var(--text); font-weight: 600; }
.ph-metadata a { color: var(--text); text-decoration: underline; text-decoration-color: var(--s5); }
.ph-metadata a:hover { color: var(--heading); }

.project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.act-btn { min-width: 0; }

.pill-tabs-wrap {
  border-bottom: 1px solid var(--divider);
  margin: 6px 0 24px; overflow-x: auto; scrollbar-width: none;
}
.pill-tabs-wrap .pill-tabs { flex-wrap: nowrap; }
.pill-tabs-wrap .pill-tabs a {
  position: relative; height: 42px; padding: 0 18px;
  border-radius: 0; background: none; color: var(--muted-c);
  font-size: 15px; white-space: nowrap;
}
.pill-tabs-wrap .pill-tabs a:hover { color: var(--heading); background: none; }
.pill-tabs-wrap .pill-tabs a.active { color: var(--brand); background: none; }
.pill-tabs-wrap .pill-tabs a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--brand);
}

.project-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px; align-items: start;
}
.project-article { min-width: 0; }
.project-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
.project-side .panel { padding: 16px 18px; }
.info-list { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.info-list dt { color: var(--muted-c); font-size: 13px; }
.info-list dd { margin: 0; color: var(--heading); font-size: 14px; font-weight: 500; }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.link-list a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text); font-size: 14px; font-weight: 500;
}
.link-list a:hover { color: var(--heading); }
.link-list li.muted { font-size: 14px; }

/* markdown body */
.md-content { font-size: 15.5px; line-height: 1.7; color: var(--text); }
.md-content h1, .md-content h2 { border-bottom: 1px solid var(--divider); padding-bottom: .3em; margin-top: 1.6em; }
.md-content h3, .md-content h4 { margin-top: 1.4em; }
.md-content p { margin: .9em 0; }
.md-content a { text-decoration: underline; text-decoration-color: rgba(27, 217, 106, .45); }
.md-content img { border-radius: var(--radius-md); }
.md-content code {
  background: var(--s3); border-radius: 6px; padding: 2px 7px; font-size: .88em; color: var(--heading);
}
.md-content pre {
  background: var(--s2); border: 1px solid var(--s4); border-radius: var(--radius-md);
  padding: 14px 16px; overflow-x: auto; line-height: 1.55;
}
.md-content pre code { background: none; padding: 0; }
.md-content blockquote {
  margin: 1em 0; padding: 2px 18px;
  border-left: 4px solid var(--brand); background: var(--s2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted-c);
}
.md-content table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; }
.md-content th, .md-content td { border: 1px solid var(--s5); padding: 8px 12px; text-align: left; }
.md-content th { background: var(--s2); color: var(--heading); }
.md-content ul, .md-content ol { padding-left: 1.5em; }
.md-sep { border: 0; border-top: 1px solid var(--divider); margin: 22px 0; }

/* markdown editor */
.md-editor { border: 1px solid var(--s5); border-radius: var(--radius-md); overflow: hidden; }
.md-editor-bar, .md-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: var(--s2); border-bottom: 1px solid var(--s4); padding: 6px 8px;
}
.md-btn {
  height: 30px; min-width: 30px; padding: 0 9px;
  background: none; border: 0; border-radius: 7px;
  color: var(--muted-c); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .12s ease-out;
}
.md-btn:hover { background: var(--s4); color: var(--heading); filter: none; }
.md-editor-tabs { margin-left: auto; display: flex; gap: 4px; }
.md-editor-pane { display: block; }
.md-editor textarea { border: 0; border-radius: 0; box-shadow: none; min-height: 260px; }
.md-editor textarea:focus { box-shadow: none; }
.md-preview-body { padding: 14px 18px; min-height: 200px; }

/* versions page */
.version-list { display: flex; flex-direction: column; gap: 12px; }
.version-item {
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 16px 18px;
}
.version-headline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
.version-headline .mono { color: var(--heading); font-weight: 700; font-size: 16px; }
.version-date { color: var(--muted-c); font-size: 13px; }
.version-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.version-body { margin-top: 10px; font-size: 14.5px; }
.dep-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.dep-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }

.file-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.file-table th, .file-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--divider); }
.file-table th { color: var(--muted-c); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.file-table tr:last-child td { border-bottom: 0; }
.file-table tbody tr:hover { background: var(--s3); }
.file-name { color: var(--heading); font-weight: 500; word-break: break-all; }

/* changelog */
.changelog-timeline { position: relative; padding-left: 26px; }
.changelog-timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--s4); border-radius: 2px;
}
.cl-entry { position: relative; padding-bottom: 26px; }
.cl-entry:last-child { padding-bottom: 0; }
.cl-entry::before {
  content: ""; position: absolute; left: -26px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--s4);
}
.cl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-version { color: var(--heading); font-weight: 700; font-family: var(--mono); }
.cl-body { font-size: 14.5px; }

/* gallery */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gallery-item, .gallery-real {
  border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--s4); background: var(--s2);
  aspect-ratio: 16 / 10; cursor: zoom-in;
}
.gallery-item img, .gallery-real img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease-out; }
.gallery-item:hover img, .gallery-real:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(10, 11, 13, .88);
  display: none; place-items: center; padding: 40px;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-md); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--s3); border: 0; color: var(--heading);
  font-size: 19px; cursor: pointer;
}
.lightbox-close:hover { background: var(--s4); }

/* discussion */
.comment-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.comment-item {
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 14px 18px;
}
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { color: var(--heading); font-weight: 700; font-size: 14.5px; }
.comment-form textarea { min-height: 110px; }
.comment-form-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.comment-mod-list { display: flex; flex-direction: column; gap: 10px; }
.comment-mod-item {
  background: var(--s2); border: 1px solid var(--s4); border-radius: var(--radius-md);
  padding: 12px 14px; font-size: 14px;
}

/* report / moderation */
.report-card, .moderation-card {
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 14px;
}
.report-body { font-size: 14.5px; }
.moderation-info { color: var(--muted-c); font-size: 13.5px; margin: 4px 0 10px; }
.moderation-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reject-form { margin-top: 10px; }
.reject-form textarea { min-height: 80px; }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 11, 13, .7);
  display: none; place-items: center; padding: 24px;
}
.modal-overlay.open { display: grid; }
.modal-card {
  width: 100%; max-width: 480px;
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-panel);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 0;
}
.modal-head h3 { margin: 0; }
.modal-close { background: none; border: 0; color: var(--muted-c); font-size: 20px; cursor: pointer; }
.modal-close:hover { color: var(--heading); }
.modal-body { padding: 14px 20px 20px; }

/* error pages */
.error-wrap { text-align: center; padding: 90px 0 60px; }
.error-code {
  font-size: 5rem; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.error-panel { max-width: 460px; margin: 18px auto 0; }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* ═══════════════ AUTH ═══════════════ */
.auth-wrap { display: grid; place-items: center; padding: 64px 24px; }
.auth-panel {
  width: 100%; max-width: 420px;
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 30px 30px 26px;
}
.auth-panel h1 { text-align: center; font-size: 1.45rem; }
.auth-panel .btn { width: 100%; margin-top: 18px; height: 40px; }
.auth-panel p { font-size: 14px; }

/* ═══════════════ DASHBOARD ═══════════════ */
.dash-project-list { display: flex; flex-direction: column; gap: 12px; }
.dash-project {
  display: flex; gap: 16px; align-items: center;
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 14px 18px;
  transition: border-color .15s ease-out;
}
.dash-project:hover { border-color: var(--s5); }
.dash-project-info { flex: 1; min-width: 0; }
.dash-project-info h3 { margin: 0 0 2px; font-size: 16px; }
.dash-project-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }

.edit-layout {
  display: grid; grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px; align-items: start; padding-top: 22px;
}
.edit-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; }
.edit-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.edit-nav a, .edit-nav-disabled {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-md);
  color: var(--text); font-size: 14px; font-weight: 600;
}
.edit-nav a:hover { background: var(--s3); color: var(--heading); filter: none; }
.edit-nav a.active { background: var(--brand-highlight); color: var(--brand); }
.edit-nav-disabled { color: var(--muted-c); opacity: .65; cursor: default; }
.step-num {
  width: 22px; height: 22px; flex-shrink: 0;
  display: inline-grid; place-items: center;
  background: var(--s4); color: var(--heading);
  border-radius: 50%; font-size: 12px; font-weight: 700;
}
.edit-nav a.active .step-num { background: var(--brand); color: #000; }
.step-meta { margin-left: auto; color: var(--muted-c); font-size: 12px; font-weight: 500; }
.edit-help p { font-size: 13.5px; }
.edit-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card-sec { padding: 22px 24px; }
.card-sec-head { margin-bottom: 6px; }
.card-sec-head h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; font-size: 1.2rem; }
.locked-hint { opacity: .8; }
.appearance-grid { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.appearance-preview img, .appearance-preview svg { width: 96px; height: 96px; border-radius: var(--radius-lg); }
.appearance-controls { flex: 1; min-width: 260px; }
.gallery-manage-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; margin-top: 12px;
}
.gallery-manage-item {
  margin: 0; border: 1px solid var(--s4); border-radius: var(--radius-md);
  overflow: hidden; background: var(--s2);
}
.gallery-manage-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.gallery-manage-item figcaption {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; gap: 8px;
}
.gallery-upload-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--divider); }
.version-form-body { max-width: 720px; }
.update-zone { margin-top: 14px; }
.update-col { display: flex; flex-direction: column; gap: 8px; }

.profile-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 24px; }
.profile-card { text-align: center; }
.profile-card img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin-inline: auto; }
.bio { font-size: 14.5px; }
.profile-projects { min-width: 0; }

/* ═══════════════ ADMIN ═══════════════ */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding-top: 22px; }
.admin-tile {
  display: block; background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 20px;
  color: var(--heading); font-weight: 700;
  transition: border-color .15s ease-out, transform .15s ease-out;
}
.admin-tile:hover { border-color: var(--brand); transform: translateY(-2px); filter: none; }
.admin-tile .muted { font-weight: 400; font-size: 13.5px; margin-top: 4px; }

.taxonomy-add-form { margin-bottom: 18px; }
.tax-add-head { font-weight: 700; font-size: 16px; color: var(--heading); margin-bottom: 10px; }
.tax-fields, .taxonomy-fields { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; }
.tax-fields .tf input, .tax-fields .tf select, .taxonomy-fields .tf input { width: 200px; }
.tax-add-btn { height: 38px; }
.tf { display: block; }
.tf-wide { display: block; min-width: 220px; }
.tf-label { display: block; font-size: 12px; color: var(--muted-c); margin-bottom: 6px; font-weight: 600; }
.parent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 10px; background: var(--s3); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: all .15s ease-out; user-select: none;
}
.pc-chip input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.pc-chip:hover { background: var(--s4); filter: none; }
.pc-chip:has(input:checked) { background: var(--brand-highlight); border-color: var(--brand); color: var(--brand); }
.pc-chip:has(input:focus-visible) { box-shadow: var(--focus-ring); }

.taxonomy-list { display: flex; flex-direction: column; }
.taxonomy-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 6px; border-bottom: 1px solid var(--divider);
}
.taxonomy-row:last-child { border-bottom: 0; }
.grip { color: var(--muted-c); cursor: grab; padding: 4px 6px; flex-shrink: 0; }
.grip:active { cursor: grabbing; }
.tr-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; flex: 1; }
.tr-form .tf input, .tr-form .tf select { width: 170px; }
.tr-form .tf.narrow input, .tr-form .tf.narrow select { width: 96px; }
.tr-icon-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--s3); border: 1px solid var(--s4); border-radius: var(--radius-md);
  color: var(--heading); font-size: 16px; cursor: pointer;
  transition: all .15s ease-out;
}
.tr-icon-btn:hover { background: var(--s4); filter: none; }
.tr-extra { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gv-group-head {
  color: var(--heading); font-weight: 700; font-size: 14px;
  padding: 14px 6px 4px; border-bottom: 1px solid var(--s4);
}
.gv-tools { margin-bottom: 18px; }
.gv-tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 10px; }
.gv-tools label { margin-top: 0; }

.icon-picker { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--divider); }
.ip-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ip-opt {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 11px;
  background: var(--s3); border: 1px solid transparent; border-radius: var(--radius-md);
  color: var(--text); font-size: 13.5px; cursor: pointer;
  transition: all .15s ease-out;
}
.ip-opt:hover { background: var(--s4); filter: none; }
.ip-opt.selected { border-color: var(--brand); color: var(--brand); background: var(--brand-highlight); }
.ip-text-row { display: flex; gap: 8px; align-items: center; }
.ip-text-row input { flex: 1; }

.theme-presets { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.theme-color-input { width: 64px; height: 38px; padding: 3px; cursor: pointer; }
.theme-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-option { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }

.user-mgmt-card {
  background: var(--s2); border: 1px solid var(--s4); border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 10px;
}
.umc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.umc-name { color: var(--heading); font-weight: 700; }
.umc-email-input { max-width: 240px; display: inline-block; }
.umc-role-select { width: auto; display: inline-block; }
.umc-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.channel-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

/* sortable helper */
.sortable-ghost { opacity: .4; }
.sortable-chosen { background: var(--s3); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1024px) {
  .browse-layout, .project-layout, .edit-layout, .profile-layout { grid-template-columns: 1fr; }
  .filters, .project-side, .edit-side { position: static; }
  .gv-tools-grid, .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .container { padding-inline: 16px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .header-search input, .inline-search input { width: 140px; }
  .hero { padding: 36px 0 24px; }
  .hero h1 { font-size: 1.8rem; }
  .ph-top { flex-direction: column; gap: 14px; }
  .project-title-row h1 { font-size: 1.35rem; }
  .result-card { flex-wrap: wrap; }
  .rc-stats { flex-direction: row; width: 100%; margin-left: 74px; justify-content: flex-start; }
  .tr-form .tf input, .tr-form .tf select { width: 100%; }
  .taxonomy-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ─────────────── supplementary components ─────────────── */
.accent { color: var(--brand); }
.home-page { padding-top: 8px; }
.grid-two-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.results-col { min-width: 0; }
.fc-banner { flex-shrink: 0; display: block; }
.fc-banner img, .fc-banner svg { width: 72px; height: 72px; border-radius: var(--radius-md); object-fit: cover; display: block; }
.fc-body { min-width: 0; flex: 1; }
.links-fieldset label { margin-top: 12px; }
.link-danger { color: var(--red); font-weight: 600; }
.link-danger:hover { color: #ff7d99; filter: none; }

/* ══ v6.1 fixes & home polish ══ */
.header-search { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.header-search input { width: 230px; height: 36px; padding-right: 42px; font-size: 14px; }
.header-search .btn-icon {
  position: absolute; right: 3px;
  width: 30px; height: 30px; background: none; color: var(--muted-c);
}
.header-search .btn-icon:hover { color: var(--heading); background: none; filter: none; }

.hero-search { position: relative; display: flex; gap: 10px; max-width: 580px; margin: 26px auto 0; }
.hero-search input { flex: 1; height: 48px; border-radius: 14px; font-size: 16px; padding-left: 18px; }
.hero-search .btn-lg { height: 48px; flex-shrink: 0; }

.carousel {
  display: flex; gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 8px;
  scrollbar-width: thin; scrollbar-color: var(--s4) transparent;
}
.carousel > .featured-card { min-width: min(380px, 84vw); scroll-snap-align: start; flex-shrink: 0; }

.project-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 16px;
  transition: border-color .15s ease-out, transform .15s ease-out;
}
.project-card:hover { border-color: var(--s5); transform: translateY(-2px); }
.project-card h3 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 2px; font-size: 16px; line-height: 1.35;
}
.project-card h3 a { color: var(--heading); }
.project-card:hover h3 a { color: var(--brand); }
.project-card .card-icon { flex-shrink: 0; }
.project-card.compact .card-icon-img, .project-card.compact .card-icon svg { width: 48px; height: 48px; }

.update-zone { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 34px; }
.feed-compact.panel {
  list-style: none; margin: 0; padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.feed-compact.panel li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 14px; transition: background .12s ease-out;
}
.feed-compact.panel li:hover { background: var(--s3); }
.feed-compact .feed-title {
  color: var(--heading); font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-compact .feed-title:hover { color: var(--brand); filter: none; }
.feed-compact li > svg { flex-shrink: 0; }
.feed-compact .feed-meta { margin-left: auto; color: var(--muted-c); font-size: 12.5px; white-space: nowrap; }

section.home-stats-strip {
  background: transparent; border: 0; padding: 0;
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin-top: 38px;
}
.stat strong { display: block; color: var(--heading); font-size: 1.45rem; font-weight: 800; line-height: 1.2; }

.edit-main > .card-sec[id] { display: none; }
.edit-main > .card-sec.active-panel { display: block; }

/* ══ v6.2 admin — uniform spacing & controls ══ */
/* kill stray label margins inside compact inline rows */
.inline-form label, .umc-actions label, .tr-form label,
.moderation-actions label, .filter-row label { margin: 0; }
.inline-form input, .inline-form select { width: auto; }

/* ---- admin index ---- */
.narrow-wide h1 { margin-bottom: 14px; }
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin: 16px 0 20px;
}
.stat-row .stat {
  background: var(--s2); border: 1px solid var(--s4); border-radius: var(--radius-lg);
  padding: 16px 12px; text-align: center; min-width: 0;
}
.admin-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.admin-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  padding: 17px 19px; color: var(--heading); margin: 0;
}
.admin-tile strong { font-size: 15.5px; line-height: 1.3; }
.panel > h2 { margin-top: 0; }
.file-table td .btn, .file-table td a.btn { vertical-align: middle; }

/* ---- user management ---- */
.user-mgmt-card { display: flex; flex-direction: column; gap: 11px; padding: 15px 17px; margin: 0 0 12px; }
.umc-top { display: flex; align-items: center; gap: 12px; }
.umc-top img, .umc-top svg { flex-shrink: 0; border-radius: 50%; }
.umc-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.umc-name a { color: var(--heading); font-weight: 700; }
.umc-name a:hover { color: var(--brand); filter: none; }
.umc-name .muted { font-weight: 400; }
.umc-email { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.umc-email > i { width: 15px; text-align: center; flex-shrink: 0; }
.umc-email .inline-form { display: flex; gap: 6px; flex: 1; align-items: center; min-width: 0; }
.umc-email-input {
  max-width: 300px; flex: 1; min-width: 140px;
  height: 30px; padding: 4px 10px; font-size: 13.5px;
}
.umc-role-select {
  width: auto; height: 30px;
  padding: 4px 28px 4px 10px; font-size: 13.5px;
}
.umc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.umc-actions form { display: flex; gap: 6px; align-items: center; }
.umc-delete { margin-left: auto; }

/* ---- moderation queue ---- */
.moderation-card { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.moderation-card > svg:first-child, .moderation-card > img { flex-shrink: 0; border-radius: var(--radius-md); }
.moderation-info { flex: 1; min-width: 0; }
.moderation-info h3 { margin: 0 0 4px; font-size: 16px; }
.moderation-info p { margin: 3px 0; }
.moderation-actions {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 8px; min-width: 230px; flex-shrink: 0;
}
.moderation-actions form { display: flex; gap: 6px; margin: 0; }
.moderation-actions .reject-form input {
  flex: 1; min-width: 0; height: 30px; padding: 4px 10px; font-size: 13.5px;
}

/* ---- comments & reports ---- */
.comment-mod-item { margin-bottom: 12px; }
.comment-mod-item header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-mod-item footer, .report-card footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.report-card { margin-bottom: 12px; }
.report-card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }

/* ---- shared admin widgets ---- */
.section-head h1 { margin: 0; }
.inline-search { display: flex; gap: 6px; align-items: center; }
.inline-search input {
  width: 240px; height: 32px; padding: 5px 12px; font-size: 14px;
}
@media (max-width: 768px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .moderation-card { flex-direction: column; }
  .moderation-actions { min-width: 0; width: 100%; }
  .umc-delete { margin-left: 0; }
}

/* ══ v6.3 avatars — always round, sized per context ══ */
.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: var(--s3);
}
.comment-head .avatar-img { width: 36px; height: 36px; }
.comment-form .avatar-img { width: 40px; height: 40px; }
.umc-top .avatar-img { width: 38px; height: 38px; }
.header-actions .user-chip .avatar-img { width: 28px; height: 28px; }
.appearance-preview .avatar-img { border-radius: 50%; }
.profile-card .avatar-img { width: 112px; height: 112px; margin-inline: auto; }

/* ══ v6.4 versions table · version detail · changelog timeline ══ */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand); font-weight: 600; font-size: 14.5px;
  margin-bottom: 14px;
}
.back-link:hover { filter: none; color: var(--heading); }

/* ---- versions list rows ---- */
.version-table { display: flex; flex-direction: column; gap: 10px; }
.vrow {
  display: flex; align-items: center; gap: 16px;
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-lg); padding: 13px 18px;
  color: var(--text);
  transition: border-color .15s ease-out, transform .15s ease-out;
}
.vrow:hover { border-color: var(--s5); transform: translateY(-1px); filter: none; color: var(--text); }
.vr-channel { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--brand); }
.vr-channel.ch-beta { background: var(--orange); }
.vr-channel.ch-alpha { background: var(--red); }
.vr-main { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.vr-number { color: var(--heading); font-weight: 700; font-family: var(--mono); font-size: 15.5px; }
.vrow:hover .vr-number { color: var(--brand); }
.vr-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.vr-tags .chip { height: 24px; font-size: 12px; padding: 0 9px; }
.vr-stats { margin-left: auto; color: var(--muted-c); font-size: 13.5px; white-space: nowrap; }
.vr-stats span { display: inline-flex; align-items: center; gap: 5px; }
.vr-dl {
  pointer-events: auto;
  border-radius: 50% !important;
}
.vrow:hover .vr-dl { background: var(--s4); }

/* ---- version detail ---- */
.version-detail { max-width: 860px; }
.vd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.vd-title-col { min-width: 0; }
.vd-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vd-title-row h1 { margin: 0; font-size: 1.6rem; font-family: var(--mono); letter-spacing: -.01em; }
.vd-meta-row {
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
  color: var(--muted-c); font-size: 14px; margin-top: 7px;
}
.vd-meta-row > span { display: inline-flex; align-items: center; gap: 6px; }
.vd-meta-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--s5); margin: 0 10px; }
.vd-author { display: flex; align-items: center; gap: 7px; color: var(--muted-c); font-size: 14px; margin-top: 9px; }
.vd-author a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--heading); font-weight: 600;
}
.vd-author a:hover { color: var(--brand); filter: none; }
.vd-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.vd-section { margin-top: 26px; }
.vd-section h2 { font-size: 1.15rem; margin-bottom: 10px; }
.compat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.compat-card { padding: 15px 17px; }
.compat-card h3 { margin: 0; font-size: 14px; color: var(--text); font-weight: 600; }
.env-chip i { font-size: 12px; }
.dep-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.dep-card {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--s2); border: 1px solid var(--s4);
  border-radius: var(--radius-md); padding: 11px 14px; font-size: 14px;
}
.dep-card a { color: var(--heading); font-weight: 600; }
.dep-card a:hover { color: var(--brand); filter: none; }
.vd-changelog { padding: 16px 18px; }
.vd-files { border-radius: var(--radius-lg); overflow: hidden; padding: 4px 14px; }

/* ---- changelog timeline: solid channel bar + glowing node ---- */
.changelog-stack {
  position: relative;
  display: flex; flex-direction: column;
}
.cl-card {
  --cl-color: var(--brand);
  position: relative;
  background: none; border: none; border-radius: 0;
  padding: 0 0 28px 34px;
}
.changelog-stack .cl-card:last-child { padding-bottom: 0; }
.cl-card.ch-beta  { --cl-color: var(--orange); }
.cl-card.ch-alpha { --cl-color: var(--red); }

/* vertical bar */
.cl-card::before {
  content: "";
  position: absolute; left: 6px; top: 16px; bottom: -4px;
  width: 3px; border-radius: 3px;
  background: var(--cl-color);
}
.changelog-stack .cl-card:last-child::before { bottom: 8px; }

/* node: round dot with soft halo */
.cl-card::after {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--cl-color);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px var(--cl-color);
}

/* duplicate entries: body omitted; bar fades in from the node above */
.cl-card.duplicate::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0) 34%, var(--cl-color) 34%);
  background-size: 100% 9px;
}
.cl-card.duplicate { opacity: .85; }
.cl-dup-note { margin: 8px 0 0; color: var(--muted-c); font-size: 13px; }
.cl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cl-head-text {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  min-width: 0; color: var(--muted-c); font-size: 14px;
}
.cl-head-text h2 { margin: 0; font-size: 1.05rem; }
.cl-head-text h2 a { color: var(--heading); font-family: var(--mono); }
.cl-head-text h2 a:hover { color: var(--brand); filter: none; }
.cl-dl { margin-left: auto; flex-shrink: 0; }
.cl-body { margin-top: 9px; font-size: 14.5px; }

/* ---- legal / terms pages ---- */
.terms-nav { margin: 14px 0 18px; }
.terms-sec { margin-bottom: 16px; scroll-margin-top: 84px; }
.terms-sec h2 { font-size: 1.15rem; margin: 0 0 10px; }
.terms-sec ul { margin: 0; padding-left: 1.4em; }
.terms-sec li { margin: 7px 0; }

/* ══ v6.6 layout polish · notifications · translate ══ */
.project-actions form { display: inline-flex; }
.act-btn { align-items: center; }

/* uniform distance below sticky header on every page */
.site-main { padding-top: 24px; }
.flash-stack { margin-top: 0; padding-top: 14px; }
@media (max-width: 768px) {
  .site-main { padding-top: 16px; }
  .hero { padding-top: 28px; }
  .project-header { padding-top: 18px; }
  .edit-layout, .profile-layout { padding-top: 12px; }

  /* tables scroll instead of overflowing */
  .file-table, .vd-files { display: block; overflow-x: auto; white-space: nowrap; }
  /* modals & search fit small screens */
  .modal-card { max-width: 100%; }
  .results-bar .sort-select span { display: none; }
  .vd-actions { gap: 8px; }
  .vd-actions .btn { flex: 1; justify-content: center; }
}

/* notifications bell & list */
.header-bell {
  position: relative; display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--text); font-size: 15px;
}
.header-bell:hover { background: var(--s3); color: var(--heading); filter: none; }
.notif-badge {
  position: absolute; top: -2px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center;
}
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; }
.notif-item.unread { border-left: 3px solid var(--brand); background: var(--s3); }
.notif-icon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--s3); border-radius: 50%; color: var(--brand); }
.notif-icon.type-rejected, .notif-icon.type-warning { color: var(--orange); }
.notif-body { flex: 1; min-width: 0; }
.notif-body p { margin: 2px 0 4px; font-size: 14px; }
.notif-go { flex-shrink: 0; }

/* translate table */
.translate-table .tr-form-row input { height: 30px; padding: 4px 10px; font-size: 13.5px; flex: 1; min-width: 140px; }

/* taxonomy term dynamic language keys */
.term-lang-key{font-size:12px;color:var(--muted-c)}
