/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { height: 46px; padding: 0 22px; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn.is-active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.field .hint { font-size: var(--fs-xs); color: var(--text-3); }
.field .error-msg { font-size: var(--fs-xs); color: var(--danger); display: none; }
.field.has-error .error-msg { display: block; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--danger); }
.req { color: var(--danger); margin-left: 2px; }
.input, .textarea, .select {
  width: 100%; min-height: 40px; padding: 9px 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text); font-size: var(--fs-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.textarea.code { font-family: var(--mono); font-size: 13px; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B2' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.select-sm { min-height: 34px; padding-top: 6px; padding-bottom: 6px; font-size: var(--fs-xs); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form-grid .span-2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 22px; transition: background var(--t); cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--t); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--accent-contrast); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: var(--r-full); font-size: 11px; font-weight: 600; white-space: nowrap;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
}
.badge .icon { width: 12px; height: 12px; }
.badge-live { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-beta { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-building { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-purple { background: var(--purple-soft); color: var(--purple); border-color: transparent; }
.badge-demo { background: transparent; border-style: dashed; color: var(--text-3); }
.badge-solid { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { font-size: var(--fs-xs); color: var(--text-2); padding: 2px 8px; border-radius: 6px; background: var(--surface); }
a.tag:hover { color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-full); background: var(--panel);
  font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: all var(--t-fast);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active, .chip[aria-pressed='true'] { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip .icon { width: 14px; height: 14px; }
.chip .n { color: var(--text-3); font-weight: 600; }

/* ---------- Avatar ---------- */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff;
  overflow: hidden; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 22px; height: 22px; font-size: 9px; }
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-lg { width: 56px; height: 56px; font-size: 19px; }
.avatar-xl { width: 96px; height: 96px; font-size: 32px; border: 4px solid var(--bg); }
.logo-box {
  width: 48px; height: 48px; border-radius: var(--r-lg); flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; overflow: hidden;
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.logo-box.sm { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; }
.logo-box.sm .icon { width: 16px; height: 16px; }
.logo-box.lg { width: 72px; height: 72px; font-size: 26px; border-radius: var(--r-xl); }
.logo-box .icon { width: 24px; height: 24px; }
.logo-box.lg .icon { width: 34px; height: 34px; }

/* ---------- Panels & cards ---------- */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); }
.panel-pad { padding: var(--s-5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.panel-head h2, .panel-head h3 { font-size: var(--fs-md); }
.panel-body { padding: var(--s-4) var(--s-5); }

.widget { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-4); }
.widget-title { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--s-3); }
.widget-title a { font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); }
.widget-title a:hover { color: var(--accent); }
.widget-list { display: flex; flex-direction: column; gap: 2px; }
.widget-item { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
a.widget-item:hover { background: var(--surface); }
.widget-item .meta { font-size: var(--fs-xs); color: var(--text-3); }
.rank { width: 18px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; text-align: center; }

.card {
  position: relative; display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.card:hover { border-color: var(--border-strong); }
.card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.card .z { position: relative; z-index: 2; }
.card-head { display: flex; gap: var(--s-3); align-items: flex-start; }
.card-title { font-size: var(--fs-md); font-weight: 700; line-height: 1.3; }
.card-title a:hover { color: var(--accent); }
.card-sub { font-size: var(--fs-xs); color: var(--text-3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.card-desc { color: var(--text-2); font-size: var(--fs-sm); }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; padding-top: var(--s-3); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); }
.card-foot .spacer { flex: 1; }
.meta-item { display: inline-flex; align-items: center; gap: 4px; }
.meta-item .icon { width: 14px; height: 14px; }
.creator { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; }
a.creator:hover { color: var(--accent); }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.is-list { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.grid.is-list .card { flex-direction: row; align-items: center; padding: var(--s-4); }
.grid.is-list .card .card-desc { -webkit-line-clamp: 1; }
.grid.is-list .card .card-foot { border-top: 0; padding-top: 0; margin-top: 0; flex-shrink: 0; flex-wrap: nowrap; }
.grid.is-list .card .card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.grid.is-list .card .card-tags { display: none; }
.card-main { display: contents; }
.grid.is-list .card .hide-list { display: none; }

/* ---------- Vote ---------- */
.vote {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel); height: 32px;
}
.vote button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--text-3); }
.vote button:hover { color: var(--accent); background: var(--accent-soft); }
.vote button.down:hover { color: var(--danger); background: var(--danger-soft); }
.vote button[aria-pressed='true'].up { color: var(--accent); }
.vote button[aria-pressed='true'].down { color: var(--danger); }
.vote .score { min-width: 28px; text-align: center; font-weight: 700; font-size: var(--fs-xs); color: var(--text); }
.vote.is-up .score { color: var(--accent); }
.vote.is-down .score { color: var(--danger); }
.vote-col { flex-direction: column; height: auto; width: 44px; padding: 4px 0; }
.upvote-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px; height: 54px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--panel); color: var(--text-2); font-weight: 700; font-size: var(--fs-sm);
  transition: all var(--t-fast);
}
.upvote-btn:hover { border-color: var(--accent); color: var(--accent); }
.upvote-btn[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.upvote-btn.sm { min-width: 0; height: 30px; flex-direction: row; gap: 4px; padding: 0 10px; font-size: var(--fs-xs); }
.action-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-3);
  transition: background var(--t-fast), color var(--t-fast);
}
.action-btn:hover { background: var(--surface); color: var(--text); }
.action-btn[aria-pressed='true'] { color: var(--accent); }
.action-btn .icon { width: 15px; height: 15px; }
.action-btn[aria-pressed='true'] .icon { fill: currentColor; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected='true'] { color: var(--text); }
.tab[aria-selected='true']::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab .n { font-size: 11px; color: var(--text-3); background: var(--surface); padding: 1px 6px; border-radius: var(--r-full); }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border-radius: var(--r-md); gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border-radius: 7px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed='true'] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.seg.icons button { width: 32px; padding: 0; justify-content: center; }

