@font-face {
  font-family: "MP Proof Serif";
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/mp-proof-serif-bold.woff2) format("woff2");
}
@font-face {
  font-family: "MP Proof Sans";
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/mp-proof-sans-regular.woff2) format("woff2");
}
@font-face {
  font-family: "MP Proof Sans";
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/mp-proof-sans-bold.woff2) format("woff2");
}

/* A print counter: the job ticket on the left, a cutting mat ruled in inches on the right with the sheet to scale.
   Process magenta marks what is chosen and what to press; figures are set in the serif. */
:root {
  --bg: #eef1f3;
  --panel: #ffffff;
  --ink: #14181b;
  --ink-2: #4a545b;
  --ink-hint: #5a646b; /* small text: >= 4.5:1 on bg and panel */
  --line: #d2d8dc;
  --line-strong: #9aa5ac;
  --accent: #c2146b;
  --accent-type: #ffffff;
  --mat: #2c3d44;
  --mat-rule: rgba(255, 255, 255, 0.13);
  --mat-ink: #c9d6da;
  --error: #b3261e;
  --ui: "MP Proof Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fig: "MP Proof Serif", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121517;
    --panel: #1b2023;
    --ink: #eef1f2;
    --ink-2: #a6b0b6;
    --ink-hint: #8d979d;
    --line: #2d3438;
    --line-strong: #4c565c;
    --accent: #ff6fb5;
    --accent-type: #1a0a12;
    --mat: #0b0f11;
    --mat-rule: rgba(255, 255, 255, 0.09);
    --mat-ink: #b9c6ca;
    --error: #ff9a8a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121517;
  --panel: #1b2023;
  --ink: #eef1f2;
  --ink-2: #a6b0b6;
  --ink-hint: #8d979d;
  --line: #2d3438;
  --line-strong: #4c565c;
  --accent: #ff6fb5;
  --accent-type: #1a0a12;
  --mat: #0b0f11;
  --mat-rule: rgba(255, 255, 255, 0.09);
  --mat-ink: #b9c6ca;
  --error: #ff9a8a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 var(--ui);
  font-feature-settings: "kern";
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
figure,
fieldset,
p,
h1,
h2,
ul,
dl,
dd {
  margin: 0;
}
fieldset {
  padding: 0;
  border: 0;
  min-width: 0;
}
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
a:hover {
  text-decoration-color: currentColor;
}
button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel);
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
button:hover:not(:disabled) {
  border-color: var(--ink);
}
button:disabled {
  cursor: default;
}
:where(button, a, summary, select, input[type="number"]):focus-visible,
.pick-button:focus-within,
.seg-option:has(input:focus-visible),
.size:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-type);
  font-weight: 700;
}
.primary:hover:not(:disabled) {
  border-color: var(--ink);
}
.primary:disabled {
  border-color: var(--line);
  background: var(--line);
  color: var(--ink-hint);
}
.numeric {
  font-variant-numeric: lining-nums tabular-nums;
}

/* ------------------------------------------------------------------ page and top */

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 30px 40px 28px;
}
.top {
  margin-bottom: 22px;
}
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
h1 {
  font: 700 44px/1.02 var(--fig);
  letter-spacing: -0.015em;
}
.site {
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.site .arrow {
  display: inline-block;
  margin-left: 0.2em;
  transition: transform 0.2s;
}
.site:hover .arrow {
  transform: translate(2px, -2px);
}
.lead {
  margin-top: 10px;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.35;
}
.brand {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-2);
}
.notice {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  font-size: 14px;
}

/* ------------------------------------------------------------------ the counter: ticket and proof */

.shop {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 28px 36px;
  align-items: start;
}

/* the job ticket */
.ticket {
  display: grid;
  gap: 18px;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  background: var(--panel);
}
.step h2,
.opt h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font: 700 14px/1.3 var(--ui);
}
.n {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--ink);
  font: 700 12px/1 var(--ui);
}
.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pick-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.pick-button:hover {
  background: var(--bg);
}
.pick-button input,
.seg-option input,
.size input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.pick-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
}
.pick-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex: none;
}
.pick-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pick-text strong {
  color: var(--ink);
  font-weight: 400;
}

/* print sizes: each with a little sheet drawn to one common scale */
.sizes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.size {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 6px;
  min-height: 48px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}
