.weight-hero {
  padding: 54px 0 62px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.breadcrumb {
  display: flex;
  gap: 9px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a { color: var(--green-dark); }

.weight-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr);
  gap: 58px;
  align-items: center;
}

.weight-copy h1 { max-width: 590px; }

.quick-answer {
  margin: 24px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--green);
  background: var(--green-pale);
  color: var(--green-dark);
  font-weight: 760;
  line-height: 1.5;
}

.weight-tool {
  min-width: 0;
  border: 1px solid #cfd9d1;
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 33, 27, .08);
}

.tool-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.tool-heading h2 {
  margin: 0;
  font-size: 24px;
}

.unit-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 3px;
  background: #eef1ee;
}

.unit-button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.unit-button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(23, 33, 27, .14);
}

.weight-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.weight-error {
  margin: 14px 0 0;
  color: #a2382f;
  font-size: 13px;
}

.weight-result {
  margin-top: 20px;
  border-radius: var(--radius);
  padding: 18px;
  background: #17211b;
  color: #fff;
}

.weight-primary {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 840;
  line-height: 1.05;
}

.weight-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.weight-result-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
}

.weight-note {
  margin: 15px 0 0;
  color: #aebdb3;
  font-size: 12px;
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.weight-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  font-size: 14px;
}

.weight-table th,
.weight-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #e7ece8;
  text-align: right;
  white-space: nowrap;
}

.weight-table th:first-child,
.weight-table td:first-child { text-align: left; }

.weight-table th {
  background: #edf3ee;
  color: #4c5a51;
  font-size: 12px;
  text-transform: uppercase;
}

.weight-table tr:last-child td { border-bottom: 0; }

.explain-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.explain-grid p,
.explain-grid li,
.source-note,
.safety-panel p,
.related-link span {
  color: var(--muted);
  line-height: 1.65;
}

.explain-grid ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.formula-band {
  margin-top: 18px;
  border-left: 3px solid var(--blue-ink);
  padding: 16px 18px;
  background: var(--blue-pale);
}

.formula-band code {
  display: block;
  margin-top: 8px;
  color: var(--blue-ink);
  font-weight: 760;
  white-space: normal;
}

.source-note {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
}

.source-note a {
  color: var(--green-dark);
  font-weight: 740;
}

.safety-panel {
  border-left: 4px solid #c07a1b;
  padding: 22px 24px;
  background: #fff8ea;
}

.safety-panel h2 { font-size: 25px; }

.related-link {
  display: grid;
  gap: 8px;
  border-top: 3px solid var(--green);
  padding-top: 17px;
  text-decoration: none;
}

.related-link:hover strong { color: var(--green-dark); }

[hidden] { display: none !important; }

@media (max-width: 840px) {
  .weight-layout { grid-template-columns: 1fr; }
  .weight-copy h1 { max-width: 720px; }
}

@media (max-width: 560px) {
  .weight-hero { padding: 38px 0 48px; }
  .breadcrumb { margin-bottom: 28px; }
  .weight-tool { padding: 18px 14px; }
  .tool-heading { align-items: flex-start; flex-direction: column; }
  .unit-toggle { width: 100%; }
  .unit-button { flex: 1; }
  .weight-fields,
  .weight-result-grid,
  .explain-grid,
  .related-grid { grid-template-columns: 1fr; }
  .weight-primary { font-size: 31px; }
}
