:root {
  --navy: #102d48;
  --navy-2: #183c5d;
  --paper: #fff8e9;
  --ink: #17324a;
  --muted: #687985;
  --mint: #56bba0;
  --mint-dark: #257b69;
  --orange: #ed7b3a;
  --ochre: #e7b34f;
  --red: #c95846;
  font-family: ui-rounded, "Avenir Next", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  min-width: 1100px;
  min-height: 720px;
  overflow: hidden;
  color: var(--ink);
  background: #d8dfdc;
}
button {
  color: inherit;
  font: inherit;
}
button:focus-visible,
[tabindex]:focus-visible {
  outline: 4px solid rgba(86, 187, 160, 0.45);
  outline-offset: 4px;
}

.lesson {
  position: relative;
  width: min(1320px, calc(100vw - 40px));
  height: min(856px, calc(100vh - 30px));
  margin: 15px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  grid-template-rows: minmax(0, 1fr) 112px;
  gap: 14px;
}
.mailroom {
  min-width: 0;
  padding: 18px 22px 20px;
  display: grid;
  grid-template-rows: 44px 72px minmax(0, 1fr);
  border-radius: 32px;
  background: linear-gradient(160deg, #fff8e9, #e9d8b8);
  box-shadow: 0 23px 55px rgba(34, 52, 58, 0.18);
  overflow: hidden;
}
.desk-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}
.desk-head > div:first-child {
  display: flex;
  flex-direction: column;
}
.desk-head span,
.mission span,
.lens-controls > span,
.fact-board span,
.status-card span,
.decision span,
.finale span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.desk-head strong {
  font-size: 14px;
}
.desk-head button {
  justify-self: end;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  background: rgba(16, 45, 72, 0.1);
  font-weight: 850;
  cursor: pointer;
}
.pips {
  display: flex;
  gap: 7px;
  padding-top: 9px;
}
.pips i {
  width: 30px;
  height: 7px;
  border-radius: 99px;
  background: #d0c6b4;
}
.pips i.on {
  background: var(--orange);
}
.pips i.done {
  background: var(--mint-dark);
}
.mission {
  text-align: center;
}
.mission h1 {
  margin: 4px 0 3px;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.mission p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.work-surface {
  position: relative;
  min-height: 0;
  padding: 22px;
  display: grid;
  grid-template-columns: 58% 1fr;
  gap: 18px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(16, 45, 72, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(16, 45, 72, 0.035) 1px, transparent 1px), #c99e6c;
  background-size: 32px 32px;
  overflow: hidden;
}
.message-card {
  position: relative;
  min-height: 0;
  padding: 30px 34px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 24px rgba(58, 39, 25, 0.19);
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
}
.message-card::after {
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 180px;
  height: 180px;
  content: "";
  border-radius: 50%;
  background: rgba(237, 123, 58, 0.11);
}
.message-sender {
  display: flex;
  gap: 12px;
  align-items: center;
}
.message-sender > i {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: inset 0 0 0 7px #fff;
}
.message-sender div {
  display: flex;
  flex-direction: column;
}
.message-sender b {
  font-size: 15px;
}
.message-sender span {
  color: var(--muted);
  font-size: 11px;
}
.message-card > strong {
  display: block;
  margin: 28px 0 9px;
  font-size: 24px;
  line-height: 1.08;
}
.message-card > p {
  max-width: 450px;
  color: #475d69;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}
.fake-link {
  width: fit-content;
  margin-top: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--navy-2);
  font-size: 12px;
  font-weight: 850;
}
.permission-row {
  position: absolute;
  left: 34px;
  bottom: 27px;
  display: flex;
  gap: 7px;
}
.permission-row i {
  padding: 7px 10px;
  border-radius: 99px;
  background: #ece5d6;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.lens {
  position: absolute;
  z-index: 8;
  left: 52%;
  top: 48%;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border: 13px solid var(--navy);
  border-radius: 50%;
  background: rgba(156, 232, 213, 0.23);
  box-shadow:
    0 10px 23px rgba(16, 45, 72, 0.28),
    inset 0 0 0 4px rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition:
    left 0.12s ease-out,
    top 0.12s ease-out;
}
.lens::after {
  position: absolute;
  right: -54px;
  bottom: -42px;
  width: 78px;
  height: 22px;
  content: "";
  border-radius: 99px;
  background: var(--navy);
  transform: rotate(45deg);
  transform-origin: left center;
}
.lens b {
  color: var(--navy);
  font-size: 42px;
}

.fact-board {
  min-width: 0;
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 6px solid #173c5c;
  border-radius: 20px;
  background: #eaf4f0;
  box-shadow: inset 0 0 0 3px #bdd9d0;
}
.fact-board > div:first-child {
  display: flex;
  justify-content: space-between;
}
.fact-board > div:first-child strong {
  font-size: 12px;
}
.facts {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.fact {
  padding: 10px 11px;
  border-left: 5px solid var(--orange);
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  animation: pin 0.25s ease-out;
}
.fact-board > p {
  margin: 0;
  padding: 10px;
  border-radius: 11px;
  color: #fff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.permission-panel,
.recovery-panel,
.branch-panel {
  position: absolute;
  z-index: 15;
  inset: 22px;
  border-radius: 20px;
  background: #102d48;
  color: #fff;
  box-shadow: 0 16px 35px rgba(16, 45, 72, 0.3);
}
.permission-panel {
  padding: 38px;
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 28px;
  align-items: center;
}
.app-node {
  height: 140px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  color: var(--navy);
  background: var(--mint);
  font-size: 19px;
  font-weight: 950;
}
.permission-gates {
  display: grid;
  gap: 12px;
}
.permission-gates button {
  min-height: 55px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
  cursor: pointer;
}
.permission-gates button::after {
  content: "Closed";
  color: #a9b9c6;
  font-size: 11px;
}
.permission-gates button.open {
  border-color: var(--mint);
  background: rgba(86, 187, 160, 0.16);
}
.permission-gates button.open::after {
  content: "Open";
  color: #96e2ce;
}
.data-rooms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.data-rooms i {
  min-height: 80px;
  display: grid;
  place-items: center;
  border: 2px dashed #587089;
  border-radius: 17px;
  color: #aab8c4;
  font-style: normal;
  font-weight: 850;
  transition: 0.16s ease-out;
}
.data-rooms i.active {
  border-style: solid;
  border-color: var(--orange);
  color: #fff;
  background: rgba(237, 123, 58, 0.2);
  box-shadow: 0 0 24px rgba(237, 123, 58, 0.23);
}
.duration {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.duration button {
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 14px;
  color: #fff;
  background: #284866;
  font-weight: 900;
  cursor: pointer;
}
.duration button.selected {
  border-color: var(--mint);
  background: var(--mint-dark);
}

.recovery-panel {
  padding: 28px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 210px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  overflow: hidden;
}
.breach-source {
  position: relative;
  grid-row: 1/-1;
  align-self: center;
  min-height: 175px;
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 3px solid var(--orange);
  border-radius: 26px;
  color: #fff;
  background: #6b3439;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.breach-source span {
  color: #ffd1b8;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.breach-source strong {
  font-size: 15px;
  line-height: 1.2;
}
.breach-source i {
  position: absolute;
  right: -19px;
  width: 34px;
  height: 8px;
  border-radius: 99px;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(237, 123, 58, 0.55);
}
.breach-source i:nth-of-type(1) {
  top: 36px;
}
.breach-source i:nth-of-type(2) {
  top: 82px;
}
.breach-source i:nth-of-type(3) {
  top: 128px;
}
.account-chain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: center;
}
.account-chain button {
  position: relative;
  min-width: 0;
  min-height: 160px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 3px solid var(--orange);
  border-radius: 20px;
  color: #fff;
  background: #1d4262;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 150ms ease-out,
    border-color 150ms ease-out,
    background 150ms ease-out;
}
.account-chain button:hover,
.recovery-tools button:hover {
  transform: translateY(-3px);
}
.account-chain button:disabled,
.recovery-tools button:disabled {
  cursor: default;
}
.account-chain button:disabled:hover,
.recovery-tools button:disabled:hover {
  transform: none;
}
.account-chain button span,
.account-chain button small,
.recovery-tools button span {
  display: block;
  line-height: 1.25;
}
.account-chain button span {
  color: #f8b18a;
  font-size: 11px;
}
.account-chain button small {
  color: #ffd5c2;
  font-size: 9px;
  font-weight: 800;
}
.account-chain button.changed {
  border-color: var(--mint);
  background: #1d5a55;
}
.account-chain button.changed span,
.account-chain button.changed small {
  color: #a6ead7;
}
.recovery-tools {
  display: grid;
  align-content: center;
  gap: 13px;
}
.recovery-tools button {
  min-height: 84px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: 2px solid transparent;
  border-radius: 17px;
  color: #fff;
  background: #284866;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 150ms ease-out,
    border-color 150ms ease-out,
    background 150ms ease-out;
}
.recovery-tools button span {
  color: #b8c8d3;
  font-size: 10px;
  font-weight: 750;
}
.recovery-tools button.done {
  border-color: var(--mint);
  background: var(--mint-dark);
}
.recovery-tools button.done span {
  color: #d3fff2;
}
.recovery-outcome {
  grid-column: 2/-1;
  min-height: 55px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  border: 2px solid rgba(237, 123, 58, 0.55);
  border-radius: 16px;
  color: #ffe0cd;
  background: rgba(107, 52, 57, 0.72);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.recovery-panel[data-risk="contained"] .breach-source {
  border-color: var(--mint);
  background: #1b5a51;
}
.recovery-panel[data-risk="contained"] .breach-source i {
  width: 12px;
  background: var(--mint);
  box-shadow: none;
}
.recovery-panel[data-risk="contained"] .recovery-outcome {
  border-color: var(--mint);
  color: #d3fff2;
  background: rgba(29, 90, 85, 0.82);
}
.recovery-panel.breach-testing[data-risk="exposed"] .breach-source i {
  animation: attack-route 300ms ease-out 2;
}
.recovery-panel.breach-testing[data-risk="mfa"]
  .recovery-tools
  button:first-child {
  animation: session-warning 340ms ease-out 2;
}
.recovery-panel.breach-testing[data-risk="session"]
  .recovery-tools
  button:last-child {
  animation: session-warning 340ms ease-out 2;
}
.recovery-panel.incident-replaying .breach-source {
  animation: incident-replay 700ms ease-out;
}

.branch-panel {
  padding: 55px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr auto;
  gap: 18px;
}
.branch-panel button {
  border: 3px solid transparent;
  border-radius: 22px;
  color: #fff;
  background: #244866;
  cursor: pointer;
}
.branch-panel button b,
.branch-panel button span {
  display: block;
}
.branch-panel button b {
  margin-bottom: 10px;
  font-size: 18px;
}
.branch-panel button span {
  color: #b7c6d0;
  font-size: 12px;
}
.branch-panel button.previewed {
  border-color: var(--ochre);
  transform: translateY(-4px);
}
.branch-panel p {
  grid-column: 1/-1;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  color: var(--navy);
  background: var(--paper);
  font-weight: 850;
  text-align: center;
}

.tool-dock {
  padding: 22px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 14px;
  border-radius: 30px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 20px 45px rgba(16, 45, 72, 0.25);
}
.lens-controls {
  min-height: 0;
}
.lens-controls > span {
  color: #9fb2c0;
}
#inspectButtons {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
#inspectButtons button {
  min-height: 58px;
  padding: 9px;
  border: 2px solid transparent;
  border-radius: 14px;
  color: #fff;
  background: #244866;
  font-weight: 850;
  cursor: pointer;
}
#inspectButtons button.found {
  border-color: var(--mint);
  color: #b9f2e1;
}
.known-channel,
.status-card {
  padding: 16px;
  border-radius: 18px;
  background: #1d4262;
}
.known-channel {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 12px;
}
.phone {
  grid-row: 1/3;
  width: 48px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--navy);
  background: var(--mint);
  font-size: 27px;
}
.known-channel strong {
  align-self: end;
  font-size: 13px;
}
.known-channel p,
.status-card p {
  margin: 4px 0 0;
  color: #b5c5cf;
  font-size: 10px;
  line-height: 1.35;
}
.status-card span {
  color: #9fb2c0;
}
.status-card strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}
.status-card.verified strong {
  color: #a9ead9;
}

