/* AIDrop — design system
   Warm off-white ground, near-black ink, Geist Sans + Geist Mono.
   No shadows, no fills for decoration. Orange is a signal dot, not a surface.
   Motifs: ASCII frames (+ corners, dashed rules), dotted leaders, oversized numerals, dark floating capsule. */
@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #F1EEE7; --bg-2: #E8E4DB; --card: #F6F4EF; --ink: #232323; --ink-2: #4B4945; --muted: #7C776E;
  --line: #D8D3C8; --line-2: #BDB7AA; --dark: #1D1D1D; --on-dark: #F1EEE7; --on-dark-2: #A9A49A;
  --grey: #DEDEDE; --signal: #FF9100; --ok: #3E8E5A; --bad: #B3261E;
  --r: 6px; --r-sm: 4px;
  --font: "Geist", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, "PingFang SC", monospace;
  --wrap: 1240px; --gut: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--on-dark); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { min-height: 80vh; display: grid; place-items: center; }
.boot img { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.label, .eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); font-weight: 400; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--ink); }
.sig { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
main.view { padding: 36px 0 112px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.split.wide-aside { grid-template-columns: minmax(0, 1fr) 360px; }
.stack > * + * { margin-top: 16px; }
[hidden] { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* ---------- header: brand · dark capsule · actions ---------- */
.top { position: sticky; top: 0; z-index: 40; padding: 14px 0; background: linear-gradient(var(--bg) 60%, rgba(241, 238, 231, 0)); }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; }
.brand img { width: 30px; height: 30px; }
.brand b { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.brand small { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-left: 2px; }
.capsule { background: var(--dark); color: var(--on-dark); border-radius: 10px; padding: 6px; width: 520px; max-width: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); background-size: 4px 4px; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .45); }
.nav { display: flex; align-items: center; gap: 2px; padding: 2px 4px 6px; }
.nav a { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--on-dark-2); padding: 5px 10px; border-radius: 4px; position: relative; transition: color .15s, background .15s; }
.nav a:hover { color: var(--on-dark); }
.nav a[aria-current="page"] { color: var(--on-dark); background: rgba(255, 255, 255, .09); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }
.ticker { background: #E7E3DA; color: var(--ink); border-radius: 3px; overflow: hidden; font-family: var(--mono); font-size: 11.5px; height: 22px; display: flex; align-items: center; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.ticker-track { display: inline-flex; flex: none; animation: tick 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { display: inline-flex; gap: 8px; padding: 0 22px 0 14px; }
.ticker-track i { font-style: normal; color: var(--muted); }
@keyframes tick { to { transform: translateX(-50%); } }
.top-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.top .spacer { display: none; }
.me { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 5px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--card); cursor: pointer; transition: border-color .15s; }
.me:hover { border-color: var(--ink); }
.me .name { font-size: 13.5px; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: var(--dark); color: var(--on-dark); border-radius: var(--r); padding: 6px; display: none; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5); }
.menu.open { display: block; }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; background: none; border: 0; border-radius: 4px; cursor: pointer; text-align: left; font-size: 14px; }
.menu button:hover { background: rgba(255, 255, 255, .1); }
.me-wrap { position: relative; }

/* ---------- buttons ---------- */
.btn { --bg: var(--ink); --fg: var(--on-dark); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; min-height: 42px;
  border: 0; border-radius: var(--r-sm); background: var(--bg); color: var(--fg); font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, transform .1s; }
