/* Cyber Range: the AI Labs look (big white cards, numbered sections, Lessonsmith greens and gold). */
.cy-brand-icon { font-size: 1.5rem; }
.cy-hero-icon { width: 120px; height: 120px; border-radius: 28px; display: grid; place-items: center; font-size: 4rem; background: rgb(255 255 255 / .14); border: 2px solid rgb(255 255 255 / .3); box-shadow: 0 14px 34px rgb(0 0 0 / .3); }
.cy-lead { font-size: 1.1rem; max-width: 80ch; margin: 0 0 16px; }
.cy-join { display: grid; gap: 8px; max-width: 520px; }
.cy-join-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cy-join-row input { flex: 1 1 200px; min-height: 52px; font-family: var(--font-mono); font-size: 1.4rem; letter-spacing: .12em; text-transform: uppercase; }
.cy-paused, .cy-win { background: #FFF6D6; border: 2px solid var(--chalk); border-radius: 16px; padding: 12px 16px; font-weight: 700; }
.cy-law p { max-width: 90ch; }

/* Mission cards */
.cy-missions { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.cy-mission { display: flex; gap: 14px; align-items: flex-start; text-align: left; font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 20px; padding: 16px; cursor: pointer; min-height: 44px; position: relative; }
.cy-mission:hover { border-color: var(--accent); }
.cy-mission.done { border-color: var(--accent); background: var(--soft); }
.cy-mission-icon { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; background: var(--deep); }
.cy-mission-text { display: grid; gap: 4px; }
.cy-mission-text b { font-family: var(--font-display); font-size: 1.15rem; }
.cy-mission-text > span:last-child { color: var(--muted); }
.cy-mission-kicker { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.cy-done-tag, .cy-try-tag { position: absolute; top: 10px; right: 12px; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.cy-done-tag { background: var(--accent); color: var(--accent-ink); }
.cy-try-tag { background: var(--chalk); color: var(--chalk-ink); }

/* Owner console */
.cy-start { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cy-start .cy-pick, .cy-start .lab-actions, .cy-start .error { grid-column: 1 / -1; }
.cy-level, .cy-pick { border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; margin: 0; min-width: 0; }
.cy-level label, .cy-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.cy-level input, .cy-check input { width: 22px; height: 22px; accent-color: var(--accent); }
#sMissions { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.cy-session { border: 2px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 16px; background: var(--bg); }
.cy-session-head { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.cy-session-head h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.3rem; }
.cy-joinat { margin: 6px 0 0; }

/* A mission */
.cy-back { margin: 0 0 8px; }
.cy-mhead { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.cy-mhead h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0; line-height: 1.1; }
.cy-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cy-steps li { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); font-weight: 700; }
.cy-steps li.done { border-color: var(--accent); }
.cy-steps li.now { border-color: var(--chalk); background: #FFFBEA; box-shadow: 0 0 0 3px rgb(244 200 66 / .35); }
.cy-story { font-size: 1.15rem; max-width: 80ch; }
.cy-tiles { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0; }
.cy-tiles > div { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.cy-tiles span { font-size: 1.6rem; }
.cy-tiles p { margin: 4px 0 0; color: var(--muted); }
.cy-count { font-family: var(--font-mono); color: var(--accent); margin: 0 0 6px; }
.cy-text { font-size: 1.12rem; max-width: 80ch; }
.cy-check { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: 16px 0; }
.cy-check h3 { margin: 0 0 6px; }
.cy-q { font-weight: 700; font-size: 1.1rem; }

/* The layer stack (OSI with TCP/IP alongside) */
.cy-stack { display: grid; gap: 6px; margin: 12px 0; max-width: 720px; }
.cy-layer { display: grid; grid-template-columns: 170px 150px 1fr; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); }
.cy-layer.on { background: var(--soft); border-color: var(--accent); }
.cy-tcpip { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }

/* The range: map and side panel */
.cy-range { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.cy-side-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.cy-side-grid .cy-term-title { margin-top: 0; }
.cy-range > .labs-section { margin-bottom: 0; }
.cy-lens { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cy-lens button { min-height: 44px; }
.cy-lens button[aria-pressed="true"] { background: var(--deep); color: #fff; border-color: var(--chalk); }
.cy-map { border: 1px solid var(--line); border-radius: 18px; background: #F8FCFA; overflow: hidden; }
.cy-map svg { display: block; width: 100%; height: auto; }
.cy-zone rect { fill: #EEF8F2; stroke: #B8E6CF; stroke-width: 2; }
.cy-z-internet rect { fill: #F3F6F5; stroke: #C9D6D1; }
.cy-z-dmz rect { fill: #FFF8E1; stroke: #F4C842; stroke-dasharray: 8 6; }
.cy-z-iot rect { fill: #FFF8E1; stroke: #F4C842; }
.cy-zone text { font: 700 17px var(--font-mono, monospace); fill: #0E4D3E; text-transform: uppercase; letter-spacing: .06em; }
.cy-link line { stroke: #8DB8A7; stroke-width: 3; }
.cy-link.lit line { stroke: #137A5E; stroke-width: 6; }
.cy-link.full line { stroke: #B3261E; stroke-width: 7; stroke-dasharray: 10 6; }
.cy-link-tag { font: 700 14px sans-serif; fill: #B3261E; text-anchor: middle; }
.cy-rel { fill: none; stroke: #C99A0B; stroke-width: 2.5; stroke-dasharray: 6 6; cursor: help; }
.cy-arrow { fill: #C99A0B; }
.cy-node { cursor: pointer; }
.cy-node circle { fill: #fff; stroke: #137A5E; stroke-width: 3; }
.cy-node.glow circle { fill: #E1F4EB; stroke: #0E4D3E; stroke-width: 5; filter: drop-shadow(0 0 8px rgb(45 190 143 / .8)); }
.cy-node.dim { opacity: .3; }
.cy-node.alert circle { stroke: #B3261E; stroke-width: 5; }
.cy-node.isolated circle { stroke-dasharray: 6 5; }
.cy-node.sel circle { stroke: #F4C842; stroke-width: 6; }
.cy-node:focus { outline: none; }
.cy-node:focus circle { stroke: #F4C842; stroke-width: 7; }
.cy-icon { font-size: 30px; text-anchor: middle; }
.cy-name { font: 700 17px sans-serif; fill: #10211C; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.cy-addr { font: 600 14px monospace; fill: #0E4D3E; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.cy-badge { font: 700 15px sans-serif; fill: #8A1C14; text-anchor: middle; paint-order: stroke; stroke: #FFF6D6; stroke-width: 5px; }
.cy-packet { fill: #F4C842; stroke: #0E4D3E; stroke-width: 2; }
.cy-trail { fill: none; stroke: #F4C842; stroke-width: 8; opacity: .8; }
.cy-lensnote { margin: 10px 0 0; }
.cy-dev { margin-top: 14px; border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; background: var(--bg); }
.cy-dev h3 { margin: 0 0 6px; font-family: var(--font-display); }
.cy-dev-facts { font-family: var(--font-mono); font-size: .9rem; color: var(--deep); }
.cy-dev-alert { font-weight: 700; color: #8A1C14; }
.cy-dev-cmds { display: flex; flex-wrap: wrap; gap: 6px; }

/* Tasks and terminal */
.cy-tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cy-tasks li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.cy-tasks li p { margin: 0; font-weight: 600; }
.cy-tasks li.now { border-color: var(--chalk); background: #FFFBEA; }
.cy-tasks li.done { border-color: var(--accent); background: var(--soft); }
.cy-tasks li.done p { color: var(--muted); }
.cy-tasks .rv-stuck { margin-top: 6px; }
.cy-tick { font-size: 1.2rem; }
.cy-term-title { margin: 18px 0 6px; }
.cy-term { background: #0B2A22; color: #DDF3EA; font: 14px/1.5 var(--font-mono, monospace); border-radius: 14px; padding: 12px 14px; height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.cy-term .cy-in { color: #F4C842; font-weight: 700; margin-top: 6px; }
.cy-term .cy-err { color: #FFB4A9; }
.cy-term .cy-dim { color: #9FC7B8; }
.cy-prompt { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.cy-ps { font-family: var(--font-mono); font-weight: 700; color: var(--deep); white-space: nowrap; }
.cy-prompt input { flex: 1; min-width: 0; min-height: 48px; font-family: var(--font-mono); font-size: 1.05rem; }
.cy-cmds, .cy-answer { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; background: var(--bg); }
.cy-cmds summary, .cy-answer summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.cy-cmds ul { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.cy-cmds button { font-family: var(--font-mono); }
.cy-answer { border-color: var(--chalk); background: #FFFBEA; }

/* Debrief */
.cy-medal { font-size: 1.4rem; }
.cy-medal span { font-size: 2.4rem; vertical-align: middle; }
.cy-exam { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; background: var(--bg); }
.cy-exam summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.cy-lawline { background: #FFF6D6; border: 2px solid var(--chalk); border-radius: 14px; padding: 10px 14px; }

@media (max-width: 1000px) { .cy-side-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) {
  .cy-start, .cy-tiles, .cy-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cy-layer { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 520px) { .cy-start, .cy-tiles, .cy-steps { grid-template-columns: minmax(0, 1fr); } }

/* The class code and the pupils table (the same look as Revision Forge's teacher page). */
.cy .rv-code-box { display: grid; justify-items: center; background: var(--deep); color: #FFFFFF; border-radius: 20px; padding: 14px 22px; border-bottom: 6px solid var(--chalk); }
.cy .rv-code-box .fine { color: #DDF3EA; }
.cy .rv-code-box b { font-family: var(--font-mono); font-size: clamp(2rem, 5vw, 3rem); letter-spacing: .12em; }
.cy .rv-table-wrap { overflow-x: auto; }
.cy .rv-table { width: 100%; border-collapse: collapse; }
.cy .rv-table th, .cy .rv-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cy .rv-table thead th { font-size: .9rem; color: var(--muted); }
@media (max-width: 600px) {
  .cy .rv-table thead { display: none; }
  .cy .rv-table, .cy .rv-table tbody, .cy .rv-table tr, .cy .rv-table th, .cy .rv-table td { display: block; }
  .cy .rv-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
  .cy .rv-table th, .cy .rv-table td { border: 0; padding: 2px 4px; }
}
