/* ============================================================
   DAPA Checker — dark theme
   ============================================================ */

:root {
  --bg:          #070a12;
  --bg-soft:     #0b101c;
  --surface:     rgba(255, 255, 255, .035);
  --surface-2:   rgba(255, 255, 255, .06);
  --line:        rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .16);

  --text:        #e8edf7;
  --text-dim:    #99a4bb;
  --text-faint:  #6b7590;

  --accent:      #6d7cff;
  --accent-2:    #22d3ee;
  --accent-soft: rgba(109, 124, 255, .16);

  --good:   #34d399;
  --warn:   #fbbf24;
  --bad:    #fb7185;
  --info:   #60a5fa;
  --violet: #a78bfa;

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 24px 60px -28px rgba(0, 0, 0, .95);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Atribut hidden harus menang atas display eksplisit milik .btn dkk. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; }

button, input, textarea, select { font: inherit; color: inherit; }

.wrap { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }

.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;
}

/* ---------- Aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(109, 124, 255, .10), transparent 70%),
    linear-gradient(180deg, #080c16 0%, #070a12 45%, #05070e 100%);
}
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora span:nth-child(1) { width: 44vw; height: 44vw; top: -14vw; left: -8vw;  background: #3b3fd6; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; top: 4vw;  right: -10vw; background: #0e7490; animation-delay: -9s; }
.aurora span:nth-child(3) { width: 32vw; height: 32vw; top: 52vw; left: 28vw;   background: #6d28d9; opacity: .3; animation-delay: -17s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 5vw, 0) scale(1.15); }
}

/* ---------- Pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .34rem .7rem; border-radius: 999px;
  font-size: .74rem; font-weight: 550; color: var(--text-dim);
  border: 1px solid var(--line); background: var(--surface);
}
a.pill { text-decoration: none; transition: .18s; }
a.pill:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { padding: 3.4rem 0 2rem; max-width: 660px; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); font-weight: 700; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin-top: .85rem; color: var(--text-dim); font-size: 1.02rem; }

.link-btn {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--text-faint); font-size: .84rem;
  border-bottom: 1px dashed var(--line-strong); transition: color .2s, border-color .2s;
}
.link-btn svg { width: 15px; height: 15px; }
.link-btn:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Tabs ---------- */
.tabs {
  position: relative; display: inline-flex; gap: .25rem; padding: .3rem;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  margin-bottom: 1.25rem;
}
.tab {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .58rem 1.05rem; border: 0; border-radius: 11px;
  background: none; color: var(--text-dim); font-weight: 550; font-size: .9rem;
  cursor: pointer; transition: color .2s;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: #fff; }
.tab-glider {
  position: absolute; z-index: 0; top: .3rem; bottom: .3rem; left: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(109, 124, 255, .9), rgba(34, 211, 238, .65));
  box-shadow: 0 8px 22px -10px rgba(109, 124, 255, .95);
  transition: transform .34s var(--ease), width .34s var(--ease);
}

/* ---------- Panels ---------- */
.panel { display: none; animation: rise .38s var(--ease); }
.panel.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Card ---------- */
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  box-shadow: var(--shadow);
}

/* ---------- Fields & buttons ---------- */
.searchbar { display: flex; gap: .6rem; padding: .6rem; align-items: center; }

.field { position: relative; flex: 1; min-width: 0; }
.field-icon {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-faint); pointer-events: none;
}
.field input {
  width: 100%; padding: .85rem 2.4rem .85rem 2.7rem;
  border: 1px solid transparent; border-radius: 13px;
  background: rgba(0, 0, 0, .28); color: var(--text);
  outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus {
  border-color: rgba(109, 124, 255, .6);
  background: rgba(0, 0, 0, .42);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field input[type="search"]::-webkit-search-cancel-button { display: none; }

.field-clear {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; border-radius: 8px;
  background: none; color: var(--text-faint); font-size: 1.15rem; line-height: 1;
  cursor: pointer; opacity: 0; pointer-events: none; transition: .2s;
}
.field-clear.show { opacity: 1; pointer-events: auto; }
.field-clear:hover { background: var(--surface-2); color: var(--text); }

.field-sm input { padding: .55rem .8rem .55rem 2.3rem; border-radius: 10px; font-size: .87rem; }
.field-sm { flex: 0 1 230px; }
.field-sm .field-icon { left: .7rem; width: 15px; height: 15px; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .82rem 1.4rem; border: 1px solid transparent; border-radius: 13px;
  font-weight: 600; font-size: .9rem; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8b5cf6 55%, var(--accent-2));
  background-size: 180% 180%;
  box-shadow: 0 12px 30px -14px rgba(109, 124, 255, 1);
  animation: sheen 7s linear infinite;
}
@keyframes sheen { 50% { background-position: 100% 50%; } }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text-dim); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }

