:root {
  --ink: #f4f7fb;
  --muted: #99a8bd;
  --panel: rgba(17, 25, 39, .78);
  --panel-solid: #121b2a;
  --line: rgba(162, 184, 214, .16);
  --blue: #5aa7ff;
  --cyan: #60e5d2;
  --amber: #ffca67;
  --danger: #ff7388;
  --page: #080d15;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 82% 12%, rgba(37,126,222,.18), transparent 34rem), radial-gradient(circle at 8% 45%, rgba(45,190,171,.09), transparent 28rem), var(--page);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
code, pre { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
.site-header {
  width: min(calc(100% - 40px), var(--max)); height: 76px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 720; letter-spacing: -.02em; }
.brand-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  color: #07101b; font-weight: 900; background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(72,180,241,.28);
}
nav { display: flex; align-items: center; gap: 24px; color: #b7c3d4; font-size: 14px; }
nav a:hover, .link-button:hover { color: white; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; padding: 0; color: #b7c3d4; background: transparent; cursor: pointer; }
.nav-primary { padding: 8px 14px; border: 1px solid rgba(90,167,255,.4); border-radius: 999px; }
.section-wrap { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-size: 12px; font-weight: 780; letter-spacing: .18em; }
.hero {
  width: min(calc(100% - 40px), var(--max)); min-height: 580px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px,5vw,72px); align-items: center;
}
.hero h1 { margin: 0; max-width: 720px; font-size: clamp(44px,6vw,76px); line-height: 1.08; letter-spacing: -.055em; }
.hero-lead { max-width: 680px; margin: 18px 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.release-meta { color: #718198; font-size: 13px; margin: 10px 0 0; }
.button {
  min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 720; font-size: 14px; cursor: pointer; transition: .18s ease;
}
.button.primary { color: #07111d; background: linear-gradient(135deg,#72e8da,#55a7ff); box-shadow: 0 10px 30px rgba(59,144,228,.2); }
.button.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(59,144,228,.32); }
.button.secondary, .button.ghost { border-color: var(--line); background: rgba(255,255,255,.035); }
.button.secondary:hover, .button.ghost:hover { border-color: rgba(90,167,255,.45); background: rgba(90,167,255,.08); }
.button.disabled { opacity: .55; cursor: not-allowed; background: rgba(255,255,255,.06); }
.button.full { width: 100%; }
.button.coffee { margin-top: 12px; background: var(--amber); color: #241703; }
.hero-visual {
  position: relative; min-height: 410px; padding: 20px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(155deg,rgba(26,38,58,.88),rgba(10,15,25,.94));
  box-shadow: 0 30px 90px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.05);
  transform: perspective(1200px) rotateY(-4deg) rotateX(1deg);
}
.window-bar { display: flex; gap: 7px; align-items: center; color: #73839b; font-size: 12px; }
.window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #435168; }
.window-bar b { margin-left: 8px; font-weight: 500; }
.hero-visual pre { margin: 85px 0 0 24px; font-size: 30px; }
.code-muted { color: #5f718b; }
.code-keyword { color: #69d9ff; }
.cursor { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.15em; background: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.candidate-card {
  position: absolute; top: 185px; left: 72px; width: min(360px,calc(100% - 88px)); overflow: hidden;
  border: 1px solid rgba(153,183,221,.24); border-radius: 14px; background: rgba(8,14,23,.94);
  box-shadow: 0 24px 50px rgba(0,0,0,.5); backdrop-filter: blur(16px);
}
.candidate { display: flex; gap: 14px; align-items: center; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.055); }
.candidate:last-child { border: 0; }
.candidate.active { background: linear-gradient(90deg,rgba(66,151,245,.24),rgba(40,196,176,.08)); }
.candidate b { width: 22px; color: var(--blue); }
.candidate span { display: flex; flex-direction: column; }
.candidate strong { font: 650 14px "Cascadia Code",Consolas,monospace; }
.candidate small { color: #76879f; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; padding: 20px 0 72px; }
.feature-grid article, .panel-card, .upload-card, .file-list-card {
  border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.feature-grid article { padding: 24px; }
.feature-grid h2 { margin: 8px 0 5px; font-size: 20px; }
.feature-grid p { margin: 0; color: var(--muted); }
.feature-number { color: var(--blue); font: 700 12px "Cascadia Code",monospace; }
.split-section {
  padding: 58px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 380px; gap: 60px; align-items: center;
}
.split-section h2, .install-section h2 { margin: 0 0 10px; font-size: clamp(32px,4vw,48px); line-height: 1.15; letter-spacing: -.04em; }
.split-section > div > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 17px; }
.panel-card { padding: 28px; }
.panel-card > p { color: var(--muted); margin: 0; }
.panel-card > strong { display: block; margin: 4px 0 16px; overflow-wrap: anywhere; }
.panel-card .button + .button { margin-top: 10px; }
.notice { padding: 14px; border-left: 3px solid var(--amber); background: rgba(255,202,103,.06); }
.donate-section { padding: 56px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 340px; align-items: center; gap: 60px; }
.donate-section h2 { margin: 0 0 10px; font-size: clamp(32px,4vw,48px); line-height: 1.15; letter-spacing: -.04em; }
.donate-section > div > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 17px; }
.qr-card { justify-self: end; max-width: 100%; margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: #1b2533; text-align: center; }
.qr-card img { display: block; width: 260px; max-width: 100%; height: 260px; object-fit: contain; }
.qr-card figcaption { margin-top: 10px; font-weight: 700; }
.install-section { padding: 62px 0 72px; border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.steps li { min-height: 120px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: #bac6d6; background: rgba(255,255,255,.025); }
.steps b { display: block; color: var(--cyan); margin-bottom: 18px; }
.steps code { color: #b8d9ff; font-size: 13px; }
.site-footer { width: min(calc(100% - 40px),var(--max)); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #64748b; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.site-footer a:hover { color: white; }
.messages { width: min(calc(100% - 40px),760px); margin: 18px auto 0; }
.message { padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-solid); }
.message.success { border-color: rgba(96,229,210,.35); }
.message.error { border-color: rgba(255,115,136,.42); }
.form-shell { min-height: calc(100vh - 150px); padding: 70px 20px; display: grid; place-items: center; }
.form-card { width: min(100%,460px); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.form-card h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.form-intro { color: var(--muted); margin: 12px 0 24px; }
.stack-form { display: grid; gap: 16px; }
.stack-form label { display: grid; gap: 7px; color: #c4cfdd; font-size: 14px; font-weight: 650; }
.stack-form input[type="email"], .stack-form input[type="password"], .stack-form input[type="text"], .stack-form input[type="file"], .stack-form textarea {
  width: 100%; min-height: 45px; padding: 10px 12px; color: white; border: 1px solid #2a3950; border-radius: 10px; outline: none; background: #0c1420;
}
.stack-form textarea { resize: vertical; line-height: 1.55; }
.stack-form input:focus, .stack-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(90,167,255,.12); }
.stack-form input[type="file"] { min-height: auto; }
.checkbox-label { grid-template-columns: auto 1fr; align-items: center; justify-content: start; }
.checkbox-label input { grid-column: 1; grid-row: 1; width: 18px; height: 18px; accent-color: var(--cyan); }
.checkbox-label .field-error { grid-column: 1 / -1; }
.captcha-box { display: flex; align-items: center; gap: 14px; }
.captcha-box img { width: 190px; height: 62px; border: 1px solid #2a3950; border-radius: 10px; background: #09111d; }
.captcha-box a { color: var(--blue); font-size: 14px; white-space: nowrap; }
.field-error { display: block; color: #ff91a1; font-weight: 500; }
.form-foot { margin: 22px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.form-foot a { color: var(--blue); }
.state-card { width: min(calc(100% - 40px),620px); min-height: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.state-card h1 { margin: 20px 0 8px; font-size: 36px; }
.state-card p { color: var(--muted); }
.state-icon { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(90,167,255,.35); border-radius: 50%; color: var(--cyan); font-size: 28px; background: rgba(90,167,255,.08); }
.dashboard { min-height: 720px; padding: 70px 0 110px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 30px; }
.dashboard-head h1 { margin: 0; font-size: 48px; letter-spacing: -.045em; }
.dashboard-head p:last-child { color: var(--muted); margin: 5px 0 0; }
.file-count { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.dashboard-grid { display: grid; grid-template-columns: 350px 1fr; gap: 18px; align-items: start; }
.upload-card, .file-list-card { padding: 25px; }
.upload-card h2, .file-list-card h2 { margin: 0 0 8px; }
.upload-card > p { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.file-list { display: grid; margin-top: 18px; }
.file-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }
.file-type { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: var(--cyan); background: rgba(96,229,210,.08); font: 700 11px "Cascadia Code",monospace; }
.file-info { min-width: 0; display: flex; flex-direction: column; }
.file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; gap: 10px; align-items: center; }
.file-actions a, .file-actions button { color: var(--blue); border: 0; background: none; cursor: pointer; font-size: 13px; }
.file-actions button { color: var(--danger); }
.file-actions .neutral-action { color: var(--blue); }
.stacked-actions { align-items: flex-end; flex-direction: column; }
.stacked-actions > div { display: flex; align-items: center; gap: 10px; }
.visibility-badge { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: #8d9bb0; font-size: 11px; }
.visibility-badge.public { color: var(--cyan); border-color: rgba(96,229,210,.28); background: rgba(96,229,210,.06); }
.community-stats { margin-top: 3px; color: #708198 !important; }
.card-heading, .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.card-heading h2, .section-heading h2 { margin: 0; }
.card-heading .eyebrow, .section-heading .eyebrow { margin-bottom: 4px; }
.community-section { padding: 70px 0 0; }
.section-heading > p { max-width: 480px; margin: 0; color: var(--muted); font-size: 14px; text-align: right; }
.public-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.public-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.public-title { display: block; margin: 15px 0 3px; overflow: hidden; font-size: 19px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.public-title:hover { color: var(--cyan); }
.public-card > p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.public-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: #75859b; font-size: 12px; }
.public-card-foot a { color: var(--blue); white-space: nowrap; }
.public-empty { min-height: 210px; border: 1px solid var(--line); border-radius: 16px; margin-top: 22px; }
.author-line { display: flex; align-items: center; gap: 9px; color: #aebacc; font-size: 13px; }
.avatar { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid rgba(90,167,255,.28); border-radius: 50%; object-fit: cover; background: #142238; }
.avatar.small { width: 28px; height: 28px; font-size: 12px; }
.avatar.large { width: 82px; height: 82px; font-size: 30px; }
.avatar.initial { display: inline-grid; place-items: center; color: #06121d; font-weight: 850; background: linear-gradient(135deg,var(--cyan),var(--blue)); }
.detail-page { min-height: 760px; padding: 54px 0 100px; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--blue); font-size: 14px; }
.template-hero { display: flex; align-items: center; justify-content: space-between; gap: 36px; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.template-hero h1 { margin: 0 0 13px; font-size: clamp(34px,5vw,54px); letter-spacing: -.045em; }
.file-meta { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.template-actions { min-width: 230px; display: grid; gap: 12px; }
.vote-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vote-button, .mini-vote { width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: #8fa0b6; cursor: pointer; background: rgba(255,255,255,.025); }
.vote-button.active, .mini-vote.active { color: var(--cyan); border-color: rgba(96,229,210,.38); background: rgba(96,229,210,.08); }
.vote-button.active.dislike, .mini-vote.active.dislike { color: var(--danger); border-color: rgba(255,115,136,.38); background: rgba(255,115,136,.08); }
.vote-summary { color: var(--muted); text-align: center; }
.comments-layout { margin-top: 22px; display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 18px; align-items: start; }
.comments-panel, .comment-compose { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.comment-compose { position: sticky; top: 18px; }
.comment-compose h2 { margin: 0 0 6px; }
.comment-compose > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.section-heading.compact { align-items: center; padding-bottom: 15px; }
.section-heading.compact > span { color: var(--muted); font-size: 13px; }
.comment-tree { display: grid; gap: 10px; }
.comment-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(7,13,22,.48); }
.comment-card.depth-1 { margin-left: 20px; }
.comment-card.depth-2 { margin-left: 40px; }
.comment-card.depth-3 { margin-left: 60px; }
.comment-card.depth-4 { margin-left: 80px; }
.comment-card.depth-5 { margin-left: 100px; }
.comment-card.depth-6 { margin-left: 120px; }
.comment-card.depth-7 { margin-left: 140px; }
.comment-card.depth-8 { margin-left: 160px; }
.comment-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.comment-card time { color: #6f8096; font-size: 11px; }
.reply-mark { color: #6e7f95; font-size: 11px; }
.comment-body { padding: 13px 0; overflow-wrap: anywhere; color: #d5dde8; font-size: 14px; }
.comment-actions { display: flex; align-items: center; gap: 7px; }
.comment-actions form { margin: 0; }
.mini-vote { width: auto; padding: 4px 8px; font-size: 12px; }
.self-votes { color: #718198; font-size: 12px; }
.reply-box { margin-left: auto; }
.reply-box summary { color: var(--blue); cursor: pointer; font-size: 12px; list-style: none; }
.reply-box[open] { width: 100%; margin-top: 10px; }
.reply-box[open] summary { margin-bottom: 10px; text-align: right; }
.compact-form { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #0a121e; }
.compact-captcha img { width: 152px; height: auto; }
.profile-card { width: min(100%,560px); }
.profile-preview { display: flex; align-items: center; gap: 18px; }
.profile-preview h1 { font-size: 30px; }
.profile-preview p:last-child { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.empty-state { min-height: 280px; display: grid; place-content: center; color: #68788e; text-align: center; }
.empty-state span { font-size: 38px; }
.home-page { display: grid; place-items: center; overflow: hidden; }
.home-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(circle at center,black,transparent 75%); }
.home-shell { width: min(calc(100% - 48px),850px); position: relative; z-index: 1; }
.home-shell h1 { margin: 0; max-width: 780px; font-size: clamp(56px,10vw,110px); line-height: .96; letter-spacing: -.07em; }
.home-copy { max-width: 520px; margin: 30px 0 50px; color: var(--muted); font-size: 18px; }
.home-mark { display: flex; gap: 8px; margin-bottom: 42px; }
.home-mark span { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 20px rgba(90,167,255,.6); }
.home-mark span:nth-child(2) { background: var(--cyan); transform: translateY(-7px); }
.home-mark span:nth-child(3) { background: var(--amber); }
.project-link { width: min(100%,520px); padding: 20px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: 650 17px "Cascadia Code",Consolas,monospace; }
.project-link span:last-child { color: var(--cyan); transition: transform .18s ease; }
.project-link:hover span:last-child { transform: translate(4px,-4px); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 60px 0; }
  .hero-visual { max-width: 600px; width: 100%; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .feature-grid { padding-bottom: 56px; }
  .split-section { grid-template-columns: 1fr; gap: 38px; }
  .donate-section { grid-template-columns: 1fr; gap: 28px; }
  .qr-card { justify-self: start; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .public-grid { grid-template-columns: repeat(2,1fr); }
  .comments-layout { grid-template-columns: 1fr; }
  .comment-compose { position: static; }
}
@media (max-width: 600px) {
  .site-header { height: auto; padding: 18px 0; align-items: flex-start; }
  nav { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
  .brand > span:last-child { display: none; }
  .hero { min-height: auto; }
  .hero h1 { font-size: 45px; }
  .hero-visual { min-height: 360px; padding: 15px; transform: none; }
  .candidate-card { left: 30px; width: calc(100% - 46px); }
  .split-section { padding: 48px 0; }
  .donate-section { padding: 48px 0; gap: 24px; }
  .qr-card { width: auto; }
  .qr-card img { width: 260px; height: auto; aspect-ratio: 1; }
  .dashboard-head { align-items: flex-start; gap: 18px; }
  .file-count { white-space: nowrap; }
  .file-row { grid-template-columns: 42px 1fr; }
  .file-actions { grid-column: 2; }
  .public-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > p { text-align: left; }
  .template-hero { align-items: stretch; flex-direction: column; padding: 22px; }
  .template-actions { min-width: 0; }
  .comment-card.depth-1, .comment-card.depth-2, .comment-card.depth-3, .comment-card.depth-4, .comment-card.depth-5, .comment-card.depth-6, .comment-card.depth-7, .comment-card.depth-8 { margin-left: 14px; }
  .site-footer { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
