@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #07111f;
  --bg-deep: #091522;
  --surface: rgba(15, 27, 47, 0.82);
  --surface-soft: rgba(8, 16, 30, 0.76);
  --text: #edf3fb;
  --muted: #8ca2c0;
  --dim: #546b87;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --blue: #66a5ff;
  --cyan: #59d1d9;
  --green: #52d39f;
  --orange: #f3a451;
  --red: #ff7b7b;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(102, 165, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 28%, rgba(89, 209, 217, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #06101d 0%, var(--bg-deep) 100%);
  color: var(--text);
  line-height: 1.55;
}

.container {
  width: min(1040px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 17, 31, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.hero {
  padding: 2.6rem 0 1.8rem;
  margin-bottom: 1rem;
}

.hero .container {
  background: linear-gradient(180deg, rgba(15, 27, 47, 0.84), rgba(8, 16, 30, 0.82));
  border: 1px solid rgba(102, 165, 255, 0.18);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.3rem;
}

.hero h1 {
  margin: 0 0 0.45rem;
  line-height: 1.08;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  display: inline-block;
  border-radius: 10px;
  padding: 0.58rem 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: rgba(89, 209, 217, 0.12);
  color: var(--cyan);
  border-color: rgba(89, 209, 217, 0.3);
}

.btn-ghost {
  color: var(--text);
  border-color: rgba(102, 165, 255, 0.26);
  background: rgba(102, 165, 255, 0.08);
}

.page-main {
  padding: 0.6rem 0 1.8rem;
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.section h2 {
  margin: 0 0 0.45rem;
  font-size: 1.06rem;
  line-height: 1.25;
  color: var(--text);
}

.section p {
  margin: 0.4rem 0;
  font-size: 0.92rem;
  color: var(--muted);
}

ul,
ol {
  margin: 0.4rem 0 0.2rem 1rem;
  padding: 0;
}

li {
  margin-bottom: 0.28rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.note {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.zone-lines {
  margin: 0.35rem 0 0.2rem 0.45rem;
  border-left: 2px solid rgba(89, 209, 217, 0.24);
  padding-left: 0.6rem;
}

.zone-line {
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 0.18rem 0;
  color: var(--muted);
}

.zone-line .label {
  color: var(--text);
  font-weight: 700;
}

.region-table {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  border-radius: 12px;
}

.region-table th:first-child,
.region-table td:first-child {
  width: 135px;
  white-space: nowrap;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.45rem;
}

.calc-formula {
  color: var(--muted);
}

.calc-formula strong {
  color: var(--text);
}

.tool-grid--narrow {
  grid-template-columns: repeat(2, minmax(220px, 340px));
  justify-content: start;
  max-width: 720px;
}

.tool-grid--narrow label {
  width: 100%;
}

.tool-grid--narrow select {
  width: 100%;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

label {
  font-size: 0.88rem;
  color: var(--muted);
  display: grid;
  gap: 0.2rem;
}

input,
select {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(102, 165, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(102, 165, 255, 0.12);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-top: 0.5rem;
  background: rgba(8, 15, 28, 0.45);
}

th,
td {
  padding: 0.48rem 0.52rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
  line-height: 1.4;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.74rem;
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.cta {
  background: linear-gradient(180deg, rgba(15, 27, 47, 0.84), rgba(8, 16, 30, 0.82));
  border: 1px solid rgba(102, 165, 255, 0.18);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.related a {
  text-decoration: none;
  color: var(--cyan);
  font-weight: 600;
}

.footer {
  color: var(--dim);
  font-size: 0.84rem;
  padding: 1rem 0 1.6rem;
}

@media (max-width: 820px) {
  .related {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-grid--narrow {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .tool-grid--narrow select {
    max-width: none;
  }
}
