* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", Arial, sans-serif; color: #222; background: #fff; line-height: 1.6; font-size: 15px; }
a { color: #185FA5; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid #ddd; padding: 12px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 20px; font-weight: 600; color: #0C447C; }
nav a { margin-left: 18px; font-size: 14px; color: #444; }
.breadcrumb { font-size: 13px; color: #666; margin: 14px 0 6px; }
h1 { font-size: 26px; font-weight: 600; color: #0C447C; margin-bottom: 6px; }
.subtitle { color: #555; font-size: 14px; margin-bottom: 18px; }
.lede { color: #444; font-size: 16px; line-height: 1.7; margin-bottom: 20px; max-width: 780px; }
/* Ad slot: now a real <ins class="adsbygoogle"> unit. The dashed placeholder
   look is gone — a live ad renders its own frame, so the container only needs
   to reserve vertical rhythm and stay out of the way. min-height prevents CLS
   while the ad script is still fetching. */
.adslot { margin: 22px 0; min-height: 90px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.adslot ins { width: 100%; }
.panel { border: 1px solid #d5d5d5; border-radius: 6px; padding: 20px; margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 220px 1fr; gap: 12px 16px; align-items: center; }
label { font-size: 14px; color: #333; text-align: right; }
input[type=number], input[type=text], input[type=date], select { width: 100%; max-width: 320px; padding: 8px 10px; border: 1px solid #bbb; border-radius: 4px; font-size: 14px; }
button, .btn { background: #185FA5; color: #fff; border: none; padding: 9px 22px; border-radius: 4px; font-size: 14px; cursor: pointer; }
button:hover { background: #0C447C; }
.result { background: #E6F1FB; border: 1px solid #85B7EB; border-radius: 6px; padding: 16px 20px; margin-bottom: 22px; position: relative; }
.result .big { font-size: 24px; font-weight: 600; color: #0C447C; }
.note { font-size: 13px; color: #666; margin-top: 8px; }
h2 { font-size: 19px; font-weight: 600; color: #0C447C; margin: 26px 0 10px; }
.content p { margin-bottom: 12px; color: #333; }
.content ul { margin: 0 0 14px 22px; }
.content li { margin-bottom: 6px; }
table.data { border-collapse: collapse; width: 100%; max-width: 560px; margin: 12px 0 20px; font-size: 14px; }
table.data th, table.data td { border: 1px solid #ccc; padding: 7px 12px; text-align: left; }
table.data th { background: #f1f1f1; font-weight: 500; }
.related { border-top: 1px solid #ddd; padding-top: 14px; margin: 26px 0 40px; font-size: 14px; }
.related a { margin-right: 16px; }
.footnav { border-top: 1px solid #ddd; padding-top: 14px; font-size: 13px; color: #777; }
.footnav a { margin-right: 18px; color: #555; }
footer.site { border-top: 1px solid #ddd; padding: 18px 0; font-size: 13px; color: #777; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 18px 0 30px; }
.card { border: 1px solid #d5d5d5; border-radius: 6px; padding: 14px 16px; }
.card h3 { font-size: 15px; margin-bottom: 8px; color: #0C447C; }
.card ul { list-style: none; }
.card li { padding: 3px 0; font-size: 14px; }
.unit-toggle { margin-bottom: 14px; font-size: 14px; }
.unit-toggle label { text-align: left; margin-right: 18px; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; gap: 6px 16px; }
  label { text-align: left; }
  input[type=number], input[type=text], input[type=date], select { font-size: 16px; max-width: 100%; }
}
input:focus, select:focus { border-color: #185FA5; outline: 2px solid #85B7EB; outline-offset: 1px; }
.copybtn { position: absolute; top: 10px; right: 12px; background: #fff; color: #185FA5; border: 1px solid #85B7EB; border-radius: 4px; font-size: 12px; padding: 4px 12px; cursor: pointer; }
.copybtn:hover { background: #E6F1FB; }
@media print {
  header.site nav, .adslot, .copybtn, .related { display: none; }
  body { font-size: 12px; }
}

/* ---- content expansion components ---- */
h3 { font-size: 16px; font-weight: 600; color: #0C447C; margin: 18px 0 8px; }
.content h2:first-child { margin-top: 8px; }
.toc { border: 1px solid #d5d5d5; border-radius: 6px; padding: 14px 18px; margin: 0 0 24px; background: #fafbfc; }
.toc strong { display: block; font-size: 14px; color: #0C447C; margin-bottom: 8px; }
.toc ol { margin: 0 0 0 20px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 4px; font-size: 14px; break-inside: avoid; }
table.data caption { caption-side: top; text-align: left; font-size: 14px; color: #555; padding-bottom: 8px; }
table.data tbody tr:nth-child(even) td { background: #fafafa; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data.compact { max-width: 460px; }
table.data.compact th, table.data.compact td { padding: 5px 10px; font-size: 13px; }
table.data th .alt { font-weight: 400; color: #888; font-size: 12px; }
.srcline { font-size: 13px; color: #777; margin: -6px 0 14px; }
.scale { margin: 16px 0 26px; }
.scale-bar { display: flex; height: 26px; border-radius: 4px; overflow: hidden; border: 1px solid #bbb; }
.scale-bar span { display: block; }
.sc-under { background: #9DC3E6; }
.sc-normal { background: #60B26B; }
.sc-over { background: #F6C344; }
.sc-obese { background: #E8705A; }
.scale-legend { display: flex; margin-top: 6px; font-size: 11px; color: #666; }
.scale-legend span { text-align: center; line-height: 1.3; }
.scale-legend b { display: block; font-weight: 500; color: #444; }
.marker-row { position: relative; height: 20px; margin-top: 2px; }
.marker { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: #0C447C; font-weight: 600; white-space: nowrap; }
.marker::before { content: ""; position: absolute; left: 50%; top: -12px; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #0C447C; }
.formula { background: #f6f8fa; border: 1px solid #dde3ea; border-left: 4px solid #185FA5; border-radius: 4px; padding: 12px 16px; margin: 12px 0; font-size: 14px; }
.formula .eq { font-size: 16px; font-weight: 600; color: #0C447C; margin: 4px 0; }
.refs { font-size: 13px; color: #555; }
.refs li { margin-bottom: 7px; }
.faq { margin-top: 8px; }
.faq h3 { margin-top: 16px; }
.faq p { margin-bottom: 6px; }
.childbox { border: 1px solid #d5d5d5; border-radius: 6px; padding: 14px 18px; margin: 0 0 20px; background: #fcfcfd; }
.childbox .form-grid { grid-template-columns: 200px 1fr; }
.kv { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; margin-top: 8px; }
.kv span { background: #fff; border: 1px solid #85B7EB; border-radius: 4px; padding: 4px 10px; }
.savebtn { background: #fff; color: #185FA5; border: 1px solid #85B7EB; border-radius: 4px; font-size: 12px; padding: 4px 12px; cursor: pointer; }
.savebtn:hover { background: #E6F1FB; }
.saved { margin-top: 12px; font-size: 13px; }
.saved div { display: flex; justify-content: space-between; border-bottom: 1px dotted #ccc; padding: 4px 0; }
.callout { border-radius: 6px; padding: 14px 18px; margin: 0 0 22px; font-size: 14px; line-height: 1.65; }
.callout p { margin: 0; }
.callout.warn { background: #FCF4E8; border: 1px solid #EFCFA0; border-left: 4px solid #BA7517; }
.callout.warn strong { color: #854F0B; }
.callout.info { background: #EAF3FB; border: 1px solid #B5D4F4; border-left: 4px solid #185FA5; }
.callout.warn a, .callout.info a { color: inherit; }
@media (max-width: 640px) {
  .toc ol { columns: 1; }
  .childbox .form-grid { grid-template-columns: 1fr; }
  .scale-legend { font-size: 9px; }
}
