/* 蜂网 BeeNet website. One accent (honey), one theme per visit (the system's light or dark),
   one corner scale: 10px for controls and code, 16px for images and panels. */

@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #eef0f2;
  --ink: #14161a;
  --muted: #565c64;
  --line: #dfe2e6;
  --honey: #f2b01e;
  --on-honey: #14161a;
  --accent-text: #7a5000;
  --shadow: 0 1px 2px rgb(20 22 26 / .06), 0 8px 28px rgb(20 22 26 / .07);
  --r-s: 10px;
  --r-m: 16px;
  --max: 1180px;
  --font: "Geist", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e11;
    --surface: #15171b;
    --surface-2: #1c1f24;
    --ink: #ecedef;
    --muted: #9ba1a9;
    --line: #272b31;
    --accent-text: #f2b01e;
    --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 10px 34px rgb(0 0 0 / .45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, canvas, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--honey) 45%, transparent); }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--honey); color: var(--on-honey); padding: 8px 14px; border-radius: var(--r-s); z-index: 100; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
h1, h2, h3 { font-weight: 650; line-height: 1.2; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 3.7vw, 3.1rem); line-height: 1.16; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 36em; }
.muted { color: var(--muted); }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mono { font-family: var(--mono); }

/* header: one line, 64px */
.site-header { position: sticky; top: 0; z-index: 40; height: 64px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--bg); } }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; text-decoration: none; letter-spacing: .01em; }
.brand img { width: 30px; height: 30px; }
.brand span { white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 13px; border-radius: var(--r-s); text-decoration: none; color: var(--muted); font-size: .96rem; white-space: nowrap; transition: color .15s, background .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav .btn { margin-left: 10px; color: var(--on-honey); background: var(--honey); }
.nav .btn:hover { background: var(--honey); filter: brightness(1.06); color: var(--on-honey); }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); font-size: .95rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--surface-2); }
.menu nav { position: absolute; right: 20px; top: 62px; width: min(300px, calc(100vw - 40px)); display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); }
.menu nav a { padding: 11px 12px; border-radius: var(--r-s); text-decoration: none; }
.menu nav a:hover { background: var(--surface-2); }
@media (max-width: 860px) { .nav { display: none; } .menu { display: block; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--r-s); font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .12s, filter .15s, background .15s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--honey); color: var(--on-honey); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero */
.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--line); }
.hero canvas.hexnet { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / .25) 34%, #000 62%); mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / .25) 34%, #000 62%); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr); gap: clamp(28px, 5vw, 72px); align-items: center; min-height: min(calc(100dvh - 64px), 740px); padding-block: 56px 48px; }
.hero h1 { margin-bottom: 20px; }
.hero .btn-row { margin-top: 30px; }
.shot { border-radius: var(--r-m); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; background: var(--surface); }
.shot img { width: 100%; height: auto; }
/* a window onto the product: the picture is larger than the frame, and the frame shows the part that matters */
.shot.crop { position: relative; aspect-ratio: 5 / 4; }
.shot.crop img { position: absolute; left: 0; top: 0; width: 118%; max-width: none; height: auto; }
.shot.crop.sm { aspect-ratio: 4 / 3; }
.hero .shot { transform: translateX(clamp(0px, 3vw, 44px)); }
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-block: 44px 40px; }
  .hero .shot { transform: none; }
}

