:root {
  --ink: #17213b;
  --muted: #687089;
  --paper: #f7f7f4;
  --card: rgba(255, 255, 255, .88);
  --line: #e7e7e2;
  --blue: #3157d5;
  --blue-dark: #233f9f;
  --violet: #7651d7;
  --green: #15966a;
  --amber: #d58b19;
  --red: #cf4a5b;
  --shadow: 0 24px 70px rgba(31, 44, 84, .09), 0 3px 12px rgba(31, 44, 84, .04);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; }
button, textarea { font: inherit; }
button { color: inherit; }
.svg-defs { width: 0; height: 0; position: absolute; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ambient { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; filter: blur(1px); opacity: .65; pointer-events: none; }
.ambient-one { right: -150px; top: 120px; background: radial-gradient(circle, rgba(133, 164, 255, .18), transparent 69%); }
.ambient-two { left: -200px; bottom: 40px; background: radial-gradient(circle, rgba(161, 122, 224, .12), transparent 68%); }

.site-header { width: min(1180px, calc(100% - 48px)); height: 88px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: white; border-radius: 13px; background: linear-gradient(145deg, #1e347c, #4d6ce2); box-shadow: 0 10px 24px rgba(49, 87, 213, .23); }
.brand-mark svg { width: 22px; height: 22px; stroke-width: 1.5; }
.brand-copy { display: grid; }
.brand-copy strong { font-family: "STSong", "Songti SC", serif; font-size: 22px; letter-spacing: .08em; line-height: 1; }
.brand-copy small { margin-top: 4px; font-size: 8px; font-weight: 700; letter-spacing: .27em; color: #8d94a8; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.service-status { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--line); background: rgba(255,255,255,.72); border-radius: 100px; color: var(--muted); font-size: 12px; }
.service-status i { width: 7px; height: 7px; border-radius: 50%; background: #a3a7b1; box-shadow: 0 0 0 4px rgba(163,167,177,.12); }
.service-status.live i { background: var(--green); box-shadow: 0 0 0 4px rgba(21,150,106,.12); }
.service-status.demo i { background: var(--amber); box-shadow: 0 0 0 4px rgba(213,139,25,.13); }
.ghost-button { border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 10px; padding: 9px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; transition: .2s ease; }
.ghost-button:hover { border-color: #c9cddb; background: white; transform: translateY(-1px); }
.ghost-button svg { width: 16px; height: 16px; }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero { max-width: 740px; margin: 70px 0 46px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .15em; }
.eyebrow span { width: 28px; height: 1px; background: var(--blue); }
.hero h1 { margin: 22px 0 20px; color: #19213a; font-family: "STSong", "Songti SC", "Noto Serif SC", serif; font-size: clamp(46px, 6vw, 74px); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero p { max-width: 620px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.85; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(300px, .88fr); border: 1px solid rgba(220,220,216,.9); background: var(--card); border-radius: 22px; box-shadow: var(--shadow); backdrop-filter: blur(15px); overflow: hidden; }
.editor-pane, .settings-pane { padding: 34px; }
.settings-pane { border-left: 1px solid var(--line); background: rgba(249,249,247,.6); }
.pane-heading { min-height: 35px; margin-bottom: 23px; display: flex; align-items: center; justify-content: space-between; }
.pane-heading > div { display: flex; align-items: center; gap: 12px; }
.pane-heading h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.step-number { display: grid; place-items: center; width: 29px; height: 29px; color: var(--blue); border: 1px solid #dbe2fb; border-radius: 50%; background: #f1f4ff; font-size: 10px; font-weight: 800; }
.text-button { display: flex; align-items: center; gap: 7px; padding: 7px; border: 0; background: transparent; color: var(--blue); font-size: 12px; cursor: pointer; }
.text-button svg { width: 15px; height: 15px; }
.textarea-wrap { border: 1px solid #e0e1e5; border-radius: 14px; background: white; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.textarea-wrap:focus-within { border-color: #8ba0e8; box-shadow: 0 0 0 4px rgba(49,87,213,.08); }
textarea { display: block; width: 100%; min-height: 285px; padding: 21px 22px; resize: vertical; border: 0; outline: 0; color: #26304a; background: transparent; font-size: 15px; line-height: 1.85; }
textarea::placeholder { color: #aaafbc; }
.editor-footer { min-height: 42px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #f0f0ed; color: #989eac; font-size: 11px; }
.editor-footer strong { color: #667085; font-weight: 600; }
.privacy-note { margin-top: 13px; display: flex; align-items: center; gap: 7px; color: #9096a5; font-size: 11px; }
.privacy-note svg { width: 14px; height: 14px; color: var(--green); }

.check-option { position: relative; display: grid; grid-template-columns: 42px 1fr 34px; gap: 12px; align-items: center; margin-bottom: 12px; padding: 16px; border: 1px solid #e5e5e1; border-radius: 14px; background: white; cursor: pointer; transition: .2s ease; }
.check-option:hover { transform: translateY(-1px); border-color: #cfd6ef; }
.check-option.active { border-color: #ced8fb; box-shadow: inset 3px 0 var(--blue); }
.option-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; }
.option-icon svg { width: 19px; height: 19px; }
.option-icon.violet { color: var(--violet); background: #f1edff; }
.option-icon.blue { color: var(--blue); background: #edf2ff; }
.option-copy { display: grid; gap: 4px; }
.option-copy strong { font-size: 13px; }
.option-copy small { color: #9298a6; font-size: 10px; line-height: 1.45; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { position: relative; display: block; width: 34px; height: 20px; border-radius: 100px; background: #d8dbe2; transition: .2s ease; }
.toggle i::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.15); transition: .2s ease; }
.toggle input:checked + i { background: var(--blue); }
.toggle input:checked + i::after { transform: translateX(14px); }
.model-note { margin: 23px 0 17px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #959aa8; font-size: 11px; }
.model-note div { display: flex; align-items: center; gap: 6px; }
.model-note b { color: #525a70; font-size: 11px; }
.model-note i { font-style: normal; color: #b8bbc4; }
.analyze-button { width: 100%; min-height: 52px; padding: 0 20px; border: 0; border-radius: 13px; display: flex; align-items: center; justify-content: space-between; color: white; background: linear-gradient(135deg, #2c49ac, #4568df); box-shadow: 0 12px 24px rgba(49,87,213,.22); font-size: 14px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.analyze-button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(49,87,213,.28); }
.analyze-button:disabled { opacity: .6; cursor: wait; transform: none; }
.analyze-button svg { width: 18px; height: 18px; transition: transform .2s; }
.analyze-button:hover svg { transform: translateX(3px); }
.button-caption { margin: 10px 0 0; text-align: center; color: #a0a4af; font-size: 10px; }

.empty-state { min-height: 380px; padding: 85px 20px 95px; display: grid; place-items: center; text-align: center; }
.empty-visual { position: relative; width: 90px; height: 90px; display: grid; place-items: center; margin-bottom: 22px; }
.empty-visual svg { width: 36px; height: 36px; color: #8390b5; }
.orbit { position: absolute; border: 1px solid #dce0ec; border-radius: 50%; }
.orbit-a { width: 76px; height: 76px; }
.orbit-b { width: 96px; height: 50px; transform: rotate(-30deg); }
.empty-state h2 { margin: 0 0 10px; font-family: "STSong", "Songti SC", serif; font-size: 22px; font-weight: 600; }
.empty-state p { max-width: 540px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.feature-chips { margin-top: 25px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.feature-chips span { padding: 7px 11px; border: 1px solid #e1e3e9; border-radius: 100px; color: #7e8598; background: rgba(255,255,255,.7); font-size: 10px; }

.loading-panel { min-height: 210px; margin: 34px 0; padding: 38px; position: relative; grid-template-columns: 70px 1fr; gap: 24px; align-items: center; border: 1px solid #e1e5f2; border-radius: 18px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.loading-panel:not([hidden]) { display: grid; }
.loading-orbit { width: 64px; height: 64px; display: grid; place-items: center; position: relative; color: var(--blue); }
.loading-orbit::before { content: ""; position: absolute; inset: 0; border: 2px solid #e8ecf8; border-top-color: var(--blue); border-radius: 50%; animation: spin 1.2s linear infinite; }
.loading-orbit span { position: absolute; inset: 8px; border: 1px dashed #cbd4f2; border-radius: 50%; animation: spin 2s linear infinite reverse; }
.loading-panel h2 { margin: 0 0 8px; font-family: "STSong", "Songti SC", serif; font-size: 23px; }
.loading-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.loading-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #eceef4; }
.loading-progress i { display: block; width: 12%; height: 100%; background: linear-gradient(90deg, var(--violet), var(--blue)); transition: width 1s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

.results { margin: 40px 0 80px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.results-heading > div { display: flex; align-items: center; gap: 13px; }
.results-heading h2 { margin: 0; font-family: "STSong", "Songti SC", serif; font-size: 27px; }
.results-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.demo-banner { margin-bottom: 18px; padding: 14px 17px; display: flex; align-items: center; gap: 12px; border: 1px solid #ecd7a8; border-radius: 12px; background: #fff9eb; color: #845b13; }
.demo-banner svg { flex: 0 0 auto; }
.demo-banner div { display: grid; gap: 2px; }
.demo-banner strong { font-size: 12px; }
.demo-banner span { font-size: 11px; color: #9d7a39; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.overview-card { min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 30px rgba(31,44,84,.04); }
.overview-card .card-label { color: #8b91a0; font-size: 11px; }
.overview-card .big-number { margin: 12px 0 5px; font-family: Georgia, serif; font-size: 38px; line-height: 1; }
.overview-card .big-number small { font-family: inherit; font-size: 17px; color: #8e94a2; }
.overview-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.risk-card { display: flex; align-items: center; justify-content: space-between; }
.risk-ring { --score: 0; --ring-color: var(--blue); width: 82px; height: 82px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), #edf0f5 0); position: relative; }
.risk-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: white; }
.risk-ring strong { position: relative; font-family: Georgia, serif; font-size: 24px; }
.verdict-stack { margin-top: 14px; display: flex; gap: 7px; }
.mini-verdict { padding: 5px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; }
.mini-verdict.supported { color: #087451; background: #e8f7f1; }
.mini-verdict.contradicted { color: #ad3445; background: #fdecef; }
.mini-verdict.insufficient, .mini-verdict.disputed { color: #946311; background: #fff5dd; }

.report-tabs { margin-top: 24px; padding: 5px; display: inline-flex; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #eeeeeb; }
.report-tab { padding: 9px 16px; border: 0; border-radius: 8px; background: transparent; color: #747b8d; font-size: 12px; font-weight: 600; cursor: pointer; }
.report-tab.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(31,44,84,.08); }
.report-panel { margin-top: 14px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 10px 35px rgba(31,44,84,.04); }
.report-summary { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; }
.score-display { padding-right: 28px; border-right: 1px solid var(--line); text-align: center; }
.score-display strong { display: block; font-family: Georgia, serif; font-size: 50px; color: var(--blue); line-height: 1; }
.score-display span { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.summary-copy .risk-pill { margin-bottom: 10px; }
.summary-copy h3 { margin: 0 0 9px; font-size: 17px; }
.summary-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.risk-pill, .verdict-pill { display: inline-flex; align-items: center; width: max-content; padding: 5px 9px; border-radius: 100px; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.risk-pill.low, .verdict-pill.supported { color: #087451; background: #e8f7f1; }
.risk-pill.medium, .risk-pill.uncertain, .verdict-pill.insufficient, .verdict-pill.disputed { color: #946311; background: #fff5dd; }
.risk-pill.high, .verdict-pill.contradicted { color: #ad3445; background: #fdecef; }
.section-title { margin: 30px 0 13px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.section-title::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.signal-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.signal-item { padding: 15px; border: 1px solid #ecece8; border-radius: 12px; background: #fbfbfa; }
.signal-item > div { display: flex; justify-content: space-between; gap: 8px; }
.signal-item strong { font-size: 12px; }
.signal-item p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.impact { width: 7px; height: 7px; margin-top: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.impact.medium { background: var(--amber); }
.impact.high { background: var(--red); }
.bullet-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.warning-box { margin-top: 18px; padding: 13px 15px; display: flex; gap: 10px; border-radius: 11px; color: #7e641d; background: #fff9ea; font-size: 11px; line-height: 1.6; }
.warning-box svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }

.facts-intro { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.facts-intro h3 { margin: 0 0 7px; font-size: 17px; }
.facts-intro p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.claim-list { display: grid; gap: 10px; }
.claim-card { border: 1px solid #e7e7e3; border-radius: 13px; overflow: hidden; }
.claim-header { width: 100%; padding: 16px 17px; border: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; text-align: left; background: white; cursor: pointer; }
.claim-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: #66708a; background: #f0f1f4; font-size: 10px; font-weight: 700; }
.claim-text { font-size: 12px; line-height: 1.65; font-weight: 600; }
.claim-body { padding: 0 17px 17px 53px; background: white; }
.claim-body > p { margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.source-list { display: grid; gap: 8px; }
.source-item { padding: 11px 13px; display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; border: 1px solid #ecece8; border-radius: 10px; color: inherit; text-decoration: none; background: #fafaf9; transition: .2s; }
.source-item:hover { border-color: #cdd5f1; background: #f7f9ff; }
.source-item svg { width: 16px; height: 16px; color: var(--blue); }
.source-item strong { display: block; font-size: 11px; }
.source-item small { display: block; margin-top: 3px; color: #9298a6; font-size: 9px; }
.source-item > span { color: var(--blue); font-size: 10px; }
.no-source { padding: 13px; border-radius: 9px; background: #f5f5f3; color: #8a909d; font-size: 11px; }
.adjustment-box { margin: 18px 0; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; border: 1px solid #bfe6d5; border-radius: 12px; background: #f0faf6; color: #176f53; }
.adjustment-box svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; }
.adjustment-box strong { display: block; font-size: 12px; }
.adjustment-box p { margin: 5px 0 0; color: #477565; font-size: 10px; line-height: 1.65; }
.unavailable-panel { padding: 40px 20px; text-align: center; color: var(--muted); }
.unavailable-panel svg { width: 30px; height: 30px; margin-bottom: 10px; color: #98a0b3; }
.unavailable-panel h3 { margin: 0 0 7px; color: var(--ink); font-size: 15px; }
.unavailable-panel p { margin: 0; font-size: 12px; }

footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 35px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #969ba8; font-size: 10px; }
footer span { color: #626a7e; font-weight: 700; }
footer p { margin: 0; }

dialog { width: min(470px, calc(100% - 32px)); padding: 32px; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 30px 90px rgba(26,35,67,.25); }
dialog::backdrop { background: rgba(22,28,49,.42); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; right: 15px; top: 12px; border: 0; background: transparent; color: #8b91a0; font-size: 24px; cursor: pointer; }
.dialog-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: #eef2ff; }
dialog h2 { margin: 18px 0 12px; font-family: "STSong", "Songti SC", serif; }
dialog p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.dialog-confirm { width: 100%; margin-top: 12px; padding: 12px; border: 0; border-radius: 10px; color: white; background: var(--blue); cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 20; max-width: min(500px, calc(100% - 30px)); padding: 12px 17px; border-radius: 10px; color: white; background: #293149; box-shadow: 0 12px 35px rgba(26,35,67,.25); font-size: 12px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #9d3745; }

@media (max-width: 820px) {
  .site-header, main, footer { width: min(100% - 30px, 680px); }
  .hero { margin-top: 45px; }
  .hero h1 { font-size: clamp(42px, 12vw, 62px); }
  .workspace { grid-template-columns: 1fr; }
  .settings-pane { border-left: 0; border-top: 1px solid var(--line); }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-card { min-height: 125px; }
  .signal-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header { height: 72px; }
  .header-actions .ghost-button { display: none; }
  .service-status { padding: 8px 10px; }
  .hero { margin: 38px 0 32px; }
  .hero h1 { margin-top: 17px; font-size: 42px; }
  .hero p { font-size: 14px; }
  .workspace { border-radius: 17px; }
  .editor-pane, .settings-pane { padding: 23px 20px; }
  textarea { min-height: 250px; padding: 17px; font-size: 14px; }
  .editor-footer { align-items: flex-start; padding: 10px 14px; }
  .editor-footer #textHint { max-width: 62%; }
  .loading-panel:not([hidden]) { grid-template-columns: 1fr; padding: 28px 23px; }
  .results-heading { align-items: flex-start; }
  .report-panel { padding: 20px; }
  .report-summary { grid-template-columns: 1fr; }
  .score-display { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .claim-header { grid-template-columns: auto 1fr; }
  .claim-header .verdict-pill { grid-column: 2; }
  .claim-body { padding-left: 17px; }
  .source-item { grid-template-columns: 22px 1fr; }
  .source-item > span { display: none; }
  footer { display: block; line-height: 1.6; }
  footer p { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