.btn-danger { background: rgba(251, 113, 133, .13); border-color: rgba(251, 113, 133, .32); color: #fda4af; }
.btn-danger:hover:not(:disabled) { background: rgba(251, 113, 133, .2); }

.btn-sm { padding: .5rem .85rem; font-size: .82rem; border-radius: 10px; }

.spinner {
  display: none; width: 15px; height: 15px; flex: none;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-busy .spinner { display: block; }
.btn.is-busy { pointer-events: none; opacity: .8; }

/* ---------- Options row ---------- */
.opts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem;
  padding: .95rem .35rem .25rem; font-size: .85rem; color: var(--text-dim);
}

.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: relative; width: 34px; height: 19px; flex: none; border-radius: 999px;
  background: rgba(255, 255, 255, .12); transition: background .22s;
}
.switch .track::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  transition: transform .24s var(--ease);
}
.switch input:checked + .track { background: linear-gradient(120deg, var(--accent), var(--accent-2)); }
.switch input:checked + .track::after { transform: translateX(15px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }

.samples { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-left: auto; }
.samples > span { color: var(--text-faint); font-size: .8rem; }
.chip {
  padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text-dim);
  font-size: .78rem; font-family: var(--mono); cursor: pointer; transition: .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }

.ctl { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--text-dim); }
.ctl input {
  width: 72px; padding: .45rem .6rem; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .3); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ctl input:focus { border-color: rgba(109, 124, 255, .6); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Bulk input ---------- */
.bulk-card { padding: 1.15rem; }
.bulk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.bulk-head label { font-size: .85rem; font-weight: 550; color: var(--text-dim); }
.counter {
  font-size: .76rem; font-family: var(--mono); color: var(--accent-2);
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .2);
  padding: .18rem .55rem; border-radius: 999px;
}

#bulkInput {
  width: 100%; padding: .9rem 1rem; resize: vertical; min-height: 150px;
  border: 1px solid var(--line); border-radius: 13px;
  background: rgba(0, 0, 0, .3); color: var(--text);
  font-family: var(--mono); font-size: .86rem; line-height: 1.65;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
#bulkInput:focus { border-color: rgba(109, 124, 255, .6); box-shadow: 0 0 0 4px var(--accent-soft); }
#bulkInput::placeholder { color: var(--text-faint); }

.bulk-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.3rem;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.bulk-actions { display: flex; gap: .5rem; margin-left: auto; flex-wrap: wrap; }

/* ---------- Progress ---------- */
.progress-card { padding: 1.05rem 1.15rem; margin-top: 1rem; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; font-size: .9rem; }
.progress-top span { font-family: var(--mono); color: var(--accent-2); font-size: .88rem; }

.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  background-size: 200% 100%;
  transition: width .35s var(--ease);
  animation: flow 2s linear infinite;
}
@keyframes flow { to { background-position: -200% 0; } }

.stat-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.stat-chip {
  padding: .3rem .68rem; border-radius: 999px; font-size: .77rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-dim);
}
.stat-chip b, .stat-chip i { font-style: normal; font-weight: 650; color: var(--text); font-family: var(--mono); }
.stat-chip.ok b  { color: var(--good); }
.stat-chip.err b { color: var(--bad); }

/* ---------- Table ---------- */
.table-card { margin-top: 1rem; overflow: hidden; }
.table-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem;
  padding: .85rem 1rem; border-bottom: 1px solid var(--line);
}
.toolbar-spacer { flex: 1 1 auto; }
.shown-count { font-size: .78rem; color: var(--text-faint); font-family: var(--mono); }

.table-scroll { overflow-x: auto; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; }

