.hm-ferment {
  --hm-ink: #253d32;
  --hm-muted: #647067;
  --hm-paper: #faf8f2;
  --hm-line: #dedfd5;
  --hm-green: #284b3b;
  --hm-clay: #a34c32;
  box-sizing: border-box;
  color: var(--hm-ink);
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: 20px;
  font: 400 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 28px auto;
  max-width: 1060px;
  padding: clamp(20px, 4vw, 44px);
  text-align: left;
  isolation: isolate;
  container: hm-ferment / inline-size;
}
.hm-ferment *, .hm-ferment *::before, .hm-ferment *::after { box-sizing: border-box; }
.hm-ferment [hidden] { display: none !important; }
.hm-ferment :is(h2, p, ol, ul, fieldset) { margin: 0; padding: 0; }
.hm-ferment h2 { color: var(--hm-ink); font: 400 clamp(30px, 4vw, 44px)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.035em; margin: 13px 0 14px; }
.hm-ferment h2 em { font: inherit; font-style: italic; color: #587460; }
.hm-ferment .hm-ferment__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hm-ferment__header { padding-bottom: 30px; }
.hm-ferment__header .hm-ferment__eyebrow { color: var(--hm-clay); }
.hm-ferment__header .hm-ferment__eyebrow span { font-size: 21px; vertical-align: -2px; margin-right: 6px; }
.hm-ferment__header > p:last-child { color: var(--hm-muted); font-size: 15px; }
.hm-ferment__workspace { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 44px); }
.hm-ferment fieldset { min-width: 0; border: 0; margin-bottom: 25px; }
.hm-ferment legend { float: none; width: 100%; padding: 0; margin-bottom: 15px; font-size: 16px; line-height: 1.4; font-weight: 650; color: var(--hm-ink); }
.hm-ferment__step { color: var(--hm-clay); font-size: 11px; letter-spacing: .06em; margin-right: 9px; }
.hm-ferment label { display: block; font-size: 12px; font-weight: 550; color: var(--hm-muted); margin-bottom: 6px; }
.hm-ferment :is(input, select, button, textarea) { font: inherit; letter-spacing: normal; box-shadow: none; text-transform: none; margin: 0; }
.hm-ferment :is(input, select, textarea) { width: 100%; min-width: 0; height: 48px; border: 1px solid #bcc3b8; border-radius: 8px; color: var(--hm-ink); background: #fffefa; padding: 10px 12px; line-height: 1.3; font-size: 16px; }
.hm-ferment select { appearance: none; padding-right: 33px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23253d32' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.hm-ferment input::placeholder { color: #858b81; opacity: 1; }
.hm-ferment :is(input, select, button, summary, textarea, a):focus-visible { outline: 3px solid #be774b; outline-offset: 3px; }
.hm-ferment [aria-invalid="true"] { border-color: #a34330; }
.hm-ferment .hm-ferment__hint { color: var(--hm-muted); font-size: 12px; line-height: 1.55; margin-top: 9px; }
.hm-ferment__ingredients { display: grid; gap: 13px; }
.hm-ferment__ingredient { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.hm-ferment__ingredient.is-classic { grid-template-columns: minmax(0, 1fr) auto; }
.hm-ferment__quantity { display: flex; align-items: stretch; background: #fffefa; border: 1px solid #bcc3b8; border-radius: 8px; }
.hm-ferment__quantity:has([aria-invalid="true"]) { border-color: #a34330; }
.hm-ferment__quantity input, .hm-ferment__quantity select { border: 0; background-color: transparent; }
.hm-ferment__quantity input { flex: 1; width: 0; height: 46px; font-variant-numeric: tabular-nums; }
.hm-ferment__quantity select { width: 62px; padding-left: 5px; padding-right: 24px; background-position: right 7px center; flex-shrink: 0; height: 46px; }
.hm-ferment__quantity > span { display: flex; align-items: center; padding-right: 13px; color: var(--hm-muted); }
.hm-ferment .hm-ferment__text-button { display: inline-block; background: transparent; border: 0; border-radius: 4px; color: var(--hm-green); padding: 10px 0; min-height: 44px; font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; }
.hm-ferment .hm-ferment__text-button:hover { text-decoration: underline; }
.hm-ferment .hm-ferment__remove { display: grid; place-items: center; flex-shrink: 0; background: transparent; color: var(--hm-muted); border: 0; border-radius: 6px; height: 48px; width: 32px; padding: 0; font-size: 22px; cursor: pointer; }
.hm-ferment .hm-ferment__remove:hover { background: #ece9df; }
.hm-ferment__water { margin-top: 15px; }
.hm-ferment__water .hm-ferment__quantity { max-width: 230px; }
.hm-ferment__help { margin-top: 8px; }
.hm-ferment summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 500; min-height: 32px; padding: 7px 0; }
.hm-ferment summary::-webkit-details-marker { display: none; }
.hm-ferment summary::before { content: "+"; display: inline-block; margin-right: 8px; width: 10px; font-weight: 500; }
.hm-ferment details[open] > summary::before { content: "−"; }
.hm-ferment__help > p { padding: 6px 0; font-size: 12px; color: var(--hm-muted); }
.hm-ferment__dose { display: flex; align-items: center; gap: 14px; }
.hm-ferment__quantity--rate { flex: 0 0 102px; }
.hm-ferment__quantity--rate input { font-size: 21px; font-weight: 600; }
.hm-ferment__tag { font-size: 11px; color: #42654c; font-weight: 600; }
.hm-ferment .hm-ferment__basis { font-size: 12px; }
.hm-ferment__salt { margin-top: 15px; border-top: 1px solid var(--hm-line); padding-top: 6px; }
.hm-ferment__salt summary { display: flex; align-items: center; font-size: 13px; min-height: 44px; }
.hm-ferment__salt summary span { margin-left: auto; color: var(--hm-muted); text-align: right; max-width: 65%; font-size: 12px; }
.hm-ferment__salt select { margin: 5px 0 2px; }
.hm-ferment .hm-ferment__warning, .hm-ferment .hm-ferment__notice { background: #f4e9d9; color: #75471e; border-radius: 8px; padding: 12px; font-size: 12px; margin-top: 12px; }
.hm-ferment .hm-ferment__field-error { font-size: 12px; color: #9a3528; margin-top: 5px; grid-column: 1 / -1; }
.hm-ferment__result { background: var(--hm-green); color: #faf6e9; border-radius: 13px; padding: clamp(22px, 3vw, 30px); min-height: 465px; position: sticky; top: 25px; }
.hm-ferment__result-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #d5e2d3; }
.hm-ferment__result-top > span:last-child { font-size: 23px; color: #cbd89f; line-height: 1; }
.hm-ferment .hm-ferment__number { font-size: clamp(54px, 6vw, 78px); line-height: 1.1; letter-spacing: -.055em; font-weight: 500; margin-top: 29px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.hm-ferment .hm-ferment__grams { font-size: 28px; margin-left: 7px; letter-spacing: 0; font-weight: 400; }
.hm-ferment .hm-ferment__result-subtitle { color: #e6eadb; font-size: 15px; margin-top: 4px; }
.hm-ferment .hm-ferment__result-context { color: #d5e0d2; font-size: 12px; margin-top: 14px; }
.hm-ferment__recipe-head { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; border-top: 1px solid #60806b; margin-top: 24px; padding-top: 20px; font-size: 12px; font-weight: 600; }
.hm-ferment__recipe-head > span:last-child { color: #ced9c8; font-weight: 400; font-size: 11px; }
.hm-ferment .hm-ferment__instructions { list-style: none; counter-reset: hm-step; margin: 16px 0 23px; }
.hm-ferment__instructions li { position: relative; padding-left: 27px; margin-bottom: 16px; font-size: 13px; line-height: 1.6; color: #edf0e7; }
.hm-ferment__instructions li::before { counter-increment: hm-step; content: counter(hm-step) "."; position: absolute; left: 0; color: #cbd89f; }
.hm-ferment .hm-ferment__copy { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 12px 15px; border: 1px solid #dbe4b9; border-radius: 7px; background: #dbe4b9; color: #253d32; font-size: 12px; font-weight: 650; text-align: left; cursor: pointer; }
.hm-ferment .hm-ferment__copy:hover { background: #eaf0d3; }
.hm-ferment .hm-ferment__copy-status { font-size: 12px; margin-top: 8px; color: #dbe4b9; }
.hm-ferment .hm-ferment__copy-status:empty { margin: 0; }
.hm-ferment__calculation { margin-top: 12px; }
.hm-ferment__calculation summary { color: #d9e3d1; }
.hm-ferment__calculation p { font-size: 12px; color: #d9e3d1; margin-top: 7px; overflow-wrap: anywhere; }
.hm-ferment .hm-ferment__copy-fallback { font-size: 12px; height: 180px; margin-top: 10px; }
.hm-ferment__empty { display: flex; flex-direction: column; align-items: center; text-align: center; color: #b7c9ad; padding: 25px 0 20px; }
.hm-ferment__empty svg { width: 130px; height: 110px; opacity: .8; }
.hm-ferment__empty p { font-size: 12px; margin-top: 12px; }
.hm-ferment .hm-ferment__result-footnote { color: #c0d0ba; font-size: 11px; border-top: 1px solid #60806b; padding-top: 15px; margin-top: 20px; }
.hm-ferment__footer { margin-top: 2px; padding-top: 22px; border-top: 1px solid var(--hm-line); }
.hm-ferment__footer > p { color: var(--hm-muted); font-size: 12px; line-height: 1.6; max-width: 780px; }
.hm-ferment__footer strong { color: var(--hm-ink); font-weight: 600; }
.hm-ferment__sources { margin-top: 10px; }
.hm-ferment__source-content { max-width: 780px; font-size: 13px; color: var(--hm-muted); }
.hm-ferment__source-content p { margin: 12px 0; }
.hm-ferment__source-content ul { padding-left: 20px; }
.hm-ferment__source-content li { margin: 10px 0; }
.hm-ferment a { color: var(--hm-green); text-decoration: underline; text-underline-offset: 3px; }
.hm-ferment__mobile-result { display: none; }
.hm-ferment__result { scroll-margin-top: 20px; }
.hm-ferment .hm-ferment__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@container hm-ferment (max-width: 640px) {
  .hm-ferment__workspace { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hm-ferment__result { position: static; min-height: 0; }
  .hm-ferment__empty { display: none; }
  .hm-ferment__footer { margin-top: 24px; }
}
@media (max-width: 720px) {
  .hm-ferment { padding: 22px 18px; margin: 16px 0; border-radius: 12px; }
  .hm-ferment__workspace { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hm-ferment__header { padding-bottom: 27px; }
  .hm-ferment__header > p:last-child { font-size: 14px; }
  .hm-ferment__result { position: static; min-height: 0; padding: 24px; }
  .hm-ferment__empty { display: none; }
  .hm-ferment .hm-ferment__number { margin-top: 20px; font-size: 65px; }
  .hm-ferment__footer { margin-top: 24px; }
  .hm-ferment fieldset { margin-bottom: 24px; }
  .hm-ferment a.hm-ferment__mobile-result { display: flex; position: fixed; z-index: 50; bottom: max(12px, env(safe-area-inset-bottom)); left: 18px; right: 18px; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 12px 16px; border-radius: 10px; color: #faf6e9; background: var(--hm-green); box-shadow: 0 3px 18px #122c2633; text-decoration: none; font-size: 12px; }
  .hm-ferment__mobile-result strong { font-size: 20px; margin-right: 3px; }
  .hm-ferment__mobile-result > span:last-child { font-size: 11px; color: #dbe4b9; }
}
@media (max-width: 380px) {
  .hm-ferment__ingredient { grid-template-columns: minmax(0, 1fr) auto; }
  .hm-ferment__product { grid-column: 1 / -1; }
  .hm-ferment__ingredient.is-classic .hm-ferment__product { grid-column: auto; }
  .hm-ferment__ingredient-weight { max-width: 210px; }
  .hm-ferment__quantity--rate { flex-basis: 90px; }
}
@media print {
  .hm-ferment { border: 0; margin: 0; padding: 0; }
  .hm-ferment__form, .hm-ferment__copy, .hm-ferment__sources, .hm-ferment__empty, .hm-ferment__mobile-result { display: none !important; }
  .hm-ferment__workspace { display: block; }
  .hm-ferment__result { position: static; color: #000; background: white; border: 1px solid #999; }
  .hm-ferment__result * { color: #000 !important; }
}
