:root {
  --paper: #f3efe6;
  --paper-deep: #eae4d8;
  --sheet: #fbf8f0;
  --ink: #202824;
  --ink-soft: #3f4943;
  --muted: #737970;
  --line: #d5cec0;
  --line-dark: #aaa294;
  --red: #a94035;
  --red-dark: #853229;
  --red-pale: #f1dfda;
  --green: #197261;
  --green-dark: #115449;
  --green-pale: #dce9e2;
  --brass: #94743d;
  --brass-pale: #eee5d2;
  --gray: #858782;
  --serif: "Songti SC", "Noto Serif CJK SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  --number: "DIN Alternate", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--sheet);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }
.site-shell { width: min(1540px, calc(100% - 64px)); margin: 0 auto; }
.topbar { border-bottom: 3px double var(--ink); }
.brand-row {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-dark);
}
.brand { display: flex; align-items: center; gap: 17px; }
.brand-seal {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--sheet);
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  border: 1px solid var(--red-dark);
  box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px rgba(251,248,240,.65);
}
.brand h1 { margin: 0 0 2px; font-family: var(--serif); font-size: 38px; line-height: 1.1; letter-spacing: .16em; font-weight: 700; }
.brand p { margin: 0; color: var(--ink-soft); font-family: var(--number); font-size: 11px; letter-spacing: .16em; }
.brand p span { color: var(--red); padding: 0 7px; }
.edition-mark { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-family: var(--number); font-size: 11px; letter-spacing: .15em; }
.edition-mark time { margin-top: 6px; color: var(--ink); font-size: 13px; letter-spacing: .08em; }
.search-deck { padding: 20px 0 15px; }
.search-form { display: grid; grid-template-columns: minmax(230px, 1.25fr) minmax(130px, .65fr) minmax(130px, .65fr) auto; gap: 12px; align-items: end; }
.search-form label { display: flex; flex-direction: column; gap: 6px; color: var(--ink-soft); font-size: 12px; letter-spacing: .04em; }
.search-form label small { color: var(--muted); font-size: 10px; font-weight: 400; }
.search-form input {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--sheet);
  color: var(--ink);
  padding: 0 12px;
  font-family: var(--number);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  transition: border-color .16s, background-color .16s;
}
.search-form input:hover { border-color: var(--ink-soft); }
.search-form input:focus { border-color: var(--brass); background: #fffdf7; }
.search-form input::placeholder { color: #aaa99f; }
.code-input-wrap { display: flex; position: relative; }
.code-input-wrap b { position: absolute; left: 12px; top: 11px; z-index: 1; color: var(--red); font-family: var(--number); font-size: 12px; letter-spacing: .08em; pointer-events: none; }
.code-input-wrap input { padding-left: 43px; font-size: 21px; letter-spacing: .15em; font-weight: 700; }
.code-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 288px;
  overflow-y: auto;
  border: 1px solid var(--ink);
  background: #fffdf7;
  box-shadow: 0 14px 30px rgba(32, 40, 36, .14);
}
.code-suggest-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.code-suggest-item:last-child { border-bottom: 0; }
.code-suggest-item:hover, .code-suggest-item.is-active { background: var(--paper-deep); }
.suggest-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.suggest-name mark { background: transparent; color: var(--red); font-weight: 700; }
.suggest-code { color: var(--ink-soft); font-family: var(--number); font-size: 12px; letter-spacing: .08em; }
.suggest-type { flex: 0 0 auto; color: var(--muted); font-size: 9px; letter-spacing: .05em; }
.form-actions { display: flex; gap: 8px; }
.button {
  height: 43px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  transition: background-color .16s, color .16s, border-color .16s;
}
.button-primary { background: var(--ink); color: var(--sheet); }
.button-primary:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
.button-secondary { border-color: var(--line-dark); color: var(--ink-soft); }
.button-secondary:hover:not(:disabled) { border-color: var(--ink); background: var(--paper-deep); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.form-error { margin: 10px 0 0; padding-left: 12px; border-left: 3px solid var(--red); color: var(--red-dark); font-size: 12px; }
.recent-row { display: flex; align-items: center; gap: 12px; min-height: 30px; margin-top: 13px; }
.recent-label { color: var(--muted); font-size: 11px; white-space: nowrap; }
.recent-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.recent-code {
  padding: 2px 8px;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--number);
  font-size: 12px;
  letter-spacing: .08em;
}
.recent-code:hover:not(:disabled) { color: var(--red); border-color: var(--red); }
.recent-code:disabled { opacity: .45; cursor: wait; }
.recent-empty { color: var(--muted); font-size: 11px; }
.search-hint { margin-left: auto; color: var(--muted); font-size: 11px; }
.screener-link { color: var(--red); font-size: 12px; text-decoration: none; border-bottom: 1px solid var(--red); white-space: nowrap; }
.screener-link:hover { color: var(--red-dark); border-color: var(--red-dark); }

main { min-height: 520px; }
.view-states { padding-top: 24px; }
.state-panel { min-height: 210px; display: flex; align-items: center; justify-content: center; gap: 24px; border-bottom: 1px solid var(--line); text-align: left; }
.state-panel strong { display: block; font-family: var(--serif); font-size: 24px; letter-spacing: .06em; }
.state-panel p { margin: 7px 0 0; color: var(--muted); }
.state-index { color: var(--line-dark); font-family: var(--number); font-size: 12px; letter-spacing: .16em; }
.error-panel strong, .error-panel .state-index { color: var(--red); }
.text-button { margin-top: 13px; padding: 0 0 2px; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--red); cursor: pointer; }
.loading-rule { width: 52px; height: 52px; border: 1px solid var(--line-dark); border-top: 3px solid var(--red); border-radius: 50%; animation: turn 1s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.quote-board {
  display: grid;
  grid-template-columns: 1.2fr auto minmax(330px, .85fr);
  align-items: center;
  gap: 34px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--ink);
}
.section-kicker { margin: 0 0 7px; color: var(--brass); font-family: var(--number); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.stock-title-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.stock-title-line h2 { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; letter-spacing: .06em; }
.stock-code { color: var(--muted); font-family: var(--number); font-size: 18px; letter-spacing: .12em; }
.status-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 7px; border: 1px solid var(--line-dark); color: var(--ink-soft); font-size: 10px; font-weight: 500; line-height: 1.4; letter-spacing: .05em; }
.status-badge.is-ok, .status-badge.is-action { border-color: var(--green); color: var(--green-dark); background: var(--green-pale); }
.status-badge.is-warn { border-color: var(--brass); color: #705522; background: var(--brass-pale); }
.status-badge.is-bad { border-color: var(--red); color: var(--red-dark); background: var(--red-pale); }
.quote-time { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.quote-main { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.quote-price { font-family: var(--number); font-size: clamp(40px, 4.4vw, 58px); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.quote-pct { margin-top: 9px; font-family: var(--number); font-size: 17px; font-weight: 700; }
.up-text { color: var(--red) !important; }
.down-text { color: var(--green) !important; }
.flat-text { color: var(--ink-soft) !important; }
.quote-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.quote-grid div { padding: 2px 15px; border-left: 1px solid var(--line); }
.quote-grid dt { color: var(--muted); font-size: 10px; }
.quote-grid dd { margin: 4px 0 0; font-family: var(--number); font-size: 16px; font-variant-numeric: tabular-nums; }
.data-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line-dark); }
.data-strip > div { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); }
.data-strip > div:first-child { padding-left: 0; }
.data-strip > div:nth-child(6) { border-right: 0; }
.data-strip span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .04em; }
.data-strip strong { display: block; overflow: hidden; margin-top: 3px; font-family: var(--number); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meta-source { grid-column: 1 / -1; margin: 0; padding: 5px 0; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--number); font-size: 10px; text-align: right; letter-spacing: .03em; }
.level-switcher { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 18px 0; border-bottom: 1px solid var(--line-dark); }
.level-copy { min-width: 0; }
.level-copy .section-kicker { margin-bottom: 4px; }
.level-copy > p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.level-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(132px, 1fr)); border: 1px solid var(--line-dark); background: var(--sheet); }
.level-tab { min-height: 48px; padding: 7px 16px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; text-align: left; white-space: nowrap; }
.level-tab:last-child { border-right: 0; }
.level-tab small { margin-left: 8px; color: var(--muted); font-size: 9px; font-weight: 400; letter-spacing: .04em; }
.level-tab:hover:not(:disabled):not([aria-selected="true"]) { background: var(--paper-deep); color: var(--ink); }
.level-tab[aria-selected="true"] { background: var(--ink); color: var(--sheet); }
.level-tab[aria-selected="true"] small { color: #c8a967; }
.level-tab:disabled { opacity: .45; cursor: not-allowed; }
.level-tab:focus-visible, .period-tab:focus-visible { position: relative; z-index: 2; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding: 30px 0 34px; align-items: start; }
.chart-section { min-width: 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 23px; line-height: 1.25; letter-spacing: .05em; }
.section-meta { margin: 6px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .02em; }
.chart-stock { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; font-weight: 600; letter-spacing: .05em; }
.range-note { color: var(--muted); font-family: var(--number); font-size: 11px; white-space: nowrap; }
.period-tabs { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line-dark); border-bottom: 0; }
.period-tab { min-height: 43px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; white-space: nowrap; }
.period-tab:last-child { border-right: 0; }
.period-tab span { margin-right: 7px; color: var(--line-dark); font-family: var(--number); font-size: 9px; }
.period-tab:hover:not(:disabled) { background: var(--paper-deep); color: var(--ink); }
.period-tab:disabled { opacity: .45; cursor: not-allowed; }
.period-tab[aria-selected="true"] { background: var(--ink); color: var(--sheet); }
.period-tab[aria-selected="true"] span { color: #c8a967; }
.chart-panel { position: relative; border: 1px solid var(--line-dark); background: var(--sheet); }
.main-chart { width: 100%; height: 560px; }
.chart-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 30px; background: var(--sheet); color: var(--muted); text-align: center; }
.chart-message.is-error { color: var(--red); }
.chart-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; padding: 10px 0 0; color: var(--muted); font-size: 10px; }
.chart-caption p { margin: 0 0 0 auto; text-align: right; }
.legend-key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend-key i { width: 8px; height: 8px; display: inline-block; }
.key-up { background: var(--red); }
.key-down { background: var(--green); }
.key-invalid { border: 1px dashed var(--gray); }
.research-rail { border-top: 3px solid var(--ink); }
.rail-section { padding: 18px 0 20px; border-bottom: 1px solid var(--line-dark); }
.rail-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.rail-heading span { color: var(--brass); font-family: var(--number); font-size: 10px; }
.rail-heading h2 { margin: 0; font-family: var(--serif); font-size: 18px; letter-spacing: .08em; }
.rail-time { margin-left: auto; color: var(--muted); font-family: var(--number); font-size: 10px; white-space: nowrap; }
#strategy-time { padding: 2px 8px; border: 1px solid var(--line-dark); color: var(--ink); font-size: 13px; font-weight: 700; background: rgba(0,0,0,0.035); }
.rail-meta { margin: 0 0 12px; padding-bottom: 9px; border-bottom: 1px dotted var(--line); color: var(--muted); font-size: 10px; line-height: 1.6; }
.narrative-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.conclusion-card {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-soft);
  background: rgba(251, 248, 240, .6);
}
.conclusion-head { display: flex; align-items: flex-start; gap: 8px; }
.conclusion-tag {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 1px 6px;
  border: 1px solid var(--line-dark);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .06em;
  white-space: nowrap;
}
.conclusion-head strong { flex: 1; min-width: 0; color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.65; }
.conclusion-body { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.conclusion-card[data-tone="background"] { border-left-color: var(--brass); }
.conclusion-card[data-tone="structure"] { border-left-color: var(--ink-soft); }
.conclusion-card[data-tone="signal"] { border-left-color: var(--red); }
.conclusion-card[data-tone="invalid"] { border-left-color: var(--gray); }
.conclusion-card[data-tone="watch"] { border-left-color: var(--brass); }
.conclusion-card[data-tone="sublevel"] { border-left-color: var(--green); }
.conclusion-card[data-tone="strategy"] { border-left-color: var(--red-dark); }
.conclusion-card[data-tone="background"] .conclusion-tag,
.conclusion-card[data-tone="watch"] .conclusion-tag { border-color: transparent; background: var(--brass-pale); color: #745a2b; }
.conclusion-card[data-tone="signal"] .conclusion-tag { border-color: transparent; background: var(--red-pale); color: var(--red-dark); }
.conclusion-card[data-tone="invalid"] .conclusion-tag { border-color: transparent; background: #e5e4df; color: #666964; }
.conclusion-card[data-tone="sublevel"] .conclusion-tag { border-color: transparent; background: rgba(25, 114, 97, .08); color: var(--green); }
.conclusion-card[data-tone="strategy"] .conclusion-tag { border-color: transparent; background: var(--red-dark); color: var(--sheet); }
.empty-copy { color: var(--muted); font-size: 12px; }
.structure-state { padding: 10px 0; border-top: 1px solid var(--line); }
.structure-state > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.structure-state b { font-size: 12px; font-weight: 500; }
.structure-state strong { color: var(--red-dark); font-family: var(--serif); font-size: 14px; }
.structure-state p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.levels-list, .strategy-list { margin: 0; }
.levels-list > div, .strategy-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px dotted var(--line); }
.levels-list dt, .strategy-list dt { color: var(--muted); font-size: 11px; }
.levels-list dd, .strategy-list dd { margin: 0; font-family: var(--number); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.levels-list .level-emphasis dd { color: var(--red); font-size: 18px; }
.strategy-action-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.strategy-action-line > strong { font-family: var(--serif); font-size: 23px; color: var(--red-dark); }
.strategy-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.signals-section { padding: 30px 0 34px; border-top: 3px double var(--ink); }
.signals-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); }
.signal-item { position: relative; min-width: 0; padding: 18px 20px 18px 24px; border-bottom: 1px solid var(--line); }
.signal-item:nth-child(odd) { border-right: 1px solid var(--line); }
.signal-item::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 3px; background: var(--red); }
.signal-item.state-pending::before { background: var(--brass); }
.signal-item.state-invalid::before { background: var(--gray); }
.signal-item.state-invalid { color: #626761; }
.signal-item.is-observation { background: rgba(238,229,210,.24); }
.signal-item.is-observation::before { background: var(--brass); }
.signal-item.is-observation.state-invalid::before { background: var(--gray); }
.signal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.signal-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.signal-title h3 { margin: 0; font-family: var(--serif); font-size: 18px; letter-spacing: .06em; }
.signal-state { padding: 1px 6px; background: var(--red-pale); color: var(--red-dark); font-size: 9px; letter-spacing: .08em; }
.state-pending .signal-state { background: var(--brass-pale); color: #745a2b; }
.state-invalid .signal-state { background: #e5e4df; color: #666964; }
.origin-state { color: var(--muted); font-size: 10px; }
.observation-state { padding: 1px 6px; border: 1px solid var(--brass); color: #705522; background: var(--brass-pale); font-size: 9px; letter-spacing: .04em; }
.signal-time { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.signal-time-label { padding: 1px 5px; border: 1px solid var(--line-dark); color: var(--muted); font-size: 9px; letter-spacing: .05em; }
.signal-time time { color: var(--ink); font-family: var(--number); font-size: 13px; font-weight: 700; }
.signal-price-line { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }
.signal-price { font-family: var(--number); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
.signal-distance { color: var(--muted); font-family: var(--number); font-size: 11px; }
.signal-metrics { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 9px 0 0; }
.signal-metrics div { display: flex; gap: 5px; font-size: 10px; }
.signal-metrics dt { color: var(--muted); }
.signal-metrics dd { margin: 0; font-family: var(--number); }
.signal-note { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.invalidation-note { margin-top: 10px; padding: 8px 10px; border-left: 2px dashed var(--gray); background: #ebe9e2; color: #60645f; font-size: 11px; }
.invalidation-note p { margin: 0; }
.invalidation-note p + p { margin-top: 3px; }
.review-details { margin-bottom: 34px; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.review-details summary { position: relative; display: flex; align-items: center; gap: 16px; min-height: 52px; cursor: pointer; list-style: none; }
.review-details summary::-webkit-details-marker { display: none; }
.review-details summary::after { content: "+"; margin-left: 4px; color: var(--brass); font-family: var(--number); font-size: 18px; }
.review-details[open] summary::after { content: "−"; }
.review-details summary > span { font-family: var(--serif); font-size: 16px; }
.review-details summary strong { color: var(--brass); font-size: 12px; }
.review-details summary small { margin-left: auto; color: var(--muted); font-size: 10px; }
.review-body { padding: 4px 0 20px; }
.review-message { margin: 0 0 14px; color: var(--ink-soft); font-size: 12px; }
.review-windows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.review-window { padding: 14px 16px; border: 1px solid var(--line); background: rgba(251,248,240,.45); }
.review-window h3 { margin: 0; font-family: var(--serif); font-size: 15px; }
.review-window > p { margin: 3px 0 10px; color: var(--muted); font-family: var(--number); font-size: 10px; }
.review-window dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; font-size: 11px; }
.review-window dt { color: var(--muted); }
.review-window dd { margin: 0; text-align: right; }
.review-checks { margin-top: 13px; color: var(--muted); font-size: 11px; }
.review-checks p { margin: 4px 0; }
.method-footer { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; padding: 28px 0 36px; border-top: 3px double var(--ink); }
.method-footer h2 { margin: 0; font-family: var(--serif); font-size: 23px; letter-spacing: .06em; }
.method-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.method-copy .disclaimer { margin-top: 10px; color: var(--ink-soft); }

/* 游客结构版：策略建议相关区块整体隐藏 */
body[data-audience="guest"] .strategy-only { display: none !important; }
.guest-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 16px 0 0; padding: 13px 16px; border: 1px solid var(--line-dark); border-left: 3px solid var(--brass); background: rgba(238, 229, 210, .55); }
.guest-banner[hidden] { display: none; }
.guest-banner strong { font-family: var(--serif); font-size: 15px; letter-spacing: .06em; }
.guest-banner p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.guest-login { flex: 0 0 auto; color: var(--red-dark); font-size: 12px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--red-dark); }
.guest-login:hover { color: var(--red); border-bottom-color: var(--red); }

@media (max-width: 1180px) {
  .site-shell { width: min(100% - 40px, 1540px); }
  .search-form { grid-template-columns: 1.2fr .7fr .7fr; }
  .form-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .quote-board { grid-template-columns: 1fr auto; }
  .quote-grid { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; }
  .quote-grid div:first-child { border-left: 0; padding-left: 0; }
  .data-strip { grid-template-columns: repeat(3, 1fr); }
  .data-strip > div:nth-child(3) { border-right: 0; }
  .data-strip > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .workspace { grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .research-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .rail-section:nth-child(odd) { border-right: 0; }
  .strategy-section { grid-row: span 2; }
  .quote-board { gap: 20px; }
  .signals-list { grid-template-columns: 1fr; }
  .signal-item:nth-child(odd) { border-right: 0; }
}

@media (max-width: 640px) {
  .site-shell { width: calc(100% - 28px); }
  .brand-row { min-height: 100px; gap: 10px; }
  .brand { gap: 11px; }
  .brand-seal { width: 43px; height: 43px; font-size: 26px; }
  .brand h1 { font-size: 30px; }
  .brand p { max-width: 210px; font-size: 8px; letter-spacing: .1em; }
  .brand p span { padding: 0 3px; }
  .edition-mark { display: none; }
  .search-deck { padding-top: 16px; }
  .search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .code-field { grid-column: 1 / -1; }
  .form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .button { padding: 0 10px; }
  .recent-row { align-items: flex-start; flex-wrap: wrap; gap: 5px 10px; }
  .recent-codes { flex: 1; }
  .search-hint { width: 100%; margin: 2px 0 0; }
  .state-panel { min-height: 180px; gap: 15px; padding: 20px; }
  .state-panel strong { font-size: 20px; }
  .loading-rule { width: 38px; height: 38px; flex: 0 0 auto; }
  .quote-board { grid-template-columns: 1fr auto; padding-top: 22px; gap: 15px; }
  .stock-title-line { gap: 8px; }
  .stock-title-line h2 { font-size: 27px; }
  .stock-code { font-size: 14px; }
  .quote-price { font-size: 38px; }
  .quote-pct { font-size: 14px; }
  .quote-grid { grid-template-columns: repeat(2, 1fr); row-gap: 10px; }
  .quote-grid div:nth-child(3) { border-left: 0; padding-left: 0; }
  .data-strip { grid-template-columns: repeat(2, 1fr); }
  .data-strip > div { padding: 10px 8px; border-bottom: 1px solid var(--line); }
  .data-strip > div:first-child { padding-left: 8px; }
  .data-strip > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .data-strip > div:nth-child(even) { border-right: 0; }
  .data-strip > div:nth-child(3) { border-right: 1px solid var(--line); }
  .meta-source { text-align: left; white-space: normal; }
  .level-switcher { align-items: stretch; flex-direction: column; gap: 12px; padding: 16px 0; }
  .level-tabs { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .level-tab { padding: 7px 8px; text-align: center; }
  .level-tab small { margin-left: 4px; }
  .workspace { padding-top: 24px; }
  .section-heading { align-items: flex-start; margin-bottom: 13px; }
  .section-heading h2 { font-size: 20px; }
  .chart-heading-row .range-note { padding-top: 4px; white-space: normal; text-align: right; }
  .period-tabs { grid-template-columns: repeat(2, 1fr); }
  .period-tab { border-bottom: 1px solid var(--line); }
  .period-tab:nth-child(even) { border-right: 0; }
  .period-tab:nth-last-child(2) { border-bottom: 0; }
  .period-tab:last-child { grid-column: auto; border-right: 0; border-bottom: 0; }
  .main-chart { height: 470px; }
  .chart-caption { gap: 8px 12px; }
  .chart-caption p { width: 100%; margin-left: 0; text-align: left; }
  .research-rail { display: block; }
  .strategy-section { grid-row: auto; }
  .signals-section { padding-top: 24px; }
  .signals-heading-row { display: block; }
  .signals-heading-row .range-note { display: block; margin-top: 7px; }
  .signal-item { padding-right: 4px; }
  .signal-header { display: block; }
  .signal-time { display: flex; margin-top: 5px; }
  .review-details summary { flex-wrap: wrap; gap: 5px 12px; padding: 10px 0; }
  .review-details summary small { width: 100%; margin-left: 0; }
  .review-details summary::after { position: absolute; right: 18px; }
  .review-windows { grid-template-columns: 1fr; }
  .method-footer { grid-template-columns: 1fr; gap: 18px; }
}

.fundamental-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
}
.fundamental-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.fundamental-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
}
.fundamental-meta { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.fundamental-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  margin: 14px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.fundamental-metrics > div {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fundamental-metrics dt { color: var(--muted); font-size: 10px; white-space: nowrap; }
.fundamental-metrics dd {
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--number);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.fundamental-comment {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brass);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
}
.fundamental-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.fundamental-links a {
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--ink-soft);
  font-size: 11px;
  text-decoration: none;
}
.fundamental-links a:hover { color: var(--red); border-color: var(--red); }

.fundamental-news { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fundamental-news-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
.fundamental-news-title small { color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: 0; }
.fundamental-news-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fundamental-news-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
}
.fundamental-news-list .news-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--number);
  font-size: 11px;
  letter-spacing: .04em;
}
.fundamental-news-list a {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.fundamental-news-list a:hover { color: var(--red); border-color: var(--red); }
.fundamental-news-list .news-media { flex: 0 0 auto; color: var(--muted); font-size: 10px; }

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

/* ===== 用户体系 / 自选 / 访客验证 ===== */
.brand-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.brand-title-link { color: inherit; text-decoration: none; }
.brand-title-link:hover { color: var(--red); }
.account-bar { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-soft); }
.account-user { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.account-link { padding: 0; border: 0; background: none; color: var(--ink-soft); font-family: inherit; font-size: 12px; text-decoration: none; border-bottom: 1px solid transparent; cursor: pointer; }
.account-link:hover { color: var(--red); border-color: var(--red); }
.account-login { display: inline-block; padding: 6px 14px; border: 1px solid var(--ink); background: var(--ink); color: var(--sheet); font-size: 12px; letter-spacing: .06em; text-decoration: none; }
.account-login:hover { border-color: var(--red); background: var(--red); color: var(--sheet); }

.watch-button { padding: 4px 12px; border: 1px dashed var(--brass); background: transparent; color: var(--brass); font-family: inherit; font-size: 12px; letter-spacing: .04em; cursor: pointer; }
.watch-button:hover:not(:disabled) { background: var(--brass-pale); }
.watch-button.is-added { border-style: solid; border-color: var(--green); color: var(--green); cursor: default; }
.watch-button:disabled { opacity: 1; }

.chan-toast { position: fixed; left: 50%; bottom: 34px; z-index: 120; max-width: 80vw; padding: 10px 18px; background: rgba(32, 40, 36, .94); color: var(--sheet); font-size: 13px; letter-spacing: .04em; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.chan-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.auth-modal { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-modal-mask { position: absolute; inset: 0; background: rgba(24, 30, 27, .5); }
.auth-modal-card { position: relative; width: min(420px, 100%); padding: 28px 28px 24px; border: 1px solid var(--line-dark); background: var(--sheet); box-shadow: 0 24px 60px rgba(20, 24, 22, .28); }
.auth-modal-card h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 22px; letter-spacing: .04em; }
.auth-modal-note { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.auth-modal-note a { color: var(--red); }
.auth-modal-field { display: flex; flex-direction: column; gap: 8px; }
.auth-modal-field > label { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.auth-modal-field input { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-dark); background: var(--paper); color: var(--ink); font-family: inherit; font-size: 15px; letter-spacing: .18em; text-transform: uppercase; }
.auth-captcha-row { display: flex; align-items: flex-end; gap: 10px; }
.auth-captcha-row img { flex: 0 0 auto; width: 118px; height: 44px; border: 1px solid var(--line-dark); background: var(--paper); object-fit: cover; cursor: pointer; }
.auth-modal-error { margin: 10px 0 0; color: var(--red); font-size: 12px; }
.auth-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.account-topbar { padding-bottom: 10px; }
.account-main { padding: 30px 0 70px; }
.auth-card { max-width: 540px; margin: 0 auto; padding: 32px 34px 36px; border: 1px solid var(--line); background: var(--sheet); }
.auth-card-head h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 26px; letter-spacing: .04em; }
.auth-card-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.auth-tabs { display: flex; margin: 22px 0 20px; border-bottom: 1px solid var(--line-dark); }
.auth-tab { flex: 1; padding: 10px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-family: inherit; font-size: 14px; letter-spacing: .1em; cursor: pointer; }
.auth-tab.is-active { border-color: var(--red); color: var(--ink); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; color: var(--ink-soft); font-size: 12px; letter-spacing: .04em; }
.auth-form label small { color: var(--muted); font-size: 10px; }
.auth-form input { padding: 10px 12px; border: 1px solid var(--line-dark); background: var(--paper); color: var(--ink); font-family: inherit; font-size: 14px; }
.auth-form input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.auth-form .auth-captcha-row label { flex: 1 1 auto; }
.auth-form .auth-captcha-row input { width: 100%; }
.auth-sms-row { display: flex; align-items: flex-end; gap: 10px; }
.auth-sms-row label { flex: 1 1 auto; }
.auth-sms-row .button { white-space: nowrap; }
.form-error { margin: 12px 0 0; color: var(--red); font-size: 12px; }

.account-panel { max-width: 980px; margin: 0 auto; }
.account-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.account-head h2 { margin: 0; font-family: var(--serif); font-size: 30px; letter-spacing: .08em; }
.account-meta { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-card { padding: 22px 24px 26px; border: 1px solid var(--line); background: var(--sheet); }
.account-card h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 19px; letter-spacing: .06em; }
.account-card-wide { grid-column: 1 / -1; }
.account-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.account-card-head h3 { margin: 0; }
.account-card-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.account-facts { display: flex; gap: 28px; margin: 0 0 16px; }
.account-facts dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.account-facts dd { margin: 0; font-family: var(--number); font-size: 13px; }
.watch-table-wrap { overflow-x: auto; }
.watch-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.watch-table th { padding: 9px 10px; border-bottom: 2px solid var(--ink); color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-align: left; white-space: nowrap; }
.watch-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.watch-name { font-weight: 600; }
.watch-code { color: var(--muted); font-family: var(--number); font-size: 11px; }
.watch-date, .watch-price { font-family: var(--number); white-space: nowrap; }
.watch-note { width: 100%; min-width: 120px; padding: 6px 8px; border: 1px solid var(--line-dark); background: var(--paper); color: var(--ink); font-family: inherit; font-size: 12px; }
.watch-actions { display: flex; gap: 8px; white-space: nowrap; }
.watch-action { padding: 4px 10px; border: 1px solid var(--line-dark); background: transparent; color: var(--ink-soft); font-family: inherit; font-size: 12px; cursor: pointer; }
.watch-action:hover:not(:disabled) { border-color: var(--ink); background: var(--paper-deep); }
.watch-action-danger { border-color: var(--red-pale); color: var(--red); }
.watch-action-danger:hover:not(:disabled) { border-color: var(--red); background: var(--red-pale); }
.watch-empty { margin: 12px 0 0; padding: 28px 0; color: var(--muted); font-size: 12px; text-align: center; }

.account-nav { display: flex; flex-wrap: wrap; margin: 0 0 18px; border-bottom: 1px solid var(--line-dark); }
.account-nav-item { padding: 10px 18px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-family: inherit; font-size: 13px; letter-spacing: .08em; cursor: pointer; }
.account-nav-item:hover { color: var(--ink); }
.account-nav-item.is-active { border-color: var(--red); color: var(--ink); }
.account-nav-count { margin-left: 6px; color: var(--muted); font-family: var(--number); font-size: 11px; }
.account-view[hidden] { display: none; }
.watch-row { cursor: pointer; }
.watch-row:hover { background: var(--paper); }
.watch-row:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }
.watch-open { display: block; color: inherit; text-decoration: none; }
.watch-open:hover .watch-name { color: var(--red); }
.watch-date-note { margin-top: 2px; color: var(--muted); font-size: 10px; }
.watch-current { font-family: var(--number); }
.watch-gain { font-family: var(--number); font-weight: 600; white-space: nowrap; }
.watch-gain-up { color: var(--red, #c0392b); }
.watch-gain-down { color: #2e8b57; }
.watch-gain-flat { color: var(--muted); }
.watch-gain-na { color: var(--muted); font-weight: 400; }

/* ===== 自动选股 · 信号跟踪标签 ===== */
.outcome { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--line-dark); color: var(--ink-soft); margin-right: 6px; white-space: nowrap; }
.outcome-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.outcome-open .outcome-dot { background: #e67e22; }
.outcome-open { border-color: #e67e22; color: #b3651a; }
.outcome-closed .outcome-dot { background: #2e8b57; }
.outcome-closed { border-color: #2e8b57; color: #2e8b57; }
.outcome-invalid .outcome-dot { background: var(--red, #c0392b); }
.outcome-invalid { border-color: var(--red, #c0392b); color: var(--red, #c0392b); }
.outcome-na { color: var(--muted); font-size: 12px; }

.screen-back { color: var(--ink-soft); font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.screen-back:hover { color: var(--red); border-color: var(--red); }
.screen-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.screen-gate { margin-bottom: 22px; padding: 46px 30px; border: 1px solid var(--line); background: var(--sheet); text-align: center; }
.screen-gate h2 { margin: 6px 0 10px; font-family: var(--serif); font-size: 26px; letter-spacing: .06em; }
.screen-gate p { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.9; }
.screen-gate-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }

@media (max-width: 760px) {
  .brand-side { align-items: flex-start; }
  .account-grid { grid-template-columns: 1fr; }
  .screen-head-actions { align-items: flex-start; }
  .auth-card { padding: 26px 20px 30px; }
  .account-facts { flex-direction: column; gap: 10px; }
}

.data-stale {
  margin: 14px 0 0;
  padding: 11px 15px;
  border: 1px solid var(--brass);
  border-left: 4px solid var(--brass);
  background: var(--brass-pale);
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

.data-mode {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}

.data-mode[data-mode="cache"] {
  color: var(--brass);
  font-weight: 600;
}

.data-mode[data-mode="degraded"] {
  color: var(--red-dark);
  font-weight: 600;
}

.status-badge.is-stale {
  color: var(--red-dark);
  border-color: var(--red);
  background: var(--red-pale);
}