/* live numbers */
.live { border-bottom: 1px solid var(--line); background: var(--surface); }
.live .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.live .stat { padding: 26px 24px; }
.live .stat + .stat { border-left: 1px solid var(--line); }
.stat .num { font-family: var(--mono); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.stat .num.text { font-family: var(--font); font-size: clamp(1.35rem, 2.3vw, 1.8rem); font-weight: 650; letter-spacing: 0; padding-top: .25em; }
.stat .what { margin-top: 6px; color: var(--muted); font-size: .92rem; }
@media (max-width: 640px) {
  .live .wrap { grid-template-columns: 1fr; }
  .live .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .live .stat { padding: 18px 4px; }
}

/* sections */
.section { padding-block: clamp(64px, 9vw, 116px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(32px, 4vw, 52px); max-width: 44rem; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }

/* bento: four cells, each with something the network really made */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.cell { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden; }
.cell .copy { padding: 26px 28px 18px; }
.cell h3 { display: flex; align-items: center; gap: 10px; }
.cell h3 .icon { color: var(--accent-text); }
.cell .copy p { margin-top: 8px; color: var(--muted); max-width: 30em; }
.cell .media { position: relative; flex: 1 1 auto; min-height: 280px; margin-top: 8px; border-top: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.cell .media img, .cell .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cell .media img.top { inset: 0 auto auto 0; width: 128%; max-width: none; height: auto; }
.cell-a { grid-column: span 7; }
.cell-b { grid-column: span 5; }
.cell-c { grid-column: span 5; }
.cell-d { grid-column: span 7; }
@media (max-width: 860px) { .cell-a, .cell-b, .cell-c, .cell-d { grid-column: 1 / -1; } }

/* numbered way in */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split .stick { position: sticky; top: 104px; }
.split .stick .btn-row { margin-top: 28px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split .stick { position: static; } }
.ways { list-style: none; margin: 0; padding: 0; counter-reset: way; }
.ways li { counter-increment: way; position: relative; padding: 4px 0 34px 64px; }
.ways li:last-child { padding-bottom: 0; }
.ways li::before { content: counter(way); position: absolute; left: 0; top: 0; width: 42px; height: 42px; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); }
.ways li::after { content: ""; position: absolute; left: 21px; top: 50px; bottom: 6px; width: 1px; background: var(--line); }
.ways li:last-child::after { display: none; }
.ways h3 { margin-bottom: 6px; }
.ways p { color: var(--muted); max-width: 32em; }

/* the contribute band */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .band .grid { grid-template-columns: 1fr; } }
.facts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 16px; }
.facts li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.facts .icon { margin-top: 3px; color: var(--accent-text); font-size: 1.3rem; }
.facts strong { display: block; font-weight: 600; }
.facts span { color: var(--muted); }
.band .btn-row { margin-top: 30px; }

/* trust: four plain items, no cards */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px clamp(28px, 6vw, 80px); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; gap: 32px; } }
.pillar .icon { font-size: 1.7rem; color: var(--accent-text); margin-bottom: 14px; }
.pillar h3 { margin-bottom: 8px; }
.pillar p { color: var(--muted); max-width: 30em; }
.notice { margin-top: 44px; padding: 16px 20px; border: 1px solid var(--line); border-left: 3px solid var(--honey); border-radius: var(--r-s); background: var(--surface); color: var(--muted); max-width: 46rem; }
.notice b { color: var(--ink); font-weight: 600; }

/* roadmap */
.roadmap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .roadmap { grid-template-columns: 1fr; } }
.roadmap > div { border: 1px solid var(--line); border-radius: var(--r-m); padding: 26px 28px; background: var(--surface); }
.roadmap h3 { margin-bottom: 14px; }
.roadmap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.roadmap li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.roadmap .icon { margin-top: 4px; color: var(--accent-text); }
.roadmap .soon .icon { color: var(--muted); }

/* FAQ */
.faq { max-width: 52rem; }
.invite-code { margin-top: 22px; }
.guide { display: grid; gap: 56px; max-width: 52rem; }
.guide h3 { font-size: 1.3rem; margin: 0 0 12px; }
.guide ol { padding-left: 1.3rem; margin: 0; }
.guide li { margin-bottom: 26px; }
.guide li p { margin: 0 0 12px; }
.guide img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; }
.code-big { display: inline-block; font-size: 1.05rem; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; user-select: all; word-break: break-all; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; font-weight: 600; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .answer { padding: 0 0 22px; color: var(--muted); max-width: 44rem; }
.faq .answer p + p { margin-top: 10px; }

/* closing call */
.closing { text-align: left; }
.closing .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 44px; color: var(--muted); font-size: .94rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
.site-footer .brand { color: var(--ink); margin-bottom: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-content: start; justify-content: flex-end; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } .site-footer nav { justify-content: flex-start; } }

