:root{
  --bg0:#f7f9fc;
  --bg1:#ffffff;
  --text:#0b1220;
  --muted:#5b6476;
  --border:rgba(15, 23, 42, .10);
  --shadow:0 18px 48px rgba(2, 6, 23, .10);
  --shadow-sm:0 8px 24px rgba(2, 6, 23, .08);
  --primary:#2563eb;
  --primary2:#22c55e;
  --ring:0 0 0 4px rgba(37,99,235,.16);
  --radius:18px;
  --radius-sm:12px;
  --max:1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  overflow-x:hidden;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(37,99,235,.15), transparent 60%),
    radial-gradient(1100px 560px at 90% 0%, rgba(34,197,94,.12), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  font:16px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  letter-spacing:-0.01em;
}

a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}

.container{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:0 20px;
}

.header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:saturate(140%) blur(12px);
  background:rgba(247,249,252,.72);
  border-bottom:1px solid rgba(15,23,42,.08);
}
.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.brand__logo{
  width:36px;
  height:36px;
  flex:0 0 auto;
}
.brand__name{
  font-weight:800;
  letter-spacing:-0.03em;
  white-space:nowrap;
}
.brand__tag{
  color:var(--muted);
  font-size:13px;
  margin-top:2px;
  white-space:nowrap;
}

