:root {
  color-scheme: light;
  --background: #f7f6f3;
  --paper: #fff;
  --soft: #f6f5f3;
  --ink: #262424;
  --muted: #66605d;
  --line: #e6e0db;
  --accent: #9d2831;
  --accent-dark: #7e1823;
  --accent-soft: #faedef;
  --focus: #9d2831;
  --shadow: 0 1px 2px #2923180a, 0 7px 22px #201a1706;
  --radius: 16px;
  font: 16px/1.55 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; min-height: 100dvh; background: var(--background); color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
button { touch-action: manipulation; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.35rem); font-weight: 740; line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.075rem; line-height: 1.35; font-weight: 720; }
h3 { font-size: 1.065rem; line-height: 1.43; }
h4 { font-size: .98rem; line-height: 1.45; }
small { font-size: .77rem; }
input, textarea, select {
  min-width: 0; width: 100%; background: var(--paper); border: 1px solid #d7cfcb; border-radius: 8px; padding: 9px 11px;
}
input[type=checkbox] { accent-color: var(--accent); flex: none; height: 17px; width: 17px; margin: 0; }
textarea { resize: vertical; line-height: 1.5; }
::placeholder { color: #746c68; opacity: 1; }
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
legend { margin-bottom: 6px; padding: 0; font-weight: 650; }
[hidden] { display: none !important; }
.sr-only {
  width: 1px; height: 1px; padding: 0; position: absolute; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 20; padding: 9px 15px; background: var(--paper);
  transform: translateY(-150%); clip-path: inset(50%); border-radius: 8px;
}
.skip:focus { transform: none; clip-path: none; }
.boot { display: flex; gap: 10px; align-items: center; padding: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #231e1e; white-space: nowrap; font: 750 1.47rem/1 system-ui, sans-serif; letter-spacing: -.075em; }
.brand-mark {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 3px;
  width: 33px; height: 33px; background: #aa2d36; border-radius: 9px;
}
.brand-mark i { width: 3px; height: 8px; background: white; transform: skewY(-17deg); border-radius: 1px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 19px; }
.brand-placement, .login-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.bar {
  position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.bar-inner {
  max-width: 1360px; min-height: 65px; display: flex; align-items: center; gap: 45px;
  margin: auto; padding: 0 clamp(18px, 4.5vw, 64px);
}
.desktop-nav { display: flex; align-self: stretch; gap: 26px; }
.desktop-nav button, .mobile-nav button, .admin-nav button {
  border: 0; background: transparent; font-weight: 660; color: var(--muted); white-space: nowrap;
}
.desktop-nav button { display: flex; align-items: center; gap: 6px; padding: 0 4px; position: relative; }
.nav-icon { width: 1.15rem; height: 1.15rem; flex: none; }
.desktop-nav button[aria-current=page], .mobile-nav button[aria-current=page] { color: var(--accent); }
.desktop-nav button[aria-current=page]::after {
  content: ""; position: absolute; height: 3px; width: 20px; border-radius: 3px 3px 0 0;
  bottom: 0; left: 50%; transform: translateX(-50%); background: var(--accent);
}
.member-chip {
  display: inline-flex; align-items: center; min-width: 0; gap: 8px; background: transparent; border: 0;
  margin-left: auto; padding: 4px 0 4px 4px; font-size: .875rem; font-weight: 650; min-height: 44px;
}
.avatar {
  display: grid; place-content: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft);
  width: 31px; height: 31px; flex: none; font-weight: 700;
}
.member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11rem; }
.mobile-nav { display: none; }
.wrap {
  max-width: 1360px; min-width: 0; margin: auto; padding: 36px clamp(18px, 4.5vw, 64px) 50px;
}
.page-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 25px;
}
.page-heading p { color: var(--muted); margin-top: 7px; font-size: .92rem; }
.page-actions, .actions { display: flex; align-items: center; gap: 8px; }
.wrap-actions { flex-wrap: wrap; }
.button, .text-button, .starter {
  display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 40px;
  border: 1px solid #dcd4cf; background: var(--paper); border-radius: 8px; padding: 7px 12px;
  font-size: .875rem; font-weight: 680; line-height: 1.3; text-align: center;
}
.button:not(:disabled):hover, .starter:hover { background: var(--soft); border-color: #d1c5c0; }
.button.primary { color: white; border-color: var(--accent); background: var(--accent); }
.button.primary:not(:disabled):hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.accent { color: var(--accent-dark); border-color: #ecd4d6; background: var(--accent-soft); }
.button.accent:not(:disabled):hover { background: #f6e2e5; border-color: #e3c2c6; }
.text-button { color: var(--accent); background: transparent; border-color: transparent; padding-inline: 4px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-actions .mobile-history, .page-actions .mobile-strategies { display: none; }
.card {
  min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow);
}
.panel-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.panel-heading p { margin-top: 5px; }
.muted, .quiet { color: var(--muted); font-size: .875rem; }
.empty { padding: 20px 0; color: var(--muted); font-size: .92rem; }
.empty.compact { padding: 9px 0 2px; }
body:has(.member-chat-shell) { overflow: hidden; }
.member-chat-shell {
  position: fixed; inset: var(--chat-viewport-top, 0px) 0 auto;
  width: 100vw; height: var(--chat-viewport-height, 100dvh); overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  container: fstock-chat / size;
}
.wrap.chat-workspace {
  display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100%; min-height: 0;
  margin-block: 0; padding-block: 18px;
}
.chat-heading { align-items: center; margin-bottom: 12px; }
.chat-heading h1 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); white-space: nowrap; }
.chat-grid { display: grid; min-height: 0; grid-template-columns: minmax(16rem, .38fr) minmax(0, 1fr); gap: 16px; }
.chat-card {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-area: 1 / 2;
  min-width: 0; min-height: 0; padding: 0;
}
.conversation-scroll, .chat-sidebar, .history-list {
  min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.conversation-scroll { border-radius: var(--radius) var(--radius) 0 0; }
.conversation-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.chat-sidebar { grid-area: 1 / 1; display: grid; align-content: start; gap: 13px; }
.history-list { max-height: min(45dvh, 420px); }
.history-entry {
  width: 100%; display: grid; gap: 4px; min-height: 49px; text-align: left; padding: 8px 9px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; overflow-wrap: anywhere;
}
.history-entry + .history-entry { margin-top: 2px; }
.history-entry > span { font-size: .91rem; font-weight: 650; }
.history-entry:hover { background: var(--soft); }
.history-entry[aria-current=true] { background: var(--accent-soft); color: var(--accent-dark); border-color: #f0dfe1; }
.history-entry small { color: var(--muted); font-variant-numeric: tabular-nums; }
.conversation-empty {
  display: flex; min-height: 100%; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 18px; text-align: center;
}
.conversation-empty h2 { font-size: clamp(1.28rem, 2.3vw, 1.65rem); letter-spacing: -.03em; }
.starters { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.starter { text-align: left; font-weight: 600; }
.starter span { color: var(--accent); white-space: nowrap; }
.composer { padding: 15px 18px 17px; border-top: 1px solid var(--line); }
.composer-input {
  display: flex; align-items: end; gap: 8px; border: 1px solid #dcd4cf; border-radius: 13px;
  background: var(--soft); padding: 8px;
}
.composer-input:focus-within { border-color: #b9797e; }
.composer textarea {
  max-height: min(10rem, calc(var(--chat-viewport-height, 100dvh) / 4)); min-height: 44px;
  background: transparent; border: 0; border-radius: 5px; padding: 7px;
}
.composer .button { white-space: nowrap; flex: none; }
.composer .banner { margin-bottom: 8px; max-height: 4em; overflow-y: auto; }
.turns { display: grid; grid-template-columns: minmax(0, 1fr); padding: 5px clamp(14px, 3.2vw, 28px) 14px; gap: 10px; }
.turn { overflow-wrap: anywhere; }
.turn + .turn { border-top: 1px solid var(--line); padding-top: 4px; }
.turn:focus { outline: none; }
.turn:focus .answer { outline: 2px solid #e8b8be; outline-offset: 3px; border-radius: 8px; }
.question-bubble {
  width: fit-content; max-width: 88%; white-space: pre-wrap; background: var(--soft); border-radius: 14px 14px 4px 14px;
  margin: 14px 0 15px auto; padding: 9px 14px; font-size: .93rem;
}
.answer { padding: 5px 0 11px; }
.answer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.answer-head h3 { font-size: 1.08rem; }
.stock-code { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.tag {
  display: inline-flex; align-self: start; padding: 3px 7px; color: var(--muted); background: var(--soft);
  border: 1px solid var(--line); white-space: nowrap; border-radius: 6px; font-size: .75rem; font-weight: 650;
}
.tag-accent { color: var(--accent); background: var(--accent-soft); border-color: #f1dbde; }
.answer-section { margin-top: 13px; }
.answer-section h4 { margin-bottom: 3px; }
.answer-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 13px; }
.deep-marker { color: var(--accent); background: var(--accent-soft); border-left: 2px solid #b7444d; border-radius: 3px 7px 7px 3px; margin: 12px 0; padding: 6px 9px; font-size: .8rem; width: fit-content; }
.prose { line-height: 1.7; overflow-wrap: anywhere; }
.prose > * + * { margin-top: .65em; }
.prose ul, .prose ol { margin-bottom: 0; padding-inline-start: 1.45em; }
.prose li + li { margin-top: .25em; }
.prose pre { max-width: 100%; overflow: auto; background: var(--soft); padding: 10px; border-radius: 7px; }
.prose code { background: var(--soft); border-radius: 4px; padding: 1px 3px; }
.prose h4 { color: #3b3431; }
.stage-list { margin-top: 12px; color: var(--muted); font-size: .86rem; }
.stage-list summary { padding: 4px 0; }
.stage-list ul { margin: 4px 0; padding-inline-start: 18px; }
.reading-links { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; font-size: .86rem; overflow-wrap: anywhere; }
.reading-links time { margin-inline-start: 7px; color: var(--muted); }
.disclosure-section {
  margin-top: 14px; padding: 12px 14px; min-width: 0; border: 1px solid var(--line);
  border-radius: 10px; overflow-wrap: anywhere;
}
.disclosure-heading, .disclosure-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 12px; }
.disclosure-heading { justify-content: space-between; }
.disclosure-range, .disclosure-meta, .disclosure-state { color: var(--muted); font-size: .84rem; }
.disclosure-section ul { list-style: none; margin: 5px 0 0; padding: 0; }
.disclosure-section li { padding: 8px 0; }
.disclosure-section li + li { border-top: 1px solid var(--line); }
.disclosure-section li:last-child { padding-bottom: 0; }
.disclosure-section li a { display: inline-block; font-weight: 630; line-height: 1.55; }
.disclosure-meta { margin-top: 3px; }
.disclosure-state { margin-top: 5px; }
.disclosure-range, .disclosure-meta time { font-variant-numeric: tabular-nums; }
.turn-pending { display: flex; align-items: center; gap: 8px; padding: 12px 0; color: var(--muted); }
.spinner {
  flex: none; width: 17px; height: 17px; border-radius: 50%; border: 2px solid #ecd5d8;
  border-right-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.strategy-card { border-top: 3px solid #bb4750; }
.strategy-card .panel-heading { margin-bottom: 4px; }
.featured-strategies { list-style: none; display: grid; margin: 0; padding: 0; }
.featured-strategies li { display: flex; align-items: center; justify-content: space-between; gap: 7px; border-top: 1px solid var(--line); font-size: .875rem; }
.featured-strategies .actions { gap: 2px; white-space: nowrap; }
.featured-strategies .text-button { padding-inline: 5px; }
.strategy-groups { display: grid; gap: 13px; }
.strategy-groups > form + form { border-top: 1px solid var(--line); padding-top: 13px; }
.strategy-form { display: grid; gap: 12px; }
.strategy-options { display: grid; max-height: min(30vh, 255px); overflow: auto; scrollbar-width: thin; }
.strategy-option + .strategy-option { border-top: 1px solid var(--line); }
.strategy-option label { display: flex; align-items: flex-start; gap: 8px; padding: 8px 3px; cursor: pointer; }
.strategy-option label > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.strategy-option small { color: var(--muted); }
.strategy-stock input { font-size: .9rem; }
.overview-grid {
  display: grid; align-items: start; gap: 18px; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
}
.narrow { max-width: 740px; }
.settings-grid { display: grid; gap: 15px; }
.plain-list { display: grid; }
.plain-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 2px; min-height: 50px; border: 0; border-top: 1px solid var(--line); background: transparent;
  overflow-wrap: anywhere;
}
button.plain-row:hover { background: var(--soft); }
.plain-row strong { display: block; font-size: .9rem; }
.plain-row small { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
.plain-row > .actions { flex: none; }
.watch-list .watch-quote { display: flex; flex-wrap: wrap; gap: 4px 8px; font-weight: 650; margin-block: 2px; }
.quote-up { color: #a02934; }
.quote-down { color: #177353; }
.quote-flat { color: var(--muted); }
.form-stack { display: grid; gap: 13px; }
.form-stack label:not(.check-row):not(.switch), .inline-form label, .invite-code label { display: grid; gap: 5px; font-size: .91rem; font-weight: 620; min-width: 0; }
.form-stack .button:not(.login-card *) { justify-self: start; }
.inline-form { display: flex; align-items: end; gap: 8px; margin-bottom: 15px; }
.inline-form label { flex: 1; }
.watch-form { margin-bottom: 15px; }
.watch-form .inline-form { margin-bottom: 0; }
.watch-search-status:empty { display: none; }
.watch-search-status:not(:empty) { margin: 8px 0; }
.watch-suggestions {
  list-style: none; margin: 6px 0 0; padding: 0; max-height: 248px; overflow: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.watch-suggestions li + li { border-top: 1px solid var(--line); }
.watch-suggestion {
  display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap;
  width: 100%; min-height: 43px; padding: 7px 12px; background: transparent; border: 0; text-align: left;
}
.watch-suggestion:hover, .watch-suggestion:focus-visible { background: var(--soft); }
.watch-suggestion:focus-visible { outline-offset: -2px; }
.watch-suggestion strong { font-size: .9rem; }
.watch-suggestion small { color: var(--muted); font-variant-numeric: tabular-nums; }
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.preference-form select { max-width: 210px; }
.report-page { display: grid; gap: 18px; max-width: 1040px; margin-inline: auto; }
.report-back { margin-top: -8px; }
.report-back .text-button { padding-inline: 0; }
.report-hero {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  padding: clamp(16px, 3vw, 32px); border: 1px solid #e7d9d1; border-radius: var(--radius);
  background: linear-gradient(136deg, #fff 33%, #f9f0ea); box-shadow: var(--shadow); overflow-wrap: anywhere;
}
.report-hero.has-score { grid-template-columns: minmax(0, 1fr) minmax(118px, 162px); }
.report-page .report-hero.has-score { grid-template-columns: minmax(0, 1fr) minmax(144px, 192px); }
.report-identity { align-self: center; min-width: 0; }
.report-identity :is(h1, h3) { font-size: clamp(1.4rem, 3.4vw, 2.15rem); line-height: 1.22; margin-top: 5px; }
.report-page .report-identity h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.report-label, .report-signals dt, .report-facts dt { color: #675651; font-size: .76rem; font-weight: 690; }
.report-ticker { display: inline-block; margin-inline-start: 9px; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.report-meta { display: flex; flex-wrap: wrap; gap: 3px 13px; margin-top: 8px; color: var(--muted); font-size: .78rem; }
.report-meta time, .report-score-date time { font-variant-numeric: tabular-nums; }
.report-score {
  min-width: 0; align-self: start; padding: 10px 14px 12px; background: #fff9f5;
  border: 1px solid #e9d7cc; border-radius: 12px;
}
.report-score-value { display: flex; align-items: baseline; gap: 4px 6px; margin-top: 3px; color: #6c281d; font-variant-numeric: tabular-nums; }
.report-score-value strong { font-size: clamp(1.65rem, 4.4vw, 2.7rem); line-height: 1.08; letter-spacing: -.045em; }
.report-score-value span, .report-score-date { color: var(--muted); font-size: .72rem; }
.report-score-meter { display: block; width: 100%; height: 9px; margin-block: 6px; }
.report-score-meter::-webkit-meter-bar { background: #edddd3; border: 0; border-radius: 5px; }
.report-score-meter::-webkit-meter-optimum-value { background: #9d3b2f; border-radius: 5px; }
.report-score-meter::-moz-meter-bar { background: #9d3b2f; border-radius: 5px; }
.report-score-band { color: #6c281d; font-size: .83rem; font-weight: 690; }
.report-conclusion, .report-signals, .report-facts { grid-column: 1 / -1; border-top: 1px solid #eaded5; padding-top: 12px; }
.report-conclusion .prose { margin-top: 4px; max-width: 62rem; }
.report-conclusion .prose > :last-child { margin-bottom: 0; }
.report-signals, .report-facts { display: flex; flex-wrap: wrap; gap: 8px clamp(18px, 4vw, 40px); }
.report-signals dd, .report-facts dd { font-weight: 650; margin-top: 2px; }
.report-facts dd { font-variant-numeric: tabular-nums; }
.stock-report-answer { padding-bottom: 4px; }
.stock-report-answer > .banner { margin-top: 10px; }
.report-fold { margin-top: 9px; border-top: 1px solid var(--line); }
.report-fold > summary { min-height: 44px; padding: 10px 0; color: #514340; font-size: .875rem; font-weight: 650; }
.report-fold > summary:hover { color: var(--accent-dark); }
.report-section { min-width: 0; overflow-wrap: anywhere; }
.report-reading {
  min-width: 0; overflow-wrap: anywhere;
  padding: clamp(14px, 3vw, 24px); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.report-reading > h2 { font-size: 1.18rem; margin-bottom: 11px; }
.report-market-group > fstock-price-history { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.report-market-group > .report-strategy, .report-evidence-group > :is(.disclosure-section, .reading-links) {
  margin: 12px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0;
}
.report-market-group > .report-strategy:nth-child(2) { margin: 0; padding: 0; border-top: 0; }
.report-evidence-group > .banner { margin-bottom: 11px; }
.report-evidence-group > .prose > :first-child { margin-top: 0; }
.report-market-group .report-levels { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; }
.report-market-group .report-levels > div { padding: 0; border: 0; border-radius: 0; }
.report-market-group .report-level-price { margin-bottom: 0; }
.report-strategy-conditions { margin-top: 5px; color: var(--muted); font-size: .84rem; }
.report-strategy-conditions summary { min-height: 40px; align-content: center; }
.report-strategy-conditions dl { display: grid; gap: 5px; }
.report-strategy-conditions dt { color: var(--ink); font-weight: 650; }
.report-section-head p { color: var(--muted); font-size: .78rem; }
.report-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 5px 12px; margin-bottom: 11px; }
.report-levels { display: grid; gap: 9px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr)); }
.report-levels > div { padding: 9px 12px; border: 1px solid var(--line); border-top: 2px solid var(--level-tone); background: var(--paper); border-radius: 9px; }
.report-levels [data-level=ideal_buy] { --level-tone: #08737d; }
.report-levels [data-level=secondary_buy] { --level-tone: #365da3; }
.report-levels [data-level=stop_loss] { --level-tone: #a23052; }
.report-levels [data-level=take_profit] { --level-tone: #367245; }
.report-levels dt { color: var(--level-tone); font-size: .8rem; font-weight: 690; }
.report-levels dd { color: var(--muted); font-size: .8rem; }
.report-levels .report-level-price { color: var(--ink); margin: 2px 0 5px; font-size: 1.32rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.report-level-price small { margin-inline-start: 4px; color: var(--muted); font-weight: 500; }
.report-evidence > :is(h3, h4) { margin-bottom: 9px; }
.report-evidence-item { padding-top: 11px; }
.report-evidence-item + .report-evidence-item { margin-top: 11px; border-top: 1px solid var(--line); }
.report-evidence-item :is(h4, h5) { margin: 0 0 4px; font-size: .96rem; }
.report-score-reasons { margin: 3px 0 8px; }
.report-score-reasons div { display: grid; grid-template-columns: minmax(73px, max-content) minmax(0, 1fr); gap: 7px; margin-block: 5px; }
.report-score-reasons dt { font-weight: 650; }
.report-evidence-item .muted { margin-top: 3px; }
.market-answer .answer-section { padding: 12px 14px; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; }
.evidence-gaps { margin-top: 10px; }
.dialog {
  max-height: calc(100dvh - 42px); width: min(440px, calc(100% - 25px)); border: 1px solid var(--line);
  border-radius: 15px; padding: 16px; overscroll-behavior: contain; box-shadow: 0 14px 44px #1e121341;
}
.dialog::backdrop { background: #24181b62; }
.dialog .history-list { max-height: 58dvh; }
.dialog .panel-heading { margin-bottom: 8px; }
.member-chat-shell .dialog {
  position: fixed; inset: calc(var(--chat-viewport-top, 0px) + var(--chat-viewport-height, 100dvh) / 2) 0 auto;
  transform: translateY(-50%); margin-block: 0;
  max-height: calc(var(--chat-viewport-height, 100dvh) - 24px); overflow-y: auto;
}
.strategy-dialog { width: min(560px, calc(100% - 25px)); }
.strategy-content > [data-action=toggle-strategies] { margin-bottom: 6px; }
.history-new { margin-top: 12px; }
.banner {
  border-radius: 7px; border: 1px solid #ecddcb; background: #fff7e9; color: #704817;
  padding: 8px 10px; font-size: .86rem; overflow-wrap: anywhere;
}
.banner-error { color: #8b202c; background: #fdf0f1; border-color: #f0d3d7; }
.banner + .button, .banner + form, .banner + .prose { margin-top: 10px; }
.announcer {
  position: fixed; right: clamp(9px, 4vw, 36px); bottom: 24px; z-index: 10; max-width: min(360px, calc(100vw - 28px));
  background: #30292a; color: white; border-radius: 10px; padding: 10px 14px; font-size: .88rem; box-shadow: var(--shadow);
  pointer-events: none;
}
.member-chat-shell + .announcer { top: calc(125px + env(safe-area-inset-top)); bottom: auto; }
.announcer:empty { opacity: 0; padding: 0; pointer-events: none; }
.announcer-error { background: #872930; }
.login-page {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); min-height: 100dvh;
}
.login-card {
  display: grid; align-content: center; gap: 13px; width: 100%; max-width: 570px; justify-self: center;
  padding: 40px clamp(25px, 7vw, 110px); min-width: 0;
}
.login-brand { margin-bottom: clamp(10px, 4vh, 44px); }
.login-card h1 { margin-top: 7px; }
.login-card > .muted { margin-bottom: 7px; }
.login-card .form-stack { margin-top: 3px; }
.login-card .primary { margin-top: 3px; }
.login-card input { min-height: 43px; }
.login-switch { display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; color: var(--muted); font-size: .875rem; }
.login-side {
  display: grid; place-content: center; overflow: hidden; background: #eedcdb; min-width: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0 49px, #a26d6c1c 50px 51px),
    repeating-linear-gradient(90deg, transparent 0 49px, #a26d6c1c 50px 51px), linear-gradient(145deg, #f3e8e3, #e8cecb);
}
.brand-graphic {
  display: flex; align-items: end; justify-content: center; gap: clamp(10px, 2.3vw, 35px);
  width: clamp(130px, 25vw, 350px); aspect-ratio: 1; transform: rotate(-10deg);
  border: 1px solid #ad707268; border-radius: 22%; padding: 22%;
  background: #f6ece760; box-shadow: 12px 24px 50px #673e3529;
}
.brand-graphic i { width: 23%; height: 39%; border-radius: 7px; transform: skewY(-17deg); background: #b54148; }
.brand-graphic i:nth-child(2) { height: 67%; background: #bd5159; }
.brand-graphic i:nth-child(3) { height: 94%; background: #943039; }
body:has(.admin-wrap), body:has(.login-brand .admin-label) {
  --background: #f2f5f4; --soft: #f2f5f4; --ink: #202b2b; --muted: #536361; --line: #dce5e2;
  --accent: #216159; --accent-dark: #164b45; --accent-soft: #e6f0ec; --focus: #216159;
}
.admin-label { color: var(--muted); font-size: .89rem; white-space: nowrap; border-left: 1px solid var(--line); padding-left: 12px; font-weight: 650; }
.admin-account { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 22px; }
.admin-nav button { padding: 7px 11px; border: 1px solid transparent; border-radius: 7px; min-height: 40px; font-size: .9rem; }
.admin-nav button:hover { background: var(--paper); }
.admin-nav button[aria-current=page] { border-color: #bfd9d1; background: var(--accent-soft); color: var(--accent-dark); }
.admin-wrap h1 { font-size: clamp(1.7rem, 3vw, 2.1rem); }
.admin-wrap .button.accent { border-color: #c1dad3; }
.admin-wrap .button.accent:hover { background: #d9e8e3; border-color: #b3cfc6; }
.filter-row { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 8px; margin-bottom: 13px; }
.filter-row label { display: flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 650; }
.filter-row select { min-width: 118px; font-size: .85rem; padding-block: 6px; }
.audit-list { border-top: 1px solid var(--line); }
.audit-row { border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.audit-row > summary {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(180px, .85fr) minmax(80px, .42fr) minmax(65px, .27fr) auto;
  align-items: center; gap: 10px; min-height: 61px; list-style: none; padding: 8px 2px; overflow-wrap: anywhere;
}
.audit-row > summary::-webkit-details-marker { display: none; }
.audit-row > summary::after { content: "＋"; color: var(--accent); font-size: 1.06rem; line-height: 1; }
.audit-row[open] > summary::after { content: "−"; }
.audit-row > summary:hover { background: var(--soft); }
.audit-record { display: grid; min-width: 0; }
.audit-record > strong { font-size: .94rem; }
.audit-record small, .audit-trigger, .audit-duration { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.audit-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.audit-details { padding: 9px 10px 12px; border-radius: 7px; margin-bottom: 8px; background: var(--soft); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.detail-grid div { overflow-wrap: anywhere; min-width: 0; }
.detail-grid div:first-child { grid-column: 1 / -1; }
.detail-grid dt { color: var(--muted); font-size: .79rem; }
.detail-grid dd { font-size: .9rem; margin: 2px 0 0; }
.detail-grid .text-button { justify-content: start; text-align: left; min-height: 28px; padding: 0; }
.record-id { font-family: "Cascadia Mono", monospace; }
.status-completed { color: #23534a; background: #e7f3ef; border-color: #d0e3db; }
.status-degraded, .status-clarification { color: #764918; background: #fbf1e3; border-color: #eddac0; }
.status-failed, .status-audit_error { color: #8b2229; background: #f9edef; border-color: #f0d7d9; }
.status-running, .status-queued { color: #365668; background: #edf4f7; border-color: #d8e6ed; }
.stage-list li { margin-block: 4px; }
.stage-list li span { margin-inline-start: 6px; }
.stage-list li small { display: block; }
.audit-stages, .missing-evidence { margin-top: 12px; }
.audit-stages h3, .missing-evidence strong { font-size: .9rem; }
.audit-stages ul { display: grid; gap: 5px; margin: 5px 0 0; padding: 0; list-style: none; }
.audit-stages li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .84rem; }
.audit-stages small, .missing-evidence p { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.load-more { margin-top: 12px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 11px;
  min-height: 48px; border-bottom: 1px solid var(--line); padding-bottom: 10px;
}
.setting-row p { margin-top: 4px; }
.setting-row select { width: auto; min-width: 85px; }
.switch { position: relative; display: inline-flex; flex: none; align-items: center; min-height: 44px; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 1; cursor: pointer; }
.switch span { display: flex; align-items: center; width: 48px; height: 26px; padding: 3px; border: 1px solid #879490; border-radius: 20px; background: #e5eae8; }
.switch span::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #637570; }
.switch input:checked + span { justify-content: end; background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::before { background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
.member-form, .invite-code { margin-top: 14px; }
.invite-code { display: flex; align-items: end; gap: 8px; margin-bottom: 12px; }
.invite-code label { flex: 1; }
.invite-code input { font-family: "Cascadia Mono", monospace; }
.invite-card .plain-list { margin-top: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 14px; }
.metric { min-height: 123px; display: grid; align-content: center; gap: 5px; }
.metric h2 { font-size: .94rem; }
.metric strong { font: 720 clamp(1.37rem, 3.5vw, 2.04rem)/1.2 system-ui, sans-serif; color: var(--accent); font-variant-numeric: tabular-nums; }
.metric-grid ~ .card { margin-top: 13px; }
.intent-table { overflow-x: auto; margin-top: 9px; }
.intent-table table { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.intent-table :is(th, td) { padding: 7px 6px; text-align: right; white-space: nowrap; }
.intent-table :is(th:first-child, .reasons-narrow, .reasons-wide) { text-align: left; }
.intent-table td:is(.reasons-narrow, .reasons-wide) { white-space: normal; min-width: 12em; color: var(--muted); }
.intent-table .reasons-narrow { display: none; }
.intent-table thead { color: var(--muted); }
.intent-table tbody tr { border-top: 1px solid var(--line); }
.intent-table tbody th { font-weight: 500; }
.page-heading .filter-row label { white-space: nowrap; }
@media (max-width: 600px) {
  /* Reasons right after the type, so they are readable without scrolling the table sideways. */
  .intent-table .reasons-narrow { display: table-cell; }
  .intent-table .reasons-wide { display: none; }
  .intent-table td.reasons-narrow { min-width: 8.5em; }
  .intent-table thead th { vertical-align: bottom; }
  /* Only the long scope header wraps, and only before 「（不计降级）」. */
  .intent-table thead th:nth-last-child(2) { white-space: normal; }
  .intent-table thead .nowrap { white-space: nowrap; }
}
.provider-form h2 + p { margin-top: 4px; }
.provider-fields { display: grid; gap: 10px; margin-top: 11px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.provider-field { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 11px; }
.provider-field-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; overflow-wrap: anywhere; }
.provider-field p { margin-bottom: 6px; }
@media (max-width: 780px) {
  .chat-grid { grid-template-columns: minmax(15rem, .55fr) minmax(0, 1fr); gap: 12px; }
  .card { padding: 15px; }
  .chat-card { padding: 0; }
  .overview-grid { gap: 12px; }
  .audit-row > summary { grid-template-columns: minmax(0, 1fr) minmax(125px, .75fr) auto; }
  .audit-trigger, .audit-duration { display: none; }
}
@media (max-width: 650px) {
  .bar-inner { min-height: 54px; padding-inline: max(14px, env(safe-area-inset-left)); }
  .brand { font-size: 1.28rem; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .member-name { max-width: 8rem; }
  .desktop-nav, .chat-sidebar { display: none; }
  .mobile-nav {
    display: flex; position: fixed; inset: auto 0 0; z-index: 4; background: var(--paper);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav button { flex: 1; display: grid; justify-items: center; align-content: center; min-height: 55px; gap: 0; font-size: .78rem; }
  .mobile-nav .nav-icon { width: 1.22rem; height: 1.22rem; margin-bottom: 2px; }
  .wrap { padding: 21px max(12px, env(safe-area-inset-left)) calc(80px + env(safe-area-inset-bottom)); }
  .page-heading { align-items: flex-start; margin-bottom: 16px; gap: 10px; }
  .page-heading p { font-size: .85rem; margin-top: 5px; overflow-wrap: anywhere; }
  .page-actions { flex-wrap: wrap; justify-content: flex-end; gap: 5px; flex: none; }
  .page-actions .button { white-space: nowrap; padding-inline: 8px; }
  .page-actions .mobile-history, .page-actions .mobile-strategies { display: inline-flex; }
  .page-actions .mobile-strategies { color: var(--accent-dark); border-color: #ecd4d6; background: var(--accent-soft); }
  .member-chat-shell .mobile-nav { position: static; }
  .wrap.chat-workspace { padding-block: 8px; }
  .chat-workspace .chat-heading { align-items: center; margin-bottom: 8px; gap: 7px; }
  .chat-workspace .page-actions { display: flex; flex-wrap: wrap; flex: 0 1 auto; }
  .chat-grid, .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-card { grid-column: 1; }
  .composer { padding: 8px; }
  .composer-input { align-items: flex-end; padding: 6px; border-radius: 10px; }
  .composer textarea { min-height: 48px; }
  .button, .text-button, .starter { min-height: 43px; }
  .answer-actions .deep-action { flex: 0 0 100%; min-height: 44px; }
  .report-page { gap: 12px; }
  .report-market-group .report-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-strategy-conditions summary { min-height: 44px; }
  .report-page .report-hero.has-score, .report-hero.has-score { grid-template-columns: minmax(0, 1fr) minmax(98px, 114px); }
  .report-hero { gap: 12px; padding: 14px; }
  .report-score { padding: 8px 9px; }
  .report-signals dd, .report-facts dd { font-size: .875rem; }
  .turns { padding-inline: 13px; }
  .prose { font-size: .94rem; }
  .form-stack input, .form-stack select, .inline-form input, .invite-code input { font-size: 1rem; }
  .announcer { bottom: calc(69px + env(safe-area-inset-bottom)); }
  .member-chat-shell + .announcer { top: calc(116px + env(safe-area-inset-top)); }
  .login-page { grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
  .login-side { display: none; }
  .login-card { padding: 35px clamp(19px, 7vw, 42px); }
  .admin-wrap { padding-bottom: 35px; }
  .admin-nav { margin-bottom: 14px; }
  .admin-nav button { padding-inline: 7px; min-height: 38px; font-size: .82rem; }
  .admin-account .quiet { display: none; }
  .admin-account .button { min-height: 38px; }
  .admin-wrap .button { max-width: 100%; }
  .detail-grid, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-fields { grid-template-columns: minmax(0, 1fr); }
}
@container fstock-chat (max-height: 420px) {
  .member-chat-shell:has(.composer textarea:focus) .mobile-nav { display: none; }
}
@media (max-width: 365px) {
  .page-actions { display: grid; }
  .page-actions .button { min-height: 36px; }
  .admin-nav { gap: 3px; }
  .admin-nav button { padding-inline: 4px; }
  .audit-row > summary { grid-template-columns: minmax(0, 1fr) minmax(91px, .75fr) auto; gap: 5px; }
  .audit-badges { gap: 3px; }
  .audit-badges .tag { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

