:root {
  --accent: #9c3b22;
  --paper: #f6f2ea;
  --ink: #211d16;
  --muted: #7a7264;
  --line: #211d16;
  --soft-line: #d8d0be;
  --faint-line: #ece5d6;
  --card: #fdfcf9;
  --card-warm: #fbf6ec;
  --green: #2f5c3e;
  --green-2: #5a8150;
  --neutral: #8c7c52;
  --amber: #b3702c;
  --red: #a03d2a;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.sanlou-page {
  width: min(1060px, calc(100vw - 56px));
  margin: 54px auto 64px;
}

.sanlou-topline {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.24em;
}

.sanlou-titlebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--line);
}

.sanlou-name {
  display: flex;
  gap: 22px;
  align-items: baseline;
  min-width: 0;
}

.sanlou-name h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 5.2vw, 64px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: 0;
}

.sanlou-ticker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.sanlou-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.sanlou-tab {
  min-width: 80px;
  padding: 9px 15px;
  border: 1px solid #cfc7b4;
  background: var(--card);
  color: var(--ink);
  text-align: center;
  font-family: var(--serif);
  font-size: 14px;
}

.sanlou-tab.active {
  border-color: var(--line);
  background: var(--ink);
  color: var(--paper);
}

.sanlou-section {
  margin-top: 50px;
}

.sanlou-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.sanlou-section-num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.sanlou-section-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sanlou-section-sub {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 430px;
  gap: 28px;
  margin-top: 28px;
}

.price-main {
  min-width: 0;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
}

