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

:root {
  --navy:#101b32;
  --blue:#5278f5;
  --blue-dark:#3e62dd;
  --muted:#718096;
  --border:#e6eaf1;
  --bg:#f7f9fc;
  --white:#fff;
  --green:#199b75;
}

* { box-sizing:border-box; }

body {
  margin:0;
  background:var(--bg);
  color:var(--navy);
  font-family:'DM Sans',sans-serif;
}

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

.navbar {
  height:76px;
  background:white;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 max(calc((100% - 1120px)/2),5%);
  position:sticky;
  top:0;
  z-index:5;
}

.brand {
  display:flex;
  align-items:center;
  gap:3px;
  text-decoration:none;
  color:var(--navy);
  font-family:Manrope,sans-serif;
  font-size:20px;
  font-weight:800;
}

.brand-icon {
  width:35px;
  height:35px;
  border-radius:11px;
  background:var(--blue);
  color:white;
  display:grid;
  place-items:center;
  margin-right:7px;
}

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

.nav-right {
  display:flex;
  align-items:center;
  gap:20px;
}

#savedStatus {
  font-size:12px;
  color:var(--green);
}

.nav-button {
  border:1px solid var(--border);
  background:white;
  padding:10px 17px;
  border-radius:10px;
  color:var(--navy);
}

.hero {
  max-width:1120px;
  margin:auto;
  padding:95px 25px 85px;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  align-items:center;
  gap:65px;
}

.eyebrow {
  font-size:11px;
  letter-spacing:2px;
  font-weight:800;
  color:var(--blue);
}

.hero h1 {
  font-family:Manrope,sans-serif;
  font-size:clamp(43px,6vw,67px);
  line-height:1.12;
  letter-spacing:-2.8px;
  margin:20px 0;
}

.hero h1 span { color:var(--blue); }

.hero>div>p {
  color:var(--muted);
  font-size:17px;
  line-height:1.8;
  max-width:520px;
}

.primary-button {
  background:var(--blue);
  color:white;
  border:0;
  border-radius:12px;
  padding:17px 25px;
  font-weight:700;
  font-size:15px;
  box-shadow:0 8px 20px #5278f52c;
  transition:.2s;
}

.primary-button:hover {
  background:var(--blue-dark);
  transform:translateY(-2px);
}

.primary-button span { margin-left:20px; }

.trust-line {
  margin-top:25px;
  font-size:12px;
  color:var(--muted);
}

.hero-card {
  background:var(--navy);
  border-radius:23px;
  padding:30px;
  color:white;
  box-shadow:0 25px 55px #101b3220;
  min-height:360px;
}

.mock-top {
  display:flex;
  justify-content:space-between;
  font-size:13px;
}

.live-dot { color:#75d8b6; font-size:11px; }

.mock-label {
  font-size:10px;
  color:#9eacc3;
  letter-spacing:2px;
  margin-top:55px;
}

.mock-title {
  font-family:Manrope;
  font-size:28px;
  font-weight:800;
  margin-top:12px;
}

.mock-line {
  height:8px;
  border-radius:8px;
  background:#34415a;
  margin-top:20px;
  width:90%;
}

.mock-line.short { width:55%; margin-top:9px; }

.mock-divider {
  height:1px;
  background:#34415a;
  margin:27px 0;
}

.mock-feature {
  display:flex;
  align-items:center;
  gap:17px;
  margin:17px 0;
}

.mock-feature>span {
  color:#8fa9ff;
  font-weight:800;
  font-size:13px;
}

.mock-feature b,.mock-feature small { display:block; }
.mock-feature b { font-size:13px; }

.mock-feature small {
  color:#a7b4c9;
  font-size:11px;
  margin-top:4px;
}

.how-section {
  background:white;
  padding:75px 5% 90px;
}

.section-heading { text-align:center; }

.section-heading h2,.workspace-heading h2 {
  font-family:Manrope;
  font-size:32px;
  letter-spacing:-1px;
  margin:12px 0;
}

.section-heading p,.workspace-heading p { color:var(--muted); }

.how-grid {
  max-width:1120px;
  margin:45px auto 0;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:17px;
}

.how-card {
  border:1px solid var(--border);
  border-radius:16px;
  padding:23px;
  background:#fff;
  transition:.2s;
}

.how-card:hover {
  transform:translateY(-4px);
  box-shadow:0 12px 30px #101b3210;
}

.how-card>span {
  color:var(--blue);
  font-size:12px;
  font-weight:800;
}

.how-card h3 { font-size:15px; margin:20px 0 9px; }

.how-card p {
  font-size:13px;
  color:var(--muted);
  line-height:1.7;
}

.workspace {
  max-width:850px;
  margin:65px auto 100px;
  padding:0 20px;
  min-height:520px;
}

.hidden { display:none!important; }

.workspace-heading {
  text-align:center;
  margin-bottom:35px;
}

.progress-area { margin-bottom:30px; }

.progress-top {
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}

.progress-track {
  height:6px;
  background:#e6eaf1;
  border-radius:10px;
  overflow:hidden;
}

#progressBar {
  height:100%;
  width:16.67%;
  background:var(--blue);
  transition:width .3s;
}

