/* SinyalAnalyzer — sistem desain bersama. DIBANGKITKAN oleh skrip; ubah token di sini. */

:root {
  color-scheme: light;
  --canvas: 246 246 247;
  --surface: 255 255 255;
  --inset: 244 244 246;
  --line: 231 231 234;
  --line-strong: 212 212 216;
  --fg: 24 24 27;
  --muted: 82 82 91;
  --subtle: 113 113 122;
  --accent: 47 95 208;
  --accent-fg: 42 82 181;
  --up: 21 128 61;
  --down: 192 38 38;
  --warn: 161 98 7;
  --flow-in: 15 143 128;
  --flow-out: 192 38 38;
  --gray-50: 9 9 11;
  --gray-100: 24 24 27;
  --gray-200: 39 39 42;
  --gray-300: 63 63 70;
  --gray-400: 82 82 91;
  --gray-500: 107 107 116;
  --gray-600: 139 139 148;
  --gray-700: 212 212 216;
  --gray-800: 228 228 231;
  --gray-900: 244 244 245;
  --gray-950: 250 250 250;
  --amber-50: 69 26 3;
  --amber-100: 120 53 15;
  --amber-200: 146 64 14;
  --amber-300: 180 83 9;
  --amber-400: 180 83 9;
  --amber-500: 217 119 6;
  --amber-600: 217 119 6;
  --amber-700: 252 211 77;
  --amber-800: 253 230 138;
  --amber-900: 254 243 199;
  --amber-950: 255 251 235;
  --blue-50: 23 37 84;
  --blue-100: 30 58 138;
  --blue-200: 30 64 175;
  --blue-300: 29 78 216;
  --blue-400: 29 78 216;
  --blue-500: 37 99 235;
  --blue-600: 37 99 235;
  --blue-700: 147 197 253;
  --blue-800: 191 219 254;
  --blue-900: 219 234 254;
  --blue-950: 239 246 255;
  --cyan-50: 8 51 68;
  --cyan-100: 22 78 99;
  --cyan-200: 21 94 117;
  --cyan-300: 14 116 144;
  --cyan-400: 14 116 144;
  --cyan-500: 8 145 178;
  --cyan-600: 8 145 178;
  --cyan-700: 103 232 249;
  --cyan-800: 165 243 252;
  --cyan-900: 207 250 254;
  --cyan-950: 236 254 255;
  --emerald-50: 2 44 34;
  --emerald-100: 6 78 59;
  --emerald-200: 6 95 70;
  --emerald-300: 4 120 87;
  --emerald-400: 4 120 87;
  --emerald-500: 5 150 105;
  --emerald-600: 5 150 105;
  --emerald-700: 110 231 183;
  --emerald-800: 167 243 208;
  --emerald-900: 209 250 229;
  --emerald-950: 236 253 245;
  --fuchsia-50: 74 4 78;
  --fuchsia-100: 112 26 117;
  --fuchsia-200: 134 25 143;
  --fuchsia-300: 162 28 175;
  --fuchsia-400: 162 28 175;
  --fuchsia-500: 192 38 211;
  --fuchsia-600: 192 38 211;
  --fuchsia-700: 240 171 252;
  --fuchsia-800: 245 208 254;
  --fuchsia-900: 250 232 255;
  --fuchsia-950: 253 244 255;
  --green-50: 5 46 22;
  --green-100: 20 83 45;
  --green-200: 22 101 52;
  --green-300: 21 128 61;
  --green-400: 21 128 61;
  --green-500: 22 163 74;
  --green-600: 22 163 74;
  --green-700: 134 239 172;
  --green-800: 187 247 208;
  --green-900: 220 252 231;
  --green-950: 240 253 244;
  --indigo-50: 30 27 75;
  --indigo-100: 49 46 129;
  --indigo-200: 55 48 163;
  --indigo-300: 67 56 202;
  --indigo-400: 67 56 202;
  --indigo-500: 79 70 229;
  --indigo-600: 79 70 229;
  --indigo-700: 165 180 252;
  --indigo-800: 199 210 254;
  --indigo-900: 224 231 255;
  --indigo-950: 238 242 255;
  --orange-50: 67 20 7;
  --orange-100: 124 45 18;
  --orange-200: 154 52 18;
  --orange-300: 194 65 12;
  --orange-400: 194 65 12;
  --orange-500: 234 88 12;
  --orange-600: 234 88 12;
  --orange-700: 253 186 116;
  --orange-800: 254 215 170;
  --orange-900: 255 237 213;
  --orange-950: 255 247 237;
  --pink-50: 80 7 36;
  --pink-100: 131 24 67;
  --pink-200: 157 23 77;
  --pink-300: 190 24 93;
  --pink-400: 190 24 93;
  --pink-500: 219 39 119;
  --pink-600: 219 39 119;
  --pink-700: 249 168 212;
  --pink-800: 251 207 232;
  --pink-900: 252 231 243;
  --pink-950: 253 242 248;
  --purple-50: 59 7 100;
  --purple-100: 88 28 135;
  --purple-200: 107 33 168;
  --purple-300: 126 34 206;
  --purple-400: 126 34 206;
  --purple-500: 147 51 234;
  --purple-600: 147 51 234;
  --purple-700: 216 180 254;
  --purple-800: 233 213 255;
  --purple-900: 243 232 255;
  --purple-950: 250 245 255;
  --red-50: 69 10 10;
  --red-100: 127 29 29;
  --red-200: 153 27 27;
  --red-300: 185 28 28;
  --red-400: 185 28 28;
  --red-500: 220 38 38;
  --red-600: 220 38 38;
  --red-700: 252 165 165;
  --red-800: 254 202 202;
  --red-900: 254 226 226;
  --red-950: 254 242 242;
  --sky-50: 8 47 73;
  --sky-100: 12 74 110;
  --sky-200: 7 89 133;
  --sky-300: 3 105 161;
  --sky-400: 3 105 161;
  --sky-500: 2 132 199;
  --sky-600: 2 132 199;
  --sky-700: 125 211 252;
  --sky-800: 186 230 253;
  --sky-900: 224 242 254;
  --sky-950: 240 249 255;
  --teal-50: 4 47 46;
  --teal-100: 19 78 74;
  --teal-200: 17 94 89;
  --teal-300: 15 118 110;
  --teal-400: 15 118 110;
  --teal-500: 13 148 136;
  --teal-600: 13 148 136;
  --teal-700: 94 234 212;
  --teal-800: 153 246 228;
  --teal-900: 204 251 241;
  --teal-950: 240 253 250;
  --violet-50: 46 16 101;
  --violet-100: 76 29 149;
  --violet-200: 91 33 182;
  --violet-300: 109 40 217;
  --violet-400: 109 40 217;
  --violet-500: 124 58 237;
  --violet-600: 124 58 237;
  --violet-700: 196 181 253;
  --violet-800: 221 214 254;
  --violet-900: 237 233 254;
  --violet-950: 245 243 255;
  --yellow-50: 66 32 6;
  --yellow-100: 113 63 18;
  --yellow-200: 133 77 14;
  --yellow-300: 161 98 7;
  --yellow-400: 161 98 7;
  --yellow-500: 202 138 4;
  --yellow-600: 202 138 4;
  --yellow-700: 253 224 71;
  --yellow-800: 254 240 138;
  --yellow-900: 254 249 195;
  --yellow-950: 254 252 232;
  --lime-50: 26 46 5;
  --lime-100: 54 83 20;
  --lime-200: 63 98 18;
  --lime-300: 77 124 15;
  --lime-400: 77 124 15;
  --lime-500: 101 163 13;
  --lime-600: 101 163 13;
  --lime-700: 190 242 100;
  --lime-800: 217 249 157;
  --lime-900: 236 252 203;
  --lime-950: 247 254 231;
  --rose-50: 76 5 25;
  --rose-100: 136 19 55;
  --rose-200: 159 18 57;
  --rose-300: 190 18 60;
  --rose-400: 190 18 60;
  --rose-500: 225 29 72;
  --rose-600: 225 29 72;
  --rose-700: 253 164 175;
  --rose-800: 254 205 211;
  --rose-900: 255 228 230;
  --rose-950: 255 241 242;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: 13 13 15;
  --surface: 21 21 23;
  --inset: 27 27 30;
  --line: 38 38 42;
  --line-strong: 52 52 58;
  --fg: 237 237 239;
  --muted: 161 161 170;
  --subtle: 139 139 148;
  --accent: 61 107 224;
  --accent-fg: 143 176 255;
  --up: 63 191 111;
  --down: 240 96 93;
  --warn: 224 168 58;
  --flow-in: 34 168 150;
  --flow-out: 236 90 85;
  --gray-50: 250 250 250;
  --gray-100: 244 244 245;
  --gray-200: 228 228 231;
  --gray-300: 212 212 216;
  --gray-400: 161 161 170;
  --gray-500: 139 139 148;
  --gray-600: 107 107 116;
  --gray-700: 63 63 70;
  --gray-800: 42 42 46;
  --gray-900: 24 24 27;
  --gray-950: 15 15 17;
  --amber-50: 255 251 235;
  --amber-100: 254 243 199;
  --amber-200: 253 230 138;
  --amber-300: 252 211 77;
  --amber-400: 251 191 36;
  --amber-500: 245 158 11;
  --amber-600: 217 119 6;
  --amber-700: 180 83 9;
  --amber-800: 146 64 14;
  --amber-900: 120 53 15;
  --amber-950: 69 26 3;
  --blue-50: 239 246 255;
  --blue-100: 219 234 254;
  --blue-200: 191 219 254;
  --blue-300: 147 197 253;
  --blue-400: 96 165 250;
  --blue-500: 59 130 246;
  --blue-600: 37 99 235;
  --blue-700: 29 78 216;
  --blue-800: 30 64 175;
  --blue-900: 30 58 138;
  --blue-950: 23 37 84;
  --cyan-50: 236 254 255;
  --cyan-100: 207 250 254;
  --cyan-200: 165 243 252;
  --cyan-300: 103 232 249;
  --cyan-400: 34 211 238;
  --cyan-500: 6 182 212;
  --cyan-600: 8 145 178;
  --cyan-700: 14 116 144;
  --cyan-800: 21 94 117;
  --cyan-900: 22 78 99;
  --cyan-950: 8 51 68;
  --emerald-50: 236 253 245;
  --emerald-100: 209 250 229;
  --emerald-200: 167 243 208;
  --emerald-300: 110 231 183;
  --emerald-400: 52 211 153;
  --emerald-500: 16 185 129;
  --emerald-600: 5 150 105;
  --emerald-700: 4 120 87;
  --emerald-800: 6 95 70;
  --emerald-900: 6 78 59;
  --emerald-950: 2 44 34;
  --fuchsia-50: 253 244 255;
  --fuchsia-100: 250 232 255;
  --fuchsia-200: 245 208 254;
  --fuchsia-300: 240 171 252;
  --fuchsia-400: 232 121 249;
  --fuchsia-500: 217 70 239;
  --fuchsia-600: 192 38 211;
  --fuchsia-700: 162 28 175;
  --fuchsia-800: 134 25 143;
  --fuchsia-900: 112 26 117;
  --fuchsia-950: 74 4 78;
  --green-50: 240 253 244;
  --green-100: 220 252 231;
  --green-200: 187 247 208;
  --green-300: 134 239 172;
  --green-400: 74 222 128;
  --green-500: 34 197 94;
  --green-600: 22 163 74;
  --green-700: 21 128 61;
  --green-800: 22 101 52;
  --green-900: 20 83 45;
  --green-950: 5 46 22;
  --indigo-50: 238 242 255;
  --indigo-100: 224 231 255;
  --indigo-200: 199 210 254;
  --indigo-300: 165 180 252;
  --indigo-400: 129 140 248;
  --indigo-500: 99 102 241;
  --indigo-600: 79 70 229;
  --indigo-700: 67 56 202;
  --indigo-800: 55 48 163;
  --indigo-900: 49 46 129;
  --indigo-950: 30 27 75;
  --orange-50: 255 247 237;
  --orange-100: 255 237 213;
  --orange-200: 254 215 170;
  --orange-300: 253 186 116;
  --orange-400: 251 146 60;
  --orange-500: 249 115 22;
  --orange-600: 234 88 12;
  --orange-700: 194 65 12;
  --orange-800: 154 52 18;
  --orange-900: 124 45 18;
  --orange-950: 67 20 7;
  --pink-50: 253 242 248;
  --pink-100: 252 231 243;
  --pink-200: 251 207 232;
  --pink-300: 249 168 212;
  --pink-400: 244 114 182;
  --pink-500: 236 72 153;
  --pink-600: 219 39 119;
  --pink-700: 190 24 93;
  --pink-800: 157 23 77;
  --pink-900: 131 24 67;
  --pink-950: 80 7 36;
  --purple-50: 250 245 255;
  --purple-100: 243 232 255;
  --purple-200: 233 213 255;
  --purple-300: 216 180 254;
  --purple-400: 192 132 252;
  --purple-500: 168 85 247;
  --purple-600: 147 51 234;
  --purple-700: 126 34 206;
  --purple-800: 107 33 168;
  --purple-900: 88 28 135;
  --purple-950: 59 7 100;
  --red-50: 254 242 242;
  --red-100: 254 226 226;
  --red-200: 254 202 202;
  --red-300: 252 165 165;
  --red-400: 248 113 113;
  --red-500: 239 68 68;
  --red-600: 220 38 38;
  --red-700: 185 28 28;
  --red-800: 153 27 27;
  --red-900: 127 29 29;
  --red-950: 69 10 10;
  --sky-50: 240 249 255;
  --sky-100: 224 242 254;
  --sky-200: 186 230 253;
  --sky-300: 125 211 252;
  --sky-400: 56 189 248;
  --sky-500: 14 165 233;
  --sky-600: 2 132 199;
  --sky-700: 3 105 161;
  --sky-800: 7 89 133;
  --sky-900: 12 74 110;
  --sky-950: 8 47 73;
  --teal-50: 240 253 250;
  --teal-100: 204 251 241;
  --teal-200: 153 246 228;
  --teal-300: 94 234 212;
  --teal-400: 45 212 191;
  --teal-500: 20 184 166;
  --teal-600: 13 148 136;
  --teal-700: 15 118 110;
  --teal-800: 17 94 89;
  --teal-900: 19 78 74;
  --teal-950: 4 47 46;
  --violet-50: 245 243 255;
  --violet-100: 237 233 254;
  --violet-200: 221 214 254;
  --violet-300: 196 181 253;
  --violet-400: 167 139 250;
  --violet-500: 139 92 246;
  --violet-600: 124 58 237;
  --violet-700: 109 40 217;
  --violet-800: 91 33 182;
  --violet-900: 76 29 149;
  --violet-950: 46 16 101;
  --yellow-50: 254 252 232;
  --yellow-100: 254 249 195;
  --yellow-200: 254 240 138;
  --yellow-300: 253 224 71;
  --yellow-400: 250 204 21;
  --yellow-500: 234 179 8;
  --yellow-600: 202 138 4;
  --yellow-700: 161 98 7;
  --yellow-800: 133 77 14;
  --yellow-900: 113 63 18;
  --yellow-950: 66 32 6;
  --lime-50: 247 254 231;
  --lime-100: 236 252 203;
  --lime-200: 217 249 157;
  --lime-300: 190 242 100;
  --lime-400: 163 230 53;
  --lime-500: 132 204 22;
  --lime-600: 101 163 13;
  --lime-700: 77 124 15;
  --lime-800: 63 98 18;
  --lime-900: 54 83 20;
  --lime-950: 26 46 5;
  --rose-50: 255 241 242;
  --rose-100: 255 228 230;
  --rose-200: 254 205 211;
  --rose-300: 253 164 175;
  --rose-400: 251 113 133;
  --rose-500: 244 63 94;
  --rose-600: 225 29 72;
  --rose-700: 190 18 60;
  --rose-800: 159 18 57;
  --rose-900: 136 19 55;
  --rose-950: 76 5 25;
}

