:root {
  color-scheme: light;
  --bg: #f0f7f6;
  --paper: #fff;
  --tiffany: #81d8d0;
  --ink: #142c2a;
  --muted: #405d5b;
  --line: #c5dfdc;
  --accent: #145853;
  --deep: #103e3a;
  --soft: #d9f3f0;
  --focus: #00766a;
  --radius: 1.05rem;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.65; overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.frame { width: min(100% - 2.25rem, 69rem); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 4.7rem; display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; color: var(--ink); text-decoration: none; font-family: system-ui, sans-serif; font-size: 1.18rem; font-weight: 760; letter-spacing: -.045em; }
.brand img { display: block; flex: none; }
.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .4rem .78rem; border-radius: .6rem; font-size: .91rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.main-nav a[aria-current="page"], .main-nav a:hover { background: var(--soft); color: var(--deep); }
.skip-link { position: absolute; top: .5rem; left: .75rem; padding: .65rem 1rem; z-index: 5; background: var(--paper); transform: translateY(-170%); }
.skip-link:focus { transform: translateY(0); }

.view { min-height: 65vh; }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 27%);
  isolation: isolate;
  overflow: hidden;
  margin-block: 2.3rem 2.6rem;
  border-radius: 1.35rem;
  background: var(--tiffany);
  color: #102f2c;
}
.hero-copy { position: relative; z-index: 1; padding: clamp(1.65rem, 5vw, 3.85rem); }
.hero h1, .tool-heading h1 { margin: 0; font-weight: 730; line-height: 1.24; letter-spacing: -.045em; }
.hero h1 { margin-bottom: .85rem; font-size: clamp(2rem, 5.1vw, 3.75rem); }
.hero p { margin: .2rem 0 0; color: #153f3c; font-size: clamp(1rem, 2vw, 1.13rem); }
.hero-art { position: relative; align-self: stretch; display: flex; gap: clamp(.5rem, 1vw, .85rem); align-items: flex-end; padding: 2rem 2.1rem 2.55rem 0; transform: rotate(-12deg) translate(7%, 12%); }
.hero-art i { height: 35%; flex: 1 1 0; border: 1px solid #32756f; background: #347c7438; border-radius: .5rem .5rem 0 0; }
.hero-art i:nth-child(2) { height: 55%; }
.hero-art i:nth-child(3) { height: 82%; }
.hero-art i:nth-child(4) { height: 62%; }
.hero-art i:nth-child(5) { height: 43%; }
.catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.3rem); }
.catalog-group h2 { margin: 0 0 .8rem; font-size: 1.16rem; }
.cards { display: grid; gap: .65rem; }
.tool-card { display: flex; align-items: center; gap: .85rem; min-height: 5.25rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.tool-card:hover { background: #f5fffe; border-color: #60958f; }
.card-icon { flex: 0 0 2.65rem; min-height: 2.65rem; display: grid; place-items: center; border-radius: .72rem; background: var(--soft); color: var(--accent); font-family: system-ui, sans-serif; font-size: 1.08rem; font-weight: 700; }
.qualitative .card-icon { background: #edf8f6; color: #205653; }
.card-copy { display: grid; gap: .1rem; flex: 1 1 auto; min-width: 0; }
.card-copy strong { font-size: 1.08rem; line-height: 1.4; }
.card-copy > span { color: var(--muted); font-size: .91rem; }
.card-open { flex: 0 0 auto; color: var(--accent); font-size: .88rem; }

.tool-heading { margin: 1.1rem 0 1.4rem; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; font-size: .94rem; margin-bottom: .4rem; }
.tool-heading h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
.tool-heading > p { margin: .55rem 0 0; max-width: 43rem; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 1rem; align-items: start; }
.tool-form, .reader, .tool-result, .method-notes { padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-width: 0; }
.tool-form, .field { display: grid; gap: .4rem; }
.tool-form { gap: .98rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .98rem; }
.field > label, fieldset > legend { font-weight: 660; line-height: 1.5; }
.field small, .tool-form small { color: var(--muted); font-size: .875rem; font-weight: 400; line-height: 1.5; }
fieldset { padding: .8rem; margin: 0; border: 1px solid var(--line); border-radius: .65rem; min-width: 0; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-width: 0; min-height: 48px; border: 1px solid #719792; color: var(--ink);
  border-radius: .55rem; padding: .63rem .72rem; background: var(--paper); font-size: 1rem;
}
select { appearance: none; padding-right: 2.35rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23465b55' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; }
input::placeholder, textarea::placeholder { color: #53675f; }
textarea { resize: vertical; min-height: 6.5rem; }
[aria-invalid="true"] { border-color: #a82c24 !important; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--deep); padding: .5rem .92rem; border-radius: .6rem; background: var(--deep); color: #fff; font-weight: 660; text-align: center; text-decoration: none; }
.button:hover { background: #1a5953; }
.button.secondary { background: var(--paper); color: var(--deep); border-color: #719792; }
.button.secondary:hover { background: var(--soft); }
.button:disabled { opacity: .6; cursor: default; }
.tool-result { background: #e0f5f2; border-color: #acd4cf; }
.tool-result h2, .reader h2 { margin: 0 0 .35rem; font-size: 1.16rem; }
.tool-result p, .tool-form p, .reader p { margin: .5rem 0; }
.tool-result .form-actions, .reader .button { margin-top: .75rem; }
.result-value { display: block; font-variant-numeric: tabular-nums; font-weight: 740; font-size: clamp(1.7rem, 6vw, 2.7rem); line-height: 1.2; margin: .45rem 0; }
.callout, .error { padding: .65rem .8rem; border-radius: .55rem; color: #353c30; background: #e8f4f1; line-height: 1.55; font-size: .92rem; }
.error { color: #842720; background: #f9e9e7; }
.error:empty { display: none; }
.method-notes { margin-block: 1rem; padding-block: .45rem .65rem; }
.method-notes summary { min-height: 44px; align-content: center; color: var(--accent); font-weight: 680; }
.method-notes p { max-width: 62em; margin: .6rem 0; }
.method-notes a { display: inline-block; padding-block: .2rem; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; text-align: left; }
th, td { padding: .55rem .48rem; border-bottom: 1px solid #accfc9; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); }
.footer-inner { min-height: 4.1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1rem; color: var(--muted); font-size: .88rem; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 42rem) {
  .masthead-inner { min-height: 4rem; }
  .brand { gap: .4rem; font-size: 1.04rem; }
  .brand img { width: 30px; height: 30px; }
  .main-nav a { padding-inline: .47rem; font-size: .875rem; }
  .hero { grid-template-columns: minmax(0, 1fr); margin-block: 1.3rem 1.55rem; }
  .hero-copy { padding: 1.45rem 1.1rem 1.55rem; }
  .hero-art { display: none; }
  .catalog, .tool-grid, .field-grid { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
  .catalog { gap: 1.3rem; }
  .catalog-group h2 { margin-bottom: .55rem; }
  .tool-card { min-height: 5.15rem; padding: .78rem; gap: .7rem; }
  .tool-heading { margin-top: .55rem; }
  .form-actions > .button { flex: 1 1 auto; }
  .site-footer { margin-top: 2.15rem; }
}

@media (max-width: 22rem) {
  .frame { width: calc(100% - 1.45rem); }
  .hero h1 { font-size: 1.85rem; }
  .card-open { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}

label.field { font-weight: 640; }
label.field small, label.field input, label.field select { font-weight: 400; }
