:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --text: #12212f;
  --muted: #52606d;
  --accent: #148a83;
  --accent-dark: #0f6f69;
  --border: #d9e2ea;
  --shadow: 0 10px 30px rgba(15, 31, 48, 0.08);
  --dark: #0f1e2d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.section { padding: 88px 0; }
.section-alt { background: var(--bg); }
.label {
  display: inline-block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

h1, h2, h3 {
  margin: 0 0 14px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.3vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.7rem); font-weight: 760; }
h3 {
  font-size: 1.2rem;
  font-weight: 700;
  @media (max-width: 400px) {
    font-size: 1rem;
  }

}
p { margin: 0 0 12px; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e6edf2;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(155deg, var(--accent), #1fbcab);
  display: none;
}
.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  border: 1px solid var(--accent);
  border-radius: 999px;
  height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: 0.22s ease;
  background: #fff;
  color: var(--accent-dark);
}
.btn:hover { background: #eefaf8; text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-align: center;
  line-height: 90%;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-block { width: 100%; }

.lang-switcher { position: relative; }
.lang-trigger {
  min-width: 128px;
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 130px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}
.lang-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
}
.lang-menu a:hover { background: #eff7f8; text-decoration: none; }
.lang-switcher.open .lang-menu { display: block; }

.mobile-toggle { display: none; }
.mobile-backdrop,
.mobile-drawer { display: none; }

.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 34px;
  align-items: start;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #c8d6df;
  background: #f2f8f9;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.metric-row {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.metric-mini {
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfdff;
}
.metric-mini strong { display: block; font-size: 1.2rem; color: var(--text); }
.metric-mini span { font-size: 0.85rem; color: var(--muted); }

