/* Hallmark · custom · Kettle Post · A Bath tea merchant arranged as a letter box with brewing cards and a user-started timer. */
/* Critique: the trade sets the content and primary interaction. */
@font-face {
  font-family: "cutive-mono";
  src: url("./fonts/cutive-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "work-sans";
  src: url("./fonts/work-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --paper: #edf0eb;
  --ink: #263a48;
  --line: #8999a0;
  --cta: #334f67;
  --ctaink: #fff7db;
  --body: "work-sans", Arial, sans-serif;
  --display: "cutive-mono", Georgia, serif;
  --weight: 400;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  overflow-x: clip;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  min-width: 0;
  overflow-wrap: break-word;
  line-height: 1.02;
  font-weight: var(--weight, 600);
}
h1,
h2 {
  text-wrap: balance;
}
p {
  max-width: 62ch;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
}
a,
button,
select,
input {
  touch-action: manipulation;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select,
summary {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}
button:enabled:active,
.cta:active {
  transform: translateY(1px);
}
:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px Canvas;
}
img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.skip {
  position: absolute;
  z-index: 10;
  top: -8rem;
  left: 1rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
}
.skip:focus {
  top: 0.5rem;
}
.wrap {
  width: min(calc(100% - clamp(2rem, 8vw, 8rem)), 80rem);
  margin-inline: auto;
}
.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4.7rem;
}
.brand {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.25vw, 2rem);
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.mast nav,
footer .wrap {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.8vw, 2rem);
  flex-wrap: wrap;
}
.mast nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 0.92rem;
}
.mast nav a:hover {
  text-decoration: underline;
}
.cta,
.takeaway {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.65rem 1.1rem;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid var(--cta);
  background: var(--cta);
  color: var(--ctaink);
}
.cta:hover,
.takeaway:hover {
  text-decoration: underline;
}
.band {
  padding-block: clamp(3rem, 7.2vw, 7.5rem);
}
.band h2 {
  font-size: clamp(2.65rem, 5.5vw, 5.6rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 1rem;
}
.band h3,
#tool h3 {
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  margin-bottom: 0.55rem;
}
.band p + p,
#tool p + p {
  margin-top: 0.7rem;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend,
