/* Tech Interview — builds on /css/style.css and the shared page chrome in /algo-games/algo-games.css. */

.ti-note { margin: 6px 0 0; font-size: 0.85rem; }
.ti-subhead { font-size: 1rem; margin: 14px 0 6px; }

/* ---- Segmented pill control (mode, difficulty, classify labels): native radios, styled as one pill group. ---- */
.ti-seg-field { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.ti-seg-field legend { font-weight: 700; font-size: 0.85rem; color: var(--graphite); padding: 0; margin-bottom: 6px; }
.ti-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ti-seg label { margin: 0; position: relative; }
.ti-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ti-seg span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px;
  font: 700 0.9rem "Baloo 2", system-ui, sans-serif; color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; cursor: pointer;
}
.ti-seg input:checked + span { background: var(--ink); color: var(--yellow); }
.ti-seg input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
.ti-seg input:disabled + span { cursor: default; opacity: 0.75; }
.ti-seg-small span { min-height: 34px; padding: 4px 12px; font-size: 0.82rem; }

.ti-setup h2 { margin: 0; }
.ti-setup-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; margin-top: 14px; }
.ti-setup-row select { width: auto; min-width: 180px; }
.ti-setup-row .checkline { margin: 0 0 12px; }

/* ---- Landing ---- */
.ti-card .ag-chips + .ag-chips { margin-top: 6px; }
.ti-topics .ag-chip { background: #fff; }
.ti-card .btn, .ti-empty { margin-top: auto; padding-top: 0; }
.ti-card .ag-chips:last-of-type { margin-bottom: 14px; }
.ti-recs h2 { margin: 0 0 6px; }
.ti-rec-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.ti-rec-list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ti-rec-list p { margin: 2px 0 0; }
.ti-rec-list .btn { flex-shrink: 0; }
.ti-recent { margin: 4px 0 0; padding-left: 20px; font-size: 0.9rem; }

/* ---- Question ---- */
.ti-status { margin: 0; }
.ti-question { background: #fff; }
.ti-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 800; color: var(--graphite); margin: 0 0 8px; }
.ti-scenario { background: var(--paper); border-left: 5px solid var(--yellow); border-radius: 0 10px 10px 0; padding: 4px 14px; }
.ti-scenario p { margin: 8px 0; line-height: 1.55; white-space: pre-line; }
.ti-table-wrap { margin: 12px 0; }
.ti-table { background: #fff; }
.ti-table caption { text-align: left; font: 800 0.85rem ui-monospace, Menlo, monospace; padding-bottom: 4px; }
.ti-table td { text-align: left; }
.ti-table td.ti-null { color: var(--graphite); font-style: italic; }
.ti-code { font-size: 0.85rem; }
.ti-prompt { font-family: "Baloo 2", system-ui, sans-serif; font-size: clamp(1.1rem, 3.4vw, 1.35rem); line-height: 1.3; margin: 16px 0 10px; }
.ti-prompt:focus { outline: none; }
.ti-prompt:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

.ti-options { display: grid; gap: 8px; }
.ti-option {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px;
  font-weight: 600; font-size: 0.95rem; color: var(--ink); line-height: 1.4;
  background: #fff; border: 2px solid var(--ink); border-radius: 12px; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.ti-option input { margin: 3px 0 0; accent-color: var(--coral); width: 18px; height: 18px; flex-shrink: 0; }
.ti-option-key { font: 800 0.8rem/1 "Baloo 2", sans-serif; background: var(--paper-dark); border: 1.5px solid var(--ink); border-radius: 6px; padding: 4px 6px; flex-shrink: 0; }
.ti-option:has(input:checked) { background: #fff8e3; border-color: var(--ink); box-shadow: 3px 3px 0 var(--coral); }
.ti-option:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }
.ti-option:has(input:disabled) { cursor: default; }
.ti-option.is-correct { background: #d8f3ee; border-color: var(--teal-dark); box-shadow: 3px 3px 0 var(--teal-dark); }
.ti-option.is-wrong { background: #ffe9ea; border-color: var(--coral-dark); }
.ti-option.is-correct .ti-option-text::after { content: " ✓"; color: var(--teal-dark); font-weight: 800; }
.ti-option.is-wrong .ti-option-text::after { content: " ✗"; color: var(--coral-dark); font-weight: 800; }

.ti-numeric-row { display: flex; align-items: center; gap: 8px; max-width: 320px; }
.ti-numeric-row .ti-unit { font-weight: 700; color: var(--graphite); }
.ti-answer label { margin-top: 0; }
.ti-answer input.is-correct, .ti-answer input.is-correct:focus { border-color: var(--teal-dark); background: #e6f7f4; }
.ti-answer input.is-wrong { border-color: var(--coral-dark); background: #ffe9ea; }
.ti-answer input[type=text]:disabled { opacity: 0.85; }

.ti-statements { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: statement; }
.ti-statement { counter-increment: statement; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.ti-statement-text { margin: 0 0 8px; font-weight: 600; line-height: 1.45; }
.ti-statement-text::before { content: counter(statement) ". "; font-weight: 800; }
.ti-statement.is-correct { border-color: var(--teal); background: #f1fbf9; }
.ti-statement.is-wrong { border-color: var(--coral); background: #fff4f4; }
.ti-reveal { margin: 6px 0 0; font-weight: 800; color: var(--teal-dark); font-size: 0.88rem; }

.ti-blanks { display: grid; gap: 10px; max-width: 420px; }
.ti-blank-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; }
.ti-textarea { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; color: var(--ink); resize: vertical; }

.ti-actions { margin-top: 16px; }
.ti-hints { margin: 12px 0 0; padding-left: 22px; }
.ti-hints:empty { display: none; }
.ti-hints li { background: #fff8e3; border: 1.5px dashed var(--ink); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.ti-solution h2 { margin: 0 0 8px; }
.ti-solution, .ti-review-item { line-height: 1.55; }
.ti-answer-line ul { margin: 4px 0 0; padding-left: 20px; }
.ti-rubric { list-style: none; padding: 0; margin: 0 0 12px; }
.ti-rubric .checkline { align-items: flex-start; }
.ti-end { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }

/* ---- Results ---- */
.ti-results-title { font-size: clamp(2rem, 8vw, 3rem); }
.ti-score { margin: 6px 0; }
.ti-score-value { font: 800 clamp(3rem, 14vw, 4.5rem)/1 "Baloo 2", sans-serif; color: var(--coral); }
.ti-score-label { font: 800 1.2rem "Baloo 2", sans-serif; }
.ti-best { display: inline-block; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 800; }
.ti-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; }
.ti-stats div { background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 6px 12px; min-width: 96px; }
.ti-stats dt { font-size: 0.72rem; font-weight: 800; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.8px; }
.ti-stats dd { margin: 0; font: 800 1.3rem "Baloo 2", sans-serif; }
.ti-topic-bars li { grid-template-columns: minmax(160px, 260px) 1fr; }
.ti-strengths { margin-top: 14px; }
.ti-strengths ul { margin: 0; padding-left: 20px; }
.ti-review { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.ti-review-item { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.ti-review-item summary { cursor: pointer; font-weight: 700; }
.ti-review-item.is-incorrect, .ti-review-item.is-skipped { border-color: var(--coral); }
.ti-review-item.is-partial { border-color: var(--yellow); }
.ti-review-item.is-correct { border-color: var(--teal); }

@media (max-width: 560px) {
  .ti-rec-list li { flex-direction: column; align-items: stretch; }
  .ti-topic-bars li { grid-template-columns: 1fr; }
  .ti-setup-row select { width: 100%; }
  .ti-end { justify-content: center; }
  .ti-actions .btn { flex: 1 1 auto; }
}
