:root {
  color-scheme: light;
  --ink: #302d2e;
  --muted: #615659;
  --cream: #faf5ec;
  --pink: #e4bcbf;
  --line: #ded2c9;
  --surface: #fffdf9;
  font: 100%/1.5 system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); }
.shell { width: min(67rem, calc(100% - 3rem)); margin: 0 auto; padding: 2.5rem 0; }
.hero { display: grid; grid-template-columns: 1fr 13rem; gap: 2rem; align-items: center; margin-bottom: 1.75rem; }
.brand { color: #77484f; font-size: .88rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; margin: 0 0 .6rem; }
h1 { font: 500 clamp(2.45rem, 5.9vw, 4.4rem)/.99 Georgia, serif; letter-spacing: -.055em; margin: 0; }
.intro { color: var(--muted); margin: .9rem 0 0; max-width: 34rem; }
.logo-panel { background: repeating-linear-gradient(0deg, transparent 0 19px, #77505a19 19px 20px), repeating-linear-gradient(90deg, transparent 0 19px, #77505a19 19px 20px), #f2dce0; border: 1px solid #e4c9cc; border-radius: 1.25rem; display: grid; place-items: center; padding: 1rem; }
.logo-panel img { display: block; width: 8.5rem; max-width: 100%; height: auto; }
.calculator { display: grid; grid-template-columns: 1.22fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; overflow: hidden; box-shadow: 0 12px 32px #4d373012; }
form, .result { padding: clamp(1.2rem, 3vw, 2rem); min-width: 0; }
h2 { font-size: 1.16rem; line-height: 1.25; margin: 0; }
.form-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; }
fieldset { border: 1px solid var(--line); border-radius: .65rem; background: #f6eee8; padding: .2rem; margin: 0; display: flex; }
fieldset label { position: relative; }
fieldset input, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
fieldset span { display: block; padding: .5rem .65rem; font-size: .88rem; font-weight: 650; cursor: pointer; border-radius: .45rem; }
fieldset input:checked + span { background: var(--pink); }
fieldset input:focus-visible + span, button:focus-visible { outline: 3px solid #8d515a; outline-offset: 3px; }
.hint { color: var(--muted); font-size: .92rem; margin: .32rem 0 0; }
.field { margin-top: .85rem; }
.field label { display: block; margin-bottom: .28rem; font-weight: 650; }
.input { display: flex; align-items: center; border: 1px solid #a19491; border-radius: .55rem; background: white; }
.input:focus-within { outline: 2px solid #8d515a; outline-offset: 2px; }
.input input { width: 100%; min-width: 0; padding: .56rem .68rem; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; }
.input span { padding: 0 .75rem; color: var(--muted); border-left: 1px solid var(--line); min-width: 2.8rem; text-align: center; }
.input:has([aria-invalid="true"]) { border-color: #9a3447; }
button { font: inherit; font-weight: 700; border-radius: .55rem; padding: .56rem .9rem; min-height: 2.75rem; cursor: pointer; }
.clear { margin-top: 1rem; background: transparent; border: 1px solid #a19491; color: var(--ink); }
.clear:hover { background: #f6ece7; }
.error { color: #923044; margin: .7rem 0 0; font-size: .92rem; }
.result { background: var(--ink); color: var(--cream); display: flex; flex-direction: column; justify-content: center; }
.height { display: flex; gap: .65rem; align-items: baseline; margin-top: .6rem; font-variant-numeric: tabular-nums; }
.height output { font: 500 clamp(2.5rem, 6vw, 4.65rem)/1 Georgia, serif; letter-spacing: -.045em; overflow-wrap: anywhere; min-width: 0; }
.height span { color: var(--pink); font-size: 1.15rem; font-weight: 650; }
.scale { border-top: 1px solid #695f61; padding-top: .8rem; margin: 1.15rem 0; display: flex; justify-content: space-between; gap: .7rem; }
.scale output { font-weight: 750; color: var(--pink); overflow-wrap: anywhere; }
#copy { border: 0; background: var(--pink); color: var(--ink); width: 100%; }
#copy:hover:enabled { background: #f1d0d2; }
#copy:disabled { background: #625658; color: #f3e1e3; cursor: default; }
#copy:focus-visible { outline-color: #fff1ea; }
.status { color: #f2c9ce; font-size: .9rem; margin: .45rem 0 0; min-height: 1.35rem; }
.formula { color: #e2d3cf; font-size: .91rem; margin: .5rem 0 0; }
.reminders { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem; margin-top: 1.25rem; }
.reminders div { border-left: 3px solid #bf888e; padding: .15rem .85rem; }
.reminders h2 { font-size: 1rem; }
.reminders p { margin: .3rem 0 0; color: var(--muted); }
@media (max-width: 45rem) {
  .shell { width: calc(100% - 2rem); padding: 1.5rem 0; }
  .hero { grid-template-columns: minmax(0,1fr) 5.5rem; gap: .75rem; }
  .logo-panel { padding: .5rem; border-radius: .75rem; }
  .calculator { grid-template-columns: 1fr; }
  .reminders { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 25rem) {
  .hero { grid-template-columns: minmax(0,1fr) 4rem; }
  h1 { font-size: 2rem; }
}
