.exam-page{
  background:#f8fcfa;
}

.exam-hero{
  padding:46px 0 34px;
  background:
    linear-gradient(125deg,#fbfdfc,#eef8f3);
  border-bottom:1px solid #dce9e3;
}

.exam-hero h1{
  margin:0 0 14px;
  font-size:clamp(34px,5vw,58px);
  line-height:1.03;
  letter-spacing:-2px;
}

.exam-hero h1 span{
  color:var(--green);
}

.exam-hero p{
  margin:0;
  max-width:800px;
  color:#5d7169;
  font-size:17px;
  line-height:1.6;
}

.exam-stats{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
}

.exam-stats span{
  padding:9px 12px;
  background:#fff;
  border:1px solid var(--line);
  font:800 12px ui-monospace,monospace;
}

.exam-stats b{
  color:var(--green);
}

.exam-main{
  padding:32px 0 70px;
}

.exam-warning{
  padding:14px 16px;
  margin-bottom:20px;
  background:#fff8e9;
  border-left:4px solid #d69a1d;
  color:#6e5b2d;
  line-height:1.55;
}

.exam-shell{
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  gap:20px;
}

.exam-side{
  position:sticky;
  top:96px;
  height:max-content;
}

.exam-sidebox{
  background:#fff;
  border:1px solid var(--line);
  padding:16px;
  margin-bottom:14px;
}

.exam-sidebox h3{
  margin:0 0 12px;
  font-size:15px;
}

.exam-timer{
  font:900 27px ui-monospace,monospace;
  color:var(--ink);
}

.exam-timer.danger{
  color:var(--red);
}

.exam-small{
  margin-top:7px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.exam-progress{
  height:8px;
  margin-top:11px;
  background:#e7efeb;
  overflow:hidden;
}

.exam-progress i{
  display:block;
  height:100%;
  width:0;
  background:var(--green);
}

.exam-nav{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
}

.exam-nav button{
  height:38px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  font-weight:900;
  cursor:pointer;
}

.exam-nav button:hover{
  border-color:var(--green);
}

.exam-nav button.active{
  background:var(--green);
  color:#fff;
  border-color:var(--green);
}

.exam-nav button.answered:not(.active){
  background:#e9f7f0;
  border-color:#9dcbb6;
}

.exam-nav button.partial:not(.active){
  background:#fff8e7;
  border-color:#e5c672;
}

.exam-panel{
  min-width:0;
}

.exam-question{
  background:#fff;
  border:1px solid var(--line);
  padding:28px;
}

.exam-qtop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:20px;
}

.exam-qnum{
  font:900 13px ui-monospace,monospace;
  color:var(--green);
}

.exam-qpoints{
  font:800 11px ui-monospace,monospace;
  color:#65776f;
  background:#f1f7f4;
  padding:6px 8px;
}

.exam-question h2{
  margin:0 0 17px;
  font-size:26px;
  letter-spacing:-.7px;
}

.exam-task{
  color:#354f46;
  line-height:1.7;
  font-size:16px;
}

.exam-task p{
  margin:10px 0;
}

.exam-task table{
  width:100%;
  border-collapse:collapse;
  margin:16px 0;
  background:#fff;
}

.exam-task th,
.exam-task td{
  padding:9px;
  border:1px solid #bbd0c7;
  text-align:center;
}

.exam-task th{
  background:#f1f7f4;
}

.exam-task pre{
  padding:15px;
  overflow:auto;
  background:#f4f8f6;
  border:1px solid #d6e4de;
  font:14px/1.55 ui-monospace,monospace;
  white-space:pre-wrap;
}

.exam-answer-block{
  margin-top:22px;
  padding-top:19px;
  border-top:1px solid #e0ebe6;
}

.exam-field{
  margin:0 0 15px;
}

.exam-field label{
  display:block;
  margin-bottom:7px;
  font-weight:800;
  font-size:14px;
}

.exam-field input{
  width:100%;
  padding:13px 14px;
  border:1px solid var(--line);
  background:#fff;
  outline:none;
  font-size:16px;
}

.exam-field input:focus{
  border-color:var(--green);
  box-shadow:0 0 0 3px rgba(7,134,82,.08);
}

.exam-actions{
  display:flex;
  gap:10px;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:18px;
}

.exam-action{
  border:0;
  padding:12px 16px;
  background:var(--green);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

.exam-action.secondary{
  background:#fff;
  color:var(--green);
  border:1px solid var(--green);
}

.exam-action.danger{
  width:100%;
  margin-top:10px;
  background:var(--red);
}

.exam-action:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.result-head{
  background:#fff;
  border:1px solid var(--line);
  padding:28px;
  margin-bottom:18px;
}

.result-head h2{
  margin:0 0 16px;
  font-size:34px;
}

.result-score{
  font:900 clamp(42px,8vw,78px) ui-monospace,monospace;
  color:var(--green);
  line-height:1;
}

.result-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.result-meta span{
  border:1px solid var(--line);
  padding:9px 11px;
  background:#f8fcfa;
  font-weight:800;
  font-size:13px;
}

.review{
  display:grid;
  gap:12px;
}

.review-card{
  background:#fff;
  border:1px solid var(--line);
  padding:19px;
}

.review-card.good{
  border-left:5px solid var(--green);
}

.review-card.bad{
  border-left:5px solid var(--red);
}

.review-card h3{
  margin:0 0 10px;
}

.review-line{
  margin:7px 0;
  color:#52675f;
  line-height:1.5;
}

.review-answer{
  font-family:ui-monospace,monospace;
  font-weight:800;
  color:var(--ink);
}

.review-explain{
  margin-top:11px;
  padding-top:11px;
  border-top:1px solid #e1ebe7;
  color:#52675f;
  line-height:1.55;
}

.result-buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
}

.exam-loading{
  padding:30px;
  background:#fff;
  border:1px solid var(--line);
}

@media(max-width:850px){
  .exam-shell{
    grid-template-columns:1fr;
  }

  .exam-side{
    position:static;
  }

  .exam-nav{
    grid-template-columns:repeat(8,1fr);
  }
}

@media(max-width:580px){
  .exam-nav{
    grid-template-columns:repeat(4,1fr);
  }

  .exam-question,
  .result-head{
    padding:19px;
  }

  .exam-question h2{
    font-size:23px;
  }

  .exam-task{
    font-size:15px;
  }

  .exam-task table{
    font-size:12px;
  }
}

/* OGE QUESTION 9 GRAPH V1 */

.oge-graph-wrap{
  width:100%;
  margin:22px 0;
  padding:14px;
  overflow:hidden;
  background:#fbfdfc;
  border:1px solid #c9dcd4;
}

.oge-graph{
  display:block;
  width:min(100%,760px);
  height:auto;
  margin:0 auto;
}

.oge-graph .graph-edges line{
  fill:none;
  stroke:#b26b14;
  stroke-width:3;
  stroke-linecap:round;
  marker-end:url(#arrow-q9);
}

.oge-graph marker path{
  fill:#b26b14;
}

.oge-graph .graph-nodes circle{
  fill:#fff;
  stroke:#078652;
  stroke-width:3;
}

.oge-graph .graph-nodes text{
  fill:#102f27;
  font-family:Arial,Helvetica,sans-serif;
  font-size:18px;
  font-weight:900;
  text-anchor:middle;
  dominant-baseline:central;
  pointer-events:none;
}

@media(max-width:580px){
  .oge-graph-wrap{
    padding:6px;
  }

  .oge-graph .graph-edges line{
    stroke-width:3.5;
  }

  .oge-graph .graph-nodes circle{
    stroke-width:3.5;
  }
}

/* ==========================================================
   QUESTION 15 — KUMIR ROBOT
   ========================================================== */

.kumir-intro{
  padding:17px 18px;
  margin:15px 0 22px;
  background:#f7fbf9;
  border:1px solid #cadfd6;
}

.kumir-commands{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:11px 0 17px;
}

.kumir-commands code{
  padding:7px 9px;
  background:#edf7f2;
  border:1px solid #c4ddd2;
  color:#075f3c;
  font:700 13px ui-monospace,monospace;
}

.robot-board-wrap{
  margin:20px 0;
  padding:12px;
  background:#fff;
  border:1px solid #bfd5cb;
  overflow:auto;
}

.robot-board{
  display:block;
  width:min(100%,760px);
  height:auto;
  margin:auto;
}

.robot-wall{
  stroke:#26342f;
  stroke-width:7;
  stroke-linecap:square;
}

.robot-gap-arrow{
  fill:none;
  stroke:#df252d;
  stroke-width:2;
}

.robot-caption{
  fill:#62766e;
  font:700 12px Arial,Helvetica,sans-serif;
  text-anchor:middle;
}

.robot-body{
  fill:#078652;
  stroke:#075c3b;
  stroke-width:2;
}

.robot-letter{
  fill:#fff;
  font:900 20px Arial,Helvetica,sans-serif;
  text-anchor:middle;
  dominant-baseline:central;
}

.robot-task-box{
  padding:17px 18px;
  margin:20px 0;
  background:#fff8e9;
  border-left:4px solid #d69a1d;
  line-height:1.65;
}

.robot-task-box p:last-child{
  margin-bottom:0;
}

.kumir-example{
  margin:20px 0;
  border:1px solid #bfd5cb;
  background:#f5faf7;
}

.kumir-example-title{
  padding:9px 12px;
  background:#e8f5ef;
  color:#075f3c;
  font-weight:900;
}

.kumir-example pre{
  margin:0;
  padding:15px;
  border:0;
  background:transparent;
}

.exam-code-field{
  margin-top:8px;
}

.exam-code{
  display:block;
  width:100%;
  min-height:390px;
  padding:18px;
  resize:vertical;
  border:1px solid #9ebcaf;
  background:#10241e;
  color:#eaf7f1;
  outline:none;
  tab-size:4;
  font:15px/1.6 Consolas,
       "Courier New",
       ui-monospace,
       monospace;
}

.exam-code:focus{
  border-color:#078652;
  box-shadow:
    0 0 0 3px rgba(7,134,82,.12);
}

.exam-code::placeholder{
  color:#829d92;
}

.exam-code-note{
  padding:9px 11px;
  background:#edf7f2;
  color:#587069;
  font-size:12px;
  line-height:1.45;
}

.review-code-title{
  margin-top:10px;
  font-weight:800;
}

.review-code{
  overflow:auto;
  margin:8px 0 12px;
  padding:14px;
  background:#10241e;
  color:#eaf7f1;
  white-space:pre-wrap;
  font:13px/1.55 Consolas,
       "Courier New",
       monospace;
}

@media(max-width:580px){

  .exam-code{
    min-height:330px;
    padding:13px;
    font-size:14px;
  }

  .robot-board-wrap{
    padding:4px;
  }
}

/* QUESTION 16 — PROGRAMMING */

.program16-task{
  line-height:1.65;
}

.program16-task ul{
  margin:14px 0 18px;
}

.program16-task li{
  margin:7px 0;
}

.program-example{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:22px 0;
}

.program-example-col{
  border:1px solid #c6d9d1;
  background:#f7fbf9;
}

.program-example-col b{
  display:block;
  padding:10px 13px;
  background:#eaf5f0;
  color:#075f3c;
}

.program-example-col pre{
  min-height:110px;
  margin:0;
  padding:15px;
  border:0;
  background:#fff;
  font-size:15px;
}

.program16-note{
  margin:18px 0;
  padding:14px 16px;
  background:#fff8e9;
  border-left:4px solid #d69a1d;
  color:#66562f;
  line-height:1.55;
}

@media(max-width:580px){
  .program-example{
    grid-template-columns:1fr;
  }
}

/* ==========================================================
   QUESTION 13 — TEXT DOCUMENT
   ========================================================== */

.doc13-requirements{
  margin:16px 0 24px;
  padding:17px 19px;
  background:#f7fbf9;
  border:1px solid #c6d9d1;
}

.doc13-requirements h3{
  margin-top:0;
}

.doc13-reference{
  max-width:760px;
  margin:16px auto 25px;
  padding:42px 52px;
  background:#fff;
  border:1px solid #c9d6d1;
  box-shadow:0 8px 24px rgba(0,0,0,.05);
  font-family:"Times New Roman",serif;
  font-size:14pt;
  line-height:1.35;
}

.doc13-reference-text{
  margin:0;
  text-align:justify;
  text-indent:1cm;
}

.doc13-reference table{
  width:70%;
  margin:18pt auto 0;
  border-collapse:collapse;
}

.doc13-reference td{
  padding:5px 8px;
  border:1px solid #222;
  text-align:left;
}

.doc13-help{
  color:#5d7169;
}

.doc13-field{
  margin-top:25px;
}

.doc13-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:9px;
  background:#edf4f1;
  border:1px solid #bcd0c7;
  border-bottom:0;
}

.doc13-toolbar button{
  min-height:34px;
  padding:6px 10px;
  border:1px solid #b6cbc2;
  background:#fff;
  color:#173b30;
  cursor:pointer;
  font-weight:700;
}

.doc13-toolbar button:hover{
  border-color:#078652;
  background:#f0faf5;
}

.doc13-toolbar-sep{
  width:1px;
  background:#b6cbc2;
  margin:2px 3px;
}

.doc13-ruler{
  display:flex;
  gap:15px;
  padding:6px 12px;
  border:1px solid #bcd0c7;
  border-bottom:0;
  background:#fafcfb;
  color:#667970;
  font:700 11px ui-monospace,monospace;
}

.doc13-editor{
  min-height:480px;
  padding:44px 52px;
  overflow:auto;
  outline:none;
  background:#fff;
  border:1px solid #9ebcaf;

  font-family:"Times New Roman",serif;
  font-size:14pt;
  line-height:1.35;
}

.doc13-editor:focus{
  border-color:#078652;
  box-shadow:
    inset 0 0 0 2px rgba(7,134,82,.08);
}

.doc13-editor table{
  border-collapse:collapse;
}

.doc13-editor td{
  min-width:120px;
  padding:5px 8px;
  border:1px solid #222;
  text-align:left;
}

@media(max-width:580px){

  .doc13-reference,
  .doc13-editor{
    padding:22px 18px;
  }

  .doc13-toolbar{
    gap:4px;
  }

  .doc13-toolbar button{
    font-size:12px;
  }
}

/* QUESTION 13 — manual typing only */

.doc13-reference{
  -webkit-user-select:none;
  user-select:none;
}

.doc13-paste-blocked{
  outline:2px solid #c62828 !important;
  outline-offset:-2px;
}

.doc13-warning{
  background:#fff0f0 !important;
  color:#a51f1f !important;
  font-weight:800;
}


/* ==========================================================
   QUESTION 15 — LIVE ROBOT SIMULATOR V1
   ========================================================== */

.kumir15-simulator{
  margin:22px 0;
  border:1px solid #bfd5cb;
  background:#f7fbf9;
}

.tu15-sim-head{
  padding:14px 16px;
  border-bottom:1px solid #c9ddd4;
  background:#edf7f2;
}

.tu15-sim-head strong{
  font-size:16px;
}

.tu15-sim-head small{
  display:block;
  margin-top:5px;
  color:#59716a;
  line-height:1.45;
}

.tu15-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:12px 14px;
  border-bottom:1px solid #d4e2dc;
  background:#fff;
}

