:root {
  --desk: #D9DBDE;
  --paper: #FFFFFF;
  --print: #222222;
  --rule: #A3A8AF;
  --rule-soft: #E3E5E8;
  --blue: #1F4FD1;          /* ballpoint: everything the photographer fills in */
  --blue-wash: #EAF0FD;
  --soft: #5E646C;
  --red: #C1272D;          /* red pen: settings that don't fit together */
  --focus: #1F4FD1;
  /* aliases used by the admin page */
  --seamless: var(--desk); --card: var(--paper); --ink: var(--print); --ink-soft: var(--soft); --action: var(--blue);
  --radius-s: 2px; --radius-l: 3px;
  --condensed: 68;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color: var(--print);
  background: var(--desk);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.5; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.text-btn, .link { font: inherit; font-size: 0.875rem; background: none; border: 0; padding: 2px 0; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.desk { max-width: 1180px; margin: 0 auto; padding: 48px 20px 40px; }

/* Masthead: the condensed headline is the type doing the work */
.masthead { max-width: 760px; margin-bottom: 36px; }
.masthead h1 {
  font-stretch: 68%; font-variation-settings: "wdth" 68; font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 5.4rem); line-height: 0.92; letter-spacing: -0.01em; margin: 0 0 18px;
}
.lede { font-size: 1.2rem; line-height: 1.45; margin: 0 0 10px; max-width: 58ch; }
.credit { color: var(--soft); font-size: 0.9rem; margin: 0; max-width: 70ch; }

/* Sheets of paper */
.sheets { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sheet { background: var(--paper); border-radius: var(--radius-l); padding: 22px 24px 26px; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.sheet-title {
  font-stretch: 68%; font-variation-settings: "wdth" 68; font-weight: 700; font-size: 1.6rem; line-height: 1;
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--print);
}
.form .sheet-title:not(:first-child) { margin-top: 30px; }
.estimate { position: sticky; top: 16px; }

/* Form cells: a printed grid of boxes */
.cells { display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); }
.cell { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 12px 12px; min-width: 0; }
.cell-wide { grid-column: 1 / -1; }
.cell-media { border: 1px solid var(--rule); border-top: 0; }
.cell-head { display: flex; align-items: center; gap: 6px; }
.cell-label { font-size: 0.8rem; color: var(--soft); }
.cell-value {
  display: block; color: var(--blue); font-weight: 600; font-size: 1.15rem; line-height: 1.2; margin: 2px 0 6px;
  font-stretch: 80%; font-variation-settings: "wdth" 80; min-height: 1.2em;
}
.help { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; color: var(--soft); font: 600 11px/1 "Archivo", sans-serif; cursor: pointer; padding: 0; flex-shrink: 0; }
.help[aria-expanded="true"] { background: var(--print); border-color: var(--print); color: var(--paper); }
.tip { font-size: 0.85rem; line-height: 1.45; background: var(--blue-wash); padding: 8px 10px; margin: 6px 0 8px; }

/* Light-meter scales */
.scale { position: relative; padding: 0 7px; }
.scale input[type="range"] { -webkit-appearance: none; appearance: none; width: calc(100% + 14px); margin: 0 -7px; height: 30px; background: transparent; cursor: pointer; position: relative; z-index: 1; }
.scale input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--print); }
.scale input[type="range"]::-moz-range-track { height: 1px; background: var(--print); }
.scale input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 26px; margin-top: -13px; background: transparent; border: 0;
  background-image: linear-gradient(var(--blue), var(--blue)); background-size: 3px 100%; background-repeat: no-repeat; background-position: center; }
.scale input[type="range"]::-moz-range-thumb { width: 3px; height: 26px; background: var(--blue); border: 0; border-radius: 0; }
.ticks { position: relative; height: 9px; margin: -24px -7px 15px; pointer-events: none; }
.tick { position: absolute; top: 0; width: 1px; height: 5px; background: var(--print); transform: translateX(-0.5px); }
.tick.major { height: 9px; }
.tick.on { background: var(--blue); width: 2px; height: 9px; }
.scale-ends { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--soft); margin-top: 3px; }

/* Media as printed checkboxes */
.boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; margin-top: 6px; }
.box { display: flex; align-items: center; gap: 9px; font: inherit; font-size: 0.92rem; text-align: left; background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--print); }
.box::before { content: ""; width: 16px; height: 16px; border: 1.5px solid var(--print); flex-shrink: 0; }
.box[aria-pressed="true"] { color: var(--blue); font-weight: 600; }
.box[aria-pressed="true"]::before { border-color: var(--blue); background: linear-gradient(45deg, transparent 44%, var(--blue) 44%, var(--blue) 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--blue) 44%, var(--blue) 56%, transparent 56%); }

