/* ideas.undusk.com · 未夜建议 · 亮色纸面
 * 变量块抄自官网 assets/style.css（「纸 + 墨 + 灯」）；组件为本站服务端渲染的页面专写。
 * 约束：零外部字体 / CDN、不引入任何外部样式或远程资源；CSP style-src 'self'，页面零内联样式。
 * 徽标六态：纸系浅底 + 墨字，前置符号由 HTML 给出（aria-hidden），不靠颜色区分。
 * 官方回应块：墨底 #1c1914 浅字 #fffdf8 + 左 3px 琥珀线。
 * 断点：≤1080px 收侧栏；≤640px 单列与 44px 触控目标。
 */

/* ============ tokens ============ */
:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --bg-alt: #efeae1;
  --surface: #ffffff;
  --text: #1c1914;
  --muted: #5c564c;
  --dim: #6d675c;
  --line: rgba(28, 25, 20, 0.12);
  --line-strong: #7a7368;
  --accent: #8a4318;
  --on-accent: #fffdf8;
  --ink: #1c1914;
  --ink-hover: #2c261e;
  --ink-active: #100e0b;
  --ghost-active: #e4ddd2;
  --header-veil: rgba(247, 244, 238, 0.86);
  --selection-tint: rgba(196, 106, 46, 0.25);
  --shadow-menu: 0 8px 24px rgba(28, 25, 20, 0.08);
  --dusk-amber: #c46a2e;
  --dusk-amber-soft: #e0a473;
  --dusk-rose: #cfa9a0;
  --dusk-violet: #8b7fa8;
  --dusk-indigo: #4a4668;
  --paper-deep: #e6dfd2;
  --paper-deeper: #d8cfbf;
  --hairline-dusk: linear-gradient(90deg, rgba(196, 106, 46, 0) 0%, rgba(196, 106, 46, 0.55) 28%, rgba(139, 127, 168, 0.55) 72%, rgba(139, 127, 168, 0) 100%);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .03 .03 .03 0 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
  --radius-sm: 8px;
  --radius: 12px;
  --shell: 1120px;
  --header-h: 72px;
  --tracking-tight: -0.03em;
  --tracking-snug: -0.02em;
  --tracking-wide: 0.08em;
  --font-display: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "Source Han Serif SC", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --dur-fast: 90ms;
  --dur-base: 140ms;
  --dur-slow: 180ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-lift: 0 10px 28px -14px rgba(28, 25, 20, 0.22), 0 2px 6px rgba(28, 25, 20, 0.06);
  --glow: 0 0 0 4px rgba(138, 67, 24, 0.14);
  /* 徽标纸系底色：全部承载墨字 --text，对比度 ≥ 14:1 */
  --badge-received: #efeae1;
  --badge-triaging: #f1e6d4;
  --badge-planned: #e9e5f0;
  --badge-done: #e4ece0;
  --badge-declined: #e8e5e1;
  --badge-merged: #ebe6dc;
  --official-bg: #1c1914;
  --official-fg: #fffdf8;
  --official-muted: #cfc8bc; /* 对 #1c1914 ≈ 11:1 */
  --error: #8a2a1e; /* 对 --bg 7.4:1 */
  --error-bg: #f6e6e2;
  --control-h: 44px;
}

