:root {
  --bg: #f1f1ef;
  --panel: #ffffff;
  --ink: #17171a;
  --muted: #5b5b60;
  --faint: #9a9a9e;
  --line: #dcdcd6;
  --accent: #2f54eb;
  --accent-dark: #1f3ba8;
  --accent-tint: #eef1fe;
  --warn: #b45300;
  --warn-tint: #fff3e2;
  --warn-line: #f0c98a;
  --ok: #1c7c4d;
  --ok-tint: #eaf7f0;
  --mono: "SF Mono", "Menlo", "Consolas", monospace;
  --sans: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header / nav ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand .mark {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}
.brand .sub {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}
nav.tabs {
  display: flex;
  gap: 28px;
}
nav.tabs a {
  color: var(--muted);
  font-weight: 700;
  font-size: 14.5px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.tabs a:hover { color: var(--ink); text-decoration: none; }
nav.tabs a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- Hero / kicker ---------- */
.kicker {
  color: var(--accent);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 40px 0 10px;
}
h1.page-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  line-height: 1.12;
}
p.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 28px;
}

/* ---------- Banners ---------- */
.banner {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 0 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14.5px;
}
.banner .icon {
  font-size: 18px;
  line-height: 1;
  margin-top: 1px;
}
.banner.info {
  background: var(--accent-tint);
  border-color: #c9d4fb;
}
.banner.warn {
  background: var(--warn-tint);
  border-color: var(--warn-line);
}
.banner strong { display: block; margin-bottom: 3px; }
.banner p { margin: 0; color: var(--ink); opacity: 0.85; }
.banner a { font-weight: 700; }

/* ---------- Cards / sections ---------- */
.section {
  margin: 44px 0;
}
.section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}

/* ---------- Form ---------- */
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 6px;
}
.field .hint {
  font-size: 13px;
  color: var(--faint);
  margin-top: 5px;
}
input[type="text"], textarea, select {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input[type="text"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
textarea { resize: vertical; min-height: 110px; }

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  position: relative;
}
.radio-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.radio-pill span {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
}
.radio-pill input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.radio-pill input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.autocomplete { position: relative; }
.ac-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20,20,30,0.12);
  max-height: 260px;
  overflow-y: auto;
  display: none;
}
.ac-results.open { display: block; }
.ac-item {
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.hi { background: var(--accent-tint); }
.ac-item .id { font-family: var(--mono); font-size: 12.5px; color: var(--accent); font-weight: 700; }
.ac-item .dept { font-size: 14px; margin-top: 2px; }
.ac-item .meta { font-size: 12.5px; color: var(--faint); margin-top: 2px; }

.linked-award {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--accent-tint);
  border: 1px solid #c9d4fb;
  border-radius: 8px;
  font-size: 13.5px;
  display: none;
}
.linked-award.show { display: block; }
.linked-award .id { font-family: var(--mono); font-weight: 700; color: var(--accent-dark); }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  background: #fbfbfa;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.dropzone .dz-title { font-weight: 700; font-size: 15px; }
.dropzone .dz-sub { font-size: 13px; color: var(--faint); margin-top: 4px; }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
}
.file-row .name { font-weight: 600; }
.file-row .size { color: var(--faint); margin-left: 8px; }
.file-row button {
  border: none;
  background: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}
.file-row button:hover { color: #c0392b; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 9px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sans);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-primary:disabled { background: var(--faint); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }

.error-text {
  color: #c0392b;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}
.field.invalid input, .field.invalid textarea { border-color: #c0392b; }
.field.invalid .error-text { display: block; }

/* ---------- Confirmation ---------- */
.confirm {
  display: none;
  text-align: center;
  padding: 40px 24px;
  margin: 44px 0;
}
.confirm.show { display: block; }
.confirm .stamp {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--ok-tint);
  color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.confirm h3 { font-size: 22px; margin: 0 0 8px; }
.confirm p { color: var(--muted); max-width: 480px; margin: 0 auto 18px; }
.ref-code {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 22px;
  letter-spacing: 0.03em;
  max-width: 100%;
}
.ref-code button {
  border: none;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sans);
}

/* ---------- Feature grid (used on stub pages) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
}
.feature {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.feature h4 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Stat row ---------- */
.stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin: 30px 0;
}
.stat .num { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat .cap { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* ---------- Evidence trail table ---------- */
.scroll-hint {
  display: none;
  font-size: 12.5px;
  color: var(--faint);
  margin: 10px 0 0;
}

table.trail {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.trail th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
}
table.trail td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.trail tr:last-child td { border-bottom: none; }
table.trail .id { font-family: var(--mono); font-size: 12.5px; color: var(--accent-dark); }
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eee;
  color: var(--muted);
}
.badge.new { background: var(--ok-tint); color: var(--ok); }
.badge.review { background: var(--warn-tint); color: var(--warn); }
.badge.filed { background: var(--accent-tint); color: var(--accent-dark); }
.tag-relation {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Big search bar (OPEN / Kursi) ---------- */
.search-bar {
  position: relative;
  margin: 8px 0 4px;
}
.search-bar input[type="text"] {
  font-size: 17px;
  padding: 16px 18px;
  border-radius: 10px;
}
.search-bar .search-meta {
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 8px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.result-count {
  font-size: 13px;
  color: var(--faint);
  margin: 18px 0 10px;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--panel);
}
.result-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.result-card .id {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
}
.result-card .value {
  font-weight: 800;
  color: var(--ink);
}
.result-card .dept {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}
.result-card .officer-line {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}
.result-card .officer-line a { font-weight: 700; }

.officer-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.officer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
}
.officer-head .name-block { flex: 1; min-width: 0; }
.officer-head .name-block .name { font-weight: 800; font-size: 16px; }
.officer-head .name-block .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.officer-head .name-block .current { font-size: 13px; color: var(--faint); margin-top: 2px; }
.officer-head .chevron {
  font-size: 13px;
  color: var(--faint);
  transition: transform .15s;
  flex-shrink: 0;
}
.officer-card.open .chevron { transform: rotate(180deg); }
.officer-timeline {
  display: none;
  padding: 4px 18px 18px;
  border-top: 1px solid var(--line);
}
.officer-card.open .officer-timeline { display: block; }
.timeline-row {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.timeline-row:last-child { border-bottom: none; }
.timeline-row .yr {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent-dark);
  width: 44px;
  flex-shrink: 0;
}
.timeline-row .linked-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Placeholder note (OPEN / Kursi stubs) ---------- */
.stub-note {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--muted);
  margin: 30px 0;
  background: #fbfbfa;
}

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 26px 0 50px;
  color: var(--faint);
  font-size: 13px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
}

@media (max-width: 700px) {
  .wrap { padding: 0 18px; }
  h1.page-title { font-size: 28px; }
  p.lede { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats { flex-wrap: wrap; gap: 20px 32px; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 0;
  }
  .brand { font-size: 14px; flex-wrap: wrap; }
  .brand .sub { display: none; }
  nav.tabs { gap: 18px; }

  .section-title { display: flex; flex-wrap: wrap; gap: 4px 8px; }

  .banner { flex-direction: column; }
  .banner .icon { margin-top: 0; }

  .result-card .top-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .officer-head { flex-wrap: wrap; }

  .footer-row { flex-direction: column; gap: 4px; }
  .scroll-hint { display: block; }
}

@media (max-width: 380px) {
  h1.page-title { font-size: 24px; }
  .radio-pill span { padding: 8px 12px; font-size: 13px; }
}