.tu15-button{
  min-height:38px;
  padding:7px 13px;
  border:1px solid #aac8bb;
  background:#fff;
  color:#173b30;
  font-weight:800;
  cursor:pointer;
}

.tu15-button:hover:not(:disabled){
  border-color:#078652;
  background:#edf8f3;
}

.tu15-button.primary{
  border-color:#078652;
  background:#078652;
  color:#fff;
}

.tu15-button:disabled{
  opacity:.45;
  cursor:default;
}

.tu15-speed{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
  font-size:13px;
  color:#526a62;
}

.tu15-speed select{
  min-height:36px;
  padding:5px 8px;
  border:1px solid #aac8bb;
  background:#fff;
}

.tu15-board-shell{
  overflow:auto;
  padding:16px;
  background:#fff;
}

.tu15-board{
  min-width:300px;
}

.tu15-board svg{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  margin:0 auto;
}

.tu15-grid-line{
  stroke:#d6dfdb;
  stroke-width:1;
}

.tu15-outer-wall{
  fill:none;
  stroke:#778981;
  stroke-width:4;
}

.tu15-task-wall{
  stroke:#c62828;
  stroke-width:7;
  stroke-linecap:square;
}

.tu15-painted{
  fill:#9bd8b5;
}

.tu15-robot-head{
  fill:#078652;
  stroke:#075f3c;
  stroke-width:2;
}

