:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #1b1c16;
  --muted: #5f6255;
  --line: rgba(27, 28, 22, 0.12);
  --accent: #1f6f5f;
  --shadow: 0 24px 60px rgba(27, 28, 22, 0.08);
  --radius: 20px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans TC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(216, 132, 51, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(31, 111, 95, 0.14), transparent 32%),
    linear-gradient(180deg, #fbfbf8 0%, var(--bg) 100%);
  line-height: 1.65;
}

a {
  color: var(--accent);
}

.shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(247, 247, 242, 0.85);
  border-bottom: 1px solid var(--line);
}

.topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nav a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.2;
}

.hero {
  padding: 54px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.hero-card,
.panel,
.quote,
.footer-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 36px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(31, 111, 95, 0.1);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
}

h1,
h2,
h3 {
  line-height: 1.18;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4.3rem);
}

h2 {
  font-size: clamp(1.45rem, 2vw, 2.2rem);
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 62ch;
}

.hero-actions,
.meta-list,
.grid,
.kpi-grid {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(200px, max-content));
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary .en-translation {
  color: rgba(255, 255, 255, 0.82);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.panel {
  padding: 28px;
}

.meta-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.meta-list div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

.value {
  display: block;
  margin-top: 8px;
  font-weight: 700;
}

main section {
  padding: 18px 0 22px;
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.card h3,
.card h2 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.card p,
li,
.muted {
  color: var(--muted);
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.kpi {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.kpi strong {
  display: block;
  font-size: 1.6rem;
}

.quote {
  padding: 24px;
  margin: 18px 0;
}

.quote p {
  margin: 0;
  font-size: 1.04rem;
}

.section-intro {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 68ch;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.en-translation {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

h1 .en-translation,
h2 .en-translation,
h3 .en-translation {
  font-size: 0.54em;
  line-height: 1.4;
}

.nav a .en-translation,
.button .en-translation,
.chip .en-translation,
.eyebrow .en-translation,
.label .en-translation,
.memo-label .en-translation,
.score-pill .en-translation,
.forecast-pill .en-translation,
.verdict-badge .en-translation,
.signal-pill .en-translation,
.stock-metric span .en-translation {
  margin-top: 2px;
  font-size: 0.8em;
}

.value .en-translation {
  font-size: 0.84em;
}

p.en-translation,
li .en-translation,
td .en-translation,
th .en-translation,
.section-intro .en-translation {
  font-size: 0.94em;
}

.card ul {
  margin-top: 12px;
}

.card li + li {
  margin-top: 8px;
}

.card strong {
  color: var(--text);
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fcfcfa;
  box-shadow: var(--shadow);
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.stock-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 244, 0.88)),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.stock-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stock-name {
  margin: 0;
  font-size: 1.02rem;
}

.stock-code {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 111, 95, 0.1);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.signal-pill.secondary {
  background: rgba(216, 132, 51, 0.14);
  color: #8a4c10;
}

.stock-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.stock-metric {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.stock-metric span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.02em;
}

.stock-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.stock-note {
  margin-top: 14px;
  color: var(--muted);
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.analysis-card {
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.analysis-card h3 {
  margin-bottom: 12px;
}

.analysis-card ul {
  margin-top: 10px;
}

.analysis-card li + li {
  margin-top: 8px;
}

.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.scorecard-card,
.verdict-card,
.ladder-card,
.memo-card,
.forecast-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 241, 0.9)),
    rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.scorecard-card {
  padding: 22px;
}

.scorecard-card-risk {
  background:
    linear-gradient(180deg, rgba(255, 248, 246, 0.96), rgba(251, 243, 238, 0.9)),
    rgba(255, 255, 255, 0.84);
}

.scorecard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scorecard-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 111, 95, 0.1);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.score-meta {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.score-meter {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(27, 28, 22, 0.08);
}

.score-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f6f5f, #53a38f);
}

.score-meter-risk span {
  background: linear-gradient(90deg, #a35a38, #d38b61);
}

.score-note {
  margin: 14px 0 0;
  color: var(--muted);
}

.verdict-card {
  padding: 24px;
}

.verdict-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.verdict-head h3 {
  margin-bottom: 8px;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 111, 95, 0.12);
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.verdict-bar {
  display: flex;
  width: 100%;
  min-height: 42px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(27, 28, 22, 0.08);
}

.verdict-bar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 10px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.verdict-positive {
  background: linear-gradient(90deg, #1f6f5f, #3d8d7c);
}

.verdict-caution {
  background: linear-gradient(90deg, #d08a3a, #e2a85a);
}

.verdict-risk {
  background: linear-gradient(90deg, #a35a38, #c97348);
}

.verdict-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.verdict-notes > div {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.table-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.forecast-card {
  padding: 24px;
}

.forecast-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(216, 132, 51, 0.14);
  color: #8a4c10;
  font-size: 0.82rem;
  font-weight: 700;
}

.forecast-pill-strong {
  background: rgba(31, 111, 95, 0.12);
  color: var(--accent);
}

.ladder-card {
  position: relative;
  padding: 22px 22px 22px 44px;
}

.ladder-card::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(180deg, rgba(31, 111, 95, 0.65), rgba(163, 90, 56, 0.65));
}

.ladder-row {
  position: relative;
  display: grid;
  grid-template-columns: 92px 140px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.ladder-row + .ladder-row {
  margin-top: 12px;
}

.ladder-row::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(27, 28, 22, 0.1);
}

.ladder-row-target::before {
  background: #1f6f5f;
}

.ladder-row-confirm::before {
  background: #498178;
}

.ladder-row-entry::before {
  background: #d48a39;
}

.ladder-row-risk::before {
  background: #a35a38;
}

.ladder-tag,
.ladder-price {
  font-weight: 700;
}

.ladder-tag {
  color: var(--text);
}

.ladder-price {
  color: var(--accent);
}

.ladder-row-risk .ladder-price {
  color: #8f4426;
}

.ladder-copy {
  color: var(--muted);
}

.memo-card {
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 249, 245, 0.98), rgba(249, 240, 234, 0.92)),
    rgba(255, 255, 255, 0.84);
}

.memo-label {
  margin: 0 0 10px;
  color: #8f4426;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.memo-card h3 {
  margin-bottom: 12px;
}

.memo-card p {
  color: var(--muted);
}

.memo-list {
  margin-top: 14px;
}

.memo-list li + li {
  margin-top: 8px;
}

.compare-table td strong {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: rgba(31, 111, 95, 0.08);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.footer {
  padding: 18px 0 48px;
}

.footer-card {
  padding: 20px 24px;
}

.footer-card p {
  margin: 0;
}

code {
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(27, 28, 22, 0.06);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .topbar .shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .verdict-head {
    flex-direction: column;
  }

  .verdict-notes,
  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .ladder-row {
    grid-template-columns: 1fr;
  }
}