.btn:hover { --bg: #000; }
.btn:active { transform: translateY(1px); }
.btn.primary::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.btn.lime, .btn.ghost, .btn.alt { --bg: var(--grey); --fg: var(--ink); }
.btn.lime:hover, .btn.alt:hover { --bg: #D2D0CB; }
.btn.ghost { --bg: transparent; }
.btn.ghost:hover { --bg: var(--bg-2); }
.btn.ink { --bg: var(--ink); }
.btn.danger { --bg: transparent; --fg: var(--bad); box-shadow: inset 0 0 0 1px currentColor; }
.btn.danger:hover { --bg: #F6E3E0; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg, .ic { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 7px; border-radius: 3px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; background: var(--grey); color: var(--ink); line-height: 1.7; white-space: nowrap; text-decoration: none; }
.chip.soft { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.chip.plat { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 12px; }
a.chip:hover { background: var(--ink); color: var(--on-dark); }
.chip img { width: 14px; height: 14px; border-radius: 3px; }
.chip.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--muted)); }
.chip.st { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.ver { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 3px; background: var(--ink); color: var(--on-dark); white-space: nowrap; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; font-size: 13.5px; cursor: pointer; transition: border-color .12s, background .12s; }
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.pick img { width: 16px; height: 16px; border-radius: 4px; }
.pick .n { font-family: var(--mono); font-size: 11.5px; opacity: .65; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 3px; font-family: var(--mono); font-size: 12px; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; color: var(--ink-2); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.avatar { --c: var(--grey); width: 24px; height: 24px; border-radius: 50%; background: var(--c); display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; flex: none; color: var(--ink); }
.avatar.lg { width: 32px; height: 32px; font-size: 13px; }
.plat-stack { display: inline-flex; }
.plat-stack > * { margin-left: -5px; box-shadow: 0 0 0 2px var(--card); } .plat-stack > *:first-child { margin-left: 0; }
.pico { width: 22px; height: 22px; border-radius: 5px; background: var(--grey); display: inline-grid; place-items: center; overflow: hidden; font-size: 11px; font-weight: 600; flex: none; }
.pico img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field > span { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.field > span em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); font-family: var(--font); font-size: 12.5px; margin-left: 8px; }
.input, .select, .textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--card); outline: none; transition: border-color .12s, background .12s; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); background: #FBFAF7; }
.input::placeholder, .textarea::placeholder { color: #A8A296; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.textarea.code { font-family: var(--mono); font-size: 13px; min-height: 220px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--muted); }
.search .input { padding-left: 38px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 12.5px; color: var(--muted); }
.err { color: var(--bad); font-size: 13.5px; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: 20px; }
.pad-lg { padding: 28px; }
a.card, .card.link { text-decoration: none; transition: border-color .15s, background .15s; }
a.card:hover, .card.link:hover { border-color: var(--ink); background: #FAF9F5; }
/* ASCII frame: dashed rules with + corners, like a terminal receipt */
.ascii { position: relative; background: transparent; border: 1px dashed var(--line-2); border-radius: 0; }
.ascii::before, .ascii::after { content: "+"; position: absolute; top: -10px; font-family: var(--mono); font-size: 13px; line-height: 1; color: var(--muted); background: var(--bg); padding: 2px 0; }
.ascii::before { left: -5px; } .ascii::after { right: -5px; }
.panel-title { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
.panel-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.panel-title .dot.off { background: var(--ink); }
.leader { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.leader .fill { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--line-2); transform: translateY(-4px); }
.leader > .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- home ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: stretch; margin-bottom: 48px; }
.intro h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -.025em; font-weight: 500; }
.mark { color: inherit; }
.intro p { margin: 0; font-size: 16px; color: var(--ink-2); max-width: 30em; }
.intro .cta { margin-top: 26px; display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 36px; border-top: 1px dashed var(--line-2); }
.stat { padding: 16px 16px 4px 0; }
.stat + .stat { padding-left: 16px; border-left: 1px dashed var(--line-2); }
.stat b { display: block; font-size: clamp(32px, 3.6vw, 48px); line-height: 1; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.dropviz { position: relative; min-height: 380px; background: var(--dark); border-radius: var(--r); overflow: hidden; }
.dropviz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dropviz .tag { position: absolute; left: 14px; bottom: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--on-dark); background: rgba(29, 29, 29, .8); padding: 3px 8px; border-radius: 3px; }
.toolbar { display: grid; gap: 12px; margin-bottom: 20px; }
.toolbar .row.top-row { gap: 10px; }
.toolbar .search { flex: 1; min-width: 220px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.015em; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.skill-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 14px; min-height: 216px; }
.skill-card .kind { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.skill-card h3 { margin: 4px 0 0; font-size: 18px; line-height: 1.35; font-weight: 500; letter-spacing: -.01em; }
.skill-card p { margin: 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.skill-card .foot { margin-top: auto; display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 12px; border-top: 1px dashed var(--line-2); }
.skill-card .dl { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.skill-card .dl svg, .pending-dot svg { width: 14px; height: 14px; }
.rank { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--ink); }
.rank::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.rank.r2::before, .rank.r3::before { background: var(--ink); }
.pending-dot { display: inline-flex; align-items: center; gap: 4px; }
.aside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.aside-list li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; line-height: 1.5; min-width: 0; }
.aside-list a { text-decoration: none; }
.aside-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.aside-list .no { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 18px; flex: none; }
.lb { display: grid; grid-template-columns: 22px 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.lb .no { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lb b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .muted { font-family: var(--mono); font-size: 12px; }
.lb + .lb { margin-top: 10px; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--line-2); }
.empty img { width: 40px; margin: 0 auto 16px; }
.empty h3 { margin: 0 0 6px; font-size: 19px; font-weight: 500; }
.empty p { margin: 0 0 20px; color: var(--muted); }

/* ---------- detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; margin-bottom: 22px; color: var(--ink-2); }
.back:hover { color: var(--ink); }
.back svg { width: 15px; height: 15px; transition: transform .15s var(--ease); }
.back:hover svg { transform: translateX(-3px); }
.hero-card { padding: 4px 0 26px; margin-bottom: 26px; background: transparent; border: 0; border-bottom: 1px dashed var(--line-2); border-radius: 0; }
.hero-card h1 { margin: 14px 0 10px; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.1; font-weight: 500; letter-spacing: -.025em; }
.hero-card .sum { font-size: 16.5px; color: var(--ink-2); margin: 0 0 18px; max-width: 42em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); align-items: center; }
.meta b { color: var(--ink); font-weight: 500; }
.tabs { display: flex; gap: 4px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; color: var(--muted); margin-bottom: -1px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .n { font-size: 11px; margin-left: 6px; padding: 0 5px; border-radius: 3px; background: var(--grey); color: var(--ink); }
.split.detail { grid-template-areas: "hero side" "body side"; grid-template-rows: auto 1fr; row-gap: 26px; }
.split.detail > .hero-card { grid-area: hero; margin-bottom: 0; }
.split.detail > .detail-body { grid-area: body; min-width: 0; }
.split.detail > .side { grid-area: side; align-self: stretch; }
.dlbox { padding: 22px 20px 20px; position: sticky; top: 120px; }
.dlbox .big { font-size: 72px; font-weight: 500; line-height: .95; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.dlbox .lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: 10px 0 20px; }
.dl-list { display: grid; gap: 2px; margin-bottom: 14px; }
.dlrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 16px; gap: 2px 10px; align-items: center; padding: 9px 8px; margin: 0 -8px; text-decoration: none; border-radius: 3px; transition: background .12s, color .12s; }
.dlrow .nm { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dlrow .nm b { font-weight: 500; white-space: nowrap; }
.dlrow .nm .fill { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--line-2); transform: translateY(-4px); }
.dlrow .sub { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dlrow .older { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.dlrow .older::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); flex: none; }
.dlrow:hover .older { color: var(--on-dark-2); }
.dlrow:hover { background: var(--ink); color: var(--on-dark); }
.dlrow:hover .sub { color: var(--on-dark-2); }
.dlrow:hover .fill { border-color: #555; }
.dlbtn { width: 100%; }
.facts { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--line-2); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; font-size: 13px; }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding-top: 1px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* markdown */
.md { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; color: var(--ink); }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { line-height: 1.3; margin: 1.6em 0 .5em; font-weight: 500; letter-spacing: -.01em; }
.md h1 { font-size: 24px; } .md h2 { font-size: 20px; } .md h3 { font-size: 17px; }
.md code { font-family: var(--mono); font-size: .86em; background: var(--grey); padding: 1px 5px; border-radius: 3px; }
.md pre { background: var(--dark); color: var(--on-dark); padding: 14px 16px; border-radius: var(--r); overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md blockquote { margin: 1em 0; padding: 4px 16px; border-left: 2px solid var(--signal); color: var(--ink-2); }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md th { font-family: var(--mono); font-size: 12px; text-transform: uppercase; font-weight: 400; background: var(--bg-2); }
.md a { text-underline-offset: 3px; }
.md img { border-radius: var(--r); }
.md hr { border: 0; border-top: 1px dashed var(--line-2); }

/* timeline: changelog as a ledger */
.tl { position: relative; }
.tl-item { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px dashed var(--line-2); }
.tl-item:first-child { border-top: 0; padding-top: 0; }
.tl-ver { display: grid; gap: 6px; align-content: start; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tl-ver .ver { justify-self: start; font-size: 13px; }
.tl-item.latest .tl-ver .now { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.tl-card { min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; }
.tl-head b { font-weight: 500; }
.tl-head .mono { font-size: 12px; }
.tl-files { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 12px; border-top: 1px solid var(--line); }
.tl-file { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tl-file a { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; padding: 3px 8px; border-radius: 3px; background: var(--grey); }
.tl-file a:hover { background: var(--ink); color: var(--on-dark); }
.tl-file .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-file .muted { font-family: var(--mono); font-size: 12px; }

/* feed */
.day { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; margin: 32px 0 6px; display: flex; align-items: center; gap: 12px; color: var(--ink); }
.day::after { content: ""; flex: 1; border-top: 1px dashed var(--line-2); }
.day:first-child { margin-top: 0; }
.ev { display: grid; grid-template-columns: 56px 28px minmax(0, 1fr); gap: 12px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.ev time { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.ev .bub { width: 28px; height: 28px; border-radius: 4px; background: var(--grey); display: grid; place-items: center; }
.ev .bub svg { width: 15px; height: 15px; }
.ev .bub.k-version_published { background: var(--ink); color: var(--on-dark); }
.ev .bub.k-skill_created { background: var(--ink); color: var(--signal); }
.ev .line { font-size: 14.5px; }
.ev .line a { font-weight: 500; text-underline-offset: 3px; }
.ev .detail { margin-top: 8px; font-size: 14px; color: var(--ink-2); border-left: 1px solid var(--line-2); padding: 2px 0 2px 14px; max-height: 9.6em; overflow: hidden; }

/* ideas */
.sugg { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.sugg + .sugg { margin-top: 0; }
.vote { width: 52px; height: 58px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; display: grid; place-items: center; align-content: center; gap: 2px; cursor: pointer; font-family: var(--mono); font-size: 15px; transition: border-color .12s, background .12s; font-variant-numeric: tabular-nums; }
.vote svg { width: 16px; height: 16px; }
.vote:hover { border-color: var(--ink); }
.vote[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.vote[aria-pressed="true"] svg { color: var(--signal); }
.sugg h3 { margin: 0 0 8px; font-size: 16.5px; line-height: 1.4; font-weight: 500; }
.sugg .body { margin: 8px 0 10px; color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }
.sugg .reply { margin-top: 10px; padding: 2px 0 2px 14px; border-left: 2px solid var(--signal); font-size: 13.5px; color: var(--ink-2); }
.sugg .reply b { font-weight: 500; color: var(--ink); }
.manage { margin-top: 12px; }
.manage summary { cursor: pointer; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.manage .grid2 { margin-top: 10px; }
.status-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sum-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line-2); font-size: 13.5px; }
.sum-row:first-of-type { border-top: 0; }
.sum-row a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-row a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bar { height: 4px; background: var(--grey); overflow: hidden; grid-column: 1 / -1; }
.bar i { display: block; height: 100%; background: var(--ink); }

/* upload */
.drop { border: 1px dashed var(--line-2); background: transparent; padding: 36px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--card); }
.drop img { width: 34px; margin: 0 auto 12px; }
.drop b { display: block; font-size: 17px; font-weight: 500; margin-bottom: 4px; }
.drop .muted { font-size: 13px; }
.flist { display: grid; gap: 0; margin-top: 12px; }
.frow { display: grid; grid-template-columns: 32px minmax(0, 1fr) 150px 32px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.frow .fic { width: 32px; height: 32px; border-radius: 4px; background: var(--grey); display: grid; place-items: center; }
.frow .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .hint { font-family: var(--mono); font-size: 11.5px; }
.frow .select { padding: 6px 28px 6px 10px; }
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind-opt { text-align: left; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; cursor: pointer; transition: border-color .12s, background .12s; }
.kind-opt:hover { border-color: var(--ink); }
.kind-opt[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.kind-opt[aria-pressed="true"] span { color: var(--on-dark-2); }
.kind-opt b { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; margin-bottom: 2px; }
.kind-opt[aria-pressed="true"] b::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.kind-opt span { font-size: 13px; color: var(--ink-2); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 8px; }
.progress { height: 6px; background: var(--grey); overflow: hidden; flex: 1; min-width: 160px; }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.checks { display: grid; gap: 0; border-top: 1px solid var(--line); }
.checks label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.checks label b { font-weight: 500; }
.checks input { margin-top: 4px; accent-color: var(--ink); width: 15px; height: 15px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -.025em; font-weight: 500; }
.page-head p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 38em; }
.page-head.with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-side { display: flex; flex-direction: column; padding: 32px clamp(24px, 6vw, 80px); }
.login-side .brand { margin-bottom: auto; }
.login-main { max-width: 520px; padding: 48px 0; }
.login-main h1 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -.03em; font-weight: 500; margin: 0 0 18px; }
.login-main p.lead { margin: 0 0 32px; color: var(--ink-2); font-size: 16px; }
.login-form { display: grid; gap: 16px; }
.login-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.login .dropviz { border-radius: 0; min-height: 100vh; }

/* toast & dialog & moment */
#toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 0; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--dark); color: var(--on-dark); padding: 9px 16px; border-radius: var(--r-sm); font-size: 14px; display: flex; align-items: center; gap: 10px; animation: toast-in .22s var(--ease); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .5); }
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.toast.bad::before { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
dialog { border: 1px solid var(--line-2); border-radius: var(--r); padding: 24px; width: min(92vw, 420px); background: var(--bg); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); }
dialog h3 { font-weight: 500; }
dialog::backdrop { background: rgba(29, 29, 29, .35); }
.moment { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(241, 238, 231, .82); pointer-events: none; animation: fade .2s both; }
.moment .box { background: var(--dark); color: var(--on-dark); font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; padding: 18px 22px; border-radius: var(--r); min-width: 300px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6); }
.moment .box b { display: flex; align-items: center; gap: 10px; font-weight: 400; margin-bottom: 12px; }
.moment .meter { white-space: pre; color: var(--on-dark-2); }
.moment .meter i { font-style: normal; color: var(--on-dark); }
@keyframes fade { from { opacity: 0; } }
.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--bg-2), #EEEBE4, var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .split, .split.wide-aside { grid-template-columns: minmax(0, 1fr); }
  .split.detail { grid-template-areas: "hero" "side" "body"; grid-template-rows: auto; }
  .split.detail > .side { align-self: start; }
  .dlbox { position: relative; top: auto; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dropviz { min-height: 240px; }
  .capsule { width: 460px; }
}
@media (max-width: 860px) {
  .top { padding: 10px 0; }
  .top .wrap { grid-template-columns: 1fr auto; row-gap: 10px; }
  .capsule { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .nav { overflow-x: auto; }
  .top .btn.upload-btn span { display: none; }
  .top .btn.upload-btn { padding: 0 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px dashed var(--line-2); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .dropviz { min-height: 220px; order: -1; }
  .login-side { min-height: auto; }
  .login-main { padding: 36px 0; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  main.view { padding-top: 22px; }
  .grid2, .kind-switch { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 32px minmax(0, 1fr) 32px; }
  .frow .select { grid-column: 2 / 4; }
  .me .name { display: none; }
  .me { padding: 0 5px; }
  .form-actions .btn { width: 100%; }
  .sugg { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .vote { width: 44px; height: 52px; }
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tl-ver { display: flex; align-items: center; gap: 10px; }
  .tl-file { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 10px; }
  .tl-file > .pico { grid-row: 1 / 3; }
  .tl-file > .muted { grid-column: 2; grid-row: 2; font-size: 11.5px; }
  .tl-file > a { grid-column: 3; grid-row: 1 / 3; }
  .ev { grid-template-columns: 28px minmax(0, 1fr); }
  .ev time { grid-column: 2; grid-row: 1; padding: 0; line-height: 1.2; }
  .ev .bub { grid-column: 1; grid-row: 1 / 3; }
  .ev > div { grid-column: 2; grid-row: 2; min-width: 0; }
  .dlbox .big { font-size: 60px; }
  .pad-lg { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
