/* wheelroost 设计系统 v2 —— 依据 Figma 设计稿（doc/design/20261027/reference/）
   色值/字号/字体全部来自 agent 交付清单；布局按 1x PNG 像素扫描校准。
   有意差异（功能 > 稿）：轮盘为真实可交互 canvas；编辑器保留 textarea 批量编辑
   （稿为逐行输入），视觉口径与稿对齐。 */

:root {
  --paper: #FAF7F0;
  --ink: #182D3D;
  --muted: #61707A;
  --coral: #E0533D;
  --coral-dark: #B83E2C;
  --link: #2B67B0; /* AA 覆盖：稿 #3D8BE0 在纸/白底 3.3-3.5:1 不达标 */
  --coral-tint: #F8E6DE;
  --sky: #3D8BE0;
  --gold: #F3C65D;
  --pale-blue: #E7EFF8;
  --line: #DEDCD4;
  --white: #FFFFFF;
  --radius: 16px;
  --radius-sm: 12px;
  --content: 1296px; /* 1440 - 2×72 */
}

/* 字体自托管（红线：禁第三方字体外链） */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/latin-800-normal.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin-800-normal.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { max-width: var(--content); margin: 0 auto; padding: 0 24px; }
h1, h2, h3, .display {
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(2.4rem, 5.7vw, 5.125rem); font-weight: 800; } /* 82px */
h2 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); font-weight: 800; }    /* 40px */
p { margin: 0 0 1em; }
a { color: var(--link); }

.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--coral-dark); margin: 0 0 14px;
}
.lede { font-size: 20px; color: var(--muted); max-width: 34em; }

