:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #132033;
  --muted: #667085;
  --line: #dfe7f3;
  --primary: #2563eb;
  --primary-dark: #143d91;
  --navy: #0f2356;
  --success: #16a34a;
  --warning: #f59e0b;
  --warning-bg: #fff7ed;
  --shadow: 0 24px 70px rgba(15, 35, 86, 0.16);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

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

input, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(223, 231, 243, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  font-weight: 900;
}

.brand-mark,
.logo {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.9rem;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--navy));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.top-nav a:hover { color: var(--primary); }

.screen-section {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 69px);
  padding: 2.5rem 1rem;
  scroll-margin-top: 69px;
  border-bottom: 1px solid var(--line);
}

.screen-section:nth-child(even) { background: rgba(237, 244, 255, 0.62); }

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 390px);
  min-height: 780px;
  padding: 22px;
  overflow: hidden;
  border: 12px solid #101828;
  border-radius: 48px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 190px),
    var(--surface);
  box-shadow: var(--shadow);
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 78px;
  height: 7px;
  border-radius: 999px;
  background: #344054;
  transform: translateX(-50%);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-bottom: 26px;
}

.app-header strong,
.app-header small {
  display: block;
}

.app-header strong { font-size: 18px; }

.app-header small {
  color: var(--muted);
  font-size: 13px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-top: 16px;
  margin-bottom: 18px;
}

.back {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary-dark);
  background: white;
  font-weight: 900;
}

.center-content {
  display: grid;
  place-items: center;
  margin: auto 0;
  text-align: center;
}

.main-icon,
.success-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 18px;
  border-radius: 28px;
  background: #edf4ff;
  font-size: 38px;
}

.success-icon {
  color: white;
  background: var(--success);
  font-size: 44px;
  font-weight: 900;
}

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

.phone h1 {
  margin-bottom: 10px;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.subtitle,
.center-content p {
  color: var(--muted);
  line-height: 1.55;
}

.app-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.app-actions.stack { flex-direction: column; }

.app-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 900;
  text-align: center;
}

.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

.secondary {
  color: var(--primary-dark);
  background: #e8f0ff;
}

.ghost {
  color: var(--primary-dark);
  border: 1px solid var(--line);
  background: transparent;
}

.menu {
  color: #344054;
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
}

.role-grid,
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.role-card,
.metric,
.module-list,
.course,
.notice,
.summary,
.credits,
.timeline a {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
}

.role-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 126px;
  padding: 16px;
}

.role-card span {
  margin-bottom: 10px;
  font-size: 32px;
}

.role-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.25;
}

.role-card.selected {
  border-color: rgba(37, 99, 235, 0.55);
  background: #edf4ff;
}

.metric { padding: 15px; }

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 18px;
}

.metric.warning {
  border-color: #fed7aa;
  background: var(--warning-bg);
}

.module-list,
.summary,
.timeline {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin: 18px 0;
}

.module-list a,
.summary a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.module-list span,
.summary span,
.timeline span,
.timeline small { color: var(--muted); }

.ok { color: var(--success); }

.review { color: var(--warning); }

.course-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.course {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 15px;
}

.course span {
  display: block;
  margin-top: 4px;
  color: var(--success);
  font-size: 13px;
}

.course b { color: var(--primary-dark); }

.course.needs-review {
  border-color: #fed7aa;
  background: var(--warning-bg);
}

.course.needs-review span,
.course.needs-review b { color: var(--warning); }

.notice {
  display: block;
  padding: 15px;
  color: #9a3412;
  background: var(--warning-bg);
  border-color: #fed7aa;
  line-height: 1.45;
}

.mock-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px;
  color: var(--text);
  background: white;
  outline: none;
}

textarea {
  min-height: 84px;
  resize: none;
}

.credits {
  display: grid;
  gap: 8px;
  padding: 18px;
  line-height: 1.45;
}

.credits p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.credits strong { color: var(--text); }

.timeline { padding: 0; }

.timeline a {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.timeline small { font-weight: 900; }

.timeline strong { color: var(--primary-dark); }

@media (max-width: 980px) {
  .top-nav {
    overflow-x: auto;
    max-width: 68vw;
    padding-bottom: 4px;
  }
}

@media (max-width: 560px) {
  .site-header { padding: 0.75rem 0.85rem; }

  .brand { display: none; }

  .top-nav {
    max-width: 100%;
    width: 100%;
  }

  .screen-section { padding: 1.4rem 0.75rem; }

  .phone {
    min-height: 760px;
    border-width: 9px;
  }

  .role-grid,
  .metrics { grid-template-columns: 1fr; }
}