label {
  font-weight: 650;
}
.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}
.controls label,
.form-label {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
}
select,
input[type="number"],
input[type="text"],
textarea {
  min-height: 2.8rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid currentColor;
  border-radius: 0;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  background: var(--paper);
}
textarea {
  resize: vertical;
  min-height: 4.2rem;
}
.options,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.7rem 0 1rem;
}
.options button,
.quiet,
.step button {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  min-height: 2.8rem;
  padding: 0.5rem 0.8rem;
}
.options button[aria-pressed="true"] {
  color: var(--ctaink);
  background: var(--cta);
  border-color: var(--cta);
}
.options button:hover,
.quiet:hover {
  text-decoration: underline;
}
.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.step button {
  min-width: 2.8rem;
}
.step output {
  min-width: 1.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.fine,
figcaption {
  font-size: 0.85rem;
  line-height: 1.45;
}
[role="status"] {
  min-height: 1.4em;
  font-size: 0.9rem;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 0.65rem;
}
summary {
  font-weight: 650;
  min-height: 2.5rem;
}
details p {
  padding-bottom: 0.65rem;
}
address {
  font-style: normal;
  line-height: 1.7;
}
footer {
  padding: 1.7rem 0;
  border-top: 1px solid var(--line);
}
footer .wrap {
  justify-content: space-between;
}
footer p,
footer a {
  font-size: 0.83rem;
}
@media (max-width: 560px) {
  .mast {
    gap: 0.4rem;
    min-height: 4.25rem;
  }
  .mast nav {
    gap: 0.6rem;
  }
  .mast nav a {
    font-size: 0.8rem;
  }
  .mast .brand {
    font-size: 1.2rem;
  }
  .controls {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:root {
  --blue: #334f67;
  --saffron: #e6bb60;
  --envelope: #fff7df;
  --stamp: #974835;
  --mist: #d2dcd9;
}
.mast {
  border-bottom: 1px solid var(--ink);
}
.brand {
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.09em;
}
.post-office {
  padding-block: clamp(1.6rem, 3.6vw, 3.6rem);
}
.post-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.post-heading h1 {
  font-size: clamp(3.4rem, 7.1vw, 7rem);
  letter-spacing: -0.11em;
  line-height: 1;
}
.post-heading > span {
  font-size: 0.93rem;
}
.postcard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  border: 1px solid var(--blue);
  padding: 0.65rem;
  background: repeating-linear-gradient(
    125deg,
    var(--blue) 0 0.65rem,
    var(--envelope) 0.65rem 1.35rem,
    var(--stamp) 1.35rem 2rem,
    var(--envelope) 2rem 2.7rem
  );
  box-shadow: 3px 5px 0 #a5b1b2;
}
.postcard figure {
  position: relative;
  min-height: 25rem;
  border-right: 1px solid var(--blue);
}
.postcard img {
  position: absolute;
  inset: 0;
  height: 100%;
}
.postcard figcaption {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  padding: 0.35rem 0.65rem;
  background: var(--envelope);
}
.address-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  gap: 0.9rem;
  padding: clamp(1.4rem, 3.4vw, 3.7rem);
  background: var(--envelope);
}
.address-side p:first-of-type {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 2.1rem);
  letter-spacing: -0.055em;
  line-height: 1.2;
}
.letters {
  background: var(--blue);
  color: var(--envelope);
}
.tea-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4%;
  margin-top: 1.6rem;
}
.tea-ledger article {
  border-top: 3px dotted var(--saffron);
  padding-top: 1rem;
}
.tea-ledger span {
  font-size: 0.85rem;
  color: var(--saffron);
}
.tea-ledger h3 {
  margin: 0.5rem 0;
}
.desk-intro {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: baseline;
}
.desk-intro p {
  max-width: 40ch;
}
.brew-desk {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 5%;
  margin-top: 1.6rem;
}
.matched-note {
  border: 2px dashed var(--blue);
  background: var(--envelope);
  padding: clamp(1rem, 2.2vw, 2.2rem);
}
.timer-face {
  display: flex;
  align-items: end;
  gap: 1rem;
  justify-content: space-between;
  border-block: 1px solid var(--blue);
  margin: 1rem 0;
  padding: 0.7rem 0;
}
.timer-face b {
  font: 700 clamp(2.6rem, 5vw, 4.7rem)/1 var(--display);
  letter-spacing: -0.12em;
}
.tea-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 0.65rem;
  background: transparent;
  color: var(--ink);
  min-height: 3.5rem;
}
.tea-choice[aria-pressed="true"] {
  background: var(--mist);
  box-shadow: inset 4px 0 var(--blue);
}
.sorting {
  background: var(--saffron);
}
.sorting > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 8%;
  align-items: center;
}
.sorting img {
  max-height: 21rem;
  object-position: 50% 45%;
}
.sorting address {
  margin: 1rem 0;
}
@media (max-width: 710px) {
  .post-heading,
  .desk-intro {
    display: block;
  }
  .post-heading > span {
    display: block;
    margin-top: 0.5rem;
  }
  .postcard,
  .brew-desk,
  .sorting > .wrap,
  .tea-ledger {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }
  .postcard {
    gap: 0;
  }
  .postcard figure {
    height: 52vw;
    min-height: 12rem;
    border: 0;
  }
  .address-side {
    padding: 1.25rem;
    gap: 0.75rem;
  }
  .address-side p:first-of-type {
    padding-right: 3rem;
  }
  .mast nav a:first-child {
    display: none;
  }
}

/* Leaf packet and frank */
.parcel-desk {
  width: min(1310px, 93%);
  margin: 1.8rem auto 3.5rem;
}
.parcel-mast {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  border-block: 3px double #365444;
  padding: 0.8rem 0;
}
.parcel-mast h1 {
  font: 500 clamp(4.7rem, 8vw, 9.25rem)/0.88 var(--display);
  letter-spacing: -0.055em;
}
.parcel-mast p {
  max-width: 23rem;
}
.packet-scene {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  background: #d1c1a1;
  color: #233f36;
  border-top: 8px double #9c8b66;
  border-bottom: 8px double #9c8b66;
  gap: clamp(0.7rem, 3vw, 3rem);
  padding: clamp(0.6rem, 1.8vw, 1.8rem);
  margin-top: 1rem;
}
.packet-window {
  display: grid;
  grid-template-columns: 1.7fr 0.7fr;
  align-items: stretch;
  gap: 0.3rem;
}
.packet-window figure {
  min-width: 0;
  margin: 0;
  align-self: center;
}
.packet-window figure img {
  display: block;
  width: 100%;
  height: clamp(190px, 22vw, 300px);
  object-fit: cover;
  border: 3px solid #665e46;
}
.packet-window figcaption {
  font-size: 0.78rem;
  padding: 0.3rem 0;
  line-height: 1.15;
}

