/* web/mill.css -- the Mill: the steps panel and the stage side by side; stacked on a phone.
   Colours and type come from chrome.css and notebook.css (--rule, --muted, --blue, --amber,
   --red, --mono), as the Kiln's do. */
main.mill-page { max-width: none; }
.mill { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 16px; margin-top: 20px; height: calc(100vh - 210px); min-height: 560px; }
.mill-panel { overflow-y: auto; border: 1px solid var(--rule); padding: 8px 12px; display: grid; gap: 8px; align-content: start; }
.mill-panel h2 { font-size: 13px; margin: 10px 0 4px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.mill-panel h3 { font-size: 13px; margin: 8px 0 2px; }
.mill-panel section { display: grid; gap: 6px; }
.mill-panel section[hidden] { display: none; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.stepper button[aria-current="step"] { border-color: var(--blue); color: var(--blue); }
.mill .group { display: flex; flex-wrap: wrap; gap: 4px; }
.mill button { font: inherit; font-size: 13px; padding: 3px 8px; border: 1px solid #5F5E5A; color: var(--fg); background: var(--bg); cursor: pointer; }
.mill button:hover { border-color: var(--fg); }
.mill button:disabled { color: var(--muted); border-color: var(--rule); cursor: default; }
.mill button[aria-pressed="true"]:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.mill input, .mill select { font: inherit; font-size: 13px; }
.fields { display: grid; gap: 4px; }
.fields[hidden] { display: none; }
.fields label { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; align-items: center; font-size: 13px; }
.file { font-size: 13px; display: grid; gap: 4px; }
.table { overflow-x: auto; }
#library { border-collapse: collapse; font-size: 12px; }
#library th { text-align: left; color: var(--muted); font-weight: normal; padding: 0 4px; }
#library td { padding: 1px 2px; }
#library input[type="number"] { width: 64px; }
#library input.custom { border-color: var(--amber); }
.warning { color: var(--amber); font-size: 13px; margin: 0; }
.warnings { margin: 0; padding-left: 18px; color: var(--amber); font-size: 13px; }
.warnings:empty { display: none; }
.note { border-left: 2px solid var(--amber); padding: 4px 8px; margin: 0; }
.note[hidden] { display: none; }
.report, .programs { margin: 0; padding-left: 20px; display: grid; gap: 2px; }
.report button, .programs button { text-align: left; width: 100%; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
.mill .stage { position: relative; margin: 0; height: auto; min-height: 0; }
.mill .stage canvas { width: 100%; height: 100%; display: block; }
.stage-bar { position: absolute; left: 16px; right: 16px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.stage-bar button { pointer-events: auto; }
.stage-note { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.stage-note.idle { font-family: inherit; }
.mill .stage.dropping { outline: 2px dashed var(--blue); outline-offset: -2px; }
.crash { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; background: rgba(28, 27, 26, 0.92); z-index: 2; }
.crash[hidden] { display: none; }
.crash p { margin: 0; max-width: 480px; color: var(--red); font-family: var(--mono); font-size: 13px; }
.refusal { border-left: 2px solid var(--red); padding: 4px 8px; font-size: 13px; font-family: var(--mono); white-space: pre-wrap; }
.refusal[hidden] { display: none; }
@media (max-width: 1000px) {
  .mill { grid-template-columns: minmax(0, 1fr); height: auto; }
  .mill .stage { height: 60vh; }
}
