:root {
  --tag: #f2c12e; --tag-edge: #d4a514; --ink: #23323a; --muted: #56656b; --steel: #c5cdcf;
  --field: #eef2ec; --paper: #fff; --go: #2e6b34; --go-bg: #e3f0e4; --stop: #a3362b; --stop-bg: #f7e4e1;
  --wait: #8a5a00; --wait-bg: #fdf1cf; --radius: .5rem;
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Avenir Next Condensed', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--field); color: var(--ink); font: 1.0625rem/1.5 var(--font); }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 1.2em 0 .4em; }
h1 { font-size: 2.1rem; margin-top: .6em; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }
p { margin: .5em 0 .9em; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
.wrap.wide { max-width: 68rem; }
main { padding-bottom: 4rem; }
.demo-bar { background: var(--ink); color: #fff; font-size: .875rem; padding: .35rem 1rem; text-align: center; }
.demo-bar a { color: var(--tag); }
.top { background: var(--tag); border-bottom: 3px solid var(--tag-edge); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding-top: .5rem; padding-bottom: .5rem; }
.brand { font-family: var(--display); font-size: 1.5rem; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: .4rem; }
.brand b { font-weight: 700; }
.brand .tag { width: 1rem; height: 1.2rem; background: var(--ink); border-radius: 40% 40% 15% 15%; display: inline-block; }
.top nav { display: flex; flex-wrap: wrap; gap: .1rem; margin-left: auto; }
.top nav a { text-decoration: none; padding: .35rem .6rem; border-radius: var(--radius); font-weight: 700; font-size: .95rem; }
.top nav a[aria-current] { background: var(--ink); color: #fff; }
.top .who { font-weight: 700; font-size: .95rem; }
.panel { background: var(--paper); border: 1px solid var(--steel); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.15rem; }
label { font-weight: 700; display: block; margin: .9rem 0 .25rem; }
label .hint, .hint { font-weight: 400; color: var(--muted); font-size: .9rem; display: block; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid #8d999c; border-radius: var(--radius); background: #fff; color: var(--ink); min-height: 2.9rem;
}
textarea { min-height: 5rem; }
input[type=number].short, input.short { max-width: 8rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; margin: .35rem 0; }
.check input { width: 1.3rem; height: 1.3rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0 1rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; }
button, .button {
  font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.9rem; padding: .55rem 1.1rem; border-radius: var(--radius); border: 2px solid var(--ink);
  background: var(--ink); color: #fff; cursor: pointer; text-decoration: none;
}
button.secondary, .button.secondary { background: #fff; color: var(--ink); }
button.go { background: var(--go); border-color: var(--go); }
button.stop { background: #fff; color: var(--stop); border-color: var(--stop); }
button.big, .button.big { width: 100%; font-size: 1.15rem; min-height: 3.4rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; align-items: center; }
.actions form { margin: 0; }
.choices { display: grid; gap: .5rem; margin: .5rem 0; }
.choice { display: flex; gap: .75rem; align-items: center; background: #fff; border: 2px solid var(--steel); border-radius: var(--radius); padding: .75rem .9rem; font-weight: 400; margin: 0; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); background: #fffbea; }
.choice input { width: 1.3rem; height: 1.3rem; flex: none; }
.choice b { display: block; }
.choice .right { margin-left: auto; text-align: right; white-space: nowrap; }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: .1rem .5rem; border-radius: 1rem; background: var(--field); border: 1px solid var(--steel); white-space: nowrap; }
.badge.requested { background: var(--wait-bg); color: var(--wait); border-color: #e7c76a; }
.badge.accepted, .badge.paid { background: var(--go-bg); color: var(--go); border-color: #9cc6a0; }
.badge.declined { background: var(--stop-bg); color: var(--stop); border-color: #e0a59d; }
.badge.killed, .badge.invoiced { background: #e6eef5; color: #234a6b; border-color: #a9c0d6; }
.notice { border-left: 5px solid var(--go); background: var(--go-bg); padding: .75rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
.notice.warn { border-color: var(--wait); background: var(--wait-bg); }
.notice.stop { border-color: var(--stop); background: var(--stop-bg); }
.yield { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; margin: .5rem 0; }
.yield div { background: var(--field); border-radius: var(--radius); padding: .6rem .8rem; }
.yield b { display: block; font-family: var(--display); font-size: 1.6rem; line-height: 1.1; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--steel); vertical-align: top; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.list { list-style: none; padding: 0; margin: 0; }
.list > li { background: #fff; border: 1px solid var(--steel); border-radius: var(--radius); padding: .75rem .9rem; margin: .5rem 0; }
.list > li a.stretch { font-weight: 700; }
.meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .92rem; color: var(--muted); }
.bar { height: .55rem; background: var(--field); border-radius: 1rem; overflow: hidden; border: 1px solid var(--steel); }
.bar span { display: block; height: 100%; background: var(--go); }
.bar.full span { background: var(--stop); }
.day { background: #fff; border: 1px solid var(--steel); border-radius: var(--radius); padding: .75rem .9rem; margin: .6rem 0; }
.day h3 { margin: 0 0 .4rem; display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.day h3 a { font-size: 1rem; font-family: var(--font); font-weight: 700; }
.sp { display: grid; grid-template-columns: 7.5rem 1fr 4.5rem; gap: .5rem; align-items: center; margin: .3rem 0; font-size: .95rem; }
.sp .n { text-align: right; white-space: nowrap; }
dl.kv { display: grid; grid-template-columns: minmax(7rem, 35%) 1fr; gap: .3rem .75rem; margin: .5rem 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
details summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
.cutparts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 1rem; }
.steps { display: flex; gap: .3rem; list-style: none; padding: 0; margin: 1rem 0 0; font-size: .85rem; }
.steps li { flex: 1; text-align: center; padding: .3rem; border-bottom: 4px solid var(--steel); color: var(--muted); }
.steps li.on { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.steps li.done { border-color: var(--go); }
.hero { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 1.5rem 0; }
.hero .panel { display: flex; flex-direction: column; }
.hero .panel .button { margin-top: auto; }
.sheet h2 { border-bottom: 3px solid var(--ink); padding-bottom: .2rem; }
.sheet .bk { border: 1px solid var(--ink); border-radius: .3rem; padding: .6rem .8rem; margin: .6rem 0; break-inside: avoid; background: #fff; }
.sheet .bk h3 { margin: 0 0 .3rem; }
.write { display: inline-block; min-width: 5rem; border-bottom: 1px solid var(--ink); }
.inv-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.total td { font-weight: 700; border-bottom: 3px double var(--ink); }
@media (max-width: 30rem) {
  h1 { font-size: 1.8rem; }
  .sp { grid-template-columns: 5.5rem 1fr 4rem; }
  .top nav { margin-left: 0; width: 100%; justify-content: space-between; }
  .top nav a { padding: .35rem .4rem; font-size: .9rem; }
}
@media print {
  .no-print, .top, .demo-bar { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .wrap, .wrap.wide { max-width: none; padding: 0; }
  .panel { border: none; padding: 0; }
  .page-break { break-before: page; }
  a { text-decoration: none; }
}
