/* Value Plan: Touch of Paint's visual language (paper, ink, rust, Georgia over Arial, square corners). */
:root {
  --paper: #f5f2e9; --ink: #292e28; --muted: #707267; --line: #d8d8ca; --rust: #99462e; --rust-2: #a04b34;
  --panel: #fcfaf4; --aside: #e9ebdf; --aside-line: #dbdfd0; --hover: #e6e5d9;
  --ok: #3f5a36; --bad: #8e3a24; --bad-bg: #f1ddd3; --meh: #6c5a2a; --meh-bg: #eee6cf;
  --serif: Georgia, "Times New Roman", serif; --sans: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, canvas:focus-visible, label.btn:focus-within { outline: 3px solid #a75236; outline-offset: 4px; }

header { max-width: 1440px; margin: auto; padding: 24px 5%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 16px; }
.brand { text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-logo { width: 40px; height: 43px; display: block; }
.brand-name { font: 400 24px/1.05 var(--serif); letter-spacing: -.5px; color: var(--ink); }
.brand-dot { color: var(--rust-2); }
.header-note { font-size: 12px; color: var(--muted); }

main { max-width: 1440px; margin: auto; padding: 0 5% 48px; }
.intro { padding: 44px 0 34px; }
.eyebrow { font-size: 10px; letter-spacing: 2.4px; font-weight: bold; color: var(--muted); margin: 0 0 12px; }
h1 { font: normal clamp(36px, 4.6vw, 64px)/1.04 var(--serif); letter-spacing: -2px; margin: 6px 0 18px; }
h2 { font: normal 26px/1.18 var(--serif); margin: 0; }
.lede { max-width: 560px; font-size: 17px; color: #62675b; margin: 0; }
.quiet { color: var(--muted); font-size: 12px; margin: 0; }

.work { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 30px; align-items: start; border-top: 1px solid var(--line); padding-top: 32px; }
.work-main { display: grid; gap: 22px; min-width: 0; }
.work-side { background: var(--aside); border: 1px solid var(--aside-line); padding: 23px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; min-width: 0; }
.work-side h2 { margin-bottom: 14px; font-size: 30px; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 24px; min-width: 0; }
.enough { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.step { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.hint { margin: 4px 0 16px; color: var(--muted); font-size: 13px; max-width: 650px; }
.hint.small { font-size: 12px; margin: 10px 0 0; }
.empty { padding: 22px; border: 1px dashed #cdd3c1; color: var(--muted); margin: 0; font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }

.btn { display: inline-flex; align-items: center; border: 1px solid var(--rust); background: var(--rust); color: #fff; padding: 10px 16px; border-radius: 3px; font-size: 13px; min-height: 42px; cursor: pointer; }
.btn:hover { background: #803a27; }
.btn.ghost { background: transparent; color: var(--rust); }
.btn.ghost:hover { background: var(--hover); }

.stage { position: relative; background: #e5e5d9; border: 1px solid var(--line); display: flex; justify-content: center; align-items: center; min-height: 200px; }
.stage.over { outline: 3px dashed var(--rust); outline-offset: -8px; }
#view { display: block; max-width: 100%; height: auto; cursor: crosshair; touch-action: manipulation; }
.drop-note { position: absolute; margin: 0; color: var(--muted); font-size: 13px; pointer-events: none; }
.tabs { display: flex; margin-top: 12px; border: 1px solid var(--line); width: max-content; max-width: 100%; }
.tabs button { background: none; border: 0; border-right: 1px solid var(--line); padding: 9px 14px; font-size: 13px; min-height: 40px; }
.tabs button:last-child { border-right: 0; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 22px; margin: 12px 0 16px; }
.controls label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.controls output { color: var(--ink); font-weight: bold; margin-left: 6px; }
.controls label > :not(output) { width: 100%; }
input[type="range"] { accent-color: var(--rust); }
select { border: 1px solid var(--line); background: var(--panel); padding: 8px 10px; border-radius: 3px; min-height: 40px; }
.select { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }

/* the value scale: a 0–10 ramp with the bands drawn on it and draggable cuts */
.scale { position: relative; height: 54px; border: 1px solid var(--line); touch-action: none; user-select: none; }
.scale .band { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: center; font-size: 11px; padding-bottom: 4px; }
.scale .cut { position: absolute; top: -6px; bottom: -6px; width: 22px; margin-left: -11px; cursor: ew-resize; background: none; border: 0; padding: 0; }
.scale .cut::after { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--rust); }
.scale .cut::before { content: ""; position: absolute; left: 5px; top: -2px; width: 12px; height: 8px; background: var(--rust); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.scale-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); letter-spacing: 1px; margin-top: 6px; }

/* paints */
.paints { border: 1px solid var(--aside-line); background: var(--panel); padding: 10px 14px; }
.paints summary { cursor: pointer; font-size: 13px; min-height: 28px; display: list-item; }
.paints summary span { font-weight: bold; }
.paints fieldset { border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; padding: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.paints legend { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; padding: 0 6px 0 0; }
.paints label { display: flex; align-items: center; gap: 6px; font-size: 12px; min-height: 30px; }
.paints input { accent-color: var(--rust); margin: 0; }
.row.tight { margin: 8px 0 0; }
.link { background: none; border: 0; padding: 0; color: var(--rust); text-decoration: underline; text-underline-offset: 2px; font-size: 12px; }

/* piles */
.palette-sum { background: var(--panel); border: 1px solid var(--aside-line); padding: 10px 14px; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.palette-sum .meta { width: 100%; margin: 0; font-size: 11px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.num { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--ink); border-radius: 50%; font: bold 12px/1 var(--sans); margin-right: 8px; vertical-align: 2px; }
.tag { font: bold 9px/1 var(--sans); letter-spacing: 1.2px; text-transform: uppercase; color: var(--rust); border: 1px solid var(--rust); padding: 3px 5px; margin-right: 8px; vertical-align: 3px; }
.pile { background: var(--panel); border: 1px solid var(--aside-line); padding: 14px; margin-top: 12px; display: grid; grid-template-columns: 74px 1fr; gap: 12px; }
.pile.picked { outline: 2px solid var(--rust); outline-offset: 2px; }
.pile .sw { display: grid; grid-template-rows: 1fr 1fr; height: 74px; border: 1px solid #0001; }
.pile .sw i { display: block; }
.pile .sw i + i { clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%); }
.pile h3 { font: normal 17px/1.2 var(--serif); margin: 0 0 3px; }
.pile .meta { font-size: 11px; color: var(--muted); margin: 0 0 8px; }
.pile ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.pile li { display: flex; gap: 8px; align-items: center; }
.pile li b { min-width: 30px; text-align: right; }
.dot { width: 12px; height: 12px; display: inline-block; border: 1px solid #0002; flex: none; }
.check { margin: 8px 0 0; font-size: 12px; padding: 5px 8px; }
.check.ok { color: var(--ok); background: #e3e8db; }
.check.meh { color: var(--meh); background: var(--meh-bg); }
.check.bad { color: var(--bad); background: var(--bad-bg); font-weight: bold; }
.legend { font-size: 11px; color: var(--muted); margin: 10px 0 0; }

table { border-collapse: collapse; width: 100%; font-size: 13px; margin-bottom: 16px; }
th, td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
th { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); font-weight: normal; }
td.n { white-space: nowrap; }
footer { margin-top: 30px; }

@media (max-width: 980px) {
  .work { grid-template-columns: 1fr; }
  .work-side { position: static; max-height: none; }
}
@media (max-width: 560px) {
  header, main { padding-left: 16px; padding-right: 16px; }
  .panel, .work-side { padding: 16px; }
  .tabs button { padding: 9px 10px; }
  .pile { grid-template-columns: 56px 1fr; }
}
/* the easel sheet: built on demand, shown only when printing */
#sheet { display: none; color: #000; background: #fff; font: 11px/1.4 var(--sans); max-width: 190mm; }
#sheet h1 { font: normal 26px/1.1 var(--serif); letter-spacing: 0; margin: 0 0 4px; }
.sheet-meta { margin: 0 0 10px; }
.sheet-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.sheet-thumbs figure { margin: 0; }
.sheet-thumbs img { width: 100%; display: block; border: 1px solid #999; }
.sheet-thumbs figcaption { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; margin-top: 3px; }
.sheet-piles { font-size: 11px; margin-bottom: 8px; }
.sheet-piles tr { page-break-inside: avoid; }
.sheet-piles td, .sheet-piles th { padding: 4px 8px 4px 0; border-bottom: 1px solid #ccc; }
.sheet-sw { display: inline-block; width: 26px; height: 16px; border: 1px solid #0003; }
.sheet-thumbs img, .sheet-sw { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet-foot { color: #555; font-size: 9px; }
@media print {
  @page { margin: 12mm; }
  body > *:not(#sheet) { display: none !important; }
  body { background: #fff; }
  #sheet { display: block; }
}
