:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-synthesis: none;
  --bg: #f5f5f7;
  --surface: #fff;
  --secondary: #f6f7fa;
  --ink: #18181b;
  --muted: #525462;
  --stroke: #dce0e7;
  --accent: #0054bd;
  --accent-soft: #e9f2ff;
  --focus: #1668da;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --shadow: 0 2px 8px #15223908, 0 12px 28px #15223906;
}
[data-theme="violet"] { --accent: #6540ae; --accent-soft: #eee8fc; --focus: #7350c5; }
[data-theme="vert"] { --accent: #225d4d; --accent-soft: #e8f3ee; --focus: #226653; }
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #17191d;
    --surface: #22252a;
    --secondary: #1a1c20;
    --ink: #f5f5f7;
    --muted: #bec5d2;
    --stroke: #3b404a;
    --accent: #9ac6ff;
    --accent-soft: #25374d;
    --focus: #79acff;
    --shadow: 0 3px 16px #0003;
  }
  [data-theme="violet"] { --accent: #d3bcff; --accent-soft: #382d4c; --focus: #d3bcff; }
  [data-theme="vert"] { --accent: #9ee4cb; --accent-soft: #233d36; --focus: #85d6b8; }
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-underline-offset: .17em; }
button, textarea, input { font: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(100% - 48px, 1080px); margin-inline: auto; }
.skip { position: absolute; inset: 8px auto auto 12px; padding: 10px 14px; background: var(--surface); z-index: 2; }
.skip:not(:focus) { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--stroke); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-weight: 680; text-decoration: none; letter-spacing: -.02em; }
.mark { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 730; }
.header-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.header-nav a:hover { text-decoration: underline; }
.hero { margin-block: clamp(28px, 6vw, 66px) clamp(22px, 4vw, 38px); }
.hero h1, .information h1 { margin: 0; font-size: clamp(2.05rem, 5.8vw, 3.95rem); font-weight: 670; letter-spacing: -.052em; line-height: 1.04; max-width: 17ch; text-wrap: balance; }
.hero p { margin: 15px 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.19rem); line-height: 1.5; max-width: 56ch; }
.tool, .information { border: 1px solid var(--stroke); background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); }
.tool { overflow: hidden; }
.tool-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--stroke); }
.tool-bar strong { letter-spacing: -.014em; }
.tool-bar button, .actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  background: var(--secondary);
  color: var(--ink);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 620;
  transition: transform 145ms var(--ease), background-color 130ms ease;
}
.actions .primary, .tool-bar button { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
button:active:not(:disabled):not(:focus-visible) { transform: scale(.97); }
button:disabled { opacity: .48; cursor: default; }
@media (hover: hover) {
  button:not(:disabled):hover { background: var(--accent-soft); }
  .actions .primary:not(:disabled):hover { background: var(--secondary); }
}
.panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pane { min-width: 0; padding: 17px 18px 14px; }
.pane + .pane { border-left: 1px solid var(--stroke); }
.pane label, .field-label { display: block; margin: 0 0 9px; font-weight: 640; }
textarea {
  width: 100%;
  min-height: 176px;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--secondary);
  resize: vertical;
  line-height: 1.55;
}
textarea::placeholder { color: var(--muted); }
fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.controls, .oral-controls { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 4px 18px 13px; }
.controls legend, .oral-controls legend { padding: 0 18px; color: var(--muted); font-size: .86rem; }
.check { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .88rem; color: var(--ink); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.tool-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 12px 18px; border-top: 1px solid var(--stroke); }
.tool-bottom p { font-size: .9rem; color: var(--muted); margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.oral-panes { grid-template-columns: 3fr 2fr; }
.metrics { background: var(--secondary); }
.metrics dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 0; }
.metrics dl div:first-child { grid-column: 1 / -1; }
.metrics dt { color: var(--muted); font-size: .9rem; }
.metrics dd { margin: 3px 0 0; font-variant-numeric: tabular-nums; font-size: clamp(1.35rem, 4vw, 2.6rem); letter-spacing: -.045em; font-weight: 670; overflow-wrap: anywhere; }
.metrics dl div:first-child dd { font-size: clamp(2.4rem, 7vw, 3.8rem); }
.metrics p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.oral-controls { gap: 12px; padding-block: 8px 17px; }
.oral-controls > div { flex: 1 1 150px; }
.oral-controls .range { flex-basis: 250px; }
input[type="range"] { width: 100%; min-height: 34px; margin: 0; accent-color: var(--accent); }
input[type="number"] { width: 100%; min-height: 43px; color: var(--ink); background: var(--secondary); border: 1px solid var(--stroke); border-radius: 9px; padding: 7px 9px; }
.notes, .related { margin-block: 39px; }
.notes h2, .related h2 { margin: 0 0 13px; font-size: 1.42rem; letter-spacing: -.022em; }
.notes h3 { margin: 0 0 5px; font-size: 1rem; }
.notes p, .information p { color: var(--muted); line-height: 1.65; margin: 0; max-width: 70ch; }
.notes article + article { margin-top: 15px; }
.related ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.related a { display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 70px; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 13px; background: var(--surface); text-decoration: none; }
.related a:hover strong { text-decoration: underline; }
.related a span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.site-footer { margin-top: 38px; padding-block: 13px; border-top: 1px solid var(--stroke); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 3px 18px; align-items: center; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .86rem; text-decoration: none; color: var(--muted); }
.footer-nav a:hover { text-decoration: underline; }
.information { margin-block: 38px; padding: clamp(20px, 5vw, 42px); }
.information h1 { font-size: clamp(2rem, 5vw, 3rem); }
.information h2 { margin: 24px 0 7px; font-size: 1.2rem; }
.information p { margin-top: 14px; }
@media (max-width: 685px) {
  .wrap { width: min(100% - 30px, 1080px); }
  .panes, .related ul { grid-template-columns: 1fr; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--stroke); }
  .tool, .information { border-radius: 18px; }
  .pane, .tool-bar, .tool-bottom { padding-inline: 12px; }
  .controls, .oral-controls { padding-inline: 12px; }
  .controls legend, .oral-controls legend { padding-inline: 12px; }
  textarea { min-height: 144px; }
  .notes, .related { margin-block: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none !important; }
  button:active:not(:disabled):not(:focus-visible) { transform: none; }
}
