:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4ef;
  --navy: #0f172a;
  --blue: #1e3a8a;
  --blue-2: #2563eb;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, .10), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(16, 185, 129, .12), transparent 24%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.6;
}

a { color: var(--blue-2); text-decoration: none; }
a:hover { color: var(--blue); }

.site-header {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(219, 228, 239, .9);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 16px 22px;
}

.brand {
  align-items: center;
  color: var(--navy);
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  gap: 10px;
  letter-spacing: 0;
}

.brand::before {
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, .26);
  content: "";
  height: 34px;
  width: 34px;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nav-links a {
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 13px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-links a:hover {
  background: #eaf2ff;
  color: var(--blue);
  text-decoration: none;
  transform: translateY(-1px);
}

.hero {
  border-bottom: 1px solid rgba(219, 228, 239, .7);
  overflow: hidden;
  position: relative;
}

.hero::before {
  background: linear-gradient(135deg, rgba(30, 58, 138, .08), rgba(16, 185, 129, .08));
  border-radius: 999px;
  content: "";
  height: 520px;
  position: absolute;
  right: -190px;
  top: -230px;
  width: 520px;
}

.hero-inner, .section, .footer-inner {
  margin: 0 auto;
  max-width: 1180px;
  padding: 64px 22px;
  position: relative;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.03fr) minmax(390px, .72fr);
}

.eyebrow {
  align-items: center;
  background: rgba(16, 185, 129, .10);
  border: 1px solid rgba(16, 185, 129, .22);
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 16px;
  padding: 7px 11px;
  text-transform: uppercase;
}

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.08;
  margin: 0 0 15px;
}
h1 { font-size: clamp(42px, 7vw, 76px); letter-spacing: 0; max-width: 780px; }
h2 { font-size: clamp(25px, 3vw, 38px); letter-spacing: 0; }
h3 { font-size: 20px; letter-spacing: 0; }
p { margin: 0 0 16px; }

.lead {
  color: #475569;
  font-size: clamp(18px, 2.1vw, 21px);
  max-width: 760px;
}

.note {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-left: 5px solid var(--green);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  color: #334155;
  margin-top: 22px;
  padding: 16px 18px;
}

.tool {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(219, 228, 239, .94);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.form-grid { display: grid; gap: 14px; }
.tool .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool .form-grid > div { min-width: 0; }

label {
  color: #334155;
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 7px;
}

.input-shell {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  min-height: 52px;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.input-shell:focus-within {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
  transform: translateY(-1px);
}

.input-prefix {
  align-items: center;
  align-self: stretch;
  background: #f1f5f9;
  border-right: 1px solid var(--line);
  color: #1e3a8a;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 46px;
}

input {
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  min-width: 0;
  padding: 13px 14px;
  width: 100%;
}
input:focus { outline: none; }

.button-row { display: flex; gap: 10px; margin-top: 18px; }

button, .button {
  align-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 12px 25px rgba(37, 99, 235, .22);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  transition: box-shadow .2s ease, transform .2s ease;
}

button:hover, .button:hover {
  box-shadow: 0 16px 34px rgba(37, 99, 235, .30);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

button.secondary, .button.secondary {
  background: #e8f3ff;
  box-shadow: none;
  color: var(--blue);
}

.result {
  background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 58, 138, .94));
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .22);
  color: #dbeafe;
  margin-top: 20px;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.result::after {
  background: radial-gradient(circle, rgba(16, 185, 129, .34), transparent 62%);
  content: "";
  height: 220px;
  position: absolute;
  right: -88px;
  top: -96px;
  width: 220px;
}
.result > * { position: relative; z-index: 1; }

.ratio {
  color: #ffffff;
  font-size: clamp(44px, 7vw, 68px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  margin: 12px 0;
}
.result p { color: #cbd5e1; }

.status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  padding: 7px 11px;
  text-transform: uppercase;
}
.status.good { background: rgba(16, 185, 129, .16); color: #6ee7b7; }
.status.warn { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.status.bad { background: rgba(239, 68, 68, .16); color: #fca5a5; }

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.metric {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  color: #cbd5e1;
  padding: 14px;
}
.metric span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.metric strong { color: #ffffff; display: block; font-size: 20px; line-height: 1.2; }

.grid-3, .grid-2 { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(219, 228, 239, .94);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  color: #475569;
  display: block;
  padding: 24px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
a.card:hover {
  border-color: rgba(37, 99, 235, .28);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-3px);
}
.card h2, .card h3 { color: var(--navy); }
.list { color: #475569; padding-left: 22px; }
.list li { margin-bottom: 8px; }

.table-wrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}
table { border-collapse: collapse; min-width: 680px; width: 100%; }
td, th { border-bottom: 1px solid #e2e8f0; padding: 16px 18px; text-align: left; }
th {
  background: #f1f7ff;
  color: #1e3a8a;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
td { color: #475569; }
tbody tr:hover { background: #f8fbff; }

.site-footer {
  background: #0b1220;
  color: #94a3b8;
  margin-top: 30px;
}
.site-footer a { color: #6ee7b7; }

@media (max-width: 920px) {
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .tool .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { border-radius: 0 0 18px 18px; }
  .nav { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 16px; }
  .nav-links { justify-content: flex-start; width: 100%; }
  .nav-links a { background: #f1f5f9; font-size: 13px; }
  .hero-inner, .section, .footer-inner { padding: 42px 16px; }
  h1 { font-size: 42px; }
  .tool { border-radius: 22px; padding: 18px; }
  .metrics { grid-template-columns: 1fr; }
  .button-row { flex-direction: column; }
}
