@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
/* Font fallback untuk halaman legacy; halaman portal memulai request dari <head>.
   URL identik agar request Google Fonts dapat memakai cache yang sama. */

:root {
      --brand: #2563eb;
      --brand-dark: #1d4ed8;
      --brand-soft: #eff6ff;
      --accent: #f59e0b;
      --ink: #0f172a;
      --ink-soft: #475569;
      --line: #e2e8f0;
      --bg: #f8fafc;
      --card: #ffffff;
      --danger: #b91c1c;
      --danger-soft: #fef2f2;
      --warn: #b45309;
      --warn-soft: #fffbeb;
      --success: #166534;
      --success-soft: #f0fdf4;
      --radius: 12px;
      --shadow: 0 1px 3px rgba(15,23,42,.04), 0 8px 24px -4px rgba(15,23,42,.06);
      --shadow-hover: 0 2px 4px rgba(15,23,42,.04), 0 12px 28px -6px rgba(15,23,42,.10);
      --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    }
    * { box-sizing: border-box; }
    .rupiah-readout {
      display: block; margin-top: 4px; color: var(--ink-soft);
      font-size: .82rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
    }
    .preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .preset-chips .preset {
      min-height: 44px; max-width: 100%; white-space: normal; text-align: left;
      font-family: inherit; cursor: pointer;
    }
    .preset-chips .preset:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      font-family: var(--font);
      color: var(--ink);
      background: var(--bg);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }
    a { color: var(--brand); text-decoration: none; }
    a:hover { text-decoration: underline; }
    .wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
    h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; }

    /* ===== Navigation ===== */
    .topbar {
      background: var(--card);
      border-bottom: 1px solid var(--line);
      position: sticky;
      top: 0;
      z-index: 50;
      max-height: 64px;
    }
    .topbar-inner { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px 14px; min-height: 56px; max-height: 64px; height: 60px; padding: 0 16px; max-width: 1440px; position: relative; }
    .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.08rem; color: var(--ink); flex-shrink: 0; }
    .brand .logo {
      width: 32px; height: 32px; border-radius: 8px;
      background: var(--brand);
      color: #fff; display: inline-flex; align-items: center; justify-content: center;
      font-weight: 900; font-size: 1rem;
    }
    .nav { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; align-items: center; flex-wrap: nowrap; }
    .nav a {
      color: var(--ink-soft); padding: 6px 10px; border-radius: 8px;
      font-size: .86rem; font-weight: 600; white-space: nowrap;
    }
    .nav a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
    .cta {
      flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
      background: #ffffff; color: var(--brand); border: 1px solid #93c5fd; min-height: 44px; padding: 8px 14px; border-radius: 8px;
      font-size: .85rem; font-weight: 600; white-space: nowrap;
      transition: background .15s, border-color .15s, color .15s;
    }
    .cta:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }
    .nav-toggle { display: none; flex-shrink: 0; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 1.1rem; color: var(--ink); }

    /* Baris primer header (halaman ber-hook): brand | nav kompak | search | CTA (1 baris 56px-64px) */
    .topbar-primary {
      display: contents;
    }
    .topbar-primary .site-search { justify-self: center; width: 100%; max-width: 300px; flex: 0 1 260px; min-width: 0; }

    /* Strip nav desktop 1 baris ringkas (tanpa baris kedua) */
    @media (min-width: 769px) {
      .nav {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        flex: 1 1 auto;
        min-width: 0;
        order: 2;
        margin-top: 0;
      }
      .nav a { padding: 6px 10px; white-space: nowrap; }
    }

    /* ===== Header search (scoped to related tools on this page) ===== */
    .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;
    }
    .site-search { position: relative; flex: 0 1 280px; min-width: 150px; }
    .search-input {
      width: 100%; min-height: 44px; padding: 8px 14px; font-size: 1rem; font-family: var(--font);
      border: 1px solid #cbd5e1; border-radius: 999px; background: var(--bg); color: var(--ink);
      transition: border-color .15s, box-shadow .15s, background .15s;
    }
    .search-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.15); background: #fff; }
    .search-results {
      position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
      background: var(--card); border: 1px solid var(--line); border-radius: 12px;
      box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; padding: 4px;
    }
    .search-results[hidden] { display: none; }
    .search-item {
      display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none;
    }
    .search-item:hover, .search-item:focus { background: var(--brand-soft); text-decoration: none; }
    .search-item .t { display: block; font-weight: 700; color: var(--ink); font-size: .9rem; line-height: 1.3; }
    .search-item .d { display: block; font-size: .78rem; color: var(--ink-soft); margin-top: 2px; }
    .search-item .tag {
      display: inline-block; font-size: .66rem; font-weight: 800; color: var(--brand-dark);
      background: var(--brand-soft); border: 1px solid #bfdbfe; border-radius: 999px;
      padding: 0 7px; margin-left: 6px; vertical-align: middle;
    }
    .search-status { padding: 10px 12px; font-size: .85rem; color: var(--ink-soft); }
    .search-status a { font-weight: 700; color: var(--brand-dark); }
    .search-status .lead { display: block; margin-bottom: 4px; font-weight: 700; color: var(--ink); }

    @media (max-width: 768px) {
      .topbar-inner { flex-wrap: nowrap; min-height: 56px; max-height: 64px; height: auto; padding: 6px 16px; }
      /* Baris utama mobile: brand + CTA kompak + hamburger (1 baris ringkas 56px-64px) */
      .topbar-primary { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 10px; width: 100%; }
      .brand { order: 1; font-size: 1.02rem; min-width: 0; }
      .brand .logo { width: 28px; height: 28px; font-size: .9rem; }
      .cta { margin-left: auto; order: 2; padding: 8px 12px; font-size: .78rem; }
      .nav-toggle { display: inline-flex; align-items: center; justify-content: center; order: 3; min-width: 44px; min-height: 44px; }
      /* Pencarian header disembunyikan di mobile agar header tetap 1 baris 56px-64px */
      .site-search { display: none; order: 4; flex: 1 1 100%; max-width: none; min-width: 0; }
      .home-page .site-search { display: none; }
      .nav { order: 5; display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: min(60vh, 420px); overflow-y: auto; }
      .nav.open { display: flex; }
      .nav a { min-height: 44px; display: flex; align-items: center; white-space: normal; }
    }

    /* ===== Breadcrumb ===== */
    .breadcrumb { padding: 4px 0 2px; font-size: .78rem; color: var(--ink-soft); overflow-x: auto; white-space: nowrap; }
    .breadcrumb ol { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
    .breadcrumb li { display: flex; align-items: center; gap: 6px; }
    .breadcrumb li + li::before { content: "›"; color: #94a3b8; }
    .breadcrumb a { color: var(--ink-soft); }
    .breadcrumb .current { color: var(--brand-dark); font-weight: 700; }

    /* ===== Hero ===== */
    .hero { padding: 4px 0 6px; }
    .badges { display: none; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
    .badge {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    }
    .badge.preview { background: var(--warn-soft); color: var(--warn); border: 1px solid #fde68a; }
    .badge.category { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #bfdbfe; }
    .hero h1 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 3px; }
    .hero .lead { color: var(--ink-soft); max-width: 760px; font-size: .84rem; line-height: 1.4; margin: 0; }

    /* ===== Warning banner ===== */
    .warning {
      display: flex; gap: 12px; align-items: flex-start;
      background: var(--danger-soft); border: 1px solid #fecaca; border-left: 4px solid var(--danger);
      border-radius: var(--radius); padding: 14px 16px; margin: 16px 0;
    }
    .warning .icon { font-size: 1.4rem; line-height: 1; }
    .warning strong { color: var(--danger); }
    .warning p { margin: 0; font-size: .92rem; color: #7f1d1d; }
    .warning .sub { margin-top: 6px; font-size: .85rem; }

    /* ===== Layout grid ===== */
    .layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin: 6px 0 20px; align-items: start; }
    @media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

    .card {
      background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
      box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px;
    }
    .card h2 { font-size: 1.12rem; font-weight: 800; }
    .card h2 .step { color: var(--brand); margin-right: 6px; }
    .section-title { display: flex; align-items: center; gap: 8px; }
    .section-title h2 { font-size: 1.08rem; }
    .section-title .num {
      background: var(--brand); color: #fff; min-width: 26px; height: 26px; border-radius: 8px;
      display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 800; flex-shrink: 0; padding: 0 6px;
    }

    /* ===== Form ===== */
    label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 5px; }
    .field { margin-bottom: 12px; }
    .input, .select {
      width: 100%; min-height: 44px; padding: 10px 12px; font-size: 1rem; font-family: var(--font);
      border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink);
      font-variant-numeric: tabular-nums;
      transition: border-color .15s, box-shadow .15s;
    }
    .input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
    .hint { font-size: .75rem; color: var(--ink-soft); margin: 3px 0 0; line-height: 1.35; }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    @media (max-width: 520px) { .form-row { grid-template-columns: 1fr; gap: 8px; } }
    .note-unsupported {
      background: var(--warn-soft); border: 1px solid #fde68a; border-radius: 10px;
      padding: 10px 14px; font-size: .84rem; color: var(--warn); margin-top: 4px;
    }
    .btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      background: var(--brand); color: #fff; border: none; border-radius: 10px;
      min-height: 44px; padding: 10px 18px; font-size: 1rem; font-weight: 700; cursor: pointer;
      transition: background .15s, transform .05s; width: 100%; font-family: var(--font);
    }
    .btn:hover { background: var(--brand-dark); }
    .btn:active { transform: translateY(1px); }
    .btn:disabled { opacity: .6; cursor: not-allowed; }
    .btn.secondary { background: #fff; color: var(--brand-dark); border: 1px solid var(--brand); }
    .btn.secondary:hover { background: var(--brand-soft); }
    .btn.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
    .btn-row { display: flex; gap: 10px; }
    .btn-row .btn { width: auto; flex: 1; }

    /* ===== Results ===== */
    #results { display: none; font-variant-numeric: tabular-nums; }
    #results.show { display: block; }
    .result-hero {
      background: var(--bg);
      color: var(--ink); border: 0; border-left: 4px solid var(--brand); border-radius: 0;
      padding: 14px 16px; margin-bottom: 16px; font-variant-numeric: tabular-nums;
    }
    .result-hero .label { font-size: .78rem; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
    .result-hero .amount { font-size: clamp(1.65rem, 4.2vw, 2.3rem); font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
    .result-hero .note { font-size: .82rem; color: var(--ink-soft); }
    .result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
    @media (max-width: 900px) { .result-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 480px) { .result-grid { grid-template-columns: 1fr; } }
    .stat {
      background: transparent; border: 0; border-radius: 0; padding: 4px 6px;
    }
    .stat .k { font-size: .74rem; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
    .stat .v { font-size: 1.1rem; font-weight: 800; color: var(--ink); margin-top: 4px; word-break: break-word; font-variant-numeric: tabular-nums; }
    table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
    th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
    th { background: var(--bg); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
    tbody tr:last-child td { border-bottom: none; }
    td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
    .table-note { font-size: .78rem; line-height: 1.45; color: var(--ink-soft); margin: 8px 0 0; }
    /* Pita rumus, bukan kotak: aksen kiri tipis agar tidak terjadi box-in-box di dalam kartu */
    .formula {
      background: transparent; border: 0; border-left: 3px solid var(--brand); border-radius: 0;
      padding: 6px 0 6px 14px; margin: 12px 0;
      font-family: var(--font-mono);
      font-size: .88rem; line-height: 1.65; color: var(--brand-dark); overflow-x: auto;
    }

    /* ===== Status / error ===== */
    #formError, #formSuccess {
      display: none; padding: 12px 14px; border-radius: 10px; font-size: .88rem; margin-top: 14px;
    }
    #formError { background: var(--danger-soft); border: 1px solid #fecaca; color: #7f1d1d; }
    #formSuccess { background: var(--success-soft); border: 1px solid #bbf7d0; color: var(--success); }
    .spinner {
      width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
      border-radius: 50%; animation: spin .7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ===== References ===== */
    .ref-list { list-style: none; margin: 0; padding: 0; }
    .ref-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; line-height: 1.65; }
    .ref-list li:last-child { border-bottom: none; }
    .ref-list .ext { color: #94a3b8; font-size: .9rem; line-height: 1.55; flex-shrink: 0; }
    .ref-list .lbl { font-size: .78rem; color: var(--ink-soft); font-weight: 700; }

    /* ===== FAQ ===== */
    /* Baris akordeon bergaris rambut, bukan kotak bersarang di dalam kartu FAQ */
    details { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 0; overflow: hidden; }
    details:last-of-type { border-bottom: none; }
    summary {
      cursor: pointer; padding: 15px 6px; font-weight: 700; font-size: 1rem; line-height: 1.55;
      background: transparent; list-style: none; display: flex; justify-content: space-between;
      align-items: center; gap: 14px;
    }
    summary:hover { background: var(--brand-soft); }
    summary::-webkit-details-marker { display: none; }
    summary::after { content: "+"; font-size: 1.25rem; color: var(--brand); font-weight: 800; flex-shrink: 0; }
    details[open] summary::after { content: "−"; }
    details .faq-body { padding: 2px 6px 18px; font-size: .95rem; line-height: 1.75; color: var(--ink-soft); text-wrap: pretty; }

    /* ===== Related tools ===== */
    .related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
    @media (max-width: 900px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 560px) { .related-grid { grid-template-columns: 1fr; } }
    .related {
      display: flex; flex-direction: column; gap: 6px; padding: 14px;
      border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
      transition: border-color .15s, transform .1s;
    }
    .related:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
    .related .t { font-weight: 700; color: var(--ink); }
    .related .d { font-size: .8rem; color: var(--ink-soft); }

    /* ===== Feedback (sidebar sub-forms) ===== */
    .subform { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 4px; margin-top: 8px; }
    .subform.bug { border-color: #fecaca; }
    .subform.req { border-color: #bfdbfe; }
    textarea {
      width: 100%; min-height: 90px; padding: 10px 12px; font-family: var(--font); font-size: 1rem;
      border: 1px solid #cbd5e1; border-radius: 10px; resize: vertical;
    }
    textarea:focus, .input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
    .badge-bug { background: var(--danger-soft); color: var(--danger); }
    .badge-req { background: var(--brand-soft); color: var(--brand-dark); }

    /* ===== Theory row (theory / formula / references) ===== */
    .theory-row { margin-bottom: 28px; }
    .theory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
    @media (max-width: 860px) { .theory-grid { grid-template-columns: 1fr; } }
    .theory-card h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 10px; }
    .theory-card p { color: var(--ink-soft); font-size: .92rem; line-height: 1.75; margin: 0 0 12px; text-wrap: pretty; }
    .theory-card p:last-child { margin-bottom: 0; }

    /* ===== Case study (verified example) ===== */
    /* Callout aksen kiri, bukan kotak penuh di dalam kartu teori */
    .case-study {
      background: transparent; border: 0; border-left: 3px solid var(--success); border-radius: 0;
      padding: 4px 0 4px 14px; font-size: .88rem; line-height: 1.7; color: var(--success); margin: 12px 0 0;
    }

    /* ===== Table wrapper (horizontal scroll for 4-column table) ===== */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* ===== Footer ===== */
    .footer { background: #f1f5f9; color: #334155; margin-top: 28px; padding: 24px 0 20px; border-top: 1px solid var(--line); }
    .footer a { color: #1d4ed8; }
    .footer a:hover { color: #1e40af; }
    .footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; margin-bottom: 18px; }
    @media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
    .footer h4 { color: #0f172a; font-size: .9rem; margin-bottom: 8px; }
    .footer ul { list-style: none; margin: 0; padding: 0; }
    .footer li { margin-bottom: 6px; font-size: .82rem; }
    .footer .brandline { font-weight: 800; color: #1e40af; font-size: 1rem; margin-bottom: 6px; }
    .footer p { color: #475569 !important; font-size: .8rem; line-height: 1.45; margin: 0 0 6px; }
    .footer .legal { border-top: 1px solid #cbd5e1; padding-top: 14px; font-size: .75rem; color: #475569; }

    /* ===== Print ===== */
    @media print {
      .topbar, .breadcrumb, aside, .related-section, .footer, .no-print, .btn, .nav-toggle, .cta { display: none !important; }
      body { background: #fff; }
      .card { box-shadow: none; border: 1px solid #ddd; }
      .layout { grid-template-columns: 1fr; }
      #results { display: block !important; }
      .result-hero { background: #fff !important; color: #000 !important; border: 1px solid #000; }
    }

/* =============================================================
   PORTAL ADDITIONS (multi-page: home, category, tool, prose)
   ============================================================= */

/* Landing hero */
.landing-hero {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border-bottom: 1px solid var(--line);
  padding: 22px 0 20px;
  overflow: visible;
}
.landing-hero .wrap { position: relative; z-index: 1; }
.landing-hero::after {
  content: none;
}
.landing-hero h1 { color: #0f172a; font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.landing-hero .lead { color: #475569; font-size: .94rem; line-height: 1.5; max-width: 720px; margin: 0 0 14px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-lg { padding: 10px 18px; min-height: 44px; font-size: .92rem; border-radius: 10px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.btn-hero {
  background: #fff; color: #1e3a8a; border: none; border-radius: 10px;
  padding: 10px 18px; min-height: 44px; font-size: .92rem; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero:hover { background: #eff6ff; color: #1e40af; text-decoration: none; }
.btn-hero-outline {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 10px;
  padding: 10px 18px; min-height: 44px; font-size: .92rem; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.landing-stats { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 12px 20px; margin-top: 14px; }
.landing-stats .s { display: flex; flex-direction: column; min-width: 0; }
.landing-stats .v { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.landing-stats .k { font-size: .75rem; color: #bfdbfe; }

/* Section headings */
.section { padding: 16px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.section-head .more { font-size: .86rem; font-weight: 700; }
.section-sub { color: var(--ink-soft); margin: 0 0 2px; font-size: .84rem; line-height: 1.4; }

/* Category + tool cards grid */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow); transition: border-color .15s, transform .1s;
}
.cat-card:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.cat-card .ic {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.cat-card h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 4px; color: var(--ink); }
.cat-card p { margin: 0; font-size: .86rem; color: var(--ink-soft); }
.cat-card .count { display: inline-block; margin-top: 8px; font-size: .74rem; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 9px; }
.cat-card .cat-body { flex: 1; min-width: 0; }
.cat-card .l2 { font-size: .78rem; font-weight: 700; color: var(--ink); margin: 3px 0 0; line-height: 1.4; }
.cat-card .l3 { font-size: .75rem; color: var(--ink-soft); margin: 3px 0 0; line-height: 1.4; }

.tool-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tool-row {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  transition: border-color .15s, transform .1s;
}
.tool-row:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.tool-row .ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.tool-row h3 { font-size: 1rem; font-weight: 800; margin: 0 0 3px; color: var(--ink); }
.tool-row p { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.tool-row .badge-preview { margin-top: 8px; }

/* Sub-category chip / grouping */
.subcat { margin-bottom: 22px; }
.subcat h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.subcat h3 .sep { color: #94a3b8; font-weight: 500; margin: 0 4px; }

/* Value prop / feature row */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.feature .ic { font-size: 1.5rem; }
.feature h3 { font-size: 1.02rem; font-weight: 800; margin: 10px 0 6px; }
.feature p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

/* Prose / static pages */
.prose { max-width: 820px; }
.prose h1 { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 8px; }
.prose h2 { font-size: 1.2rem; font-weight: 800; margin: 20px 0 8px; }
.prose h3 { font-size: 1.02rem; font-weight: 800; margin: 16px 0 6px; }
.prose p { color: var(--ink-soft); font-size: .92rem; margin: 0 0 10px; }
.prose ul, .prose ol { color: var(--ink-soft); font-size: .92rem; margin: 0 0 10px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose a { font-weight: 600; }
.prose .card { padding: 16px; }

/* Page hero (inner pages) */
.page-hero { padding: 8px 0 10px; }
.page-hero h1 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.page-hero .lead { color: var(--ink-soft); max-width: 760px; font-size: .84rem; line-height: 1.4; margin: 0; }

/* Search bar large (home) */
.search-large { max-width: 600px; position: relative; }
.search-large .search-input {
  min-height: 46px;
  padding: 11px 16px;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.search-large .search-results { border-radius: 12px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; text-decoration: none; }

/* Status chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); }

/* Back to top */
.back-top { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 700; margin-top: 20px; }

/* =============================================================
   RESPONSIVE REDESIGN 2026-10-25 (CSS-only; hooks markup oleh Senior)
   ============================================================= */

/* ===== Keyboard focus yang terlihat (global) ===== */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(29, 78, 216, .55);
  outline-offset: 2px;
  border-radius: 6px;
}
.nav a:focus-visible { outline-offset: -2px; background: var(--brand-soft); }

/* ===== Kartu kategori: label kapsul + teks L2/L3 normal-weight ===== */
.cat-level-label {
  display: inline-block;
  font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-dark); background: var(--brand-soft);
  border: 1px solid #bfdbfe; border-radius: 999px; padding: 1px 8px;
  white-space: nowrap; vertical-align: baseline;
}
.cat-level-value { font-weight: 400; }
.cat-card .l2 { font-size: .82rem; font-weight: 400; color: var(--ink); line-height: 1.45; }
.cat-card .l3 { font-size: .78rem; font-weight: 400; color: var(--ink-soft); line-height: 1.45; }

/* Badge jumlah alat bantu: aktif = hijau, kosong = amber muted */
.cat-card .count.active {
  background: var(--success-soft); color: var(--success); border-color: #bbf7d0;
}
.cat-card .count.soon {
  background: var(--warn-soft); color: var(--warn); border-color: #fde68a; opacity: .9;
}

/* ===== Aksi kalkulator: desktop rata, mobile grid 2 kolom ===== */
.calc-action-row { display: flex; align-items: stretch; }
.calc-action-row .btn { min-height: 44px; }
.calc-action-primary { flex: 2 1 auto; }
.calc-action-secondary { flex: 1 1 auto; }

/* ===== Guard anti horizontal-overflow dokumen (bukan blanket hidden) ===== */
.wrap, .topbar-inner, .topbar-primary, .card, .cat-card, .cat-body, .tool-row,
.feature, .subcat, .hero, .page-hero, .landing-hero, .section, .footer, .footer .cols {
  min-width: 0;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
.card p, .card li, .prose p, .prose li, .cat-card p, .tool-row p { overflow-wrap: anywhere; }

/* ===== Breakpoint tablet kecil ===== */
@media (max-width: 900px) {
  .topbar-primary { gap: 12px 14px; }
  .topbar-primary .site-search { max-width: 320px; }
}

/* ===== ≤640px: beranda, breadcrumb, aksi kalkulator, tabel hasil ===== */
@media (max-width: 640px) {
  /* Statistik landing simetris 2x2 */
  .landing-stats { grid-template-columns: repeat(2, 1fr); justify-content: stretch; gap: 14px 18px; }
  /* CTA hero penuh proporsional */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta > a { width: 100%; justify-content: center; }
  /* Breadcrumb melengkung rapi tanpa scroll horizontal */
  .breadcrumb { white-space: normal; overflow-x: visible; }
  .breadcrumb ol { flex-wrap: wrap; row-gap: 2px; }
  .breadcrumb li { overflow-wrap: anywhere; min-width: 0; }
  /* Aksi kalkulator: submit selebar baris, cetak/reset berdampingan */
  .calc-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .calc-action-primary { grid-column: 1 / -1; }
  .calc-action-row .btn { width: 100%; }
}

/* ===== Cetak: pastikan elemen baru tidak ikut tercetak ===== */
@media print {
  .topbar-primary, .calc-action-row { display: none !important; }
}

/* =============================================================
   FINAL OVERRIDES — perbaikan kegagalan screenshot UIUX
   (topbar / nav / landing-stats / footer). Hanya deklarasi,
   tidak menyentuh breadcrumb, calc action, badge kartu, print.
   ============================================================= */

/* (1) .topbar-inner: kontainer 1 baris ringkas (56px-64px) + side padding nyata */
.topbar-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  position: relative;
  min-height: 56px;
  max-height: 64px;
  height: 60px;
  padding: 0 16px;
}

/* =============================================================
   Desktop & tablet (≥769px):
   1 baris ringkas 56px-64px (brand | nav kompak | search | CTA)
   ============================================================= */
@media (min-width: 769px) {
  .topbar-primary {
    display: contents;
  }
  .topbar-primary .brand {
    order: 1;
    flex: 0 0 auto;
    min-width: 0;
  }
  .topbar-primary .site-search {
    order: 3;
    flex: 0 1 260px;
    width: auto;
    max-width: 300px;
    min-width: 180px;
  }
  .topbar-primary .cta {
    order: 4;
    flex: 0 0 auto;
  }
  .topbar-primary .nav-toggle {
    display: none;
  }

  .nav {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .nav a {
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
    padding: 6px 10px;
    font-size: .86rem;
  }
}

/* =============================================================
   Mobile (≤768px): grid 3 kolom (brand | CTA kompak | toggle) +
   nav overlay satu kolom (tinggi topbar tetap 56px-64px)
   ============================================================= */
@media (max-width: 768px) {
  .topbar-inner {
    display: block;
    height: auto;
    min-height: 56px;
    max-height: 64px;
    padding: 6px 16px;
  }
  /* (4) Baris primer mobile: brand col1, CTA kompak col2, toggle col3 */
  .topbar-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px 10px;
    width: 100%;
    flex: none;
  }
  .topbar-primary .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .topbar-primary .cta {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    justify-self: end;
    min-height: 44px;
    padding: 8px 12px;
    font-size: .78rem;
  }
  .topbar-primary .nav-toggle {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  /* Search header: disembunyikan di mobile agar .topbar-primary
     tetap SATU baris ketat (brand + CTA + menu). Hero search home
     berada di .search-large (BUKAN .site-search) sehingga tetap tampil. */
  .topbar-primary .site-search {
    display: none;
  }

  /* Nav mobile: overlay satu kolom di bawah header */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--card);
    flex-direction: column;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: min(60vh, 420px);
    overflow-y: auto;
    flex: none;
    margin-top: 0;
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    white-space: normal;
  }
}

/* (5) Landing stats: grid 4 kolom (desktop) → 2 kolom (≤640px) */
.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: stretch;
  gap: 12px 20px;
  margin-top: 14px;
}
@media (max-width: 640px) {
  .landing-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
  }
}

/* (6) Footer links: target sentuh 44px pada mobile */
@media (max-width: 768px) {
  .footer .cols li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* =============================================================
   FIX MOBILE LOKAL (2026-10-26) — dua perubahan saja:
   (A) ≤768px: anchor .brand di dalam .topbar-primary menjadi
       target sentuh setinggi 44px dengan konten ter-center
       vertikal. TIDAK menambah tinggi header: baris grid mobile
       sudah 44px karena .cta dan .nav-toggle ber-min-height 44px
       (satu baris tetap satu baris; brand tetap kiri, tidak
       melebar ke kolom lain).
   (B) ≤640px: tombol sekunder print/reset pada .calc-action-row
       (tetap BERDAMPINGAN di grid 1fr 1fr) dirapatkan
       padding/font/line-height-nya sehingga label lengkap
       "🖨 Cetak / Simpan PDF [Hasil]" muat ≤2 baris di 390px.
       Anggaran: kolom = (390 − 2·16 wrap − 2·22 card − 10 gap)/2
       = 152px; content = 152 − 2·8 padding − 2 border = 134px;
       baris terlebar worst-case (DejaVu Sans Bold, emoji 1.05em)
       = 118px ≤ 134px → 2 baris. Tidak ada pemotongan/penghidden
       teks; min-height 44px (aturan lama) tetap berlaku.
   ============================================================= */
@media (max-width: 768px) {
  .topbar-primary .brand {
    min-height: 44px;
    align-items: center;
  }
}
@media (max-width: 640px) {
  .calc-action-row .calc-action-secondary {
    padding: 10px 8px;
    font-size: .78rem;
    line-height: 1.3;
    min-width: 0;
    white-space: normal;
  }
}

/* =============================================================
   HOMEPAGE REDESIGN — FALLBACK CSS 2026-10-27 (junior-frontend;
   mid & senior stalled). HANYA append; nol aturan lama berubah.
   Scope: .home-page (index) + .subcat .chip-row (strip ringkasan).
   Hook markup: .hero-grid (alias .landing-hero-layout) >
   .landing-copy + .hero-quickstart; .home-tool-grid (5x
   .home-tool-card); .cat-card.home-category-active/.home-category-prep.
   Pakai var yang ada; tanpa animasi baru; TIDAK menyentuh
   .topbar/.topbar-primary/nav, style kalkulator, .calc-action-row.
   ============================================================= */

/* ===== Hero desktop: 2 kolom — copy kiri, panel quickstart putih ===== */
.home-page .hero-grid,
.home-page .landing-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 28px;
  align-items: start;
}
.home-page .landing-copy { min-width: 0; }
.home-page .hero-quickstart {
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.home-page .hero-quickstart h2 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--ink); }
.home-page .quickstart-list { list-style: none; margin: 6px 0 0; padding: 0; }
.home-page .quickstart-list li { min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.home-page .quickstart-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.home-page .quickstart-list a { font-size: .92rem; font-weight: 700; color: var(--brand-dark); }
.home-page .quickstart-list p {
  margin: 2px 0 0; font-size: .78rem; line-height: 1.5;
  color: var(--ink-soft); overflow-wrap: anywhere;
}

/* ===== Kartu kalkulator unggulan: grid 3 kolom ===== */
.home-page .site-search,
.home-page .topbar-primary .site-search {
  display: none !important;
}
.home-page #alat.section {
  padding-top: 20px;
}
.home-page .home-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.home-tool-card,
.home-page .home-tool-card {
  min-width: 0;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}
.home-page .home-tool-card .badge { white-space: nowrap; max-width: 100%; }

/* ===== Tile kategori horizontal bersih ===== */
.home-page .cat-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  box-shadow: none;
}
.home-page .cat-card .ic { align-self: flex-start; }
.home-page .cat-card .cat-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.home-page .cat-card p { margin: 0; }
.home-page .cat-card .count {
  margin-top: auto; align-self: flex-start; max-width: 100%;
  white-space: normal; overflow-wrap: anywhere;
}
.home-page .cat-card.home-category-active { border-top-color: var(--line); }
.home-page .cat-card.home-category-prep { border-top-color: var(--line); }

/* ===== Info callout (disclaimer beranda) ===== */
.info-callout {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 18px 0 0;
  font-size: .86rem;
  color: var(--ink-soft);
}
.info-callout .icon-svg {
  flex-shrink: 0;
  color: var(--brand-dark);
}

/* ===== Tablet: kartu kalkulator 2 kolom ===== */
@media (max-width: 900px) {
  .home-page .home-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Mobile ≤768: hero 1 kolom, quickstart disembunyikan =====
   h1 dikecilkan agar teks penuh muat ±3 baris (320–768px); TANPA line-clamp/
   overflow:hidden — teks tidak pernah dipotong. */
@media (max-width: 768px) {
  .home-page .hero-grid,
  .home-page .landing-hero-layout { grid-template-columns: 1fr; gap: 0; }
  .home-page .hero-quickstart { display: none; }
  .home-page .landing-hero { padding: 16px 0 14px; }
  .home-page .landing-hero h1 {
    font-size: clamp(1.3rem, 5vw, 1.65rem);
    margin-bottom: 6px; overflow-wrap: anywhere;
  }
}

/* ===== ≤560: kartu kalkulator 1 kolom ===== */
@media (max-width: 560px) {
  .home-page .home-tool-grid { grid-template-columns: 1fr; }
}

/* ===== Strip ringkasan kategori: chip wrap aman, tanpa overflow ===== */
.subcat .chip-row { list-style: none; flex-wrap: wrap; row-gap: 8px; min-width: 0; }
.subcat .chip {
  white-space: normal; min-width: 0; max-width: 100%; overflow-wrap: anywhere;
}
.subcat .chip strong { font-weight: 800; color: var(--ink); }

/* =============================================================
   MOBILE HEADER FIT (2026-10-27) — perbaikan defect screenshot
   390px: .brand teks menimpa CTA "Request Alat Baru" dan
   .brand .logo menyusut ±10px. AKAR MASALAH: di dalam grid
   mobile (kolom 1 = minmax(0,1fr)) .brand adalah flex container;
   .logo (flex item, flex-shrink:1, min-width:auto) boleh menyusut
   seukuran min-content glyph "B" (±10px), sementara span teks
   (min-content = 1 kata utuh) menolak menyusut → isinya
   meluber keluar track dan menimpa CTA.
   FIX (append, nol aturan breakpoint lama berubah):
   - ≤420px: .topbar-primary TETAP satu baris (grid lama
     minmax(0,1fr) auto auto tidak disentuh); logo DIPAKSA
     flex:0 0 28px + width/min-width 28px; font .brand & padding
     horizontal .cta & gap kolom/dirapatkan; teks brand nowrap
     penuh "Bantukerjain.com" (tanpa truncation/ellipsis/hidden);
     .cta white-space:normal = fallback wrap internal bila
     ruang auto-track sempit (CTA tetap terlihat, tetap 1 baris
     header); .nav-toggle tetap ≥44×44.
   Anggaran metrik 361px (tersempit di blok ini; DejaVu Sans
   Bold worst-case, brand .8rem=12.8px → kata ±117px,
   CTA .7rem=11.2px → baris tunggal ±105px+16 padding):
   brand 28+5+117=150, CTA 121, toggle 44, gap 2×6=12 →
   total 327 ≤ 358−2·16 wrap? (361−32=329) → muat; di 390px
   longgar ±31px. Bila font lebih lebar dari estimasi, CTA
   wrap (bukan brand yang meluber) — overlap tidak mungkin.
   - ≤360px: penyesuaian lebih rapat (font/padding/gap turun
     satu langkah; logo tetap 28px; toggle tetap 44×44).
   Tidak menyentuh aturan ≤768/≤640/≤900 lama, calc actions,
   print, homepage redesign.
   ============================================================= */
@media (max-width: 420px) {
  .topbar-primary {
    gap: 8px 6px;
  }
  .topbar-primary .brand {
    font-size: .8rem;
    gap: 5px;
  }
  .topbar-primary .brand .logo {
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    height: 28px;
  }
  .topbar-primary .brand > span:not(.logo) {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .topbar-primary .cta {
    padding: 8px 8px;
    font-size: .7rem;
    white-space: normal;
    min-width: 0;
  }
  .topbar-primary .nav-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ≤360px: ruang 328px — turunkan satu langkah lagi agar kata
   brand + CTA satu baris + toggle 44px tetap muat tanpa overlap */
@media (max-width: 360px) {
  .topbar-primary {
    gap: 8px 4px;
  }
  .topbar-primary .brand {
    font-size: .74rem;
    gap: 4px;
  }
  .topbar-primary .cta {
    padding: 7px 6px;
    font-size: .66rem;
  }
}

/* =============================================================
   SHARED HOOKS 2026-10-27 (mid-frontend) — tipografi angka,
   SVG konsisten, navbar slim 64px satu baris, MathML
   math.equation, legenda variabel, preset/copy/breakdown/
   accordion/scope, grid beranda, strip roadmap.
   Hanya menyentuh hook yang disepakati. Tidak mengubah markup,
   JS, rumus, rute, backend, .calc-action-row, atau aturan
   mobile/print lama di luar scope komponen baru.
   ============================================================= */

/* ===== Angka rapi (tabular-nums): input numerik, hasil, statistik, sel angka tabel ===== */
input[type="number"], input[inputmode="numeric"], input[inputmode="decimal"],
.input, .select, #calculator, #results, .result-hero, .result-hero .amount, .result-grid, .stat .v, .landing-stats .v,
table, td, th, td.num, th.num, .num, math, .var-legend, .breakdown, .chip.preset {
  font-variant-numeric: tabular-nums;
}
th.num { text-align: right; }
code { font-family: var(--font-mono); font-size: .92em; }

/* ===== SVG konsisten: .icon-svg diskalakan 1em (menang atas global svg height:auto) ===== */
.icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.125em;
}
.brand .icon-svg { width: 28px; height: 28px; vertical-align: middle; }

/* =============================================================
   NAVBAR DESKTOP SLIM — sticky, SATU baris 56px-64px
   (≥769px): brand | .nav (5 tautan kalkulator pendek) |
   .site-search | .cta. Menggantikan kontrak grid nav 4×2 lama.
   ============================================================= */
@media (min-width: 769px) {
  .topbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px 14px;
    height: 60px;
    min-height: 56px;
    max-height: 64px;
    padding: 0 16px;
    position: relative;
  }
  .topbar-primary { display: contents; }
  .topbar-primary .brand { order: 1; flex: 0 0 auto; }
  .nav {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 10px;
    font-size: .86rem;
    white-space: nowrap;
  }
  .topbar-primary .site-search {
    order: 3;
    flex: 0 1 260px;
    width: auto;
    max-width: 300px;
    min-width: 180px;
    justify-self: auto;
  }
  .topbar-primary .cta {
    order: 4;
    flex: 0 0 auto;
    justify-self: auto;
    min-height: 44px;
  }
  .topbar-primary .nav-toggle { display: none; }
}
@media (min-width: 769px) and (max-width: 959px) {
  .topbar-primary .site-search { display: none; }
}

/* =============================================================
   MATHML — math.equation (blok display equation)
   Pusat via width:fit-content + margin auto, BUKAN
   text-align:center — saat rumus lebih lebar dari kolom,
   konten tetap bisa di-scroll dari awal rumus (tanpa sisi kiri
   yang tak terjangkau). Pita aksen kiri konsisten dengan
   bahasa callout (.formula / .case-study). Font matematika:
   Cambria Math / Latin Modern Math / STIX, fallback serif.
   ============================================================= */
math.equation {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 18px auto;
  padding: 10px 8px 10px 14px;
  border-left: 3px solid var(--brand);
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  font-family: "Cambria Math", "Latin Modern Math", "STIX Two Math", "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.9;
  color: var(--ink);
}

/* ===== Legenda variabel (.var-legend 2 kolom + .variable-legend) ===== */
.var-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 10px 0 0;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.variable-legend {
  margin: 14px 0 0;
  padding: 8px 0 8px 14px;
  border-left: 3px solid var(--accent);
  background: transparent;
  font-size: .86rem;
  line-height: 1.6;
  min-width: 0;
}
.variable-legend > :first-child { margin-top: 0; }
.variable-legend > :last-child { margin-bottom: 0; }
.variable-legend h3, .variable-legend h4 {
  font-size: .84rem; font-weight: 800; letter-spacing: .01em;
  margin: 0 0 8px; color: var(--ink);
}
.variable-legend dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
}
.variable-legend dt {
  font-family: var(--font-mono); font-weight: 700;
  color: var(--brand-dark); white-space: nowrap;
}
.variable-legend dd { margin: 0; color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.variable-legend ul, .variable-legend ol { margin: 0; padding-left: 18px; }
.variable-legend li { margin: 4px 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.variable-legend code { color: var(--brand-dark); }

/* ===== Preset chips — tombol cepat pengisian (kontrol 44px) ===== */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}
.preset-chip, .chip.preset, button.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: border-color .15s, background .15s, color .15s;
}
.preset-chip:hover, .chip.preset:hover, button.chip:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}
.preset-chip:active, .chip.preset:active, button.chip:active { transform: translateY(1px); }
.preset-chip.active, .preset-chip.is-active, .preset-chip[aria-pressed="true"],
.chip.preset.active, .chip.preset[aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

/* ===== Tombol salin hasil (kontrol 44px + status sukses) ===== */
.copy-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--card);
  color: var(--brand-dark);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.copy-result:hover { background: var(--brand-soft); text-decoration: none; }
.copy-result:active { transform: translateY(1px); }
.copy-result.copied, .copy-result.is-copied, .copy-result[data-copied="true"] {
  background: var(--success-soft); border-color: var(--success); color: var(--success);
}

/* ===== Breakdown bar — batang bertumpuk proporsi komponen =====
   Anak langsung = segmen; lebar dari style inline (mis. width:40%).
   Warna default berputar via nth-child; class/inline pada segmen
   tetap bisa menimpa. */
.breakdown-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 14px;
  margin: 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
}
.breakdown-bar > * {
  flex: 0 0 auto;
  min-width: 3px;
  height: 100%;
}
.breakdown-bar > *:nth-child(4n+1) { background: var(--brand); }
.breakdown-bar > *:nth-child(4n+2) { background: var(--accent); }
.breakdown-bar > *:nth-child(4n+3) { background: var(--success); }
.breakdown-bar > *:nth-child(4n+4) { background: var(--ink-soft); }

/* ===== Akordeon masukan kalkulator — baris hairline seperti FAQ ===== */
.calculator-feedback-accordion {
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.calculator-feedback-accordion summary {
  min-height: 44px;
  padding: 15px 6px;
  font-size: .95rem;
}
.calculator-feedback-accordion[open] > summary { color: var(--brand-dark); }
.calculator-feedback-accordion .subform { margin-top: 12px; }

/* ===== Scope pills — indikator cakupan perhitungan ===== */
.scope-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  max-width: 100%;
  min-width: 0;
}
.scope-pills > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.scope-pills > button, .scope-pills > a, .scope-pills > [role="button"] {
  min-height: 44px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.scope-pills > button:hover, .scope-pills > a:hover {
  background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none;
}
.scope-pills > .on, .scope-pills > .active, .scope-pills > [aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

/* ===== Grid alat aktif (beranda) — 3 / 2 / 1 kolom, wrap-safe ===== */
.home-active-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.home-active-grid > * { min-width: 0; }
@media (max-width: 900px) {
  .home-active-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .home-active-grid { grid-template-columns: 1fr; }
}

/* ===== Strip roadmap — baris wrap aman, tanpa overflow horizontal ===== */
.roadmap-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 12px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  min-width: 0;
}
.roadmap-strip > * { min-width: 0; }

/* ===== Mobile ≤640px: komponen baru dirapatkan; kontrol tetap 44px ===== */
@media (max-width: 640px) {
  math.equation {
    font-size: 1rem;
    margin: 14px auto;
    padding: 8px 6px 8px 12px;
  }
  .variable-legend { padding: 8px 0 8px 12px; font-size: .84rem; }
  .variable-legend dl { gap: 6px 10px; }
  .preset-chips, .scope-pills { gap: 8px; }
  .copy-result { padding: 10px 12px; font-size: .84rem; }
  .breakdown-bar { height: 12px; }
  .home-active-grid { gap: 12px; }
  .roadmap-strip { padding: 12px; gap: 8px 10px; }
}

/* ===== Cetak: elemen interaktif baru tidak ikut PDF; rumus utuh ===== */
@media print {
  .preset-chips, .copy-result, .calculator-feedback-accordion {
    display: none !important;
  }
  math.equation {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* =============================================================
   HOMEPAGE VISUAL DIRECTORY & NAVBAR POLISH (2026-11-08)
   - Navbar dropdown Kategori tanpa border kotak aneh
   - Hero ringkas + kolom pencarian besar berikon
   - Direktori kalkulator tunggal dikelompokkan per kategori
   - Kartu kalkulator visual: ikon SVG 40px tint pastel keluarga
     #2563EB, judul tegas, deskripsi 1 baris, panah hover, lift halus
   ============================================================= */

/* Navbar dropdown Kategori menyatu tenang dengan menu utama (tanpa border kotak) */
.topbar .bk-navbar-categories .bk-navbar-categories__toggle {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: none;
  transition: background .15s, color .15s;
}
.topbar .bk-navbar-categories .bk-navbar-categories__toggle:hover,
.topbar .bk-navbar-categories .bk-navbar-categories__toggle[aria-expanded="true"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.topbar .bk-navbar-categories .bk-navbar-categories__list {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -6px rgba(15, 23, 42, 0.04);
  padding: 6px;
  background: #ffffff;
}

/* Hero beranda ringkas & lega */
.home-page .landing-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 28px 0 24px;
}
.home-page .landing-hero h1 {
  color: #0f172a;
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.home-page .landing-hero .lead {
  color: #475569;
  font-size: 0.96rem;
  line-height: 1.55;
  max-width: 680px;
  margin: 0 0 18px;
}

/* Kolom pencarian besar dengan ikon di dalam input */
.home-page .search-large {
  max-width: 640px;
  position: relative;
}
.home-page .search-large form {
  position: relative;
}
.home-page .search-large-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.home-page .search-large-icon .icon-svg {
  width: 18px;
  height: 18px;
}
.home-page .search-large .search-input {
  min-height: 48px;
  padding: 12px 16px 12px 44px;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.home-page .search-large .search-input:focus {
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* Direktori kalkulator dikelompokkan per kategori */
.home-page #alat.home-directory {
  padding: 28px 0 16px;
}
.home-page .cat-directory {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.home-page .cat-group {
  min-width: 0;
}
.home-page .cat-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.home-page .cat-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
}
.home-page .cat-group-ic {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-page .cat-group-ic .icon-svg {
  width: 18px;
  height: 18px;
}
.home-page .cat-group-title h2 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  color: #0f172a;
  min-width: 0;
}
.home-page .cat-group-title h2 a {
  color: #0f172a;
  text-decoration: none;
}
.home-page .cat-group-title h2 a:hover {
  color: var(--brand);
}
.home-page .cat-group-count {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
  flex-shrink: 0;
}
.home-page .cat-group-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.home-page .cat-group-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Grid kartu kalkulator: 3 kolom desktop, 2 tablet, 1 mobile;
   kategori 1 alat tidak tertekan sempit di desktop/tablet */
.home-page .home-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin-top: 0;
}
.home-page .home-tool-grid > .home-tool-card:only-child {
  max-width: 480px;
}

/* Kartu kalkulator visual */
.home-page .home-tool-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  text-decoration: none;
  min-width: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.home-page .home-tool-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.10), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  text-decoration: none;
}
.home-page .home-tool-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #93c5fd;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.10), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  text-decoration: none;
}

/* Kotak ikon 40px dengan tint pastel satu keluarga warna (#2563EB) */
.home-page .home-tool-card .ic {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.home-page .home-tool-card .ic .icon-svg {
  width: 20px;
  height: 20px;
}

/* Variasi tint pastel halus per kategori (masih keluarga biru/slate tenang) */
.home-page .cat-theme-bisnis .cat-group-ic,
.home-page .cat-theme-bisnis .home-tool-card .ic {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #2563eb;
}
.home-page .cat-theme-pajak .cat-group-ic,
.home-page .cat-theme-pajak .home-tool-card .ic {
  background: #f0f9ff;
  border-color: #e0f2fe;
  color: #0284c7;
}
.home-page .cat-theme-teknik .cat-group-ic,
.home-page .cat-theme-teknik .home-tool-card .ic {
  background: #eef2ff;
  border-color: #e0e7ff;
  color: #1d4ed8;
}
.home-page .cat-theme-matematika .cat-group-ic,
.home-page .cat-theme-matematika .home-tool-card .ic {
  background: #ecfeff;
  border-color: #cffafe;
  color: #0369a1;
}

/* Teks kartu kalkulator */
.home-page .home-tool-card .tool-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-page .home-tool-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
  transition: color 0.15s ease;
}
.home-page .home-tool-card:hover h3,
.home-page .home-tool-card:focus-visible h3 {
  color: var(--brand);
}
.home-page .home-tool-card p {
  font-size: 0.81rem;
  color: #475569;
  margin: 0;
  line-height: 1.35;
}
.home-page .home-tool-card .tool-tag,
.tool-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 4px;
  line-height: 1.35;
}

/* Panah kanan kartu (animasi geser halus saat hover) */
.home-page .home-tool-card .tool-arrow {
  flex-shrink: 0;
  align-self: center;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, color 0.18s ease;
}
.home-page .home-tool-card .tool-arrow .icon-svg {
  width: 18px;
  height: 18px;
}
.home-page .home-tool-card:hover .tool-arrow,
.home-page .home-tool-card:focus-visible .tool-arrow {
  color: var(--brand);
  transform: translateX(3px);
}

/* Responsif tablet (2 kolom) & mobile (1 kolom) */
@media (max-width: 900px) {
  .home-page .home-tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 14px;
  }
}
@media (max-width: 768px) {
  .home-page .landing-hero {
    padding: 18px 0 16px;
  }
  .home-page #alat.home-directory {
    padding: 20px 0 12px;
  }
  .home-page .cat-directory {
    gap: 22px;
  }
}
@media (max-width: 560px) {
  .home-page .home-tool-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-page .home-tool-grid > .home-tool-card:only-child {
    max-width: none;
  }
  .home-page .cat-group-title {
    gap: 8px;
  }
  .home-page .cat-group-title h2 {
    font-size: 0.96rem;
  }
  .home-page .cat-group-link {
    display: none;
  }
}

/* Product surfaces: quiet depth, crisp controls, financial result hierarchy.
   Screen-only refinements preserve the existing print/PDF contract. */
@media screen {
  .topbar {
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .03);
  }

  .card {
    padding: 18px;
    border-color: #dfe6ef;
    box-shadow: var(--shadow);
  }
  .card h2 { letter-spacing: -.02em; margin-bottom: 12px; }
  /* Nested content stays flat rather than accumulating elevated cards. */
  .card .card { box-shadow: none; }

  .input-group { min-width: 0; margin-bottom: 14px; }
  .input-group label, .field label { color: #334155; font-weight: 600; }
  .input, .select, textarea {
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
  }
  .input:hover:not(:disabled), .select:hover:not(:disabled), textarea:hover:not(:disabled) {
    border-color: #94a3b8;
  }
  .input:focus, .select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12), 0 1px 2px rgba(15, 23, 42, .04);
  }
  .input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }

  .btn {
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
  }
  .btn:hover:not(:disabled) {
    box-shadow: 0 2px 4px rgba(15, 23, 42, .10), 0 4px 10px -3px rgba(37, 99, 235, .20);
    text-decoration: none;
  }
  .btn.secondary, .btn.ghost {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  }
  .btn.secondary:hover:not(:disabled), .btn.ghost:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 2px 4px rgba(15, 23, 42, .05);
  }
  .btn:disabled { box-shadow: none; }

  .result, .result-hero {
    min-width: 0;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-left: 3px solid var(--brand);
    border-radius: 10px;
    padding: 18px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  .result .big, .result-hero .amount {
    font-family: var(--font-mono);
    font-size: clamp(1.6rem, 3.6vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -.045em;
    line-height: 1.3;
    margin: 8px 0;
    color: #0f172a;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }
  .result-hero .label { color: #334155; font-size: .75rem; letter-spacing: .06em; }
  .result-hero .note { line-height: 1.5; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .stat { min-width: 0; padding: 0; }
  .stat .k { text-transform: none; letter-spacing: 0; font-weight: 500; }
  .stat .v { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; }

  #results table, .result table { line-height: 1.55; }
  #results th, .result th { font-size: .7rem; font-weight: 600; }
  #results td, .result td { padding-top: 12px; padding-bottom: 12px; }
  #results td.num, .result td.num { font-family: var(--font-mono); font-size: .85rem; }
  #results tbody tr:hover, .result tbody tr:hover { background: #f8fafc; }
  .kv {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
  }
  .kv:last-child { border-bottom: 0; }
  .kv > :first-child { color: var(--ink-soft); }
  .kv > :last-child {
    margin: 0;
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 500;
    overflow-wrap: anywhere;
  }

  /* Category groups use whitespace and a rule, never an outer card. */
  .home-page .cat-group { --category-accent: #2563eb; --category-border: #93c5fd; }
  .home-page .cat-theme-pajak { --category-accent: #0369a1; --category-border: #7dd3fc; }
  .home-page .cat-theme-teknik { --category-accent: #1d4ed8; --category-border: #a5b4fc; }
  .home-page .cat-theme-matematika { --category-accent: #0e7490; --category-border: #67e8f9; }
  .home-page .cat-group-head { border-bottom-color: #d8e2ee; }
  .home-page .cat-group-ic { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
  .home-page .cat-group-title h2 a:hover { color: var(--category-accent); }
  .home-page .home-tool-card {
    padding: 18px 16px;
    box-shadow: var(--shadow);
    border-color: #dfe6ef;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  }
  .home-page .home-tool-card:hover, .home-page .home-tool-card:focus-visible {
    border-color: var(--category-border, #93c5fd);
    box-shadow: var(--shadow-hover);
  }
  .home-page .home-tool-card h3 { line-height: 1.45; letter-spacing: -.015em; }
  .home-page .home-tool-card .tool-body { gap: 4px; }
  .home-page .home-tool-card:hover h3,
  .home-page .home-tool-card:hover .tool-arrow { color: var(--category-accent, var(--brand)); }
}

@media screen and (max-width: 560px) {
  .card { padding: 16px; }
  .result, .result-hero { padding: 16px 14px; }
  .result-grid { gap: 14px 12px; }
  .home-page .home-tool-card { padding: 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .input, .select, textarea, .home-page .home-tool-card,
  .home-page .home-tool-card .ic, .home-page .home-tool-card .tool-arrow {
    transition: none;
  }
  .home-page .home-tool-card:hover, .home-page .home-tool-card:hover .tool-arrow {
    transform: none;
  }
}

/* ===== Generic Share Tool Button & Feedback (share-tool.js) ===== */
.bk-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 4px;
}

.hero .bk-hero-head > h1 {
  flex: 1 1 200px;
  min-width: 0;
  margin: 0;
}

.btn.secondary.bk-share-btn {
  width: auto;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  white-space: nowrap;
}

.btn.secondary.bk-share-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn.secondary.bk-share-btn svg {
  flex-shrink: 0;
}

.bk-share-status:empty {
  display: none;
}

.bk-share-status {
  margin: 6px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #334155;
  overflow-wrap: anywhere;
}

.bk-share-manual {
  margin-top: 8px;
  max-width: 560px;
}

.bk-share-manual-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.bk-share-url.input {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: max(1rem, 16px);
  line-height: 1.4;
  resize: none;
}

@media print {
  .bk-share-btn,
  .bk-share-status,
  .bk-share-manual,
  .calc-share-box,
  .calc-share-status,
  #shareResultBtn {
    display: none !important;
  }
}

/* ===== Share Result UI for /kalkulator/* (calc-share.js) ===== */
#shareResultBtn[hidden],
#calcShareManual[hidden] {
  display: none !important;
}

#shareResultBtn {
  min-height: 44px;
}

.calc-share-box {
  margin-top: 10px;
}

.calc-share-disclosure {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
  overflow-wrap: anywhere;
}

.calc-share-manual {
  margin-top: 8px;
}

.calc-share-manual-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.calc-share-url.input {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: max(1rem, 16px);
  line-height: 1.4;
  resize: none;
  box-sizing: border-box;
}

.calc-share-status:empty {
  display: none;
}

.calc-share-status {
  margin: 8px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #334155;
  overflow-wrap: anywhere;
}

@media screen and (max-width: 640px) {
  #results .calc-action-row #shareResultBtn {
    grid-column: 1 / -1;
  }
}
