:root{
  --ink:#0b2340; --muted:#5a6b7b;
  --shadow: 0 10px 25px rgba(0,0,0,.08);
  --radius: 16px;
  --good:#1a7f37; --bad:#b42318;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);

  /* Show our neighbourhood illustration across the entire page. The CSS file is
     located in the assets directory, so use a relative path without an extra
     "assets/" prefix when referencing the image. Fixing the path ensures the
     image loads correctly instead of falling back to a plain white background. */
  background: url('neighbourhood.png') center/cover no-repeat fixed;
  min-height:100vh;
}

/* Side glow to keep it professional */
body::before, body::after{
  content:"";
  position:fixed;
  top:0; bottom:0;
  width:18vw;
  max-width:240px;
  pointer-events:none;
  z-index:0;
  opacity:.55;
}
body::before{
  left:0;
  background: radial-gradient(closest-side at 30% 30%, rgba(255,255,255,.14), rgba(255,255,255,0));
}
body::after{
  right:0;
  background: radial-gradient(closest-side at 70% 30%, rgba(255,255,255,.10), rgba(255,255,255,0));
}

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  position:relative;
  z-index:1;
  /* Encapsulate the site content within a light box. This prevents the
     background illustration from interfering with readability inside the main
     content area while still allowing it to show around the edges. */
  /* Use an opaque white box for the main content area. A solid background prevents
     any of the colourful illustration from bleeding through the center. */
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /* Remove the blur filter so the content area stays crisp */
  backdrop-filter: none;
}

/* ---------------- Header ---------------- */