.packet-label {
  background: #f6ecd2;
  border-inline: 1px dashed #796e53;
  align-self: center;
  padding: clamp(0.6rem, 1.45vw, 1.55rem);
  height: 100%;
}
.packet-label > span,
.packet-label dt {
  font-size: 0.75rem;
  font-weight: bold;
}
.packet-label h2 {
  font: clamp(2rem, 3.8vw, 4.2rem)/0.94 var(--display);
  margin: 0.4rem 0 0.8rem;
}
.packet-label dl {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  border-block: 1px solid #6b7764;
}
.packet-label dl > div {
  padding: 0.25rem 0;
}
.packet-label dd {
  font-weight: 750;
}
.franking {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin: 0.6rem 0;
}

.franking b {
  font: 700 1.35rem monospace;
}
.packet-label :is(button, .front-key) {
  background: #284c40;
  color: #ffefd1;
  border: 0;
  border-radius: 0;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.packet-label > a {
  display: block;
  font-size: 0.85rem;
  font-weight: 750;
  margin-top: 0.55rem;
}
@media (max-width: 720px) {
  .parcel-mast {
    display: block;
  }
  .parcel-mast h1 {
    font-size: clamp(3.3rem, 13vw, 6rem);
  }
  .parcel-mast p {
    margin-top: 0.65rem;
  }
  .packet-scene {
    grid-template-columns: 1fr;
  }
  .packet-window figure img {
    height: 130px;
  }

  .packet-label {
    padding: 0.7rem;
  }
  .parcel-desk {
    margin-top: 1rem;
  }
}
.infusion-ledger {
  width: min(1180px, 92%);
  margin: 2rem auto 4rem;
}
.leaf-letter {
  border-block: 4px double #667768;
  padding: 0.65rem 0;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
}
.leaf-letter h1 {
  font: 500 clamp(3.05rem, 6.3vw, 7rem)/1 var(--display);
  letter-spacing: -0.075em;
}
.leaf-letter p {
  font-size: 0.84rem;
  font-weight: 700;
}
.herb-book {
  display: grid;
  grid-template-columns: 0.63fr 1.2fr;
  gap: clamp(1rem, 4vw, 4rem);
  margin: 1.3rem 0;
}
.herb-sheet {
  background: #e6d9b1;
  border-block: 5px double #a39672;
  padding: clamp(0.7rem, 1.5vw, 1.5rem);
  color: #29483c;
  align-self: start;
}

.herb-sheet p {
  font-size: 0.9rem;
  line-height: 1.42;
  margin-top: 0.7rem;
}
.leaf-index section {
  padding: 0.8rem 0;
  border-bottom: 1px dashed #737f6e;
}
.leaf-index section:first-child {
  border-top: 1px dashed #737f6e;
}
.leaf-index h2,
.second-pot h2 {
  font: clamp(1.75rem, 3.2vw, 3.5rem)/1.05 var(--display);
}
.leaf-index .pot-rule {
  font: 700 0.88rem monospace;
  color: #324b40;
  margin: 0.4rem 0;
}
.second-pot {
  border-top: 4px double #677a67;
  padding-top: 0.8rem;
}
.second-pot dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0.7rem 0;
}
.second-pot dt,
.second-pot a {
  font-weight: bold;
}
.second-pot dd {
  line-height: 1.42;
  font-size: 0.92rem;
}
@media (max-width: 690px) {
  .leaf-letter {
    display: block;
  }
  .leaf-letter h1 {
    font-size: clamp(2.65rem, 10vw, 4.5rem);
  }
  .herb-book {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .herb-sheet {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0.55rem;
  }

  .herb-sheet p {
    margin: 0;
  }
  .second-pot dl {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

/* 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;
}
.packet-label > a.front-key {
  display: inline-block;
  margin: 0;
}

@media (max-width: 740px) {
}

.packet-label > a.front-key {
  font: inherit;
  font-weight: 700;
  margin: 0;
  padding: 0.5rem 0.75rem;
  line-height: inherit;
}

.packet-window {
  display: block;
}
.packet-window figure {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.packet-window figure img {
  border: 0;
}
.packet-scene {
  background: #e6dac0;
  border-block: 3px double #8a816d;
}
.franking {
  justify-content: space-between;
  border-bottom: 1px solid #8d967f;
  padding-bottom: 0.6rem;
}
.franking > span {
  font-size: 0.86rem;
}
.herb-sheet {
  display: block;
}
.herb-sheet p {
  margin: 0;
}
.herb-book {
  grid-template-columns: minmax(12rem, 0.55fr) minmax(0, 1.3fr);
}
@media (max-width: 690px) {
  .herb-book {
    grid-template-columns: 1fr;
  }
}
