:root {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #d9dee7;
  --line-dark: #bbc3cf;
  --paper: #ffffff;
  --canvas: #f5f7fa;
  --soft: #edf1f5;
  --red: #d33b32;
  --red-dark: #a92d27;
  --blue: #175cd3;
  --green: #16794d;
  --amber: #9a6700;
  --purple: #6941c6;
  --navy: #101828;
  --radius: 6px;
  --shadow: 0 10px 28px rgba(16, 24, 40, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-dark); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.section { padding: 50px 0; }
.section-white { background: var(--paper); }
.section-soft { background: var(--soft); }

.topbar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(10px); }
.topbar-inner { min-height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; font-size: 19px; font-weight: 800; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 5px; color: var(--red); font-family: var(--mono); font-size: 11px; }
.version { padding: 2px 6px; border-radius: 3px; background: #feeceb; color: var(--red-dark); font-size: 10px; font-weight: 800; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a { min-height: 39px; display: inline-flex; align-items: center; padding: 0 10px; border-bottom: 2px solid transparent; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.nav a:hover, .nav a.active { border-bottom-color: var(--red); color: var(--ink); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

.hero { padding: 54px 0 42px; border-bottom: 1px solid var(--line); background: var(--paper); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr); gap: 54px; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--blue); font-size: 12px; font-weight: 800; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--red); }
.hero h1 { margin: 0; max-width: 720px; font-size: 43px; line-height: 1.26; letter-spacing: 0; }
.hero p { max-width: 680px; margin: 16px 0 0; color: var(--ink-2); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid var(--line-dark); border-radius: 5px; background: var(--paper); cursor: pointer; font-size: 13px; font-weight: 750; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { border-color: var(--navy); background: var(--navy); color: var(--paper); }
.btn-primary:hover { background: #263247; color: var(--paper); }
.btn-danger { border-color: var(--red); background: var(--red); color: var(--paper); }
.btn-danger:hover { background: var(--red-dark); color: var(--paper); }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 12px; }

.score-visual { border-top: 4px solid var(--ink); border-bottom: 1px solid var(--line); padding: 18px 0; }
.visual-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.visual-head strong { font-size: 14px; }
.visual-head span { color: var(--red); font-family: var(--mono); font-size: 11px; }
.mini-score-row { display: grid; grid-template-columns: 88px 1fr 30px; align-items: center; gap: 10px; padding: 7px 0; font-size: 12px; }
.mini-score-row span:last-child { text-align: right; font-family: var(--mono); }
.mini-track { height: 7px; overflow: hidden; background: var(--soft); }
.mini-track i { height: 100%; display: block; background: var(--blue); }
.mini-score-row:nth-child(3) i { background: var(--green); }
.mini-score-row:nth-child(4) i { background: var(--purple); }
.mini-score-row:nth-child(5) i { background: var(--amber); }
.mini-score-row:nth-child(6) i { background: var(--red); }
.visual-total { display: flex; align-items: end; justify-content: space-between; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.visual-total strong { font-size: 30px; line-height: 1; }
.visual-total span { color: var(--muted); font-size: 11px; }

.keyword-band { border-bottom: 1px solid var(--line); background: var(--paper); }
.keyword-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 18px 0; }
.keyword { min-height: 68px; display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); }
.keyword:hover { border-color: var(--line-dark); box-shadow: 0 5px 16px rgba(16,24,40,.06); }
.keyword-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 4px; background: #eaf1ff; color: var(--blue); }
.keyword:nth-child(2) .keyword-icon { background: #e8f5ee; color: var(--green); }
.keyword:nth-child(3) .keyword-icon { background: #fff2da; color: var(--amber); }
.keyword:nth-child(4) .keyword-icon { background: #f1ecff; color: var(--purple); }
.keyword:nth-child(5) .keyword-icon { background: #feeceb; color: var(--red-dark); }
.keyword:nth-child(6) .keyword-icon { background: var(--soft); color: var(--ink-2); }
.keyword-icon svg { width: 16px; height: 16px; }
.keyword strong { display: block; font-size: 13px; line-height: 1.35; }
.keyword small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: 24px; line-height: 1.4; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.more { color: var(--blue); font-size: 12px; font-weight: 750; white-space: nowrap; }
.demo-banner { margin-bottom: 20px; padding: 12px 15px; border-left: 4px solid var(--amber); background: #fff8e5; color: #634700; font-size: 12px; }

.home-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 34px; }
.station-list { display: grid; gap: 14px; }
.station-card { display: grid; grid-template-columns: 46px 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.station-card:hover { border-color: var(--line-dark); box-shadow: var(--shadow); }
.station-rank { display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--line); background: var(--soft); color: var(--red); font-family: var(--mono); font-size: 15px; font-weight: 800; }
.station-main { padding: 18px; }
.station-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.station-head h3 { margin: 5px 0 0; font-size: 18px; line-height: 1.4; }
.demo-label { color: var(--amber); font-size: 10px; font-weight: 800; }
.score-badge { width: 58px; height: 58px; display: grid; place-content: center; flex: 0 0 auto; border: 2px solid var(--grade); border-radius: 50%; text-align: center; }
.score-badge strong { color: var(--grade); font-family: var(--mono); font-size: 19px; line-height: 1; }
.score-badge span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.station-main > p { margin: 7px 70px 10px 0; color: var(--ink-2); font-size: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list span, .tag-list a, .tag-list i { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 3px; background: var(--canvas); color: var(--ink-2); font-size: 10px; font-style: normal; }
.station-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.station-foot a { color: var(--blue); font-weight: 700; }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; }
.badge-green { background: #e8f5ee; color: var(--green); }
.badge-amber { background: #fff2da; color: var(--amber); }
.badge-red { background: #feeceb; color: var(--red-dark); }
.badge-gray { background: var(--soft); color: var(--muted); }
.badge-blue { background: #eaf1ff; color: var(--blue); }

.logic-panel { padding-top: 16px; border-top: 4px solid var(--ink); }
.logic-panel h3 { margin: 0 0 12px; font-size: 16px; }
.logic-step { display: grid; grid-template-columns: 32px 1fr; gap: 11px; padding: 13px 0; border-top: 1px solid var(--line); }
.logic-step span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 10px; }
.logic-step strong { display: block; font-size: 12px; }
.logic-step small { display: block; color: var(--muted); font-size: 10px; }

.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.story-card { min-height: 250px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.story-card:hover { transform: translateY(-2px); border-color: var(--line-dark); box-shadow: var(--shadow); }
.story-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.story-meta span:first-child { color: var(--blue); font-weight: 800; }
.story-card h3 { margin: 13px 0 8px; font-size: 18px; line-height: 1.48; }
.story-card p { margin: 0 0 16px; color: var(--ink-2); font-size: 12px; line-height: 1.7; }
.story-card .tag-list { margin-top: auto; }

.page-hero { padding: 45px 0 32px; border-bottom: 1px solid var(--line); background: var(--paper); }
.page-hero h1 { margin: 0; max-width: 820px; font-size: 36px; line-height: 1.35; }
.page-hero p { max-width: 760px; margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; width: min(320px, 100%); margin-left: auto; }
.search input { width: 100%; height: 40px; padding: 0 40px 0 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); outline: none; }
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,92,211,.12); }
.search svg { position: absolute; right: 12px; top: 11px; width: 18px; height: 18px; color: var(--muted); }
.chip-set { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-button { min-height: 33px; padding: 0 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); cursor: pointer; font-size: 11px; }
.chip-button:hover, .chip-button.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.result-count { margin-bottom: 15px; color: var(--muted); font-size: 11px; }
.empty { grid-column: 1 / -1; padding: 50px 20px; border: 1px solid var(--line); background: var(--paper); text-align: center; }
.empty p { color: var(--muted); }

.method-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 45px; }
.method-list { border-top: 3px solid var(--ink); }
.method-row { display: grid; grid-template-columns: 42px 1fr 60px; align-items: center; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.method-index { color: var(--red); font-family: var(--mono); font-weight: 800; }
.method-row strong { display: block; font-size: 14px; }
.method-row p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.method-weight { text-align: right; color: var(--blue); font-family: var(--mono); font-size: 12px; font-weight: 800; }
.rule-panel { padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--red); background: var(--paper); }
.rule-panel h2 { margin: 0 0 10px; font-size: 17px; }
.rule-panel p, .rule-panel li { color: var(--ink-2); font-size: 11px; }
.rule-panel ul { margin: 0; padding-left: 18px; }
.rule-panel li { margin-bottom: 7px; }
.grade-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 25px; }
.grade-item { padding: 15px; border-top: 4px solid var(--grade); background: var(--paper); }
.grade-item strong { display: block; color: var(--grade); font-size: 24px; }
.grade-item span, .grade-item small { display: block; color: var(--muted); font-size: 10px; }
.grade-item small { margin-top: 4px; color: var(--ink-2); }

.detail-intro { display: grid; grid-template-columns: 1fr 130px; gap: 40px; align-items: center; }
.detail-intro h1 { margin: 5px 0; font-size: 36px; }
.detail-intro p { color: var(--ink-2); }
.hero-score { width: 120px; height: 120px; display: grid; place-content: center; border: 4px solid var(--grade); border-radius: 50%; text-align: center; }
.hero-score strong { color: var(--grade); font-family: var(--mono); font-size: 39px; line-height: 1; }
.hero-score span { margin-top: 7px; color: var(--muted); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; margin-top: 40px; }
.detail-grid h2, .pros-cons h2 { margin: 0 0 15px; font-size: 20px; }
.score-list { border-top: 3px solid var(--ink); }
.score-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.score-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 7px; }
.score-row strong, .score-row span { font-size: 11px; }
.score-row span { color: var(--muted); font-family: var(--mono); }
.score-track { height: 7px; background: var(--soft); }
.score-track i { display: block; height: 100%; background: var(--blue); }
.fact-panel { padding: 18px; border: 1px solid var(--line); background: var(--paper); }
.fact-panel > div { padding: 10px 0; border-top: 1px solid var(--line); }
.fact-panel strong, .fact-panel span { display: block; font-size: 11px; }
.fact-panel span { margin-top: 3px; color: var(--muted); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 35px; }
.pros-cons section { padding: 18px; border-top: 4px solid var(--green); background: var(--paper); }
.pros-cons section:last-child { border-top-color: var(--amber); }
.pros-cons ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 12px; }
.demo-warning { margin-top: 30px; padding: 15px; border-left: 4px solid var(--red); background: #feeceb; color: #7a271a; font-size: 12px; }
.demo-warning strong { display: block; }

.story-page { max-width: 800px; margin: 0 auto; }
.story-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.story-head h1 { margin: 13px 0; font-size: 38px; line-height: 1.35; }
.story-head > p { margin: 0; color: var(--ink-2); font-size: 17px; }
.story-byline { margin-top: 15px; color: var(--muted); font-size: 11px; }
.prose { padding-top: 8px; font-size: 16px; }
.prose h2 { margin: 40px 0 13px; font-size: 25px; line-height: 1.4; }
.prose h3 { margin: 28px 0 10px; font-size: 18px; }
.prose p { color: #263244; }
.prose pre { overflow-x: auto; padding: 17px; border-radius: 5px; background: #17202b; color: #e6edf3; font-family: var(--mono); font-size: 12px; }
.prose blockquote { margin: 22px 0; padding: 13px 16px; border-left: 4px solid var(--amber); background: #fff8e5; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; }
.editor-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 5px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,92,211,.1); }
.field textarea { min-height: 92px; resize: vertical; }
.tag-editor { min-height: 44px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.tag-editor button { min-height: 27px; padding: 0 7px; border: 1px solid #cfd7e5; border-radius: 3px; background: #eaf1ff; color: var(--blue); cursor: pointer; font-size: 10px; }
.tag-editor input { min-width: 140px; flex: 1; border: 0; box-shadow: none; }
.popular-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.popular-tags button { padding: 4px 7px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); cursor: pointer; color: var(--muted); font-size: 9px; }
.editor-side { display: grid; align-content: start; gap: 18px; }
.preview-card { padding: 18px; border: 1px solid var(--line); background: var(--paper); }
.preview-card > span { color: var(--blue); font-size: 10px; font-weight: 800; }
.preview-card h3 { margin: 10px 0 7px; font-size: 18px; }
.preview-card p { color: var(--muted); font-size: 11px; }
.editor-output { width: 100%; min-height: 280px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #17202b; color: #e6edf3; font-family: var(--mono); font-size: 11px; resize: vertical; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.option-table { width: 100%; border-collapse: collapse; background: var(--paper); }
.option-table th, .option-table td { padding: 13px; border: 1px solid var(--line); text-align: left; font-size: 11px; vertical-align: top; }
.option-table th { background: var(--soft); }
.option-table strong { display: block; font-size: 12px; }

.footer { padding: 38px 0 24px; border-top: 1px solid #344054; background: var(--navy); color: #d7dee8; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 34px; }
.footer strong { color: var(--paper); }
.footer p, .footer a { color: #aab4c3; font-size: 11px; }
.footer a { display: block; padding: 3px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 16px; border-top: 1px solid #344054; color: #8996a8; font-size: 10px; }

@media (max-width: 1000px) {
  .nav { position: absolute; top: 64px; left: 0; right: 0; display: none; grid-template-columns: repeat(2, 1fr); padding: 10px 20px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .nav.is-open { display: grid; }
  .nav-actions { margin-left: auto; }
  .menu-btn { display: grid; }
  .hero-grid, .home-layout, .method-layout, .detail-grid, .editor-layout { grid-template-columns: 1fr; }
  .score-visual { max-width: 620px; }
  .keyword-grid { grid-template-columns: repeat(3, 1fr); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .grade-grid { grid-template-columns: repeat(3, 1fr); }
  .fact-panel { max-width: none; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, var(--container)); }
  .section { padding: 38px 0; }
  .topbar-inner { min-height: 60px; }
  .nav { top: 60px; }
  .hero { padding: 36px 0 30px; }
  .hero h1, .page-hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .keyword-grid { grid-template-columns: 1fr 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card { min-height: 225px; }
  .station-card { grid-template-columns: 35px 1fr; }
  .station-main { padding: 14px; }
  .station-main > p { margin-right: 0; }
  .toolbar { align-items: stretch; }
  .search { width: 100%; margin-left: 0; }
  .grade-grid { grid-template-columns: 1fr 1fr; }
  .detail-intro { grid-template-columns: 1fr; }
  .hero-score { width: 100px; height: 100px; }
  .pros-cons { grid-template-columns: 1fr; }
  .story-head h1 { font-size: 29px; }
  .editor-form { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
