* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "IBM Plex Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #f4f4f4;
  color: #161616;
  line-height: 1.6;
}

header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1584px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-container a {
  text-decoration: none;
}

.logo {
  font-size: 1rem;
  font-weight: 600;
  color: #161616;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-menu a {
  color: #525252;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.11s;
}

.nav-menu a:hover {
  color: #0f62fe;
}

.nav-menu a.active {
  color: #0f62fe;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #161616;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    gap: 1rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

.page-container {
  max-width: 1584px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 1px;
  background: #e0e0e0;
}

.sidebar {
  background: #ffffff;
  min-height: calc(100vh - 48px);
}

.ad-container {
  padding: 2rem 1rem;
}

.ad-box {
  background: #f4f4f4;
  border: 1px dashed #8d8d8d;
  padding: 2rem 1rem;
  text-align: center;
  color: #525252;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.ad-box.large {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.ad-box.medium {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.main-content {
  background: #ffffff;
  display: block;
}

.embed-code-section {
  background: #f4f4f4;
  padding: 1.5rem;
  border-radius: 4px;
  margin: 1.5rem 0;
  border-left: 3px solid #0f62fe;
}

.embed-code-box {
  background: #161616;
  color: #f4f4f4;
  padding: 1rem;
  border-radius: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  overflow-x: auto;
  margin: 1rem 0;
  position: relative;
}

.copy-btn {
  background: #0f62fe;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.11s;
}

.copy-btn:hover {
  background: #0353e9;
}

.copy-btn.copied {
  background: #24a148;
}

.title-section {
  background: #161616;
  color: #ffffff;
  padding: 3rem 2rem;
}

.title-section h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.title-section p {
  font-size: 1rem;
  color: #c6c6c6;
  max-width: 600px;
}

.calculator-section {
  padding: 3rem 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: #161616;
}

.calculator-grid {
  max-width: 700px;
}

.input-row {
  margin-bottom: 2rem;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #525252;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.32px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-field {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="number"] {
  flex: 1;
  padding: 1rem;
  border: none;
  border-bottom: 1px solid #8d8d8d;
  background: #f4f4f4;
  font-size: 1.125rem;
  font-family: inherit;
  transition: all 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

input[type="number"]:focus {
  outline: 2px solid #0f62fe;
  outline-offset: -2px;
  border-bottom: 1px solid #0f62fe;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.unit-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.unit-btn {
  padding: 0.5rem 1rem;
  background: #f4f4f4;
  border: 1px solid #e0e0e0;
  color: #525252;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
  font-family: inherit;
}

.unit-btn:hover {
  background: #e0e0e0;
  border-color: #c6c6c6;
}

.unit-btn.active {
  background: #0f62fe;
  border-color: #0f62fe;
  color: #ffffff;
  font-weight: 600;
}

.meter-info {
  background: #f4f4f4;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.meter-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #161616;
  margin-bottom: 1rem;
  text-align: center;
}

.btn-primary {
  background: #0f62fe;
  color: #ffffff;
  border: none;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  margin-top: 1rem;
  width: 100%;
  max-width: 200px;
  transition: background 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.btn-primary:hover {
  background: #0353e9;
}

.results-section {
  padding: 3rem 2rem;
  border-bottom: 1px solid #e0e0e0;
  display: none;
}

.results-section.active {
  display: block;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 800px;
}

.result-tile {
  background: #f4f4f4;
  padding: 1.5rem;
  border-left: 3px solid #0f62fe;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #525252;
  text-transform: uppercase;
  letter-spacing: 0.32px;
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 3rem;
  font-weight: 300;
  color: #161616;
  line-height: 1;
}

.result-category {
  font-size: 1.25rem;
  font-weight: 400;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-left: 3px solid;
}

.category-underweight {
  background: #e5f6ff;
  border-color: #0043ce;
  color: #001d6c;
}

.category-normal {
  background: #defbe6;
  border-color: #198038;
  color: #071908;
}

.category-overweight {
  background: #fff1e6;
  border-color: #8a3800;
  color: #3e1a00;
}

.category-obese {
  background: #fff1f1;
  border-color: #da1e28;
  color: #520408;
}

.meter-section {
  margin: 2rem 0;
  max-width: 800px;
}

.meter-container {
  position: relative;
  height: 48px;
  background: linear-gradient(to right,
      #0043ce 0%,
      #0043ce 18.5%,
      #198038 18.5%,
      #198038 25%,
      #24a148 25%,
      #24a148 30%,
      #f1c21b 30%,
      #f1c21b 35%,
      #ff832b 35%,
      #ff832b 40%,
      #da1e28 40%,
      #da1e28 100%);
  margin: 1.5rem 0;
}

.meter-indicator {
  position: absolute;
  width: 2px;
  height: 100%;
  background: #161616;
  transition: left 0.7s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.meter-indicator::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid #161616;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #525252;
  margin-top: 0.5rem;
}

.meter-label {
  text-align: center;
  font-weight: 400;
}

.meter-label strong {
  display: block;
  color: #161616;
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-secondary {
  background: transparent;
  color: #0f62fe;
  border: 1px solid #0f62fe;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.btn-secondary:hover {
  background: #0f62fe;
  color: #ffffff;
}


.info-section {
  padding: 3rem 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.info-section:last-child {
  border-bottom: none;
}

.info-card {
  max-width: 800px;
  margin-bottom: 2rem;
}

.info-card h3 {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #161616;
}

.info-card p {
  color: #525252;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Blog Section - Carbon Design System List Layout */
.blog-section {
  padding: 3rem 2rem;
  background: #ffffff;
}

.blog-grid {
  max-width: 800px;
  margin: 0 auto;
}

.blog-card {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 2rem 1.5rem;
  margin: 0 -1.5rem;
  transition: background 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.blog-card:first-child {
  padding-top: 2rem;
  margin-top: 0;
}

.blog-card:last-child {
  border-bottom: none;
}

.blog-card:hover {
  background: #f4f4f4;
}

.blog-card-content {
  display: flex;
  flex-direction: column;
}

.blog-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.blog-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f62fe;
  text-transform: uppercase;
  letter-spacing: 0.32px;
}

.blog-meta {
  font-size: 0.75rem;
  color: #8d8d8d;
}

.blog-card-title {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card-title a {
  color: #161616;
  text-decoration: none;
  transition: color 0.11s;
}

.blog-card-title a:hover {
  color: #0f62fe;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: #525252;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #0f62fe;
  text-decoration: none;
  font-weight: 400;
  transition: gap 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.blog-card-link:hover {
  gap: 0.75rem;
}

.blog-card-link svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .blog-section {
    padding: 2rem 1rem;
  }

  .blog-card-title {
    font-size: 1.25rem;
  }
}


.formula-box {
  background: #f4f4f4;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 3px solid #0f62fe;
}

.formula {
  font-size: 1.125rem;
  font-weight: 400;
  color: #161616;
  font-family: "IBM Plex Mono", monospace;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.data-table thead {
  background: #e0e0e0;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #161616;
  border-bottom: 1px solid #c6c6c6;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  color: #525252;
}

.data-table tbody tr:hover {
  background: #f4f4f4;
}

.last-updated {
  background: #f4f4f4;
  padding: 1rem;
  border-left: 3px solid #0f62fe;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: #525252;
}

.policy-section {
  margin-bottom: 2.5rem;
}

.policy-section h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #161616;
  margin-bottom: 1rem;
}

.policy-section h3 {
  font-size: 1.125rem;
  font-weight: 400;
  color: #161616;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.policy-section p {
  color: #525252;
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.policy-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-section li {
  color: #525252;
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.highlight-box {
  background: #e5f6ff;
  border-left: 3px solid #0043ce;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.highlight-box p {
  color: #001d6c;
  margin-bottom: 0.5rem;
}

.highlight-box-warning {
  background: #fff1e6;
  border-left: 3px solid #ff832b;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.highlight-box-warning p {
  color: #3e1a00;
  margin-bottom: 0.5rem;
}

footer {
  background: #161616;
  color: #f4f4f4;
  padding: 2rem 2rem 1rem;
  margin-top: 1px;
}

.footer-content {
  max-width: 1584px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-disclaimer {
  padding: 2rem 0;
  border-bottom: 1px solid #393939;
  color: #c6c6c6;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-disclaimer h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  padding: 2rem 0;
  border-bottom: 1px solid #393939;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-column h4 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column p {
  color: #c6c6c6;
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: #c6c6c6;
  text-decoration: none;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.11s;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.75rem;
  color: #8d8d8d;
}

.footer-bottom a {
  color: #c6c6c6;
  text-decoration: none;
  transition: color 0.11s;
  margin: 0 0.5rem;
}

.footer-bottom a:hover {
  color: #ffffff;
}

@media (max-width: 1280px) {
  .page-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .title-section {
    padding: 2rem 1rem;
  }

  .title-section h1 {
    font-size: 2rem;
  }

  .calculator-section,
  .results-section,
  .info-section {
    padding: 2rem 1rem;
  }
}

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

  .action-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 100%;
  }

  .title-section h1 {
    font-size: 1.75rem;
  }

  .meter-labels {
    font-size: 0.625rem;
  }
}

@media print {

  header,
  footer,
  .sidebar,
  .calculator-section,
  .action-buttons {
    display: none !important;
  }

  .page-container {
    grid-template-columns: 1fr;
    background: white;
  }

  .results-section {
    display: block !important;
  }
}