:root {
  --ink: #11212f;
  --muted: #5a6b78;
  --line: #dbe6ee;
  --panel: #ffffff;
  --soft: #eef6fb;
  --brand: #0f3d5e;
  --brand-2: #176f8c;
  --accent: #f5a524;
  --success: #167a56;
  --shadow: 0 18px 45px rgba(15, 61, 94, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fbfe 0%, #ffffff 48%, #f5f9fc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.simple {
  background: #ffffff;
}

body.simple .brand-mark {
  box-shadow: none;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(219, 230, 238, 0.78);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

body.simple .site-header {
  position: static;
  background: #ffffff;
  backdrop-filter: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(15, 61, 94, 0.18);
}

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

.nav-links a {
  padding: 0.48rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--brand);
  background: var(--soft);
  outline: none;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.simple main {
  width: min(980px, calc(100% - 24px));
}

.simple .hero {
  display: block;
  padding: 1.5rem 0 1rem;
}

.simple h1 {
  font-size: clamp(1.8rem, 4vw, 2.45rem);
}

.simple .lead {
  margin-top: 0.55rem;
}

.simple .tool-card {
  box-shadow: none;
}

.simple-section {
  padding: 1.2rem 0;
}

.simple-section h2 {
  font-size: 1.45rem;
  margin-bottom: 0.65rem;
}

.link-columns {
  columns: 3 220px;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.1rem;
}

.link-columns li {
  break-inside: avoid;
  margin: 0 0 0.42rem;
}

.highlight-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlight-list a {
  display: block;
  min-height: 100%;
  border: 1px solid #bfd4e1;
  border-radius: 8px;
  padding: 0.75rem;
  background: #f6fbff;
  text-decoration: none;
}

.highlight-list a:hover,
.highlight-list a:focus-visible {
  border-color: var(--brand-2);
  background: #ffffff;
  outline: 3px solid rgba(23, 111, 140, 0.12);
  outline-offset: 1px;
}

.highlight-list strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--brand);
}

.highlight-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

.converter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: end;
}

.date-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.55fr);
  gap: 0.45rem;
}

.conversion-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.conversion-table th,
.conversion-table td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.conversion-table th {
  background: var(--soft);
}

.hero {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 2rem;
  align-items: center;
  padding: 4.2rem 0 2.4rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--brand-2);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.45rem, 5vw, 4.7rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.55rem);
}

h3 {
  font-size: 1.2rem;
}

.lead {
  max-width: 680px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.55rem;
}

.button,
button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
button.primary {
  color: #ffffff;
  background: var(--brand);
}

.button.secondary {
  color: var(--brand);
  border-color: var(--line);
  background: #ffffff;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: var(--brand);
  background: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.calculator {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

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

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd9e4;
  border-radius: 8px;
  padding: 0.66rem 0.72rem;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

input:focus,
select:focus,
button:focus-visible,
.button:focus-visible {
  border-color: var(--brand-2);
  outline: 3px solid rgba(23, 111, 140, 0.18);
  outline-offset: 1px;
}

.result {
  border: 1px solid #cfe5ef;
  border-radius: 8px;
  padding: 1rem;
  background: #f4fbff;
}

.result strong {
  display: block;
  color: var(--brand);
  font-size: clamp(1.6rem, 5vw, 2.35rem);
  line-height: 1.05;
}

.result span {
  color: var(--muted);
  font-size: 0.94rem;
}

.section {
  padding: 3.2rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-head p {
  max-width: 620px;
  margin: 0.5rem 0 0;
  color: var(--muted);
}

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

.card-link,
.info-card {
  min-height: 164px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 61, 94, 0.06);
}

.card-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-link:hover,
.card-link:focus-visible {
  border-color: rgba(23, 111, 140, 0.55);
  outline: none;
  transform: translateY(-2px);
}

.card-link p,
.info-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.card-kicker {
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem;
  align-items: start;
}

.page-title {
  padding: 3.4rem 0 1.5rem;
}

.tool-shell {
  display: grid;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tab-button {
  min-height: 38px;
  padding: 0.48rem 0.75rem;
  color: var(--muted);
  border-color: var(--line);
  background: #ffffff;
}

.tab-button[aria-selected="true"] {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
}

.formula {
  color: var(--muted);
  font-size: 0.94rem;
}

.mini-list {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
  color: var(--muted);
}

.mini-list strong {
  color: var(--ink);
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 1.3rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.3rem;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .field-grid,
  .grid,
  .highlight-list {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 2.35rem;
  }

  .converter-row {
    grid-template-columns: 1fr;
  }

  .date-pair {
    grid-template-columns: 1fr;
  }
}
