: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;
  }
}


.seo-help{margin:2rem auto;max-width:1100px;}
[hidden]{display:none!important;}

/* One consistent breadcrumb and heading treatment on every tool page. */
.breadcrumbs{padding:1.1rem 0 0;color:var(--muted);font-size:.9rem}
.breadcrumbs ol{display:flex;flex-wrap:wrap;gap:.5rem;list-style:none;padding:0;margin:0}
.breadcrumbs li+li::before{content:"/";margin-right:.5rem;color:var(--muted)}
.breadcrumbs a{color:var(--brand);text-underline-offset:3px}
.simple .page-title{padding:1.4rem 0 1.3rem}
.simple .hero:has(#tool-title){padding-top:1.4rem}
.simple .tool-shell{margin-left:0;padding-bottom:1rem}
.simple .info-card{box-shadow:none}
.conversion-hint{margin:0;color:var(--muted);font-size:.92rem;font-weight:400}

/* Keep tools close to the top and reference material easy to open. */
.compact-help,.compact-tools{border-top:1px solid var(--line);margin:1rem 0}
.compact-help summary,.compact-tools summary{min-height:44px;padding:12px 0;font-weight:750;color:var(--brand);cursor:pointer}
.compact-help .info-card{margin:0;min-height:0}
.compact-tools .simple-section{padding:0 0 12px}
.compact-tools h2,.compact-help article>h2:first-child{display:none}
@media screen and (max-width:620px){
  .nav{gap:4px;padding:8px 0;width:calc(100% - 28px)}
  .brand{font-size:16px;gap:8px}.brand-mark{width:30px;height:30px}
  .nav-links{display:flex;flex-wrap:nowrap;justify-content:space-between;width:100%;gap:0}
  .nav-links a{min-height:44px;display:flex;align-items:center;justify-content:center;padding:8px 5px;font-size:13px}
  .simple main{width:calc(100% - 28px)}
  .breadcrumbs{padding:10px 0 0;font-size:12px}
  .simple .page-title,.simple .hero,.simple .hero:has(#tool-title){padding:16px 0 12px}
  .simple h1{font-size:26px;line-height:1.15}.lead{font-size:14px;line-height:1.45}
  .hero{gap:14px}.hero .tool-card{margin-top:14px}
  .tool-shell{gap:12px}.simple .tool-shell{padding-bottom:0}
  .tool-card-header{padding:12px 14px 0;gap:8px}.tool-card-header h2{font-size:20px}
  .calculator{padding:14px;gap:12px}
  .field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  label{min-width:0;font-size:13px;gap:5px}
  input,select{font-size:16px;min-width:0;min-height:44px;padding:9px 8px}
  .field-grid>label:has(.date-pair){grid-column:1/-1}
  .date-pair{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .date-pair input{width:100%;max-width:100%;min-width:0}
  [data-direct-converter] .calculator,[data-temperature-converter] .calculator{grid-template-columns:repeat(2,minmax(0,1fr))}
  .conversion-hint{grid-column:1/-1;font-size:13px}
  .result{padding:12px}.result strong{font-size:28px;overflow-wrap:anywhere}.result span,.formula{font-size:13px}
  .mini-list{margin:0;gap:8px;font-size:13px}.mini-list li{gap:8px}
  .simple-section{padding:14px 0}.simple-section h2{font-size:20px;margin-bottom:10px}
  .highlight-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .highlight-list a{padding:10px;min-height:44px}.highlight-list strong{font-size:14px;margin:0}.highlight-list span{display:none}
  .compact-help,.compact-tools{margin:12px 0}.compact-help summary,.compact-tools summary{font-size:14px}
  .info-card{padding:14px;font-size:14px;min-height:0}
  .link-columns{columns:2 130px;column-gap:16px;font-size:14px}
  .link-columns li{margin:0}.link-columns a{display:inline-flex;align-items:center;min-height:44px}
  .site-footer{margin-top:20px}.footer-inner{padding:14px 0;gap:4px;font-size:12px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
