:root {
  color-scheme: light;
  color: #26381f;
  background: #eff0e6;
  font: 1em/1.5 system-ui, sans-serif;
  accent-color: #364d2a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: #ddba99; color: #26381f; }
body { margin: 0; }
main { width: min(100% - 3rem, 67rem); margin: 0 auto; padding: 4.5rem 0 2.5rem; }
.intro { margin-bottom: 2.35rem; }
h1 { margin: 0; font: 700 5.1rem/1.05 Georgia, serif; letter-spacing: -.04em; }
h1 span { color: #9e5238; }
.intro p { margin: .8rem 0 0; font-size: 1.25rem; color: #505847; }
.calculator { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr); border: 1px solid #c9c5b6; border-radius: .875rem; overflow: clip; }
form { padding: 2rem; background: #fffcf4; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { margin: 0 0 .65rem; padding: 0; font-weight: 700; }
.choices { display: flex; gap: .4rem; flex-wrap: wrap; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choices span { display: grid; align-items: center; min-height: 2.75rem; padding: .45rem .75rem; border: 1px solid #b8b9a9; border-radius: .45rem; font-size: .94rem; }
.choices label:hover span { background: #ebeee2; }
.choices input:checked + span { color: #fff; background: #364d2a; border-color: #364d2a; }
:focus-visible, .choices input:focus-visible + span { outline: 3px solid #9e5238; outline-offset: 2px; }
.hint { max-width: 49ch; color: #505847; margin: 1.3rem 0 1rem; }
.dimensions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .8rem; }
.dimensions label { display: flex; min-width: 0; flex-direction: column; justify-content: end; gap: .35rem; font-size: .94rem; font-weight: 650; }
.input-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid #b8b9a9; border-radius: .45rem; background: #fff; }
.input-wrap:focus-within { outline: 2px solid #9e5238; outline-offset: 2px; }
.input-wrap input { width: 100%; min-height: 3.1rem; border: 0; border-radius: inherit; outline: 0; background: transparent; color: #26381f; font: inherit; font-size: 1.18rem; font-variant-numeric: tabular-nums; padding: .45rem .65rem; }
.input-wrap > span { padding-right: .65rem; color: #505847; font-weight: 500; }
.error { margin: .8rem 0 0; color: #973e28; }
.result { display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; padding: 2rem; background: #e5e9d7; }
.result-label { margin: 0; color: #475740; font-weight: 600; }
output { display: block; font-size: 3.4rem; font-weight: 650; line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.measure { width: 8.7rem; position: relative; height: 6.5rem; display: flex; align-items: center; justify-content: center; margin-left: auto; }
.pot { height: 5rem; width: 6rem; background: #ab6147; border-top: .5rem solid #7c432e; border-radius: .15rem .15rem 1.4rem 1.4rem; }
[data-shape="tapered"] .pot { clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%); border-radius: .15rem; }
[data-shape="rectangular"] .pot { width: 6.6rem; border-radius: .15rem .15rem .5rem .5rem; }
.ruler { position: absolute; right: 0; height: 5rem; width: .6rem; border-left: 1px solid #6b775e; background: repeating-linear-gradient(to bottom, #6b775e 0 1px, transparent 1px .62rem); }
footer { margin-top: 1.45rem; color: #505847; }
@media (max-width: 45rem) {
  main { width: min(100% - 2rem, 35rem); padding-top: 2.3rem; }
  h1 { font-size: 3.25rem; }
  .intro { margin-bottom: 1.5rem; }
  .calculator { grid-template-columns: 1fr; }
  form, .result { padding: 1.25rem; }
  .result { flex-direction: row-reverse; align-items: center; gap: .7rem; }
  .measure { margin-left: 0; width: 6.4rem; height: 4.5rem; flex: 0 0 6.4rem; }
  .pot { height: 3.5rem; width: 4.3rem; }
  [data-shape="rectangular"] .pot { width: 4.8rem; }
  .ruler { height: 3.5rem; }
  output { font-size: 2.45rem; }
}
@media (max-width: 22rem) {
  h1 { font-size: 2.7rem; }
}