/* ---------- Dropdown ---------- */
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 120; min-width: 230px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.dropdown.open { display: block; animation: pop var(--t) var(--ease); }
.dropdown a, .dropdown button.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--text-2);
}
.dropdown a:hover, .dropdown button.dd-item:hover { background: var(--surface); color: var(--text); }
.dd-head { padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dd-sep { height: 1px; background: var(--border); margin: 6px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 10vh var(--s-4) var(--s-4); background: var(--overlay); }
.modal-root.open { display: flex; animation: fade var(--t) var(--ease); }
.modal {
  width: 100%; max-width: 480px; max-height: 80vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  animation: pop var(--t) var(--ease);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: var(--fs-md); }
.modal-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Search dialog ---------- */
.search-dialog { max-width: 680px; max-height: 76vh; display: flex; flex-direction: column; overflow: hidden; }
.search-input-wrap { display: flex; align-items: center; gap: 10px; padding: 0 var(--s-4); border-bottom: 1px solid var(--border); }
.search-input-wrap input { flex: 1; height: 56px; background: transparent; border: 0; font-size: var(--fs-md); color: var(--text); }
.search-input-wrap input:focus { outline: none; }
.search-filters { padding: 10px var(--s-4); border-bottom: 1px solid var(--border); overflow-x: auto; }
.search-filters .chips { flex-wrap: nowrap; }
.search-results { overflow-y: auto; padding: 8px; flex: 1; }
.search-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 700; padding: 10px 10px 6px; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-md); }
.search-item:hover, .search-item.is-focused { background: var(--surface); }
.search-item .t { font-size: var(--fs-sm); font-weight: 600; }
.search-item .d { font-size: var(--fs-xs); color: var(--text-3); }
.search-item .type-ic { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--surface); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.search-foot { display: flex; gap: var(--s-4); padding: 10px var(--s-4); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px;
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); box-shadow: var(--shadow-md); font-size: var(--fs-sm);
  animation: slideIn var(--t) var(--ease);
}
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all var(--t); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Prose (markdown) ---------- */
.prose { color: var(--text); font-size: var(--fs-base); line-height: 1.7; }
.prose > * + * { margin-top: 0.9em; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.4em; }
.prose h2 { font-size: var(--fs-lg); }
.prose h3 { font-size: var(--fs-md); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { border-left: 3px solid var(--border-strong); padding-left: var(--s-4); color: var(--text-2); }
.prose code:not(pre code) { background: var(--surface); padding: 2px 6px; border-radius: 5px; font-size: 0.86em; }
.prose img { border-radius: var(--r-md); border: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--border); }
.prose .mention { color: var(--accent); font-weight: 600; text-decoration: none; }
.prose table { font-size: var(--fs-sm); }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }

