.rnt-tools {
  --rnt-ink: #263b41;
  --rnt-muted: #68797d;
  --rnt-line: #cfddda;
  --rnt-surface: #f4faf8;
  --rnt-blue: #2d817b;
  --rnt-blue-dark: #285f60;
  --rnt-error: #b3261e;
  --rnt-warning: #8a4b08;
  color: var(--rnt-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.65;
  margin: 2em auto;
  max-width: 980px;
}

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

.rnt-tools__header {
  background: var(--rnt-surface);
  border: 1px solid var(--rnt-line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 22px;
}

.rnt-tools__eyebrow {
  color: var(--rnt-blue-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.rnt-tools h2,
.rnt-tools h3 {
  color: var(--rnt-ink);
  letter-spacing: 0;
}

.rnt-tools h2 {
  font-size: 23px;
  line-height: 1.35;
  margin: 0;
}

.rnt-tools__header > p:last-child {
  color: var(--rnt-muted);
  font-size: 14px;
  margin: 7px 0 0;
}

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

.rnt-tools__sampling-note {
  border-left: 3px solid var(--rnt-blue);
  color: var(--rnt-muted);
  font-size: 13px;
  margin: 0 0 18px;
  padding: 8px 11px;
}

.rnt-calculator {
  background: #fff;
  border: 1.5px solid var(--rnt-line);
  border-radius: 8px;
  overflow: hidden;
}

.rnt-calculator__header {
  background: var(--rnt-surface);
  border-bottom: 1px solid var(--rnt-line);
  padding: 15px 16px 13px;
}

.rnt-calculator h3 {
  font-size: 19px;
  line-height: 1.35;
  margin: 0;
}

.rn-clinical-note .rnt-tools .rnt-calculator h3 {
  display: block;
  margin: 0;
  color: var(--rnt-ink);
  background: none;
}

.rnt-calculator__header p {
  color: var(--rnt-muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.rnt-calculator__form {
  padding: 15px 16px 0;
}

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

.rnt-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rnt-input-wrap {
  align-items: center;
  border: 1px solid #aebfcd;
  border-radius: 6px;
  display: flex;
  min-height: 46px;
  overflow: hidden;
}

.rnt-input-wrap:focus-within,
.rnt-field select:focus {
  border-color: var(--rnt-blue);
  box-shadow: 0 0 0 3px rgba(36, 116, 168, .16);
  outline: none;
}

.rnt-field input,
.rnt-field select {
  background: #fff;
  border: 1px solid #aebfcd;
  border-radius: 6px;
  color: var(--rnt-ink);
  font: inherit;
  font-size: 16px;
  min-height: 46px;
  padding: 8px 10px;
  width: 100%;
}

.rnt-input-wrap input {
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.rnt-input-wrap span {
  color: var(--rnt-muted);
  flex: 0 0 auto;
  font-size: 12px;
  padding: 0 10px 0 3px;
}

.rnt-field input:focus {
  box-shadow: none;
  outline: none;
}

.rnt-field select[aria-invalid="true"],
.rnt-input-wrap.is-invalid {
  border-color: var(--rnt-error);
  box-shadow: 0 0 0 2px rgba(179, 38, 30, .12);
}

.rnt-calculator__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 11px;
}

.rnt-reset {
  background: transparent;
  border: 0;
  color: var(--rnt-blue-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  min-height: 44px;
  padding: 8px;
  touch-action: manipulation;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rnt-result {
  background: #edf7f5;
  border-top: 1px solid #d3e5e1;
  margin-top: 14px;
  min-height: 106px;
  padding: 14px 16px;
}

.rnt-result__label {
  color: var(--rnt-muted);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}

.rnt-result__value {
  color: var(--rnt-blue-dark);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 2px 0 0;
}

.rnt-result__message {
  color: var(--rnt-muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 5px 0 0;
}

.rnt-result__message.is-error {
  color: var(--rnt-error);
}

.rnt-result__message.is-warning {
  color: var(--rnt-warning);
  font-weight: 700;
}

.rnt-result__grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.rnt-result__item {
  background: rgba(255, 255, 255, .72);
  border: 1px solid #d3e5e1;
  border-radius: 6px;
  padding: 9px 10px;
}

.rnt-result__item span,
.rnt-result__item strong {
  display: block;
}

.rnt-result__item--primary {
  grid-column: 1 / -1;
  border-color: #9ccdc6;
  background: #fff;
}

.rnt-result__item--primary strong {
  font-size: 26px;
}

.rnt-field[hidden] {
  display: none;
}

.rnt-result__item span {
  color: var(--rnt-muted);
  font-size: 11px;
  line-height: 1.35;
}

.rnt-result__item strong {
  color: var(--rnt-blue-dark);
  font-size: 18px;
  line-height: 1.4;
  margin-top: 3px;
}

.rnt-interpretation {
  background: #fffdf5;
  border-top: 1px solid #e7dfbf;
  padding: 13px 16px 14px;
}

.rnt-interpretation__title {
  color: var(--rnt-ink);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 7px;
}

.rnt-interpretation__table {
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  width: 100%;
}

.rnt-interpretation__table th,
.rnt-interpretation__table td {
  border-bottom: 1px solid #e7e2ce;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.rnt-interpretation__table th {
  color: var(--rnt-blue-dark);
  font-weight: 700;
  white-space: nowrap;
  width: 28%;
}

.rnt-interpretation__table tr:last-child th,
.rnt-interpretation__table tr:last-child td {
  border-bottom: 0;
}

.rnt-interpretation__note {
  color: var(--rnt-muted);
  font-size: 11px;
  line-height: 1.55;
  margin: 8px 0 0;
}

.rnt-details {
  border-top: 1px solid var(--rnt-line);
  color: var(--rnt-muted);
  font-size: 13px;
  padding: 12px 16px 15px;
}

.rnt-details summary {
  align-items: center;
  color: var(--rnt-blue-dark);
  cursor: pointer;
  display: flex;
  font-weight: 700;
  min-height: 44px;
  touch-action: manipulation;
}

.rnt-details summary:focus-visible,
.rnt-reset:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(36, 116, 168, .3);
  outline-offset: 2px;
}

.rnt-details p {
  margin: 10px 0 0;
}

.rnt-details strong {
  color: var(--rnt-ink);
}

.rnt-tools__disclaimer {
  color: var(--rnt-muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 18px 0 0;
}

.rnt-tools--single .rnt-tools__grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 680px) {
  .rnt-tools {
    margin: 1.5em auto;
  }

  .rnt-tools__header {
    padding: 18px 16px;
  }

  .rnt-tools h2 {
    font-size: 21px;
  }

  .rnt-tools__grid {
    grid-template-columns: 1fr;
  }

  .rnt-calculator__form {
    padding: 14px 14px 0;
  }

  .rnt-result {
    padding: 13px 14px;
  }

  .rnt-interpretation {
    padding: 12px 14px 13px;
  }
}

@media (max-width: 480px) {
  .rnt-fields {
    grid-template-columns: 1fr;
  }

  .rnt-result__grid {
    grid-template-columns: 1fr;
  }
}