.decision {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  align-items: center;
  gap: 24px;
  padding: 19px 28px;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(44, 53, 48, 0.12);
}
.decision > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.decision > div:first-child strong {
  font-size: 17px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}
.actions button,
.finale button {
  min-height: 52px;
  padding: 11px 17px;
  border: 0;
  border-radius: 15px;
  background: #dfe9e5;
  font-weight: 900;
  cursor: pointer;
}
.actions .primary,
.finale button {
  color: #fff;
  background: var(--mint-dark);
  box-shadow: 0 5px 0 #155449;
}
.actions .caution {
  color: #fff;
  background: var(--orange);
}
.actions .practice-choice {
  min-width: 116px;
  color: var(--ink);
  background: #dfe9e5;
  box-shadow: none;
}
.finale {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border-radius: 34px;
  color: #fff;
  background: rgba(16, 45, 72, 0.98);
  text-align: center;
}
.finale span {
  color: #9fe0cf;
}
.finale strong {
  max-width: 720px;
  margin: 10px 0 22px;
  font-size: 35px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.is-pointed {
  animation: point 0.7s ease-out 2;
}

@keyframes pin {
  from {
    opacity: 0;
    transform: translateY(8px) rotate(-2deg);
  }
}
@keyframes point {
  50% {
    filter: drop-shadow(0 0 12px var(--ochre));
  }
}
@keyframes attack-route {
  50% {
    transform: translateX(13px);
    background: #ffb36f;
  }
}
@keyframes session-warning {
  50% {
    border-color: var(--orange);
    background: #6b3439;
  }
}
@keyframes incident-replay {
  0% {
    transform: scale(0.88);
    opacity: 0.4;
  }
  55% {
    transform: scale(1.05);
  }
}

@media (max-width: 1180px) {
  .lesson {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
  .work-surface {
    grid-template-columns: 60% 1fr;
    padding: 15px;
  }
  .message-card {
    padding-inline: 24px;
  }
  .recovery-panel {
    grid-template-columns: 110px minmax(0, 1fr) 180px;
    padding: 20px;
    gap: 12px;
  }
  .account-chain button {
    min-height: 145px;
    padding-inline: 7px;
  }
}

@media (max-width: 1099px), (max-height: 719px) {
  body {
    min-width: 0;
    overflow: auto;
  }
  .lesson {
    width: min(100% - 24px, 900px);
    height: auto;
    min-height: calc(100vh - 24px);
    margin: 12px auto;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(700px, 78vh) auto auto;
  }
  .tool-dock {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto;
  }
  .decision {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