/* ── Dasar ─────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: rgb(var(--canvas)); color: rgb(var(--fg));
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
}
::selection { background: rgb(var(--accent) / .22); }
a { color: inherit; }
:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgb(var(--line-strong)); border-radius: 99px; border: 3px solid rgb(var(--canvas)); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgb(var(--canvas) / .86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgb(var(--line));
}
.site-header .inner { max-width: 72rem; margin: 0 auto; padding: 0 16px; height: 52px;
  display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px;
  letter-spacing: -.01em; text-decoration: none; color: rgb(var(--fg)); flex-shrink: 0; }
.brand-mark { width: 20px; height: 20px; color: rgb(var(--accent)); }
.nav-links { display: flex; align-items: center; align-self: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link { position: relative; padding: 6px 10px; border-radius: 6px; font-size: 13.5px; font-weight: 500;
  color: rgb(var(--subtle)); text-decoration: none; white-space: nowrap; transition: color .12s, background .12s; }
.nav-link:hover { color: rgb(var(--fg)); background: rgb(var(--inset)); }
.nav-link.active { color: rgb(var(--fg)); }
.nav-link.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -11px;
  height: 2px; border-radius: 2px; background: rgb(var(--fg)); }
/* garis penanda harus di DALAM area menu (yang bisa digulir & memotong isinya) */
.nav-link.active::after { bottom: -10px; }
.theme-toggle { flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 6px; border: 1px solid rgb(var(--line)); background: transparent;
  color: rgb(var(--subtle)); cursor: pointer; }
