
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

  :root {
    --orange: #fb7718;
    --orange-strong: #e35f05;
    --orange-badge-bg: #fff2e0;
    --orange-box-bg: #fff7ed;
    --orange-highlight-bg: #fff5e0;
    --form-bg: #f5f5f5;
    --panel-bg: #f5f5f5;
    --white: #ffffff;
    --border-input: #bfbfbf;
    --border-light: #dedede;
    --text-black: #1a1a1a;
    --text-body: #4d4d4d;
    --text-placeholder: #8c8c8c;
    --text-faint: #808080;
    --text-breadcrumb: #999999;
    --green-bg: #d4edd4;
    --green-text: #266626;
    --red-bg: #fbe3e3;
    --red-text: #a32626;
    --blue-bg: #edf7fc;
    --shadow-card: 0 1px 2px rgba(20, 15, 5, 0.04), 0 8px 24px rgba(20, 15, 5, 0.06);
    --shadow-hover: 0 2px 4px rgba(20, 15, 5, 0.06), 0 14px 32px rgba(20, 15, 5, 0.10);
    /* Layout responsif: gutter mengecil di layar kecil, konten dibatasi & terpusat di layar lebar,
       sementara background (navbar, band abu-abu) tetap selebar layar. */
    --gutter: clamp(16px, 4vw, 60px);
    --content-max: 1400px;
    --px: max(var(--gutter), calc((100% - var(--content-max)) / 2));
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }

  body {
    background: var(--white);
    color: var(--text-black);
    font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
  }

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

  a { color: inherit; text-decoration: none; }
  :focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
  button { font-family: inherit; }

  .app { width: 100%; min-height: 100vh; min-height: 100dvh; }
  .app-inner { padding: 0 var(--px) 60px; }

  /* ---------- Navbar ---------- */
  .navbar {
    background: var(--orange);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px var(--px);
    flex-wrap: wrap;
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 6px 18px rgba(227, 95, 5, 0.18);
  }
  .navbar .brand { font-size: 22px; font-weight: 700; color: var(--white); }
  .navbar .nav-links { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; color: var(--white); flex-wrap: wrap; }
  .navbar .nav-right { display: flex; gap: 16px; align-items: center; }
  .navbar .nav-right .proj { font-size: 14px; font-weight: 600; color: var(--white); white-space: nowrap; }
  .navbar .avatar {
    width: 36px; height: 36px; border-radius: 999px; background: var(--white);
    color: var(--orange); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; flex-shrink: 0;
  }

  /* ---------- Region / standard bar (kept from toolkit; styled to fit) ---------- */
  .region-bar {
    background: var(--orange-box-bg);
    border-bottom: 1px solid var(--orange-badge-bg);
    padding: 14px var(--px);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
  }
  .region-bar label { font-size: 12px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.04em; }
  .region-bar select {
    font-family: "Inter", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--orange);
    background: var(--white);
    color: var(--text-black);
  }
  .region-bar .region-hint { font-size: 12px; color: var(--text-body); }
  .region-bar.needs-attention { animation: region-pulse 1.1s ease-in-out 2; }
  @keyframes region-pulse { 0%, 100% { background: var(--orange-box-bg); } 50% { background: var(--orange-badge-bg); } }
  @media (prefers-reduced-motion: reduce) { .region-bar.needs-attention { animation: none; } }

  /* ---------- Breadcrumb + title (selector view) ---------- */
  .crumb { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-breadcrumb); padding: 20px var(--px) 0; }
  .crumb-link { background: none; border: none; font: inherit; font-weight: 600; color: var(--text-breadcrumb); cursor: pointer; padding: 0; }
  .crumb-link:hover { color: var(--orange); text-decoration: underline; }
  .page-title-row { padding: 10px var(--px) 20px; }
  .page-title-row h1 { margin: 0 0 8px; font-size: clamp(23px, 2.3vw, 30px); font-weight: 700; text-wrap: balance; }
  .page-title-row p { margin: 0; color: var(--text-body); font-size: 14px; max-width: 78ch; }

  /* ---------- Category chips (selector view) ---------- */
  .cat-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--px) 24px; }
  .cat-chip {
    font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
    border: 1.5px solid var(--orange-badge-bg); background: var(--orange-badge-bg); color: var(--orange);
    cursor: pointer;
  }
  .cat-chip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--white); }

  .cat-group { padding: 0 var(--px) 30px; }
  .cat-group h2 {
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange);
    font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
  }
  .cat-group h2::after { content: ""; flex: 1; height: 1px; background: var(--border-light); }

  .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .calc-card {
    text-align: left; background: var(--white); border: 1px solid var(--border-light); border-radius: 14px;
    padding: 18px; cursor: pointer; box-shadow: var(--shadow-card); display: flex; flex-direction: column;
    gap: 8px; min-height: 120px;
  }
  .calc-card:hover { border-color: var(--orange); }
  .calc-card .name { font-weight: 700; font-size: 15px; text-wrap: balance; color: var(--text-black); }
  .calc-card .std { font-size: 11px; font-weight: 600; color: var(--orange); }
  .calc-card .desc { font-size: 12.5px; color: var(--text-body); }
  .calc-card .badge-new { display: inline-block; font-size: 10px; font-weight: 700; color: var(--orange); background: var(--orange-badge-bg); padding: 2px 8px; border-radius: 999px; width: fit-content; }

  /* ---------- Workspace / selector visibility ---------- */
  .workspace { display: none; }
  .workspace.active { display: block; }
  .selector.hidden { display: none; }

  /* ---------- Top-level routing (Landing / Pilih Bidang / Kalkulator E&I) ---------- */
  .toplevel { display: none; }
  .toplevel.active { display: block; }
  .navbar .nav-links button, .navbar .nav-right .proj {
    background: none; border: none; font: inherit; cursor: pointer; padding: 0; color: var(--white);
  }
  .navbar .nav-links button {
    padding: 8px 12px; border-radius: 999px; white-space: nowrap;
    transition: background-color .18s var(--ease), color .18s var(--ease);
  }
  .navbar .nav-links button:hover { background: rgba(255,255,255,0.16); }
  .navbar .nav-links button[aria-current="true"] { background: var(--white); color: var(--orange-strong); }

  /* ---------- Hero (Home) ---------- */
  .hero {
    display: flex; flex-direction: column; align-items: center; gap: 18px;
    padding: clamp(36px, 6vw, 72px) var(--px) clamp(32px, 4vw, 52px); text-align: center;
  }
  .hero .hero-brand { font-size: clamp(38px, 4.2vw, 60px); line-height: 1.05; font-weight: 800; color: var(--orange); margin: 0; }
  .hero .hero-tagline { font-size: clamp(16px, 1.5vw, 21px); font-weight: 600; color: var(--text-black); margin: 0; text-wrap: balance; }
  .hero .hero-desc { font-size: 14px; color: var(--text-body); margin: 0; max-width: 62ch; }
  .hero-search {
    display: flex; align-items: center; gap: 8px; background: var(--white); border: 2px solid var(--orange);
    border-radius: 30px; padding: 8px 8px 8px 22px; width: min(700px, 100%);
  }
  .hero-search input {
    flex: 1; border: none; outline: none; font: inherit; font-size: 14.5px; color: var(--text-black); background: none;
  }
  .hero-search input::placeholder { color: var(--text-placeholder); }
  .hero-search button {
    background: var(--orange); color: var(--white); border: none; border-radius: 24px; padding: 12px 22px;
    font-weight: 600; font-size: 14px; cursor: pointer; flex-shrink: 0;
  }

  /* ---------- Discipline cards (shared: Home preview + Pilih Bidang page) ---------- */
  .disc-section { background: var(--form-bg); padding: 30px var(--px) 56px; }
  .disc-cards-row { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
  .disc-card {
    background: var(--white); border: 2px solid var(--orange); border-radius: 20px; padding: 32px 26px;
    display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
    width: 100%; max-width: 400px; flex: 1 1 320px; cursor: pointer;
  }
  .disc-card .disc-icon {
    width: 70px; height: 70px; border-radius: 35px; background: var(--orange-badge-bg);
    display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--orange); flex-shrink: 0;
  }
  .disc-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-black); text-wrap: balance; }
  .disc-card p { margin: 0; font-size: 12.5px; color: var(--text-body); }

  /* ---------- Pilih Bidang Kalkulasi page ---------- */
  .disciplines-title { text-align: center; padding: 48px var(--px) 8px; }
  .disciplines-title h1 { margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; }
  .disciplines-title p { margin: 0; color: var(--text-body); font-size: 15px; }
  .disciplines-cards { padding: 30px var(--px) 80px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
  .disc-card.full {
    width: 100%; max-width: 1320px; flex-direction: row; justify-content: space-between; text-align: left;
    padding: 28px 40px; gap: 24px;
  }
  .disc-card.full .disc-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
  .disc-card .disc-select-btn {
    background: var(--orange); color: var(--white); border: none; border-radius: 10px; padding: 12px 24px;
    font-weight: 600; font-size: 14px; cursor: pointer;
  }
  .disc-card.disabled { opacity: 0.55; cursor: not-allowed; }
  .disc-card.disabled:hover { border-color: var(--orange); }
  .disc-badge-soon {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint);
    background: var(--panel-bg); padding: 3px 10px; border-radius: 999px; width: fit-content;
  }

  /* ---------- Task selection (Home: "Mau Mulai dari Mana?") ---------- */
  .task-section { padding: 40px var(--px) 56px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
  .task-section h2 { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 700; text-align: center; }
  .task-list { display: flex; flex-direction: column; gap: 12px; width: min(800px, 100%); }
  .task-item {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--white);
    border: 1.5px solid var(--orange); border-radius: 12px; padding: 18px 24px; cursor: pointer; text-align: left;
    font-family: inherit;
  }
  .task-item .task-left { display: flex; flex-direction: column; gap: 3px; }
  .task-item .task-left strong { font-size: 16px; font-weight: 700; color: var(--text-black); }
  .task-item .task-left span { font-size: 12px; color: var(--text-body); }
  .task-item .task-arrow { font-size: 20px; font-weight: 700; color: var(--orange); flex-shrink: 0; }

  /* ---------- Landing footer ---------- */
  .landing-footer {
    background: #262626; color: var(--white); display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 28px var(--px); font-size: 13.5px; flex-wrap: wrap;
  }
  .landing-footer strong { font-weight: 600; }

  /* ---------- AI floating button ---------- */
  .ai-fab {
    position: fixed; right: 32px; bottom: 32px; width: 56px; height: 56px; border-radius: 30px;
    background: var(--orange); color: var(--white); border: none; font-size: 24px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 40;
    right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  }
  .ai-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }

  /* ---------- Toast (honest "coming soon" notice, replaces alert()) ---------- */
  .toast-box {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 60;
    background: var(--text-black); color: var(--white); padding: 13px 22px; border-radius: 10px; font-size: 13.5px;
    max-width: min(92vw, 480px); text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .toast-box.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  @media (prefers-reduced-motion: reduce) { .toast-box { transition: none; } }

  /* ---------- Search-filter bar (results from Hero search inside Kalkulasi EI) ---------- */
  .search-filter-bar {
    margin: 0 var(--px) 18px; background: var(--orange-box-bg); border: 1px solid var(--orange-badge-bg);
    border-radius: 10px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; font-size: 13px; color: var(--text-black); flex-wrap: wrap;
  }
  .search-filter-bar button {
    background: none; border: none; color: var(--orange); font-weight: 700; font-size: 12.5px; cursor: pointer;
    text-decoration: underline; padding: 0;
  }

  @media (max-width: 900px) {
    .disc-card.full { flex-direction: column; text-align: center; }
  }

  .back-btn {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: 1.5px solid var(--border-input);
    color: var(--text-black); font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 8px;
    cursor: pointer; margin: 20px var(--px) 0;
  }
  .back-btn:hover { border-color: var(--orange); color: var(--orange); }

  /* ---------- Title Section ---------- */
  .title-section { padding: 10px var(--px) 20px; }
  .cs-title-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
  .cs-title-row h1 { margin: 0; font-size: clamp(23px, 2.3vw, 30px); font-weight: 700; }
  .std-badge { background: var(--orange-badge-bg); color: var(--orange); font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 12px; white-space: nowrap; }
  .title-section .desc { margin: 0; color: var(--text-body); font-size: 14px; max-width: 90ch; }

  /* ---------- Type select / mode tabs ---------- */
  .type-select-section { padding: 0 var(--px) 20px; }
  .type-select-box { background: var(--orange-box-bg); border-radius: 14px; padding: 20px 24px; }
  .type-select-box .ts-label { font-weight: 700; color: var(--orange); font-size: 14px; margin: 0 0 14px; }
  .tab-row { display: flex; gap: 10px; flex-wrap: wrap; }
  .tab-btn {
    font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1.5px solid var(--orange);
    background: var(--white); color: var(--orange); cursor: pointer;
  }
  .tab-btn.active { background: var(--orange); color: var(--white); }

  /* ---------- Calc Body: form + result ---------- */
  .calc-body { display: flex; gap: 28px; align-items: flex-start; padding: 10px var(--px) 0; flex-wrap: wrap; }
  .calc-form { background: var(--form-bg); border-radius: 16px; padding: 24px; flex: 1 1 560px; min-width: min(320px, 100%); display: flex; flex-direction: column; gap: 18px; }
  .calc-form .group-label { color: var(--orange); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; margin: 4px 0 -6px; }
  .calc-form .group-label:first-child { margin-top: 0; }
  .form-row { display: flex; gap: 16px; flex-wrap: wrap; }
  #inputForm { display: flex; flex-wrap: wrap; gap: 16px; align-content: flex-start; }
  .field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; min-width: 150px; }
  .field label { font-size: 12px; font-weight: 600; color: var(--text-body); }
  .field input, .field select {
    width: 100%; font-family: "Inter", sans-serif; font-variant-numeric: tabular-nums; font-size: 13.5px;
    padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border-input); background: var(--white); color: var(--text-black);
  }
  .field input:focus, .field select:focus { border-color: var(--orange); }
  .hitung-btn {
    background: var(--orange); color: var(--white); border: none; font-weight: 600; font-size: 15px;
    padding: 13px 28px; border-radius: 10px; cursor: pointer; align-self: flex-start;
  }
  .hitung-btn:hover { background: var(--orange-strong); }

  .result-panel {
    background: var(--white); border: 2px solid var(--orange); border-radius: 16px; padding: 24px;
    flex: 1 1 460px; min-width: min(320px, 100%); display: flex; flex-direction: column; gap: 12px;
  }
  .result-panel h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--orange); }
  .results-empty { color: var(--text-body); font-size: 13.5px; padding: 30px 4px; text-align: center; }
  .result-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  }
  .result-row.primary { background: var(--orange-highlight-bg); }
  .result-row .rlabel { font-size: 14px; color: var(--text-body); }
  .result-row.primary .rvalue { font-size: 20px; font-weight: 700; color: var(--orange); }
  .result-row .rvalue { font-size: 16px; font-weight: 600; color: var(--text-black); font-variant-numeric: tabular-nums; }
  .status-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 6px 12px;
    border-radius: 999px; width: fit-content;
  }
  .status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  .status-chip.ok { background: var(--green-bg); color: var(--green-text); }
  .status-chip.warn { background: #fdeecb; color: #8a5a00; }
  .status-chip.danger { background: var(--red-bg); color: var(--red-text); }
  .status-chip.info { background: var(--orange-badge-bg); color: var(--orange); }
  .ref-note { font-size: 11px; font-weight: 600; color: var(--text-faint); }
  .export-row { display: flex; gap: 10px; flex-wrap: wrap; }
  .export-btn { background: var(--white); border: 1px solid var(--border-input); font-size: 12px; font-weight: 600; color: var(--text-body); padding: 9px 16px; border-radius: 8px; cursor: default; }

  .reco-list { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
  .reco-list li { font-size: 13px; padding: 10px 12px 10px 14px; border-left: 3px solid var(--border-light); background: var(--form-bg); border-radius: 0 8px 8px 0; }
  .reco-list li.tone-ok { border-left-color: var(--green-text); }
  .reco-list li.tone-warn { border-left-color: #c98a00; }
  .reco-list li.tone-danger { border-left-color: var(--red-text); }
  .reco-list li.tone-info { border-left-color: var(--orange); }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border: 1px solid var(--border-light); border-radius: 12px; }
  .result-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .result-table th, .result-table td { padding: 10px 14px; text-align: left; white-space: nowrap; }
  .result-table th { background: var(--orange); color: var(--white); font-weight: 700; font-size: 12px; }
  .result-table td { font-variant-numeric: tabular-nums; border-top: 1px solid var(--border-light); }
  .result-table tr.row-pick td { background: var(--green-bg); color: var(--green-text); font-weight: 600; }
  .pill-yes { color: var(--green-text); font-weight: 600; }
  .pill-no { color: var(--red-text); font-weight: 600; }

  /* ---------- Generic section chrome (Alt Selection / Eng Check / Transparency / DB / Final) ---------- */
  .section-block { padding: 30px var(--px) 0; }
  .section-block h2 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
  .section-block > .section-sub { margin: 0 0 16px; color: var(--text-body); font-size: 13px; }

  .alt-empty, .check-empty { font-size: 13px; color: var(--text-body); border: 1px dashed var(--border-light); border-radius: 12px; padding: 16px 18px; }

  .check-grid { display: flex; gap: 16px; flex-wrap: wrap; }
  .check-card { border-radius: 12px; padding: 16px 18px; flex: 1 1 280px; min-width: min(240px, 100%); display: flex; flex-direction: column; gap: 8px; }
  .check-card.pass { background: var(--green-bg); }
  .check-card.fail { background: var(--red-bg); }
  .check-card.neutral { background: var(--orange-badge-bg); }
  .check-card .ct { font-weight: 700; font-size: 13px; }
  .check-card.pass .ct { color: var(--green-text); }
  .check-card.fail .ct { color: var(--red-text); }
  .check-card.neutral .ct { color: var(--orange); }
  .check-card .cd { font-size: 12px; color: var(--text-body); }

  .panel-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
  .t-panel { background: var(--panel-bg); border-radius: 14px; padding: 18px 20px; flex: 1 1 45%; min-width: min(280px, 100%); }
  .t-panel h4 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--orange); }
  .t-panel ul { margin: 0; padding: 0 0 0 16px; font-size: 12px; color: var(--text-body); display: flex; flex-direction: column; gap: 5px; }
  .t-panel.formula { flex-basis: 100%; }

  .steps-box { background: var(--white); border: 1px dashed var(--border-input); border-radius: 10px; padding: 14px 16px; margin-top: 10px; font-family: "Menlo", "Consolas", monospace; font-size: 12.5px; color: var(--text-black); display: flex; flex-direction: column; gap: 10px; }
  .step-line { display: flex; flex-direction: column; gap: 2px; }
  .step-line .step-formula { color: var(--orange); font-weight: 600; }
  .step-line .step-sub { color: var(--text-body); }
  .step-line .step-result { color: var(--text-black); font-weight: 700; }

  .db-row, .action-row { display: flex; gap: 20px; flex-wrap: wrap; }
  .db-card { background: var(--form-bg); border-radius: 14px; padding: 20px; flex: 1 1 300px; min-width: min(240px, 100%); display: flex; flex-direction: column; gap: 8px; }
  .db-card h5 { margin: 0; font-size: 15px; font-weight: 700; color: var(--orange); }
  .db-card p { margin: 0; font-size: 12px; color: var(--text-body); }
  .db-card .link { font-size: 12px; font-weight: 600; color: var(--orange); }

  .action-card { border: 2px solid var(--orange); border-radius: 16px; padding: 24px; flex: 1 1 45%; min-width: min(280px, 100%); display: flex; flex-direction: column; gap: 10px; }
  .action-card.boq { background: var(--orange-box-bg); }
  .action-card.report { background: var(--blue-bg); }
  .action-card h5 { margin: 0; font-size: 17px; font-weight: 700; color: var(--orange); }
  .action-card p { margin: 0; font-size: 13px; color: var(--text-body); }
  .action-btn { background: var(--orange); color: var(--white); font-size: 14px; font-weight: 600; padding: 11px 22px; border-radius: 10px; border: none; width: fit-content; cursor: pointer; font-family: inherit; }
  .action-btn:hover { background: var(--orange-strong); }

  footer { margin: 40px var(--px) 0; padding: 18px 0 40px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-body); }

  /* ---------- Referensi standar panel (dari toolkit lama, diselaraskan warna) ---------- */
  .ref-panel-empty { font-size: 13px; color: var(--text-body); border: 1px dashed var(--border-light); border-radius: 10px; padding: 14px 16px; }
  .ref-panel-box { border: 1px solid var(--border-light); border-radius: 12px; background: var(--form-bg); overflow: hidden; }
  .ref-panel-box summary { cursor: pointer; list-style: none; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--orange); }
  .ref-panel-box summary::-webkit-details-marker { display: none; }
  .ref-panel-box summary .region-tag { font-weight: 700; color: var(--text-black); }
  .ref-panel-box summary .chev { color: var(--text-body); font-size: 12px; transition: transform 0.15s; }
  .ref-panel-box[open] summary .chev { transform: rotate(90deg); }
  .ref-list { display: flex; flex-direction: column; border-top: 1px solid var(--border-light); }
  .ref-item { padding: 13px 18px; border-bottom: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 5px; background: var(--white); }
  .ref-item:last-child { border-bottom: none; }
  .ref-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .ref-kode { font-size: 12.5px; font-weight: 700; color: var(--orange); }
  .ref-conf { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
  .ref-conf::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .ref-conf.c-resmi { background: var(--green-bg); color: var(--green-text); }
  .ref-conf.c-textbook { background: #fdeecb; color: #8a5a00; }
  .ref-conf.c-verifikasi { background: var(--red-bg); color: var(--red-text); }
  .ref-judul { font-size: 13.5px; color: var(--text-black); }
  .ref-sub { font-size: 12px; color: var(--text-body); }
  .ref-catatan { font-size: 12.5px; color: var(--text-body); }
  .ref-sumber { font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 8px; }
  .ref-sumber a { color: var(--orange); }
  .ref-sumber span.plain { color: var(--text-body); font-style: italic; }

  /* ---------- Cost Estimation Modules (Analisa / Harga / Estimasi RAB) ---------- */
  .cost-page { padding: 0 var(--px) 60px; }
  .cost-page .page-title-row { padding: 40px 0 20px; }
  .cost-search-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
  .cost-search-row .hero-search { max-width: 480px; margin: 0; flex: 1 1 320px; }
  .cost-select {
    height: 48px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--border-input);
    background: var(--white); color: var(--text-body); font-size: 13px; font-weight: 600; font-family: inherit;
  }
  .cost-select:focus { border-color: var(--orange); outline: none; }
  .cost-btn {
    height: 48px; padding: 0 24px; border-radius: 10px; border: none; background: var(--orange); color: var(--white);
    font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit;
  }
  .cost-btn:hover { background: var(--orange-strong); }
  .cost-btn.ghost { background: var(--white); border: 1.5px solid var(--orange); color: var(--orange); }
  .cost-btn.green { background: #218c4d; }
  .cost-btn.green:hover { background: #186a39; }
  .cost-btn.blue { background: #3373d9; }
  .cost-btn.small { height: 36px; padding: 0 16px; font-size: 12.5px; border-radius: 8px; }

  .green-card {
    background: #e5f7e5; border: 1.5px solid #66b266; border-radius: 14px; padding: 18px 20px;
    display: flex; flex-direction: column; gap: 12px; margin-top: 16px;
  }
  .green-card > .gc-title { color: var(--green-text); font-weight: 700; font-size: 14px; }
  .green-card-toggle {
    background: #e5f7e5; border: 1px solid #66b266; border-radius: 10px; padding: 12px 18px;
    color: var(--green-text); font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: inherit;
    text-align: left; margin-top: 14px;
  }

  .cost-section { margin-bottom: 36px; }
  .cost-section h2 { font-size: 20px; margin: 0 0 4px; }
  .cost-section .sub { color: var(--text-body); font-size: 13.5px; margin: 0 0 14px; }

  .cost-empty { padding: 30px 20px; text-align: center; color: var(--text-faint); font-size: 13.5px; }

  .row-actions { display: flex; gap: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .row-actions button { background: none; border: none; cursor: pointer; font-weight: 600; font-family: inherit; padding: 0; font-size: 12px; }
  .row-actions .a-edit { color: #3373d9; }
  .row-actions .a-del { color: #d94040; }
  .row-actions .a-add { color: var(--green-text); }

  .a-linked-analisa {
    background: var(--orange-box-bg); border: 1px solid var(--orange); color: var(--orange-strong); border-radius: 999px;
    padding: 3px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  }
  .a-linked-analisa:hover { background: var(--orange); color: var(--white); }

  .cat-filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
  .cat-filter-chips button {
    border: 1.5px solid var(--border-input); background: var(--white); border-radius: 20px; padding: 6px 14px;
    font-size: 12.5px; font-weight: 600; color: var(--text-body); cursor: pointer; font-family: inherit;
  }
  .cat-filter-chips button.active { background: var(--orange); border-color: var(--orange); color: var(--white); }

  .analisa-picker { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
  .analisa-result-list { display: flex; flex-direction: column; gap: 8px; max-height: min(640px, 70vh); overflow-y: auto; overscroll-behavior: contain; }
  .analisa-result-item {
    border: 1px solid var(--border-light); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--white);
    display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  }
  .analisa-result-item:hover { border-color: var(--orange); }
  .analisa-result-item.active { border-color: var(--orange); background: var(--orange-box-bg); }
  .analisa-result-item .ari-kode { font-size: 11px; color: var(--text-faint); font-family: monospace; }
  .analisa-result-item .ari-name { font-size: 13.5px; font-weight: 600; color: var(--text-black); margin-top: 2px; }
  .analisa-result-item .ari-del { flex-shrink: 0; background: none; border: none; color: #a32626; cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 4px; }
  .analisa-detail-panel { border: 1px solid var(--border-light); border-radius: 14px; padding: 24px; min-height: 200px; }
  .analisa-detail-empty { color: var(--text-faint); font-size: 13.5px; text-align: center; padding: 60px 20px; }

  .adj-param-bar {
    display: flex; gap: 20px; flex-wrap: wrap; background: var(--panel-bg); border-radius: 12px; padding: 16px 20px; margin-bottom: 20px;
  }
  .adj-param-bar .field { flex: 0 0 150px; min-width: 130px; }
  .adj-param-bar .field label { font-size: 11px; }
  .adj-param-bar .field input { height: 36px; padding: 0 10px; font-size: 13px; }
  .adj-param-bar .field input.field-locked { background: var(--bg-locked, #eef0f2); color: var(--text-faint); cursor: not-allowed; }
  .adj-apply-btn { align-self: flex-end; }

  .subtotal-row td { font-weight: 700; background: #fafafa; border-top: 2px solid var(--border-light); }
  .section-label-row td { font-weight: 700; background: var(--orange-badge-bg); color: var(--orange-strong); font-size: 12px; }
  .hsp-callout {
    background: var(--orange-highlight-bg); border: 1px solid #ffd9a8; border-radius: 12px; padding: 16px 20px;
    display: flex; flex-wrap: wrap; gap: 24px; margin: 16px 0;
  }
  .hsp-callout .hc-item { display: flex; flex-direction: column; gap: 2px; }
  .hsp-callout .hc-label { font-size: 11px; color: var(--text-body); font-weight: 600; }
  .hsp-callout .hc-value { font-size: 18px; font-weight: 700; color: var(--orange-strong); font-variant-numeric: tabular-nums; }
  .hsp-callout .hc-note { flex-basis: 100%; font-size: 11.5px; color: var(--text-faint); font-style: italic; }
  .na-section-title { font-weight: 700; color: var(--orange-strong); margin: 4px 0 -4px; font-size: 13.5px; }
  .na-row-list { display: flex; flex-direction: column; gap: 8px; }
  .na-row { display: grid; grid-template-columns: 2fr 0.8fr 0.8fr 1fr auto; gap: 8px; align-items: center; }
  .na-row.has-brand { grid-template-columns: 1.6fr 1fr 0.7fr 0.7fr 0.9fr auto; }
  .na-row input { height: 36px; padding: 0 10px; border: 1px solid var(--border-input); border-radius: 8px; font-family: inherit; font-size: 12.5px; }
  .na-remove-btn { background: none; border: none; color: #a32626; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px; }
  .na-preview { background: var(--orange-box-bg); border-radius: 10px; padding: 14px; margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
  .na-preview .np-label { font-size: 11px; color: var(--text-body); font-weight: 600; }
  .na-preview .np-value { font-size: 16px; font-weight: 700; color: var(--orange-strong); font-variant-numeric: tabular-nums; }
  @media (max-width: 700px) { .na-row { grid-template-columns: 1fr; } .na-row.has-brand { grid-template-columns: 1fr; } }
  .row-actions .a-move { color: var(--text-faint); font-size: 14px; }
  .row-actions .a-move:disabled { opacity: .3; cursor: not-allowed; }
  .row-actions .a-analisa { color: var(--orange-strong); }
  .row-actions .a-revert { color: var(--text-faint); }
  .boq-local-badge { font-size: 10.5px; background: var(--orange-box-bg); color: var(--orange-strong); padding: 1px 7px; border-radius: 8px; margin-left: 6px; white-space: nowrap; font-weight: 700; }
  .boq-price-locked { display: inline-flex; align-items: center; gap: 3px; color: var(--text-faint); font-variant-numeric: tabular-nums; cursor: default; }
  .log-row { border: 1px solid var(--border-input); border-radius: 10px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .log-row .log-meta { font-size: 11.5px; color: var(--text-faint); }
  .log-row .log-time { font-variant-numeric: tabular-nums; }
  .log-row .log-label { font-size: 13px; font-weight: 600; flex: 1 1 220px; }
  .log-row .log-kode { font-weight: 400; color: var(--text-faint); font-family: monospace; }

  .ahsp-compare-box { border: 1.5px dashed var(--border-input); border-radius: 12px; padding: 18px 20px; margin-top: 18px; }
  .ahsp-compare-box h4 { margin: 0 0 4px; font-size: 14px; }
  .ahsp-compare-box .sumber-note { font-size: 11px; color: var(--text-faint); font-style: italic; margin-bottom: 12px; }
  .ahsp-delta { font-weight: 700; }
  .ahsp-delta.up { color: #a32626; }
  .ahsp-delta.down { color: #266626; }

  .cost-tabs { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
  .cost-tab {
    border-radius: 24px; padding: 10px 22px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
    border: 1.5px solid var(--orange); background: var(--white); color: var(--orange);
  }
  .cost-tab.active { background: var(--orange); color: var(--white); }
  .cost-tab-panel { display: none; }
  .cost-tab-panel.active { display: block; }

  .boq-toolbar { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
  .boq-workparams-box { background: var(--orange-box-bg); border: 1px solid var(--orange); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; }
  .boq-workparams-box code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
  .boq-summary-row {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 18px;
    padding-top: 18px; border-top: 2px solid var(--border-light);
  }
  .boq-total-label { font-size: 18px; font-weight: 700; color: var(--orange-strong); }
  .boq-total-label small { display: block; font-size: 11px; font-weight: 500; color: var(--text-faint); }
  .boq-action-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

  .upload-drop {
    border: 2px dashed var(--border-input); border-radius: 14px; padding: 40px 20px; text-align: center; color: var(--text-body);
  }
  .upload-drop input[type="file"] { margin-top: 12px; }
  .upload-status { margin-top: 16px; font-size: 13px; }

  .picker-modal-backdrop {
    position: fixed; inset: 0; background: rgba(20,15,5,0.45); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
  }
  .picker-modal-backdrop.show { display: flex; }
  .picker-modal {
    background: var(--white); border-radius: 16px; padding: 24px; width: 100%; max-width: 720px; max-height: 82vh; max-height: 86dvh;
    display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-card);
  }
  .picker-modal h3 { margin: 0; font-size: 18px; }
  .picker-modal-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; }
  .picker-modal-item {
    border: 1px solid var(--border-light); border-radius: 10px; padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  }
  .picker-modal-item:hover { border-color: var(--orange); background: var(--orange-box-bg); }
  .picker-modal-item .pmi-name { font-weight: 600; font-size: 13.5px; }
  .picker-modal-item .pmi-sub { font-size: 11.5px; color: var(--text-faint); }
  .picker-modal-item .pmi-qty { flex-shrink: 0; }
  .picker-modal-item .pmi-qty input { width: 90px; height: 32px; border-radius: 6px; border: 1px solid var(--border-input); padding: 0 8px; }
  .picker-modal-footer { display: flex; justify-content: flex-end; gap: 10px; }
  .picker-close-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-faint); line-height: 1; }
  .picker-modal-top { display: flex; justify-content: space-between; align-items: center; }

  .hasil-header-bar { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; padding: 24px 0 12px; }
  .hasil-header-bar h1 { margin: 0 0 4px; font-size: clamp(21px, 2.2vw, 26px); }
  .hasil-header-bar .sub { color: var(--text-body); font-size: 13.5px; }
  .hasil-sheet-wrap { border: 1px solid #999; border-radius: 4px; overflow: auto; max-height: 70vh; }
  .hasil-sheet { width: 100%; border-collapse: collapse; font-size: 11.5px; min-width: 900px; }
  .hasil-sheet th { background: #ffeb4d; padding: 6px 8px; text-align: left; border: 1px solid #ddd; white-space: nowrap; position: sticky; top: 0; }
  .hasil-sheet td { padding: 5px 8px; border: 1px solid #eee; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .hasil-sheet tr.cat-row td { font-weight: 700; color: #bf1a8c; background: #fff; }
  .hasil-sheet tr.grand-row td { font-weight: 700; background: #f5f5f5; border-top: 2px solid #999; }

  @media (max-width: 900px) {
    .calc-body { flex-direction: column; }
    .analisa-picker { grid-template-columns: 1fr; }
  }

  /* =========================================================
     SMOOTH UI — transisi, hover, dan animasi pindah halaman
     ========================================================= */
  .calc-card, .disc-card, .task-item, .tab-btn, .cat-chip, .cost-tab, .cat-filter-chips button,
  .hitung-btn, .cost-btn, .action-btn, .disc-select-btn, .back-btn, .export-btn, .hero-search button,
  .analisa-result-item, .picker-modal-item, .a-linked-analisa, .green-card-toggle, .crumb-link,
  .field input, .field select, .cost-select, .region-bar select, .hero-search {
    transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease),
                box-shadow .22s var(--ease), transform .22s var(--ease);
  }
  .hitung-btn:active, .cost-btn:active, .action-btn:active, .disc-select-btn:active,
  .hero-search button:active, .tab-btn:active, .cost-tab:active { transform: scale(0.97); }
  .hero-search:focus-within { box-shadow: 0 0 0 4px var(--orange-badge-bg); }
  .field input:focus, .field select:focus, .cost-select:focus { box-shadow: 0 0 0 3px var(--orange-badge-bg); outline: none; }
  @media (hover: hover) {
    .calc-card:hover, .disc-card:not(.disabled):hover, .task-item:hover {
      transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--orange);
    }
    .task-item:hover .task-arrow { transform: translateX(4px); }
    .disc-select-btn:hover, .cost-btn:not(.ghost):hover { filter: brightness(0.96); }
  }
  .task-item .task-arrow { transition: transform .22s var(--ease); }

  .toplevel.active, .workspace.active { animation: view-in .32s var(--ease) both; }
  @keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .picker-modal-backdrop.show { animation: fade-in .18s ease both; }
  .picker-modal-backdrop.show .picker-modal { animation: pop-in .24s var(--ease) both; }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

  /* =========================================================
     TABLET & MOBILE
     ========================================================= */
  @media (max-width: 1100px) {
    /* Navbar 2 baris: brand + Kelola Data di atas, menu jadi pill yang bisa digeser */
    .navbar {
      display: grid; grid-template-columns: 1fr auto; row-gap: 10px;
      padding-top: 12px; padding-bottom: 10px;
    }
    .navbar .brand { grid-column: 1; grid-row: 1; }
    .navbar .nav-right { grid-column: 2; grid-row: 1; }
    .navbar .nav-links {
      grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto;
      margin: 0 calc(-1 * var(--px)); padding: 0 var(--px);
      scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--px);
      -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--px), #000 calc(100% - var(--px)), transparent 100%);
              mask-image: linear-gradient(90deg, transparent 0, #000 var(--px), #000 calc(100% - var(--px)), transparent 100%);
    }
    .navbar .nav-links::-webkit-scrollbar { display: none; }
    .navbar .nav-links button { scroll-snap-align: start; background: rgba(255,255,255,0.14); }
    .navbar .nav-links button[aria-current="true"] { background: var(--white); }
  }

  @media (max-width: 900px) {
    .region-bar { gap: 8px 14px; }
    .region-bar select { flex: 1 1 220px; max-width: 100%; }
    .disc-card { padding: 26px 20px; }
    .task-item { padding: 16px 18px; }
    .t-panel.formula { min-width: 0; }
  }

  @media (max-width: 600px) {
    .navbar .brand { font-size: 20px; }
    .navbar .avatar { width: 32px; height: 32px; font-size: 14px; }
    .navbar .nav-links { font-size: 13px; }
    .hero { gap: 14px; }
    .hero-search { padding: 6px 6px 6px 16px; }
    .hero-search input { font-size: 14px; min-width: 0; }
    .hero-search button { padding: 10px 16px; }
    .calc-form, .result-panel, .action-card { padding: 18px; border-radius: 14px; }
    .hitung-btn { align-self: stretch; }
    .cs-title-row { gap: 8px; }
    .result-row.primary .rvalue { font-size: 18px; }
    .landing-footer { flex-direction: column; align-items: flex-start; }
    .cost-search-row .hero-search { flex-basis: 100%; max-width: none; }
    .adj-param-bar { gap: 12px; padding: 14px; }
    .adj-param-bar .field { flex: 1 1 130px; }
    .boq-action-buttons > *, .export-row > *, .boq-toolbar .cost-btn { flex: 1 1 auto; }
    .boq-toolbar > * { flex: 1 1 100%; }
    .picker-modal { padding: 18px; border-radius: 14px; }
    .ai-fab { width: 48px; height: 48px; font-size: 21px; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
    .toast-box { bottom: 76px; }
  }

  /* Layar lebar (FHD/2K): sedikit lebih lega */
  @media (min-width: 1800px) {
    :root { --content-max: 1520px; }
    body { font-size: 15px; }
  }
