:root {
  --blue: #2868ef;
  --navy: #0c1934;
  --paper: #f6f9ff;
  --light: #eaf1ff;
  --yellow: #ffdd4f;
  --line: #cbd8ee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  font-family: Manrope, Arial, sans-serif;
  color: var(--navy);
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #ffbe00;
  outline-offset: 3px;
}

h1,
h2,
h3,
.logo strong {
  font-family: 'Bricolage Grotesque', Manrope, sans-serif;
}

h1 {
  font-size: clamp(39px, 4.4vw, 75px);
  letter-spacing: -.065em;
  line-height: 1.04;
  margin: 12px 0 20px;
}

h1 em {
  font-style: normal;
  color: var(--blue);
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(19px, 2vw, 29px);
  letter-spacing: -.035em;
}

p {
  line-height: 1.7;
}

small {
  font-size: 11px;
}

/* MAIN LAYOUT */

.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--blue);
  border-right: 2px solid var(--navy);
  padding: 25px 16px;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 27px;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
}

/* BRAND */

.logo {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--navy);
  font-size: 26px;
  font-weight: 900;
}

.logo-icon span {
  color: var(--blue);
}

.logo strong {
  display: block;
  font-size: 25px;
  letter-spacing: -.06em;
}

.logo small {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
}

/* SIDEBAR */

.side-label {
  display: flex;
  justify-content: space-between;
  color: #eff5ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.side-label span {
  font-size: 9px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: auto;
  scrollbar-width: thin;
}

.chapter {
  display: flex;
  gap: 13px;
  align-items: center;
  text-align: left;
  border: 1.5px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 11px 9px;
  color: #f7faff;
  font-weight: 800;
  font-size: 12px;
}

.chapter span {
  opacity: .8;
  font-size: 10px;
}

.chapter:hover,
.chapter.active {
  color: var(--navy);
  background: #fff;
  border-color: var(--navy);
}

.chapter.active {
  box-shadow: 3px 3px 0 var(--navy);
}

.side-footer {
  margin-top: auto;
  border-top: 1px solid #ffffff6c;
  padding-top: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: white;
  font-size: 10px;
}

.side-footer i {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: #73f1bf;
}

.side-footer b {
  font-size: 9px;
}