.header{
  display:flex;
  gap:16px;
  align-items:flex-start;
  justify-content:space-between;
  padding:18px 18px;
  background: rgba(255,255,255,.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  flex-wrap:wrap;
}

/* Make brand always have enough room and avoid overlap */
.brand{
  display:flex;
  gap:14px;
  align-items:flex-start;
  flex:1 1 560px;
  min-width: 280px;
}

/* Prevent logo from pushing into text on small widths */
.logoBox{
  flex: 0 0 auto;
  width: clamp(120px, 18vw, 190px);
  max-width: 190px;
}

/* Ensure SVG scales down gracefully and doesn't collide vertically */
.logoBox svg{
  width: 100%;
  height: auto;
  display:block;
}

/* Title block takes remaining width and wraps safely */
.title{
  flex: 1 1 360px;
  min-width: 240px;
  padding-top: 2px;
}

.title h1{
  margin:0;
  font-size: 20px;
  line-height: 1.2;
}

.title p{
  margin:6px 0 0;
  color:var(--muted);
  line-height: 1.35;
}

/* On narrow screens, stack logo above text to avoid any collision */
@media(max-width: 620px){
  .brand{
    flex-direction: column;
    align-items: flex-start;
  }
  .logoBox{
    width: min(190px, 60vw);
  }
  .title{
    min-width: 0;
    width: 100%;
  }
}

.langToggle{
  display:flex; gap:10px; align-items:center;
  padding:10px 12px; border-radius: 999px; background:#fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  flex: 0 0 auto;
}

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

.switch{
  width:48px;height:28px;border-radius:20px;background:#d7dde5;
  position:relative; cursor:pointer;
}

.knob{
  width:22px;height:22px;border-radius:50%;
  background:#fff; position:absolute; top:3px; left:3px;
  transition: all .2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

.switch.on{ background:#0b2340; }
.switch.on .knob{ left:23px; }

/* ---------------- Steps ---------------- */

.steps{
  margin-top:18px;
  background: rgba(255,255,255,.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  position: sticky;
  top: 10px;
  z-index: 30;
}

.stepRow{ display:flex; gap:10px; flex-wrap:wrap; }

.step{
  flex:1 1 140px;
  padding:10px 10px;
  border-radius: 12px;
  background:#f2f5fa;
  color: var(--muted);
  font-size: 13px;
  border: 1px solid #e6ebf2;
  display:flex;
  gap:10px;
  align-items:center;
  cursor:pointer;
  user-select:none;
}

.step .dot{ width:10px;height:10px;border-radius:50%; background:#c5cfdb; }
.step.active{ background:#0b2340; color:#fff; border-color:#0b2340; }
.step.active .dot{ background:#fff; }

/* Slightly tighter steps on mobile */
@media(max-width: 520px){
  .step{ flex: 1 1 120px; padding: 9px; }
}

/* ---------------- Card / Form ---------------- */

.card{
  margin-top:18px;
  background: rgba(255,255,255,.93);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.section{ scroll-margin-top: 120px; }
.section h2{ margin: 6px 0 10px; font-size: 18px; }
.divider{ height:1px; background:#eef2f7; margin: 18px 0; }

.grid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media(max-width:820px){ .grid{ grid-template-columns: 1fr; } }

label{ display:block; font-size: 13px; color: var(--muted); margin: 10px 0 6px; }

input, select, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid #dfe6ef;
  background:#fff;
  outline: none;
  font-size: 14px;
}

textarea{ min-height: 110px; resize: vertical; }

.disclaimer{
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background:#f6f8fc;
  border:1px solid #e7edf6;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------- Insurance cards ---------------- */

.typeCards{ display:flex; gap:12px; flex-wrap:wrap; margin-top: 6px; }

.typeCard{
  flex: 1 1 180px;
  border-radius: 14px;
  border: 1px solid #e1e8f1;
  background:#f7f9fd;
  padding: 12px 12px;
  cursor:pointer;
  transition: all .15s ease;
  user-select:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.typeCard.selected{
  background:#0b2340;
  color:#fff;
  border-color:#0b2340;
}

.pill{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  color:#0b2340;
}

.typeCard.selected .pill{
  background: rgba(255,255,255,.2);
  color:#fff;
}

.typeIcon{ margin-right:8px; font-size:16px; line-height:1; }

/* ---------------- Panels ---------------- */

.panel{
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid #e7edf6;
  background:#fbfcff;
  padding: 14px;
  display:none;
}
.panel.show{ display:block; }

.infoWrap{ display:inline-flex; align-items:center; gap:8px; }
.infoI{
  width:18px;height:18px;border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 12px;
  background:#0b2340; color:#fff;
  cursor:help; position:relative;
}

.tip{
  display:none;
  position:absolute;
  left: 22px;
  top: -6px;
  width: 280px;
  background:#0b2340;
  color:#fff;
  padding:10px;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  z-index: 50;
}

.infoI:hover .tip{ display:block; }

/* ---------------- Upload ---------------- */

.drop{
  border: 2px dashed #cfd9e6;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.drop.dragover{ border-color:#0b2340; background:#f1f5ff; }

.fileList{ margin-top: 10px; font-size: 13px; color: var(--muted); }

.fileItem{
  display:flex; justify-content:space-between;
  gap:10px;
  padding: 6px 0;
  border-bottom:1px solid #eef2f7;
}
.fileItem:last-child{ border-bottom:none; }

.smallBtn{
  border:1px solid #dfe6ef;
  background:#fff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
}

/* ---------------- Buttons ---------------- */

.btn{
  border:none;
  padding: 12px 16px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 700;
  background:#0b2340;
  color:#fff;
  box-shadow: 0 10px 24px rgba(11,35,64,.18);
}

footer{
  margin-top: 18px;
  text-align:center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------- Overlay + Modal ---------------- */

.overlay{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  z-index: 999;
  align-items:center;
  justify-content:center;
}

.overlay.show{ display:flex; }

.modal{
  width: min(560px, 92vw);
  background:#fff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  padding: 18px;
}

.modalTop{ display:flex; gap:12px; align-items:center; }

.spin{
  width:40px;height:40px;
  border:4px solid rgba(11,35,64,.18);
  border-top-color:#0b2340;
  border-radius:50%;
  animation: spin 1s linear infinite;
}

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

.modalTitle{ margin:0; font-size:16px; }

.modalMsg{
  margin:10px 0 0;
  color:#0b2340;
  white-space: pre-wrap;
}
.modalMsg.good{ color: var(--good); }
.modalMsg.bad{ color: var(--bad); }

.modalActions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top: 14px;
}

.modalBtn{
  border:1px solid #dfe6ef;
  background:#fff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
}

.modalBtn.primary{
  border:none;
  background:#0b2340;
  color:#fff;
  font-weight:700;
}
