/* The Butchers' Wives · intake
   Layout: onyx band with wordmark + notch; one folded paper sheet per "course" on painted shiplap. */
:root {
  --onyx: #0C1713; --mauve: #A23E48; --green: #4A7A55; --almond: #D4956A; --peach: #CC7A5B; --alabaster: #E5E5E5;
  --page: #E5E5E5; --card: #F5F3EE; --card-2: #FBFAF7; --ink: #0C1713; --ink-2: #4F5B55; --line: #CBC8C0; --rule: #DEDBD3;
  --band: #0C1713; --band-ink: #EEEBE4; --link: #3E6B49; --peach-ink: #A65A3C; --hl: #F1E4D7; --bad: #A23E48; --on-accent: #FBFAF7;
  --shadow: 0 1px 0 rgb(12 23 19 / .04), 0 18px 34px -26px rgb(12 23 19 / .45);
  --f-display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --f-hand: "Caveat", "Bradley Hand", cursive;
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  --wood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='400'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0025 0.09' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05  0 0 0 0 0.09  0 0 0 0 0.07  0 0 0 0.16 -0.045'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  --inkmask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='i'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -3.2 2.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23i)'/%3E%3C/svg%3E");
  --grain-mix: rgba(229, 229, 229, 0.94); --card-grain-mix: rgba(245, 243, 238, 0.95);
  --groove-dark: rgb(12 23 19 / .075); --groove-light: rgb(255 255 255 / .55);
  --crease-dark: rgb(12 23 19 / .06); --crease-light: rgb(255 255 255 / .7); --crease-shade: rgb(12 23 19 / .018);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --page: #0C1713; --card: #14211C; --card-2: #1A2A24; --ink: #ECE9E2; --ink-2: #A6B0AA; --line: #2B3B34; --rule: #1F2D27;
  --band: #070F0C; --link: #8DBB95; --peach-ink: #E39A7C; --mauve: #CC6F7A; --green: #8DBB95; --hl: #2A231B; --bad: #E58A93; --on-accent: #0C1713;
  --shadow: 0 1px 0 rgb(0 0 0 / .2), 0 18px 34px -24px rgb(0 0 0 / .8);
  --grain-mix: rgba(12, 23, 19, 0.95); --card-grain-mix: rgba(20, 33, 28, 0.96);
  --groove-dark: rgb(0 0 0 / .38); --groove-light: rgb(255 255 255 / .035); --crease-dark: rgb(0 0 0 / .35); --crease-light: rgb(255 255 255 / .05); --crease-shade: rgb(0 0 0 / .08);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --page: #0C1713; --card: #14211C; --card-2: #1A2A24; --ink: #ECE9E2; --ink-2: #A6B0AA; --line: #2B3B34; --rule: #1F2D27;
  --band: #070F0C; --link: #8DBB95; --peach-ink: #E39A7C; --mauve: #CC6F7A; --green: #8DBB95; --hl: #2A231B; --bad: #E58A93; --on-accent: #0C1713;
  --shadow: 0 1px 0 rgb(0 0 0 / .2), 0 18px 34px -24px rgb(0 0 0 / .8);
  --grain-mix: rgba(12, 23, 19, 0.95); --card-grain-mix: rgba(20, 33, 28, 0.96);
  --groove-dark: rgb(0 0 0 / .38); --groove-light: rgb(255 255 255 / .035); --crease-dark: rgb(0 0 0 / .35); --crease-light: rgb(255 255 255 / .05); --crease-shade: rgb(0 0 0 / .08);
  color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 15px/1.55 var(--f-body); background-color: var(--page);
  background-image: repeating-linear-gradient(to bottom, transparent 0 94px, var(--groove-dark) 94px 95px, var(--groove-light) 95px 96px), var(--wood), linear-gradient(var(--grain-mix), var(--grain-mix)), var(--grain);
  background-size: auto, 1600px 400px, auto, 220px 220px; background-attachment: fixed, fixed, scroll, scroll; }
h1, h2 { font-family: var(--f-display); font-weight: 500; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mauve); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-2); } .small { font-size: .84rem; } .spacer { flex: 1; }
.loading { text-align: center; padding-block: 96px; }
a { color: var(--link); }

.illo { display: inline-block; background-color: var(--illo, var(--peach)); -webkit-mask: var(--src) no-repeat center / contain; mask: var(--src) no-repeat center / contain; }
.illo-rosemary { --src: url(illustrations/rosemary.svg); }
.illo-bundle { --src: url(illustrations/bundle.svg); }
.illo-sprig { --src: url(illustrations/sprig.svg); }