.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.data-table th {
  position: sticky; top: 0; z-index: 2;
  padding: .7rem .75rem; text-align: left; white-space: nowrap;
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint);
  background: #0d121e;
  border-bottom: 1px solid var(--line);
}
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]:hover { color: var(--text); }
.data-table th[data-sort]::after { content: "⇅"; margin-left: .35rem; opacity: .3; font-size: .8em; }
.data-table th.sort-asc::after  { content: "↑"; opacity: 1; color: var(--accent-2); }
.data-table th.sort-desc::after { content: "↓"; opacity: 1; color: var(--accent-2); }
.data-table th.num, .data-table td.num { text-align: right; }

.data-table td {
  padding: .62rem .75rem; border-bottom: 1px solid rgba(255, 255, 255, .05);
  vertical-align: middle; white-space: nowrap;
}
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .035); }
.data-table tbody tr.is-pending { opacity: .55; }
.data-table tbody tr.is-error td { color: var(--text-faint); }

.col-num { width: 44px; color: var(--text-faint); font-family: var(--mono); font-size: .78rem; }
td.col-num { color: var(--text-faint); font-family: var(--mono); font-size: .78rem; }
.col-domain { min-width: 190px; }
.col-act { width: 44px; }

.dom-cell { display: flex; align-items: center; gap: .5rem; }
.dom-cell a { color: var(--text); text-decoration: none; font-weight: 550; }
.dom-cell a:hover { color: var(--accent-2); text-decoration: underline; }
.cached-tag {
  font-size: .62rem; padding: .1rem .35rem; border-radius: 5px;
  background: rgba(167, 139, 250, .14); color: var(--violet); border: 1px solid rgba(167, 139, 250, .25);
}

.num-cell { font-family: var(--mono); font-weight: 600; font-size: .85rem; }
.muted { color: var(--text-faint); }

/* Skor berwarna berdasarkan nilai */
.score { display: inline-block; min-width: 30px; padding: .12rem .4rem; border-radius: 7px; font-family: var(--mono); font-weight: 650; font-size: .82rem; text-align: center; }
.s0 { background: rgba(251, 113, 133, .13); color: #fb7185; }
.s1 { background: rgba(251, 146, 60, .13);  color: #fb923c; }
.s2 { background: rgba(251, 191, 36, .13);  color: #fbbf24; }
.s3 { background: rgba(163, 230, 53, .13);  color: #a3e635; }
.s4 { background: rgba(52, 211, 153, .14);  color: #34d399; }
.s-none { color: var(--text-faint); font-family: var(--mono); }

.delta { font-family: var(--mono); font-size: .8rem; font-weight: 600; }
.delta.up   { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--text-faint); }

.flags { display: inline-flex; gap: .2rem; font-size: 1rem; line-height: 1; }
.flags span { cursor: default; }

.row-btn {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text-dim); cursor: pointer; transition: .18s;
}
.row-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.row-btn svg { width: 14px; height: 14px; }

.row-err { color: var(--bad); font-size: .8rem; }
.mini-spin {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid rgba(255, 255, 255, .18); border-top-color: var(--accent-2);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.empty-note { padding: 2rem; text-align: center; color: var(--text-faint); font-size: .88rem; }

/* ---------- Single result ---------- */
.result-slot { margin-top: 1.25rem; }
.result-slot > * { animation: rise .4s var(--ease); }

.res-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem;
  padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line);
}
.res-favicon {
  width: 40px; height: 40px; flex: none; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); object-fit: contain; padding: 6px;
}
.res-title { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.res-title strong { font-size: 1.15rem; letter-spacing: -.02em; word-break: break-all; }
.res-title small { color: var(--text-faint); font-size: .78rem; }
.res-meta { display: flex; gap: .45rem; margin-left: auto; flex-wrap: wrap; }

.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 1px; background: var(--line);
}
.metric {
  padding: 1.05rem 1.15rem; background: #0a0f1a;
  display: flex; flex-direction: column; gap: .5rem;
}
.metric-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.metric-label { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.metric-val { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; font-family: var(--mono); line-height: 1; }
.metric-sub { font-size: .74rem; color: var(--text-faint); }
.metric-note { font-size: .72rem; color: var(--text-faint); line-height: 1.4; }
.metric-bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.metric-bar span { display: block; height: 100%; border-radius: 999px; transition: width .7s var(--ease); }

.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.sub-card { padding: 1.15rem; }
.sub-card h3 { font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); margin-bottom: .9rem; font-weight: 600; }

.big-stat { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .3rem; }
.big-stat b { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; font-family: var(--mono); }

/* ---------- Grafik traffic bulanan ---------- */

.tchart { margin: 1rem 0 0; }
.tchart-plot { position: relative; height: 96px; }
.tchart-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Garis digambar dari kiri ke kanan sekali saat kartu muncul. */
@keyframes tchart-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.tchart-plot svg { animation: tchart-wipe .75s var(--ease) both; }

/* Titik dipasang di atas SVG supaya tetap bulat meski grafiknya dilebarkan. */
.tchart-dot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px #12151d;                 /* cincin permukaan 2px */
  transition: width .16s var(--ease), height .16s var(--ease);
  animation: tchart-pop .3s var(--ease) .5s both;
}
@keyframes tchart-pop { from { opacity: 0; } to { opacity: 1; } }
.tchart-dot.is-last { width: 11px; height: 11px; }
.tchart-dot.is-on { width: 12px; height: 12px; }
.tchart-dot.is-last.is-on { width: 13px; height: 13px; }