/* inner pages */
.page-head { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 56px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 30px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: .88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(32px, 6vw, 80px); align-items: start; padding-block: clamp(40px, 6vw, 72px); }
.cols aside { position: sticky; top: 96px; }
@media (max-width: 920px) { .cols { grid-template-columns: 1fr; } .cols aside { position: static; order: -1; } }
.toc { border-left: 1px solid var(--line); padding-left: 18px; display: grid; gap: 8px; font-size: .94rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc b { font-weight: 600; margin-bottom: 4px; }
.facts-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: .96rem; }
.facts-table th, .facts-table td { text-align: left; padding: 12px 14px 12px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.facts-table th { width: 9.5em; color: var(--ink); font-weight: 600; }
.facts-table td { color: var(--muted); }

/* code */
.code { position: relative; margin: 6px 0 20px; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); font: .86rem/1.65 var(--mono); color: var(--ink); tab-size: 2; }
.code .label { position: absolute; top: 8px; right: 70px; font: .72rem var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.code button { position: absolute; top: 6px; right: 6px; padding: 4px 11px; font: .78rem var(--font); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.code button:hover { color: var(--ink); }

/* download page */
.invite-box { margin-top: 28px; padding: 22px 24px; border: 1px solid var(--line); border-left: 3px solid var(--honey); border-radius: var(--r-s); background: var(--surface); }
.invite-box[hidden] { display: none; }
.invite-box code { display: block; margin: 12px 0; padding: 10px 12px; font-family: var(--mono); font-size: .92rem; word-break: break-all; background: var(--surface-2); border-radius: 8px; }
.downloads { display: grid; gap: 14px; margin-top: 8px; }
.dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.dl.primary { border-color: color-mix(in srgb, var(--honey) 60%, var(--line)); }
.dl h3 { font-size: 1.05rem; }
.dl .meta { color: var(--muted); font-size: .92rem; }
.dl .hash { font: .76rem var(--mono); color: var(--muted); word-break: break-all; grid-column: 1 / -1; }
.dl .how { color: var(--muted); font-size: .94rem; grid-column: 1 / -1; }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr; } }

/* motion: things appear as they come into view, only when the script is on and motion is welcome */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

.notfound { min-height: 60dvh; display: grid; align-content: center; gap: 18px; }
.notfound .big { font: 600 clamp(4rem, 12vw, 8rem)/1 var(--mono); color: var(--accent-text); letter-spacing: -.04em; }

/* status page */
.st { padding-block: 28px 64px; }
.st-banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; padding: 16px 20px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); margin-bottom: 28px; }
.st-banner.st-up { border-color: #2f9e5f; }
.st-banner.st-degraded { border-color: var(--honey); }
.st-banner.st-down { border-color: #d64545; }
.st-group { margin-bottom: 36px; }
.st-group h2 { font-size: 1.15rem; margin-bottom: 12px; }
.st-row { padding: 14px 0; border-top: 1px solid var(--line); }
.st-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.st-name { font-weight: 600; font-family: var(--mono); }
.st-label { font-size: .85rem; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); }
.st-label.st-up { color: #1f7a48; }
.st-label.st-degraded { color: var(--accent-text); }
.st-label.st-down { color: #c0392b; }
.st-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .88rem; margin: 4px 0 8px; }
.st-bar { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 30px; }
.st-c { display: block; border-radius: 2px; background: var(--surface-2); }
.st-c.st-ok { background: #2f9e5f; }
.st-c.st-warn { background: var(--honey); }
.st-c.st-down { background: #d64545; }
.st-c.st-none { background: var(--surface-2); }
.st-c:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.st-day h3 { font-size: .95rem; margin: 14px 0 4px; color: var(--muted); }
.st-inc { margin: 2px 0; }
@media (max-width: 640px) { .st-bar { grid-template-columns: repeat(45, minmax(0, 1fr)); height: 26px; } .st-bar .st-c:nth-child(-n+45) { display: none; } }