.theme-toggle:hover { color: rgb(var(--fg)); background: rgb(var(--inset)); }
.theme-toggle svg { width: 16px; height: 16px; }
:root[data-theme="dark"] .icon-sun, :root:not([data-theme="dark"]) .icon-moon { display: none; }

.site-footer { max-width: 72rem; margin: 48px auto 0; padding: 20px 16px 32px;
  border-top: 1px solid rgb(var(--line)); font-size: 12.5px; color: rgb(var(--subtle)); }

/* ── Komponen ──────────────────────────────────────────── */
.card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 10px; }
:root:not([data-theme="dark"]) .card { box-shadow: 0 1px 2px rgb(0 0 0 / .04); }

.page-title { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.page-sub { color: rgb(var(--muted)); font-size: 14px; margin-top: 6px; max-width: 68ch; }
.section-title { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; color: rgb(var(--fg)); }
.label { font-size: 12.5px; font-weight: 500; color: rgb(var(--subtle)); }

.field { width: 100%; background: rgb(var(--surface)); border: 1px solid rgb(var(--line-strong));
  border-radius: 8px; padding: 9px 12px; font-size: 14px; color: rgb(var(--fg)); outline: none;
  transition: border-color .12s, box-shadow .12s; }
.field::placeholder { color: rgb(var(--subtle)); }
.field:focus { border-color: rgb(var(--accent)); box-shadow: 0 0 0 3px rgb(var(--accent) / .18); }
select.field { appearance: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 550; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s, color .12s; }
.btn-primary { background: rgb(var(--accent)); color: #fff; }
.btn-primary:hover { background: rgb(var(--accent) / .9); }
.btn-secondary { background: rgb(var(--surface)); color: rgb(var(--fg)); border-color: rgb(var(--line-strong)); }
.btn-secondary:hover { background: rgb(var(--inset)); }

/* Segmented control (tab) */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: rgb(var(--inset));
  border: 1px solid rgb(var(--line)); }
.tab-btn { padding: 6px 14px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: rgb(var(--muted));
  text-decoration: none; border: 0; background: transparent; cursor: pointer; white-space: nowrap; }
.tab-btn:hover { color: rgb(var(--fg)); }
.tab-btn.active { background: rgb(var(--surface)); color: rgb(var(--fg));
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px rgb(var(--line)); }

/* Radio yang tampil sebagai kontrol segmen */
.seg input:checked + .tab-btn, .seg-radio input:checked + .tab-btn { background: rgb(var(--surface)); color: rgb(var(--fg));
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px rgb(var(--line)); }
.seg input:focus-visible + .tab-btn, .seg-radio input:focus-visible + .tab-btn { outline: 2px solid rgb(var(--accent)); outline-offset: 1px; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px;
  font-size: 12px; font-weight: 500; border: 1px solid rgb(var(--line)); color: rgb(var(--muted));
  background: rgb(var(--surface)); white-space: nowrap; }

.up { color: rgb(var(--up)); }
.down { color: rgb(var(--down)); }

/* Status rencana di daftar rekomendasi (kata selalu tertulis; warna hanya penegas) */
.plan-tag { white-space: normal; }
.plan-tag.up { color: rgb(var(--up)); border-color: rgb(var(--up) / .4); }
.plan-tag.warn { color: rgb(var(--warn)); border-color: rgb(var(--warn) / .45); }
.plan-tag.down { color: rgb(var(--down)); border-color: rgb(var(--down) / .4); }

.divide-rows > * + * { border-top: 1px solid rgb(var(--line)); }

/* Baris aset yang bisa diklik (Rekomendasi, Radar) */
.row-btn { display: block; width: 100%; text-align: left; padding: 14px 16px; background: transparent; border: 0;
  cursor: pointer; transition: background .12s; color: inherit; font: inherit; }
.row-btn:hover { background: rgb(var(--inset)); }
.row-btn:hover .tk { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(var(--line-strong)); }
.detail { font-size: 13px; color: rgb(var(--muted)); margin-top: 6px; line-height: 1.5; }
.detail b { font-weight: 550; color: rgb(var(--fg)); }

/* Aliran dana: batang divergen dari garis tengah (kanan = masuk, kiri = keluar).
   Arah juga terbaca dari posisi & tanda +/− — warna hanya penegas. */
.fl-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; column-gap: 12px; row-gap: 4px;
  align-items: center; padding: 9px 0; }
