:root {
  color-scheme: dark;
  --bg: #0d0f0e;
  --panel: #151816;
  --line: #323a35;
  --accent: #7ed321;
  --muted: #7f9085;
  --paper: #d0d6ce;
  --ink: #1d211e;
  --green: #87b89a;
  --red: #e5534b;
  --font-text: 'Segoe UI', system-ui, sans-serif;
  --font-display: Bahnschrift, 'Segoe UI', system-ui, sans-serif;
}

/* Anotações diretamente no texto da questão */
.sim-annotation-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:16px 0 5px; padding:8px 10px; border:1px solid var(--line); border-radius:12px; background:var(--panel); position:sticky; top:8px; z-index:3; }
.sim-annotation-toolbar button, .sim-annotation-toolbar select { min-height:30px; padding:3px 8px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--text); cursor:pointer; }
.sim-annotation-toolbar button:hover { outline:2px solid var(--accent); }
.sim-annotation-toolbar small { color:var(--muted); margin-left:auto; }
.sim-color-palette { display:flex; gap:3px; padding:2px 4px; border-left:1px solid var(--line); }
.sim-color-palette button { width:24px; min-height:24px; padding:0; border-radius:50%; }
.sim-annotation-hint { color:var(--muted); font-size:.82rem; margin:0 0 12px; }
.sim-annotatable { outline:0; }
.sim-annotatable:focus, .sim-alt [contenteditable]:focus { outline:2px dashed var(--accent); outline-offset:4px; }
.sim-annotation-comment { border-bottom:2px dotted var(--accent); background:rgba(120, 220, 20, .15); cursor:help; }
.sim-annotation-bubbles { margin:14px 0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.sim-annotation-bubbles h3 { margin:0 0 8px; }
.sim-annotation-bubbles h3 span { color:var(--muted); font-size:.82em; }
.sim-comment-bubble { display:grid; grid-template-columns:auto 1fr; gap:3px 10px; margin:7px 0; padding:8px 10px; border-left:3px solid var(--accent); border-radius:7px; background:var(--surface); }
.sim-comment-bubble small { grid-column:2; color:var(--muted); }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 15%, #1c211e, transparent 65%), var(--bg);
  color: #dee3dc;
  font:
    16px/1.5 'Segoe UI',
    Arial,
    sans-serif;
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
a {
  color: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #99e458;
  outline-offset: 3px;
}
header {
  display: flex;
  gap: 35px;
  align-items: center;
  padding: 15px 30px;
  border-bottom: 1px solid #2b322d;
  background: #0b0c0be8;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  text-decoration: none;
  font:
    bold 23px var(--font-text),
    serif;
  letter-spacing: 2px;
}
.brand small {
  font:
    10px 'Segoe UI',
    sans-serif;
  letter-spacing: 4px;
  display: block;
  color: #75877b;
  margin-top: 3px;
}
.brand-symbol {
  border: 1px solid var(--accent);
  width: 39px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 5px 5px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
nav a {
  color: #8f9d94;
  text-decoration: none;
  font-size: 14px;
  padding: 7px 0;
}
nav a.active {
  color: #99e458;
  border-bottom: 2px solid var(--accent);
}
.profile {
  margin-left: auto;
  display: flex;
  gap: 7px;
  align-items: center;
}
.profile label {
  font-size: 12px;
  color: var(--muted);
}
select,
input,
textarea {
  border: 1px solid #48534c;
  border-radius: 5px;
  background: #141715;
  color: #dee2dc;
  padding: 9px 11px;
  max-width: 100%;
}
textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}
header select {
  font-size: 13px;
  max-width: 150px;
}
.icon-button {
  background: none;
  border: 1px solid #38413b;
  border-radius: 5px;
  color: var(--accent);
  min-width: 34px;
  min-height: 34px;
  font-size: 22px;
}
.primary,
.secondary {
  border: 1px solid #66b81e;
  padding: 10px 19px;
  border-radius: 6px;
  font-weight: 600;
}
.primary {
  background: linear-gradient(#99e458, #86df38);
  color: #171b18;
  box-shadow: 0 3px 0 #373f3a;
}
.primary:hover {
  background: #99e458;
}
.secondary {
  background: #1d221f;
  color: #99e458;
}
.secondary:hover {
  background: #2c322e;
}
.small {
  font-size: 13px;
  padding: 7px 12px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}
.tag {
  font-size: 11px;
  letter-spacing: 0.5px;
  border: 1px solid #4b564f;
  border-radius: 4px;
  padding: 3px 7px;
  color: #99e458;
  display: inline-block;
}
h1,
h2,
h3 {
  font-family: var(--font-text);
  font-weight: normal;
  line-height: 1.25;
}
h1 {
  font-size: 32px;
  margin: 4px 0 10px;
}
h2 {
  font-size: 25px;
  margin: 0 0 16px;
}
h3 {
  font-size: 20px;
  margin: 0 0 10px;
}
p {
  margin: 0 0 15px;
}
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 28px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 25px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100vh - 133px);
}
aside {
  padding: 22px 17px;
  border-right: 1px solid #2c332e;
  background: #0b0c0b99;
}
.subject {
  display: block;
  width: 100%;
  border: 1px solid #6e7e73;
  background: linear-gradient(115deg, #d0d6ce, #b2bcad);
  color: #1c211e;
  text-align: left;
  padding: 15px 13px;
  border-radius: 5px;
  margin-bottom: 10px;
  box-shadow: 0 3px 8px #00000066;
}
.subject.selected {
  outline: 2px solid #99e458;
  outline-offset: 2px;
}
.subject strong {
  font:
    bold 16px var(--font-text),
    serif;
  display: block;
}
.subject small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #3a423d;
}
.aside-info {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}
.aside-info strong {
  font-size: 26px;
  color: var(--accent);
  display: block;
}
.map-area {
  min-width: 0;
  padding: 22px 25px 30px;
}
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 8px;
}
.map-header h1 {
  font-size: 27px;
}
.map-viewport {
  overflow: auto;
  overscroll-behavior: contain;
  border-top: 1px solid #282e2a;
  border-bottom: 1px solid #282e2a;
  scrollbar-color: #5c6a61 #141715;
  margin-top: 17px;
  cursor: grab;
}
.map-viewport.dragging {
  cursor: grabbing;
}
.map-canvas {
  position: relative;
  display: flex;
  gap: 38px;
  padding: 40px 45px 25px;
  min-width: max-content;
  height: 370px;
  background: radial-gradient(ellipse at 20% 40%, #333a3525, transparent 70%);
}
.map-canvas:before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 198px;
  height: 3px;
  background: linear-gradient(90deg, #2e3531, #77d623 5%, #99e458 40%, #404a43 95%);
  box-shadow: 0 0 15px #84de3665;
}
.node-column {
  position: relative;
  width: 193px;
  flex: 0 0 193px;
  display: flex;
  align-items: center;
  flex-direction: column;
}
.node {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 122px;
  width: 100%;
  background: linear-gradient(120deg, #d7dcd4, #bdc5b9);
  color: var(--ink);
  border: 1px solid #7f9084;
  border-radius: 5px;
  padding: 13px 12px;
  text-align: center;
  box-shadow: 0 5px 15px #00000088;
}
.node:after {
  content: '';
  position: absolute;
  width: 1px;
  background: #5f6d64;
  height: 39px;
  left: 50%;
  bottom: -39px;
}
.node strong {
  font:
    bold 16px var(--font-text),
    serif;
  line-height: 1.2;
}
.node small {
  font-size: 11px;
  color: #404a44;
}
.node.selected {
  outline: 2px solid #99e458;
  outline-offset: 5px;
}
.node.locked {
  background: linear-gradient(120deg, #7c8d81, #637268);
  border-color: #5d6b62;
}
.node.completed {
  border: 2px solid #73916a;
}
.node .status {
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.review-dot {
  position: absolute;
  right: -8px;
  top: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #a33c32;
  color: white;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.node-marker {
  position: absolute;
  top: 145px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a302c;
  border: 1px solid #5a685f;
  padding: 2px 12px;
  border-radius: 5px;
  font: bold 12px var(--font-text);
  color: #99e458;
  z-index: 1;
}
.branches {
  margin-top: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  position: relative;
}
.branches:before {
  content: '';
  width: 1px;
  background: #4e5a52;
  position: absolute;
  height: 29px;
  top: -28px;
}
.branches button {
  width: 165px;
  background: #c5cdc1;
  color: #252b27;
  border: 1px solid #556159;
  border-radius: 4px;
  padding: 5px 8px;
  font:
    12px var(--font-text),
    serif;
  text-align: center;
}
.branches button:hover {
  background: #d7dcd4;
}
.map-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.map-list button {
  background: #c2c9be;
  color: var(--ink);
  border: 1px solid #556259;
  border-radius: 5px;
  padding: 13px;
  text-align: left;
}
.selected-unit {
  padding: 19px 5px 10px;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: flex-start;
}
.selected-unit p {
  max-width: 680px;
  font-size: 14px;
  color: var(--muted);
}
.selected-unit h2 {
  font-size: 22px;
}
.unit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.dock {
  background: linear-gradient(130deg, #dadfd8, #b8c1b4);
  color: #1d211e;
  border: 1px solid #5e6d63;
  box-shadow: 0 8px 30px #00000066;
  border-radius: 8px;
  padding: 23px 26px;
  margin: 20px auto 0;
  max-width: 880px;
}
.dock h2 {
  font-size: 24px;
  margin: 9px 0 15px;
}
.dock .muted {
  color: #48524b;
}
.dock .tag {
  color: #3a433d;
  border-color: #627167;
}
.dock .secondary {
  color: #282e2a;
  background: #99e458;
}
.dock label {
  color: #282e2a;
}
.dock input[type='text'] {
  background: #dce0da;
  color: #1d211e;
  border-color: #606f65;
  width: 100%;
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border: 0;
  padding: 0;
  margin: 18px 0;
}
.option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #99e458;
  border: 1px solid #738478;
  border-radius: 5px;
  padding: 12px;
  cursor: pointer;
  line-height: 1.45;
  font-size: 15px;
}
.option:has(input:checked) {
  background: #99e458;
  border-color: #3e4842;
  box-shadow: inset 0 0 0 1px #3e4842;
}
.option input {
  accent-color: #424c46;
  margin-top: 5px;
}
.doubt {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 14px;
  margin: 15px 0;
}
.feedback {
  padding: 17px;
  background: #e1e8cf;
  border-left: 4px solid #627b47;
  border-radius: 4px;
  margin-top: 20px;
}
.feedback.wrong {
  background: #d5dbd2;
  border-color: #b55a43;
}
.feedback p {
  font-size: 15px;
}
.feedback a {
  color: #303733;
}
.feedback ol {
  font-size: 14px;
  line-height: 1.6;
  padding-left: 22px;
}
.order {
  display: grid;
  gap: 9px;
  margin: 17px 0;
  list-style: none;
  padding: 0;
}
.order li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: #99e458;
  border: 1px solid #6c7c71;
  border-radius: 5px;
  padding: 9px 12px;
}
.order button {
  color: #232825;
  border: 1px solid #5a685f;
  background: #99e458;
  border-radius: 4px;
  padding: 5px 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.panel {
  background: #171a18;
  border: 1px solid #353d38;
  border-radius: 7px;
  padding: 21px;
}
.panel p {
  font-size: 14px;
  color: var(--muted);
}
.panel a {
  font-size: 14px;
}
.search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.search input {
  flex: 1;
  min-width: 160px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tabs button.active {
  background: #99e458;
  color: #1d211e;
}
.reading {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    15px/1.8 'Segoe UI',
    sans-serif;
  color: #cad1c7;
  background: #0f110f;
  padding: 20px;
  max-height: 62vh;
  overflow: auto;
  border: 1px solid #323934;
}
.reading .mark {
  background: #515d55;
}
dialog {
  background: #191d1a;
  color: #dadfd8;
  border: 1px solid #5c6a60;
  border-radius: 9px;
  max-width: 900px;
  width: calc(100% - 35px);
  max-height: 92vh;
  padding: 24px;
  box-shadow: 0 25px 100px #000000bb;
}
dialog::backdrop {
  background: #050505db;
  backdrop-filter: blur(3px);
}
.dialog-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 15px;
}
.dialog-bar h2 {
  margin: 0;
  font-size: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 14px;
}
.field.wide {
  grid-column: 1/-1;
}
.field textarea {
  font-size: 14px;
}
.editor-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #313934;
}
.editor-item h3 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  margin: 0 0 4px;
}
.editor-item p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.history-table {
  width: 100%;
  border-collapse: collapse;
}
.history-table td,
.history-table th {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid #2e3531;
  font-size: 14px;
}
.table-wrap {
  overflow: auto;
}
#notice {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: #99e458;
  color: #212622;
  border: 1px solid #86df38;
  padding: 12px 20px;
  border-radius: 6px;
  z-index: 5;
  box-shadow: 0 5px 25px #00000077;
}
#notice.error {
  background: #d7dcd4;
  border-color: #b15f48;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.loading {
  padding: 60px;
  text-align: center;
}
.summary {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.summary strong {
  font: 30px var(--font-text);
  color: var(--accent);
}
.summary span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 27px;
  border-top: 1px solid #262b27;
  color: #6c7d72;
  font-size: 11px;
}
.exam-note {
  border-left: 3px solid #68bc1f;
  padding: 10px 15px;
  background: #202522;
  color: #99e458;
  font-size: 14px;
  margin: 15px 0;
}
@media (max-width: 900px) {
  header {
    gap: 17px;
    padding: 14px 18px;
  }
  nav {
    gap: 14px;
    order: 3;
    width: 100%;
  }
  .layout {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  aside {
    padding: 17px 10px;
  }
  .map-area {
    padding: 20px 16px;
  }
  .selected-unit {
    flex-direction: column;
    gap: 5px;
  }
  .dock {
    padding: 20px;
  }
  .profile label {
    display: none;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .layout {
    display: block;
  }
  aside {
    display: flex;
    gap: 10px;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid #2c332e;
  }
  .subject {
    min-width: 180px;
    margin: 0;
  }
  .aside-info {
    display: none;
  }
  .map-header {
    flex-wrap: wrap;
  }
  .map-header h1 {
    font-size: 24px;
  }
  .map-canvas {
    gap: 28px;
    padding: 40px 25px 25px;
  }
  .page {
    padding: 25px 17px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .options {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .dock {
    padding: 19px 16px;
  }
  .dock h2 {
    font-size: 22px;
  }
  .profile select {
    max-width: 105px;
  }
  .brand {
    font-size: 20px;
  }
  .history-table th,
  .history-table td {
    font-size: 12px;
  }
  .toolbar {
    gap: 7px;
  }
  footer {
    flex-direction: column;
  }
  .map-area {
    padding: 18px 13px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.12s,
      outline 0.12s;
  }
  .dock {
    animation: appear 0.2s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.5;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
