:root {
  --bg: #eef4fb;
  --surface: #ffffff;
  --surface-2: #f6f9fd;
  --surface-3: #e8f0fa;
  --line: #c8d6e8;
  --line-strong: #9fb6d2;
  --text: #102033;
  --muted: #53667f;
  --accent: #2f6fb3;
  --accent-strong: #1f5a98;
  --accent-soft: #dceaf8;
  --accent-soft-2: #cfe3f8;
  --success: #0f6b59;
  --danger: #a63d3d;
  --shadow: 0 1px 0 rgba(16, 32, 51, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
input, select, button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  outline: none;
  border-radius: 0;
}
input, select { width: 100%; padding: 0 14px; }
button { padding: 0 16px; }
input:focus, select:focus, button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.back-link::before { content: "←"; }
.tag,
.badge,
.summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}
.metric-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.metric-inline span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}
.metric-inline strong {
  font-size: 16px;
}
.text-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
}
.text-button:hover { text-decoration: underline; }
.message-inline {
  color: var(--muted);
  font-size: 14px;
}

.tool-button,
.basket-link-button,
.result-basket-button,
.material-basket-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent-strong);
  text-decoration: none;
  white-space: nowrap;
}
.tool-button.is-disabled,
.basket-link-button.is-disabled,
.result-basket-button.is-disabled,
.material-basket-button.is-disabled {
  pointer-events: none;
  opacity: .56;
}
.basket-link-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(47,111,179,0.14);
  background: rgba(47,111,179,0.08);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}
.result-basket-button.is-added,
.material-basket-button.is-added {
  border-color: rgba(67, 122, 67, 0.24);
  background: rgba(102, 153, 102, 0.08);
  color: #37653d;
}