/* ============ base ============ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    var(--noise),
    radial-gradient(120% 56% at 50% -12%, rgba(196, 106, 46, 0.09), rgba(196, 106, 46, 0) 62%);
  background-repeat: repeat, no-repeat;
  background-size: 200px 200px, 100% 900px;
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--selection-tint); }
a { color: inherit; text-decoration: none; transition: color var(--dur-base) var(--ease-out); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
code { font-family: var(--font-mono); font-size: 0.92em; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
main { flex: 1; }

/* ============ a11y ============ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -72px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-accent);
  font-weight: 700;
}
.skip-link:focus,
.skip-link:focus-visible { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#main:focus { outline: none; }

/* ============ header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-veil);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.brand-group { display: inline-flex; align-items: center; gap: 14px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.brand img { width: 32px; height: 32px; border-radius: 8px; transition: transform var(--dur-slow) var(--ease-out); }
.brand:hover img { transform: rotate(-6deg); }
.brand-latin { color: var(--dim); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.site-name {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 15px;
}
.site-name:hover, .site-name[aria-current="page"] { color: var(--text); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px 24px;
  color: var(--muted);
  font-size: 14px;
}
.site-nav > a:not(.button) { display: inline-flex; align-items: center; min-height: 40px; }
.site-nav > a:not(.button):hover { color: var(--text); text-decoration-line: underline; text-underline-offset: 6px; }
.site-nav a[aria-current="page"]:not(.button) {
  color: var(--text);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
/* 产品▾：<details> 原生下拉，无 JS 可用 */
.nav-products { position: relative; }
.nav-products > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  cursor: pointer;
  font-weight: 650;
  color: inherit;
}
.nav-products > summary::-webkit-details-marker { display: none; }
.nav-products > summary::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-products[open] > summary::after { transform: translateY(0.1em) rotate(225deg); }
.nav-products > summary:hover { color: var(--text); }
.nav-products-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  min-width: 240px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}
.nav-products-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.nav-products-list a:hover, .nav-products-list a:focus-visible { background: var(--bg-alt); }
.nav-products-all { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.nav-products-all a { color: var(--muted); font-weight: 500; }

/* ============ 按钮 ============ */
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition:
    color var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.button:active { transform: scale(0.98); }
.button-primary { background: var(--ink); color: var(--on-accent); }
.button-primary:hover { background: var(--ink-hover); box-shadow: var(--glow); }
.button-primary:focus-visible { box-shadow: var(--glow); }
.button-primary:active { background: var(--ink-active); box-shadow: none; }
.button-ghost { border-color: var(--line-strong); background: transparent; }
.button-ghost:hover { background: var(--bg-alt); }
.button-ghost:active { background: var(--ghost-active); }
.button-small { min-height: 40px; padding-inline: 14px; font-size: 13px; border-radius: 8px; }
.button[disabled], .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}
.button.is-done { background: var(--bg-alt); color: var(--text); border-color: var(--line-strong); }

/* ============ 眉题 / 标题 / 页头 ============ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dusk-amber);
  box-shadow: 0 0 0 4px rgba(196, 106, 46, 0.14);
}
.page { padding: 48px 0 88px; }
.page-narrow { max-width: 760px; }
.page-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: 0.01em;
  line-height: 1.25;
  font-weight: 600;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.page-head {
  position: relative;
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 88px;
  height: 2px;
  background: var(--dusk-amber);
}
.page-head .eyebrow { margin-bottom: 12px; }
.page-lede { margin: 0; max-width: 36em; color: var(--muted); font-size: 18px; line-height: 1.6; }
.section-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.section-title a { color: inherit; }
.section-title a:hover { color: var(--accent); }

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 4px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}
.crumbs a { white-space: nowrap; padding-block: 4px; margin-block: -4px; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.crumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 650;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumbs > [aria-hidden="true"] { color: var(--dim); user-select: none; }

/* ============ 首屏 ============ */
.hero { padding: 64px 0 40px; }
.hero h1 {
  margin: 0 0 20px;
  max-width: 24em;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 44px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  font-weight: 600;
  text-wrap: balance;
}
.hero-lede { margin: 0; max-width: 30em; color: var(--muted); font-size: 19px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.section { padding: 40px 0; }
main > .section:last-child { padding-bottom: 88px; }

/* 按产品卡 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.product-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.product-card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: var(--tracking-snug); line-height: 1.35; }
.product-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.product-card .product-facts { margin-top: 10px; color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
}
.text-link > [aria-hidden="true"] { display: inline-block; transition: transform var(--dur-slow) var(--ease-out); }
.product-card:hover .text-link > [aria-hidden="true"] { transform: translateX(4px); }
.product-card .text-link { margin-top: auto; padding-top: 18px; }

/* 最近回应 */
.recent-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.recent-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.recent-title { display: block; font-weight: 650; font-size: 16px; }
.recent-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.recent-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.recent-meta a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.recent-response {
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--dusk-amber);
  color: var(--muted);
  font-size: 14px;
}
.recent-response-mark { display: none; }
.sug-id {
  font-family: var(--font-mono);
  font-size: 0.85em;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.empty {
  margin: 0;
  padding: 36px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ============ 徽标（六态） ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-symbol { font-size: 0.9em; line-height: 1; }
.badge-received { background: var(--badge-received); }
.badge-triaging { background: var(--badge-triaging); }
.badge-planned { background: var(--badge-planned); }
.badge-done { background: var(--badge-done); }
.badge-declined { background: var(--badge-declined); color: var(--muted); }
.badge-merged { background: var(--badge-merged); }
.badge-unknown { background: var(--surface); }
.badge-large { padding: 6px 16px 6px 12px; font-size: 15px; }
.kind-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

/* ============ 列表页 ============ */
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px 64px;
  align-items: start;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.filter-field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.filter-field select { min-width: 140px; }
.filter-bar .button { min-height: var(--control-h); }
.sug-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sug-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.sug-row .badge { align-self: start; margin-top: 2px; }
.sug-title { display: block; font-weight: 650; overflow-wrap: anywhere; }
.sug-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.sug-meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.row-official { color: var(--muted); }
.row-official-dot { color: var(--dusk-amber); }
.unread {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
}
.pager-gap { flex: 0 0 96px; }
.rail { position: sticky; top: calc(var(--header-h) + 36px); display: grid; gap: 14px; }
.rail-title { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-wide); color: var(--dim); }
.rail-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.rail-list:empty { display: none; }
.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin-left: -1px;
  padding: 0 0 0 16px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
}
.rail-list a:hover { color: var(--text); border-left-color: var(--dusk-amber); }