.form-card { padding: 28px; }
.form-card h3 { margin-bottom: 4px; }
.input-grid { display: grid; gap: 12px; margin-top: 16px; }
label { display: block; font-weight: 650; font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
input, textarea {
  width: 100%;
  border: 1px solid #cdd9e2;
  border-radius: 12px;
  background: #fff;
  padding: 12px 13px;
  font-size: 1rem;
  font-family: inherit;
}
textarea { min-height: 110px; resize: vertical; }
.helper, .disclaimer { font-size: 0.92rem; color: var(--muted); }
.form-status { min-height: 24px; margin-top: 10px; font-size: 0.93rem; color: var(--accent-dark); font-weight: 600; }

.calculator-wrap {
  padding: 30px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}
.control { margin-bottom: 22px; }
.control-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 10px;
}
.control-header .current-value { font-weight: 760; color: var(--accent-dark); }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 5px;
}
.range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: #6b7a88;
}
.outputs {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  background: #f8fcfd;
}
.output-main { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--text); }
.output-row { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); }
.progress {
  margin-top: 14px;
  background: #dbe8eb;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-fill { background: linear-gradient(90deg, var(--accent), #1fc4b2); height: 100%; width: 0; transition: 0.3s; }
.toggle-assumptions {
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}
.assumptions { display: none; margin-top: 8px; font-size: 0.92rem; color: var(--muted); }
.assumptions.open { display: block; }

.quote {
  margin-top: 20px;
  border-left: 4px solid var(--accent);
  padding: 10px 0 10px 18px;
  color: #314654;
  font-style: italic;
}

.tiles-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.tile {
  padding: 20px;
  text-align: center;
  min-height: 170px;
}
.icon-dot {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #e2f4f2;
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.feature-row { padding: 16px 0; border-bottom: 1px solid #dde6ed; }
.bars-card { padding: 24px; }
.bar { height: 10px; background: #dbe6ee; border-radius: 999px; margin: 12px 0; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }

.dark-section {
  color: #e9f2fa;
  background: radial-gradient(circle at top, #1f3348 0%, var(--dark) 55%);
}
.dark-section p { color: #b9c8d9; }
.data-grid {
  margin-top: 28px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}
.data-card {
  border: 1px solid rgba(168,188,206,0.26);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255,255,255,0.04);
}

.steps {
  position: relative;
  display: grid;
  gap: 20px;
}
.step {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 14px;
}

.two-col-card {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
  padding: 24px;
}
ul { margin: 6px 0 0; padding-left: 22px; color: var(--muted); }

.grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(4,1fr); }
.principle, .review { padding: 18px; }
.review .meta { font-size: 0.85rem; color: #607282; margin-bottom: 8px; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #d5e7eb;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  color: #2a5660;
  margin-right: 8px;
}
.badge-verified {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid #b6d8cf;
  background: #edf9f5;
  color: #236e60;
  border-radius: 999px;
  padding: 3px 9px;
}

.footer {
  border-top: 1px solid #e0e9ef;
  padding: 24px 0 36px;
  font-size: 0.92rem;
  color: #6a7b88;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
}
.modal.open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 22, 35, 0.6);
}
.modal-dialog {
  position: relative;
  width: min(860px, calc(100% - 36px));
  max-height: 82vh;
  overflow: hidden;
  margin: 6vh auto;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #d6e0e8;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid #e1eaf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-content {
  padding: 18px 20px;
  overflow: auto;
  font-size: 0.95rem;
}
.icon-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
}
.modal-foot { padding: 14px 20px 20px; border-top: 1px solid #e1eaf0; }

.reveal { opacity: 0; transform: translateY(22px); transition: 0.5s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

@media (max-width: 1020px) {
  .hero,
  .calculator-wrap,
  .platform-grid,
  .two-col-card,
  .grid-4,
  .data-grid,
  .tiles-5 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1199px) {
  body { font-size: 17px; }
  .container { width: min(1200px, calc(100% - 30px)); }
  .header-inner { min-height: 74px; }
  .desktop-only { display: none !important; }
  .header-actions {margin-left: auto; }
  .mobile-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    background: #fff;
  }
  .mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 18, 29, 0.42);
    z-index: 39;
  }
  .mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(320px, 88vw);
    background: #fff;
    border-left: 1px solid #dde6ed;
    z-index: 40;
    padding: 22px;
    transform: translateX(100%);
    transition: 0.25s ease;
  }
  body.drawer-open .mobile-backdrop,
  body.drawer-open .mobile-drawer { display: block; }
  body.drawer-open .mobile-drawer { transform: translateX(0); }
  .mobile-links { display: grid; gap: 10px; margin-bottom: 16px; }
  .hero,
  .metric-row,
  .calculator-wrap,
  .platform-grid,
  .tiles-5,
  .two-col-card,
  .grid-4,
  .data-grid { grid-template-columns: 1fr; }
}
@media (max-width: 550px) {
  .lang-trigger , .header-actions .btn {
    min-width: auto;
    padding: 0 10px;
    font-size: 13px;
    line-height: 15px;
    text-align: center;
    text-wrap: nowrap;
  }
  .header-inner .brand {
    font-size: 15px;
    line-height: 18px;
  }
  .header-actions {
    gap: 5px;
  }
  .header-inner {
    gap: 5px;
    margin: 0 10px;
  }
  .section-alt {
    padding-top: 30px;
  }
  .output-row {
    text-align: center;
    font-size: 13px;
  }
}
@media (max-width: 330px) {
  .header-inner .brand {
    font-size: 13px;
    line-height: 18px;
  }
  .output-row {
    font-size: 12px;

  }
}
/* =========================
   RANGE SLIDER FIX (FULL)
   Paste this at the END of styles.css
   ========================= */

/* allow thumb to reach edges (avoid clipping) */
.calculator-wrap,
.control {
  overflow: visible;
}

/* normalize range */
input[type="range"]{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
  height: 5px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

/* WebKit (Chrome/Safari/Edge) track */
input[type="range"]::-webkit-slider-runnable-track{
  width: 100%;
  height: 5px;
  background: #dbe6ee;
  border-radius: 999px;
}

/* WebKit thumb */
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(15,31,48,.16);
  margin-top: -6.5px; /* centers thumb vertically on 5px track */
  cursor: pointer;
}

/* Firefox track */
input[type="range"]::-moz-range-track{
  width: 100%;
  height: 5px;
  background: #dbe6ee;
  border-radius: 999px;
}

/* Firefox thumb */
input[type="range"]::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(15,31,48,.16);
  cursor: pointer;
}

/* remove firefox focus outline */
input[type="range"]::-moz-focus-outer{
  border: 0;
}

/* ===== Range fill (progress) ===== */
input[type="range"]{
  --p: 0%;
  background: linear-gradient(to right, var(--accent) 0 var(--p), #dbe6ee var(--p) 100%);
  border-radius: 999px;
}

/* WebKit track should be transparent to show background on input */
input[type="range"]::-webkit-slider-runnable-track{
  background: transparent;
}

/* Firefox uses track, so set it transparent too */
input[type="range"]::-moz-range-track{
  background: transparent;
}
