:root {
  color-scheme: light;
  --paper: #fbf5e9;
  --white: #fffcf6;
  --ink: #26233f;
  --muted: #635c72;
  --line: #ded4c5;
  --peach: #f2a98e;
  --lilac: #e8dffc;
  --display: Georgia, 'Times New Roman', serif;
  font: 16px/1.45 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 3rem, 70rem); margin: auto; }
.masthead, footer { display: flex; align-items: center; justify-content: space-between; gap: .9rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 900; letter-spacing: -.06em; font-size: 1.3rem; }
.brand-caption, .tag, .kicker, footer { font-size: .69rem; font-weight: 800; letter-spacing: .12em; }
.brand-caption { color: var(--muted); }
.tag { white-space: nowrap; border: 1px solid var(--line); border-radius: 2rem; padding: .4rem .65rem; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.5rem; }
.kicker { margin: 0; color: #65517d; }
.intro .kicker span { font-size: 1rem; margin-right: .25rem; }
h1, h2 { font-family: var(--display); font-weight: 500; }
h1 { margin: .4rem 0 .85rem; font-size: clamp(3.2rem, 9vw, 7.25rem); letter-spacing: -.075em; line-height: .86; }
h1 em { color: #69459a; }
.lead { margin: 1.15rem 0 0; color: var(--muted); font-size: 1.04rem; }
.sticker { flex: none; display: grid; place-content: center; width: clamp(8rem, 17vw, 12rem); aspect-ratio: 1; padding: .8rem; border: 1px solid var(--ink); border-radius: 46% 54% 52% 48%; background: var(--peach); box-shadow: 5px 5px 0 var(--ink); transform: rotate(9deg); text-align: center; font: 700 clamp(.95rem, 2.2vw, 1.45rem)/1.06 var(--display); margin-right: clamp(.5rem, 6vw, 5rem); }
.sticker span { margin-bottom: .45rem; }
.workspace { display: grid; grid-template-columns: 1.04fr 1fr; gap: 1.15rem; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 1.35rem; padding: clamp(1rem, 3vw, 1.65rem); min-width: 0; }
.inputs { background: var(--white); }
.results { background: var(--lilac); border-color: #d1c2e8; }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: .65rem; margin-bottom: 1.15rem; }
h2 { margin: .2rem 0 0; line-height: 1.05; font-size: clamp(1.65rem, 3.7vw, 2.6rem); letter-spacing: -.05em; }
button { color: var(--ink); background: transparent; border: 1px solid #8b7a9a; padding: .47rem .68rem; border-radius: .55rem; font: 750 .79rem/1.2 system-ui, sans-serif; min-height: 2.35rem; cursor: pointer; }
#example { background: #f8dfd4; border-color: #d5a18b; white-space: nowrap; }
button:hover, #example:hover { background: #f3c8b6; }
fieldset { min-width: 0; margin: 0 0 1rem; padding: .6rem 0 0; border: 0; border-top: 1px solid var(--line); }
legend { padding: 0 .45rem 0 0; font-weight: 800; font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; align-items: end; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .79rem; font-weight: 720; min-width: 0; }
small, .hint, .check { color: var(--muted); font-weight: 500; }
label small { font-size: .72rem; }
input, select { font: 500 1rem/1.2 system-ui, sans-serif; width: 100%; min-width: 0; color: var(--ink); border: 1px solid #baadb9; border-radius: .5rem; background: #fffdf9; padding: .6rem .65rem; min-height: 2.65rem; }
input[type=number] { appearance: textfield; }
input::-webkit-inner-spin-button, input::-webkit-outer-spin-button { appearance: none; margin: 0; }
:focus-visible { outline: 2px solid #6a46a0; outline-offset: 2px; }
.control { display: flex; align-items: center; gap: .4rem; border: 1px solid #baadb9; border-radius: .5rem; padding-inline: .6rem; background: #fffdf9; }
.control:focus-within { outline: 2px solid #6a46a0; outline-offset: 2px; }
.control input { border: 0; padding-inline: .1rem; }
.control input:focus { outline: none; }
.control > span { color: var(--muted); }
.check { display: flex; align-items: flex-start; flex-direction: row; margin-top: .65rem; gap: .5rem; }
.check input { width: 1rem; height: 1rem; min-height: 0; margin: .12rem 0 0; flex: none; accent-color: #69459a; }
.hint, .result-note, .form-error { font-size: .78rem; }
.hint { margin: .55rem 0 0; }
.rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem; margin: 0 0 .55rem; font-size: .8rem; }
.rate strong { border-radius: 2rem; padding: .2rem .55rem; background: var(--lilac); }
.paye { max-width: 12rem; }
.form-end { display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.form-end small { font-size: .73rem; text-align: right; }
.form-error, .result-note { border-radius: .55rem; padding: .65rem; }
.form-error { color: #792639; background: #fae1e2; }
.result-note { background: #faf0db; margin: .75rem 0 0; }
.stamp { font-size: 2.2rem; color: #69459a; }
.receipt { background: var(--white); border-radius: .9rem; padding: clamp(.75rem, 2vw, 1rem); }
dl { margin: 0 0 .85rem; }
dl > div { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: .55rem; align-items: start; padding: .53rem 0; border-bottom: 1px solid #ebe3d9; font-size: .83rem; }
dt small { display: block; margin-top: .08rem; }
dt small:empty { display: none; }
dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.subtotal { font-weight: 800; }
.take-home { display: flex; flex-direction: column; gap: .17rem; background: var(--ink); color: #fff7f4; border-radius: .68rem; padding: .75rem .9rem; }
.take-home span { color: #f6bba6; font-size: .66rem; letter-spacing: .11em; font-weight: 850; }
.take-home strong { font: 500 clamp(1.7rem, 5vw, 2.8rem)/1.1 var(--display); overflow-wrap: anywhere; }
footer { border: 0; border-top: 1px solid var(--line); margin-top: 2rem; color: var(--muted); }
@media (max-width: 49rem) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 33rem) {
  .shell { width: calc(100% - 1.5rem); }
  .intro { gap: .55rem; align-items: flex-start; }
  .sticker { width: 4.55rem; margin: 1rem .3rem 0 0; font-size: .65rem; box-shadow: 3px 3px 0 var(--ink); }
  .sticker span { margin-bottom: .12rem; }
  h1 { font-size: clamp(2.5rem, 10.4vw, 3.7rem); }
  .desktop, .brand-caption { display: none; }
  .lead { font-size: .9rem; }
}
@media (max-width: 23rem) {
  .grid { grid-template-columns: 1fr; }
  .sticker { display: none; }
}
