/* BakingCalcs stylesheet. No frameworks: custom properties, grid and a few :has() rules. */

:root {
  --bg: #f6efe3;
  --bg-soft: #fbf7ef;
  --panel: #fffdf8;
  --ink: #2a211b;
  --ink-soft: #5d5047;
  --ink-faint: #74655a;
  --line: #e4d8c6;
  --crust: #b5551f;
  --crust-dark: #8f3f11;
  --crust-soft: #f7e4d4;
  --crust-ink: #ffffff;
  --tip: #e6efe3;
  --tip-ink: #3f5d3b;
  --warn: #f8ecd2;
  --warn-ink: #7a5410;
  --flour: #d9a441;
  --water: #4f8ea6;
  --starter: #b8647a;
  --salt: #8f877b;
  --other: #6e8b6b;
  --footer-bg: #2a211b;
  --footer-ink: #eadfd2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 10px 28px -16px rgba(60, 40, 20, 0.28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1712;
    --bg-soft: #241d17;
    --panel: #27201a;
    --ink: #f1e8dc;
    --ink-soft: #c9bcae;
    --ink-faint: #97897b;
    --line: #3b3129;
    --crust: #e3905a;
    --crust-dark: #f0a877;
    --crust-soft: #3a271c;
    --crust-ink: #1c1712;
    --tip: #22301f;
    --tip-ink: #b9d3b2;
    --warn: #3a2f16;
    --warn-ink: #f0d59a;
    --flour: #e0b45a;
    --water: #6aa9c2;
    --starter: #d0849a;
    --salt: #a39b8f;
    --other: #8fae8b;
    --footer-bg: #120e0b;
    --footer-ink: #d9cdbf;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main {
  flex: 1;
  padding-block: 28px 64px;
}

svg {
  max-width: 100%;
}

a {
  color: var(--crust-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--crust);
}

:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.2rem + 2.6vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.1vw, 1.95rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.9rem;
}

.nowrap {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 8px 20px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-block: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-name em {
  font-style: normal;
  color: var(--crust);
}

.logo-mark {
  width: 34px;
  height: 34px;
  color: var(--crust);
  flex: none;
}

.site-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--crust-dark);
  background: var(--crust-soft);
}

.units {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
  min-height: 38px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s;
}

.units:hover {
  border-color: var(--crust);
}

.units-label {
  transition: opacity 0.15s;
  font-variant-numeric: tabular-nums;
}

/* The option that is not selected stays readable, only plainer than the selected one. */
.units .units-us,
.units[aria-pressed="true"] .units-metric {
  color: var(--ink-faint);
}

.units[aria-pressed="false"] .units-metric,
.units[aria-pressed="true"] .units-us {
  color: var(--crust-dark);
}

.units-track {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  transition: background 0.2s;
}

.units-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.units[aria-pressed="true"] .units-track {
  background: var(--crust);
}

.units[aria-pressed="true"] .units-knob {
  transform: translateX(16px);
}

/* ---------------------------------------------------------------- breadcrumbs and page head */

.breadcrumbs {
  padding-block: 14px 0;
  font-size: 0.9rem;
}

.breadcrumbs ol {
  list-style: none;
  margin-block: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--ink-faint);
}

.breadcrumbs li + li::before {
  content: "\203A";
  margin-right: 10px;
  color: var(--ink-faint);
}

.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.page-head {
  max-width: 760px;
  margin: 18px 0 28px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crust-dark);
  margin: 0 0 10px;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.page-narrow {
  max-width: 760px;
  margin-inline: auto;
}

/* ---------------------------------------------------------------- hero (home) */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: center;
  padding: 24px 0 48px;
}

.hero h1 {
  font-size: clamp(2.3rem, 1.3rem + 3.2vw, 4rem);
  line-height: 1.05;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-dough {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero-dough-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin: 0 0 14px;
}

.demo-bar {
  height: 26px;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--crust);
  background: var(--panel);
  color: var(--crust-dark);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--crust-soft);
  color: var(--crust-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-primary {
  background: var(--crust);
  color: var(--crust-ink);
}

.btn-primary:hover {
  background: var(--crust-dark);
  color: var(--crust-ink);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink-soft);
  font-weight: 500;
}

.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.link-btn {
  background: none;
  border: 0;
  padding: 8px 10px;
  min-height: 36px;
  border-radius: 6px;
  color: var(--ink-faint);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--crust-dark);
}

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cards-3,
.cards-4 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

@media (min-width: 900px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .cards-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}

a.card:hover {
  transform: translateY(-2px);
  border-color: var(--crust);
  color: var(--ink);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--crust-soft);
  color: var(--crust-dark);
  margin-bottom: 6px;
}

.icon {
  width: 24px;
  height: 24px;
}

.card-guide .card-icon {
  background: var(--tip);
  color: var(--tip-ink);
}