.step-labels {
  display:flex;
  justify-content:space-between;
  margin-top:10px;
  font-size:10px;
  color:#98a2b3;
}

.step-card {
  background:white;
  border:1px solid var(--border);
  border-radius:20px;
  padding:35px;
  box-shadow:0 12px 35px #101b3208;
  animation:appear .3s ease;
}

@keyframes appear {
  from { opacity:0; transform:translateY(8px); }
  to { opacity:1; transform:translateY(0); }
}

.step-card h3 {
  font-family:Manrope;
  font-size:23px;
  margin:0 0 8px;
}

.step-subtitle {
  font-size:13px;
  color:var(--muted);
  line-height:1.7;
  margin:0 0 27px;
}

.choice-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
}

.choice {
  border:1px solid var(--border);
  background:white;
  padding:25px;
  border-radius:15px;
  text-align:left;
  transition:.2s;
  color:var(--navy);
}

.choice:hover {
  border-color:var(--blue);
  background:#f7f9ff;
  transform:translateY(-2px);
}

.choice .choice-icon {
  font-size:26px;
  display:block;
  margin-bottom:17px;
}

.choice b { display:block; font-size:16px; margin-bottom:7px; }

.choice small { color:var(--muted); line-height:1.6; }

.field { margin:20px 0; }

.field label {
  display:block;
  font-weight:700;
  font-size:13px;
  margin-bottom:9px;
}

.field small {
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:7px;
}

.field input,.field textarea,.field select,.essay-editor {
  width:100%;
  border:1px solid #dfe5ee;
  border-radius:10px;
  padding:13px 14px;
  outline:none;
  background:white;
  color:var(--navy);
  transition:.2s;
}

.field textarea {
  min-height:100px;
  resize:vertical;
  line-height:1.6;
}

.field input:focus,.field textarea:focus,.field select:focus,.essay-editor:focus {
  border-color:var(--blue);
  box-shadow:0 0 0 3px #5278f51a;
}

.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
}

.action-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:30px;
  flex-wrap:wrap;
}

.secondary-button,.next-button {
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px 19px;
  background:white;
  color:var(--navy);
  font-weight:700;
}

.next-button {
  background:var(--blue);
  color:white;
  border-color:var(--blue);
}

.secondary-button:hover { background:#f3f6fc; }
.next-button:hover { background:var(--blue-dark); }

.grade-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}

.grade-option {
  padding:15px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:white;
  text-align:center;
  font-weight:600;
  color:var(--navy);
}

.grade-option.selected {
  border-color:var(--blue);
  background:#f0f4ff;
  color:var(--blue);
}

.loading-panel { text-align:center; padding:55px 10px; }

.spinner {
  width:44px;
  height:44px;
  border:4px solid #e7ecfa;
  border-top-color:var(--blue);
  border-radius:50%;
  animation:spin .9s linear infinite;
  margin:0 auto 25px;
}

@keyframes spin { to { transform:rotate(360deg); } }

.loading-panel p { color:var(--muted); font-size:13px; }

.result-meta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:17px;
}

.result-meta span { font-size:12px; color:var(--muted); }

.essay-editor {
  min-height:420px;
  resize:vertical;
  font-family:Georgia,serif;
  font-size:16px;
  line-height:1.9;
  padding:24px;
}

.result-actions {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:17px;
}

.result-actions button { font-size:12px; padding:13px 8px; }

.sources-note {
  font-size:12px;
  line-height:1.7;
  color:var(--muted);
  background:#f5f7fb;
  padding:14px;
  border-radius:10px;
  margin-top:15px;
}

.notice {
  margin-top:15px;
  padding:14px;
  border-radius:10px;
  background:#fff2ef;
  color:#ad4937;
  font-size:13px;
  line-height:1.6;
}

footer {
  background:white;
  border-top:1px solid var(--border);
  text-align:center;
  padding:35px 20px;
}

.footer-brand { justify-content:center; font-size:17px; }
footer p { font-size:12px; color:var(--muted); }

.footer-small {
  max-width:600px;
  margin:12px auto;
  line-height:1.7;
}

@media(max-width:760px) {
  .hero {
    grid-template-columns:1fr;
    gap:35px;
    padding-top:60px;
  }
  .hero-card { max-width:500px; width:100%; margin:auto; }
  .how-grid { grid-template-columns:1fr 1fr; }
  .workspace { margin-top:40px; }
  .step-card { padding:23px; }
}

@media(max-width:480px) {
  .how-grid,.choice-grid,.form-grid { grid-template-columns:1fr; }
  .grade-grid { grid-template-columns:1fr 1fr; }
  .step-labels { font-size:8px; }
  #savedStatus { display:none; }
  .result-actions { grid-template-columns:1fr 1fr; }
  .hero h1 { letter-spacing:-1.5px; }
}