.price-value {
  font-family: var(--mono);
  font-size: clamp(48px, 6vw, 62px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.price-change {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.live-tag {
  padding: 5px 10px;
  border: 1px solid #c2bba9;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
  line-height: 1;
}

.live-tag.live {
  border-color: #3f6b4a;
  color: #3f6b4a;
}

.price-note,
.implied-note {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--faint-line);
}

.cap-metric {
  min-height: 76px;
  padding-right: 22px;
}

.cap-metric + .cap-metric {
  padding-left: 40px;
  border-left: 1px solid var(--faint-line);
}

.metric-label {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.metric-value {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.metric-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.position-card {
  min-height: 226px;
  padding: 23px 24px;
  border: 1px solid var(--soft-line);
  background: var(--card);
}

.position-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 18px;
}

.position-value {
  margin-top: 7px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.18;
}

.position-note {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--faint-line);
  color: var(--muted);
  font-size: 13px;
}

.band-block {
  margin-top: 40px;
}

.band-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}

.band-title,
.ladder-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.band-above {
  color: var(--muted);
  font-size: 12px;
}

.band-wrap {
  position: relative;
  margin-top: 42px;
}

.price-pill {
  position: absolute;
  top: -34px;
  left: var(--price-pct, 50%);
  transform: translateX(-50%);
  z-index: 2;
  padding: 4px 12px;
  background: var(--accent);
  color: var(--paper);
  box-shadow: 0 2px 0 rgba(33, 29, 22, .25);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.price-rail {
  position: relative;
  display: flex;
  height: 76px;
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 rgba(33, 29, 22, .12);
  overflow: visible;
}

.price-zone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 14px;
  overflow: hidden;
  border-right: 2px solid var(--line);
  color: #f9f6ef;
}

.price-zone:last-child {
  border-right: 0;
}

.price-zone b {
  font-size: 14px;
  line-height: 1.12;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(33, 29, 22, .3);
}

.price-zone span {
  margin-top: 4px;
  color: rgba(249, 246, 239, .85);
  font-family: var(--serif);
  font-size: 11.5px;
  white-space: nowrap;
}

.price-pin {
  position: absolute;
  top: -12px;
  bottom: -40px;
  left: var(--price-pct, 50%);
  width: 3px;
  transform: translateX(-50%);
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(246, 242, 234, .7);
}

.band-ticks {
  position: relative;
  height: 18px;
  margin-top: 8px;
  color: #4d463a;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
}

.band-tick {
  position: absolute;
  left: var(--tick-left);
  transform: translateX(-50%);
  white-space: nowrap;
}

.ladder-block {
  margin-top: 36px;
}

.ladder-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.floor-card {
  position: relative;
  min-height: 112px;
  padding: 16px 18px;
  border: 1px solid var(--soft-line);
  border-radius: 2px;
  background: var(--card);
}

.floor-card.active {
  border: 2px solid var(--accent);
  background: var(--card-warm);
}

.floor-sub {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.floor-name {
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
}

.floor-card.active .floor-name {
  color: var(--accent);
}

.floor-rule {
  margin-top: 8px;
  color: #6b655c;
  font-family: var(--mono);
  font-size: 12px;
}

.floor-current {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  background: var(--accent);
  color: var(--paper);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.verdict-strip {
  display: flex;
  gap: 0;
  margin-top: 16px;
  border: 1px solid var(--soft-line);
  background: var(--card);
}

.verdict-cell {
  flex: 1;
  padding: 13px 18px;
  border-right: 1px solid var(--faint-line);
}

.verdict-cell:last-child {
  flex: 1.1;
  border-right: 0;
}

.verdict-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.verdict-cell:last-child .verdict-label {
  color: var(--accent);
}

.verdict-text {
  margin-top: 5px;
  font-size: 14px;
}

.verdict-cell:last-child .verdict-text {
  font-weight: 800;
}

.judgment-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.judgment-card {
  padding: 20px 24px;
  border: 1px solid var(--soft-line);
  background: var(--card);
}

.judgment-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.judgment-id {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.judgment-title {
  flex: 1;
  min-width: 200px;
  font-size: 18px;
  font-weight: 800;
}

.confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.confidence-bar {
  flex: 1;
  height: 6px;
  background: #e8e2d3;
}

.confidence-fill {
  width: var(--conf, 50%);
  height: 6px;
  background: var(--accent);
}

.confidence-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.judgment-thesis {
  margin-top: 8px;
  color: #4d463a;
  font-size: 14px;
  line-height: 1.65;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--faint-line);
}

.evidence-label {
  font-size: 11px;
  letter-spacing: 0.18em;
}

.evidence-label.for {
  color: #3f6b4a;
}

.evidence-label.against {
  color: var(--red);
}

.evidence-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.evidence-line {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
}

.evidence-line .plus {
  color: #3f6b4a;
  font-family: var(--mono);
}

.evidence-line .minus {
  color: var(--red);
  font-family: var(--mono);
}

.event-list {
  margin-top: 8px;
}

.event-row {
  display: grid;
  grid-template-columns: 96px 64px 1fr 70px 168px;
  gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid #e3dccc;
}

.event-date {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.event-tag {
  padding: 3px 0;
  border: 1px solid #c2bba9;
  color: #6b655c;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.event-tag.pivot {
  border-color: #b98a7d;
  color: var(--red);
}

.event-title {
  font-size: 15px;
  font-weight: 800;
}

.event-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.event-affects {
  color: var(--muted);
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
}

.watch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid #e3dccc;
  background: transparent;
}

.watch.active {
  border-color: #a9c0a6;
  background: #eaf0e4;
}

.watch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c2bba9;
  flex-shrink: 0;
}

.watch.active .watch-dot {
  background: #3f6b4a;
}

.watch-label {
  min-width: 0;
  overflow: hidden;
  color: #a49b8a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.watch.active .watch-label {
  color: #2f5c3e;
}

.stops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.stop-card {
  padding: 18px 22px;
  border: 1px solid var(--soft-line);
  background: var(--card);
}

.stop-floor {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.stop-question {
  margin-top: 8px;
  color: var(--accent);
  font-size: 19px;
  font-weight: 800;
}

.stop-detail {
  margin-top: 8px;
  color: #4d463a;
  font-size: 13.5px;
  line-height: 1.65;
}

.no-action {
  margin-top: 52px;
  padding: 26px 8px;
  border-top: 3px double var(--line);
  border-bottom: 3px double var(--line);
  text-align: center;
}

.no-action-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.24em;
}

.no-action-text {
  max-width: 820px;
  margin: 12px auto 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.7;
}

.sanlou-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.sanlou-footer div:first-child {
  max-width: 640px;
}

.sanlou-footer div:last-child {
  font-family: var(--mono);
}

.link-grid {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.link-row {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 18px;
  align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px solid #e3dccc;
}

.link-row strong {
  font-size: 16px;
}

.link-row p {
  margin: 0;
  color: #4d463a;
  font-size: 13.5px;
}

.link-row span {
  color: var(--muted);
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
}

.index-page {
  width: min(1100px, calc(100vw - 56px));
  margin: 54px auto 76px;
}

.index-header {
  padding-bottom: 24px;
  border-bottom: 3px double var(--line);
}

.index-kicker {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.index-title {
  margin: 18px 0 0;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.15;
}

.index-subtitle {
  margin-top: 8px;
  color: #6b655c;
  font-size: 14px;
}

.index-statbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  margin-top: 22px;
  border: 1px solid var(--soft-line);
  background: var(--card);
}

.index-stat {
  min-height: 84px;
  padding: 14px 20px;
  border-right: 1px solid var(--faint-line);
}

.index-stat:last-child {
  border-right: 0;
}

.index-stat-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.index-stat-label {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.index-table-head,
.index-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(320px, 1fr) minmax(128px, 148px) minmax(98px, 118px) minmax(146px, 170px) 78px;
  gap: 12px;
}

.index-table-head {
  margin-top: 24px;
  padding: 18px 4px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.index-row {
  align-items: start;
  padding: 22px 4px;
  border-bottom: 1px solid #e3dccc;
}

.index-asset a {
  color: var(--accent);
  border-bottom: 2px solid #d8c3ba;
  font-size: 21px;
  font-weight: 900;
}

.index-ticker,
.index-live,
.index-date {
  font-family: var(--mono);
}

.index-ticker {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.index-conclusion {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.65;
}

.index-source {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.index-price {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
}

.zone-badge {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 10px;
  background: var(--amber);
  color: #f9f6ef;
  font-size: 12px;
  font-weight: 800;
}

.index-live {
  margin-top: 6px;
  color: #a49b8a;
  font-size: 11px;
}

.floor-mini {
  display: flex;
  align-items: center;
  gap: 9px;
}

.floor-bars {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.floor-bars span {
  width: 16px;
  height: 5px;
  background: #ddd5c2;
}

.floor-bars .active {
  background: var(--neutral);
}

.floor-chip {
  padding: 4px 11px;
  background: var(--neutral);
  color: #f9f6ef;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.floor-subline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.position-line {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.position-actual {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
}

.consistency-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1.5px solid #a9c0a6;
  background: #eaf0e4;
  color: #2f5c3e;
  font-size: 12px;
  font-weight: 800;
}

.consistency-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f6b4a;
}

.index-date {
  text-align: right;
  font-size: 13px;
}

.index-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.index-foot {
  margin-top: 36px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

@media (max-width: 920px) {
  .sanlou-page {
    width: min(100vw - 32px, 720px);
    margin: 28px auto 48px;
  }

  .sanlou-titlebar,
  .monitor-grid {
    grid-template-columns: 1fr;
  }

  .sanlou-tabs {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .position-card {
    min-height: 0;
  }

  .ladder-grid,
  .stops-grid,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .event-row,
  .link-row,
  .index-table-head,
  .index-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .event-affects,
  .link-row span,
  .index-date {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .sanlou-page {
    width: calc(100vw - 28px);
    margin-top: 24px;
  }

  .sanlou-topline,
  .sanlou-name,
  .price-row,
  .cap-grid,
  .position-grid,
  .verdict-strip,
  .index-kicker,
  .index-statbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .index-page {
    width: calc(100vw - 28px);
    margin-top: 24px;
  }

  .index-stat {
    border-right: 0;
    border-bottom: 1px solid var(--faint-line);
  }

  .index-stat:last-child {
    border-bottom: 0;
  }

  .sanlou-name h1 {
    font-size: 44px;
  }

  .price-value {
    font-size: 44px;
  }

  .cap-metric + .cap-metric,
  .verdict-cell {
    padding-left: 0;
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--faint-line);
  }

  .price-rail {
    display: grid;
    height: auto;
  }

  .price-zone {
    min-height: 56px;
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .price-zone:last-child {
    border-bottom: 0;
  }

  .price-pin,
  .price-pill,
  .band-ticks {
    display: none;
  }
}