/* Estimate sheet */
.total-block { padding: 4px 0 14px; }
.total-label { margin: 0; font-size: 0.8rem; color: var(--soft); }
.total { margin: 0; color: var(--blue); font-weight: 800; font-stretch: 68%; font-variation-settings: "wdth" 68; font-size: clamp(2.6rem, 5.5vw, 3.6rem); line-height: 1; letter-spacing: -0.005em; }
.total.empty { font-size: 1.4rem; font-weight: 600; }
.total-note { margin: 8px 0 0; font-size: 0.82rem; color: var(--soft); }

.ledger { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 6px 0 4px; }
.ledger td { padding: 6px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.ledger .l-name { width: 34%; }
.ledger .l-set { color: var(--blue); font-size: 0.82rem; padding-right: 8px; }
.ledger .l-dev { width: 96px; padding-right: 10px; }
.ledger .l-mult { text-align: right; width: 56px; font-weight: 600; }
.dev { position: relative; height: 10px; }
.dev::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--rule); }
.dev span { position: absolute; top: 2px; height: 6px; background: var(--blue); }
.ledger tr.base td { color: var(--soft); }
.ledger tr.sum td { border-bottom: 0; border-top: 3px double var(--print); font-weight: 700; padding-top: 8px; }
.ledger-note { font-size: 0.8rem; color: var(--soft); margin: 4px 0; }

.request { margin-top: 20px; padding: 14px; border: 1.5px solid var(--print); }
.request h3, .terms h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.request p { font-size: 0.88rem; margin: 0 0 10px; }
.request-row { display: flex; gap: 8px; }
.request-row input { flex: 1; min-width: 0; font: inherit; color: var(--blue); padding: 9px 2px; border: 0; border-bottom: 1.5px solid var(--print); background: transparent; }
.request-row input::placeholder { color: var(--soft); }
.primary { font: inherit; font-weight: 700; background: var(--print); color: var(--paper); border: 0; border-radius: var(--radius-s); padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.primary:hover { background: var(--blue); }
.primary:disabled { opacity: .6; cursor: default; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; margin-top: 10px; }
.check input { margin-top: 3px; accent-color: var(--blue); }
.status { font-size: 0.85rem; min-height: 1.3em; margin: 6px 0 0 !important; }

.terms { margin-top: 22px; }
.terms-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--print); padding-bottom: 6px; margin-bottom: 10px; }
.clauses { margin: 0; padding-left: 1.3em; }
.clauses li { margin: 0 0 12px; font-size: 0.85rem; line-height: 1.55; }
.clauses li::marker { font-weight: 700; }
.clauses h4 { display: inline; font-size: 0.85rem; margin: 0; }
.clauses mark { background: none; color: var(--blue); font-weight: 600; }
.more-clauses summary { cursor: pointer; font-size: 0.85rem; color: var(--blue); margin: 0 0 10px; }
.fine { font-size: 0.78rem; color: var(--soft); margin: 8px 0 0; }

.colophon { margin-top: 32px; font-size: 0.82rem; color: var(--soft); max-width: 78ch; }

.flag { color: var(--red); font-size: 0.82rem; line-height: 1.4; margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--red); }
.flag[hidden] { display: none; }
.mobile-bar { display: none; }

@media (max-width: 900px) {
  .sheets { grid-template-columns: minmax(0, 1fr); }
  .estimate { position: static; }
  .desk { padding-top: 28px; }
  .mobile-bar { display: flex; position: sticky; top: 0; z-index: 5; justify-content: space-between; align-items: baseline; background: var(--paper); border-bottom: 2px solid var(--print); padding: 10px 20px; }
  .mobile-bar span { font-size: 0.82rem; color: var(--soft); }
  .mobile-bar strong { color: var(--blue); font-size: 1.25rem; font-stretch: 68%; font-variation-settings: "wdth" 68; }
}
@media (max-width: 520px) {
  .cells { grid-template-columns: 1fr; }
  .sheet { padding: 18px 16px 22px; }
  .request-row { flex-direction: column; }
}
@media (max-width: 520px) {
  .ledger { font-size: 0.85rem; }
  .ledger .l-name { width: 26%; }
  .ledger .l-dev { width: 52px; padding-right: 8px; }
  .ledger tr.base .l-set { font-size: 0.78rem; }
}
