:root {
  --bg: #fff8ef;
  --ink: #18212c;
  --ink-soft: #3f4c5a;
  --primary: #0f5b8d;
  --primary-strong: #0a3f62;
  --card: #ffffff;
  --accent: #f7b046;
  --line: #d9e0e7;
  --success: #0f7a57;
  --shadow: 0 10px 35px rgba(12, 32, 54, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 110% -10%, #ffdeac 0%, transparent 50%),
    radial-gradient(800px 500px at -10% 10%, #cee8ff 0%, transparent 52%),
    var(--bg);
}

.hero {
  padding: 1rem 1rem 2.6rem;
}

.site-nav-wrap {
  max-width: 1040px;
  margin: 0 auto 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.site-brand {
  text-decoration: none;
  color: #0f3454;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 0.98rem;
  white-space: nowrap;
}

.top-nav {
  margin: 0;
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  flex: 1;
}

.top-nav::-webkit-scrollbar {
  height: 0;
}

.top-nav a {
  text-decoration: none;
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #dce6ee;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.hero-content {
  max-width: 1040px;
  margin: 0 auto;
}

.hero-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
}

.hero-layout > div {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  margin: 0.5rem 0 0.75rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  max-width: 14ch;
}

.subhead {
  margin: 0;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 1.01rem;
  overflow-wrap: anywhere;
}

.hero-media {
  margin: 0;
  width: 100%;
  border: 1px solid #dae6f1;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 9px 26px rgba(18, 38, 59, 0.08);
  overflow: hidden;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.cta {
  display: inline-block;
  margin-top: 1.35rem;
  text-decoration: none;
  background: linear-gradient(120deg, var(--primary), #0e6fae);
  color: #fff;
  font-weight: 800;
  padding: 0.8rem 1.05rem;
  border-radius: 0.8rem;
  box-shadow: var(--shadow);
}

main {
  max-width: 1040px;
  margin: -1.8rem auto 2.5rem;
  padding: 0 1rem;
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.card {
  background: var(--card);
  border: 1px solid #e6edf2;
  border-radius: 1rem;
  padding: 1.2rem;
  box-shadow: 0 8px 22px rgba(11, 32, 55, 0.06);
  opacity: 0;
  transform: translateY(10px);
  animation: rise 450ms ease forwards;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  min-width: 0;
}

.card:nth-child(2) {
  animation-delay: 80ms;
}

.card:nth-child(3) {
  animation-delay: 140ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  margin-top: 0;
  font-size: clamp(1.45rem, 2vw, 1.95rem);
}

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

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 0;
}

input,
select,
button {
  font: inherit;
  width: 100%;
  max-width: 100%;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.72rem 0.8rem;
  background: #fff;
  min-height: 44px;
}

input:focus,
select:focus,
button:focus {
  outline: 3px solid #9fd2f5;
  outline-offset: 1px;
}

button[type="submit"] {
  margin-top: 0.9rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--primary-strong);
  color: #fff;
  font-weight: 800;
  padding: 0.8rem 1rem;
  min-height: 44px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.form-actions button {
  flex: 1;
  margin-top: 0;
}

.btn-secondary {
  border: 1px solid #c8d4df;
  border-radius: 0.7rem;
  background: #f8fbff;
  color: #17324c;
  font-weight: 700;
  min-height: 44px;
  cursor: pointer;
}

.hint {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.result {
  margin-top: 0.95rem;
  border: 1px solid #d8e6f2;
  border-left: 8px solid var(--accent);
  border-radius: 0.8rem;
  padding: 0.9rem;
  background: #fcf6eb;
}

.result p {
  margin: 0.3rem 0;
}

.result strong {
  color: #14202f;
}

.result-good {
  border-left-color: var(--success);
  background: #eefbf5;
}

.result-warn {
  border-left-color: #ca6f08;
  background: #fff8ec;
}

.mini-converter {
  margin-top: 1.05rem;
  border-top: 1px solid #e5ebf2;
  padding-top: 0.95rem;
}

.mini-converter h3 {
  margin: 0 0 0.6rem;
  font-size: 1.07rem;
}

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

.convert-result {
  margin: 0.7rem 0 0;
  font-weight: 700;
  color: #1b3a54;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dce5ee;
  border-radius: 0.8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
  background: #ffffff;
}

caption {
  text-align: left;
  padding: 0.7rem 0.8rem;
  font-weight: 700;
  color: #34506a;
  background: #f4f9ff;
}

th,
td {
  padding: 0.65rem 0.8rem;
  border-top: 1px solid #e8eef4;
  text-align: left;
}

th {
  background: #f9fbff;
}

.breed-note {
  margin: 0.95rem 0 0;
  font-size: 0.92rem;
  color: #334a5f;
}

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

.blog-link-grid article {
  border: 1px solid #e3ebf2;
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #f9fcff;
}

.blog-link-grid h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.blog-link-grid p {
  margin: 0;
  font-size: 0.92rem;
  color: #34506a;
}

.blog-link-grid a {
  color: #123c62;
  text-decoration-thickness: 1px;
}

.inline-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 800;
  color: var(--primary-strong);
}

.step-list {
  margin: 0.5rem 0 0.35rem;
  padding-left: 1.25rem;
}

.step-list li {
  margin-bottom: 0.4rem;
}

.howto-note,
.chart-tip {
  margin: 0.45rem 0 0;
  color: #334a5f;
  font-size: 0.92rem;
}

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

.size-grid article {
  border: 1px solid #e4ebf2;
  border-radius: 0.8rem;
  padding: 0.85rem;
  background: #f9fcff;
}

.size-grid h3 {
  margin: 0 0 0.4rem;
}

.faq details {
  border-top: 1px solid #e9eef3;
  padding: 0.65rem 0;
}

.faq details:last-of-type {
  border-bottom: 1px solid #e9eef3;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.disclaimer {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: #304355;
}

.last-updated {
  margin-top: -0.15rem;
  color: #44586c;
  font-size: 0.88rem;
}

.footer {
  max-width: 1040px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #2f4051;
  font-size: 0.92rem;
}

.footer a {
  color: var(--primary-strong);
  font-weight: 700;
}

@media (max-width: 780px) {
  .grid,
  .size-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 0.8rem;
    padding-bottom: 2rem;
  }

  main {
    margin-top: -1.2rem;
    padding: 0 0.75rem;
  }

  .card {
    padding: 1rem;
  }

  .top-nav {
    margin-bottom: 0;
    gap: 0.55rem;
  }

  .site-nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .top-nav a {
    font-size: 0.9rem;
    padding: 0.38rem 0.64rem;
  }

  .hero-content {
    text-align: center;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .hero-media {
    max-width: 260px;
    margin: 0 auto;
  }

  h1 {
    margin-left: auto;
    margin-right: auto;
  }

  .subhead {
    margin-left: auto;
    margin-right: auto;
  }

  .cta {
    margin-top: 0.85rem;
  }

  .calculator h2 {
    text-align: center;
  }

  .form-actions {
    flex-direction: column;
  }

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

  .blog-link-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0 0.75rem;
  }
}

@media (max-width: 430px) {
  .hero {
    padding-left: 0.72rem;
    padding-right: 0.72rem;
  }

  h1 {
    font-size: clamp(1.75rem, 11vw, 2.2rem);
  }

  .subhead {
    font-size: 0.97rem;
  }

  .site-brand {
    font-size: 0.9rem;
  }
}
