/*
 * GatewayScan — register-ledger surface.
 * Design direction and redline method adapted from unslop by Damir Sokolovsky
 * (https://x.com/heydamir), CC BY 4.0: https://github.com/heydamir/unslop
 * Chrome stays quiet; the directory table and the source/date line carry the craft.
 * Loaded after each page's inline styles so the whole public site shares one system.
 */

@media screen {
  html:root {
    --bg:#f5f7fa; --surface:#ffffff; --surface-2:#eceff4; --thead:#f7f9fc;
    --line:rgba(17,24,39,.09); --line-soft:rgba(17,24,39,.06);
    --ink:#111827; --ink-2:#4b5565; --ink-3:#6b7487;
    --brand:#1f4fd8; --brand-soft:#eef2fb; --brand-ink:#1b3f9e;
    --good:#16a34a; --good-soft:#eaf6ef; --warn:#8a5b00; --warn-soft:#fbf5e8;
    --warn-line:#ead9b4; --bad:#dc2626; --bad-soft:#fdecec;
    --radius:12px; --shadow:0 1px 2px rgba(17,24,39,.05);
    --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
    --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;
    --ease:cubic-bezier(.22,1,.36,1);
  }
  html:root[data-theme="dark"] {
    --bg:#0b0d14; --surface:#11141c; --surface-2:#1a1e28; --thead:#141925;
    --line:rgba(238,240,245,.09); --line-soft:rgba(238,240,245,.06);
    --ink:#eef0f5; --ink-2:#a3a9b8; --ink-3:#7a8296;
    --brand:#eef0f5; --brand-soft:#161d2b; --brand-ink:#a9c0ff;
    --good:#4cc38a; --good-soft:#122a20; --warn:#f0c674; --warn-soft:#2a2316;
    --warn-line:#5a4a2c; --bad:#e5484d; --bad-soft:#2b171b;
    --shadow:none;
  }
  html { color-scheme:light; }
  html[data-theme="dark"] { color-scheme:dark; }
  body {
    font-family:Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size:14px; line-height:1.5; font-weight:400;
    color:var(--ink); background:var(--bg);
  }
  h1,h2,h3,h4 { font-weight:500; letter-spacing:0; line-height:1.2; }
  h1 { font-size:32px; }
  h2 { font-size:22px; }
  h3 { font-size:17px; }
  p { line-height:1.6; }
  .logo { font-weight:500; letter-spacing:0; }
  .logo-mark {
    background:var(--brand); color:var(--bg); border-radius:8px;
    box-shadow:none;
  }
  html:root[data-theme="dark"] .logo-mark { color:#11141c; }
  a.btn-link, .btn-link, .link { font-weight:500; }
  button, select, input, textarea { border-radius:8px; font-weight:500; letter-spacing:0; }
  button { cursor:pointer; }
  :focus-visible { outline:2px solid var(--brand-ink); outline-offset:2px; }

  /* Quiet category labels: the word carries the meaning, colour is not required. */
  .pill, .tag, .status-pill, .badge-chip {
    background:var(--surface-2); border:1px solid var(--line);
    color:var(--ink-2); border-radius:6px; padding:3px 8px;
    font-size:12px; font-weight:500; letter-spacing:0; text-transform:none;
  }
  .pill.tool, .pill.agent, .pill.aggregator, .pill.c3d, .pill.cfree, .pill.cuncensored,
  .pill.accent, .pill.primary {
    background:var(--surface-2); color:var(--ink-2); border-color:var(--line);
  }
  html:root[data-theme="dark"] .submit,
  html:root[data-theme="dark"] .btn.primary,
  html:root[data-theme="dark"] button[type="submit"] { color:#11141c; }
  .zdr, .flag { font-size:12px; font-weight:500; letter-spacing:0; }
  .zdr.yes, .zdr.conditional, .zdr.no, .zdr.unknown { color:var(--ink-3); }
  .zdr.yes svg { color:var(--good); }

  /* Navigation and controls: one accent, used once, never as repeated pills. */
  .navlink, .tab, .pager button {
    background:transparent; border-color:transparent; color:var(--ink-2);
    font-size:13px; font-weight:500; padding:8px 12px; border-radius:8px;
  }
  /* Tab filter lebih rapat agar semua kategori muat di monitor 1280px. */
  .tab { padding:8px 10px; }
  .navlink:hover, .tab:hover, .pager button:hover {
    background:var(--surface-2); color:var(--ink);
  }
  .tab[aria-selected="true"], .tab.active {
    background:transparent; border-color:transparent; color:var(--ink);
    box-shadow:inset 0 -2px 0 var(--brand-ink); border-radius:0;
  }
  .tabs { scrollbar-width:none; gap:4px; }
  .tabs::-webkit-scrollbar { display:none; }

  /* Table as ledger: aligned columns, one row height, figures in tabular mono. */
  table { border-collapse:collapse; }
  thead th, .stat .k, .edit-fields label, .eyebrow {
    text-transform:none !important; letter-spacing:0;
    font-size:12px; font-weight:500; color:var(--ink-3);
  }
  thead th { padding:12px 14px; background:var(--thead); }
  tbody td { padding:12px 14px; font-size:13px; font-weight:400; }
  .no, .price-range, .stat .v, .plan-cell .p, .count {
    font-variant-numeric:tabular-nums; font-weight:500; letter-spacing:0;
  }
  .name { font-size:14px; font-weight:500; }
  .host, .muted, .src, .lmeta { font-size:12px; color:var(--ink-3); font-weight:400; }
  .src a { color:var(--ink); font-weight:500; text-decoration:underline; text-decoration-color:var(--line); text-underline-offset:3px; }
  .src a:hover { text-decoration-color:var(--brand-ink); }
  .price-muted { color:var(--ink-3); }
  .btn {
    background:transparent; border-color:transparent; color:var(--brand-ink);
    font-size:13px; font-weight:500; padding:6px 8px; border-radius:6px;
  }
  .btn:hover { background:var(--surface-2); }
  .btn svg { opacity:.7; }
  .logo-wrap, .hero-mark { background:var(--surface-2); color:var(--ink-2); }
  .mono-logo { color:var(--ink-2); font-weight:500; }
  .card, .stat, .panel, .disclaimer, .dyor {
    border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow);
  }
  .hero { background:var(--surface); }
  .hero svg.blob { display:none; }
  .hero-mark { font-weight:500; letter-spacing:0; }
  .zdr svg, .flag svg, .sort-btn svg, .pager button svg, .btn svg, .navlink svg, .icon-btn svg {
    width:16px; height:16px; stroke-width:1.5; flex:0 0 auto;
  }
  .zdr, .flag, .btn, .navlink { gap:8px; }
  .disclaimer, .dyor {
    background:var(--warn-soft); border-color:var(--warn-line);
    color:var(--ink-2); font-size:13px;
  }
  .msg, .edit-msg { border-radius:8px; font-weight:500; }

  /* Motion: one curve, short feedback, no layout animation. */
  .sort-btn svg { transition:transform 140ms var(--ease), opacity 140ms var(--ease); }
  button, a, input, select, textarea { transition:color 140ms var(--ease), background-color 140ms var(--ease), border-color 140ms var(--ease), opacity 140ms var(--ease); }

  @media (max-width:720px) {
    h1 { font-size:26px; }
    .card, .stat { padding:16px; }
    thead th, tbody td { padding:10px 12px; }
  }
}

/* Mobile navbar: dua baris padat — identitas + kontrol, lalu cari + direktori. */
@media (max-width: 760px) {
  .topbar-in { flex-wrap:wrap; gap:6px; padding:8px 0; align-items:center; }
  .logo { order:1; font-size:0; width:auto; }
  .logo-mark { width:28px; height:28px; }
  .spacer { display:none; }
  .topbar-in > label { order:2; flex:0 0 auto; margin:0; }
  #lang { max-width:142px; font-size:12px; padding:6px 5px; }
  #currency { order:3; flex:0 0 auto; max-width:104px; font-size:12px; padding:6px 5px; }
  .icon-btn { order:4; flex:0 0 auto; padding:6px 7px; }
  .navsearch { order:5; flex:1 1 116px; min-width:104px; max-width:none; }
  .navlinks { order:6; flex:0 1 auto; flex-wrap:nowrap; gap:4px; }
  .navlink { padding:6px 8px; font-size:11.5px; }
  .navlink svg { width:13px; height:13px; }
}
@media (max-width: 380px) {
  #lang { max-width:112px; }
  #currency { max-width:86px; }
  .navsearch { flex-basis:96px; min-width:90px; }
  .navlink { padding:5px 6px; font-size:10.5px; }
}
