/* =========================================================
   LUNA88 — design system
   Layout: portal finansial — header gelap compact + ticker,
   konten di grid 12 kolom dengan garis tipis sebagai pemisah,
   data (tabel, sparkline, chart) sebagai elemen visual utama.
   ========================================================= */

:root {
  /* Warna (tema terang) */
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --ink: #0e1621;
  --ink-2: #3f4b5c;
  --muted: #677386;
  --line: #dde2e9;
  --line-strong: #c4ccd7;
  --accent: #0a7a61;          /* satu aksen: link, naik, nav aktif, tombol, highlight chart */
  --accent-soft: #e2f2ed;
  --accent-ink: #ffffff;
  --down: #c63a32;            /* hanya untuk turun / negatif */
  --down-soft: #fbe9e7;
  --warn-soft: #fff6e0;
  --warn-line: #e7c86a;
  --hdr-bg: #0b121b;          /* header & ticker selalu gelap */
  --hdr-bg-2: #111b27;
  --hdr-fg: #e7ecf2;
  --hdr-muted: #8b98aa;
  --hdr-line: #1f2b3a;
  --hdr-accent: #33c49c;
  --shadow: 0 1px 2px rgba(14, 22, 33, .06), 0 8px 24px rgba(14, 22, 33, .06);

  /* Tipografi */
  --f-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --f-body: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem);
  --fs-hero: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem);

  --radius: 3px;
  --radius-lg: 6px;
  --wrap: 1240px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --hdr-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f15;
    --surface: #10171f;
    --surface-2: #151e28;
    --ink: #e6ebf1;
    --ink-2: #b0bbc8;
    --muted: #8391a3;
    --line: #212c38;
    --line-strong: #2f3c4b;
    --accent: #34c39b;
    --accent-soft: #10302a;
    --accent-ink: #04140f;
    --down: #f06a60;
    --down-soft: #3a1714;
    --warn-soft: #2c2412;
    --warn-line: #7a6326;
    --hdr-bg: #060a0f;
    --hdr-bg-2: #0b1118;
    --hdr-line: #18222e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f15;
  --surface: #10171f;
  --surface-2: #151e28;
  --ink: #e6ebf1;
  --ink-2: #b0bbc8;
  --muted: #8391a3;
  --line: #212c38;
  --line-strong: #2f3c4b;
  --accent: #34c39b;
  --accent-soft: #10302a;
  --accent-ink: #04140f;
  --down: #f06a60;
  --down-soft: #3a1714;
  --warn-soft: #2c2412;
  --warn-line: #7a6326;
  --hdr-bg: #060a0f;
  --hdr-bg-2: #0b1118;
  --hdr-line: #18222e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------- Dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 48px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--hdr-bg);
}
img, svg, canvas { max-width: 100%; display: block; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; color: var(--ink); }
h1, h2 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; }
h3, h4 { font-family: var(--f-body); font-weight: 600; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0; }
p + p { margin-top: .9em; }
ul, ol { margin: 0; padding-left: 1.2em; }
strong { font-weight: 600; color: var(--ink); }
.num, td, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--accent); }
.down { color: var(--down); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
.prose { max-width: 68ch; color: var(--ink-2); }
.prose p, .prose li { color: var(--ink-2); }
.prose h3 { margin-top: 1.6em; margin-bottom: .5em; }
.prose ul, .prose ol { display: grid; gap: .4em; margin-top: .8em; }
.lead { font-size: var(--fs-lg); color: var(--ink-2); line-height: 1.65; max-width: 62ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--hdr-bg);
  color: var(--hdr-fg);
  border-bottom: 1px solid var(--hdr-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--hdr-h);
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
.main-nav { flex: 1; min-width: 0; }
.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 2px; }
.main-nav a {
  display: block;
  padding: 8px 10px;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--hdr-muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.main-nav a:hover { color: var(--hdr-fg); background: var(--hdr-bg-2); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--hdr-fg); box-shadow: inset 0 -2px 0 var(--hdr-accent); border-radius: 0; }
.hdr-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--hdr-line);
  background: transparent;
  color: var(--hdr-fg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--hdr-bg-2); border-color: #33445a; }
.icon-btn svg { width: 17px; height: 17px; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-dark { display: block; }
  :root:not([data-theme="light"]) .theme-icon-light { display: none; }
}
.nav-toggle { display: none; }

