:root {
  --ink: #183247;
  --muted: #5f7180;
  --brand: #006d77;
  --brand-dark: #00545c;
  --brand-soft: #e8f6f5;
  --accent: #f4a261;
  --page: #f4f7f8;
  --surface: #ffffff;
  --line: #dbe4e8;
  --line-strong: #c7d4da;
  --success: #137333;
  --success-soft: #edf8f0;
  --warning: #875a00;
  --warning-soft: #fff8e7;
  --danger: #a51d2d;
  --danger-soft: #fff0f1;
  --info: #145ea8;
  --info-soft: #eef6ff;
  --shadow: 0 18px 50px rgba(24, 50, 71, 0.12);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(0, 109, 119, 0.28);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(219, 228, 232, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--brand);
}

.brand-mark svg,
.input-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 82% 12%, rgba(244, 162, 97, 0.32), transparent 23rem),
    linear-gradient(125deg, #064f58 0%, #087681 55%, #0f8a8f 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -85px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border: 48px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 82px;
}

.eyebrow,
.step-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 700px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.process-list {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.process-list span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 700;
}

.process-list b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-dark);
  background: white;
}

.workspace {
  width: min(1180px, calc(100% - 40px));
  min-height: 420px;
  margin: -42px auto 42px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(219, 228, 232, 0.9);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tab-list {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfb;
}

.tab-button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.tab-panel {
  min-height: 320px;
}

.panel-section,
.result-section,
.survey-section {
  padding: 38px;
}

.result-section,
.survey-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-heading p:not(.step-label) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-heading .step-label {
  color: var(--brand);
}

.search-form {
  max-width: 850px;
}

.search-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}

.input-action-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.input-wrap {
  min-width: 0;
  flex: 1;
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  display: grid;
  place-items: center;
  color: #718593;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px 0 50px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap input:hover {
  border-color: #aebfc7;
}

.input-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 109, 119, 0.1);
  outline: none;
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

.primary-button {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 12px;
  color: white;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(0, 109, 119, 0.18);
}

.primary-button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.secondary-button {
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink);
  background: white;
}

.secondary-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.text-button {
  padding: 8px 0;
  color: var(--brand-dark);
  background: transparent;
}

.text-button:hover {
  text-decoration: underline;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.message {
  min-height: 0;
  margin-top: 14px;
  font-size: 14px;
}

.message.error,
.message.success,
.message.info {
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 10px;
}

.message.error {
  color: var(--danger);
  border-color: #f4c6cc;
  background: var(--danger-soft);
}

.message.success {
  color: var(--success);
  border-color: #c8e8d1;
  background: var(--success-soft);
}

.message.info {
  color: var(--info);
  border-color: #cfe3f7;
  background: var(--info-soft);
}

.property-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(190px, 0.8fr);
  gap: 14px;
  margin-bottom: 22px;
}

.property-summary-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfc;
}

.property-summary-card.primary {
  border-color: #cfe4e3;
  background: var(--brand-soft);
}

.summary-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-value {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 800;
}

.summary-subvalue {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.eligibility-card {
  padding: 22px;
  border: 1px solid;
  border-radius: var(--radius-md);
}

.eligibility-card.eligible {
  color: #105d2a;
  border-color: #bfe3c9;
  background: var(--success-soft);
}

.eligibility-card.blocked {
  color: #704b00;
  border-color: #f1d693;
  background: var(--warning-soft);
}

.eligibility-title-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.eligibility-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: currentColor;
}

.eligibility-icon span {
  color: white;
  font-weight: 900;
}

.eligibility-card h3 {
  margin: 1px 0 5px;
  font-size: 19px;
}

.eligibility-card p {
  margin: 0;
}

.blocked-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(112, 75, 0, 0.18);
}

.blocked-actions p {
  margin-bottom: 12px;
}

.blocked-actions .input-action-row {
  max-width: 690px;
}

.survey-heading {
  align-items: center;
}

.secure-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 12px;
  font-weight: 800;
}

.survey-loading {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.survey-container {
  width: 100%;
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.survey-container>iframe,
.survey-container iframe {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-height: 100%;
  border: 0 !important;
}

.spinner {
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 3px solid rgba(0, 109, 119, 0.18);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.spinner.large {
  width: 38px;
  height: 38px;
  border-width: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.application-result {
  margin-top: 26px;
}

.status-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.status-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.status-card-header h3 {
  margin: 0 0 5px;
  font-size: 22px;
}

.status-card-header p {
  margin: 0;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  padding: 7px 12px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill.approved,
.status-pill.active {
  color: var(--success);
  border-color: #bfe3c9;
  background: var(--success-soft);
}

.status-pill.waitlisted {
  color: #6c3bb4;
  border-color: #ddd0f1;
  background: #f7f1ff;
}

.status-pill.pending,
.status-pill.submitted,
.status-pill.in-review {
  color: var(--warning);
  border-color: #edd599;
  background: var(--warning-soft);
}

.status-pill.rejected {
  color: var(--danger);
  border-color: #f0c5cb;
  background: var(--danger-soft);
}

.status-pill.default {
  color: var(--info);
  border-color: #cfe3f7;
  background: var(--info-soft);
}

.status-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-detail {
  padding: 19px 24px;
  border-bottom: 1px solid var(--line);
}

.status-detail:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.status-detail.full {
  grid-column: 1 / -1;
  border-right: 0;
}

.status-detail dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.success-panel {
  padding: 64px 38px;
  text-align: center;
}

.success-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--success);
  font-size: 30px;
  font-weight: 900;
}

.success-panel h2 {
  margin: 0;
  font-size: 32px;
}

.success-panel p {
  max-width: 620px;
  margin: 12px auto 24px;
  color: var(--muted);
}

.confirmation-id {
  width: fit-content;
  margin: 0 auto 24px;
  padding: 11px 16px;
  border-radius: 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 800;
}

.help-strip {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid #cfe4e3;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.help-strip strong,
.help-strip span {
  display: block;
}

.help-strip span {
  margin-top: 3px;
  color: var(--muted);
}

.help-strip a {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-weight: 800;
}

.site-footer {
  padding: 24px 20px 36px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.page-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 34, 45, 0.5);
  backdrop-filter: blur(3px);
}

.loader-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 28px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.loader-card span:last-child {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {

  .header-inner,
  .hero-content,
  .workspace,
  .help-strip {
    width: min(100% - 28px, 1040px);
  }

  .contact-link {
    display: none;
  }

  .hero-content {
    padding: 46px 0 72px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .workspace {
    margin-top: -34px;
  }

  .panel-section,
  .result-section,
  .survey-section,
  .success-panel {
    padding: 26px 20px;
  }

  .input-action-row,
  .help-strip,
  .section-heading,
  .status-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }

  .property-summary {
    grid-template-columns: 1fr;
  }

  .status-details {
    grid-template-columns: 1fr;
  }

  .status-detail:nth-child(odd) {
    border-right: 0;
  }

  .help-strip a {
    flex: initial;
  }

  .survey-container {
    min-height: 760px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .brand small {
    display: none;
  }

  .tab-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab-button {
    width: 100%;
  }

  .process-list {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}