/* band */
.band { position: relative; background: var(--band); color: var(--band-ink); text-align: center; padding-inline: 16px; padding-block: 48px 52px; margin-bottom: 30px;
  box-shadow: inset 0 0 0 14px var(--band), inset 0 0 0 15px color-mix(in srgb, var(--almond) 38%, transparent), inset 0 0 0 19px var(--band), inset 0 0 0 20px color-mix(in srgb, var(--almond) 18%, transparent); }
.band.slim { padding-block: 34px 40px; }
.band-in { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.eyebrow { font-size: .66rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: color-mix(in srgb, var(--band-ink) 62%, transparent); }
.wordmark { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1; margin-top: 10px; }
.band h1 { font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 400; color: var(--almond); margin-top: 10px; }
.band .sub { margin-top: 12px; font-size: .88rem; color: color-mix(in srgb, var(--band-ink) 72%, transparent); }
.notch { position: absolute; left: 50%; bottom: -13px; width: 26px; height: 14px; transform: translateX(-50%); background: var(--band); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.band .illo-rosemary { position: absolute; --illo: color-mix(in srgb, var(--almond) 42%, transparent); width: min(30vw, 360px); aspect-ratio: 600 / 170; left: -20px; bottom: 26px; transform: rotate(-4deg); }
@media (max-width: 700px) { .band .illo-rosemary { width: 220px; left: -60px; bottom: auto; top: 16px; opacity: .6; } }

.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; padding-block: 0 56px; display: flex; flex-direction: column; gap: 18px; }

/* course nav */
.courses { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.courses button { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 6px 8px; color: var(--ink-2); cursor: pointer; }
.courses button span { font-family: var(--f-display); font-size: 1.15rem; line-height: 1; }
.courses button em { font-style: normal; font-size: .56rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.courses button.on { color: var(--mauve); }
.courses button.done { color: var(--green); }
.courses button:disabled { opacity: .45; cursor: default; }
.courses button em { display: none; } .courses button.on em { display: block; }
.courses button { flex: 1 1 0; min-width: 34px; }
.lead .link { align-self: flex-start; }
.progress { height: 3px; background: var(--rule); }
.progress i { display: block; height: 100%; background: var(--mauve); transition: width .3s; }

/* paper sheet */
.sheet { position: relative; background-color: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 30px clamp(18px, 5vw, 40px);
  background-image: linear-gradient(to bottom, transparent calc(33% - 1px), var(--crease-dark) calc(33% - 1px) 33%, var(--crease-light) 33% calc(33% + 1px), transparent calc(33% + 1px)),
    linear-gradient(to bottom, var(--crease-shade) 0 33%, transparent 33%), linear-gradient(var(--card-grain-mix), var(--card-grain-mix)), var(--grain); }
.sheet::after { content: ""; position: absolute; inset: 7px; border: 3px double color-mix(in srgb, var(--almond) 32%, transparent); pointer-events: none; }
.sheet h2 { font-size: clamp(2rem, 5vw, 2.6rem); margin-top: 10px; }
.lede { font-family: var(--f-hand); font-size: 1.35rem; color: var(--ink-2); margin-top: 4px; }
.stampno { display: inline-block; font-family: var(--f-mono); font-size: .66rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--peach-ink);
  border: 1.5px solid currentColor; padding: 3px 8px 2px; rotate: -2.5deg; -webkit-mask-image: var(--inkmask); mask-image: var(--inkmask); -webkit-mask-size: 160px; mask-size: 160px; }

/* fields */
.fields { display: flex; flex-wrap: wrap; gap: 22px 18px; margin-top: 26px; position: relative; z-index: 1; }
.field { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.half { flex: 1 1 220px; }
.field > label, .flabel { font-size: .64rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.req { color: var(--mauve); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], textarea, select {
  width: 100%; background: var(--card-2); border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; color: var(--ink); }
input.short { max-width: 140px; }
textarea { font-family: var(--f-hand); font-size: 1.25rem; line-height: 1.3; resize: vertical;
  background-image: repeating-linear-gradient(transparent 0 calc(1.3em - 1px), var(--rule) calc(1.3em - 1px) 1.3em); background-attachment: local; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 16%, transparent); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.err { color: var(--bad); font-size: .86rem; }
.checkfield { justify-content: flex-end; }
.chk { display: inline-flex; gap: 8px; align-items: center; font-size: .92rem; cursor: pointer; padding-block: 10px; }
input[type=checkbox] { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* chips: little stamped labels */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); background: var(--card-2); font-size: .9rem; transition: all .15s; }
.chip:hover span { border-color: var(--almond); }
.chip input:checked + span { background: var(--onyx); color: #ECE9E2; border-color: var(--onyx); }
.chip input:checked + span::before { content: "✓ "; color: var(--almond); }
.chip input:focus-visible + span { outline: 2px solid var(--mauve); outline-offset: 2px; }
:root[data-theme="dark"] .chip input:checked + span { background: var(--green); color: #0C1713; border-color: var(--green); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip input:checked + span { background: var(--green); color: #0C1713; border-color: var(--green); } }

/* range: a scale with named stops */
.range input[type=range] { width: 100%; accent-color: var(--mauve); }
.stops { display: flex; justify-content: space-between; gap: 6px; }
.stops span { flex: 1; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); text-align: center; opacity: .6; }
.stops span:first-child { text-align: left; } .stops span:last-child { text-align: right; }
.stops span.on { color: var(--mauve); opacity: 1; font-weight: 600; }
.rangeval { font-family: var(--f-hand); font-size: 1.4rem; color: var(--mauve); }
@media (max-width: 560px) { .stops { display: none; } }

/* service tiers: recipe-card choices */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.tier { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; background: var(--card-2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; }
.tier input { position: absolute; top: 14px; right: 14px; }
.tier:hover { border-color: var(--almond); transform: translateY(-1px); }
.tier:has(input:checked) { border-color: var(--mauve); box-shadow: inset 0 0 0 1px var(--mauve); }
.tno { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; color: var(--peach-ink); }
.tier b { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; line-height: 1.1; padding-right: 22px; }
.td { font-size: .86rem; color: var(--ink-2); }

/* nav buttons */
.nav { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding-top: 18px; border-top: 1px dashed var(--line); position: relative; z-index: 1; }
.btn { display: inline-block; text-decoration: none; font-size: .68rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; background: var(--mauve); color: var(--on-accent); border: 1px solid var(--mauve); padding: 12px 22px; cursor: pointer; }
.btn:hover { background: color-mix(in srgb, var(--mauve) 85%, var(--onyx)); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--almond); }
.btn.small { padding: 8px 12px; font-size: .62rem; }
.link { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .86rem; }

/* review + admin */
.summary { margin: 22px 0 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
.sumrow { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.sumrow dt { font-size: .62rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }
.sumrow dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .sumrow { grid-template-columns: 1fr; gap: 2px; } }
.thanks { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: 44px; }
.thanks .illo-bundle { width: 150px; height: 64px; --illo: var(--green); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); background: var(--card-2); }
.seg button { background: none; border: 0; padding: 8px 12px; font-size: .62rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--onyx); color: #ECE9E2; }
.seg .n { font-family: var(--f-mono); opacity: .7; }
.lead { display: flex; flex-direction: column; gap: 10px; }
.lead > * { position: relative; z-index: 1; }
.lhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.lhead h2 { font-size: 1.9rem; margin-top: 6px; }
.lhead select { width: auto; }
.lead.booked { border-color: var(--green); }
.lead.passed { opacity: .6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: .6rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--mauve); color: var(--mauve); padding: 2px 8px; }
.pill.diet { border-color: var(--green); color: var(--green); }
.empty { display: flex; align-items: center; gap: 16px; }
.empty .illo-sprig { width: 30px; height: 66px; --illo: var(--green); flex: none; }
.empty p { font-family: var(--f-hand); font-size: 1.3rem; position: relative; z-index: 1; }

.foot { background: var(--band); color: color-mix(in srgb, var(--band-ink) 70%, transparent); text-align: center; padding-inline: 16px; padding-block: 34px 44px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .86rem; }
.foot .illo-bundle { width: 150px; height: 64px; --illo: color-mix(in srgb, var(--almond) 70%, transparent); }
.wordmark.small { font-size: 1.6rem; margin: 0; color: var(--band-ink); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .stampno { rotate: none; } }

.pill.alert { border-color: var(--bad); color: var(--on-accent); background: var(--bad); }
.dietline { font-size: .92rem; }
.dietline .k { display: inline-block; min-width: 5.5em; font-size: .6rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.dietline.alert { color: var(--bad); }

.pill.idea { border-color: var(--peach-ink); color: var(--peach-ink); }

/* ---------- Kate's hand-drawn rosemary bundle (portrait, 210 × 270) ---------- */
.band .illo-rosemary { width: clamp(96px, 13vw, 170px); aspect-ratio: 210 / 270; left: clamp(10px, 4vw, 60px); bottom: 30px; transform: rotate(-7deg); }
@media (max-width: 700px) { .band .illo-rosemary { width: 72px; left: 6px; top: 12px; bottom: auto; opacity: .7; } }
.thanks .illo-bundle, .foot .illo-bundle { width: 54px; height: 70px; }
.empty .illo-sprig { width: 46px; height: 60px; }
@media (max-width: 700px) { .band .illo-rosemary { width: 54px; top: auto; bottom: 16px; opacity: .55; } }