/* ---- 导航（清单：wordmark 26px / 链接 14px / 右侧 always-free 12px） ---- */
.nav {
  display: flex; align-items: center; gap: 28px;
  max-width: var(--content); margin: 0 auto; padding: 22px 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Manrope', sans-serif; font-size: 26px; font-weight: 800;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.nav-brand .mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--coral); color: var(--white); border-radius: 50%;
  font-size: 20px; font-weight: 800;
}
.nav nav { display: flex; gap: 26px; margin-left: 12px; }
.nav nav a {
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 6px 2px;
}
.nav nav a:hover { color: var(--coral); }
.nav .free-chip {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  background: var(--white);
}
.crumbs { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.crumbs a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

/* ---- 首页 hero（稿：左文右轮，纸本底） ---- */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px;
  align-items: center; padding: 56px 0 72px;
}
.hero h1 { margin-bottom: 18px; }
.hero .lede { margin-bottom: 30px; }
.hero-wheel { text-align: center; }
.hero-wheel .wheel-canvas { width: min(42vw, 440px); height: auto; aspect-ratio: 1; }
.hero-note { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---- 按钮 ---- */
button, .btn {
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  min-height: 44px;
}
button:hover { border-color: var(--ink); }
button:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary {
  background: var(--coral); border-color: var(--coral); color: var(--white);
  font-size: 22px; font-family: 'Manrope', sans-serif; font-weight: 800;
  letter-spacing: .06em; padding: 16px 48px; border-radius: 999px;
}
.btn-primary:hover { background: var(--coral-dark); border-color: var(--coral-dark); }

/* ---- 主题卡片区（稿：白底带，4 列 306px 卡， eyebrow10/title22/desc14） ---- */
.section-pad { padding: 72px 0; }
.band-white { background: var(--white); }
.theme-head { margin-bottom: 40px; }
.theme-head p.sub { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.theme-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.theme-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 26px 24px; border-radius: var(--radius); text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  min-height: 190px; transition: transform .15s ease, box-shadow .15s ease;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(24,45,61,.10); }
.theme-card .t-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--coral-dark); text-transform: uppercase; }
.theme-card .t-title { font-family: 'Manrope', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.theme-card .t-desc { font-size: 14px; color: #54616C; line-height: 1.45; }
.theme-card .t-arrow { margin-top: auto; font-size: 22px; color: var(--ink); }
.theme-card:nth-child(4n+1) { background: var(--coral-tint); border-color: transparent; }
.theme-card:nth-child(4n) { background: var(--pale-blue); border-color: transparent; }

/* ---- 特性区（稿：墨蓝深带，3 块，title28/desc17） ---- */
.band-ink { background: var(--ink); color: var(--white); }
.band-ink .eyebrow { color: var(--gold); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.feature h3 { font-size: 28px; font-weight: 700; margin: 14px 0 10px; color: var(--white); }
.feature p { font-size: 17px; color: #C7D2DA; }
.feature .f-icon { font-size: 32px; }
.feature a { color: var(--gold); font-weight: 600; }

/* ---- 工具页两栏（稿：左轮右控制面板） ---- */
.tool-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px;
  align-items: start; padding: 40px 0 64px;
}
.wheel-stage { text-align: center; position: sticky; top: 20px; }
.wheel-stage .wheel-canvas { width: min(46vw, 520px); height: auto; aspect-ratio: 1; }
.wheel-result {
  font-family: 'Manrope', sans-serif; font-size: 20px; font-weight: 800;
  min-height: 1.6em; margin: 14px 0 4px;
}
.wheel-result:empty::before { content: 'The wheel says: …'; color: var(--muted); font-weight: 400; font-family: 'Inter', sans-serif; font-size: 17px; }
.wheel-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.wheel-actions button:not(.btn-primary) { font-size: 14px; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 20px; margin-bottom: 14px; }
.panel .row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.panel .row .lbl { flex: 1; font-weight: 600; }
.panel .row input[type=number] { width: 64px; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.panel .row .rm { border: none; background: none; color: var(--muted); font-size: 16px; padding: 4px 8px; min-height: 32px; }
.panel .row .rm:hover { color: var(--coral); }
.panel .panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.panel .toggles { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; font-size: 14px; }
.panel .toggles label { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }

.wheel-editor { margin: 18px 0; }
.wheel-editor summary { font-weight: 700; cursor: pointer; font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.wheel-editor textarea {
  width: 100%; font: inherit; font-size: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 10px;
}
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.editor-actions select { font: inherit; font-size: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.hint { font-size: 14px; color: var(--muted); }
.share-status { min-height: 1.4em; font-weight: 600; color: var(--link); font-size: 14px; }
.wheel-list { margin-top: 18px; }
.wheel-list h2 { font-size: 20px; }
.wheel-list ul { columns: 2; padding-left: 1.2em; font-size: 14px; color: var(--muted); }

/* ---- 文章带（稿：淡蓝底） ---- */
.band-blue { background: var(--pale-blue); }
.article-cols { max-width: 760px; }
.article-cols p { font-size: 17px; }
.article-cols a, .lede a, .guide-body a, .related a, .panel-slices a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* ---- FAQ（稿：首条展开式） ---- */
.faq details {
  margin: 0 0 12px; padding: 0; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.faq summary {
  font-weight: 600; cursor: pointer; font-size: 17px;
  padding: 18px 22px; list-style: none; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; font-size: 22px; color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-a { padding: 16px 22px; font-size: 14px; color: var(--muted); }

/* ---- 指南页（稿：编辑长文 + 侧栏） ---- */
.guide-hero { padding: 56px 0 40px; max-width: 760px; }
.guide-hero .byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 14px; }
.guide-hero .byline .avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--coral); color: var(--white); font-weight: 800; font-size: 17px;
}
.guide-hero .byline .meta { color: var(--muted); font-size: 12px; }
.guide-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding-bottom: 72px; }
.guide-side { position: sticky; top: 24px; align-self: start; }
.guide-side .side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); margin-bottom: 18px; }
.guide-side .side-box h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.guide-side ol { list-style: none; margin: 0; padding: 0; }
.guide-side ol li { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; }
.guide-side ol li .n { color: var(--coral-dark); font-weight: 800; font-size: 12px; min-width: 20px; }
.guide-side ol li a { color: var(--ink); text-decoration: none; }
.guide-side ol li a:hover { color: var(--coral-dark); }
.guide-side .cta-box { background: var(--coral-tint); border-color: transparent; }
.guide-side .cta-box h3 { font-size: 20px; margin-bottom: 8px; }
.guide-side .cta-box p { font-size: 14px; color: var(--ink); }
.guide-body h2 { margin-top: 48px; }
.guide-body p { font-size: 17px; max-width: 44em; }
.pull-quote {
  border-left: 4px solid var(--coral); padding: 18px 24px; margin: 36px 0;
  background: var(--white); border-radius: 0 var(--radius) var(--radius) 0;
}
.pull-quote p { font-family: 'Manrope', sans-serif; font-size: 28px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.pull-quote .pq-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--coral-dark); font-weight: 800; }
.compare { width: 100%; border-collapse: collapse; margin: 24px 0 8px; font-size: 14px; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.compare th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
.compare tr:last-child td { border-bottom: none; }
.closing { font-size: 14px; color: var(--muted); margin-top: 40px; }

/* ---- 页脚（清单：14px 链接 / 12px 标语） ---- */
.footer {
  max-width: var(--content); margin: 0 auto; padding: 40px 24px 56px;
  display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center;
  font-size: 14px; color: var(--muted);
}
.footer .f-brand { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 20px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.footer .f-brand .mark { display: grid; place-items: center; width: 26px; height: 26px; background: var(--coral); color: var(--white); border-radius: 50%; font-size: 15px; }
.footer nav { display: flex; gap: 22px; margin-left: auto; }
.footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer nav a:hover { color: var(--coral-dark); }
.footer .f-tag { width: 100%; font-size: 12px; color: var(--muted); }
.footer a.mail { color: var(--link); text-decoration: none; }

/* ---- embed / 其它 ---- */
.related { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.related h2 { font-size: 20px; }
.related a { color: var(--link); font-weight: 600; }
.panel-slices { list-style: none; margin: 0; padding: 0; }
.panel-slices li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.panel-slices li small { color: var(--muted); margin-left: auto; font-size: 12px; }
.embed-code pre { background: var(--white); border: 1px solid var(--line); padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; }
body.embed-mode .nav, body.embed-mode .footer, body.embed-mode .wheel-editor, body.embed-mode .wheel-list { display: none; }
.embed-credit { font-size: 14px; margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 16px 0; }

/* ---- 响应式 ---- */
@media (max-width: 1020px) {
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; gap: 28px; }
  .tool-hero { grid-template-columns: 1fr; }
  .wheel-stage { position: static; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-side { position: static; }
  .hero { grid-template-columns: 1fr; padding: 32px 0 48px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .theme-grid { grid-template-columns: 1fr; }
  .wheel-list ul { columns: 1; }
  .nav { flex-wrap: wrap; gap: 14px; }
  .nav .free-chip { display: none; }
  .btn-primary { font-size: 18px; padding: 14px 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
