/* Styles only this website needs. The shared look is kit/kit.css; this file uses its tokens only. */

/* Dark mode: lighter green, red and amber so text in those colours stays readable on the dark background. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --good: #4ade80; --bad: #f87171; --warn: #fbbf24; }
}

/* placeholders that replaced personal data, and personal data that is still there */
mark.ph { background: var(--good-soft); color: var(--good); border-radius: 4px; padding: 0 3px; font-weight: 600; }
mark.leak { background: var(--bad-soft); color: var(--bad); border-radius: 4px; padding: 0 3px; font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 40%, transparent); }

/* A saved run: one white card, the messages inside it as plain rows with a line between them. */
.w9-run { border: 1px solid var(--edge); border-radius: 12px; padding: 0 16px; margin: 12px 0; background: var(--bg); }
.w9-run .k-msg { margin: 0; padding: 11px 0 12px; border: 0; border-radius: 0; border-bottom: 1px solid var(--edge); background: none; box-shadow: none; }
.w9-run .k-msg:last-child { border-bottom: 0; }
.w9-run .k-msg .who { margin-bottom: 3px; text-transform: uppercase; }
.w9-run .k-msg .body { overflow-wrap: anywhere; }
.w9-run .k-msg.assistant .who { color: var(--accent); }
.w9-run .k-msg.call .who { color: var(--accent); }
.w9-run .k-msg.call .body, .w9-run .k-msg.tool .body { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.w9-run .k-msg.tool .body { color: var(--muted); }
.w9-run .k-msg.tool.err .who, .w9-run .k-msg.tool.err .body { color: var(--bad); }

/* the pipeline on the start screen */
.w9-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
@media (max-width: 560px) { .w9-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.w9-flow li { border: 1px solid var(--edge); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.w9-flow li b { display: block; font: 500 26px/1.15 var(--head); color: var(--ink); margin: 4px 0 2px; overflow-wrap: anywhere; }
.w9-flow li span { font-size: 13px; line-height: 1.45; color: var(--muted); display: block; }
.w9-flow li small { font: 600 11px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* Choices in the try boxes: each case a card; the run inside it is not a second card. */
.w9-cases { display: grid; gap: 14px; margin: 12px 0; }
.w9-case { border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px; background: var(--panel-2); }
.w9-case h4 { margin: 0 0 6px; font: 600 15px/1.3 var(--body); }
.w9-case h4 code { font-weight: 400; }
.w9-case .w9-run { border: 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); border-radius: 0; padding: 0; margin: 8px 0; background: none; }
.w9-verdict { margin-top: 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: 15px; }
.w9-verdict:empty { display: none; }
.w9-verdict b { font-weight: 600; }

.w9-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.w9-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.w9-two .k-code { margin: 0; }
@media (max-width: 760px) { .w9-two { grid-template-columns: minmax(0, 1fr); } }
.w9-small { font-size: 14px; color: var(--muted); }

/* Open-and-close boxes: a quieter summary line than the kit's default. */
details.k-more summary { font-weight: 600; font-size: 14.5px; }
details.k-more[open] > summary { margin-bottom: 8px; }

a.k-btn { text-decoration: none; display: inline-block; }
.k-files.w9-filelist li { flex-wrap: wrap; }
.k-files.w9-filelist li span { flex: 1 1 220px; }
.k-table code { white-space: nowrap; background: none; padding: 0; font-size: 12.5px; }
.k-table td b { font-weight: 600; }

/* A try box's intro ends with a paragraph the kit sets to margin 0: keep a gap before the first field. */
.k-try > div:first-child > :last-child { margin-bottom: 16px; }

/* guide shape: a folded routine tool result, the "You are done when" line, the choice buttons of a box */
.w9-run details.w9-fold > summary { cursor: pointer; font-size: 13.5px; color: var(--muted); list-style-position: inside; }
.w9-run details.w9-fold > summary .who { display: inline; margin-right: 6px; }
.w9-run details.w9-fold[open] > summary { margin-bottom: 6px; }
.w9-done { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--edge)); }
.w9-choice { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.w9-choice button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.w9-verdict p { margin: 0; }
.k-sec.you ol > li, .k-sec.note ul > li { margin-bottom: 6px; }
.k-files.w9-filelist li b { flex: 0 0 auto; }