/* Garis bidik menemukan sumbu X — pembaca membidik bulan, bukan garis 2px. */
.tchart-cross {
  position: absolute; top: -4px; bottom: -4px; width: 1px;
  background: var(--line-strong); transform: translateX(-50%); pointer-events: none;
}

.tchart-hit {
  position: absolute; top: -8px; bottom: -8px;
  padding: 0; margin: 0;
  background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tchart-hit:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; border-radius: 8px; }

/*
 * Satu baris dan tinggal di dalam plot: kalau melayang di atasnya, tooltip
 * menutupi angka besar di kepala kartu.
 */
.tchart-tip {
  position: absolute; top: -2px; transform: translateX(-50%);
  display: flex; align-items: baseline; gap: .38rem;
  padding: .3rem .55rem; border-radius: 9px; white-space: nowrap; z-index: 3;
  background: rgba(12, 16, 25, .96); border: 1px solid var(--line-strong);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .95); pointer-events: none;
}
.tchart-tip.is-low { top: auto; bottom: -2px; }
/* Nilai memimpin, label mengikuti — pembaca sudah tahu serinya, dia mau angkanya. */
.tchart-tip b { font-family: var(--mono); font-size: .76rem; font-weight: 650; letter-spacing: -.02em; }
.tchart-tip span { font-size: .66rem; color: var(--text-dim); }
.tchart-tip i { font-size: .66rem; font-style: normal; font-family: var(--mono); color: var(--text-faint); }

.tchart-x {
  display: flex; justify-content: space-between; gap: .4rem;
  margin: .7rem 0 0; padding: 0; list-style: none;
}
.tchart-x li { display: flex; flex-direction: column; gap: .05rem; text-align: center; min-width: 0; }
.tchart-x li:first-child { text-align: left; }
.tchart-x li:last-child { text-align: right; }
.tchart-x b { font-family: var(--mono); font-size: .82rem; font-weight: 650; letter-spacing: -.02em; }
.tchart-mon { font-size: .68rem; color: var(--text-faint); font-family: var(--mono); }
.tchart-mom { font-size: .66rem; font-family: var(--mono); color: var(--text-faint); }
.tchart-mom.up { color: var(--good); }
.tchart-mom.down { color: var(--bad); }

@media (prefers-reduced-motion: reduce) {
  .tchart-plot svg, .tchart-dot { animation: none; }
}

.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); font-size: .87rem; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--text-dim); }
.kv b { font-family: var(--mono); font-weight: 600; }

.geo-item { margin-bottom: .75rem; }
.geo-item:last-child { margin-bottom: 0; }
.geo-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; font-size: .86rem; }
.geo-row .flag { font-size: 1.1rem; line-height: 1; width: 22px; flex: none; }
.geo-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.geo-row .val { font-family: var(--mono); font-size: .8rem; font-weight: 600; width: 52px; text-align: right; }
.geo-bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: .25rem; }
.geo-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.src-legend { display: flex; flex-wrap: wrap; gap: .45rem .9rem; margin-top: .85rem; font-size: .78rem; color: var(--text-dim); }
.src-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: .35rem; }
.stack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.stack i { display: block; height: 100%; }