.card-kind {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

.card-text {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.card-static a {
  color: var(--crust-dark);
}

/* ---------------------------------------------------------------- calculator layout */

.tool {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 920px) {
  .tool {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    align-items: start;
  }
  .panel-inputs {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.panel-title {
  font-size: 1.35rem;
  margin: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

/* Fields shown only for some choices. */
.tool:not(:has([data-k="shape"][value="round"]:checked)) [data-only="round"],
.tool:not(:has([data-k="shape"][value="rect"]:checked)) [data-only="rect"],
.tool:not(:has(select[data-k="style"] > option[value="custom"]:checked)) [data-only="custom"],
.tool:not(:has([data-k="leaven"][value="yeast"]:checked)) [data-only="yeast"],
.tool:not(:has([data-k="leaven"][value="starter"]:checked)) [data-only="starter"],
.tool:not(:has([data-k="mode"][value="keep"]:checked)) [data-only="keep"],
.tool:not(:has([data-k="mode"][value="want"]:checked)) [data-only="want"] {
  display: none;
}

/* ---------------------------------------------------------------- fields */

.field {
  display: grid;
  gap: 6px;
  margin-block: 14px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-control {
  position: relative;
  display: block;
}

input[type="number"],
input[type="text"],
input[type="time"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-faint);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--crust);
  box-shadow: 0 0 0 3px var(--crust-soft);
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  font-variant-numeric: tabular-nums;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-control input,
.field-control select {
  padding-right: 54px;
}

.field-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-faint);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.hint {
  font-size: 0.85rem;
  color: var(--ink-faint);
  line-height: 1.45;
}

/* Slider with a number box */

.field-slider .field-label {
  display: block;
  margin-bottom: 6px;
}

.slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 14px;
  align-items: center;
}

.slider-value {
  position: relative;
  display: block;
}

.slider-value input {
  padding: 8px 40px 8px 10px;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 36px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--crust);
  border: 2px solid var(--panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--crust);
  border: 2px solid var(--panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

input[type="range"]:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}

.chip {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.chip:hover {
  border-color: var(--crust);
  background: var(--crust-soft);
  color: var(--crust-dark);
}

/* Segmented control */

.field-segmented {
  border: 0;
  padding: 0;
  margin-inline: 0;
}

.field-segmented legend {
  padding: 0;
  margin-bottom: 6px;
}

.segmented {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.seg-opt {
  flex: 1;
  min-width: 0;
}

.seg-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.seg-opt span {
  display: block;
  text-align: center;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}

.seg-opt:hover span {
  color: var(--ink);
}

.seg-opt:has(input:checked) span {
  background: var(--panel);
  color: var(--crust-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.seg-opt:has(input:focus-visible) span {
  outline: 3px solid var(--water);
  outline-offset: 2px;
}

/* Collapsible extras */

.more {
  margin-block: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.more summary {
  padding: 10px 0;
  min-height: 40px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--crust-dark);
}

.more[open] summary {
  margin-bottom: 4px;
}

/* Editable rows */

.rows-head,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 64px 32px;
  gap: 8px;
  align-items: center;
}

.rows-head-wide,
.row-wide {
  grid-template-columns: minmax(0, 1fr) 86px 112px 32px;
}

.rows-head {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-inline: 2px;
}

.row {
  margin-block: 8px;
}

.row input[type="number"],
.row input[type="text"],
.row select {
  padding: 8px 10px;
  font-size: 0.98rem;
}

.row-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: pointer;
}

.row-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--crust);
  margin: 0;
}

.row-remove {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  color: var(--ink-faint);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.row-remove:hover {
  border-color: var(--line);
  color: var(--crust-dark);
  background: var(--bg-soft);
}

.paste {
  resize: vertical;
  min-height: 120px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.parse-msg {
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-height: 1.4em;
  margin: 10px 0 6px;
}

/* ---------------------------------------------------------------- results */

.panel-results {
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat,
.peak {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.peak {
  margin-bottom: 16px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.peak .stat-value {
  font-size: 1.3rem;
}

.stat-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.amt .w {
  font-variant-numeric: tabular-nums;
}

.sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--crust-soft);
  color: var(--crust-dark);
  vertical-align: middle;
}

/* Composition bar */

.bar {
  display: flex;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
  margin-bottom: 10px;
}

.seg {
  display: block;
  min-width: 2px;
}

.seg-flour {
  background: var(--flour);
}

.seg-water {
  background: var(--water);
}

.seg-starter {
  background: var(--starter);
}

.seg-salt {
  background: var(--salt);
}

.seg-other {
  background: var(--other);
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.legend b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}

.sw-flour {
  background: var(--flour);
}

.sw-water {
  background: var(--water);
}

.sw-starter {
  background: var(--starter);
}

.sw-salt {
  background: var(--salt);
}

.sw-other {
  background: var(--other);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
}

.tbl caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding-bottom: 6px;
}

.tbl th,
.tbl td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tbl thead th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 2px solid var(--line);
}

.panel-results .tbl thead th,
.article .tbl thead th {
  font-family: var(--font);
}

.tbl tbody th {
  font-weight: 600;
}

.tbl td:not(:first-child) {
  color: var(--ink-soft);
}

.tbl td b {
  color: var(--ink);
}

/* Yeast cards */

.cards-yeast,
.cards {
  margin-bottom: 16px;
}

.yeast-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.yeast-card.is-source {
  border-color: var(--crust);
}

.yeast-card .measure {
  font-weight: 600;
}

.yeast-card p {
  margin: 6px 0 0;
}

.small {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Equivalents list (cups to grams) */

.equiv {
  display: grid;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.equiv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 16px;
  background: var(--bg-soft);
}

.equiv-row + .equiv-row {
  border-top: 1px solid var(--line);
}

.equiv-row:first-child {
  background: var(--panel);
}

.equiv-row:first-child .equiv-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.equiv-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Callouts */

.callout {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  margin: 0 0 12px;
  border-left: 4px solid var(--line);
}

.callout a {
  color: inherit;
  font-weight: 600;
}

/* The small secondary unit reads better in a stronger grey on tinted backgrounds. */
.callout .sub {
  color: var(--ink-soft);
}

.callout-info {
  background: var(--crust-soft);
  border-left-color: var(--crust);
  color: var(--ink);
}

.callout-tip {
  background: var(--tip);
  border-left-color: var(--other);
}

.callout-warn {
  background: var(--warn);
  border-left-color: var(--flour);
  color: var(--warn-ink);
}

/* Toolbar under the results */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Shown only when the browser will not let the page write to the clipboard. */
.copy-fallback {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.copy-fallback[hidden] {
  display: none;
}

.offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
}

/* ---------------------------------------------------------------- article content */

.article {
  max-width: 760px;
  margin-top: 8px;
}

.block {
  margin-block: 40px;
}

.block > h2 {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article p,
.article li {
  line-height: 1.7;
}

.article ul,
.article ol {
  padding-left: 1.3rem;
}

.article li {
  margin-bottom: 8px;
}

.article li::marker {
  color: var(--crust);
}

.article a {
  font-weight: 600;
}

.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 18px;
  overflow-x: auto;
  line-height: 1.6;
}

.formula p {
  margin: 0;
}

.formula p + p {
  margin-top: 8px;
}

.source {
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.article sup {
  font-size: 0.7em;
}

.block-faq h3 {
  font-family: var(--font);
  font-size: 1.08rem;
  font-weight: 700;
  margin: 26px 0 6px;
}

.block-faq p {
  margin-bottom: 0;
}

.related {
  margin-top: 56px;
}

.related h2 {
  font-size: 1.5rem;
}

.updated {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-top: 40px;
}

/* ---------------------------------------------------------------- home extras */

.home-section {
  margin-top: 56px;
}

.home-section > h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem);
}

.group {
  margin-top: 28px;
}

.group h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.group h3 span {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-faint);
}

.steps {
  padding-left: 1.3rem;
}

.steps li {
  margin-bottom: 10px;
}

.notfound h1 {
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
}

.notfound .cards {
  margin-block: 28px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 44px 0 28px;
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-grid h2 {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--footer-ink);
  opacity: 0.7;
  margin-bottom: 12px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 6px;
}

.footer-grid a {
  color: var(--footer-ink);
  text-decoration: none;
}

.footer-grid a:hover {
  text-decoration: underline;
}

.brand-footer {
  color: var(--footer-ink);
}

.brand-footer .brand-name em {
  color: var(--crust);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-bottom p {
  margin: 0;
}

.footer-grid .muted {
  color: var(--footer-ink);
  opacity: 0.8;
}

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 919px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 8px;
  }
  .hero-dough {
    max-width: 460px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }
  .wrap {
    width: min(100% - 28px, 1120px);
  }
  .header-row {
    gap: 4px 10px;
  }
  .site-nav a {
    padding: 6px 8px;
    font-size: 0.95rem;
  }
  .brand {
    font-size: 1.2rem;
  }
  .logo-mark {
    width: 28px;
    height: 28px;
  }
  .panel {
    padding: 16px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .stat-value {
    font-size: 1.3rem;
  }
  .slider-row {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 10px;
  }
  .rows-head,
  .row {
    grid-template-columns: minmax(0, 1fr) 76px 58px 30px;
    gap: 6px;
  }
  .rows-head-wide,
  .row-wide {
    grid-template-columns: minmax(0, 1fr) 70px 96px 30px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .block {
    margin-block: 32px;
  }
}

/* ---------------------------------------------------------------- print */

.compact {
  display: none;
}

@media (max-width: 919px) {
  .compact:not([hidden]) {
    display: flex;
    gap: 8px;
    position: sticky;
    bottom: 10px;
    z-index: 5;
    margin-top: 4px;
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--crust);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  .compact .stat {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
  }

  .compact .stat-value {
    font-size: 1.15rem;
  }

  .compact .stat-note,
  .compact .sub {
    display: none;
  }
}

@media print {
  .site-header,
  .breadcrumbs,
  .site-footer,
  .panel-inputs,
  .toolbar,
  .compact,
  .related,
  .skip,
  .article,
  .updated,
  .chips {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  main {
    padding: 0;
  }
  .panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .page-head {
    margin-top: 0;
  }
  .page-head h1 {
    font-size: 22pt;
  }
  .callout {
    border: 1px solid #ccc;
  }
}
