/* Visuals: a cutting mat with proofs laid on it, and the job ticket beside it. Mat green, white paper, process magenta. */
@font-face { font-family: Figtree; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Figtree; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --mat: #1f5d50; --mat-line: #2b6c5e; --on-mat: #ffffff; --on-mat-soft: #b9d3cb;
  --paper: #ffffff; --ink: #101412; --soft: #57625e; --rule: #d5dcd8; --field: #f1f4f2;
  --go: #e6007e; --on-go: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --mat: #143d35; --mat-line: #1b4a40; --paper: #121816; --ink: #f2f5f3; --soft: #a3b0ab; --rule: #2c3733; --field: #1b2421; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mat); color: var(--ink); font: 400 16px/1.45 Figtree, "Helvetica Neue", Arial, sans-serif; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--go); outline-offset: 2px; }
[hidden] { display: none !important; }

.bench { display: grid; grid-template-columns: minmax(0, 1fr); }
.ticket { background: var(--paper); padding: max(20px, env(safe-area-inset-top)) 20px 28px; }
h1 { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.lede { margin: 10px 0 0; color: var(--soft); max-width: 44ch; }
.ticket h2 { margin: 26px 0 8px; padding-top: 12px; border-top: 2px solid var(--ink); font-size: 18px; font-weight: 800; }
.hint { margin: 8px 0 0; color: var(--soft); font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 999px; background: none; font-weight: 700; cursor: pointer; }
.btn.go { background: var(--go); border-color: var(--go); color: var(--on-go); flex: none; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.picture { display: flex; align-items: center; gap: 16px; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick:focus-within { outline: 3px solid var(--go); outline-offset: 2px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
#words fieldset { display: grid; gap: 6px; margin-bottom: 14px; }
.rowhead { display: flex; justify-content: space-between; align-items: center; }
input:not([type]), select { width: 100%; min-height: 46px; padding: 0 12px; background: var(--field); border: 0; border-bottom: 2px solid var(--ink); border-radius: 6px 6px 0 0; }
select { width: auto; padding-right: 34px; font-weight: 700; appearance: none; -webkit-appearance: none;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23808a86' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center / 12px; }

.choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice label { position: relative; display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border: 2px solid var(--rule); border-radius: 10px; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label:has(:checked) { border-color: var(--ink); background: var(--field); }
.choice label:has(:focus-visible) { outline: 3px solid var(--go); outline-offset: 2px; }
.choice.small { grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1; }
.choice.small label { min-height: 46px; align-content: center; }
.choice.small label:last-child { font-family: Georgia, serif; }
/* Little diagrams of each layout: the picture is the dark part. */
.dia { width: 54px; height: 34px; border-radius: 3px; background: var(--rule); }
.dia.split { background: linear-gradient(90deg, var(--rule) 54%, var(--soft) 0); }
.dia.poster { background: linear-gradient(var(--soft) 55%, var(--rule)); }
.dia.badge { background: radial-gradient(circle at 26% 50%, var(--soft) 9px, var(--rule) 9.5px); }
.pair { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.colour { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.colour input { width: 56px; height: 46px; padding: 2px; border: 2px solid var(--rule); border-radius: 10px; background: none; cursor: pointer; }

#sizes fieldset { margin-bottom: 10px; }
legend { padding: 0; font-weight: 700; margin-bottom: 2px; }
legend span { font-weight: 400; color: var(--soft); font-size: 14px; margin-left: 6px; }
.size { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.size input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.size span { margin-left: auto; color: var(--soft); font-size: 14px; white-space: nowrap; }
footer { margin-top: 24px; color: var(--soft); font-size: 14px; }

/* The mat. */
.mat { color: var(--on-mat); padding: 8px 20px 0; min-width: 0;
  background: linear-gradient(var(--mat-line) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--mat-line) 1px, transparent 1px) 0 0 / 40px 40px, var(--mat); }
.mat h2 { margin: 22px 0 12px; font-size: 20px; font-weight: 800; display: flex; align-items: baseline; gap: 10px; }
.mat h2 span { font-weight: 500; font-size: 14px; color: var(--on-mat-soft); }
.sheet { display: flex; flex-wrap: wrap; gap: 22px 18px; align-items: flex-end; }
.proof { display: grid; gap: 2px; justify-items: start; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; max-width: 100%; }
.proof canvas { display: block; max-width: 100%; margin-bottom: 6px; background: var(--paper); box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 10px 24px -8px rgba(0, 0, 0, .45); }
.proof b { font-size: 14px; font-weight: 700; }
.proof span { font-size: 13px; color: var(--on-mat-soft); }
@media (hover: hover) { .proof:hover canvas { outline: 3px solid var(--on-mat); outline-offset: 3px; } }
.none { color: var(--on-mat-soft); padding: 40px 0; }
.bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 28px -20px 0; padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  background: var(--mat); border-top: 1px solid var(--mat-line); }
.bar p { margin: 0; font-size: 14px; color: var(--on-mat-soft); min-width: 0; }
.noscript { background: var(--paper); text-align: center; padding: 40px 16px; margin: 0; }

@media (min-width: 900px) {
  .bench { grid-template-columns: 400px minmax(0, 1fr); min-height: 100dvh; }
  .ticket { padding: 32px 28px; height: 100dvh; position: sticky; top: 0; overflow-y: auto; }
  .mat { padding: 16px 36px 0; display: flex; flex-direction: column; }
  .mat #proofs { flex: 1; }
  .bar { margin: 28px -36px 0; padding: 14px 36px; }
}

/* Legal page. */
.doc { background: var(--paper); max-width: 640px; margin: 0 auto; padding: 24px 20px 48px; min-height: 100dvh; }
.doc h1 { font-size: 32px; margin: 12px 0; }
.doc h2 { font-size: 20px; margin: 24px 0 6px; padding-top: 10px; border-top: 2px solid var(--ink); }
.doc li { margin-bottom: 6px; }

@media (max-width: 760px), (pointer: coarse) { input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; } }
