/* Hallmark · custom · Roundhouse Roasters · cobalt batch tag and printed brew bench */
/* Critique: The working weight calculator gives the roaster a practical purpose. */
@font-face {
  font-family: "BAR";
  src: url("./fonts/barlow-condensed.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DMS";
  src: url("./fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MONO";
  src: url("./fonts/space-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #eae9de;
  --ink: #20262e;
  --line: #92989b;
  --focus: #ad3118;
  --cta: #244dbc;
  --cta-ink: #f2f1e6;
  --display: "BAR", "Arial Narrow", sans-serif;
  --body: "DMS", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-block-start: 1.5rem;
}
html,
body {
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: var(--heading-weight, 400);
  line-height: 1;
  min-width: 0;
  overflow-wrap: break-word;
}
h1,
h2 {
  text-wrap: balance;
}
p {
  max-width: 65ch;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  background: none;
}
img {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
.skip {
  position: absolute;
  z-index: 3;
  left: 1rem;
  top: -7rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.65rem 1rem;
}
.skip:focus {
  top: 0.5rem;
}
.wrap {
  width: min(91%, 81rem);
  margin-inline: auto;
}
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.4rem;
}
.site-head nav {
  display: flex;
  gap: clamp(0.7rem, 2.1vw, 2.4rem);
  align-items: center;
  flex-wrap: wrap;
}
.site-head nav a {
  text-decoration: none;
  font-size: 0.9rem;
}
.site-head nav a:hover {
  text-decoration: underline;
}
.wordmark {
  color: inherit;
  font-family: var(--display);
  text-decoration: none;
  line-height: 1;
}
.site-foot {
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.site-foot p {
  font-size: 0.83rem;
}
.site-foot a {
  white-space: nowrap;
}
.jump,
.action {
  display: inline-flex;
  min-height: 2.8rem;
  padding: 0.65rem 1.15rem;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border: 1px solid currentColor;
  color: var(--cta-ink);
  background: var(--cta);
  font-weight: 650;
}
.jump:hover,
.action:hover {
  text-decoration: underline;
  text-underline-offset: 0.24em;
}
.detail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.section {
  padding-block: clamp(3.4rem, 7vw, 7.5rem);
}
.section h2 {
  font-size: clamp(2.8rem, 5.5vw, 5.4rem);
  margin-bottom: 1rem;
}
.section h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin: 1rem 0 1.2rem;
}
.choices button,
.stepper button {
  padding: 0.55rem 0.9rem;
  min-height: 2.75rem;
  border: 1px solid currentColor;
}
.choices button[aria-pressed="true"],
.stepper button:hover {
  background: var(--cta);
  color: var(--cta-ink);
}
form,
fieldset {
  min-width: 0;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
legend,
label {
  font-weight: 650;
}
select {
  min-height: 2.75rem;
  max-width: 100%;
  padding: 0.55rem 2.2rem 0.55rem 0.75rem;
  border: 1px solid currentColor;
  background: var(--control, var(--paper));
  border-radius: 0;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.stepper button {
  min-width: 2.75rem;
  padding-inline: 0.5rem;
}
.stepper button:disabled {
  background: var(--paper);
  color: var(--line);
  border-color: var(--line);
  cursor: not-allowed;
}
.stepper output {
  font-variant-numeric: tabular-nums;
  min-width: 1.25rem;
  text-align: center;
}
.note {
  font-size: 0.82rem;
  line-height: 1.45;
}
.section p + p {
  margin-top: 0.75rem;
}
@media (max-width: 640px) {
  .site-head {
    min-height: 4.25rem;
    gap: 0.8rem;
  }
  .site-head nav {
    gap: 0.8rem;
  }
  .site-head nav a {
    font-size: 0.825rem;
  }
  .site-foot .wrap {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:root {
  --cobalt: #244dbc;
  --chalk: #efeee4;
  --navy: #152e68;
  --ink: #20262e;
  --mono: "MONO", monospace;
  --heading-weight: 400;
}
.site-head {
  min-height: 4.65rem;
  border-bottom: 2px solid var(--ink);
}
.wordmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.07em;
  line-height: 1;
}
.hero {
  padding-block: clamp(1.6rem, 3.2vw, 3.5rem);
}
.label {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  border: 2px solid var(--ink);
  background: var(--cobalt);
  color: var(--chalk);
}
.roaster-label {
  padding: clamp(1.6rem, 3vw, 3.3rem);
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}
.roaster-label h1 {
  text-transform: uppercase;
  font-size: clamp(5.25rem, 9.6vw, 10rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.roaster-label p {
  max-width: 38ch;
  font-size: 1.05rem;
}
.roaster-label .jump {
  background: var(--chalk);
  color: var(--cobalt);
  border-color: var(--chalk);
}
.batch {
  background: var(--chalk);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
.batch img {
  width: 100%;
  height: clamp(17rem, 26vw, 27rem);
  object-fit: cover;
  flex: 1 1 0;
  min-height: 0;
}
.batch figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 2px solid var(--ink);
  font-family: var(--body);
  font-size: 0.88rem;
}
.batch figcaption span {
  padding: 0.7rem 0.8rem;
}
.batch figcaption span + span {
  border-left: 1px solid var(--ink);
}
.brew {
  background: var(--ink);
  color: var(--chalk);
}
.brew .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 9%;
}
.brew h2,
.visit h2 {
  text-transform: uppercase;
  font-size: clamp(3.4rem, 6.6vw, 6.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.brew p {
  max-width: 40ch;
}
.instrument {
  border-block: 1px solid var(--line);
  padding-block: 1.1rem;
}
.instrument .choices button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--chalk);
}
.instrument .weigh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.instrument input {
  display: block;
  accent-color: var(--chalk);
  width: min(68%, 20rem);
  min-height: 2.75rem;
  cursor: pointer;
}
.instrument .readout {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.readout strong {
  font-family: var(--display);
  font-size: 3.6rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.visit {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 8%;
  align-items: center;
}
.visit figure {
  display: grid;
  grid-template-rows: 1fr auto;
  border: 1px solid var(--ink);
}
.visit img {
  height: clamp(12rem, 20vw, 21rem);
}
.visit figcaption {
  padding: 0.5rem 0.75rem;
  font-family: var(--body);
  font-size: 0.88rem;
}
.visit address {
  font-style: normal;
  margin-top: 1rem;
}
@media (max-width: 730px) {
  .label,
  .brew .wrap,
  .visit {
    grid-template-columns: minmax(0, 1fr);
  }
  .brew .wrap,
  .visit {
    gap: 1.8rem;
  }
  .roaster-label {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
    gap: 1rem;
  }
  .roaster-label h1 {
    font-size: clamp(4.2rem, 15vw, 7.2rem);
  }
  .batch img {
    height: 52vw;
    max-height: 24rem;
    flex: auto;
  }
  .site-head {
    gap: 0.5rem;
  }
  .wordmark {
    font-size: 0.88rem;
  }
  .site-head nav a {
    font-size: 0.78rem;
  }
}

button,
a {
  touch-action: manipulation;
}
button:enabled:active,
.jump:active {
  transform: translateY(1px);
}
.choices button:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 380px) {
  .roaster-label h1 {
    font-size: clamp(3.55rem, 17.5vw, 4.1rem);
  }
}

:where(img) {
  height: auto;
}

.chapter {
  padding-block: clamp(3.5rem, 7.5vw, 7.5rem);
}
.chapter .chapter-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.chapter-intro h2 {
  font-size: clamp(3rem, 5.5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  margin: 0 0 1.15rem;
}
.chapter-intro > p {
  max-width: 39ch;
}
.chapter-tool {
  min-width: 0;
}
.chapter-tool h3 {
  font-size: clamp(1.65rem, 3.1vw, 3rem);
  margin-bottom: 0.6rem;
}
.chapter-tool h4 {
  font-size: 1.12rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}
.chapter-tool .small {
  font-size: 0.88rem;
}
.chapter-tool button,
.chapter-tool input,
.chapter-tool select {
  max-width: 100%;
}
.chapter-tool .work-button {
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
}
.chapter-tool .work-button:hover {
  text-decoration: underline;
}
.chapter-tool .work-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.chapter-tool .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-block: 1rem;
}
.chapter-link {
  display: inline-block;
  font-size: 0.95rem;
  text-underline-offset: 0.3em;
  padding: 0.7rem 0.4rem;
  margin-left: 0.6rem;
}
.chapter-intro details {
  border-block-start: 1px solid currentColor;
  margin-top: 1.3rem;
  padding-block: 0.8rem;
}
.chapter-intro summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 2.3rem;
}
.chapter-intro details p {
  max-width: 40ch;
}
@media (max-width: 730px) {
  .chapter .chapter-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }
  .chapter-link {
    margin-left: 0.15rem;
  }
  .chapter-intro h2 {
    max-width: 16ch;
  }
}

.brew-clock-chapter {
  background: var(--chalk);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.brew-clock-chapter h2 {
  text-transform: uppercase;
  font-size: clamp(4rem, 7.8vw, 7.8rem);
  line-height: 0.92;
}
.clock-machine {
  background: var(--ink);
  color: var(--chalk);
  border: 2px solid var(--ink);
}
.clock-top,
.clock-face,
.stage-copy,
.clock-machine > .actions,
.clock-machine > .small {
  padding: 1rem clamp(1rem, 2vw, 2rem);
}
.clock-top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  background: var(--cobalt);
  font-size: 0.92rem;
}
.clock-top a {
  margin-left: auto;
}
.clock-face {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  background: var(--chalk);
  color: var(--ink);
}
.clock-face > div {
  border-bottom: 2px solid var(--cobalt);
}
.clock-face span {
  display: block;
  font-size: 0.86rem;
}
.clock-face b {
  font-family: var(--display);
  font-size: clamp(3.3rem, 5.6vw, 6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}
.stage-copy h3 {
  text-transform: uppercase;
}
.clock-machine > .actions {
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
}
.clock-machine .work-button:first-child {
  background: var(--chalk);
  color: var(--ink);
}
.stage-list {
  padding: 0 clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 1.2rem 0 0;
}
.stage-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #747b85;
  padding: 0.45rem 0;
}
.stage-list li[aria-current="step"] {
  border-left: 4px solid #a8c2ff;
  padding-left: 0.55rem;
  font-weight: 700;
}
.stage-list li span:last-child {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.clock-machine > .small {
  margin: 0;
}
@media (min-width: 850px) {
  .brew-clock-chapter .chapter-layout {
    grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.76fr);
    gap: 7%;
  }
  .brew-clock-chapter .chapter-intro {
    grid-column: 2;
    grid-row: 1;
  }
  .brew-clock-chapter .chapter-tool {
    grid-column: 1;
    grid-row: 1;
  }
}

.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Railway workshop brew instrument */
.machine-bay {
  width: min(1360px, 94%);
  margin: 2.4rem auto 3.3rem;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: start;
  gap: clamp(1rem, 4vw, 4.2rem);
}
.machine-letter {
  border-top: 8px solid currentColor;
  padding-top: 1rem;
}
.machine-letter h1 {
  font-size: clamp(4.3rem, 8.4vw, 9.2rem);
  line-height: 0.84;
  letter-spacing: -0.055em;
}
.machine-letter p {
  max-width: 25em;
  margin: 1.45rem 0 0.7rem;
}
.machine-letter a,
.brew-meter a {
  font-weight: 800;
}
.machine-deck {
  border: 2px solid #393c32;
  background: #d1cdb9;
  color: #222c23;
  padding: clamp(0.7rem, 1.7vw, 1.6rem);
  box-shadow: 6px 6px 0 #747768;
}
.machine-photo {
  display: grid;
  grid-template-columns: 1.55fr 0.8fr;
  height: clamp(112px, 17vw, 238px);
  border-bottom: 5px double #3a4436;
}
.machine-photo figure {
  margin: 0;
  overflow: hidden;
}
.machine-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brew-meter {
  padding-top: 0.65rem;
}
.brew-meter header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: monospace;
}
.brew-meter header b {
  font: clamp(2.4rem, 4vw, 4.7rem) var(--display);
  line-height: 1;
}
.meter-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.7rem 0;
}
.meter-track :is(button, .front-key) {
  flex: 1 1 64px;
  min-width: 0;
  padding: 0.4rem 0.15rem;
  background:
    repeating-linear-gradient(90deg, #465042 0 1px, transparent 1px 5px)
      top/100% 7px no-repeat,
    #e3e0ce;
  border: 1px solid #445140;
  border-radius: 0;
  color: #283026;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  line-height: 1.15;
}
.meter-track :is(button, .front-key):is([aria-pressed="true"], [data-default]) {
  background-color: #2c3d30;
  color: #fff4ce;
}
.meter-track :is(button, .front-key) span,
.meter-track :is(button, .front-key) small {
  font: 0.74rem monospace;
}
.meter-track :is(button, .front-key) span {
  padding-top: 5px;
}
.meter-track :is(button, .front-key) strong {
  font-size: 0.86rem;
}
.brew-meter p {
  margin-bottom: 0.45rem;
  line-height: 1.32;
}
.meter-track button:focus-visible {
  outline: 3px dashed #293c29;
  outline-offset: 2px;
}
@media (max-width: 770px) {
  .machine-bay {
    grid-template-columns: 1fr;
    margin-top: 1rem;
    gap: 1rem;
  }
  .machine-letter h1 {
    font-size: clamp(3.7rem, 12vw, 6rem);
  }
  .machine-letter h1 br {
    display: none;
  }
  .machine-letter p {
    margin: 0.75rem 0 0.35rem;
  }
  .machine-photo {
    height: 130px;
  }
  .machine-deck {
    box-shadow: 3px 3px 0 #747768;
  }
}

/* The printed panel is available before the interactive controls load. */
#front-panel [data-front-preview] .front-key {
  cursor: default;
}
#front-panel [data-front-preview] a.front-key {
  cursor: pointer;
}
:where(.front-key, .front-value) {
  display: inline-block;
  box-sizing: border-box;
  font: inherit;
  line-height: inherit;
  text-align: center;
}

.machine-photo {
  display: block;
}
.machine-photo figure {
  height: 100%;
}
