:root {
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-soft: #edf7f5;
  --text: #16302c;
  --muted: #657773;
  --line: #dce7e4;
  --primary: #0f766e;
  --primary-dark: #0a5c56;
  --accent: #d5a84b;
  --shadow: 0 18px 45px rgba(20, 58, 52, 0.08);
  --radius: 24px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; transform: none !important; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(246, 248, 248, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 231, 228, 0.8);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--primary); color: white; font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 2px; }

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 750;
  transition: 0.2s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { background: #e7f0ee; color: var(--text); }
.button-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 70vh;
  padding: 76px 28px 48px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 46px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.7rem, 6vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 14px 0 24px;
  max-width: 880px;
}
.hero-copy > p {
  font-size: clamp(1.04rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 720px;
}
.eyebrow { color: var(--primary); font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-panel { display: grid; gap: 14px; }
.mini-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.mini-card span { display: inline-block; font-size: 0.8rem; font-weight: 850; color: var(--primary); margin-bottom: 8px; }
.mini-card strong, .mini-card small { display: block; }
.mini-card strong { font-size: 1.06rem; }
.mini-card small { color: var(--muted); margin-top: 7px; line-height: 1.45; }

.section { padding: 72px 28px; }
.section-soft { background: var(--surface-soft); }
.section-heading { max-width: 880px; margin: 0 auto 28px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 8px 0 10px; letter-spacing: -0.035em; }
.section-heading p { color: var(--muted); line-height: 1.7; }
.heading-row { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.dev-badge { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }

.lookup-card {
  max-width: 880px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow);
}
.lookup-card label { display: block; font-weight: 800; margin-bottom: 10px; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input-row input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfc;
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}
.input-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09); }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.form-note-top { margin: 0 0 18px; }
.result-panel { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--surface-soft); border: 1px solid #cfe5df; }
.result-panel p { margin: 8px 0; line-height: 1.5; }

.stats-grid, .workspace-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.workspace-grid { grid-template-columns: repeat(2, 1fr); }
.stat-card, .workspace-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
}
.stat-card small, .stat-card span { display: block; color: var(--muted); }
.stat-card strong { display: block; font-size: 2.1rem; margin: 10px 0 5px; }
.workspace-card p { color: var(--muted); line-height: 1.6; }
.card-title { display: flex; align-items: center; gap: 12px; }
.card-title h3 { margin: 0; }
.module-chip { background: var(--surface-soft); color: var(--primary); padding: 7px 10px; border-radius: 10px; font-size: 0.75rem; font-weight: 900; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--primary); font-weight: 850; }

.application-form {
  max-width: 1040px;
  margin: 28px auto 0;
  display: grid;
  gap: 18px;
}
.form-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form-header h3 { margin: 8px 0 6px; font-size: 1.7rem; }
.form-header p { margin: 0; color: var(--muted); line-height: 1.6; }
.form-section {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 30px);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form-section legend {
  padding: 0 10px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--text);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field {
  display: grid;
  gap: 8px;
  font-size: 0.91rem;
  font-weight: 750;
}
.field-span-2 { grid-column: span 2; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfc;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09);
}
.field input[readonly] {
  background: #f0f4f3;
  color: #445a56;
  cursor: default;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

dialog { border: 0; border-radius: 24px; padding: 0; max-width: 460px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(8, 28, 25, 0.45); backdrop-filter: blur(4px); }
.dialog-card { padding: 28px; }
.dialog-card h2 { margin: 8px 0; }
.dialog-card p { color: var(--muted); line-height: 1.6; }
.dialog-card .button { margin-top: 14px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 54px; }
  .hero-panel { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { padding: 14px 16px; }
  .brand small { display: none; }
  .hero { padding: 44px 18px 32px; gap: 28px; min-height: auto; }
  .hero-panel { grid-template-columns: 1fr; }
  .section { padding: 54px 18px; }
  .input-row { grid-template-columns: 1fr; }
  .stats-grid, .workspace-grid { grid-template-columns: 1fr; }
  .heading-row, .form-header { align-items: start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: span 1; }
  .form-actions { justify-content: stretch; }
  .form-actions .button { width: 100%; }
  .footer { flex-direction: column; }
}
