:root {
  --bg: #0c0d10;
  --panel: #13151a;
  --panel-2: #191c22;
  --line: #262a32;
  --text: #c8ccd4;
  --dim: #7a808c;
  --faint: #4b505a;
  --accent: #d9a74a;
  --accent-ink: #1a1408;
  --danger: #d0645a;
  --ok: #7fb685;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.6 var(--mono); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.logo:hover { text-decoration: none; }
.logo-mark { color: var(--accent); font-size: 22px; line-height: 1; }
#nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
#nav a { color: var(--dim); }
#nav a:hover, #nav a.on { color: var(--text); text-decoration: none; }
#nav a.on::before { content: "> "; color: var(--accent); }
.nav-me { display: flex; align-items: center; gap: 8px; }

.demo-bar { padding: 6px 24px; background: #1d1a12; color: #b9a374; border-bottom: 1px solid #332c1b; font-size: 12px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px; min-height: calc(100vh - 160px); }
.foot { text-align: center; color: var(--faint); padding: 24px; border-top: 1px solid var(--line); }
.foot a { color: var(--dim); }

h1, h2, h3 { margin: 0 0 12px; font-weight: 700; color: #e4e6ea; }
h1 { font-size: 18px; } h2 { font-size: 15px; } h3 { font-size: 13px; }
.dim { color: var(--dim); } .faint { color: var(--faint); }
.label { color: var(--dim); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; margin-bottom: 8px; display: block; }

/* Home layout: editor | sidebar | owner card on wide screens; owner card tucks under the sidebar on medium ones. */
.grid-new {
  display: grid; gap: 24px; align-items: start;
  grid-template-columns: 1fr 300px;
  grid-template-areas: "form side" "form owner";
}
.grid-new > form { grid-area: form; }
.grid-new > .side { grid-area: side; }
.grid-new > .owner-col { grid-area: owner; }
@media (min-width: 1360px) {
  main:has(.grid-new) { max-width: 1520px; }
  .grid-new { grid-template-columns: 1fr 300px 290px; grid-template-areas: "form side owner"; }
  .owner-col { position: sticky; top: 24px; }
}
@media (max-width: 860px) {
  .grid-new { grid-template-columns: 1fr; grid-template-areas: "form" "side" "owner"; }
}

/* Owner shoutout card */
.owner-card {
  --pink: #ff5fa2; --peach: #ffb36b; --gtext: #eef0ff; --muted: #9aa0c3;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 26px 20px 20px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(165deg, #1a1d33 0%, #12141f 55%, #0f1118 100%);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  font-family: "Manrope", system-ui, sans-serif; color: var(--gtext);
}
.owner-card::before {
  content: ""; position: absolute; inset: -40% -30% auto; height: 220px; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 95, 162, .28), transparent),
              radial-gradient(closest-side at 70% 60%, rgba(255, 179, 107, .18), transparent);
  filter: blur(10px);
}
.oc-kicker { font: 600 .66rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.oc-av { position: relative; width: 92px; height: 92px; margin-top: 2px; }
.oc-av::before {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--pink), var(--peach), var(--pink));
  animation: oc-spin 6s linear infinite;
}
@keyframes oc-spin { to { transform: rotate(360deg); } }
.oc-gen {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  border: 4px solid #14162a; font: 800 2.4rem "Syne", sans-serif; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 55% 45%), hsl(calc(var(--h) + 40) 60% 30%));
}
.oc-av img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #14162a; background: #14162a; display: block; }
.oc-dot { position: absolute; right: 2px; bottom: 2px; width: 24px; height: 24px; border-radius: 50%; border: 4px solid #14162a; background: #3ee08f; }
.oc-dot.idle { background: #f0b232; }
.oc-dot.dnd { background: #f23f43; }
.oc-dot.dnd::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: #14162a; }
.oc-dot.offline { background: #80848e; }
.oc-name {
  font: 800 2.1rem/1 "Syne", "Arial Black", sans-serif; letter-spacing: -.01em; margin-top: 2px;
  background: linear-gradient(90deg, var(--gtext), var(--pink) 50%, var(--peach), var(--gtext));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: oc-sheen 7s linear infinite;
}
@keyframes oc-sheen { to { background-position: 300% 0; } }
.oc-handle { font: 400 .75rem var(--mono); color: var(--muted); margin-top: -6px; }
.oc-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.oc-badges span {
  font: 600 .64rem var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04);
}
.oc-badges b { color: var(--peach); font-weight: 600; }
.oc-blurb { margin: 0; font-size: .82rem; line-height: 1.5; color: #c6c9de; }
.oc-discord {
  width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 4px;
  padding: 11px 12px; border-radius: 14px; cursor: pointer; text-align: left; color: var(--gtext);
  border: 1px solid rgba(88, 101, 242, .35); background: rgba(88, 101, 242, .12);
  transition: transform .18s, border-color .18s, background .18s;
}
.oc-discord:hover { transform: translateY(-2px); border-color: #5865f2; background: rgba(88, 101, 242, .2); }
.oc-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #5865f2; color: #fff; }
.oc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.oc-txt small { font: 600 .64rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #aab1ff; }
.oc-txt b { font: 700 .95rem "Manrope", sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-copy { font: 600 .64rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .1); }
.oc-discord:hover .oc-copy { color: var(--gtext); }
@media (prefers-reduced-motion: reduce) { .oc-av::before, .oc-name { animation: none; } }

.box { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.box + .box { margin-top: 16px; }
.err { border-color: #4a2723; color: #e2958e; background: #1a1212; }
.note { color: var(--dim); font-size: 12px; }

input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 420px; tab-size: 4; line-height: 1.55; white-space: pre; }
textarea.bio { min-height: 110px; white-space: pre-wrap; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 150px; margin-bottom: 0; }
.check { display: flex; align-items: center; gap: 8px; color: var(--dim); cursor: pointer; padding: 8px 0; }
.check input { accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 3px; padding: 7px 14px; cursor: pointer; color: var(--text);
}
.btn:hover { border-color: var(--faint); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* paste lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: 0; }
.list .t { display: block; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .m { color: var(--faint); font-size: 11px; display: flex; gap: 8px; align-items: center; }

table.pastes { width: 100%; border-collapse: collapse; }
table.pastes th { text-align: left; color: var(--dim); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.pastes td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.pastes tr:hover td { background: var(--panel); }
table.pastes td.title a { color: var(--text); }
table.pastes td.n { color: var(--dim); white-space: nowrap; }
@media (max-width: 700px) { table.pastes .hide-sm { display: none; } }

.most { margin-top: 28px; }
.most-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.most-head h2 { margin: 0; }
.most-head .dim { font-size: 12px; }
.most-table td.rank, .most-table th.rank { width: 36px; color: var(--faint); text-align: right; padding-right: 4px; }
.most-table tr:nth-child(-n+3) td.rank { color: var(--accent); font-weight: 700; }
.most-table td.views { white-space: nowrap; width: 150px; }
.most-table .bar { display: inline-block; vertical-align: middle; width: 80px; height: 4px; border-radius: 2px; background: var(--line); margin-right: 10px; overflow: hidden; }
.most-table .bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.most-table .vn { color: var(--text); }
@media (max-width: 700px) { .most-table .bar { display: none; } .most-table td.views { width: auto; } }
.who { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.who a { color: var(--dim); }
.who a:hover { color: var(--text); }

/* avatars */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; object-fit: cover; flex: none; background: var(--panel-2); }
.av-txt { color: #e9e2d0; font-weight: 700; }

/* paste view */
.paste-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--dim); font-size: 12px; align-items: center; }
.share { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.share .label { margin: 0; }
.share input { max-width: 360px; color: var(--accent); cursor: text; }
.code { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.code pre { margin: 0; padding: 14px 0; line-height: 1.55; font: inherit; }
.gutter { color: var(--faint); text-align: right; padding: 14px 12px !important; border-right: 1px solid var(--line); user-select: none; background: #101216; }
.code-body { overflow-x: auto; flex: 1; }
.code-body pre { padding: 14px 16px; }
.code-body code.hljs { background: transparent; padding: 0; }

body.raw .top, body.raw .foot, body.raw .demo-bar { display: none; }
body.raw main { max-width: none; padding: 12px; }
body.raw pre { margin: 0; white-space: pre-wrap; word-break: break-word; }

/* heads */
.heads { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.head-card { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px; text-align: center; color: var(--text); display: block; }
.head-card:hover { border-color: var(--accent); text-decoration: none; }
.head-card .av { width: 96px; height: 96px; margin: 0 auto 10px; display: flex; }
.head-card .h { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.head-card .b { color: var(--dim); font-size: 11px; height: 3.2em; overflow: hidden; }
.profile { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.profile .bio { white-space: pre-wrap; color: var(--text); max-width: 640px; overflow-wrap: anywhere; }

.tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 8px 14px; color: var(--dim); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.narrow { max-width: 420px; margin: 0 auto; }
.mid { max-width: 640px; margin: 0 auto; }

.rules ol { padding-left: 20px; } .rules li { margin-bottom: 8px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 8px 16px; border-radius: 3px; }
.empty { color: var(--faint); padding: 24px 0; text-align: center; }

@media (max-width: 600px) {
  .top, main { padding-left: 16px; padding-right: 16px; }
  textarea { min-height: 300px; }
}