.fl-row + .fl-row { border-top: 1px solid rgb(var(--line)); }
.fl-label { grid-column: 1 / -1; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.fl-label .sub { color: rgb(var(--subtle)); font-size: 12.5px; }
.fl-track { position: relative; height: 10px; }
.fl-track::before { content: ""; position: absolute; left: 50%; top: -5px; bottom: -5px; width: 1px;
  background: rgb(var(--line-strong)); }
.fl-bar { position: absolute; top: 0; height: 10px; min-width: 2px; }
.fl-bar.in { left: calc(50% + 1px); background: rgb(var(--flow-in)); border-radius: 0 4px 4px 0; }
.fl-bar.out { right: calc(50% + 1px); background: rgb(var(--flow-out)); border-radius: 4px 0 0 4px; }
.fl-val { text-align: right; font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums;
  color: rgb(var(--fg)); white-space: nowrap; }
.fl-axis { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; column-gap: 12px;
  font-size: 11.5px; color: rgb(var(--subtle)); }
.fl-axis > div { display: flex; justify-content: space-between; }
@media (min-width: 640px) {
  .fl-row { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 6.5rem; }
  .fl-label { grid-column: auto; }
  .fl-axis { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 6.5rem; }
  .fl-axis::before { content: ""; }
}
.fl-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.fl-key.in { background: rgb(var(--flow-in)); }
.fl-key.out { background: rgb(var(--flow-out)); }

/* Kolom aliran harian (ETF) */
.colchart { width: 100%; height: auto; display: block; overflow: visible; }
.colchart .zero { stroke: rgb(var(--line-strong)); stroke-width: 1; }
.colchart .bar-in { fill: rgb(var(--flow-in)); }
.colchart .bar-out { fill: rgb(var(--flow-out)); }
.colchart .hit { fill: transparent; cursor: default; }
.colchart .hit:hover + path, .colchart .hit:focus + path { opacity: .75; }
.colchart .hit:focus { outline: none; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; padding: 6px 9px; border-radius: 7px;
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line-strong)); box-shadow: 0 4px 14px rgb(0 0 0 / .12);
  font-size: 12.5px; line-height: 1.35; color: rgb(var(--muted)); white-space: nowrap; }
