:root {
  --ink: #172033;
  --muted: #5d6878;
  --paper: #fbfcff;
  --line: #d9e1ec;
  --panel: #ffffff;
  --red: #d83f31;
  --teal: #0d8b8b;
  --gold: #f3b61f;
  --blue: #2857b8;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.site-footer nav,
.hero-actions,
.related-links,
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--blue));
  border-radius: 8px;
  font-size: 13px;
}

.brand-name {
  font-size: 17px;
}

.nav-links a,
.site-footer a,
.header-cta,
.button,
.related-links a {
  text-decoration: none;
  font-weight: 700;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
}

.nav-links {
  justify-content: center;
  min-width: 0;
}

.header-actions {
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.language-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.header-cta,
.button,
.control-panel button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.header-cta {
  min-width: 118px;
}

.header-cta,
.button.primary,
.control-panel button {
  color: #fff;
  background: var(--red);
}

.button.secondary {
  color: var(--ink);
  background: #e9eef7;
}

.hero,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(340px, 500px);
  justify-content: space-between;
  align-items: center;
  gap: clamp(36px, 6vw, 96px);
  padding: clamp(64px, 7vw, 92px) clamp(20px, 5vw, 72px) 40px;
  background:
    radial-gradient(circle at 84% 22%, rgba(243, 182, 31, 0.2), transparent 24%),
    linear-gradient(135deg, #f9fbff 0%, #eef6f4 48%, #fff7e1 100%);
}

.page-hero {
  display: block;
  max-width: none;
}

.eyebrow,
.status-label {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

h3 {
  font-size: 22px;
  line-height: 1.2;
}

.lead {
  max-width: 720px;
  color: #334055;
  font-size: 18px;
}

.status-panel,
.result-panel,
.route-card,
.control-panel,
.keyword-table > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-panel {
  align-self: start;
  width: 100%;
  max-width: 500px;
  padding: 26px 28px;
}

.status-panel strong {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
}

dl {
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: minmax(118px, 0.42fr) 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
}

.tool-section,
.content-band,
.keyword-section,
.faq-section,
.related-links {
  padding: 54px clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 24px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.control-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.control-panel label {
  font-weight: 900;
}

select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 36px 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.language-control select {
  width: 138px;
}

.result-panel {
  padding: 22px;
  border-left: 6px solid var(--gold);
}

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

.route-card {
  padding: 20px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #fff;
  background: var(--ink);
}

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

.keyword-table > div {
  padding: 18px;
  box-shadow: none;
}

.keyword-table span {
  display: inline-block;
  margin: 8px 0;
  color: var(--blue);
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 920px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

.steps {
  display: grid;
  gap: 14px;
  max-width: 860px;
}

.narrow {
  max-width: 860px;
}

.note {
  margin-top: 18px;
  color: var(--muted);
}

.related-links {
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.related-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
}

.site-footer {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.site-footer p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: auto;
  }

  .nav-links,
  .header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .hero,
  .tool-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .route-cards,
  .keyword-table {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }
}
