@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --navy: #071d2a;
  --navy-light: #0d3543;
  --teal: #087f83;
  --aqua: #30b7ae;
  --gold: #c8a46a;
  --sand: #f4f0e8;
  --ink: #14222a;
  --muted: #61727b;
  --line: #dce4e6;
  --danger: #b42318;
  --success: #067647;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(5, 28, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Cairo, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.75;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

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

header {
  height: 74px;
  padding: 0 clamp(20px, 7vw, 110px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf1f2;
}

header > a:last-child {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.brand {
  color: var(--teal);
  font-size: 27px;
  font-weight: 800;
  text-decoration: none;
}

.brand span {
  color: var(--navy);
  font-size: 12px;
}

.brand.light {
  color: var(--white);
}

.brand.light span {
  color: #b8c8ce;
}

.btn {
  padding: 13px 20px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 9px 24px rgba(8, 127, 131, 0.2);
}

.btn.ghost {
  background: var(--white);
  border: 1px solid var(--line);
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
}

.hero,
.learn,
.assessment {
  width: 100%;
  min-width: 0;
}

.hero {
  min-height: 560px;
  padding: 52px clamp(20px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 55px;
  align-items: center;
  background: linear-gradient(135deg, #f8faf9, #fff 55%, #e9f5f3);
}

.hero > *,
.learn > *,
.assessment > * {
  min-width: 0;
}

.hero h1,
.learn h2,
.assessment h2,
.result-card h1,
.admin-title h1 {
  margin: 0 0 20px;
  color: var(--navy);
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.2;
  letter-spacing: -1.5px;
}

.hero h1 em,
.result-card h1 em {
  color: var(--teal);
  font-style: normal;
}

.lead {
  color: var(--muted);
  font-size: 18px;
}

.pills {
  margin: 25px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pills span {
  padding: 7px 13px;
  background: var(--white);
  border: 1px solid #dbe9e7;
  border-radius: 99px;
  font-size: 12px;
}

.visual {
  height: 390px;
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(145deg, var(--navy), var(--navy-light));
  box-shadow: var(--shadow);
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.visual::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-top: 5px solid var(--aqua);
  border-right: 5px solid transparent;
  transform: skewY(-18deg) rotate(-8deg);
  filter: drop-shadow(0 0 9px var(--aqua));
}

.visual-card {
  position: absolute;
  z-index: 2;
  right: 9%;
  bottom: 9%;
  left: 9%;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}

.visual-card b {
  font-size: 45px;
}

.visual-card span {
  color: #bed0d5;
  font-size: 12px;
}

.learn {
  padding: 70px clamp(20px, 7vw, 110px);
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 60px;
}

.learn h2,
.assessment h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.features article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
}

.features article:last-child {
  grid-column: 1 / -1;
}

.features b {
  margin-left: 15px;
  color: var(--gold);
}

.assessment {
  padding: 70px clamp(20px, 7vw, 110px);
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 65px;
  align-items: start;
  background: var(--sand);
}

.assessment aside {
  position: sticky;
  top: 25px;
}

.assessment aside > p {
  color: var(--muted);
}

dl dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

dl dd {
  margin: 0;
  font-weight: 700;
}

.form-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: clamp(20px, 4vw, 42px);
  overflow: hidden;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  scroll-margin-top: 20px;
}

.stepper {
  margin: 0 0 28px;
  padding: 0 0 22px;
  display: flex;
  align-items: flex-start;
  direction: rtl;
  border-bottom: 1px solid var(--line);
}

.stepper > i {
  height: 2px;
  flex: 1;
  margin: 21px 8px 0;
  position: relative;
  overflow: hidden;
  background: var(--line);
}

.stepper > i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}

.stepper-item {
  width: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #8a999f;
  text-align: center;
}

.stepper-item span {
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #7b8b91;
  background: var(--white);
  border: 2px solid #cfdadd;
  border-radius: 50%;
  font-weight: 800;
  transition: 0.25s;
}

.stepper-item strong {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
}

.stepper-item.active {
  color: var(--navy);
}

.stepper-item.active span {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 0 6px rgba(8, 127, 131, 0.1);
}

.stepper-item.done {
  color: var(--teal);
  cursor: pointer;
}

.stepper-item.done span {
  color: var(--teal);
  background: #e7f7f2;
  border-color: var(--teal);
}

.stepper-item.done + i::after {
  transform: scaleX(1);
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.step h3 {
  margin-top: 0;
  color: var(--navy);
  font-size: 25px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wide {
  grid-column: 1 / -1;
}

label:not(.choice, .consent) {
  font-size: 13px;
  font-weight: 700;
}

input:not([type="radio"], [type="checkbox"]),
select,
textarea {
  width: 100%;
  margin-top: 5px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 131, 0.09);
}

fieldset {
  margin: 27px 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 11px;
  color: var(--navy);
  font-weight: 800;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  height: 100%;
  padding: 11px 13px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.choice input:checked + span {
  color: #05666a;
  background: #edf8f7;
  border-color: var(--teal);
  font-weight: 700;
}

small[data-error] {
  min-height: 17px;
  display: block;
  color: var(--danger);
  font-size: 10px;
}

.conditional {
  display: none !important;
}

.conditional.show {
  display: block !important;
}

.consent {
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.actions .primary {
  min-width: 270px;
}

.hp {
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  overflow: hidden !important;
  border: 0 !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.alert {
  margin: 15px 0;
  padding: 12px;
  border-radius: 8px;
}

.alert.error {
  color: var(--danger);
  background: #fef3f2;
}

.alert.success {
  color: var(--success);
  background: #ecfdf3;
}

.notice {
  padding: 75px 20px;
  color: #d6e1e5;
  text-align: center;
  background: var(--navy);
}

.notice h2 {
  color: var(--white);
  font-size: 34px;
}

.notice p {
  max-width: 650px;
  margin: auto;
}

footer {
  padding: 28px clamp(20px, 7vw, 110px);
  display: flex;
  justify-content: space-between;
  color: #8299a4;
  background: #04141d;
}

.auth-page {
  min-height: 100vh;
  padding: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--sand), #e7f4f2);
}

.auth-card,
.result-card {
  width: 100%;
  max-width: 460px;
  padding: 45px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  color: var(--navy);
}

.auth-card label {
  margin: 15px 0;
  display: block;
}

.auth-card .btn {
  width: 100%;
}

.result-card {
  max-width: 660px;
  text-align: center;
}

.result-card h1 {
  font-size: 44px;
}

.result-level {
  margin: 18px 0;
  color: var(--muted);
  font-size: 18px;
}

.result-level strong {
  color: var(--teal);
  font-size: 24px;
}

.success-mark {
  width: 70px;
  height: 70px;
  margin: 25px auto;
  display: grid;
  place-items: center;
  color: var(--success);
  background: #e7f7f2;
  border-radius: 50%;
  font-size: 35px;
}

.result-actions {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.admin-page {
  min-height: 100vh;
  background: #f5f7f8;
}

.admin-header {
  color: #c8d5da;
  background: var(--navy);
}

.admin-header a {
  color: var(--white);
}

.admin-main {
  max-width: 1450px;
  margin: auto;
  padding: 40px clamp(15px, 4vw, 60px);
}

.admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-title h1 {
  font-size: 42px;
}

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

.stats article {
  padding: 20px;
  background: var(--white);
  border: 1px solid #e6ecee;
  border-radius: 12px;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stats strong {
  font-size: 27px;
}

.filters {
  margin: 15px 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--white);
  border-radius: 12px;
}

.filters input,
.filters select {
  max-width: 300px;
  margin: 0;
}

.filters select {
  max-width: 190px;
}

.table-wrap {
  overflow: auto;
  background: var(--white);
  border: 1px solid #e6ecee;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid #edf1f2;
  font-size: 12px;
  text-align: right;
}

th {
  color: var(--muted);
  background: #fafbfb;
}

td small {
  display: block;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 20px;
}

.detail-list,
.followup-card {
  padding: 23px;
  background: var(--white);
  border: 1px solid #e6ecee;
  border-radius: 12px;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.detail-list div {
  padding: 12px 0;
  border-bottom: 1px solid #edf1f2;
}

.detail-list dt {
  color: var(--muted);
  font-size: 11px;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.followup-card label {
  margin: 14px 0;
  display: block;
}

.followup-card .btn {
  width: 100%;
}

@media (max-width: 900px) {
  .hero,
  .learn,
  .assessment,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .visual {
    height: 320px;
  }

  .learn,
  .assessment {
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .assessment aside {
    position: static;
  }

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

@media (max-width: 600px) {
  header {
    height: 62px;
  }

  .hero {
    padding: 40px 20px;
    gap: 28px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .visual {
    height: 230px;
  }

  .learn,
  .assessment {
    padding: 55px 20px;
  }

  .features,
  .choices,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .features article:last-child,
  .wide {
    grid-column: auto;
  }

  .form-card {
    padding: 22px 15px;
  }

  .stepper {
    margin-inline: -6px;
  }

  .stepper-item {
    width: 86px;
    min-width: 0;
  }

  .stepper-item span {
    width: 38px;
    height: 38px;
  }

  .stepper-item strong {
    font-size: 9px;
  }

  .stepper > i {
    margin: 18px 2px 0;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    position: sticky;
    bottom: 0;
    padding: 10px 0;
    background: var(--white);
  }

  .actions .btn,
  .actions .primary {
    width: 100%;
    min-width: 0;
  }

  footer {
    display: block;
    text-align: center;
  }

  .filters {
    display: grid;
  }

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

  .admin-title h1 {
    font-size: 31px;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .auth-card,
  .result-card {
    padding: 28px 20px;
  }
}
