:root {
  --ink: #16202a;
  --muted: #62717f;
  --line: #dbe4ea;
  --panel: #ffffff;
  --soft: #f5f8fb;
  --navy: #102a43;
  --blue: #1769aa;
  --teal: #008c8c;
  --green: #1f8a5b;
  --gold: #b7791f;
  --red: #c2413d;
  --shadow: 0 16px 40px rgba(16, 42, 67, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 260px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}

.brand small,
td small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.nav-button,
.pill,
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 9px 11px;
  white-space: nowrap;
}

.nav-button.active,
.pill.selected {
  background: #e8f1f8;
  color: var(--blue);
  font-weight: 700;
}

main {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 32px) 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
  align-items: stretch;
  padding: clamp(24px, 4vw, 44px);
  margin-bottom: 22px;
  color: #fff;
  background: linear-gradient(135deg, #102a43 0%, #1769aa 58%, #008c8c 100%);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
  font-size: 0.78rem;
  color: #bde8ef;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 4.3vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.hero .eyebrow {
  color: #d8fbff;
}

.hero p {
  max-width: 760px;
  color: #e8f6fb;
  font-size: 1.04rem;
}

.hero-panel {
  display: grid;
  gap: 12px;
  align-content: center;
}

.hero-panel div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-panel strong {
  display: block;
  font-size: 2rem;
}

.hero-panel span {
  color: #d3edf3;
}

.campaign-banner {
  margin: 0 0 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #eaf2f8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.campaign-banner.is-top {
  margin-bottom: 22px;
}

.campaign-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.grid,
.cards,
.admin-grid,
.two-column,
.sales-grid,
.feature-list {
  display: grid;
  gap: clamp(22px, 2.4vw, 30px);
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.two-column {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 16px;
}

.sales-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: start;
  margin-bottom: 16px;
}

.panel,
.metric,
.module-card,
.mini-card,
.review-card,
.scenario,
.admin-form,
.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.06);
}

.panel {
  padding: clamp(30px, 3vw, 42px);
  margin-bottom: 22px;
}

.metric,
.mini-card,
.module-card,
.review-card,
.scenario,
.admin-form,
.login-panel {
  padding: clamp(32px, 3vw, 40px);
}

.shai-training-app-root .metric,
.shai-training-app-root .mini-card,
.shai-training-app-root .module-card,
.shai-training-app-root .review-card,
.shai-training-app-root .scenario,
.shai-training-app-root .admin-form,
.shai-training-app-root .login-panel {
  padding: clamp(32px, 3vw, 40px) !important;
  padding-left: clamp(32px, 3vw, 40px) !important;
  padding-right: clamp(32px, 3vw, 40px) !important;
}

.shai-training-app-root .panel {
  padding: clamp(30px, 3vw, 42px) !important;
}

.sales-copy h2 {
  max-width: 820px;
  margin: 14px 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.08;
}

.sales-copy p {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.feature-list div {
  padding: clamp(18px, 1.8vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list strong {
  color: var(--navy);
  font-size: 1.25rem;
}

.feature-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

.login-panel {
  position: sticky;
  top: 94px;
}

.login-panel form {
  display: grid;
  gap: 10px;
}

.microcopy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.metric span,
.count,
.muted,
.module-top,
.review-card small {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 6px 0;
  color: var(--navy);
  font-size: 2rem;
}

.metric p {
  margin: 0;
  font-size: 0.92rem;
}

.section-heading,
.module-top,
.actions,
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
}

.toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.pill {
  border: 1px solid var(--line);
  background: #fff;
}

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

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

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.module-card.preview {
  min-height: 230px;
}

.cards.modules.compact {
  margin-bottom: 16px;
}

.module-card h3,
.mini-card h3,
.review-card h3,
.scenario h3 {
  margin: 12px 0 8px;
}

.module-card ul {
  padding-left: 22px;
  color: var(--muted);
}

.module-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.module-actions button {
  width: 100%;
}

.plan-card ul {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6f6;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.intermediate {
  background: #fff4df;
  color: var(--gold);
}

.badge.advanced {
  background: #fdeceb;
  color: var(--red);
}

.primary,
.secondary {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 800;
}

.primary {
  background: var(--blue);
  color: #fff;
}

.secondary {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
}

.small {
  min-height: 36px;
  padding: 7px 11px;
}

.text-button {
  color: var(--blue);
  font-weight: 800;
}

.progress-line {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #dfe8ee;
  margin-bottom: 16px;
}

.progress-line span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green));
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-list div,
.review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.review-item {
  display: block;
}

.review-item span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f0f5f8;
  color: var(--navy);
  font-size: 0.82rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.filters input {
  margin-bottom: 12px;
}

.flashcard {
  display: grid;
  gap: 16px;
  width: 100%;
  min-height: 330px;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  background: #fff;
  color: var(--ink);
}

.flashcard strong {
  font-size: clamp(2rem, 5vw, 5rem);
  line-height: 1;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.flashcard p {
  font-size: 1.08rem;
  color: var(--muted);
}

.flashcard small {
  font-size: 1rem;
}

.quiz-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: center;
}

.actions.vertical {
  align-items: stretch;
  flex-direction: column;
}

.options {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.options label,
.scenario-answer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.options input {
  width: auto;
  margin-top: 5px;
}

.results {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 24px;
}

.score {
  display: inline-grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 2.1rem;
  font-weight: 900;
}

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

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

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

.scenario {
  max-width: 900px;
}

.scenario-options button:hover,
.options label:hover {
  border-color: var(--blue);
}

.feedback {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
}

.feedback.right {
  background: #e8f7ef;
  color: #145c3d;
}

.feedback.wrong {
  background: #fdeceb;
  color: #8d2f2c;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

.admin-form {
  display: grid;
  gap: 10px;
}

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

  .brand {
    min-width: 0;
  }

  .hero,
  .metrics,
  .two-column,
  .sales-grid,
  .cards.modules,
  .cards.three,
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .hero,
  .metrics,
  .two-column,
  .sales-grid,
  .feature-list,
  .cards.modules,
  .cards.three,
  .admin-grid,
  .quiz-setup {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .actions,
  .category-list div {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 12px;
  }

  main {
    padding-inline: 16px;
  }

  .hero {
    padding: 22px;
  }

  .panel {
    padding: 24px;
  }

  .metric,
  .mini-card,
  .module-card,
  .review-card,
  .scenario,
  .admin-form,
  .login-panel {
    padding: 24px;
  }

  .login-panel {
    position: static;
  }

  .module-actions {
    grid-template-columns: 1fr;
  }
}