.tu15-robot-body{
  fill:#e8f5ef;
  stroke:#075f3c;
  stroke-width:2;
}

.tu15-robot-eye{
  fill:#fff;
}

.tu15-robot-detail{
  stroke:#075f3c;
  stroke-width:2;
  stroke-linecap:round;
}

.tu15-status{
  display:flex;
  flex-wrap:wrap;
  gap:10px 24px;
  padding:11px 15px;
  border-top:1px solid #d4e2dc;
  background:#f7fbf9;
  color:#425d54;
  font-size:13px;
}

.tu15-status.error{
  background:#fff3f3;
  color:#8b1d1d;
}

.tu15-status.success{
  background:#eef9f3;
  color:#076c43;
}

.tu15-step{
  font-family:Consolas,"Courier New",monospace;
  font-weight:700;
}

@media(max-width:700px){

  .tu15-speed{
    width:100%;
    margin-left:0;
  }

  .tu15-board-shell{
    padding:8px;
  }
}


/* ==========================================================
   QUESTION 16 — INTERACTIVE PYTHON RUNNER
   ========================================================== */

.exam-program16-runner{
  margin:20px 0 0;
  border:1px solid #bfd5cb;
  background:#f7fbf9;
}

.exam-p16-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  padding:14px 16px;
  border-bottom:1px solid #c9ddd4;
  background:#edf7f2;
}