.nav{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav a{
  color:rgba(11,18,32,.86);
  font-size:14px;
  padding:8px 10px;
  border-radius:999px;
}
.nav a:hover{
  background:rgba(37,99,235,.08);
  text-decoration:none;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color:var(--text);
  font-weight:700;
  box-shadow:0 10px 24px rgba(2,6,23,.08);
  cursor:pointer;
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn--primary{
  border-color:rgba(37,99,235,.25);
  background:linear-gradient(135deg, rgba(37,99,235,.95), rgba(34,197,94,.92));
  color:#fff;
}
.btn--ghost{
  box-shadow:none;
  background:transparent;
}
.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
}

.menuBtn{
  display:none;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(255,255,255,.75);
  color:rgba(11,18,32,.90);
  font-weight:900;
  cursor:pointer;
}
.menuBtn:focus{box-shadow:var(--ring); outline:none}
.menuBtn__icon{
  width:18px;height:18px;display:inline-block;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hero{
  padding:44px 0 18px;
}
.hero__top{
  max-width:860px;
}
.hero__cta{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin:16px 0 8px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(34,197,94,.24);
  background:rgba(34,197,94,.08);
  color:rgba(21,128,61,.95);
  font-weight:900;
  font-size:13px;
}
.badge--muted{
  border-color:rgba(15,23,42,.12);
  background:rgba(15,23,42,.04);
  color:rgba(11,18,32,.76);
}
.hero h1{
  margin:0 0 12px;
  font-size:44px;
  line-height:1.05;
  letter-spacing:-0.04em;
}
.hero p{
  margin:0 0 18px;
  color:var(--muted);
  font-size:18px;
}
.hero__bullets{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:18px;
}
.pill{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(255,255,255,.72);
}
.pill__dot{
  width:10px;height:10px;border-radius:50%;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  margin-top:6px;
  flex:0 0 auto;
}

.card{
  border:1px solid rgba(15,23,42,.10);
  background:rgba(255,255,255,.92);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
}
.card--soft{
  background:rgba(255,255,255,.70);
}
.card__pad{padding:18px}
.muted{color:var(--muted)}
.kicker{
  color:rgba(11,18,32,.60);
  font-size:13px;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:8px;
}

.notice{
  border-left:4px solid rgba(37,99,235,.45);
  padding:12px 14px;
  border-radius:14px;
  background:rgba(37,99,235,.06);
  color:rgba(11,18,32,.88);
}
.notice strong{font-weight:800}
.notice--warn{
  border-left-color:rgba(245,158,11,.55);
  background:rgba(245,158,11,.08);
}

.form{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.tabs{
  display:flex;
  gap:10px;
  padding:10px;
  border-radius:999px;
  background:rgba(15,23,42,.05);
  border:1px solid rgba(15,23,42,.08);
}
.tab{
  flex:1;
  text-align:center;
  padding:10px 12px;
  border-radius:999px;
  font-weight:800;
  color:rgba(11,18,32,.75);
  cursor:pointer;
  user-select:none;
}
.tab[aria-selected="true"]{
  background:#fff;
  color:rgba(11,18,32,.96);
  box-shadow:0 10px 22px rgba(2,6,23,.08);
  border:1px solid rgba(15,23,42,.08);
}

.fieldgrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.label{
  font-size:13px;
  color:rgba(11,18,32,.80);
  font-weight:700;
}
input[type="text"], input[type="email"], select, textarea{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  padding:12px 12px;
  font:inherit;
  background:#fff;
  outline:none;
}
select{
  appearance:none;
  padding-right:44px;
  background-image:
    linear-gradient(135deg, rgba(37,99,235,.95), rgba(34,197,94,.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M5.2 7.4a1 1 0 0 1 1.4 0L10 10.8l3.4-3.4a1 1 0 1 1 1.4 1.4l-4.1 4.1a1 1 0 0 1-1.4 0L5.2 8.8a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat:no-repeat,no-repeat;
  background-position:right 12px center, right 14px center;
  background-size:26px 26px, 18px 18px;
}
textarea{min-height:120px;resize:vertical}
input:focus, select:focus, textarea:focus{box-shadow:var(--ring); border-color:rgba(37,99,235,.45)}
.hint{font-size:12px;color:rgba(11,18,32,.58)}
.danger{color:#b42318}

.drop{
  border:1px dashed rgba(15,23,42,.22);
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.70);
}
.drop__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.filesmeta{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.filesmeta strong{font-weight:900}
.filesmeta span{color:rgba(11,18,32,.62); font-size:13px}
.filesmeta em{font-style:normal;color:rgba(11,18,32,.56); font-size:12px}

.row{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.checks{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color:rgba(11,18,32,.86);
  font-size:14px;
}
.check input{margin-top:4px}

.section{
  padding:20px 0 10px;
}
.section h2{
  margin:0 0 12px;
  font-size:26px;
  letter-spacing:-0.03em;
}
.grid3{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:14px;
}
.grid2{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:14px;
}
.tile{
  padding:16px;
}
.tile h3{
  margin:0 0 6px;
  font-size:16px;
}
.tile p{margin:0;color:var(--muted);font-size:14px}

.faq{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.faq details{
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.86);
}
.faq summary{
  cursor:pointer;
  font-weight:800;
}
.faq summary::-webkit-details-marker{display:none}

.footer{
  margin-top:36px;
  padding:28px 0 40px;
  border-top:1px solid rgba(15,23,42,.08);
  color:rgba(11,18,32,.70);
}
.footer__grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap:16px;
}
.footer a{color:rgba(11,18,32,.76)}
.footer a:hover{text-decoration:underline}
.small{font-size:13px}

.spinner{
  width:18px;height:18px;border-radius:50%;
  border:3px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  animation:spin 1s linear infinite;
}
.spinner--dark{
  border-color:rgba(15,23,42,.16);
  border-top-color:rgba(37,99,235,.95);
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Result page / backend HTML */
.list{margin:10px 0 0;padding-left:18px}
.list li{margin:6px 0}
.table-wrap{overflow:auto}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid rgba(15,23,42,.10);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.table th,.table td{
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,.06);
  vertical-align:top;
}
.table th{
  text-align:left;
  font-size:13px;
  color:rgba(11,18,32,.72);
  background:rgba(15,23,42,.03);
}
.table tr:last-child td{border-bottom:none}
.points{display:grid;grid-template-columns:1fr;gap:12px}
.point{
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:14px;
  background:rgba(255,255,255,.92);
}
.point > * + *{margin-top:10px}
.point__head{display:flex;justify-content:flex-end}
.risk{
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(15,23,42,.04);
}
.risk--high{background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.20);color:rgba(153,27,27,.98)}
.risk--mid{background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.26);color:rgba(146,64,14,.98)}
.risk--low{background:rgba(34,197,94,.10);border-color:rgba(34,197,94,.22);color:rgba(21,128,61,.98)}
.note{
  border:1px solid rgba(37,99,235,.18);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(37,99,235,.06);
}
.term{display:grid;grid-template-columns:1fr 2fr;gap:12px;padding:12px 0;border-bottom:1px solid rgba(15,23,42,.06)}
.term:last-child{border-bottom:none}
.term__k{font-weight:900}

.resultStack{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.resultStack .card__pad > * + *{margin-top:10px}
.resultStack h1{margin:0;font-size:28px;letter-spacing:-0.03em}
.resultStack h2{margin:0;font-size:18px;letter-spacing:-0.02em}
.resultStack .small{font-size:13px}
.resultMeta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(15,23,42,.03);
  color:rgba(11,18,32,.82);
  font-size:13px;
  font-weight:800;
}
.chip__k{color:rgba(11,18,32,.58);font-weight:800}
.riskLegend{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:10px;
}
.riskLegend__item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color:rgba(11,18,32,.82);
  font-size:13px;
}
.riskLegend__item .risk{margin-top:1px;flex:0 0 auto}
.riskLegend__item div{line-height:1.45}

.chat{
  border:1px solid rgba(15,23,42,.10);
  border-radius:18px;
  padding:12px;
  background:rgba(255,255,255,.70);
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:460px;
  overflow:auto;
}
.chatMsg{display:flex}
.chatMsg--user{justify-content:flex-end}
.chatMsg__bubble{
  max-width:min(620px, 92%);
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  box-shadow:0 10px 24px rgba(2,6,23,.06);
}
.chatMsg--user .chatMsg__bubble{
  border:none;
  background:linear-gradient(135deg, rgba(37,99,235,.95), rgba(34,197,94,.92));
  color:#fff;
}
.chatMsg__text{
  white-space:pre-wrap;
  line-height:1.5;
  font-size:14px;
}
.chatComposer{
  display:flex;
  gap:12px;
  align-items:flex-end;
}
.chatComposer textarea{min-height:92px}

.hidden{display:none !important}

@media (max-width: 980px){
  .hero h1{font-size:38px}
  .grid3{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .footer__grid{grid-template-columns:1fr}
}

@media (max-width: 860px){
  .menuBtn{display:inline-flex}
  .nav{
    display:none;
    position:absolute;
    right:20px;
    top:64px;
    min-width: min(360px, calc(100vw - 40px));
    padding:12px;
    border-radius:18px;
    border:1px solid rgba(15,23,42,.12);
    background:rgba(255,255,255,.96);
    box-shadow:var(--shadow);
    flex-direction:column;
    align-items:stretch;
    gap:6px;
  }
  .nav.nav--open{display:flex}
  .nav a{
    border-radius:14px;
    padding:12px 12px;
  }
  .nav a:not(.btn){
    background:rgba(15,23,42,.02);
  }
  .nav a.btn{justify-content:center}
}

@media (max-width: 520px){
  .hero h1{font-size:32px}
  .fieldgrid{grid-template-columns:1fr}
  .nav{gap:8px}
  .nav a{padding:8px}
  select{background-position:right 10px center, right 12px center}
  .chatComposer{flex-direction:column; align-items:stretch}
  .chatComposer .btn{width:100%; justify-content:center}
}

@media (prefers-reduced-motion: reduce){
  .btn:hover{transform:none}
  .spinner{animation:none}
}
