:root {
  --bg: #f2efe6;
  --panel: #faf8f1;
  --panel-2: #edeadd;
  --line: #e0dbc8;
  --line-bright: #c9c2a8;
  --text: #23281e;
  --muted: #6b705f;
  --dim: #96937d;
  --lime: #b5e04c;
  --lime-deep: #4c7a10;
  --violet: #6553d6;
  --gold: #c69214;
  --gold-deep: #a1770c;
  --red: #c2483c;
  --mono: 'Inter', sans-serif;      /* former mono accents, now clean sans */
  --sans: 'Inter', sans-serif;
  --display: 'Sora', sans-serif;    /* headings and brand */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-color: var(--line-bright) var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
}
::selection { background: var(--lime); color: #1c2410; }
a { color: var(--lime-deep); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); }
.votecount, .statline .stat b, .lb-votes, .rank, .ds-stats, .charcount { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 0 28px; height: 64px;
  background: rgba(250,248,241,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.3px; color: var(--text); cursor: pointer; user-select: none; }
.logo .logo-mark { flex: none; }
.logo em { font-style: normal; color: var(--lime-deep); }
.logo small { color: var(--dim); font-size: 9.5px; font-weight: 600; display: block; letter-spacing: 2.5px; margin-top: 0; font-family: var(--sans); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  background: none; border: none; color: var(--muted);
  font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px;
  transition: .15s;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--lime-deep); background: rgba(181,224,76,.22); }
.userbox { display: flex; align-items: center; gap: 10px; position: relative; }
.ub-desktop { display: flex; align-items: center; gap: 10px; }
.hamburger {
  display: none; width: 40px; height: 38px;
  align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line-bright);
  border-radius: 9px; color: var(--text);
}
.mobile-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 10px);
  flex-direction: column; gap: 2px; min-width: 210px; padding: 8px;
  background: var(--panel); border: 1px solid var(--line-bright);
  border-radius: 12px; box-shadow: 0 14px 34px -14px rgba(58,53,36,.4);
  z-index: 60;
}
.mobile-menu.open { display: flex; }
.mobile-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; background: none; border: none; border-radius: 8px;
  padding: 11px 12px; font-size: 14px; font-weight: 600; color: var(--text);
}
.mobile-menu button:hover { background: var(--panel-2); }
.userbox select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line-bright);
  font-family: var(--mono); font-size: 12px; padding: 7px 10px; border-radius: 8px; outline: none;
}
.btn-drop {
  background: var(--lime); color: #1c2410; border: 1px solid #9cc63a; font-weight: 700;
  font-size: 14px; padding: 9px 18px; border-radius: 10px; transition: .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-drop:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -6px rgba(103,141,26,.5); }
.plus-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--lime-deep); color: #fffdf4;
  font-weight: 800; font-size: 16px; line-height: 1;
  flex: none;
}
/* outlined twin of .btn-drop: same size and shape, transparent fill */
.btn-outline {
  background: none; color: var(--text); border: 1px solid var(--line-bright);
  font-weight: 700; font-size: 14px; padding: 9px 18px; border-radius: 10px;
  transition: .2s;
}
.btn-outline:hover { border-color: var(--lime-deep); color: var(--lime-deep); transform: translateY(-1px); }

