:root {
  --bg: #efebe4;
  --panel: #fbfaf7;
  --panel-2: #f5f0e9;
  --line: rgba(49, 39, 31, 0.13);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --green: #777b61;
  --teal: #8c6952;
  --blue: #61768a;
  --gold: #bf8a3d;
  --ember: #e35b2a;
  --red: #b84225;
  --purple: #786873;
  --shadow: rgba(45, 32, 23, 0.09);
  --rail-bg: #211915;
  --rail-bg-deep: #0f0e0d;
  --rail-ink: #f5f2ed;
  --rail-muted: rgba(245, 242, 237, 0.58);
  --rail-line: rgba(255, 243, 232, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 82% -6%, rgba(213, 106, 52, 0.12), transparent 28%),
    radial-gradient(circle at 31% 28%, rgba(154, 111, 69, 0.06), transparent 24%),
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

strong,
table,
.rail-foot strong {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  isolation: isolate;
  width: 276px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px;
  color: var(--rail-ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(95, 184, 135, 0.28), transparent 25%),
    radial-gradient(circle at 92% 86%, rgba(199, 154, 54, 0.22), transparent 27%),
    linear-gradient(158deg, var(--rail-bg) 0%, #10352f 48%, var(--rail-bg-deep) 100%);
  border-right: 1px solid rgba(19, 56, 48, 0.34);
  box-shadow: 18px 0 46px rgba(20, 52, 43, 0.18);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rail::before,
.rail::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.rail::before {
  inset: 0;
  z-index: -2;
  background:
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%);
}

.rail::after {
  right: -78px;
  bottom: 10%;
  z-index: -1;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, 0.018),
    0 0 0 68px rgba(255, 255, 255, 0.012);
}

.rail > * {
  position: relative;
  z-index: 1;
}

.rail-home {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--rail-line);
  border-radius: 999px;
  color: var(--rail-muted);
  background: rgba(255, 255, 255, 0.055);
  text-decoration: none;
  transition: 0.2s ease;
}

.rail-home span {
  color: #f1c76c;
  font-size: 14px;
}