/* ============ 详情 ============ */
.banner {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--dusk-amber);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}
.banner a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
.sug-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.sug-origin { margin: 0; color: var(--muted); font-size: 15px; }
.prose { max-width: 68ch; font-size: 17px; line-height: 1.8; }
.prose p { margin: 0 0 1em; color: var(--text); overflow-wrap: anywhere; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  margin: 44px 0 14px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.prose h2:first-child { margin-top: 0; }
.prose li { color: var(--muted); }
.prose li + li { margin-top: 6px; }
.prose a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sug-body { margin: 0 0 28px; }
.follow-form { margin: 0 0 40px; }
.follow-count { font-variant-numeric: tabular-nums; }
.sug-timeline { margin-bottom: 40px; }
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
  border-left: 1px solid var(--line-strong);
}
.timeline > li { position: relative; padding: 0 0 20px; color: var(--muted); font-size: 15px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-strong);
}
.timeline > .tl-response::before { border-color: var(--dusk-amber); background: var(--dusk-amber); }
.tl-mark { color: var(--text); }
.tl-note { color: var(--text); }
.official {
  padding: 16px 20px;
  border-left: 3px solid var(--dusk-amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--official-bg);
  color: var(--official-fg);
}
.official-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 8px; color: var(--official-muted); font-size: 13px; }
.official-label { color: var(--dusk-amber-soft); font-weight: 700; letter-spacing: var(--tracking-wide); }
.official-by { color: var(--official-fg); font-weight: 650; }
.official-body { font-size: 16px; line-height: 1.75; }
.official-body p { margin: 0 0 0.8em; overflow-wrap: anywhere; }
.official-body p:last-child { margin-bottom: 0; }
.official a { color: var(--official-fg); text-decoration: underline; text-decoration-color: var(--dusk-amber-soft); text-underline-offset: 3px; }
.sug-foot { padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.sug-foot p { margin: 0; }
.sug-foot a, .not-found-contact a, .mine-foot a, .feed-link a, .mine-link a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============ 表单 ============ */
.submit-form { display: grid; gap: 22px; max-width: 640px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend, .field-label { font-weight: 650; font-size: 15px; }
.field > legend { padding: 0; margin-bottom: 6px; }
.req { color: var(--accent); }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
select { padding-right: 32px; }
textarea { min-height: 200px; resize: vertical; line-height: 1.6; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.field-invalid input, .field-invalid select, .field-invalid textarea { border-color: var(--error); }
.hint { margin: 0; color: var(--dim); font-size: 13px; line-height: 1.55; }
.hint .count { margin-left: 8px; font-variant-numeric: tabular-nums; color: var(--muted); }
.hint .count.is-over, .hint .count.is-under { color: var(--error); font-weight: 650; }
.field-error { margin: 0; color: var(--error); font-size: 13px; font-weight: 650; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 0 4px;
  font-weight: 500;
  cursor: pointer;
}
.radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.field-locked .prefill-note {
  display: flex;
  align-items: center;
  min-height: var(--control-h);
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 15px;
}
.field-locked .prefill-note strong { color: var(--text); margin-inline: 4px; }
/* 蜜罐：视觉与读屏都不可达；勿用 display:none 以外的取巧（部分机器人会跳过 display:none，但这里就是要它们填） */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-errors {
  padding: 14px 18px;
  border: 1px solid var(--error);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--error-bg);
  color: var(--text);
}
.form-errors p { margin: 0 0 6px; font-weight: 650; }
.form-errors ul { margin: 0; padding-left: 20px; }
.form-errors a { color: var(--error); text-decoration: underline; text-underline-offset: 3px; }
.notice {
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--dusk-amber);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}
.notice strong { color: var(--text); }
.privacy-note {
  margin: 4px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.similar {
  margin-top: -8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
}
.similar-title { margin: 0 0 6px; color: var(--muted); font-weight: 650; }
.similar ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.similar a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============ 成功 / 我的 / 已完成 / 关于 ============ */
.mine-link code {
  display: inline-block;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.mine-link .button { vertical-align: middle; margin-left: 8px; }
.mine-group { margin-bottom: 40px; }
.mine-foot { margin: 0; color: var(--muted); font-size: 14px; }
.changelog-group { margin-bottom: 44px; }
.changelog-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.changelog-list > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.changelog-list .sug-meta { grid-column: 3; color: var(--dim); }
.changelog-note {
  grid-column: 2 / -1;
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--dusk-amber);
  color: var(--muted);
  font-size: 14px;
}
.feed-link { margin: 12px 0 0; font-size: 13px; color: var(--dim); }
.about-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 15px; }
.about-table th, .about-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--muted); }
.about-table th { color: var(--text); font-size: 13px; font-weight: 700; }
.about-table td:first-child { color: var(--text); white-space: nowrap; }
.status-list { margin: 0 0 16px; display: grid; gap: 10px; }
.status-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.status-list dt, .status-list dd { margin: 0; }
.status-list dd { color: var(--muted); }

