:root {
  --paper: #edf1fa;
  --surface: #ffffff;
  --ink: #10202c;
  --muted: #586977;
  --line: #cbd7ee;
  --brand: #2160e8;
  --brand-dark: #0a1740;
  --tint: #dde7fb;
  --low: #1f7a4d;
  --med: #a86a10;
  --high: #b3261e;
  --pos: #1f7a4d;
  --neg: #b3261e;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .75rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; line-height: 1.25; margin: 0; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
p { margin: 0 0 .75rem; max-width: 70ch; }
a { color: var(--brand); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }

/* Kerangka */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1rem; background: var(--brand-dark); color: #fff;
}
.brand { color: #fff; font-weight: 700; text-decoration: none; letter-spacing: .01em; }
.topnav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .95rem; }
.topnav a { color: #fff; }
.topnav .who { opacity: .8; }
.wrap { max-width: 880px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

/* Kartu */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.1rem 1.1rem 1.25rem; margin: 0 0 1rem;
}
.narrow { max-width: 460px; margin: 1.5rem auto; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .5rem; }
.acct-head p { margin: 0; }
.section { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: 1rem; }

/* Form */
.stack { display: grid; gap: .9rem; }
label { display: grid; gap: .3rem; font-size: .95rem; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number] {
  width: 100%; min-height: 44px; padding: .5rem .7rem; font: inherit; color: inherit;
  background: #fff; border: 1px solid #aeb9c2; border-radius: 8px;
}
input.days { width: 5rem; min-height: 38px; }
input.notef { width: 12rem; min-height: 38px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .5rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer;
  color: #fff; background: var(--brand); border: 1px solid var(--brand); border-radius: 8px;
}
.btn:hover { background: var(--brand-dark); }
.btn-quiet { color: var(--brand); background: #fff; border-color: #9db4e3; }
.btn-quiet:hover { background: var(--tint); }
.btn-stop { background: var(--high); border-color: var(--high); }
.btn-stop:hover { background: #8f1e18; }
.btn-danger { color: var(--high); background: #fff; border-color: #d9a29e; }
.btn-danger:hover { background: #fbeceb; }
.btn-sm { min-height: 38px; padding: .3rem .8rem; font-size: .9rem; }
.link { background: none; border: 0; padding: 0; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; }
.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.wrap { row-gap: .6rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; font-size: .9rem; margin: .5rem 0 .75rem; }
.check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; }

/* Pesan */
.note { padding: .6rem .8rem; border-radius: 8px; margin: 0 0 .75rem; font-size: .95rem; border-left: 4px solid; }
.note-ok { background: #e6f3ec; border-color: var(--pos); }
.note-err { background: #fbeceb; border-color: var(--neg); }
.note-warn { background: #fbf1de; border-color: var(--med); }
.note-info { background: var(--tint); border-color: var(--brand); }

/* Status */
.pill { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; padding: .15rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pill-ok { color: var(--pos); background: #e6f3ec; }
.pill-warn { color: var(--med); background: #fbf1de; }
.pill-bad { color: var(--neg); background: #fbeceb; }
.pill-mute { color: var(--muted); background: #eef1f3; }

.conn { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; margin: 0 0 .9rem; }
.conn::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: #9aa7b1; }
.conn-online::before { background: var(--pos); box-shadow: 0 0 0 4px #d5ebde; }
.conn-stale::before { background: var(--med); }
.conn-offline::before { background: var(--neg); }

/* Angka monitoring */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem .75rem; margin: 0 0 .75rem; }
.stats > div { background: #f5f7f9; border-radius: 8px; padding: .6rem .75rem; }
.stats dt { font-size: .82rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats dd.sub { font-size: .8rem; font-weight: 500; color: var(--muted); min-height: 1.1em; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* Pemilih mode risiko */
.modes { display: grid; grid-template-columns: 1fr; gap: .6rem; margin-bottom: .75rem; }
@media (min-width: 640px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode { position: relative; display: block; cursor: pointer; font-weight: 400; }
.mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mode-body {
  display: grid; gap: .15rem; height: 100%; padding: .8rem .9rem;
  background: #fff; border: 2px solid var(--line); border-top: 7px solid var(--c); border-radius: 10px;
}
.mode-name { font-size: 1.25rem; font-weight: 800; color: var(--c); }
.mode-cap { font-weight: 600; font-variant-numeric: tabular-nums; }
.mode-usd { font-size: .85rem; color: var(--muted); }
.mode-desc { font-size: .9rem; margin-top: .3rem; }
.mode input:checked + .mode-body { background: var(--c); border-color: var(--c); color: #fff; }
.mode input:checked + .mode-body .mode-name,
.mode input:checked + .mode-body .mode-usd { color: #fff; }
.mode input:focus-visible + .mode-body { outline: 3px solid var(--brand); outline-offset: 2px; }
.mode-low { --c: var(--low); }
.mode-med { --c: var(--med); }
.mode-high { --c: var(--high); }

/* Tab, tabel, kunci */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.tabs a { padding: .4rem .9rem; border-radius: 999px; text-decoration: none; color: var(--ink); background: #dfe4e8; font-weight: 600; font-size: .95rem; }
.tabs a.on { background: var(--brand); color: #fff; }
.tbl { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f5f7f9; font-weight: 600; white-space: nowrap; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .5rem .9rem; margin: .5rem 0 .9rem; }
.kv > div { display: grid; }
.kv span { color: var(--muted); font-size: .8rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.key { display: block; padding: .7rem .8rem; background: #f5f7f9; border: 1px dashed #9db4e3; border-radius: 8px; word-break: break-all; user-select: all; font-size: .95rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Halaman depan komunitas */
.hero { display: grid; gap: 1.5rem; align-items: center; margin: .5rem 0 1.75rem; padding: 1.5rem; background: radial-gradient(70% 90% at 85% 25%, rgba(33, 96, 232, .38), rgba(7, 14, 43, 0) 70%), #070e2b; color: #fff; border-radius: 16px; }
@media (min-width: 900px) { .hero { padding: 2rem 2.25rem; grid-template-columns: minmax(0, 1fr) 270px; } }
@media (min-width: 640px) and (max-width: 899px) { .hero { padding: 1.75rem 2rem; } .hero-img { max-width: 300px; } }
.hero-img { width: 100%; max-width: 380px; height: auto; display: block; justify-self: center; border-radius: 12px; }
.hero .btn-quiet { background: transparent; color: #fff; border-color: #5f82d9; }
.hero .btn-quiet:hover { background: #142660; }
.logo { height: 56px; width: auto; display: block; margin: 0 0 .75rem; border-radius: 8px; }
.wordmark { font-size: clamp(1.5rem, 6.8vw, 2.5rem); line-height: 1.05; letter-spacing: .02em; margin: 0 0 .75rem; color: #fff; overflow-wrap: anywhere; }
.hero-text { min-width: 0; }
.lead { font-size: 1.15rem; max-width: 46ch; margin: 0 0 1.1rem; color: #c5d3f5; }
.choices { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: 1rem; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { display: grid; gap: .3rem; padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 10px; }
.choice b { font-size: 1.1rem; }
.choice span { font-size: .92rem; color: var(--muted); }
.choice:hover { border-color: var(--brand); }
.choice-yes { border-color: var(--brand); background: var(--tint); }
.steps { margin: .75rem 0 1.1rem; padding-left: 1.3rem; max-width: 60ch; }
.steps li { margin-bottom: .45rem; }
.risk { max-width: 70ch; margin-top: 1.5rem; }
.back { margin: 1rem 0 0; }

/* Halaman depan: chip, fitur, langkah, tombol besar di HP */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 .9rem; }
.chips li { padding: .2rem .8rem; border: 1px solid #3c5fb8; border-radius: 999px; font-size: .9rem; color: #c5d3f5; }
.hero .btn { min-height: 48px; padding: .6rem 1.3rem; }
@media (max-width: 639px) {
  .hero { padding: 1.25rem; }
  .hero .row .btn { flex: 1 1 100%; }
}
.section-title { font-size: 1.3rem; margin: 1.75rem 0 .75rem; }
.features { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: 12px; padding: 1rem 1.1rem 1.1rem; }
.feature h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); }
.howto { counter-reset: langkah; list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.howto li { counter-increment: langkah; display: flex; align-items: center; gap: .85rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; }
.howto li::before { content: counter(langkah); flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }

/* Pilihan versi, pesanan, pembayaran */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plans { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.2rem 1.3rem; display: grid; align-content: start; gap: .35rem; }
.plan-paid { border: 2px solid var(--brand); }
.plan h3 { font-size: 1.3rem; margin: 0; }
.plan-lead { margin: 0; color: var(--muted); }
.plan-list { margin: .5rem 0 .75rem; padding-left: 1.2rem; }
.plan-list li { margin-bottom: .25rem; }
.plan-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .25rem; }
.prices { list-style: none; padding: 0; margin: 0 0 .75rem; display: grid; gap: .35rem; }
.prices li { display: flex; justify-content: space-between; gap: 1rem; background: var(--tint); border-radius: 8px; padding: .5rem .8rem; }
.plan-pick { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.radio { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; background: #f5f8fe; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .85rem; cursor: pointer; }
.radio input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; }
.radio small { font-weight: 400; color: var(--muted); }
.payinfo { margin: .5rem 0 .75rem; padding: .6rem .8rem; background: #fff; border: 1px dashed #9db4e3; border-radius: 8px; }
select { min-height: 44px; padding: .4rem .7rem; font: inherit; color: inherit; background: #fff; border: 1px solid #aeb9c2; border-radius: 8px; max-width: 100%; }

/* Hero: grafik candle bergerak di latar, logo berdenyut halus, gambar lebih kecil di HP */
.hero { position: relative; overflow: hidden; }
.hero-chart { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .42; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3) 0%, #000 60%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3) 0%, #000 60%); }
.hero-text, .hero-img { position: relative; z-index: 1; }
@keyframes hero-glow { 0%, 100% { box-shadow: 0 0 0 rgba(33, 96, 232, 0); } 50% { box-shadow: 0 0 34px rgba(60, 120, 255, .5); } }
.hero-img { animation: none; }
@media (max-width: 639px) { .hero-img { max-width: 200px; } }

/* Robot trading di hero (menggantikan logo besar) */
.hero-robot { width: 100%; max-width: 260px; height: auto; display: block; justify-self: center; position: relative; z-index: 1; }
@media (max-width: 639px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-robot { max-width: 210px; } }

/* Hero lebih bersih: grafik memudar di area teks (komputer) dan lebih tipis (HP) */
.hero-chart { opacity: .34 !important;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 38%, #000 78%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 38%, #000 78%); }
@media (max-width: 639px) {
  .hero-chart { opacity: .2 !important; -webkit-mask-image: none; mask-image: none; }
}