.exam-p16-head strong{
  display:block;
  font-size:16px;
}

.exam-p16-head span{
  display:block;
  margin-top:4px;
  color:#59716a;
  font-size:13px;
}

.exam-p16-badge{
  padding:6px 10px;
  border:1px solid #078652;
  color:#078652;
  font-size:12px;
  font-weight:900;
  letter-spacing:.05em;
}

.exam-p16-io{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  padding:15px;
  background:#fff;
}

.exam-p16-column{
  display:block;
  min-width:0;
}

.exam-p16-column strong{
  display:block;
  margin-bottom:8px;
}

.exam-p16-input{
  display:block;
  width:100%;
  min-height:180px;
  padding:12px;
  resize:vertical;
  border:1px solid #a8bdb4;
  background:#fff;
  outline:none;
  font:14px/1.5 Consolas,
       "Courier New",
       ui-monospace,
       monospace;
}

.exam-p16-input:focus{
  border-color:#078652;
  box-shadow:
    0 0 0 3px rgba(7,134,82,.1);
}

.exam-p16-output{
  min-height:180px;
  margin:0;
  padding:12px;
  overflow:auto;
  border:1px solid #9ebcaf;
  background:#10241e;
  color:#eaf7f1;
  white-space:pre-wrap;
  font:14px/1.5 Consolas,
       "Courier New",
       ui-monospace,
       monospace;
}

.exam-p16-controls{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  padding:0 15px 15px;
  background:#fff;
}

.exam-p16-status{
  padding:11px 15px;
  border-top:1px solid #d4e2dc;
  background:#f7fbf9;
  color:#50685f;
  font-size:13px;
  line-height:1.5;
}

.exam-p16-hidden-note{
  padding:10px 15px;
  border-top:1px solid #d4e2dc;
  background:#fff8e9;
  color:#67592f;
  font-size:12px;
  line-height:1.5;
}

@media(max-width:700px){

  .exam-p16-io{
    grid-template-columns:1fr;
  }

  .exam-p16-head{
    align-items:flex-start;
  }
}
