:root {
  color-scheme: light;
  --normal-paper: #f5f4ef;
  --normal-surface: #fbfaf6;
  --normal-ink: #222824;
  --normal-muted: #687069;
  --normal-line: #cfd3cc;
  --normal-line-strong: #9fa79f;
  --normal-accent: #245b49;
  --normal-accent-soft: #e2ebe5;
  --normal-danger: #9b2f2f;
  --normal-danger-soft: #f8e9e7;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
button, input { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--normal-accent); outline-offset: 3px; }

.normal-eyebrow,
.normal-section-kicker { margin: 0 0 5px; }
.normal-lead { max-width: 62rem; margin: 0; }
.normal-tool h2,
.normal-content-section h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.48rem); line-height: 1.35; }
.normal-tool h3,
.normal-content-section h3 { margin: 0; line-height: 1.35; }

.normal-tool {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  border: 1px solid var(--normal-line-strong);
  background: var(--normal-surface);
}
.normal-calculator,
.normal-results { min-width: 0; padding: 24px; }
.normal-calculator { border-right: 1px solid var(--normal-line); }
.normal-section-heading { margin-bottom: 15px; }
.normal-section-kicker { color: var(--normal-muted); font-size: .8rem; font-weight: 780; letter-spacing: .05em; }

.normal-input-grid { display: grid; gap: 12px; margin-top: 18px; }
.normal-field { display: grid; gap: 5px; min-width: 0; }
.normal-field label { color: var(--normal-ink); font-size: .9rem; font-weight: 760; }
.normal-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--normal-line-strong);
  border-radius: 2px;
  padding: 9px 10px;
  color: var(--normal-ink);
  background: var(--normal-surface);
  font-variant-numeric: tabular-nums;
}
.normal-field input[aria-invalid="true"] { border-color: var(--normal-danger); background: #fff8f8; }
.normal-input-help { margin: 8px 0 0; color: var(--normal-muted); font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.normal-form-error {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-left: 4px solid var(--normal-danger);
  background: var(--normal-danger-soft);
  color: #762525;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.normal-form-error[hidden] { display: none; }
.normal-form-actions { display: flex; gap: 8px; margin-top: 17px; }
.normal-button { min-height: 44px; border: 1px solid var(--normal-accent); border-radius: 2px; padding: 8px 15px; cursor: pointer; font-weight: 760; }
.normal-button-primary { background: var(--normal-accent); color: #fff; }
.normal-button-primary:hover { background: #1b4738; }
.normal-button-secondary { background: var(--normal-surface); color: var(--normal-accent); }
.normal-button:hover:not(:disabled) { border-color: var(--normal-ink); }

.normal-results-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.normal-status { flex: 0 0 auto; padding: 3px 8px; border: 1px solid var(--normal-line-strong); background: var(--normal-paper); color: var(--normal-muted); font-size: .75rem; font-weight: 760; }
.normal-status[data-state="ready"] { border-color: var(--normal-accent); background: var(--normal-accent-soft); color: var(--normal-accent); }
.normal-status[data-state="error"] { border-color: var(--normal-danger); background: var(--normal-danger-soft); color: var(--normal-danger); }
.normal-result-status { min-height: 3.2em; margin: 13px 0 0; color: #38413b; font-size: .9rem; overflow-wrap: anywhere; }
.normal-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.normal-result-item { min-width: 0; padding: 13px 12px; border: 1px solid var(--normal-line); background: var(--normal-paper); }
.normal-result-item h3 { color: var(--normal-accent); font-size: .92rem; overflow-wrap: anywhere; }
.normal-result-value { display: block; min-height: 2.6em; margin-top: 12px; color: var(--normal-ink); font-size: clamp(1.14rem, 2.25vw, 1.6rem); line-height: 1.3; font-weight: 780; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.normal-result-note { min-height: 2.5em; margin: 6px 0 0; color: var(--normal-muted); font-size: .76rem; line-height: 1.45; overflow-wrap: anywhere; }
.normal-result-equation { margin: 13px 0 0; padding-left: 11px; border-left: 3px solid var(--normal-line-strong); color: var(--normal-muted); font-size: .82rem; overflow-wrap: anywhere; }
.normal-results[data-state="error"] .normal-result-item { opacity: .7; }

.normal-content-section { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--normal-line-strong); }
.normal-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; border-block: 1px solid var(--normal-line); list-style: none; counter-reset: normal-steps; }
.normal-steps li { position: relative; min-width: 0; padding: 35px 12px 13px; border-right: 1px solid var(--normal-line); counter-increment: normal-steps; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.normal-steps li:last-child { border-right: 0; }
.normal-steps li::before { content: counter(normal-steps, decimal-leading-zero); position: absolute; top: 7px; left: 12px; color: var(--normal-accent); font-size: .75rem; font-weight: 800; }
.normal-example,
.normal-scope { margin-top: 18px; border: 1px solid var(--normal-line); }
.normal-example { padding: 12px 13px; background: var(--normal-accent-soft); }
.normal-example h3,
.normal-scope h3 { color: var(--normal-accent); font-size: .92rem; }
.normal-example p { margin: 6px 0 0; font-variant-numeric: tabular-nums; line-height: 1.55; overflow-wrap: anywhere; }
.normal-formula-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--normal-line); border-left: 1px solid var(--normal-line); }
.normal-formula-list article { min-width: 0; display: grid; gap: 3px; padding: 12px 13px; border-right: 1px solid var(--normal-line); border-bottom: 1px solid var(--normal-line); }
.normal-formula-list strong { overflow-wrap: anywhere; }
.normal-formula-list span { color: var(--normal-muted); font-size: .86rem; line-height: 1.5; }
.normal-scope ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.normal-scope li { min-width: 0; padding: 10px 13px; border-top: 1px solid var(--normal-line); border-right: 1px solid var(--normal-line); color: var(--normal-muted); font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
.normal-scope li:last-child { border-right: 0; }

@media (max-width: 900px) {
  .normal-tool { grid-template-columns: 1fr; }
  .normal-calculator { border-right: 0; border-bottom: 1px solid var(--normal-line); }
}

@media (max-width: 700px) {
  .normal-formula-list,
  .normal-scope ul { grid-template-columns: 1fr; }
  .normal-scope li { border-right: 0; }
}

@media (max-width: 600px) {
  .normal-calculator,
  .normal-results { padding: 17px 14px; }
  .normal-result-grid { grid-template-columns: 1fr; }
  .normal-form-actions { display: grid; grid-template-columns: 1fr; }
  .normal-button { width: 100%; }
  .normal-results-heading { gap: 8px; }
  .normal-status { max-width: 46%; overflow-wrap: anywhere; text-align: center; }
  .normal-steps { grid-template-columns: 1fr; }
  .normal-steps li { border-right: 0; border-bottom: 1px solid var(--normal-line); }
  .normal-steps li:last-child { border-bottom: 0; }
}

@media (max-width: 390px) {
  .normal-result-item { padding-inline: 9px; }
  .normal-result-value { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