.chart-tip b { display: block; color: rgb(var(--fg)); font-weight: 600; font-variant-numeric: tabular-nums; }

.stat { padding: 12px 14px; }
.stat .k { font-size: 12.5px; color: rgb(var(--subtle)); }
.stat .v { font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: rgb(var(--fg)); margin-top: 2px; }
.stat .s { font-size: 12.5px; color: rgb(var(--muted)); margin-top: 2px; }

.src { font-size: 12px; color: rgb(var(--subtle)); line-height: 1.5; }
.kind { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px; font-size: 11px;
  font-weight: 600; letter-spacing: .02em; text-transform: uppercase; border: 1px solid rgb(var(--line-strong));
  color: rgb(var(--muted)); vertical-align: 2px; }

/* Cek token: kesimpulan + daftar temuan. Level selalu tertulis sebagai kata — warna hanya penegas. */
.verdict { border-radius: 10px; padding: 14px 16px; border: 1px solid rgb(var(--line)); background: rgb(var(--inset)); }
.verdict.danger { border-color: rgb(var(--down) / .5); background: rgb(var(--down) / .06); }
.verdict.warn { border-color: rgb(var(--warn) / .5); background: rgb(var(--warn) / .07); }
.verdict.ok { border-color: rgb(var(--up) / .45); background: rgb(var(--up) / .05); }
.verdict .lbl { font-size: 16px; font-weight: 600; color: rgb(var(--fg)); }
.verdict.danger .lbl { color: rgb(var(--down)); }
.verdict.warn .lbl { color: rgb(var(--warn)); }
.verdict.ok .lbl { color: rgb(var(--up)); }
.ts-flag { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 10px; padding: 10px 0; font-size: 13.5px; line-height: 1.5; }
.ts-flag + .ts-flag { border-top: 1px solid rgb(var(--line)); }
.ts-flag .t { color: rgb(var(--fg)); font-weight: 550; }
.ts-flag .d { color: rgb(var(--muted)); }
.ts-lvl { font-size: 12px; font-weight: 600; padding-top: 2px; color: rgb(var(--subtle)); }
.ts-lvl.danger { color: rgb(var(--down)); }
.ts-lvl.warn { color: rgb(var(--warn)); }
.ts-lvl.ok { color: rgb(var(--up)); }