.size:hover {
  border-color: var(--ink);
}
.size-shape {
  grid-row: 1 / 3;
  justify-self: center;
  display: block;
  border: 1px solid var(--ink-2);
  background: var(--panel);
}
.size-name {
  align-self: end;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
}
.size small {
  align-self: start;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ink-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.size:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.size:has(input:checked) .size-shape {
  border-color: var(--accent);
  background: var(--accent);
}
.size.unreachable {
  cursor: not-allowed;
  border-style: dashed;
}
.size.unreachable > * {
  opacity: 0.42;
}
.size.unreachable:hover {
  border-color: var(--line);
}
.custom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.size-custom {
  display: inline-flex;
  min-height: 40px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 14px;
}
.num,
.custom select {
  width: 72px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel);
  font-variant-numeric: tabular-nums;
}
.custom select {
  width: auto;
}

.sizes-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.readout-for {
  margin-bottom: -10px;
  font-size: 13px;
  font-weight: 700;
}
.readout-for:empty {
  display: none;
}
.back {
  min-height: 46px;
  border-color: var(--ink);
  font-weight: 700;
}
.step-row {
  display: grid;
  gap: 14px;
}
.seg {
  display: flex;
  border: 1px solid var(--line-strong);
}
.seg-option {
  position: relative;
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 8px;
  cursor: pointer;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.seg-option + .seg-option {
  border-left: 1px solid var(--line-strong);
}
.seg-option:hover {
  background: var(--bg);
}
.seg-option:has(input:checked) {
  background: var(--ink);
  color: var(--panel);
  font-weight: 700;
}

/* the figures */
.readout {
  display: grid;
  border-top: 1px solid var(--ink);
}
.readout > div {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.readout dt {
  font-size: 13px;
  color: var(--ink-2);
}
.readout dd {
  font: 700 19px/1.2 var(--fig);
  font-variant-numeric: lining-nums tabular-nums;
}
.readout dd small {
  display: block;
  margin-top: 2px;
  font: 400 13px/1.3 var(--ui);
  color: var(--ink-2);
}
.readout-main dd {
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
}
.plan {
  margin-top: -6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.plan:empty {
  display: none;
}
.plan-error {
  color: var(--error);
}
.linkish {
  min-height: 32px;
  margin-left: 4px;
  padding: 0 10px;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.run {
  min-height: 50px;
  font-size: 16px;
}
.quota {
  margin-top: -8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.status {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.status[data-state="error"] .status-text strong {
  color: var(--error);
}
.status-text strong {
  font-weight: 700;
}
.status-text .meta {
  color: var(--ink-2);
  font-size: 14px;
}
.status .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status .actions a,
.status .actions button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  font-weight: 700;
}
.status .actions .primary {
  border-color: var(--accent);
}
.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  vertical-align: -1px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.turnstile:empty {
  display: none;
}

/* ------------------------------------------------------------------ the proof */

.proof {
  min-width: 0;
}
.proof-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 36px;
  margin-bottom: 10px;
}
.caption {
  font-size: 15px;
}
.caption strong {
  font-weight: 700;
}
.caption .meta {
  margin-left: 8px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.whole {
  display: inline-flex;
  border: 1px solid var(--line-strong);
}
.whole button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  font-size: 14px;
  color: var(--ink-2);
}
.whole button:disabled {
  color: var(--ink-hint);
  opacity: 0.6;
}
.whole [aria-pressed="true"] {
  background: var(--ink);
  color: var(--panel);
}

/* the mat is ruled in inches at the sheet's scale */
.mat {
  --inch: 40px;
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(300px, 50vh, 500px);
  background-color: var(--mat);
  background-image: linear-gradient(to right, var(--mat-rule) 1px, transparent 1px), linear-gradient(to bottom, var(--mat-rule) 1px, transparent 1px);
  background-size: var(--inch) var(--inch);
  background-position: center;
  overflow: hidden;
}
.sheet {
  position: relative;
  background: #ffffff;
  touch-action: pan-y;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}
.sheet-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.sheet-image {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
}
.locator {
  position: absolute;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px #ffffff;
  pointer-events: none;
}
.spot {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: move;
  touch-action: none;
}
.spot:hover:not(:disabled) {
  border: 0;
  background: transparent;
}
/* crop marks at the corners of the sheet */
.mark {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 0 solid var(--mat-ink);
  pointer-events: none;
}
.mark.tl {
  left: -18px;
  top: -18px;
  border-right-width: 1px;
  border-bottom-width: 1px;
}
.mark.tr {
  right: -18px;
  top: -18px;
  border-left-width: 1px;
  border-bottom-width: 1px;
}
.mark.bl {
  left: -18px;
  bottom: -18px;
  border-right-width: 1px;
  border-top-width: 1px;
}
.mark.br {
  right: -18px;
  bottom: -18px;
  border-left-width: 1px;
  border-top-width: 1px;
}
.mat-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 20px;
  margin-top: 6px;
}
.mat-note,
.hint {
  font-size: 13px;
  color: var(--ink-hint);
  font-variant-numeric: tabular-nums;
}
.note-touch {
  display: none;
}

/* the two glasses */
.loupe {
  margin-top: 20px;
}
.loupe-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 8px;
}
.loupe-head h2 {
  font: 700 20px/1.2 var(--fig);
}
.loupe-note {
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.loupe-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.loupe-pair figure {
  min-width: 0;
}
.glass {
  position: relative;
  aspect-ratio: 1;
  max-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #ffffff;
}
.glass canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.glass-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #4a545b;
}
.loupe-pair figcaption {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.loupe-pair figure:last-child figcaption {
  color: var(--ink);
  font-weight: 700;
}

/* examples */
.photos {
  margin-top: 22px;
}
.photos-head {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ink-2);
}
.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.example {
  display: grid;
  grid-template-columns: 56px auto;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
  color: var(--ink-2);
}
.example img {
  display: block;
  width: 56px;
  height: 42px;
  object-fit: cover;
}
.example-text {
  display: grid;
  font-size: 14px;
  line-height: 1.25;
}
.example-text small {
  font-size: 12px;
  color: var(--ink-hint);
}
.example[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--ink);
}
.example[aria-pressed="true"] .example-text > span {
  font-weight: 700;
}
.example[data-loading="true"] {
  border-color: var(--line-strong);
}

/* ------------------------------------------------------------------ colophon */

.colophon {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}
.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 32px;
  align-items: center;
}
.about summary {
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
}
.about summary::-webkit-details-marker {
  display: none;
}
.about summary::before {
  content: "+";
  display: inline-block;
  width: 16px;
  font-weight: 700;
}
.about[open] summary::before {
  content: "–";
}
.about-body {
  max-width: 76ch;
  display: grid;
  gap: 10px;
  padding: 4px 0 16px 16px;
}
.about-body h2 {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.credits {
  display: grid;
  gap: 4px;
}

.dropzone {
  position: fixed;
  inset: 12px;
  display: none;
  place-items: center;
  border: 2px dashed var(--accent);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  font: 700 24px/1.2 var(--fig);
  z-index: 10;
  pointer-events: none;
}
body[data-dragover="true"] .dropzone {
  display: grid;
}

@media (hover: none) {
  .note-mouse {
    display: none;
  }
  .note-touch {
    display: inline;
  }
  .sheet {
    cursor: default;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 1100px) {
  .shop {
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
  }
  .sizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .page {
    padding: 22px 16px 24px;
  }
  h1 {
    font-size: 34px;
  }
  .lead {
    font-size: 17px;
  }
  .top-row {
    flex-wrap: wrap;
    gap: 6px 16px;
  }
  .shop {
    grid-template-columns: 1fr;
  }
  .ticket {
    padding: 16px 14px;
  }
  /* the allowance line sits right under the photo step on a phone, not below the fold */
  .ticket > .step:first-child {
    order: -2;
  }
  .ticket > .quota {
    order: -1;
    margin-top: -10px;
  }
  .sizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pick {
    flex-wrap: wrap;
  }
  .seg-option {
    font-size: 13px;
    padding: 0 4px;
  }
  .mat {
    height: 320px;
  }
  .examples {
    flex-wrap: nowrap;
    margin: 0 -16px;
    padding: 0 16px 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .examples li {
    flex: none;
  }
  .example {
    white-space: nowrap;
  }
  .example-text small {
    display: none;
  }
}
