:root{
  --red:#df1423;
  --dark:#071224;
  --ink:#172238;
  --muted:#5d6678;
  --line:#dfe6f2;
  --bg:#f4f7fb;
  --card:#ffffff;
  --cyan:#20d6f4;
  --green:#30eea2;
  --gold:#ffbf3f;
  --blue:#0356fc;
  --shadow:0 12px 30px rgba(7,18,36,.12);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--dark);
}

a{color:inherit}

button,input,select{font:inherit}

.shell{
  max-width:1220px;
  margin:0 auto;
  padding:18px;
}

.hero{
  background:linear-gradient(135deg,#071224 0%,#10264a 55%,#073b58 100%);
  color:#fff;
  border-radius:24px;
  padding:34px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}

.hero:after{
  content:"";
  position:absolute;
  right:-100px;
  top:-120px;
  width:340px;
  height:340px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(32,214,244,.25),rgba(48,238,162,0));
  pointer-events:none;
}

.brand{
  font-weight:900;
  letter-spacing:.08em;
  font-size:13px;
  color:#aeefff;
  text-transform:uppercase;
}

h1{
  font-size:clamp(34px,6vw,66px);
  line-height:.96;
  margin:12px 0 14px;
  max-width:850px;
}

.hero p{
  max-width:800px;
  color:#dce8f7;
  font-size:18px;
  line-height:1.5;
  margin:0;
}

.hero-badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:22px;
}

.hero-badges span{
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.08);
  padding:9px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
}

.nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:14px 0 20px;
  position:sticky;
  top:0;
  z-index:20;
  padding:10px 0;
  background:linear-gradient(var(--bg) 70%,rgba(244,247,251,0));
}

.nav a{
  text-decoration:none;
  background:#fff;
  border:1px solid var(--line);
  padding:10px 13px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
  box-shadow:0 4px 12px rgba(7,18,36,.05);
}

.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:24px;
  margin-top:18px;
  box-shadow:var(--shadow);
}

.section-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.section-title h2{
  font-size:30px;
  margin:0;
}

.section-title p{
  margin:0;
  color:var(--muted);
  max-width:660px;
  line-height:1.45;
}

.planner-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.field label{
  display:block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:900;
  margin:0 0 7px;
  color:#31415b;
}

.field select,
.field input{
  width:100%;
  padding:14px 15px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  font-size:16px;
  color:var(--dark);
}

.custom-row{
  display:none;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:14px;
}

.custom-row.show{
  display:grid;
}

.pref-row{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin:18px 0;
}

.pref{
  border:1px solid #ccd8ea;
  background:#edf3fb;
  padding:9px 13px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
}

.pref.active{
  background:var(--dark);
  color:#fff;
  border-color:var(--dark);
}

.plan-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.primary,
.ghost{
  border:0;
  border-radius:12px;
  padding:13px 18px;
  font-weight:900;
  cursor:pointer;
}

.primary{
  background:linear-gradient(90deg,var(--cyan),var(--green));
  color:#06101f;
}

.ghost{
  background:#e9eef6;
  color:#142034;
}

.route-head{
  display:none;
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid var(--line);
}

.route-head.show{
  display:block;
}

.route-head h3{
  font-size:24px;
  margin:0 0 7px;
}

.route-head p{
  margin:0;
  color:var(--muted);
}

.results{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:16px;
}

.result{
  border:1px solid var(--line);
  border-radius:16px;
  padding:17px;
  background:#fff;
  display:flex;
  flex-direction:column;
  min-height:230px;
  position:relative;
}

.result.top{
  border:2px solid var(--green);
  box-shadow:0 0 0 4px rgba(48,238,162,.08);
}

.result .rank{
  position:absolute;
  right:12px;
  top:12px;
  font-size:11px;
  font-weight:900;
  background:#eef7ff;
  border:1px solid #d4ebff;
  color:#14507c;
  padding:5px 8px;
  border-radius:999px;
}

.mode-name{
  font-size:20px;
  font-weight:900;
  margin:0 75px 7px 0;
}

.mode-desc{
  color:var(--muted);
  line-height:1.4;
  font-size:14px;
}

.facts{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:14px 0;
}

.fact{
  background:#f7f9fc;
  border-radius:10px;
  padding:9px;
}

.fact b{
  display:block;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#657188;
  margin-bottom:4px;
}

.fact span{
  font-weight:900;
  font-size:13px;
}

.result-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:auto;
}

.btn{
  display:inline-block;
  text-decoration:none;
  border-radius:10px;
  padding:10px 12px;
  font-weight:900;
  font-size:13px;
}

.btn-red{
  background:var(--red);
  color:#fff;
}

.btn-dark{
  background:var(--dark);
  color:#fff;
}

.btn-light{
  background:#edf3fb;
  color:#162338;
}

.notice{
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  background:#fff7dc;
  border:1px solid #f4db89;
  color:#5f4b00;
  font-size:13px;
  line-height:1.45;
}

.mode-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.mode-card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  background:#fff;
  display:flex;
  flex-direction:column;
}

.icon{
  font-size:32px;
  margin-bottom:9px;
}

.mode-card h3{
  margin:0 0 8px;
  font-size:21px;
}

.mode-card p{
  margin:0 0 12px;
  color:var(--muted);
  line-height:1.45;
}

.pillset{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin:0 0 14px;
}

.pill{
  font-size:11px;
  font-weight:900;
  border-radius:999px;
  background:#eef3fb;
  padding:6px 8px;
}

.mode-card .result-actions{
  margin-top:auto;
}

.subgrid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}

.info-card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
  background:#fff;
}

.info-card h3{
  margin:0 0 8px;
}

.info-card p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}

.info-card ul{
  margin:12px 0 0;
  padding-left:20px;
  color:#344156;
  line-height:1.55;
}

.accent{
  border-left:5px solid var(--blue);
}

.free{
  border-left:5px solid var(--green);
}

.warning{
  border-left:5px solid var(--gold);
}

.quick-dest{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

.dest{
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  padding:13px;
  text-align:left;
  font-weight:900;
  cursor:pointer;
}

.dest small{
  display:block;
  font-weight:700;
  color:var(--muted);
  margin-top:4px;
}

.footer{
  padding:28px 6px 46px;
  color:#647086;
  font-size:13px;
  line-height:1.5;
  text-align:center;
}

.footer strong{
  color:#26344b;
}

.source-note{
  font-size:12px;
  color:#6b7588;
  margin-top:10px;
}

@media(max-width:980px){
  .results,
  .mode-grid{
    grid-template-columns:1fr 1fr;
  }

  .quick-dest{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:700px){
  .shell{
    padding:10px;
  }

  .hero{
    padding:24px 18px;
    border-radius:18px;
  }

  .panel{
    padding:18px;
    border-radius:18px;
  }

  .planner-grid,
  .custom-row,
  .subgrid,
  .results,
  .mode-grid,
  .quick-dest{
    grid-template-columns:1fr;
  }

  .section-title{
    display:block;
  }

  .section-title p{
    margin-top:7px;
  }

  .nav{
    position:static;
  }

  .facts{
    grid-template-columns:1fr 1fr;
  }
}