/* Grafik candlestick ala TradingView: baris O/H/L/C di pojok kiri atas */
.lw-legend { position: absolute; top: 6px; left: 8px; z-index: 3; pointer-events: none; font-size: 12px;
  color: rgb(var(--muted)); background: rgb(var(--surface) / .85); padding: 2px 8px; border-radius: 6px;
  white-space: nowrap; max-width: calc(100% - 90px); overflow: hidden; text-overflow: ellipsis; }
.lw-legend b { font-weight: 600; }

/* Kamus pola candlestick: gambar mini + penjelasan */
.candle-svg { flex-shrink: 0; }
.candle-svg .cs-up line, .candle-svg .cs-up rect { stroke: rgb(var(--up)); fill: rgb(var(--up)); }
.candle-svg .cs-down line, .candle-svg .cs-down rect { stroke: rgb(var(--down)); fill: rgb(var(--down)); }
.candle-svg .cs-level { stroke: rgb(var(--subtle)); stroke-width: 1.2; }
.cg-details summary { cursor: pointer; font-size: 12.5px; color: rgb(var(--accent-fg)); width: fit-content; }
.cg-details summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.cg-body { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 8px; padding: 10px 12px;
  border: 1px solid rgb(var(--line)); border-radius: 8px; background: rgb(var(--inset)); }
.cg-text { flex: 1 1 260px; display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 4px 10px; font-size: 13px; line-height: 1.5; margin: 0; }
.cg-text dt { color: rgb(var(--subtle)); font-weight: 500; }
.cg-text dd { color: rgb(var(--muted)); margin: 0; }
@media (max-width: 480px) { .cg-text { grid-template-columns: 1fr; gap: 0; } .cg-text dt { margin-top: 6px; } }

/* Daftar isi halaman analisis */
.toc { position: sticky; top: 52px; z-index: 30; background: rgb(var(--canvas) / .9);
  backdrop-filter: blur(8px); border-bottom: 1px solid rgb(var(--line)); }
.toc .inner { max-width: 72rem; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto;
  scrollbar-width: none; }
.toc .inner::-webkit-scrollbar { display: none; }
.toc a { padding: 9px 10px; font-size: 13px; color: rgb(var(--subtle)); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; }
.toc a:hover { color: rgb(var(--fg)); }
.toc a.active { color: rgb(var(--fg)); border-bottom-color: rgb(var(--fg)); }
[id^="sec-"] { scroll-margin-top: 110px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
