/* Styles only this website needs. The shared look is kit/kit.css; this file uses its tokens only.
   The lighter accent for dark mode is in site.json (accentDark).
   Nesting: a part (example / you / try) is a tinted card; inside it, one level of cards (.w8-card, .w8-round). */

.w8-small { font-size: 14px; color: var(--muted); }
.w8-label { margin: 16px 0 4px; font-weight: 600; font-size: 14.5px; }
.w8-label .k-tag { margin-right: 4px; }
.w8-label code { font-weight: 500; }

/* a sentence quoted from the agent's data: an error text, a harness message, a prompt line */
.w8-quote { margin: 8px 0 14px; padding: 10px 14px; border-left: 3px solid var(--edge-strong); border-radius: 0 10px 10px 0; background: var(--bg); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }

/* two things side by side: two definitions, two error texts */
.w8-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 10px 0 14px; align-items: stretch; }
.w8-card { border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px; background: var(--bg); min-width: 0; }
.w8-card h4 { margin: 0 0 8px; font: 600 14px/1.35 var(--body); letter-spacing: 0; color: var(--ink); }
.w8-card .k-code { margin: 0; }
.w8-card .w8-quote { margin: 0; border-left: 0; padding: 0; background: none; }
.k-sec.try .w8-card { background: var(--panel-2); margin: 0 0 12px; }
.k-sec.try .w8-card .k-msg { background: var(--bg); margin: 0; }

/* the end-state box: the rule that applies, and the three choices */
.w8-rule { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); font-size: 15px; }
.w8-choice { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.w8-choice button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.w8-pick .k-out p { margin: 12px 0 0; }

/* one round of the loop in the live box: a card, everything inside it flat */
.w8-round { border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px; margin: 14px 0; background: var(--panel-2); }
.w8-round-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.w8-round-head b { font-weight: 600; font-size: 15px; }
.w8-round-head span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.w8-round details.k-more { background: none; border: 0; border-radius: 0; padding: 0; margin: 6px 0 10px; }
.w8-round .k-code { margin: 6px 0 10px; }
.w8-round .k-code:last-child { margin-bottom: 0; }
.w8-round .k-msg { margin: 6px 0 0; background: var(--bg); }
.w8-status { color: var(--muted); font-size: 14px; font-weight: 500; }
.w8-end { margin-top: 14px; font-weight: 500; }

/* the approval gate: the one place the page waits for the student */
.w8-gate { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--edge)); border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: var(--accent-soft); }
.w8-gate p { margin: 0 0 10px; }
.w8-gate p code { background: none; padding: 0; overflow-wrap: anywhere; }

/* the guide shape: the "you are done when" line, list spacing, the mistakes card */
.w8-done-when { 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)); }
.k-sec ol > li, .k-sec ul > li { margin-bottom: 6px; }
.k-sec.note { background: var(--warn-soft); }
.k-sec .k-msg { margin: 8px 0; }
.k-try > div:first-child { margin-bottom: 16px; }
.k-try > div:first-child .k-msg { background: var(--panel-2); }

/* long data behind "Show …": the block scrolls inside itself instead of making the page long */
details.k-more .k-code pre { max-height: 420px; }
details.k-more summary { font-weight: 600; font-size: 14.5px; }
details.k-more[open] > summary { margin-bottom: 8px; }

.w8-file { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.w8-file b { font-weight: 600; }
.w8-file span { font-size: 14px; color: var(--muted); }
.k-files li { flex-wrap: wrap; }

/* Tables of traces and runs: code reads as plain monospace, tags stay on one line. */
.k-table td code { background: none; padding: 0; border-radius: 0; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.k-table .k-tag { white-space: nowrap; font-size: 11.5px; }
.k-table td b { font-weight: 600; }
.w8-tools td:first-child code { white-space: nowrap; font-size: 13px; }

/* Phones: the text column of a trace keeps a readable width and the table scrolls sideways instead. */
@media (max-width: 600px) {
  .k-table td:last-child { min-width: 15em; }
}