/* ---------- Code block ---------- */
.code-block { position: relative; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); font-family: var(--mono); }
.code-block pre { margin: 0; padding: 14px; overflow-x: auto; font-size: 13px; line-height: 1.6; color: var(--text); }
.code-block code { font-family: var(--mono); }
.tok-kw { color: var(--code-kw); }
.tok-str { color: var(--code-str); }
.tok-num { color: var(--code-num); }
.tok-com { color: var(--code-com); font-style: italic; }
.tok-fn { color: var(--code-fn); }
.tok-type { color: var(--code-type); }
.install-cmd { display: flex; align-items: center; gap: 8px; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px 6px 6px 14px; font-family: var(--mono); font-size: 13px; }
.install-cmd code { flex: 1; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.install-cmd code::before { content: '$ '; color: var(--text-3); }

/* ---------- Comments ---------- */
.comment { display: flex; gap: var(--s-3); }
.comment + .comment { margin-top: var(--s-4); }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: var(--fs-xs); color: var(--text-3); }
.comment-meta .author { color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.comment-text { margin-top: 4px; font-size: var(--fs-sm); }
.comment-text.prose { font-size: var(--fs-sm); }
.comment-actions { display: flex; align-items: center; gap: 2px; margin-top: 4px; margin-left: -8px; }
.comment-children { margin-top: var(--s-4); padding-left: var(--s-4); border-left: 2px solid var(--border); }
.comment.accepted > .comment-body { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--r-md); padding: var(--s-3); }
.reply-form { margin-top: var(--s-3); display: flex; flex-direction: column; gap: 8px; }
.reply-form .textarea { min-height: 80px; }

/* ---------- States ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-3);
  padding: var(--s-10) var(--s-6); color: var(--text-2);
  border: 1px dashed var(--border); border-radius: var(--r-lg);
}
.empty .empty-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--text-3); }
.empty h3 { color: var(--text); font-size: var(--fs-md); }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: var(--r-sm); }
.skel-card { height: 190px; border-radius: var(--r-lg); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--info-soft); color: var(--text); font-size: var(--fs-sm); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
}
.notice .icon { color: var(--info); margin-top: 2px; }
.notice.warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.notice.warn .icon { color: var(--warning); }
.notice.ok { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.notice.ok .icon { color: var(--accent); }
.notice .x { margin-left: auto; color: var(--text-3); }

/* ---------- Section heading ---------- */
.section { margin-top: var(--s-10); }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-xl); }
.section-head p { color: var(--text-2); font-size: var(--fs-sm); margin-top: 2px; }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.see-all:hover { gap: 7px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head p { color: var(--text-2); margin-top: 4px; max-width: 680px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); margin-bottom: var(--s-3); flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .icon { width: 12px; height: 12px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-4); }
.toolbar .spacer { flex: 1; }
.result-count { font-size: var(--fs-sm); color: var(--text-3); }
.load-more-wrap { display: flex; justify-content: center; margin-top: var(--s-6); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); }
.table { font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--surface) 50%, transparent); }

/* ---------- Stats ---------- */
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-4); }
.stat .k { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: var(--fs-2xl); font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.stat .d { font-size: var(--fs-xs); color: var(--accent); margin-top: 2px; }

/* ---------- Token card ---------- */
.token-card .sym { font-weight: 800; font-size: var(--fs-md); }
.ca-box { margin-top: 8px; padding: 10px; background: var(--surface); border-radius: var(--r-sm); font-size: 12px; line-height: 1.5; color: var(--text); }
.ca-label { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Progress / reputation ---------- */
.progress { height: 8px; background: var(--surface); border-radius: var(--r-full); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* ---------- Steps ---------- */
.steps { display: flex; gap: var(--s-2); margin-bottom: var(--s-6); }
.step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--text-3); background: var(--panel); }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.step.is-active { border-color: var(--accent); color: var(--text); }
.step.is-active .n { background: var(--accent); color: var(--accent-contrast); }
.step.is-done .n { background: var(--accent-soft); color: var(--accent); }

/* ---------- Type picker ---------- */
.type-option { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); transition: all var(--t-fast); }
.type-option:hover { border-color: var(--border-strong); }
.type-option[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }
.type-option .logo-box { width: 40px; height: 40px; }
.type-option strong { font-size: var(--fs-md); }
.type-option span { font-size: var(--fs-sm); color: var(--text-2); }

.demo-banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: var(--fs-xs); color: var(--text-2); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-md); margin-bottom: var(--s-5); }
.demo-banner .icon { color: var(--warning); width: 15px; height: 15px; }
.demo-banner button { margin-left: auto; color: var(--text-3); }

/* Misc */
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.input.mono { font-family: var(--mono); font-size: 13px; }
button.see-all { font-size: var(--fs-sm); }
