:root {
  --fg: #1b1b1b;
  --muted: #6b6b6b;
  --bg: #ffffff;
  --border: #e2e2e2;
  --accent: #2a6df4;
  --warn-bg: #fff3cd;
  --warn-fg: #664d03;
  --highlight-bg: #eef3ff;
  --tooltip-bg: #1b1b1b;
  --tooltip-fg: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px 0;
}
h1 .scale {
  font-weight: 400;
  color: var(--muted);
  font-size: 16px;
}
.sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.callout {
  padding: 10px 14px;
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: 4px;
  font-size: 13px;
  margin: 16px 0;
}
.callout strong { font-weight: 600; }
.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 12px 16px;
  background: #f6f8fa;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  margin: 16px 0;
}
.specs .spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.specs .spec-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.specs .spec-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 32px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
table.recipe {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}
table.recipe th {
  text-align: left;
  padding: 8px 10px;
  background: #f6f8fa;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--fg);
  font-size: 12px;
}
table.recipe td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.recipe tr:hover td { background: #fafbfc; }
table.recipe td.check { width: 36px; text-align: center; padding: 8px 0; }
table.recipe input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1e6b36;
  margin: 0;
}
table.recipe tr.done td { background: #f0f8f3 !important; opacity: 0.55; }
table.recipe tr.done td:not(.check) { color: var(--muted); }
table.recipe tr.done td.check { opacity: 1; }
.recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 32px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.recipe-header h2 { margin: 0; border: none; padding: 0; }
.recipe-header .progress {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.recipe-header button {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  font-family: inherit;
}
.recipe-header button:hover { background: var(--highlight-bg); color: var(--fg); }
.recipe-header .controls { display: flex; align-items: center; gap: 12px; }
table.recipe .num { color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; width: 32px; }
table.recipe .vol-primary { font-weight: 600; background: var(--highlight-bg); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
table.recipe .vol-secondary { color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
table.recipe .conc { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--muted); }
table.recipe .notes { color: var(--warn-fg); font-size: 12px; font-weight: 500; }

/* Reagent hover tooltip */
.reagent {
  position: relative;
  border-bottom: 1px dotted #999;
  cursor: help;
  color: var(--fg);
  text-decoration: none;
}
.reagent[data-tooltip]:hover::after,
.reagent[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 6px;
  background: var(--tooltip-bg);
  color: var(--tooltip-fg);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-line;
  min-width: 220px;
  max-width: 320px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  pointer-events: none;
}
.reagent[data-tooltip]:hover::before,
.reagent[data-tooltip]:focus::before {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 100%;
  margin-bottom: 1px;
  border: 5px solid transparent;
  border-top-color: var(--tooltip-bg);
  z-index: 100;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--muted); }