.proto-strip {
  font-family: var(--mono); font-size: 11px; color: #3d2e05;
  background: repeating-linear-gradient(-45deg, #f2d377, #f2d377 14px, #e8c45c 14px, #e8c45c 28px);
  text-align: center; padding: 5px; letter-spacing: .5px; font-weight: 700;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 36px 28px 90px; }

/* ---------- hero ---------- */
.hero { padding: 46px 0 34px; }
.hero .kicker { font-family: var(--mono); font-size: 12px; color: var(--violet); letter-spacing: 3px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.05; font-weight: 700; max-width: 780px; }
.hero h1 .glow {
  background: linear-gradient(92deg, #5a9e16, #14916a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .nobreak { white-space: nowrap; }
.hero-art {
  font-family: var(--display); font-weight: 700; font-size: 19px;
  color: var(--lime-deep); margin-top: 14px; letter-spacing: .2px;
}
.hero p.sub { color: var(--muted); font-size: 17px; margin-top: 14px; max-width: 620px; line-height: 1.6; }
.statline { display: flex; gap: 38px; margin-top: 34px; flex-wrap: wrap; }
.statline .stat { font-family: var(--mono); }
.statline .stat-link { cursor: pointer; border-radius: 10px; padding: 4px 8px; margin: -4px -8px; transition: background .15s; }
.statline .stat-link:hover { background: rgba(181,224,76,.18); }
.statline .stat-link:hover b { color: var(--lime-deep); }
.statline .stat b { display: block; font-size: 26px; color: var(--text); font-weight: 700; }
.statline .stat span { font-size: 11px; color: var(--dim); letter-spacing: 1.5px; text-transform: uppercase; }

/* ---------- section headers ---------- */
.sechead { display: flex; align-items: baseline; gap: 14px; margin: 38px 0 18px; scroll-margin-top: 84px; }
.sechead h2 { font-family: var(--display); font-size: 15px; color: var(--text); font-weight: 700; letter-spacing: .2px; }
.sechead h2::before { content: ''; }
.sechead .rule { flex: 1; height: 1px; background: var(--line); }
.sorttabs { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.sorttabs button { background: none; border: none; color: var(--muted); font-family: var(--mono); font-size: 11px; padding: 5px 12px; border-radius: 6px; }
.sorttabs button.active { background: var(--panel-2); color: var(--lime-deep); }

/* ---------- insight cards ---------- */
.feed { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; display: flex; gap: 18px; position: relative;
  box-shadow: 0 1px 3px rgba(75,68,42,.06);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--line-bright); transform: translateY(-1px); box-shadow: 0 8px 22px -12px rgba(75,68,42,.25); }
.card.certified { border-color: rgba(198,146,20,.45); }
.card.certified::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  background: var(--gold); border-radius: 3px;
}
.votecol { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; }
.upvote {
  background: var(--panel-2); border: 1px solid var(--line-bright); color: var(--muted);
  width: 46px; height: 40px; border-radius: 10px; font-size: 15px; transition: .15s;
}
.upvote:hover { border-color: var(--lime-deep); color: var(--lime-deep); }
.upvote.voted { background: rgba(181,224,76,.3); border-color: var(--lime-deep); color: var(--lime-deep); }
.upvote.pulse { animation: pulse .35s ease; }
@keyframes pulse { 40% { transform: scale(1.18); } }
.votecount { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); }
.card-main { flex: 1; min-width: 0; }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.avatar {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: #fffdf4;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.handle { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500; }
.handle .cr-mark { color: var(--gold-deep); cursor: help; }
.dot { color: var(--dim); }
.when { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.ds-chip {
  font-family: var(--mono); font-size: 11px; color: var(--violet);
  background: rgba(101,83,214,.09); border: 1px solid rgba(101,83,214,.3);
  padding: 3px 10px; border-radius: 20px; cursor: pointer; transition: .15s;
}
.ds-chip:hover { background: rgba(101,83,214,.18); }
.insight-text { font-size: 16.5px; line-height: 1.6; color: var(--text); }
.card-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.gh-link {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.gh-link:hover { color: var(--text); }
.attest-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.attest-badge {
  font-family: var(--mono); font-size: 11px; color: var(--gold-deep);
  background: rgba(198,146,20,.1); border: 1px solid rgba(198,146,20,.35);
  padding: 3px 10px; border-radius: 20px;
}
.btn-attest {
  font-family: var(--mono); font-size: 11px; color: var(--gold-deep); background: none;
  border: 1px dashed rgba(198,146,20,.5); padding: 3px 10px; border-radius: 20px; transition: .15s;
}
.btn-attest:hover { background: rgba(198,146,20,.12); border-style: solid; }

/* ---------- datasets ---------- */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.ds-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; cursor: pointer; transition: .18s; position: relative; overflow: hidden;
  box-shadow: 0 1px 3px rgba(75,68,42,.06);
}
.ds-card:hover { border-color: var(--violet); transform: translateY(-2px); box-shadow: 0 10px 26px -14px rgba(75,68,42,.3); }
.ds-card h3 { font-size: 19px; margin-bottom: 8px; }
.ds-card .desc {
  color: var(--muted); font-size: 13.5px; line-height: 1.55; margin-bottom: 16px;
  /* card tiles stay a uniform height: clamp long descriptions to
     four lines with an ellipsis; the dataset's own page (.ds-hero
     .desc) always shows the full text */
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ds-stats { display: flex; gap: 16px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.ds-stats b { color: var(--lime-deep); font-weight: 500; }
.ds-glyph { font-family: var(--mono); font-size: 11px; color: var(--violet); margin-bottom: 12px; letter-spacing: 1px; }
.ds-source {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--dim); line-height: 1.6;
  display: flex; flex-direction: column; gap: 2px;
}
.ds-source a { color: var(--lime-deep); font-weight: 500; }
.ds-source a:hover { text-decoration: underline; }
.ds-source .pulled { color: var(--dim); }

/* ---------- dataset detail ---------- */
.ds-hero { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px; margin-bottom: 26px; box-shadow: 0 1px 3px rgba(75,68,42,.06); }
.ds-hero h1 { font-size: 30px; margin-bottom: 10px; }
.ds-hero .desc { color: var(--muted); max-width: 680px; line-height: 1.65; }
.ds-hero .cols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.col-chip { font-family: var(--mono); font-size: 10.5px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px; }
.ds-actions { display: flex; gap: 12px; margin-top: 20px; }
.join-note {
  margin-top: 16px; padding: 12px 16px; border-radius: 10px;
  background: rgba(101,83,214,.07); border: 1px solid rgba(101,83,214,.25);
  font-size: 13px; color: var(--muted); line-height: 1.55;
}
.join-note b { color: var(--violet); font-family: var(--display); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 1px; margin-right: 8px; }
.file-block {
  margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 12px; background: #fffdf6;
}
/* ---------- dataset preview ---------- */
.preview-modal { max-width: 960px; }
.preview-file { margin-top: 18px; }
.preview-file h3 { font-size: 14.5px; margin-bottom: 4px; }
.preview-file .pf-meta { font-size: 11.5px; color: var(--dim); margin-bottom: 10px; }
.preview-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 10px;
  background: #fffdf6;
}
.preview-table { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.preview-table th, .preview-table td {
  padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--line);
  white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}
.preview-table th {
  font-weight: 600; color: var(--lime-deep); background: var(--panel-2);
  position: sticky; top: 0; font-size: 11px;
}
.preview-table tr:last-child td { border-bottom: none; }
.preview-table tr:nth-child(even) td { background: rgba(237,234,221,.35); }
.preview-note { font-size: 12px; color: var(--dim); padding: 18px; text-align: center; }
.preview-btn {
  background: none; border: 1px solid var(--line-bright); color: var(--muted);
  font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 8px; transition: .15s;
}
.preview-btn:hover { border-color: var(--violet); color: var(--violet); }
/* ---------- versioning ---------- */
.ver-chip {
  font-size: 10px; font-weight: 700; color: var(--violet);
  background: rgba(101,83,214,.09); border: 1px solid rgba(101,83,214,.3);
  padding: 1px 7px; border-radius: 12px; vertical-align: 1px;
}
.version-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.version-label { font-size: 11px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.version-pill {
  background: var(--panel-2); border: 1px solid var(--line-bright); color: var(--muted);
  font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 20px; transition: .15s;
}
.version-pill:hover { border-color: var(--violet); color: var(--violet); }
.version-pill.active { background: rgba(101,83,214,.12); border-color: var(--violet); color: var(--violet); }
.version-note {
  margin-top: 12px; padding: 10px 16px; border-radius: 10px;
  background: rgba(198,146,20,.08); border: 1px solid rgba(198,146,20,.3);
  font-size: 12.5px; color: var(--muted); line-height: 1.55;
}
.version-note a { color: var(--gold-deep); font-weight: 600; }
.file-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.file-name { font-family: var(--display); font-weight: 700; font-size: 15px; }
.file-meta { font-size: 12px; color: var(--dim); flex: 1; }
.file-dl { font-size: 11.5px; padding: 6px 12px; }
.btn-ghost {
  background: none; border: 1px solid var(--line-bright); color: var(--text);
  font-family: var(--mono); font-size: 12px; padding: 9px 16px; border-radius: 10px; transition: .15s;
}
.btn-ghost:hover { border-color: var(--lime-deep); color: var(--lime-deep); }
.backlink { font-family: var(--mono); font-size: 12px; color: var(--dim); cursor: pointer; margin-bottom: 16px; display: inline-block; }
.backlink:hover { color: var(--text); }

/* ---------- leaderboard ---------- */
.lb-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .lb-layout { grid-template-columns: 1fr; } }
.lb-row {
  display: flex; align-items: center; gap: 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(75,68,42,.06); transition: .15s;
}
.lb-row:hover { border-color: var(--line-bright); }
.rank { font-family: var(--mono); font-size: 18px; font-weight: 700; width: 34px; color: var(--dim); text-align: center; flex: none; }
.rank.r1 { color: var(--gold-deep); } .rank.r2 { color: #8a93a3; } .rank.r3 { color: #a86a35; }
.lb-body { flex: 1; min-width: 0; }
.lb-body .t { font-size: 14px; line-height: 1.5; }
.lb-body .m { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lb-votes { font-family: var(--mono); font-weight: 700; color: var(--lime-deep); font-size: 15px; flex: none; }
.side-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(75,68,42,.06); }
.side-panel h3 { font-family: var(--display); font-size: 13.5px; margin-bottom: 16px; font-weight: 700; }
.side-panel h3::before { content: ''; }
.analyst-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.analyst-row:last-child { border: none; }
.analyst-row .nm { flex: 1; font-family: var(--mono); font-size: 12.5px; }
.analyst-row .pts { font-family: var(--mono); font-size: 12px; color: var(--lime-deep); }
.cr-info { font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.apply-btn { margin-top: 14px; width: 100%; }
.pending-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.approve-btn { background: rgba(181,224,76,.25); color: var(--lime-deep); border: 1px solid var(--lime-deep); border-radius: 6px; font-family: var(--mono); font-size: 10.5px; padding: 4px 10px; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(58,53,36,.45); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 60px 20px;
  overflow-y: auto;
}
.overlay.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--line-bright); border-radius: 18px;
  width: 100%; max-width: 620px; padding: 30px; animation: rise .25s ease;
  box-shadow: 0 24px 60px -20px rgba(58,53,36,.45);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal .mono-sub { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-bottom: 20px; }
.guidelines { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
.guidelines .g { display: flex; gap: 10px; font-size: 13px; color: var(--muted); padding: 4px 0; line-height: 1.5; }
.guidelines .g b { color: var(--lime-deep); font-family: var(--mono); font-weight: 500; }
.guidelines .g-rules {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--dim); line-height: 1.6;
}
.guidelines .g-rules a { color: var(--lime-deep); font-weight: 600; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.field select, .field textarea, .field input {
  width: 100%; background: #fffdf6; border: 1px solid var(--line-bright); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-family: var(--sans); font-size: 14.5px; outline: none;
  transition: border-color .15s;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.field select:focus, .field textarea:focus, .field input:focus { border-color: var(--lime-deep); }
.field input { font-family: var(--mono); font-size: 13px; }
.charcount { font-family: var(--mono); font-size: 11px; color: var(--dim); text-align: right; margin-top: 6px; }
.fmt-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.fmt-btn {
  width: 34px; height: 30px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line-bright);
  color: var(--text); font-size: 13.5px; transition: .15s;
}
.fmt-btn:hover { border-color: var(--lime-deep); color: var(--lime-deep); }
.fmt-hint { font-size: 11px; color: var(--dim); margin-left: 6px; }
.fmt-preview {
  margin-top: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.6;
}
.charcount.over { color: var(--red); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.err { color: var(--red); font-family: var(--mono); font-size: 12px; margin-top: 10px; display: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text); border: 1px solid var(--text); color: #f5f2e8;
  font-family: var(--mono); font-size: 13px; padding: 12px 22px; border-radius: 12px;
  transition: transform .3s ease; z-index: 200; box-shadow: 0 12px 34px -12px rgba(35,40,30,.5);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast { max-width: calc(100vw - 28px); text-align: center; }

.empty { text-align: center; color: var(--dim); font-family: var(--mono); font-size: 13px; padding: 50px 0; }
footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
footer .f { font-family: var(--mono); font-size: 11px; color: var(--dim); }
footer button { background: none; border: none; color: var(--dim); font-family: var(--mono); font-size: 11px; text-decoration: underline; }
footer button:hover { color: var(--red); }

/* ---------- static prose pages (terms) ---------- */
.prose { max-width: 720px; margin: 30px auto 0; }
.prose h1 { font-size: 34px; margin-bottom: 6px; }
.prose .updated { font-size: 12.5px; color: var(--dim); margin-bottom: 30px; }
.prose h2 { font-size: 18px; margin: 30px 0 10px; }
.prose p { font-size: 15px; line-height: 1.7; color: var(--muted); margin-bottom: 12px; }
.prose ul { margin: 0 0 12px 22px; }
.prose li { font-size: 15px; line-height: 1.7; color: var(--muted); margin-bottom: 6px; }
footer .f-links { display: flex; align-items: center; gap: 18px; }
footer .f-links a { font-family: var(--mono); font-size: 11px; color: var(--dim); text-decoration: underline; }
footer .f-links a:hover { color: var(--text); }

/* ---------- feed pagination ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; gap: 12px;
}
.pager .btn-ghost { min-width: 110px; }
.pager-info { font-size: 12px; color: var(--dim); }

/* ---------- dataset search ---------- */
.ds-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line-bright);
  border-radius: 12px; padding: 0 16px; margin-bottom: 20px;
  max-width: 460px; color: var(--dim); transition: border-color .15s;
}
.ds-search:focus-within { border-color: var(--lime-deep); color: var(--lime-deep); }
.ds-search input {
  flex: 1; border: none; background: none; outline: none;
  font-family: var(--sans); font-size: 14px; color: var(--text);
  padding: 11px 0;
}
.ds-search input::placeholder { color: var(--dim); }

/* ---------- auth ---------- */
.auth-modal { max-width: 440px; }
.auth-user {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 8px; text-align: left; transition: .15s;
}
.auth-user:hover { border-color: var(--lime-deep); }
.auth-user .au-handle { font-weight: 600; font-size: 14px; flex: 1; }
.auth-user .au-role { font-size: 11px; color: var(--dim); }
.auth-note { font-size: 12px; color: var(--dim); margin-top: 14px; line-height: 1.6; }
.auth-note a { color: var(--lime-deep); font-weight: 600; }
.signout-btn {
  background: none; border: none; color: var(--dim); font-size: 12.5px;
  text-decoration: underline; padding: 4px;
  display: inline-flex; align-items: center; gap: 8px;
}
.signout-btn .wave, .mobile-menu .wave {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: var(--panel-2); border: 1px solid var(--line-bright);
  text-decoration: none; font-size: 14px; line-height: 1;
}
.signout-btn:hover { color: var(--text); }

/* ---------- trending datasets ---------- */
.trending-row { margin-bottom: 24px; }
.trending-head {
  font-family: var(--display); font-size: 13px; font-weight: 700;
  color: var(--violet); text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.trending-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.trend-card {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: var(--panel); border: 1px solid rgba(101,83,214,.3);
  border-radius: 12px; padding: 14px 16px; transition: .15s;
  box-shadow: 0 1px 3px rgba(75,68,42,.06);
}
.trend-card:hover { border-color: var(--violet); transform: translateY(-1px); }
.trend-rank {
  font-family: var(--display); font-weight: 800; font-size: 20px;
  color: var(--violet); width: 24px; text-align: center; flex: none;
}
.trend-name { font-family: var(--display); font-weight: 700; font-size: 14.5px; }
.trend-meta { font-size: 11.5px; color: var(--dim); margin-top: 2px; }

/* ---------- live data states (skeleton, errors) ---------- */
.skeleton-stack { display: flex; flex-direction: column; gap: 14px; padding: 30px 0; }
.skeleton {
  height: 92px; border-radius: 14px;
  background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%);
  background-size: 200% 100%;
  border: 1px solid var(--line);
  animation: shimmer 1.4s ease infinite;
}
.skeleton.sk-wide { height: 150px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error-note {
  text-align: center; color: var(--muted); font-size: 13.5px;
  padding: 46px 20px; line-height: 2;
}
.error-note .btn-ghost { margin-left: 10px; }

/* ---------- real auth ---------- */
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 10px; padding: 10px 14px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line-bright);
  color: var(--text); font-weight: 600; font-size: 13.5px;
  transition: border-color .15s, transform .15s;
}
.btn-google:hover { border-color: var(--lime-deep); transform: translateY(-1px); }
.auth-note a { cursor: pointer; }
.auth-confirm {
  font-size: 14px; color: var(--muted); line-height: 1.7;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px;
}
.userchip {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid transparent; border-radius: 9px;
  padding: 4px 8px; transition: border-color .15s;
}
.userchip:hover { border-color: var(--line-bright); }
.userchip .uc-name { font-weight: 600; font-size: 13px; color: var(--muted); }
.pending-note { font-size: 11px; color: var(--dim); margin-top: 6px; line-height: 1.55; }

/* ---------- reviewer applications (admin panel) ---------- */
.pending-app { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pending-app .pa-head b { font-family: var(--display); font-size: 13px; }
.pending-app .pa-links { margin-top: 4px; display: flex; gap: 12px; font-size: 12px; }
.pending-app .pa-links a { color: var(--lime-deep); font-weight: 600; }
.pending-app .pa-actions { margin-top: 8px; display: flex; gap: 8px; }

/* ---------- public user pages ---------- */
.handle-link { cursor: pointer; }
.handle-link:hover { color: var(--lime-deep); }
.avatar-link { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.avatar-link:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(76,122,16,.35); }

/* ---------- account settings ---------- */
.account-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 14px; margin-bottom: 16px;
}
.account-row .ar-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.account-row .ar-value { font-size: 13.5px; color: var(--text); margin-left: auto; }
.account-row .ar-change {
  background: none; border: 1px solid var(--line-bright); color: var(--muted);
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 8px;
  transition: .15s; flex: none;
}
.account-row .ar-change:hover { border-color: var(--lime-deep); color: var(--lime-deep); }
.btn-page {
  width: 100%; margin-bottom: 14px; padding: 13px 16px; border-radius: 11px;
  background: rgba(181,224,76,.16); border: 1.5px solid var(--lime-deep);
  color: var(--lime-deep); font-weight: 700; font-size: 15px;
  transition: .15s;
}
.btn-page:hover { background: rgba(181,224,76,.3); transform: translateY(-1px); }
.settings-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.settings-actions .sa-btn { flex: 1; padding: 11px 12px; font-size: 13px; font-weight: 600; }
.danger-zone { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-link {
  background: none; border: none; color: var(--red);
  font-size: 12.5px; font-weight: 600; padding: 0; text-decoration: underline;
}
.danger-warn { font-size: 12.5px; line-height: 1.6; color: var(--muted); margin-top: 10px; }
.danger-warn b { color: var(--red); }
.btn-danger {
  width: 100%; padding: 11px 14px; border-radius: 9px;
  background: rgba(194,72,60,.12); border: 1px solid var(--red);
  color: var(--red); font-weight: 700; font-size: 13.5px;
}
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }
.user-hero {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 32px; margin: 18px 0 26px;
  box-shadow: 0 1px 3px rgba(75,68,42,.06);
}
.user-id { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.user-id .avatar { width: 52px; height: 52px; font-size: 19px; }
.user-id h1 { font-family: var(--display); font-size: 26px; }
.user-meta { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.profile-links { display: flex; gap: 12px; margin-top: 8px; align-items: center; }
.profile-links .pl-icon { color: var(--text); display: inline-flex; transition: .15s; }
.profile-links .pl-icon:hover { color: var(--lime-deep); transform: translateY(-1px); }
.profile-links .pl-li { color: #0A66C2; }
.profile-links .pl-li:hover { color: #0A66C2; opacity: .8; }

/* ---------- follows ---------- */
.btn-follow {
  margin-left: auto; flex: none;
  background: var(--lime); color: #1c2410; border: 1px solid #9cc63a;
  font-weight: 700; font-size: 13px; padding: 8px 18px; border-radius: 20px;
  transition: .15s;
}
.btn-follow:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -6px rgba(103,141,26,.5); }
.btn-follow.following {
  background: var(--panel-2); color: var(--lime-deep); border-color: var(--line-bright);
}
.btn-follow.following:hover { border-color: var(--red); color: var(--red); box-shadow: none; }
.btn-certify {
  flex: none; background: rgba(198,146,20,.08); color: var(--gold-deep);
  border: 1px solid rgba(198,146,20,.45); border-radius: 20px;
  font-weight: 700; font-size: 12.5px; padding: 8px 16px; transition: .15s;
}
.btn-certify:hover { background: rgba(198,146,20,.16); border-color: var(--gold-deep); }

/* ---------- insight drafts (private to the owner) ---------- */
.drafts-link { margin-top: 18px; }
.drafts-note { font-size: 13.5px; color: var(--dim); margin: -4px 0 16px; }
.draft-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(75,68,42,.06);
}
.draft-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--dim);
}
.draft-nods { font-style: italic; }
.draft-text { margin: 10px 0 14px; font-size: 15px; line-height: 1.6; }
.draft-actions { display: flex; gap: 10px; align-items: center; }
.draft-del { margin-left: auto; }
.draft-del.armed { color: var(--red); border-color: var(--red); }

/* ---------- reviewer application decision (visible only to the
   applicant, for the 30 days before they may reapply) ---------- */
.app-decision {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.55;
}
.app-decision.approved {
  background: rgba(198,146,20,.08); border: 1px solid rgba(198,146,20,.45);
  color: var(--gold-deep);
}
.app-decision.rejected {
  background: rgba(75,68,42,.05); border: 1px solid var(--line-bright);
  color: var(--dim);
}
.app-decision .ad-note { display: block; margin-top: 4px; font-size: 11.5px; opacity: .75; }

/* ---------- notification center ---------- */
.bell-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: transparent; border: 1px solid transparent; color: var(--text);
  transition: .15s;
}
.bell-btn:hover { background: rgba(181,224,76,.18); color: var(--lime-deep); }
.bell-badge {
  position: absolute; top: 1px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.notif-modal { max-width: 460px; }
.notif-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 10px; border-bottom: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; transition: background .15s;
}
.notif-row:hover { background: rgba(181,224,76,.12); }
.notif-row.unread { background: rgba(181,224,76,.14); }
.notif-row.unread:hover { background: rgba(181,224,76,.22); }
.notif-ico {
  flex: none; width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.ni-lime   { background: rgba(181,224,76,.35); color: var(--lime-deep); }
.ni-gold   { background: rgba(198,146,20,.15); color: var(--gold-deep); }
.ni-violet { background: rgba(101,83,214,.14); color: #6553d6; }
.ni-green  { background: rgba(76,122,16,.12); color: var(--lime-deep); }
.ni-dim    { background: rgba(75,68,42,.08); color: var(--dim); }
.notif-main { min-width: 0; }
.notif-text { font-size: 14px; line-height: 1.5; }
.n-snip { color: var(--dim); font-size: 13px; }
.notif-when { font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.notif-more { text-align: center; font-size: 12.5px; color: var(--dim); padding: 10px 0 2px; }
.notif-actions { display: flex; gap: 8px; margin-top: 9px; }
.n-act { font-size: 12px; padding: 5px 14px; }
.notif-page { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px 10px; }

/* ---------- dataset Q&A (matches the prerendered SEO pages) ---------- */
.ds-faq h3 { font-size: 15px; margin: 18px 0 6px; }
.ds-faq p { font-size: 14px; line-height: 1.65; color: var(--muted); }

/* ---------- open-source scraper code ----------
   The one legitimate monospace on the site: actual source code. */
.scraper-line {
  margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.scraper-line a { color: var(--lime-deep); font-weight: 600; cursor: pointer; }
.code-modal { max-width: 940px; }
/* the insight code attachment: chip on the card, editor in the
   composer. Monospace is allowed here: it is actual source code. */
.code-tag {
  font-family: 'Consolas', 'Menlo', monospace; font-size: 11px;
  background: rgba(101,83,214,.10); color: var(--violet);
  border: 1px solid rgba(101,83,214,.35); border-radius: 6px;
  padding: 2px 9px; cursor: pointer; transition: .15s;
}
.code-tag:hover { background: rgba(101,83,214,.2); }
.code-toggle { color: var(--lime-deep); font-size: 13px; font-weight: 600; cursor: pointer; }
#fCode {
  font-family: 'Consolas', 'Menlo', monospace; font-size: 12.5px;
  min-height: 140px; width: 100%;
}
.code-block .hljs { background: transparent; padding: 0; }
.code-file { margin-top: 18px; }
.code-file h3 { font-size: 14px; margin-bottom: 8px; }
.code-block {
  font-family: 'Consolas', 'Menlo', monospace; font-size: 12px; line-height: 1.55;
  background: #fffdf6; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; overflow: auto; max-height: 460px;
  white-space: pre; color: var(--text);
}
.code-foot { margin-top: 8px; display: flex; justify-content: flex-end; }
.following-block { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.fb-head { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-chip {
  font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px;
  padding: 5px 13px; transition: .15s;
}
.fb-chip:hover { border-color: var(--lime-deep); color: var(--lime-deep); }
.fb-chip.fb-more {
  color: var(--lime-deep); border-color: var(--lime-deep);
  background: rgba(181,224,76,.14); cursor: pointer;
}
.fb-chip.fb-more:disabled { opacity: .5; cursor: wait; }
.fb-none { font-size: 12.5px; color: var(--dim); }
.check-row {
  display: flex; align-items: center; gap: 9px; margin-bottom: 16px;
  font-size: 13px; color: var(--muted); cursor: pointer; user-select: none;
}
.check-row input { accent-color: var(--lime-deep); width: 15px; height: 15px; }

/* ---------- sharing ---------- */
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
  background: none; border: none; color: var(--dim);
  font-size: 11.5px; font-weight: 600; padding: 3px 6px; border-radius: 8px;
  transition: .15s;
}
.share-btn:hover { color: var(--lime-deep); background: rgba(181,224,76,.14); }
.delete-insight-btn {
  background: none; border: none; color: var(--dim);
  font-size: 11.5px; font-weight: 600; padding: 3px 6px; border-radius: 8px;
  transition: .15s;
}
.delete-insight-btn:hover { color: var(--red); background: rgba(194,72,60,.1); }
.share-modal { max-width: 460px; }
.share-preview {
  font-size: 14px; line-height: 1.6; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.share-preview .sp-by { font-size: 12px; color: var(--dim); margin-top: 8px; font-weight: 600; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-opt {
  background: var(--panel); border: 1px solid var(--line-bright); color: var(--text);
  font-size: 13px; font-weight: 600; padding: 11px 12px; border-radius: 10px;
  transition: .15s;
}
.share-opt:hover { border-color: var(--lime-deep); color: var(--lime-deep); transform: translateY(-1px); }
.share-note { font-size: 11.5px; color: var(--dim); line-height: 1.6; margin-top: 12px; }
.share-url {
  margin-top: 10px; padding: 9px 12px; border-radius: 8px;
  background: #fffdf6; border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); word-break: break-all;
}
.insight-context { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.insight-page { max-width: 760px; margin: 22px auto 0; }
.insight-page .ip-kicker {
  font-family: var(--display); font-size: 12px; font-weight: 700;
  color: var(--violet); text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 14px;
}
.insight-page .insight-text { font-size: 18px; line-height: 1.65; }
.author-block {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-top: 16px;
  box-shadow: 0 1px 3px rgba(75,68,42,.06);
}
.author-block .avatar { width: 42px; height: 42px; font-size: 15px; }
.author-block .ab-main { flex: 1; min-width: 0; }
.author-block .ab-name .handle { font-size: 15px; font-weight: 600; }
.author-block .ab-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* ---------- mobile ----------
   One breakpoint: below 720px the topbar stacks (brand + auth on the
   first row, nav as a full-width second row), paddings tighten, and
   modals use the full width. Everything stays the same warm theme,
   just denser. */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px 12px; }
  .logo { font-size: 18px; }
  .logo small { display: none; }
  .nav { order: 3; flex-basis: 100%; gap: 2px; }
  .nav a { flex: 1; text-align: center; padding: 7px 6px; font-size: 13px; }
  .userbox { margin-left: auto; gap: 6px; }
  .userbox .btn-drop, .userbox .btn-outline { font-size: 12px; padding: 8px 11px; }
  .ub-desktop { display: none; }
  .hamburger { display: flex; }

  .wrap { padding: 20px 14px 70px; }
  .hero { padding: 26px 0 20px; }
  .hero p.sub { font-size: 15.5px; }
  .statline { gap: 18px 28px; margin-top: 24px; }
  .statline .stat b { font-size: 22px; }

  .sechead { flex-wrap: wrap; row-gap: 10px; margin: 26px 0 14px; scroll-margin-top: 116px; }

  .card { padding: 14px; gap: 12px; }
  .insight-text { font-size: 15px; }
  .votecol { min-width: 44px; }
  .upvote { width: 42px; height: 36px; }

  .ds-card { padding: 18px; }
  .ds-hero { padding: 20px 16px; }
  .ds-hero h1 { font-size: 23px; }
  .file-block { padding: 12px; }
  .ds-actions { flex-direction: column; }
  .ds-actions .btn-drop { width: 100%; }

  .lb-row { padding: 12px; gap: 10px; }
  .side-panel { padding: 16px; }

  .overlay { padding: 16px 10px; }
  .modal { padding: 20px 16px; border-radius: 14px; }
  .modal h2 { font-size: 19px; }
  .modal-actions { flex-wrap: wrap; }

  /* iOS Safari auto-zooms into any focused field whose font is under
     16px and never zooms back out; 16px kills the trigger entirely
     (sign-in modal included), so no viewport-scale hacks needed */
  .field select, .field textarea, .field input,
  .ds-search input, #fCode { font-size: 16px; }

  .user-hero { padding: 18px 16px; }
  /* avatar top left, action buttons top right, and the name block on
     its own full-width row below: long usernames keep to one line
     instead of stacking in a squeezed column */
  .user-id { gap: 12px 10px; flex-wrap: wrap; }
  .user-id .avatar { width: 48px; height: 48px; font-size: 17px; }
  .user-id > div { order: 2; flex: 1 1 100%; min-width: 0; }
  .user-id h1 { font-size: 20px; overflow-wrap: anywhere; }
  .btn-follow { order: 1; margin-left: auto; font-size: 12.5px; padding: 7px 14px; }
  .btn-certify { order: 1; font-size: 12px; padding: 7px 12px; }
  .account-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .account-row .ar-value { word-break: break-all; }

  footer { padding: 22px 14px; }
}