.alert {
  display: flex; gap: .6rem; padding: .8rem 1rem; border-radius: var(--radius-sm);
  font-size: .85rem; margin-top: 1rem;
  background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .22); color: #fcd34d;
}
.alert.error { background: rgba(251, 113, 133, .09); border-color: rgba(251, 113, 133, .25); color: #fda4af; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 5, 10, .72); backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal-box {
  position: relative; width: min(920px, 100%); max-height: 88dvh; overflow-y: auto;
  padding: 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: #0a0e18;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 1);
  animation: pop .3s var(--ease);
}
.modal-narrow { width: min(560px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-close {
  position: absolute; top: .8rem; right: .8rem; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--text-dim); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: .18s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-box h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.help-list { margin: 0; font-size: .88rem; }
.help-list dt { font-weight: 650; color: var(--accent-2); margin-top: .85rem; }
.help-list dt:first-child { margin-top: 0; }
.help-list dd { margin: .2rem 0 0; color: var(--text-dim); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 120; display: flex; flex-direction: column; gap: .55rem; pointer-events: none; }
.toast {
  padding: .7rem 1rem; border-radius: var(--radius-sm); font-size: .85rem;
  border: 1px solid var(--line-strong); background: #10151f; color: var(--text);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .95);
  animation: toastIn .3s var(--ease); max-width: 340px;
}
.toast.ok  { border-color: rgba(52, 211, 153, .35); }
.toast.err { border-color: rgba(251, 113, 133, .35); }
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(18px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }

/* ---------- FAQ ---------- */
/* Blok sempit di dalam .wrap yang lebar — tanpa margin auto dia menempel kiri. */
.faq { padding: 3rem 0 .5rem; max-width: 760px; margin-inline: auto; }
.faq h2 { font-size: 1.2rem; margin-bottom: 1.1rem; text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: .55rem; }

.faq-item {
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(0, 0, 0, .24);
  transition: border-color .2s, background .2s;
}
.faq-item:hover { border-color: var(--line-strong); }
.faq-item[open] { background: rgba(255, 255, 255, .035); border-color: var(--line-strong); }

.faq-item summary {
  display: flex; align-items: center; gap: .7rem;
  padding: .9rem 1.1rem; cursor: pointer; list-style: none;
  font-weight: 600; font-size: .92rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; margin-left: auto;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease), border-color .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); border-color: var(--accent-2); }
.faq-item > p { padding: 0 1.1rem 1rem; color: var(--text-dim); font-size: .88rem; }

/* ---------- Footer ---------- */
.site-foot { padding: 2.5rem 0 3rem; color: var(--text-faint); font-size: .8rem; max-width: 760px; margin-inline: auto; text-align: center; }
.site-foot em { color: var(--text-dim); font-style: normal; }
.foot-links { margin-top: .55rem; }
.foot-links a { color: var(--text-faint); text-decoration: none; border-bottom: 1px dashed var(--line-strong); }
.foot-links a:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .res-meta { margin-left: 0; width: 100%; }
}

@media (max-width: 720px) {
  .wrap { width: min(1240px, 100% - 1.6rem); }
  .hero { padding: 2.2rem 0 1.5rem; }
  .searchbar { flex-direction: column; align-items: stretch; }
  .searchbar .btn { width: 100%; }
  .samples { margin-left: 0; width: 100%; }
  .bulk-actions { margin-left: 0; width: 100%; }
  .bulk-actions .btn { flex: 1; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; }
  .table-toolbar { gap: .5rem; }
  .field-sm { flex: 1 1 100%; }
  .toolbar-spacer { display: none; }
  .metric-val { font-size: 1.55rem; }
  .toasts { left: 1rem; right: 1rem; bottom: 1rem; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .2); background-clip: content-box; }

::selection { background: rgba(109, 124, 255, .35); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Print */
@media print {
  .aurora, .tabs, .opts, .bulk-card, .table-toolbar, .toasts, .site-foot { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}
