:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172333;
  background: #fff;
  --line: #dce3eb;
  --soft: #f6f8fb;
  --muted: #617084;
  --accent: #204875;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 15px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid #274c76; background: #274c76; color: #fff; border-radius: 6px; padding: 10px 15px; font-weight: 650; }
button:hover { background: #193959; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus, textarea:focus { outline: 3px solid #9ec6f0; outline-offset: 2px; }
a { color: var(--accent); }
h1 { font-size: clamp(27px, 3vw, 33px); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 13px; }
h2 { font-size: 19px; line-height: 1.3; margin: 28px 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 8px 0 14px; }
label { display: block; font-weight: 650; margin: 17px 0 6px; }
input, textarea { border: 1px solid #aab8c7; border-radius: 6px; background: #fff; color: #172333; padding: 11px 12px; width: 100%; }
textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
textarea::placeholder { color: #7e8a98; }
small { font-size: 12px; }
.topbar { min-height: 62px; padding: 12px 25px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.topbar strong { font-size: 17px; letter-spacing: -.015em; }
.topbar span { color: var(--muted); margin-left: 11px; font-size: 13px; }
.topbar #identity { margin-left: 0; }
.register { max-width: 520px; margin: min(16vh, 130px) auto 0; padding: 0 22px; }
.register > p { color: #45566a; font-size: 16px; }
.register form { margin-top: 30px; }
.register button { margin-top: 14px; }
.workspace { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - 62px); }
.sidebar { border-right: 1px solid var(--line); padding: 23px 13px; background: #fbfcfe; }
.side-title { color: #738194; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; margin: 0 12px 13px; }
.task-link { display: block; width: 100%; padding: 11px 12px; margin: 2px 0; border: 0; border-radius: 6px; text-align: left; background: transparent; color: #27384c; font-weight: 550; }
.task-link:hover { background: #eef2f6; color: #172333; }
.task-link.active { background: #e7eff9; color: #163e6b; font-weight: 700; }
.task-link small { display: block; margin-top: 3px; color: #6c7988; font-weight: 400; white-space: normal; }
.overview-link { margin-bottom: 15px; }
main { width: min(100%, 1010px); padding: 33px 43px 75px; }
.eyebrow { color: #6a788b; font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 7px; }
.lede { max-width: 850px; color: #334357; font-size: 16px; line-height: 1.58; margin: 12px 0 19px; }
.muted { color: var(--muted); font-size: 13px; font-weight: 400; }
.focus-label { color: var(--muted); font-size: 13px; margin: -3px 0 15px; }
.back-link { color: var(--accent); border: 0; background: transparent; padding: 0; margin: 0 0 20px; font-weight: 600; }
.back-link:hover { color: #102d4c; background: transparent; text-decoration: underline; }
.overview-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 27px 0 31px; }
.overview-steps > div { padding: 17px 17px 15px; border-right: 1px solid var(--line); }
.overview-steps > div:last-child { border-right: 0; }
.overview-steps span { display: inline-grid; place-items: center; height: 22px; width: 22px; border-radius: 50%; color: #fff; background: var(--accent); font-size: 12px; font-weight: 750; margin-right: 7px; }
.overview-steps strong { font-size: 14px; }
.overview-steps p { color: #536174; font-size: 13px; margin: 8px 0 0; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.case-card { min-height: 112px; width: 100%; text-align: left; color: #172333; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 15px 17px; }
.case-card:hover { color: #172333; background: #f8fbff; border-color: #94afd0; }
.case-card small, .case-card strong, .case-card span { display: block; }
.case-card small { color: #69788c; font-weight: 700; letter-spacing: .04em; }
.case-card strong { font-size: 17px; margin: 6px 0; }
.case-card span { color: #627286; font-size: 12px; font-weight: 500; }
.mission { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 17px 0 14px; }
.mission > div { padding: 13px 15px; min-height: 72px; }
.mission > div:nth-child(odd) { border-right: 1px solid var(--line); }
.mission > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.mission span { display: block; color: #66768b; font-size: 10px; font-weight: 750; letter-spacing: .08em; margin-bottom: 4px; }
.mission strong { display: block; font-size: 14px; line-height: 1.42; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #45586e; font-size: 12px; margin: 13px 0 20px; }
.flow span { background: #eff3f8; padding: 5px 9px; border-radius: 4px; }
.flow b { color: #8a98a8; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card, .notice-box, .board, .account-list { border: 1px solid var(--line); border-radius: 7px; padding: 15px 17px; margin: 0 0 18px; }
.card { min-height: 100px; }
.card strong, .card span, .card small { display: block; }
.card strong { font-size: 13px; }
.card span { margin: 7px 0 3px; }
.card small { color: var(--muted); }
.notice-box { background: var(--soft); }
.notice-box strong { font-size: 13px; }
.notice-box p { margin: 6px 0 0; }
.field-note { color: #647286; font-size: 13px; margin: 6px 0 0; }
.board { padding-bottom: 8px; }
.board h3 { margin-bottom: 2px; }
.board .field-note { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; border-top: 1px solid var(--line); padding: 9px 10px 9px 0; vertical-align: top; }
th { color: #617084; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 14px 0 22px; }
.run-status { color: #53657b; font-size: 13px; }
.account-list { margin-top: 16px; background: #fcfdff; }
.account-list h3 { margin-bottom: 8px; }
#requests { color: #53657b; font-size: 13px; }
.request-item { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; border-top: 1px solid var(--line); padding: 9px 0; }
.request-item strong { color: #172333; font-size: 13px; }
.request-item small { color: #617084; }
.output { white-space: pre-wrap; overflow-wrap: anywhere; background: #f7f9fb; border: 1px solid #e4eaf1; border-radius: 5px; padding: 11px 13px; margin: 0; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.output.tall { max-height: 320px; overflow: auto; }
#selected-run { scroll-margin-top: 18px; }
.result-heading { display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--line); margin-top: 27px; }
.result-heading h2 { margin-top: 22px; }
.result { border: 1px solid #adc0d5; border-radius: 8px; padding: 5px 18px 8px; background: #fbfdff; }
.evidence { padding: 14px 0; border-bottom: 1px solid var(--line); }
.evidence:last-of-type { border-bottom: 0; }
.evidence h3 { color: #40546d; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.evidence-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.teacher-link { display: inline-block; margin: 9px 0 15px; border-radius: 5px; background: #274c76; color: white; text-decoration: none; padding: 10px 13px; font-weight: 650; }
.teacher-link:hover { background: #193959; }
details { margin: 13px 0; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
details pre { margin-top: 10px !important; }
.history { margin-top: 25px; }
.history h2 { font-size: 15px; margin-bottom: 9px; }
.attempt-button { color: #334d68; background: white; border: 1px solid var(--line); font-weight: 500; font-size: 12px; padding: 7px 10px; margin: 0 7px 7px 0; }
.attempt-button:hover, .attempt-button.selected { color: #193959; background: #eaf1f9; border-color: #b9cde4; }
#notice { position: fixed; bottom: 16px; right: 16px; max-width: 420px; background: #25364c; color: white; border-radius: 6px; padding: 11px 14px; box-shadow: 0 7px 22px #0002; display: none; z-index: 5; }
@media (max-width: 830px) {
  .workspace { grid-template-columns: 205px minmax(0, 1fr); }
  main { padding: 26px 25px 60px; }
}
@media (max-width: 680px) {
  .topbar { padding: 11px 16px; }
  .topbar span { display: none; }
  .workspace { display: block; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; overflow-x: auto; white-space: nowrap; }
  .side-title, .task-link small { display: none; }
  #task-list { display: flex; gap: 3px; }
  .task-link { width: auto; flex: 0 0 auto; padding: 8px 10px; }
  .overview-link { margin: 2px 7px 2px 0; }
  main { padding: 24px 17px 55px; }
  .overview-steps, .case-grid, .grid { grid-template-columns: 1fr; }
  .overview-steps > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .overview-steps > div:last-child { border-bottom: 0; }
  .mission { grid-template-columns: 1fr; }
  .mission > div { border-right: 0 !important; border-bottom: 1px solid var(--line); min-height: 0; }
  .mission > div:last-child { border-bottom: 0; }
}