/* Search */
.search-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--hdr-bg-2);
  border-bottom: 1px solid var(--hdr-line);
  padding-block: 14px 18px;
}
.search-panel label { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--hdr-muted); margin-bottom: 6px; }
.search-panel input {
  width: 100%;
  font: inherit;
  font-size: var(--fs-lg);
  padding: 10px 12px;
  background: var(--hdr-bg);
  color: var(--hdr-fg);
  border: 1px solid #2c3a4c;
  border-radius: var(--radius);
}
.search-results { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; color: var(--hdr-fg); border-radius: var(--radius); }
.search-results a:hover, .search-results a:focus-visible { background: var(--hdr-bg); text-decoration: none; }
.search-results small { color: var(--hdr-muted); white-space: nowrap; }
.search-empty { color: var(--hdr-muted); font-size: var(--fs-sm); padding: 8px 10px; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--hdr-bg-2);
  color: var(--hdr-fg);
  border-bottom: 1px solid var(--hdr-line);
  font-size: .8125rem;
  overflow: hidden;
}
.ticker .wrap { display: flex; align-items: center; gap: 14px; height: 36px; }
.ticker-label {
  flex-shrink: 0;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hdr-bg);
  background: #d9b44a;
  padding: 2px 6px;
  border-radius: 2px;
}
.ticker-viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: baseline; gap: 8px; padding-inline: 18px; border-right: 1px solid var(--hdr-line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticker-item b { font-weight: 600; color: var(--hdr-fg); }
.ticker-item .p { color: var(--hdr-fg); }
.ticker-item .c.up { color: var(--hdr-accent); }
.ticker-item .c.down { color: #ff8077; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Banner / Hero halaman ---------- */
.page-hero {
  position: relative;
  color: #f2f5f8;
  background-color: #0f1a26;
  background-image: linear-gradient(135deg, #0f1a26 0%, #13283a 100%); /* fallback bila banner belum ada */
  overflow: hidden;
  isolation: isolate;
}
.page-hero .hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(7, 13, 20, .86) 0%, rgba(7, 13, 20, .62) 55%, rgba(7, 13, 20, .25) 100%);
}
.page-hero .wrap { padding-block: 44px 40px; }
.page-hero h1 { color: #fff; font-size: var(--fs-3xl); max-width: 22ch; }
.page-hero .lead { color: #c9d3de; margin-top: 12px; }
.page-hero.compact .wrap { padding-block: 28px 26px; }
.page-hero.tall .wrap { padding-block: 64px 56px; }
.breadcrumb { font-size: var(--fs-sm); margin-bottom: 14px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; color: #9fb0c2; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #5d6f83; }
.breadcrumb a { color: #cfe0ec; }
.breadcrumb [aria-current] { color: #fff; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-size: var(--fs-sm); color: #b5c2d0; }
.hero-meta strong { color: #fff; }

/* Homepage hero */
.home-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  padding-block: 72px 56px;
}
.home-hero h1 { font-size: var(--fs-hero); max-width: 18ch; line-height: 1.08; }
.home-hero .eyebrow { color: #e3c56b; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-board {
  background: rgba(8, 14, 21, .72);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  min-width: 0;
}
.hero-board header { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: #9fb0c2; }
.hero-board table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.hero-board td { padding: 9px 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: #e9eef3; }
.hero-board tr:last-child td { border-bottom: 0; }
.hero-board td:nth-child(2), .hero-board td:nth-child(3) { text-align: right; }
.hero-board .up { color: #46d3aa; }
.hero-board .down { color: #ff8a80; }
.hero-board .spark { width: 72px; height: 22px; }

/* ---------- Tombol & label ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
  text-decoration: none !important;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-line { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 14px; height: 14px; }
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.tag {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.demo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #8a6a10; background: var(--warn-soft); border: 1px solid var(--warn-line);
  padding: 2px 8px; border-radius: 2px;
}
:root[data-theme="dark"] .demo-badge { color: #e3c56b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .demo-badge { color: #e3c56b; } }
.pill { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.pill.up { background: var(--accent-soft); color: var(--accent); }
.pill.down { background: var(--down-soft); color: var(--down); }

/* ---------- Section ---------- */
.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--line); }
.section.tint { background: var(--surface); }
.section.tight { padding-block: 44px; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: 12px 32px;
  margin-bottom: 32px;
}
.section-head .lead { margin-top: 10px; }
.section-head .more { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.rule-title {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 16px;
}
.rule-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; align-items: start; }
.split-r { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.sticky-aside { position: sticky; top: calc(var(--hdr-h) + 56px); }

/* ---------- Glosarium / definisi ---------- */
.def-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.def {
  padding: 22px 22px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
}
.def .k { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--muted); margin-bottom: 8px; }
.def h3 { margin-bottom: 8px; }
.def p { color: var(--ink-2); font-size: .9375rem; }
.def .fig { margin-top: 14px; color: var(--ink-2); }
.def.wide { grid-column: span 2; }
.def.highlight { background: var(--accent-soft); }

/* Daftar istilah sederhana */
.term-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.term { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.term dt { font-weight: 600; }
.term dd { margin: 0; color: var(--ink-2); }
.term dd .ex { display: block; margin-top: 6px; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Kartu pasar (homepage) ---------- */
.market-bands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.market-band { display: flex; flex-direction: column; padding: 24px 22px; border-right: 1px solid var(--line); min-width: 0; transition: background-color .2s; }
.market-band:last-child { border-right: 0; }
.market-band:hover { background: var(--surface-2); }
.market-band .idx { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--muted); }
.market-band h3 { font-family: var(--f-display); font-size: var(--fs-2xl); margin: 6px 0 8px; }
.market-band p { color: var(--ink-2); font-size: .9375rem; }
.market-band .instr { margin-top: 16px; display: grid; gap: 6px; font-size: var(--fs-sm); border-top: 1px dashed var(--line); padding-top: 14px; }
.market-band .instr div { display: flex; justify-content: space-between; gap: 8px; }
.market-band .instr span:first-child { color: var(--muted); }
.market-band .spark-lg { margin-top: 18px; height: 54px; width: 100%; }
.market-band .go { margin-top: auto; padding-top: 18px; font-weight: 600; font-size: var(--fs-sm); }

/* ---------- Tabel data ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.data-table caption { text-align: left; padding: 12px 16px; font-size: var(--fs-xs); color: var(--muted); caption-side: bottom; border-top: 1px solid var(--line); }
.data-table th {
  text-align: left; font-weight: 600; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .15s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .r { text-align: right; }
.data-table .sym { font-weight: 600; }
.data-table .sym small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.data-table .spark { width: 96px; height: 28px; margin-left: auto; }
.data-table.compact td { padding: 9px 14px; }
.arrow { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; margin-right: 6px; vertical-align: 2px; }
.arrow.up { border-bottom: 6px solid var(--accent); }
.arrow.down { border-top: 6px solid var(--down); }
.watch-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: var(--radius); width: 28px; height: 28px; cursor: pointer; display: inline-grid; place-items: center; }
.watch-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.watch-btn svg { width: 14px; height: 14px; }

.data-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 14px; }

/* Stat */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.stat { padding: 20px 20px 20px 0; min-width: 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat .v { font-family: var(--f-display); font-size: var(--fs-2xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .l { font-size: var(--fs-sm); color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  background: none; border: 0; padding: 10px 14px; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { font: inherit; font-size: var(--fs-xs); font-weight: 600; padding: 6px 10px; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- Chart ---------- */
.chart-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chart-head .title { font-weight: 600; }
.chart-head .px { font-family: var(--f-display); font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-body { padding: 8px 8px 4px; }
.chart-canvas { width: 100%; height: 320px; }
.chart-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px 14px; font-size: var(--fs-xs); color: var(--muted); border-top: 1px solid var(--line); }
.legend-dot { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--accent); }
.legend-dot.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 6px); }

/* Diagram candlestick */
.candle-explainer { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.anno-chart { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 12px; }
.anno-chart svg { width: 100%; height: auto; }
.anno-chart svg text { fill: var(--ink-2); font-family: var(--f-body); }
.anno-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: none; }
.anno-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.anno-list b { font-weight: 600; }
.anno-list span { color: var(--ink-2); }

/* ---------- Perbandingan ---------- */
.compare { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.compare-col { padding: 28px 28px 30px; min-width: 0; }
.compare-col h3 { font-family: var(--f-display); font-size: var(--fs-2xl); margin-bottom: 6px; }
.compare-col .q { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 18px; }
.compare-vs { display: grid; place-items: center; border-inline: 1px solid var(--line); background: var(--surface-2); font-family: var(--f-display); font-style: italic; color: var(--muted); }
.compare-rows { display: grid; border-top: 1px solid var(--line); }
.compare-rows div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.compare-rows dt { color: var(--muted); font-size: var(--fs-sm); }
.compare-rows dd { margin: 0; color: var(--ink-2); }
.compare-note { grid-column: 1 / -1; padding: 16px 28px; border-top: 1px solid var(--line); background: var(--accent-soft); font-size: .9375rem; color: var(--ink-2); }

/* ---------- Berita / editorial ---------- */
.news-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; }
.news-lead .thumb { aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 18px; }
.news-lead h3 { font-family: var(--f-display); font-size: var(--fs-2xl); font-weight: 600; line-height: 1.2; margin: 8px 0 10px; }
.news-lead p { color: var(--ink-2); }
.news-list { list-style: none; padding: 0; margin: 0; display: grid; border-top: 2px solid var(--ink); }
.news-item { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news-item h3 { font-family: var(--f-display); font-size: 1.125rem; font-weight: 600; line-height: 1.3; margin: 4px 0 6px; }
.news-item .thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-xs); color: var(--muted); }
.meta time { font-variant-numeric: tabular-nums; }
.thumb svg { width: 100%; height: 100%; }
.news-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 32px; }
.news-cols article { padding: 20px 24px 20px 0; min-width: 0; }
.news-cols article + article { padding-left: 24px; border-left: 1px solid var(--line); }
.news-cols h3 { font-family: var(--f-display); font-size: 1.125rem; font-weight: 600; line-height: 1.3; margin: 6px 0 8px; }
.news-cols p { font-size: .9375rem; color: var(--ink-2); }

.article-full { border-top: 1px solid var(--line); padding-block: 28px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.article-full:first-of-type { border-top: 2px solid var(--ink); }
.article-full .side .thumb { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.article-full h3 { font-family: var(--f-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.25; margin-bottom: 10px; }
.article-full .summary { color: var(--ink-2); max-width: 68ch; }
.article-full details { margin-top: 12px; max-width: 68ch; }
.article-full summary { cursor: pointer; font-weight: 600; color: var(--accent); font-size: var(--fs-sm); list-style: none; }
.article-full summary::-webkit-details-marker { display: none; }
.article-full summary::after { content: " +"; }
.article-full details[open] summary::after { content: " –"; }
.article-full details .body { margin-top: 12px; color: var(--ink-2); }
.article-full details .body h4 { margin: 18px 0 6px; font-size: var(--fs-md); }
.label-box { display: inline-block; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--ink-2); margin-right: 6px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { font: inherit; font-size: var(--fs-sm); font-weight: 500; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Tools ---------- */
.tool-index { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tool-index li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.tool-index a { display: block; padding: 18px 18px 20px; color: var(--ink); height: 100%; transition: background-color .15s; }
.tool-index a:hover { background: var(--surface-2); text-decoration: none; }
.tool-index b { display: block; font-weight: 600; margin-bottom: 4px; }
.tool-index span { font-size: var(--fs-sm); color: var(--muted); }
.tool-index svg { width: 20px; height: 20px; color: var(--accent); margin-bottom: 12px; }

.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; scroll-margin-top: calc(var(--hdr-h) + 56px); }
.tool + .tool { margin-top: 24px; }
.tool-form { padding: 24px; border-right: 1px solid var(--line); min-width: 0; }
.tool-form h3 { font-family: var(--f-display); font-size: var(--fs-xl); margin-bottom: 4px; }
.tool-form .desc { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 18px; }
.tool-out { padding: 24px; background: var(--surface-2); min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
input[type="number"], input[type="text"], select {
  width: 100%;
  font: inherit;
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.out-main { font-family: var(--f-display); font-size: 2.25rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; word-break: break-word; }
.out-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.out-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.out-grid div { padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.out-grid div:nth-child(odd) { padding-right: 12px; }
.out-grid div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.out-grid dt { font-size: var(--fs-xs); color: var(--muted); }
.out-grid dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-word; }
.out-explain { font-size: var(--fs-sm); color: var(--ink-2); }
.out-warn { font-size: var(--fs-sm); color: var(--down); }
.rr-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line); }
.rr-bar .risk { background: var(--down); }
.rr-bar .reward { background: var(--accent); }
.compound-chart { width: 100%; height: 140px; }

/* ---------- Learning path ---------- */
.path { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; position: relative; }
.path li { position: relative; padding: 0 16px 24px 0; min-width: 0; }
.path li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--f-mono); font-size: var(--fs-sm); font-weight: 600;
  position: relative; z-index: 1;
  margin-bottom: 14px;
}
.path li::after { content: ""; position: absolute; left: 38px; right: 0; top: 19px; height: 1px; background: var(--line-strong); }
.path li:nth-child(5n)::after { display: none; }
.path li.done::before { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.path li.done::after { background: var(--accent); }
.path h3 { font-size: var(--fs-md); margin-bottom: 4px; }
.path p { font-size: var(--fs-sm); color: var(--muted); }
.path a { color: inherit; }

.progress { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.progress-bar { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.progress b { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }

/* Modul belajar */
.module { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 28px; padding-block: 36px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hdr-h) + 56px); }
.module .no { font-family: var(--f-display); font-size: 3rem; font-weight: 600; line-height: 1; color: var(--line-strong); font-variant-numeric: tabular-nums; }
.module.done .no { color: var(--accent); }
.module h2 { font-size: var(--fs-2xl); margin-bottom: 10px; }
.module .meta { margin-bottom: 14px; }
.module .check {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer;
}
.module .check[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.key-points { margin-top: 16px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface); }
.key-points b { display: block; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.key-points ul { display: grid; gap: 4px; color: var(--ink-2); font-size: .9375rem; }

/* ---------- Risk section ---------- */
.risk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rules .n { font-family: var(--f-mono); font-size: var(--fs-sm); color: var(--accent); font-weight: 600; padding-top: 2px; }
.rules h3 { font-size: var(--fs-md); margin-bottom: 4px; }
.rules p { color: var(--ink-2); font-size: .9375rem; }
.worked { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 24px; }
.worked h3 { font-family: var(--f-display); font-size: var(--fs-xl); margin-bottom: 14px; }
.worked table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.worked td { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.worked td:last-child { text-align: right; font-weight: 600; }
.worked .total td { border-bottom: 0; border-top: 1px solid var(--ink); padding-top: 12px; }
.worked p { margin-top: 14px; font-size: var(--fs-sm); color: var(--muted); }

/* Callout / peringatan */
.callout { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border: 1px solid var(--warn-line); background: var(--warn-soft); border-radius: var(--radius-lg); color: var(--ink-2); font-size: .9375rem; }
.callout svg { width: 20px; height: 20px; color: #b8860b; margin-top: 2px; }
.callout strong { display: block; margin-bottom: 2px; }
.callout.risk { border-color: color-mix(in srgb, var(--down) 45%, transparent); background: var(--down-soft); }
.callout.risk svg { color: var(--down); }

/* Sesi forex */
.sessions { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 18px 18px 14px; overflow-x: auto; }
.sessions-inner { min-width: 620px; }
.sess-scale { display: grid; grid-template-columns: 110px repeat(24, minmax(0, 1fr)); font-size: .6875rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.sess-scale span:nth-child(odd):not(:first-child) { visibility: hidden; }
.sess-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; height: 36px; border-top: 1px solid var(--line); }
.sess-row b { font-size: var(--fs-sm); font-weight: 600; }
.sess-track { position: relative; height: 100%; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / 24) 100%; }
.sess-bar { position: absolute; top: 9px; height: 18px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 30%, transparent); border: 1px solid var(--accent); font-size: .6875rem; padding-left: 6px; line-height: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; }
.sess-bar.hot { background: var(--accent); color: var(--accent-ink); }
.sess-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--down); }

/* Anatomi pair */
.pair-anatomy { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; align-items: end; gap: 0 4px; font-family: var(--f-display); font-size: clamp(2.6rem, 2rem + 3vw, 4rem); font-weight: 600; line-height: 1; }
.pair-anatomy .slash { color: var(--muted); }
.pair-anatomy small { display: block; font-family: var(--f-body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-top: 10px; }
.pair-anatomy .quote-c small { color: var(--muted); }

/* Gauge sentimen */
.gauge { display: grid; gap: 10px; }
.gauge-track { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--down) 0%, var(--line-strong) 50%, var(--accent) 100%); }
.gauge-needle { position: absolute; top: -6px; width: 3px; height: 22px; background: var(--ink); border-radius: 2px; transform: translateX(-50%); }
.gauge-scale { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); }

.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 20px; min-width: 0; }
.panel h3 { margin-bottom: 12px; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.panel-title h3 { margin: 0; }

.mover-list { list-style: none; padding: 0; margin: 0; display: grid; }
.mover-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.mover-list li:last-child { border-bottom: 0; }
.mover-list b { font-weight: 600; }
.mover-list small { color: var(--muted); display: block; }

/* Instrument spec block */
.spec { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding-block: 30px; border-top: 1px solid var(--line); }
.spec:first-of-type { border-top: 2px solid var(--ink); }
.spec .code { font-family: var(--f-mono); font-size: var(--fs-sm); color: var(--muted); }
.spec h3 { font-family: var(--f-display); font-size: var(--fs-2xl); margin: 4px 0 12px; }
.spec dl { margin: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.spec dl div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; text-align: right; }

/* Faktor (numbered not needed) */
.factor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.factor h3 { font-size: var(--fs-md); display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.factor h3 svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.factor p { font-size: .9375rem; color: var(--ink-2); }
.factor .eff { margin-top: 8px; font-size: var(--fs-sm); color: var(--muted); }

/* Sektor IDX */
.sector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sector { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); min-width: 0; }
.sector header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sector h3 { font-size: var(--fs-md); }
.sector p { font-size: .9375rem; color: var(--ink-2); }
.sector .ex { margin-top: 10px; font-size: var(--fs-xs); color: var(--muted); font-family: var(--f-mono); }

/* Order book contoh */
.orderbook { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.orderbook th { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.orderbook td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.orderbook .bid { color: var(--accent); font-weight: 600; }
.orderbook .off { color: var(--down); font-weight: 600; }

/* Kalender ekonomi */
.cal-table td:first-child { white-space: nowrap; }
.impact { display: inline-flex; gap: 2px; }
.impact i { width: 6px; height: 12px; background: var(--line-strong); border-radius: 1px; }
.impact.h i { background: var(--down); }
.impact.m i:nth-child(-n+2) { background: #d39b2a; }
.impact.l i:first-child { background: var(--muted); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-2); max-width: 70ch; }

/* About brand */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.about-list { columns: 2; column-gap: 28px; list-style: none; padding: 0; margin: 18px 0 0; }
.about-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.about-list a { color: var(--ink); }
.about-list a:hover { color: var(--accent); }
.not-list { margin-top: 18px; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--hdr-bg); color: var(--hdr-muted); font-size: var(--fs-sm); margin-top: 0; }
.site-footer .wrap { padding-block: 52px 28px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; padding-bottom: 36px; border-bottom: 1px solid var(--hdr-line); }
.footer-brand img { height: 28px; width: auto; margin-bottom: 14px; }
.footer-brand p { max-width: 38ch; color: var(--hdr-muted); }
.footer-col h2 { font-family: var(--f-body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--hdr-fg); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer-col a { color: var(--hdr-muted); }
.footer-col a:hover { color: var(--hdr-fg); }
.disclaimer { padding-block: 24px; border-bottom: 1px solid var(--hdr-line); color: #9aa7b8; line-height: 1.65; }
.disclaimer strong { color: var(--hdr-fg); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 20px; font-size: var(--fs-xs); }

/* ---------- Responsif ---------- */
@media (max-width: 1180px) {
  .main-nav a { padding: 8px 7px; font-size: .78rem; }
}
@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--hdr-bg);
    border-bottom: 1px solid var(--hdr-line);
    display: none;
    max-height: calc(100vh - var(--hdr-h));
    overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); gap: 0; }
  .main-nav a { padding: 13px 4px; font-size: var(--fs-md); border-bottom: 1px solid var(--hdr-line); border-radius: 0; }
  .main-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--hdr-accent); padding-left: 12px; }
  .site-header .wrap { justify-content: space-between; }
  .market-bands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-band:nth-child(2) { border-right: 0; }
  .market-band:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .tool-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .home-hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-block: 48px 36px; }
  .split, .split-r, .candle-explainer, .news-layout, .risk-wrap, .about { grid-template-columns: 1fr; gap: 32px; }
  .sticky-aside { position: static; }
  .def-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .def.wide { grid-column: span 2; }
  .g-3, .g-4, .factor-grid, .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .path { grid-template-columns: 1fr; }
  .path li { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 16px; padding: 0 0 20px; }
  .path li::before { grid-row: span 2; margin: 0; }
  .path li::after { left: 19px; right: auto; top: 38px; bottom: 0; width: 1px; height: auto; display: block; }
  .path li:nth-child(5n)::after { display: block; }
  .path li:last-child::after { display: none; }
  .tool { grid-template-columns: 1fr; }
  .tool-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .news-cols { grid-template-columns: 1fr; }
  .news-cols article, .news-cols article + article { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .article-full { grid-template-columns: 1fr; gap: 16px; }
  .article-full .side { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; }
  .article-full .side .thumb { margin: 0; }
  .spec { grid-template-columns: 1fr; gap: 16px; }
  .module { grid-template-columns: 1fr; gap: 10px; }
  .module .no { font-size: 2.2rem; }
}
@media (max-width: 640px) {
  .section { padding-block: 44px; }
  h2 { font-size: 1.75rem; }
  .def-grid, .g-2, .g-3, .g-4, .factor-grid, .sector-grid { grid-template-columns: 1fr; }
  .def.wide { grid-column: auto; }
  .market-bands { grid-template-columns: 1fr; }
  .market-band { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .market-band:last-child { border-bottom: 0; }
  .compare { grid-template-columns: 1fr; }
  .compare-vs { border-inline: 0; border-block: 1px solid var(--line); padding: 8px; }
  .compare-col { padding: 22px 18px; }
  .compare-note { padding: 14px 18px; }
  .term { grid-template-columns: 1fr; gap: 4px; }
  .anno-list li { grid-template-columns: 1fr; gap: 2px; }
  .tool-index { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .about-list { columns: 1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .news-item { grid-template-columns: minmax(0, 1fr) 72px; }
  .chart-canvas { height: 260px; }
  .brand img { height: 26px; }
  /* Tabel pasar: kolom kurang penting disembunyikan di HP */
  .data-table .hide-sm { display: none; }
  .data-table th, .data-table td { padding-inline: 12px; }
  .hero-board .hide-sm { display: none; }
  .out-main { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .ticker-viewport { overflow-x: auto; }
}

/* ---------- Diagram inline (SVG) ---------- */
.d-axis line { stroke: var(--line-strong); stroke-width: 1; }
.d-up { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.d-down { fill: none; stroke: var(--down); stroke-width: 2.5; stroke-linejoin: round; }
.d-dot { fill: var(--surface); stroke: var(--ink-2); stroke-width: 2; }
.d-dot-up { fill: var(--accent); }
.d-dot-down { fill: var(--down); }
.d-t { fill: var(--ink-2); font-size: 12px; font-family: var(--f-body); }

.anno-chart .g-grid { stroke: var(--line); stroke-width: 1; }
.anno-chart .z-res { fill: var(--down); fill-opacity: .1; }
.anno-chart .z-sup { fill: var(--accent); fill-opacity: .12; }
.anno-chart .z-t { fill: var(--muted); font-size: 12px; }
.anno-chart .a-t { fill: var(--ink); font-size: 13px; font-weight: 600; }
.anno-chart .c-up { fill: var(--accent); stroke: var(--accent); stroke-width: 1.2; }
.anno-chart .c-dn { fill: var(--down); stroke: var(--down); stroke-width: 1.2; }
.anno-chart .trend { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 6 4; }
.anno-chart .sep { stroke: var(--line); }
.anno-chart .lead { stroke: var(--muted); }
.anno-chart .bc-box { fill: var(--surface-2); stroke: var(--line-strong); }
.anno-chart .bc-new { stroke: var(--accent); fill: var(--accent-soft); }
.anno-chart .bc-link { stroke: var(--accent); stroke-width: 2; }
.anno-chart .bc text { fill: var(--ink-2); font-size: 13px; }
.anno-chart .bc .bc-h { fill: var(--ink); font-weight: 600; font-size: 14px; }
.anno-chart .bc .bc-m { fill: var(--muted); font-size: 12px; font-family: var(--f-mono); }

.thumb { background: var(--surface-2); }
.thumb .th-bg { fill: var(--surface-2); }
.thumb .th-bar rect { fill: var(--line-strong); }
.thumb .th-a { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.thumb .th-b { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; opacity: .7; }
.thumb .th-fill { fill: var(--accent); fill-opacity: .14; }
.thumb .th-ring { fill: none; stroke: var(--ink-2); stroke-width: 2; opacity: .55; }
.thumb .th-grid, .thumb .th-grid line { stroke: var(--line-strong); stroke-width: 1; }
.thumb .th-node circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.thumb .th-zone { fill: var(--accent); fill-opacity: .14; }
.thumb .th-c rect { fill: var(--ink-2); opacity: .7; }

/* Hero board detail */
.hero-board .sym small { display: block; color: #8fa0b3; font-size: .6875rem; font-weight: 400; }
.hero-board .sym { font-weight: 600; }
.hero-board .spark { margin-left: auto; }
.hero-board .arrow.up { border-bottom-color: #46d3aa; }
.hero-board .arrow.down { border-top-color: #ff8a80; }

/* Skala sesi forex */
.sess-scale-row { border-top: 0; height: 22px; }
.sess-scale-track { background: none; }
.sess-scale-track span { position: absolute; top: 2px; font-size: .6875rem; color: var(--muted); transform: translateX(-2px); font-variant-numeric: tabular-nums; }

/* Market band link reset */
a.market-band { color: inherit; text-decoration: none; }
a.market-band:hover .go { text-decoration: underline; }
.market-band .spark-lg svg, .def .spark-lg svg { width: 100%; height: 100%; }
.spark svg { width: 100%; height: 100%; }

/* ---------- Widget TradingView ---------- */
.tv { position: relative; min-width: 0; }
.tv:empty::before, .tv .tradingview-widget-container:only-child:empty::before {
  content: "Memuat data pasar…";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: var(--fs-sm); color: var(--muted);
  background: var(--surface-2); border-radius: var(--radius);
}
.tv .tradingview-widget-container { height: 100%; }
.tv .tradingview-widget-container__widget { height: 100%; }
.tv iframe { display: block; }
.tradingview-widget-copyright { font-size: .6875rem; line-height: 1.4; padding-top: 6px; text-align: right; }
.tradingview-widget-copyright a { color: var(--muted); }
.tv-overview { height: 470px; }
.tv-overview.no-chart { height: 360px; }
.tv-hero { height: 340px; }
.tv-chart { height: 540px; }
.tv-quote { min-height: 74px; }
.tv-mini { height: 150px; margin-top: 16px; }
.tv-cross { height: 400px; }
.tv-heat { height: 520px; }
.tv-screener { height: 560px; }
.tv-calendar { height: 600px; }
.tv-news { height: 620px; }
.tv-overview, .tv-hero, .tv-chart, .tv-mini, .tv-cross, .tv-heat, .tv-screener, .tv-calendar, .tv-news { padding-bottom: 22px; }

.ticker { overflow: visible; }
.ticker .tv-ticker { height: 46px; }
.ticker .tv-ticker:empty::before { background: transparent; color: var(--hdr-muted); content: "Memuat harga pasar…"; }

.hero-board .tv { padding: 4px 6px 0; }
.hero-board .tradingview-widget-copyright a { color: #8fa0b3; }

.quote-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.quote-row .tv { padding: 10px 14px 4px 0; }
.quote-row .tv + .tv { padding-left: 14px; border-left: 1px solid var(--line); }

.tv-watch { list-style: none; padding: 0; margin: 0; display: grid; }
.tv-watch li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.watch-remove { font: inherit; font-size: var(--fs-xs); background: none; border: 1px solid var(--line); color: var(--muted); border-radius: var(--radius); padding: 4px 8px; cursor: pointer; }
.watch-remove:hover { color: var(--down); border-color: var(--down); }
.watch-add { display: flex; gap: 8px; margin-bottom: 10px; }
.watch-add select { flex: 1; min-width: 0; }

.source-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 14px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; padding: 2px 8px; border-radius: 2px; }
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

@media (max-width: 900px) {
  .quote-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-row .tv:nth-child(3) { padding-left: 0; border-left: 0; }
  .quote-row .tv:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tv-chart { height: 440px; }
}
@media (max-width: 640px) {
  .tv-overview { height: 520px; }
  .tv-heat { height: 420px; }
  .tv-hero { height: 430px; }
}

/* Iframe widget harus memakai color-scheme bawaan. Jika berbeda dengan
   halaman (mode gelap), browser memberi latar putih pada iframe. */
.tv iframe { color-scheme: normal; background: transparent; }
.tv-hero { height: 420px; }

/* ---------- Menu bahasa ---------- */
.lang-menu { position: relative; }
.lang-btn { width: auto; padding: 0 9px; gap: 6px; display: inline-flex; align-items: center; font: inherit; font-size: .75rem; font-weight: 600; letter-spacing: .04em; }
.lang-btn svg { width: 15px; height: 15px; }
.lang-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70;
  width: min(340px, calc(100vw - 32px));
  background: var(--hdr-bg-2); color: var(--hdr-fg);
  border: 1px solid var(--hdr-line); border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  padding: 12px; max-height: calc(100vh - 90px); overflow-y: auto;
}
.lang-h { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hdr-muted); margin: 6px 4px 6px; }
.lang-h + a, .lang-panel > a { display: block; }
.lang-panel > a { padding: 8px 10px; border-radius: var(--radius); color: var(--hdr-fg); font-size: var(--fs-sm); }
.lang-panel > a:hover { background: var(--hdr-bg); text-decoration: none; }
.lang-panel > a[aria-current] { box-shadow: inset 2px 0 0 var(--hdr-accent); background: var(--hdr-bg); }
.lang-panel > a + .lang-h { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hdr-line); }
.lang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.lang-grid button { font: inherit; font-size: var(--fs-sm); text-align: left; background: none; border: 0; color: var(--hdr-fg); padding: 7px 10px; border-radius: var(--radius); cursor: pointer; }
.lang-grid button:hover { background: var(--hdr-bg); }
.lang-grid button[aria-pressed="true"] { background: var(--hdr-bg); box-shadow: inset 2px 0 0 var(--hdr-accent); }
.lang-note { font-size: .75rem; color: var(--hdr-muted); margin: 10px 4px 2px; line-height: 1.5; }
#lang-msg { color: #ff8a80; }

/* Sembunyikan antarmuka bawaan Google Translate */
.gt-holder { display: none !important; }
.goog-te-banner-frame, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-yAWNEb-L7lbkb { display: none !important; }
html.gt-on body { top: 0 !important; position: static !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

@media (max-width: 640px) {
  .hdr-tools { gap: 4px; }
  .lang-btn { padding: 0 7px; }
  .lang-btn svg { display: none; }
}
@media (max-width: 640px) {
  .lang-panel {
    position: fixed; width: auto;
    left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
    top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px) + 6px);
  }
}