/* WORKSPACE */

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 76px;
  padding: 0 clamp(18px, 4vw, 55px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.topbar em {
  color: #a2b4d3;
  font-style: normal;
}

.topstart {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .09em;
}

.on-air {
  color: #20ad82;
  font-size: 11px;
  font-weight: 800;
}

.on-air span {
  color: #51637c;
}

.pill-button,
.primary,
.secondary {
  padding: 12px 17px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill-button,
.primary {
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--navy);
}

.secondary {
  background: white;
}

.menu-button {
  display: none;
  border: 0;
  background: none;
  font-size: 23px;
}

/* STAGE */

.stage {
  position: relative;
  flex: 1;
  padding: clamp(22px, 4vw, 54px)
           clamp(18px, 5vw, 70px);
  background-image:
    linear-gradient(#2868ef08 1px, transparent 1px),
    linear-gradient(90deg, #2868ef08 1px, transparent 1px);
  background-size: 33px 33px;
  min-height: 540px;
}

.slide {
  animation: reveal .36s ease both;
  max-width: 1190px;
  margin: 0 auto;
}

.eyebrow,
.source {
  font-size: 11px;
  letter-spacing: .13em;
  font-weight: 900;
}

.eyebrow {
  color: var(--blue);
  margin: 0;
}

.tag {
  display: inline-flex;
  padding: 8px 12px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--yellow);
  font-size: 10px;
  letter-spacing: .08em;
  font-weight: 900;
}

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

.source {
  color: #7f90a9;
}

.lead {
  font-size: clamp(15px, 1.5vw, 21px);
  max-width: 740px;
}

.caption {
  font-size: 13px;
  color: #5a6a84;
}

/* CARDS */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.data-box,
.photo-tile,
.stat {
  background: white;
  border: 2px solid var(--navy);
  border-radius: 11px;
  padding: 22px;
  box-shadow: 4px 5px 0 var(--navy);
}

.card.blue {
  background: var(--blue);
  color: white;
}

.card.yellow {
  background: var(--yellow);
}

.card small {
  font-weight: 900;
  color: inherit;
  letter-spacing: .06em;
}

.card p {
  margin-bottom: 0;
}

/* STATISTICS */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 23px;
}

.stat {
  padding: 16px;
}

.stat strong {
  font: 800 clamp(27px, 3vw, 52px)/1
        'Bricolage Grotesque', sans-serif;
  display: block;
  color: var(--blue);
}

.stat small {
  display: block;
  color: #687b9a;
  margin-top: 9px;
  font-weight: 800;
}

/* TABLES */

.bar {
  margin: 22px 0;
  padding: 14px 16px;
  background: #e7efff;
  border-left: 5px solid var(--blue);
  border-radius: 3px;
  font-size: 13px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.choice {
  padding: 11px 16px;
  border: 2px solid var(--navy);
  background: #fff;
  border-radius: 8px;
  font-weight: 900;
}

.choice.active {
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--navy);
}

.formula-table,
.organ-table {
  border-collapse: collapse;
  width: 100%;
  background: white;
  margin: 16px 0;
}

.table-scroll {
  overflow-x: auto;
}

.formula-table td,
.formula-table th,
.organ-table td,
.organ-table th {
  border: 1px solid #d0dbed;
  text-align: left;
  padding: 13px;
  font-size: 13px;
}

.formula-table th,
.organ-table th {
  background: #e4edff;
}

.formula-table td:first-child,
.organ-table td:first-child {
  font-weight: 900;
}

/* DETAIL INFORMATION */

.details {
  margin-top: 23px;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.details summary {
  cursor: pointer;
  padding: 16px 19px;
  font-weight: 900;
  font-size: 13px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.details summary::after {
  content: '+';
  color: var(--blue);
  font-size: 20px;
}

.details[open] summary::after {
  content: '−';
}

.details p {
  margin: 0;
  padding: 0 19px 20px;
  font-size: 14px;
  color: #465a78;
}

.note {
  background: #fff4d2;
  border-left: 5px solid #ecb620;
  padding: 14px 17px;
  margin: 18px 0;
  border-radius: 5px;
  font-size: 13px;
}

.note strong {
  color: #523800;
}

/* PROCESS */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}

.step {
  border: 2px solid var(--navy);
  border-radius: 9px;
  padding: 15px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-weight: 900;
}

.step.active {
  background: var(--yellow);
}

.step span {
  display: block;
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 7px;
}

.step-panel {
  padding: 20px;
  border-radius: 9px;
  border: 2px solid var(--navy);
  background: #e4eeff;
  margin-top: 15px;
}

.step-panel p {
  margin-bottom: 0;
}

/* RESULTS */

.feature {
  padding: 25px;
  border: 2px solid var(--navy);
  border-radius: 12px;
  background: var(--blue);
  color: white;
}

.feature strong {
  font: 800 clamp(48px, 8vw, 100px)/1
        'Bricolage Grotesque', sans-serif;
}

.feature p {
  margin-bottom: 0;
}

.result-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 15px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.result-row b:first-child {
  color: var(--blue);
  font-size: 25px;
}

.result-row p {
  margin: 5px 0;
}

/* STATUS */

.status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.status > div {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status b {
  display: block;
}

.status small {
  display: block;
  margin-top: 5px;
  color: #5d6c82;
}

.status .yes {
  border-left: 5px solid #2bb88e;
}

.status .missing {
  border-left: 5px solid #efb32f;
}

/* DOCUMENTATION */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.photo-tile {
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 195px;
  object-fit: cover;
  background: #d8e4fa;
}

.photo-tile > span {
  padding: 11px 12px;
  display: block;
  font-size: 11px;
  font-weight: 900;
}

.photo-tile:hover {
  transform: translateY(-4px);
}

/* BOTTOM NAVIGATION */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px clamp(18px, 4vw, 55px);
  background: white;
  border-top: 1px solid var(--line);
}

.progress {
  font-weight: 900;
  font-size: 11px;
  min-width: 120px;
}

.track {
  background: #e8eff9;
  height: 5px;
  border-radius: 7px;
  margin-top: 9px;
  overflow: hidden;
}

.track > div {
  height: 100%;
  width: 8.333%;
  background: var(--blue);
  transition: width .3s;
}

.buttons {
  display: flex;
  gap: 8px;
}

.controls button:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.hint {
  color: #8091a8;
  font-size: 11px;
}

/* MOBILE NAVIGATION */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: #03162e90;
}

.scrim[hidden] {
  display: none;
}

/* PHOTO ZOOM */

dialog#zoom {
  border: 2px solid var(--navy);
  border-radius: 9px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
}

dialog#zoom::backdrop {
  background: #04132cc9;
}

dialog#zoom img {
  display: block;
  max-width: 80vw;
  max-height: 70vh;
  object-fit: contain;
}

.close {
  position: absolute;
  right: 9px;
  top: 7px;
  border: 0;
  background: var(--yellow);
  border-radius: 5px;
  font-size: 24px;
}

/* ANIMATION */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(13px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */

@media(max-width:1100px) {

  .app {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 11px;
  }

  .cards.three {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media(max-width:760px) {

  .app {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: min(320px, 85vw);
    height: 100vh;
    min-height: 0;
    transform: translateX(-105%);
    transition: transform .25s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-button {
    display: inline-block;
  }

  .topbar {
    padding: 0 17px;
    height: 67px;
  }

  .topbar .on-air {
    display: none;
  }

  .topbar .pill-button {
    padding: 10px;
  }

  .stage {
    padding: 25px 17px;
    min-height: calc(100vh - 155px);
  }

  .cards,
  .cards.three,
  .status {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat {
    padding: 10px;
  }

  .stat strong {
    font-size: 25px;
  }

  .stat small {
    font-size: 9px;
  }

  .controls {
    padding: 12px 15px;
    flex-wrap: wrap;
  }

  .hint {
    display: none;
  }

  .progress {
    min-width: 95px;
    flex: 1;
  }

  .controls button {
    padding: 10px 11px;
    font-size: 10px;
  }

  h1 {
    font-size: 42px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery img {
    height: 155px;
  }

}

@media(max-width:420px) {

  .topstart {
    font-size: 10px;
  }

  .topbar .pill-button {
    font-size: 10px;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .photo-tile img {
    height: 120px;
  }

  .card {
    padding: 17px;
  }

  h1 {
    font-size: 38px;
  }

}

@media(prefers-reduced-motion:reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
