:root {
  --yellow: #ffd500;
  --blue: #005bbb;
  --red: #e63946;
  --green: #00b894;
  --ink: #1a1a1a;
  --paper: #f8f9fa;
  --white: #ffffff;
  --mist: #e8edf4;
  --navy: #092b5f;
  --shadow: 6px 6px 0 var(--ink);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 91, 187, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 91, 187, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(248, 249, 250, 0.96);
  border-bottom: 4px solid var(--ink);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  object-fit: cover;
}

.brand-logo {
  width: 190px;
  height: auto;
}

.brand-word {
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
}

.brand-word span {
  color: var(--blue);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 3px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--yellow);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.btn.primary {
  background: var(--yellow);
}

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

.btn.red {
  background: var(--red);
  color: var(--white);
}

.btn.green {
  background: var(--green);
  color: var(--white);
}

.btn.full {
  width: 100%;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--red);
  color: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-panel {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: clamp(30px, 6vw, 72px);
  border-bottom: 4px solid var(--ink);
  background: var(--navy);
  color: var(--white);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 43, 95, 0.96) 0%, rgba(9, 43, 95, 0.82) 44%, rgba(9, 43, 95, 0.26) 100%),
    url("assets/movograi-brand-board.png") right center / min(720px, 65vw) no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-title {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.98;
  text-transform: uppercase;
}

.hero-title .highlight {
  color: var(--yellow);
}

.hero-copy {
  max-width: 650px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 4px solid var(--ink);
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  text-transform: uppercase;
}

.section-note {
  max-width: 520px;
  margin: 0;
  color: #4b5565;
  font-weight: 700;
  line-height: 1.45;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.card {
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  line-height: 1.15;
}

.card p {
  margin: 0 0 16px;
  color: #465061;
  font-weight: 650;
  line-height: 1.5;
}

.mini-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-label.red {
  background: var(--red);
  color: var(--white);
}

.mini-label.green {
  background: var(--green);
  color: var(--white);
}

.topic-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom-width: 9px;
  text-decoration: none;
}

.topic-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.topic-card span {
  color: #4b5565;
  font-weight: 700;
  line-height: 1.35;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: #5a6374;
  font-weight: 800;
}

.media-box {
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #111;
  aspect-ratio: 16 / 9;
}

.media-box iframe,
.media-box img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.demo-switcher {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 900;
}

.demo-switcher select {
  min-height: 36px;
  border: 2px solid var(--yellow);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}

.builder-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
}

.tool-btn {
  min-height: 42px;
  padding: 9px 12px;
  border: 2px dashed var(--ink);
  border-radius: 6px;
  background: var(--mist);
  cursor: pointer;
  font-weight: 900;
}

.tool-btn:hover {
  border-style: solid;
  background: var(--yellow);
}

.draft-area {
  min-height: 110px;
  margin-bottom: 16px;
  padding: 14px;
  border: 3px dashed #b8c0ce;
  border-radius: var(--radius);
  background: #fbfcfe;
}

.draft-block {
  position: relative;
  margin-bottom: 12px;
  padding: 14px 44px 14px 14px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
}

.draft-block label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.draft-block input,
.draft-block textarea,
.form-control {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
}

.draft-block textarea {
  resize: vertical;
}

.remove-block {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--red);
  color: var(--white);
  cursor: pointer;
  font-weight: 900;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 4px solid var(--ink);
  background: var(--paper);
  padding: 20px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -20px -20px 22px;
  padding: 16px 18px;
  border-bottom: 4px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
}

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

.sidebar-logo img {
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  object-fit: cover;
}

.side-nav {
  display: grid;
  gap: 12px;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.side-link.active,
.side-link:hover {
  background: var(--yellow);
}

.main-content {
  padding: 36px clamp(18px, 4vw, 48px);
}

.profile-card {
  text-align: center;
}

.profile-avatar {
  width: 116px;
  height: 116px;
  margin: 0 auto 14px;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  object-fit: cover;
}

.profile-card h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.profile-card p {
  margin: 0 0 16px;
  color: #4b5565;
  font-weight: 800;
}

.xp-box {
  margin: 18px 0;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--mist);
}

.xp-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-weight: 900;
}

.xp-bar,
.progress-bar {
  position: relative;
  height: 24px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
}

.xp-fill,
.progress-fill {
  height: 100%;
  background: var(--blue);
}

.progress-fill.good {
  background: var(--green);
}

.progress-fill.low {
  background: var(--red);
}

.xp-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  mix-blend-mode: difference;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.stat-value {
  color: var(--blue);
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  color: #4b5565;
  font-weight: 900;
  text-transform: uppercase;
}

.table-scroll {
  overflow-x: auto;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--yellow);
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-weight: 750;
}

tr:last-child td {
  border-bottom: 0;
}

th:last-child,
td:last-child {
  border-right: 0;
}

.class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tab {
  min-height: 44px;
  padding: 9px 16px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.tab.active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 0 0 var(--ink);
  transform: translate(3px, 3px);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.54);
}

.modal {
  width: min(560px, 100%);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--red);
  color: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.drop-area {
  display: grid;
  place-items: center;
  min-height: 172px;
  padding: 24px;
  border: 4px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--mist);
  text-align: center;
  cursor: pointer;
}

.drop-area:hover {
  background: #f1f6ff;
}

.credential {
  display: inline-block;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--mist);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-weight: 800;
}

.game-stage {
  width: min(760px, calc(100% - 32px));
  margin: 36px auto 56px;
}

.game-card {
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 10px 10px 0 var(--ink);
  padding: clamp(22px, 4vw, 38px);
  text-align: center;
}

.score-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 22px;
}

.score-pill {
  min-height: 38px;
  padding: 7px 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 900;
}

.word-display {
  min-height: 110px;
  display: grid;
  place-items: center;
  margin: 20px 0;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--mist);
  color: var(--navy);
  font-size: clamp(42px, 8vw, 70px);
  font-weight: 900;
}

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

.feedback {
  min-height: 42px;
  margin-top: 18px;
  font-size: 22px;
  font-weight: 900;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-list {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 560px;
  }

  .hero-panel::before {
    background:
      linear-gradient(180deg, rgba(9, 43, 95, 0.98) 0%, rgba(9, 43, 95, 0.9) 58%, rgba(9, 43, 95, 0.56) 100%),
      url("assets/movograi-brand-board.png") center bottom / 520px no-repeat;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 4px solid var(--ink);
  }
}

@media (max-width: 640px) {
  .brand-logo {
    width: 160px;
  }

  .brand-word {
    font-size: 22px;
  }

  .hero-panel {
    padding: 28px 18px;
  }

  .hero-title {
    font-size: 43px;
  }

  .hero-copy {
    font-size: 18px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .card {
    padding: 18px;
  }

  .button-row,
  .hero-actions,
  .answer-grid {
    flex-direction: column;
  }

  .answer-grid {
    display: flex;
  }

  .button-row .btn,
  .hero-actions .btn,
  .answer-grid .btn {
    width: 100%;
  }
}