.rail-home strong {
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.rail-home:hover,
.rail-home:focus-visible {
  color: var(--rail-ink);
  background: rgba(255, 255, 255, 0.11);
  outline: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--rail-line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(4, 28, 24, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 18px 34px rgba(4, 26, 22, 0.2);
  backdrop-filter: blur(14px);
}

.brand-mark {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 235, 181, 0.36);
  border-radius: 17px;
  color: #12372f;
  background:
    radial-gradient(circle at 70% 28%, #fff1bc 0 11%, transparent 12%),
    linear-gradient(145deg, #f0cb72, #9cbd78 68%, #6ba080);
  box-shadow: 0 10px 26px rgba(1, 20, 16, 0.28);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -9px;
  width: 34px;
  height: 47px;
  border: 2px solid rgba(15, 66, 51, 0.3);
  border-width: 2px 0 0 2px;
  border-radius: 100% 0 0;
  transform: rotate(-18deg);
}

.brand-mark span {
  position: relative;
  z-index: 1;
  color: #173e34;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-copy {
  min-width: 0;
}

.brand-copy > span,
.rail-section-label span,
.rail-section-label em,
.rail-foot span {
  color: var(--rail-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-copy > strong {
  display: block;
  margin-top: 4px;
  color: var(--rail-ink);
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 21px;
  line-height: 1.1;
}

.brand-copy > small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: rgba(232, 240, 231, 0.7);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow,
.kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rail-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
}

.rail-section-label em {
  color: rgba(241, 199, 108, 0.76);
  font-style: normal;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.rail nav {
  display: grid;
  gap: 7px;
}

.rail nav a {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  overflow: hidden;
  padding: 9px 11px;
  color: var(--rail-muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.rail nav a::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #f5cf78, #75b78b);
  opacity: 0;
  transform: scaleY(0.45);
  transition: 0.2s ease;
}

.rail nav a:hover,
.rail nav a:focus-visible {
  color: var(--rail-ink);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  outline: none;
  transform: translateX(2px);
}

.rail nav a.is-active {
  color: #fffaf0;
  border-color: rgba(244, 208, 126, 0.26);
  background:
    linear-gradient(90deg, rgba(244, 208, 126, 0.16), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(4, 23, 19, 0.16);
}

.rail nav a.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.rail-nav-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(241, 199, 108, 0.82);
  background: rgba(1, 21, 17, 0.18);
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 10px;
}

.rail-nav-copy {
  min-width: 0;
}

.rail-nav-copy strong,
.rail-nav-copy small {
  display: block;
}

.rail-nav-copy strong {
  color: inherit;
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.rail-nav-copy small {
  margin-top: 3px;
  color: rgba(232, 240, 231, 0.5);
  font-size: 10px;
}

.rail nav a > i {
  color: rgba(241, 199, 108, 0.56);
  font-size: 12px;
  font-style: normal;
  transform: rotate(45deg);
}

.rail-foot {
  margin-top: auto;
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--rail-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.rail-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rail-status-line span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.rail-status-line em {
  padding: 3px 6px;
  border: 1px solid rgba(100, 208, 139, 0.24);
  border-radius: 999px;
  color: #8ce0a9;
  background: rgba(80, 184, 117, 0.1);
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.rail-foot > strong {
  color: var(--rail-ink);
  font-size: 13px;
}

.rail-foot > small {
  color: rgba(232, 240, 231, 0.5);
  font-size: 10px;
}

.update-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #42b66b;
  box-shadow: 0 0 0 rgba(66, 182, 107, 0.6);
  animation: updatePulse 1.4s ease-out infinite;
}

@keyframes updatePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(66, 182, 107, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(66, 182, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(66, 182, 107, 0);
  }
}

main {
  margin-left: 276px;
  padding: 30px;
}

.hero,
.panel {
  background: rgba(255, 254, 249, 0.92);
  border: 1px solid rgba(66, 91, 80, 0.16);
  border-radius: 20px;
  box-shadow:
    0 18px 50px rgba(42, 61, 50, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
}

.hero {
  position: relative;
  min-height: 226px;
  overflow: hidden;
  padding: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 84% 20%, rgba(211, 166, 70, 0.18), transparent 23%),
    radial-gradient(circle at 68% 118%, rgba(47, 154, 155, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 251, 0.98), rgba(238, 247, 239, 0.96) 52%, rgba(231, 243, 245, 0.94));
}

.hero::after {
  content: "";
  position: absolute;
  top: -105px;
  right: -76px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(56, 107, 86, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(56, 107, 86, 0.025),
    0 0 0 76px rgba(56, 107, 86, 0.018);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h2 {
  margin-top: 5px;
  font-size: 20px;
}

h3 {
  font-size: 15px;
}

.subtitle {
  max-width: 790px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions,
.head-pills {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.data-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--gold);
  background: rgba(199, 154, 54, 0.12);
  border: 1px solid rgba(199, 154, 54, 0.28);
}

.data-chip.live {
  color: var(--green);
  background: rgba(76, 140, 100, 0.11);
  border-color: rgba(76, 140, 100, 0.28);
}

.data-chip.stale,
.data-chip.stale {
  color: var(--red);
  background: rgba(196, 93, 87, 0.11);
  border-color: rgba(196, 93, 87, 0.28);
}

.data-chip.partial {
  color: var(--purple);
  background: rgba(117, 105, 170, 0.11);
  border-color: rgba(117, 105, 170, 0.26);
}

.signal-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  color: #f6f7ed;
  background:
    radial-gradient(circle at 92% 20%, rgba(214, 171, 82, 0.2), transparent 24%),
    linear-gradient(116deg, #123d35, #1f5448 62%, #285c52);
  border: 1px solid rgba(22, 66, 55, 0.26);
  border-radius: 17px;
  box-shadow: 0 14px 32px rgba(25, 67, 56, 0.16);
}

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

.signal-main span {
  display: block;
  color: rgba(238, 244, 235, 0.62);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.signal-main strong {
  display: block;
  margin-top: 7px;
  color: #fffdf3;
  font-size: 18px;
  line-height: 1.45;
}

.signal-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 430px;
}

.signal-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  color: #edf7ec;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 700;
}

.stress-board article {
  min-width: 0;
  padding: 13px 16px;
  background: rgba(255, 254, 249, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(57, 74, 66, 0.06);
}

.stress-board span,
.metric-row span,
.quote-grid span,
.spread-strip span,
.hf-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stress-board strong {
  display: block;
  margin-top: 0;
  font-size: 16px;
  line-height: 1.45;
}

.stress-board em,
.metric-row em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.panel {
  margin-top: 20px;
  padding: 24px;
  scroll-margin-top: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(74, 91, 84, 0.12);
}

.weight-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.weight-country-mosaic {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: start;
}

.chart-panel {
  min-width: 0;
  padding: 16px;
  background: linear-gradient(180deg, #fffef9 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart-title-row,
.table-headbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chart-title-row {
  margin-bottom: 8px;
}

.chart-title-row h3,
.table-headbar h3 {
  min-width: 0;
  margin: 0;
  line-height: 1.35;
}

.chart-title-row .data-chip,
.table-headbar .data-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.fixed-chart {
  min-height: 0;
  height: auto;
}

.fixed-chart .chart-title-row {
  flex-direction: column;
  align-items: flex-start;
}

.fixed-chart .chart-title-row h3 {
  white-space: nowrap;
}

#country-card-indonesia {
  grid-column: 2;
  grid-row: 1;
}

#country-card-thailand {
  grid-column: 1;
  grid-row: 2;
}

#country-card-malaysia {
  grid-column: 2;
  grid-row: 2;
}

.fixed-chart canvas {
  height: 190px !important;
  max-height: 190px;
}

.mosaic-country-card {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  background: linear-gradient(180deg, #fffef9 0%, #f7f9f5 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mosaic-country-card h3 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.mosaic-country-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stress-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.country-policy-panel {
  min-width: 0;
  padding: 16px;
  background: linear-gradient(180deg, #fffef9 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.country-policy-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.country-policy-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 249, 0.86);
}

.country-policy-card strong {
  display: block;
  font-size: 15px;
}

.country-policy-card span {
  display: block;
  margin-top: 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.country-policy-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.policy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.policy-tags em {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  color: var(--purple);
  background: rgba(117, 105, 170, 0.1);
  border-radius: 6px;
  font-size: 11px;
  font-style: normal;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: #fffef9;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: normal;
}

th {
  color: var(--muted);
  background: rgba(242, 247, 246, 0.92);
  font-weight: 600;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.wet {
  color: var(--blue);
  background: rgba(75, 125, 168, 0.12);
}

.status-pill.dry {
  color: var(--red);
  background: rgba(196, 93, 87, 0.12);
}

.status-pill.normal {
  color: var(--green);
  background: rgba(76, 140, 100, 0.12);
}

.status-pill.muted {
  color: var(--muted);
  background: rgba(103, 115, 111, 0.12);
}

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

.country-card {
  min-width: 0;
  padding: 15px;
  background: linear-gradient(180deg, #fffef9 0%, #f7f9f5 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.country-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.country-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.country-metrics.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 0;
}

.country-metrics.compact div {
  padding: 8px;
}

.country-metrics.compact strong {
  margin-top: 4px;
  font-size: 14px;
}

.country-metrics div,
.metric-row div,
.quote-card,
.spread-strip div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 249, 0.82);
}

.country-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.country-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.two-col.compact {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.65fr);
}

.metric-row,
.quote-grid,
.spread-strip,
.hf-grid {
  display: grid;
  gap: 10px;
}

.metric-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quote-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 0 10px;
}

.hf-head .note {
  margin-top: 6px;
}

.lead-note {
  margin: 0 0 12px;
}

.monthly-anchor {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.subsection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.subsection-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.hf-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.hf-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 249, 0.86);
}

.hf-card strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

.hf-card em,
.hf-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.hf-card .up {
  color: var(--red);
}

.hf-card .down {
  color: var(--green);
}

.quote-card strong,
.spread-strip strong,
.metric-row strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.quote-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.quote-card .up {
  color: var(--red);
}

.quote-card .down {
  color: var(--green);
}

.spread-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.chart-panel canvas {
  display: block;
  width: 100%;
  height: 260px !important;
  min-height: 0;
}

.chart-panel.fixed-chart canvas {
  height: 190px !important;
  max-height: 190px;
}

.note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.method-note {
  margin: 12px 0 0;
  padding: 12px 13px;
  color: var(--muted);
  background: rgba(47, 154, 155, 0.08);
  border: 1px solid rgba(47, 154, 155, 0.18);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
}

.chart-source-note {
  margin-top: 10px;
  padding: 10px 11px;
  font-size: 12px;
}

.section-source-note {
  margin: 12px 0 16px;
}

.strong-note {
  color: var(--text);
  font-weight: 600;
}

.policy-news-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.policy-carousel {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffef9 0%, #f7f8fb 100%);
}

.policy-track {
  display: flex;
  transition: transform 0.5s ease;
}

.policy-slide {
  min-width: 100%;
  padding: 16px;
}

.policy-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
}

.policy-card-copy {
  min-width: 0;
}

.policy-slide h3,
.policy-item h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.policy-item {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffef9 0%, #f7f8fb 100%);
}

.policy-score {
  display: inline-flex;
  min-width: 52px;
  min-height: 28px;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  padding: 0 7px;
  border: 1px solid rgba(163, 78, 44, 0.18);
  border-radius: 999px;
  color: #9f4b2e;
  background: rgba(184, 66, 37, 0.075);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.policy-score strong {
  font-size: 13px;
  font-weight: 650;
}

.policy-score small {
  color: rgba(111, 70, 51, 0.72);
  font-size: 9px;
  font-weight: 600;
}

.policy-score.is-pending {
  color: var(--muted);
  background: rgba(110, 110, 115, 0.07);
  border-color: rgba(110, 110, 115, 0.14);
}

.policy-score.is-pending strong {
  font-size: 10px;
  font-weight: 500;
}

.policy-item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.policy-slide p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.policy-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.policy-topic {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--purple);
  background: rgba(117, 105, 170, 0.11);
  font-style: normal;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.policy-item a,
.policy-slide a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
}

.policy-item a:hover,
.policy-slide a:hover {
  text-decoration: underline;
}

.chart-panel,
.mosaic-country-card,
.country-policy-panel,
.country-policy-card,
.country-card,
.hf-card,
.country-metrics div,
.metric-row div,
.quote-card,
.spread-strip div,
.stress-board article,
.policy-carousel,
.policy-item,
.table-wrap {
  border-radius: 14px;
}

.chart-panel,
.country-policy-panel {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.method-note {
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .rail {
    position: static;
    width: auto;
    min-height: 104px;
    display: grid;
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    padding: 14px 18px;
    border-right: 0;
    box-shadow: 0 14px 34px rgba(20, 52, 43, 0.16);
  }

  .rail::after {
    right: 6%;
    bottom: -112px;
  }

  .rail-home,
  .rail-section-label {
    display: none;
  }

  .brand {
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .brand-copy > strong {
    font-size: 18px;
  }

  .brand-copy > small {
    display: none;
  }

  .rail nav {
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .rail nav::-webkit-scrollbar {
    display: none;
  }

  .rail nav a {
    grid-template-columns: 26px auto;
    min-width: max-content;
    min-height: 50px;
    flex: 0 0 auto;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .rail-nav-index {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .rail-nav-copy small,
  .rail nav a > i {
    display: none;
  }

  .rail nav a:hover,
  .rail nav a:focus-visible {
    transform: translateY(-1px);
  }

  .rail-foot {
    min-width: 144px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .rail-foot > strong {
    font-size: 11px;
  }

  .rail-foot > small {
    display: none;
  }

  main {
    margin-left: 0;
    padding: 20px;
  }

  .two-col,
  .two-col.compact,
  .weight-layout {
    grid-template-columns: 1fr;
  }

  .stress-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .rail {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 13px;
  }

  .brand-copy > span,
  .brand-copy > small {
    display: none;
  }

  .brand-copy > strong {
    margin-top: 0;
    font-size: 18px;
  }

  .rail-foot {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-self: stretch;
    padding: 8px 10px;
  }

  .rail-status-line span {
    font-size: 0;
  }

  .rail-status-line em {
    font-size: 8px;
  }

  .rail-foot > strong {
    font-size: 9px;
    white-space: nowrap;
  }

  .rail nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(1, 21, 17, 0.16);
  }

  .rail nav a {
    display: block;
    min-height: 36px;
    padding: 9px 13px;
    text-align: center;
    border-radius: 10px;
  }

  .rail-nav-index,
  .rail-nav-copy small,
  .rail nav a > i {
    display: none;
  }

  .rail-nav-copy strong {
    font-size: 13px;
    white-space: nowrap;
  }

  .hero,
  .panel-head,
  .chart-title-row,
  .table-headbar,
  .subsection-head,
  .signal-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    padding: 12px;
  }

  .hero {
    min-height: 0;
    padding: 26px 22px;
    border-radius: 17px;
  }

  .hero-actions {
    margin-top: 4px;
  }

  .panel {
    padding: 17px;
    border-radius: 17px;
  }

  .signal-strip {
    padding: 17px;
    border-radius: 15px;
  }

  .signal-tags {
    justify-content: flex-start;
  }

  h1 {
    font-size: 34px;
  }

  .weight-country-mosaic,
  .stress-board,
  .country-policy-list,
  .country-grid,
  .metric-row,
  .metric-row.four,
  .quote-grid,
  .hf-grid,
  .spread-strip {
    grid-template-columns: 1fr;
  }

  #country-card-indonesia,
  #country-card-thailand,
  #country-card-malaysia {
    grid-column: auto;
    grid-row: auto;
  }

  .stress-board {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .update-dot {
    animation: none;
  }

  .rail *,
  .policy-track {
    transition: none !important;
  }
}

/* Ash & Ember — warm, restrained climate-risk visual language. */
.rail {
  width: 240px;
  gap: 12px;
  padding: 18px 14px;
  background:
    radial-gradient(ellipse at 116% 88%, rgba(227, 91, 42, 0.3) 0%, rgba(165, 66, 34, 0.16) 22%, transparent 48%),
    radial-gradient(circle at 12% 3%, rgba(191, 138, 61, 0.1), transparent 26%),
    linear-gradient(180deg, #28211c 0%, var(--rail-bg) 44%, var(--rail-bg-deep) 100%);
  border-right: 1px solid rgba(75, 52, 39, 0.38);
  box-shadow: 14px 0 42px rgba(35, 24, 17, 0.11);
}

.rail::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 32%),
    radial-gradient(ellipse at 36% 112%, rgba(255, 142, 70, 0.08), transparent 38%);
}

.rail::after {
  top: 10%;
  right: 0;
  bottom: auto;
  width: 1px;
  height: 80%;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, transparent, rgba(227, 91, 42, 0.52) 52%, transparent);
  box-shadow: -24px 0 68px rgba(227, 91, 42, 0.1);
}

.rail-home {
  gap: 7px;
  padding: 5px 7px;
  border: 0;
  border-radius: 8px;
  color: rgba(245, 242, 237, 0.52);
  background: transparent;
}

.rail-home span {
  color: rgba(225, 166, 101, 0.78);
  font-size: 12px;
}

.rail-home strong {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
}

.rail-home:hover,
.rail-home:focus-visible {
  color: var(--rail-ink);
  background: rgba(255, 255, 255, 0.045);
}

.brand {
  gap: 11px;
  padding: 9px 4px 13px;
  border: 0;
  border-bottom: 1px solid var(--rail-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-color: rgba(255, 221, 190, 0.17);
  border-radius: 11px;
  color: #fff8ef;
  background:
    radial-gradient(circle at 72% 26%, rgba(255, 220, 151, 0.72) 0 7%, transparent 8%),
    linear-gradient(145deg, #d6934f 0%, #bc582e 58%, #562a20 100%);
  box-shadow: 0 8px 22px rgba(5, 4, 3, 0.25);
}

.brand-mark::after {
  right: 10px;
  bottom: -13px;
  width: 1px;
  height: 58px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 238, 210, 0.56), transparent);
  box-shadow: none;
  transform: rotate(31deg);
}

.brand-mark span {
  color: #fff8ef;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand-copy > span,
.rail-section-label span,
.rail-section-label em,
.rail-foot span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.11em;
}

.brand-copy > strong {
  margin-top: 3px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-copy > small {
  margin-top: 5px;
  color: rgba(245, 242, 237, 0.46);
  font-size: 9px;
}

.rail-section-label {
  padding: 3px 5px 0;
}

.rail-section-label em {
  color: rgba(220, 145, 87, 0.8);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.rail nav {
  gap: 4px;
}

.rail nav a {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  transition:
    color 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rail nav a::before {
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #f09a55, var(--ember));
}

.rail nav a:hover,
.rail nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.045);
  transform: none;
}

.rail nav a.is-active {
  color: #fff8f0;
  border-color: rgba(227, 91, 42, 0.14);
  background: linear-gradient(90deg, rgba(227, 91, 42, 0.15), rgba(255, 255, 255, 0.035));
  box-shadow: none;
}

.rail-nav-index {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  color: rgba(222, 157, 103, 0.62);
  background: transparent;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
}

.rail-nav-copy strong {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}

.rail-nav-copy small {
  margin-top: 2px;
  color: rgba(245, 242, 237, 0.38);
  font-size: 9px;
}

.rail nav a > i {
  display: none;
}

.rail-foot {
  gap: 6px;
  padding: 14px 4px 0;
  border: 0;
  border-top: 1px solid var(--rail-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.rail-status-line em {
  padding: 2px 5px;
  border-color: rgba(183, 187, 155, 0.22);
  color: #b7bb9b;
  background: rgba(119, 123, 97, 0.12);
  font-size: 8px;
}

.rail-foot > strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
}

.rail-foot > small {
  font-size: 9px;
}

.update-dot {
  width: 6px;
  height: 6px;
  background: #9ba080;
  box-shadow: none;
  animation: none;
}

main {
  margin-left: 240px;
  padding: 28px;
}

.hero,
.panel {
  border: 1px solid rgba(49, 39, 31, 0.11);
  border-radius: 16px;
  background: rgba(251, 250, 247, 0.95);
  box-shadow:
    0 1px 2px rgba(45, 32, 23, 0.035),
    0 14px 38px rgba(45, 32, 23, 0.055);
  backdrop-filter: none;
}

.hero {
  min-height: 180px;
  padding: 28px 30px;
  background:
    radial-gradient(circle at 88% 18%, rgba(227, 91, 42, 0.16), transparent 21%),
    radial-gradient(circle at 72% 122%, rgba(144, 119, 94, 0.1), transparent 33%),
    linear-gradient(135deg, #fdfcf9 0%, #f4ece1 100%);
}

.hero::after {
  top: -128px;
  right: -92px;
  width: 280px;
  height: 280px;
  border: 0;
  background: radial-gradient(circle, rgba(227, 91, 42, 0.09), transparent 66%);
  box-shadow: none;
  filter: blur(2px);
}

.hero .eyebrow {
  color: #a24d2c;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.eyebrow,
.kicker {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
}

h1 {
  margin-top: 7px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
}

h2 {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
}

h3 {
  font-size: 14px;
  font-weight: 600;
}

.subtitle {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.58;
}

.data-chip {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.signal-strip {
  gap: 16px;
  margin-top: 14px;
  padding: 15px 18px;
  color: #f8f4ef;
  background:
    radial-gradient(circle at 92% 18%, rgba(242, 110, 48, 0.27), transparent 24%),
    linear-gradient(116deg, #241b16 0%, #48271d 62%, #6a301f 100%);
  border: 1px solid rgba(113, 53, 31, 0.34);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(67, 35, 23, 0.12);
}

.signal-main span {
  color: rgba(248, 244, 239, 0.56);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.signal-main strong {
  margin-top: 5px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.42;
}

.signal-tags {
  gap: 6px;
}

.signal-tags span {
  min-height: 26px;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  color: rgba(255, 249, 242, 0.88);
  background: rgba(255, 255, 255, 0.065);
  font-size: 10.5px;
  font-weight: 500;
}

.panel {
  margin-top: 16px;
  padding: 22px;
}

.panel-head {
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom-color: rgba(49, 39, 31, 0.1);
}

.chart-panel,
.mosaic-country-card,
.country-policy-panel,
.country-policy-card,
.country-card,
.hf-card,
.country-metrics div,
.metric-row div,
.quote-card,
.spread-strip div,
.stress-board article,
.policy-carousel,
.policy-item,
.table-wrap {
  border-radius: 11px;
}

.chart-panel,
.country-policy-panel,
.mosaic-country-card,
.country-card {
  background: linear-gradient(180deg, #fbfaf7 0%, #f6f1ea 100%);
}

.country-policy-card,
.hf-card,
.country-metrics div,
.metric-row div,
.quote-card,
.spread-strip div,
.stress-board article {
  background: rgba(251, 250, 247, 0.82);
  box-shadow: none;
}

.chart-panel,
.country-policy-panel {
  box-shadow: none;
}

.method-note {
  color: #6f665f;
  background: #f7f0e6;
  border-color: rgba(163, 111, 62, 0.16);
  border-radius: 10px;
}

.country-policy-card span,
.policy-item a,
.policy-slide a {
  color: #a75731;
}

.policy-tags em,
.policy-topic {
  color: #786357;
  background: rgba(152, 104, 71, 0.09);
}

th {
  background: #f2eee7;
}

.status-pill.normal {
  color: #6e7359;
  background: rgba(119, 123, 97, 0.11);
}

.status-pill.dry {
  color: var(--red);
  background: rgba(184, 66, 37, 0.1);
}

.stress-board span,
.metric-row span,
.quote-grid span,
.spread-strip span,
.hf-card span,
.country-metrics span {
  font-size: 11px;
}

.stress-board strong {
  font-size: 15px;
}

.country-policy-card strong {
  font-size: 14px;
}

.country-policy-card p,
.mosaic-country-card p,
.country-card p {
  font-size: 12px;
}

.country-metrics strong {
  font-size: 15px;
}

.subsection-head h3 {
  font-size: 16px;
}

.hf-card strong,
.quote-card strong,
.spread-strip strong,
.metric-row strong {
  font-size: 16px;
}

th,
td {
  font-size: 12px;
}

.policy-track {
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 1100px) {
  .rail {
    width: auto;
    min-height: 88px;
    grid-template-columns: minmax(174px, 210px) minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 16px;
    box-shadow: 0 10px 28px rgba(35, 24, 17, 0.13);
  }

  .rail::after {
    top: auto;
    right: 8%;
    bottom: 0;
    width: 58%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(227, 91, 42, 0.48), transparent);
  }

  .brand {
    gap: 9px;
    padding: 0;
    border-bottom: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }

  .brand-copy > strong {
    font-size: 16px;
  }

  .rail nav a {
    grid-template-columns: 22px auto;
    min-height: 42px;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 9px;
  }

  .rail-nav-index {
    width: 22px;
    height: 22px;
  }

  .rail-nav-copy strong {
    font-size: 12px;
  }

  .rail-foot {
    min-width: 136px;
    padding: 5px 0 5px 12px;
    border-top: 0;
    border-left: 1px solid var(--rail-line);
  }

  main {
    margin-left: 0;
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .rail {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .brand {
    gap: 8px;
    padding: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
  }

  .brand-copy > strong {
    font-size: 15px;
  }

  .rail-foot {
    padding: 5px 2px 5px 10px;
  }

  .rail nav {
    padding: 3px;
    border-color: rgba(255, 255, 255, 0.065);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.12);
  }

  .rail nav a {
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 8px;
  }

  .rail-nav-copy strong {
    font-size: 12px;
  }

  main {
    padding: 10px;
  }

  .hero {
    padding: 22px 20px;
    border-radius: 15px;
  }

  h1 {
    font-size: 27px;
  }

  .subtitle {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .panel {
    padding: 15px;
    border-radius: 15px;
  }

  .signal-strip {
    padding: 15px;
    border-radius: 13px;
  }

  .signal-main strong {
    font-size: 15px;
  }

  .policy-card-head {
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 9px;
  }

  .policy-slide,
  .policy-item {
    padding: 14px;
  }

  .policy-slide h3,
  .policy-item h3 {
    font-size: 15px;
  }

  .policy-score {
    width: 52px;
    min-width: 0;
    padding: 0 5px;
  }

  .policy-meta {
    font-size: 11px;
  }

  .policy-topic {
    padding: 3px 6px;
    font-size: 10.5px;
  }
}
