:root {
  --navy: #081d3a;
  --navy2: #0d2b52;
  --teal: #00a896;
  --green: #2ecc80;
  --light: #e6ecef;
  --slate: #5b6770;
  --ink: #0a1626;
  --paper: #f4f7f9;
  --line: rgba(91, 103, 112, 0.22);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --disp: "Poppins", system-ui, sans-serif;
  --body: "Poppins", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a {
  color: var(--teal);
  text-decoration: none;
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 29, 58, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: block;
}
.logo .wordmark {
  font-family: var(--body);
  font-size: 19px;
  letter-spacing: 0.1em;
  line-height: 1;
}
.logo .wordmark b {
  font-weight: 600;
  color: #fff;
}
.logo .wordmark i {
  font-weight: 600;
  font-style: normal;
  color: var(--teal);
}
.logo-div {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}
.appname {
  line-height: 1.15;
}
.appname b {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  display: block;
}
.appname span {
  color: #9fb2c4;
  font-size: 10.5px;
  display: block;
  font-weight: 400;
  font-family: var(--mono);
  letter-spacing: 0.01em;
  margin-top: 1px;
}
@media (max-width: 760px) {
  .logo-div,
  .appname {
    display: none;
  }
}
.nav .sp {
  flex: 1;
}
.nav a.link {
  color: #c7d3de;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 2px;
}
.nav a.link:hover {
  color: #fff;
}
.nav .ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.nav .ghost:hover {
  border-color: var(--teal);
  background: rgba(0, 168, 150, 0.14);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hero .grid-art {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  padding: 40px 24px 46px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--teal);
}
.hero-cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero h1 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 14ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--green);
}
.hero p.lede {
  font-size: clamp(15px, 1.5vw, 17.5px);
  color: #b9c6d4;
  max-width: 52ch;
  margin: 0;
}
.hero .cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
@media (max-width: 820px) {
  .hero-cols {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .hero h1 {
    max-width: 17ch;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: 0;
  transition: 0.16s;
}
.btn-primary {
  background: var(--teal);
  color: #04241f;
}
.btn-primary:hover {
  background: var(--green);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.btn-ghost:hover {
  border-color: var(--teal);
}
.hero .stats {
  display: flex;
  gap: 34px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.stat b {
  font-family: var(--disp);
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  display: block;
  line-height: 1;
}
.stat span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8aa0b4;
  text-transform: uppercase;
  margin-top: 7px;
  display: block;
}

/* ---------- converter ---------- */
.tool {
  margin: -46px auto 0;
  position: relative;
  z-index: 10;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px -30px rgba(8, 29, 58, 0.4);
}
.tool-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
}
.head-ico {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(0, 168, 150, 0.12),
    rgba(46, 204, 128, 0.12)
  );
}
.head-ico svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-head h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 21px;
  margin: 0;
  flex: 1;
}
.dir-toggle {
  display: inline-flex;
  background: var(--light);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}
.dir-toggle button {
  border: 0;
  background: transparent;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  color: var(--slate);
  padding: 9px 15px;
  border-radius: 7px;
  cursor: pointer;
  transition: 0.14s;
  white-space: nowrap;
}
.dir-toggle button.on {
  background: var(--navy);
  color: #fff;
}
.tool-body {
  padding: 24px 26px;
}
.opts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field select {
  width: 100%;
  font-family: var(--body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.12);
}
.chk {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 11px;
  user-select: none;
  cursor: pointer;
}
.chk input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}
.io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 720px) {
  .io {
    grid-template-columns: 1fr;
  }
  .opts {
    grid-template-columns: 1fr 1fr;
  }
}
.io-col label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 7px;
}
.io-col label .unit {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}
textarea {
  width: 100%;
  min-height: 190px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfd;
  color: var(--ink);
  resize: vertical;
  tab-size: 12;
}
textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
  background: #fff;
}
textarea[readonly] {
  background: #f2f6f8;
}
.run-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
#runBtn {
  background: var(--teal);
  color: #04241f;
  font-size: 15px;
  padding: 13px 30px;
}
#runBtn:hover {
  background: var(--green);
}
.status {
  font-size: 13px;
  color: var(--slate);
  font-family: var(--mono);
  flex: 1;
  min-width: 200px;
}
.status b {
  color: var(--teal);
}
.mini {
  font-size: 12px;
  color: var(--slate);
}
.mini a {
  cursor: pointer;
  font-weight: 600;
}
.acc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}
.acc-good {
  background: rgba(46, 204, 128, 0.14);
  color: #1a8f56;
}
.acc-mid {
  background: rgba(0, 168, 150, 0.14);
  color: #00776a;
}
.acc-far {
  background: rgba(91, 103, 112, 0.14);
  color: var(--slate);
}

