/* Palette and type from karib.id (site/karib.html :root); no external fonts under the CSP. */
:root {
  --bg: #F7F7F5;
  --panel: #FFFFFF;
  --hover: #F2F3F5;
  --line: #E3E4E8;
  --line-2: #D3D6DC;
  --text: #15171C;
  --text-2: #4E5460;
  --text-3: #5F6570;
  --draw: #959BA5;
  --flag: #C93A22;
  --amber: #8A5A00;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
h1 { font-size: 1.4rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
.top { display: flex; gap: 1rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { font-weight: 600; text-decoration: none; }
.crumb { color: var(--text-2); }
.me { margin-left: auto; color: var(--text-3); font-family: var(--mono); font-size: .9rem; }
main { max-width: 960px; margin: 0 auto; padding: 1rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.narrow { max-width: 420px; margin: 2rem auto; }
.stack { display: grid; gap: .75rem; }
label { display: grid; gap: .25rem; color: var(--text-2); font-size: .95rem; }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--text); }
button { font: inherit; padding: .5rem .9rem; border: 1px solid var(--text); border-radius: 6px; background: var(--text); color: #fff; cursor: pointer; }
button.secondary { background: var(--panel); color: var(--text); border-color: var(--line-2); }
button.link { background: none; border: 0; color: var(--text-2); padding: 0; text-decoration: underline; }
form.inline { display: inline; }
.muted { color: var(--text-3); font-size: .92rem; }
.error { color: var(--flag); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-2); font-weight: 500; }
code, .mono { font-family: var(--mono); font-size: .9em; }
@media (max-width: 600px) {
  main { padding: .75rem; }
  .card { padding: 1rem; }
}
:root { --ease: cubic-bezier(.2, .7, .2, 1); --m-ease: cubic-bezier(.22, .61, .36, 1); }
.row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1rem; font-size: .95rem; }
.nav a[aria-current] { font-weight: 600; text-decoration: none; }
.notice { padding: .6rem .8rem; border-radius: 8px; background: #FBF0D9; color: #85570A; }
.ok { color: #1D7444; }
.who { border-bottom: 1px dotted currentColor; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; margin: 0; }
legend { color: var(--text-2); padding: 0 .25rem; }
.files { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.checks { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.checks label { display: inline-flex; gap: .35rem; align-items: center; }

/* The status bar: the run stays "belum siap dibayar" until it is verified (design doc §8). */
.statusbar { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; padding: .55rem 1rem; font-size: .92rem;
  background: #FBF0D9; color: #85570A; border-bottom: 1px solid var(--line); }
.statusbar.ready { background: #E2F2E8; color: #1D7444; }
.statusbar b { font-weight: 600; }

/* From here to the app-only block: the #demo workspace of site/karib.html (lines 160-216, 392-512),
   moved as is. Only .dc-body and .dc-thread lost their fixed height: in the app the page scrolls. */
.app {
  --a-bg: #FFFFFF; --a-bg-2: #F5F6F8; --a-sel: #F0F3F7; --a-line: #E3E6EB;
  --a-text: #15171C; --a-text-2: #535A66; --a-text-3: #676D78;
  --a-red: #BF3920; --a-red-bg: #FCEBE6; --a-amber: #85570A; --a-amber-bg: #FBF0D9;
  --a-grey-bg: #ECEEF1; --a-green: #1D7444; --a-green-bg: #E2F2E8;
  color-scheme: light; min-width: 0; overflow: hidden;
  background: var(--a-bg); color: var(--a-text); border-radius: 14px;
  font: 14px/1.5 var(--sans); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px rgba(21, 23, 28, .09), 0 30px 70px -36px rgba(21, 23, 28, .32);
}
.app-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-width: 0;
  background: var(--a-bg-2); border-bottom: 1px solid var(--a-line); font-size: 12.5px; color: var(--a-text-2);
}
.app-bar b { color: var(--a-text); font-weight: 600; }
.app-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 16px;
  background: var(--a-bg-2); border-top: 1px solid var(--a-line); font-size: 12px; color: var(--a-text-2);
}
.app-foot .r { margin-left: auto; color: var(--a-text-3); }
.app-foot > span:not(.r) { flex: 1 1 14em; min-width: 0; }
.ico { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-foot .ico { color: var(--a-green); }
.av {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--a-grey-bg); color: var(--a-text-2); font: 600 11px/1 var(--sans); letter-spacing: .02em;
}
.av.k { background: var(--a-text); color: #fff; }
.t-out, .t-block { --tone: var(--a-red); --tone-bg: var(--a-red-bg); }
.t-warn { --tone: var(--a-amber); --tone-bg: var(--a-amber-bg); }
.t-ctl { --tone: var(--a-text-2); --tone-bg: var(--a-grey-bg); }
.tag {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font: 500 12px/1.4 var(--sans); color: var(--tone, var(--a-text-2)); background: var(--tone-bg, var(--a-grey-bg));
}
.tag.t-block { color: #fff; background: var(--a-red); }
.demo-app { max-width: 860px; margin-inline: auto; font-variant-numeric: tabular-nums; }
.dc-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding: 10px 18px; border-bottom: 1px solid var(--a-line);
}
.rv-title { min-width: 0; }
.rv-title b { display: block; font: 600 15px/1.3 var(--sans); letter-spacing: -.01em; }
.rv-title span { display: block; font-size: 12px; color: var(--a-text-3); }
.rv-prog { display: grid; gap: 6px; justify-items: end; font-size: 12px; color: var(--a-text-2); }
#rv-prog { display: inline-flex; align-items: center; gap: 6px; }
#rv-prog .ico { width: 13px; height: 13px; color: var(--a-amber); }
.rv-prog.ready #rv-prog .ico { color: var(--a-green); }
.pips { display: flex; flex-wrap: wrap; gap: 3px; }
.pips i { width: 20px; height: 5px; border-radius: 99px; background: var(--a-grey-bg); transition: background .3s var(--ease); }
.pips i.ok { background: var(--a-green); }
.pips i.no { background: var(--a-text-3); }
.dc-body { display: flex; flex-direction: column; }
.dc-thread {
  position: relative; flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 20px;
}
.dm { display: grid; min-width: 0; }
.dm .bub.me { max-width: 75%; }
.dm .bub p { margin: 0; }
.dm .bub b { font-weight: 600; }
.dm-col { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.dm-col > * { max-width: min(100%, 580px); }
.dm-card {
  width: 100%; padding: 11px 14px 12px; border: 1px solid var(--a-line); border-radius: 4px 14px 14px;
  font-size: 13.5px; line-height: 1.5;
}
.dm-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dm-card header small { font-size: 12px; color: var(--a-text-3); }
.dm-card header b { margin-left: auto; font-weight: 600; color: var(--tone); white-space: nowrap; }
.dm-card > p { margin: 0; }
.dm-card p b { font-weight: 600; color: var(--tone); }
.dm-card .dm-fix { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--a-line); }
.dm-card .dm-fix b { color: var(--a-text); }
.dm-more { margin-top: 6px; }
.dm-more summary {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; list-style: none;
  font-size: 12.5px; font-weight: 500; color: var(--a-text-2);
}
.dm-more summary::-webkit-details-marker { display: none; }
.dm-more summary::before {
  content: ""; width: 5px; height: 5px; margin-left: 1px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg); transition: transform .2s var(--ease);
}
.dm-more[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }
.dm-more summary:hover { color: var(--a-text); }
.dm-why { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--a-bg-2); font-size: 13px; }
.dm-why p { margin: 0; color: var(--a-text-2); }
.dm-why cite { display: flex; align-items: center; gap: 6px; font: normal 12px/1.4 var(--sans); color: var(--a-text-3); }
.dm-why cite .ico { width: 13px; height: 13px; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0; font-size: 12.5px; line-height: 1.4; }
.kv dt, .kv dd { padding: 4px 0; border-top: 1px solid var(--a-line); }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.kv dt { color: var(--a-text-2); }
.kv dd { margin: 0; padding-left: 16px; text-align: right; font-weight: 500; }
.kv dd.hit { color: var(--tone, var(--a-red)); font-weight: 600; }
.dm-checks { list-style: none; margin: 8px 0 2px; padding: 0; font-size: 12.5px; }
.dm-checks li { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-top: 1px solid var(--a-line); }
.dm-checks li:first-child { border-top: 0; }
.dm-checks i { display: inline-flex; align-items: center; gap: 5px; font-style: normal; color: var(--a-green); }
.dm-checks i .ico { width: 12px; height: 12px; }
.dm-checks b { color: var(--tone); }
.dm-out { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.dm-out li { display: flex; align-items: center; gap: 7px; }
.dm-out li:first-child .ico { color: var(--a-green); }
.dc-reply {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px;
  flex: none; min-height: 56px; padding: 10px 18px; border-top: 1px solid var(--a-line);
}
.dc-reply .why { flex-basis: 100%; text-align: right; font-size: 12.5px; color: var(--a-text-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--a-line); border-radius: 99px;
  background: var(--a-bg); font: 500 13px/1.2 var(--sans); color: var(--a-text); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip:hover { background: var(--a-bg-2); }
.chip.primary { background: var(--a-text); border-color: var(--a-text); color: #fff; }
.chip.primary:hover { background: #000; }
.chip .ico { width: 14px; height: 14px; }
.demo-app .app-foot { padding-block: 7px; }
.bub { padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; min-width: 0; }
.bub.me { justify-self: end; max-width: 85%; background: var(--a-text); color: #fff; border-bottom-right-radius: 4px; }
.bot { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.bot .bub { background: var(--a-bg-2); border-top-left-radius: 4px; }
.bot .bub > p { margin: 0 0 10px; }

/* App-only parts of the workspace: every answer is a form post (no script under the CSP), the
   dismiss reasons unfold from a <details>, and staff mark an approved Finding applied in Talenta. */
.dc-reply form { display: contents; }
.dc-reply details { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.dc-reply details[open] { flex-basis: 100%; }
.dc-reply summary { list-style: none; }
.dc-reply summary::-webkit-details-marker { display: none; }
.dc-reply input[type=text] { width: 10em; padding: 6px 12px; border-radius: 99px; font-size: 13px; }
.dm-apply { display: grid; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--a-line); font-size: 13px; }
.dm-apply p { margin: 0; color: var(--a-text-2); }
.dm-apply .ok { display: inline-flex; align-items: center; gap: 6px; }

/* The agent's chips (KARIB_AGENT): a row of question chips under a card; the two that need a choice unfold from a
   <details>, like the dismiss reasons. The answer sits below in a quieter bubble; a fixed text (refused, unavailable)
   is set in italics so it is not read as the model's. */
.dm-ask { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--a-line); }
.dm-ask form { display: contents; }
.dm-ask details { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dm-ask details[open] { flex-basis: 100%; }
.dm-ask summary { list-style: none; }
.dm-ask summary::-webkit-details-marker { display: none; }
.dm-answer { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--a-bg-2); font-size: 13px; }
.dm-answer small { display: block; margin-bottom: 4px; color: var(--a-text-2); }
.dm-answer p { margin: 0; white-space: pre-line; }
.dm-answer.fixed p { color: var(--a-text-2); font-style: italic; }