/* ============ footer ============ */
.site-footer {
  position: relative;
  margin-top: auto;
  padding: 28px 0 36px;
  background: var(--bg-alt);
  color: var(--dim);
  font-size: 13px;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hairline-dusk);
}
.footer-line { margin: 0; line-height: 2; }
.footer-line a { color: var(--muted); }
.footer-line a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* ============ @media 1080 ============ */
@media (max-width: 1080px) {
  .page-grid { grid-template-columns: 1fr; }
  .rail { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ @media 640 ============ */
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .shell { width: calc(100% - 32px); margin-inline: auto; }
  .header-inner { padding-block: 8px; gap: 8px 16px; }
  .brand-latin { display: none; }
  .site-name { display: none; }
  .site-nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 4px 16px; }
  .site-nav > a, .nav-products > summary { white-space: nowrap; flex-shrink: 0; }
  .site-nav > a:not(.button), .nav-products > summary { min-height: 44px; }
  .nav-products-list {
    position: static;
    min-width: 0;
    margin-top: 4px;
    padding: 4px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .nav-products { flex: 1 1 100%; order: 10; }
  .hero { padding: 40px 0 28px; }
  .hero h1 { font-size: clamp(26px, 7vw, 32px); }
  .hero-lede { font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .page { padding: 32px 0 64px; }
  .page-title { font-size: clamp(24px, 6.5vw, 30px); }
  .page-head { margin-bottom: 24px; padding-bottom: 20px; }
  .page-lede { font-size: 16px; }
  .prose { font-size: 16px; line-height: 1.75; }
  .section { padding: 28px 0; }
  .product-grid { grid-template-columns: 1fr; gap: 12px; }
  .product-card { padding: 18px 18px 16px; }
  .filter-bar { padding: 12px 14px; }
  .filter-field { flex: 1 1 40%; }
  .filter-field select { min-width: 0; width: 100%; }
  .filter-bar .button { flex: 1 1 100%; }
  .sug-row { grid-template-columns: 1fr; }
  .sug-meta { grid-column: 1; }
  .changelog-list > li { grid-template-columns: 1fr; }
  .changelog-list .sug-meta, .changelog-note { grid-column: 1; }
  .pager .button { flex: 1 1 auto; }
  .pager-gap { flex: 1 1 auto; }
  .official { padding: 14px 14px; }
  .timeline { padding-left: 16px; }
  .timeline > li::before { left: -21px; }
  .status-list > div { grid-template-columns: 1fr; gap: 4px; }
  .about-table { font-size: 14px; }
  .about-table th, .about-table td { padding: 8px 6px; }
  .about-table td:first-child { white-space: normal; }
  .mine-link .button { display: flex; margin: 8px 0 0; }
  .form-actions .button { width: 100%; }
  .footer-line a { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs a, .sug-title, .recent-title, .rail-list a, .text-link { min-height: 44px; display: inline-flex; align-items: center; }
  .sug-title, .recent-title { display: flex; }
}

/* ============ 偏好媒体 ============ */
@media (forced-colors: active) {
  .eyebrow::before, .page-head::after, .timeline > li::before { background: CanvasText; }
  .official { border: 1px solid CanvasText; border-left-width: 3px; }
  .badge { border-color: CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .brand:hover img,
  .product-card:hover,
  .product-card:hover .text-link > [aria-hidden="true"],
  .button:active { transform: none; }
}