/* ---------- map preview ---------- */
section.mapsec {
  padding: 70px 0 20px;
}
.map-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(8, 29, 58, 0.4);
  margin-top: 26px;
}
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.map-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--slate);
  font-weight: 500;
}
.map-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sw {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: none;
  display: inline-block;
}
.sw-pt {
  background: var(--green);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--green);
}
.sw-ctrl {
  background: var(--teal);
  border-radius: 50%;
  opacity: 0.85;
}
.sw-grid {
  background: transparent;
  border: 1.5px solid var(--navy);
  border-radius: 2px;
}
.map-toggles {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mtog {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.mtog input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.15s;
}
.map-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.map-btn svg {
  width: 15px;
  height: 15px;
}
.map-canvas {
  height: 520px;
  width: 100%;
  background: var(--light);
  z-index: 1;
}
@media (max-width: 720px) {
  .map-canvas {
    height: 400px;
  }
}
.map-foot {
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--slate);
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.map-foot b {
  color: var(--teal);
}
/* leaflet control + popup theming to brand */
.leaflet-container {
  font-family: var(--body);
}
.leaflet-popup-content-wrapper {
  border-radius: 10px;
}
.leaflet-popup-content {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.6;
}
.leaflet-bar a {
  color: var(--navy);
}
.pt-tip {
  font-family: var(--mono);
  font-size: 11px;
}

/* ---------- explainer ---------- */
section.explain {
  padding: 80px 0 30px;
}
.sec-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.explain h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  max-width: 22ch;
}
.explain .sub {
  font-size: 17px;
  color: var(--slate);
  max-width: 60ch;
  margin: 0 0 44px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}
.step-ico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: linear-gradient(
    135deg,
    rgba(0, 168, 150, 0.12),
    rgba(46, 204, 128, 0.12)
  );
}
.step-ico svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step:nth-child(2) .step-ico svg {
  stroke: var(--green);
}
.step .n {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.step h3 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 19px;
  margin: 0 0 9px;
}
.step p {
  font-size: 14.5px;
  color: var(--slate);
  margin: 0;
}
.step .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--navy);
  background: var(--light);
  padding: 3px 9px;
  border-radius: 6px;
  margin-top: 14px;
}

/* ---------- accuracy band ---------- */
.band {
  background: var(--navy);
  color: #fff;
  padding: 64px 0;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}
.band .grid-art {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}
.band .wrap {
  position: relative;
}
.band h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 34px;
  letter-spacing: -0.01em;
}
.acc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 820px) {
  .acc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.acc-cell {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  padding: 22px 20px;
  background: rgba(255, 255, 255, 0.03);
}
.acc-cell b {
  font-family: var(--disp);
  font-size: 32px;
  font-weight: 600;
  display: block;
  line-height: 1;
  color: var(--green);
}
.acc-cell span {
  font-size: 13px;
  color: #a9bccb;
  display: block;
  margin-top: 9px;
}
.band .note {
  font-size: 13px;
  color: #8aa0b4;
  margin-top: 26px;
  max-width: 70ch;
  font-family: var(--mono);
  line-height: 1.7;
}

/* ---------- params / proj ---------- */
section.proj {
  padding: 70px 0;
}
.proj-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  margin-top: 26px;
}
.proj-row {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.proj-out {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--navy);
  color: #cfe8e3;
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre;
  position: relative;
  line-height: 1.7;
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.copy:hover {
  background: var(--teal);
  color: #04241f;
}
footer {
  background: var(--navy);
  color: #8aa0b4;
  padding: 40px 0;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
footer b {
  color: #fff;
}
.foot-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 64ch;
}
.foot-brand img {
  width: 40px;
  height: auto;
  flex: none;
  display: block;
}
.epsg {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
}
.hidden {
  display: none;
}
