:root {
  /* As the Hub's documents (QuotePdf.vb): navy, the panel shade, the rule line, muted and body text, amber. */
  --navy: #00316a;
  --ink: #1f2733;
  --muted: #6b7686;
  --panel: #f3f6fa;
  --rule: #dfe3ea;
  --line: #c9d1dc;
  --bg: #ffffff;
  --field: #ffffff;
  --amber: #d98a1c;
  --amber-ink: #8a4b00;
  --bad: #b3261e;
  --good: #1e7a3c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; accent-color: var(--navy); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
a { color: var(--navy); }

/* The top of a Hub document: the navy strip, the logo, and the title on the right. */
.strip { height: 10px; background: var(--navy); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 30px; padding-bottom: 22px; }
.logo { height: 58px; width: auto; }
.title { text-align: right; }
.title .small { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.title h1 { margin: 2px 0 2px; font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.title .sub { display: block; font-size: 13px; color: var(--muted); }

/* The details row under the title (as a quote's date, valid until, project...). */
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; margin: 0 0 26px; padding: 12px 16px 14px;
        border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.meta dt { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.meta [hidden] { display: none; }
.meta dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.meta a { text-decoration: none; }

main { padding-bottom: 28px; }
.panel { background: var(--panel); padding: 20px 22px 22px; margin: 0 0 18px; border: 0; }
fieldset.panel { min-width: 0; }
legend, .boxhead { float: left; width: 100%; padding: 0; margin: 0 0 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em;
                   text-transform: uppercase; color: var(--navy); }
.boxhead { float: none; }
legend + * { clear: both; }
.note h2 { margin: 0 0 6px; font-size: 20px; color: var(--navy); }
.note p { margin: 0; }
.problem { border-left: 4px solid var(--bad); }
.done { border-left: 4px solid var(--good); }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.need { color: var(--bad); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.stack { display: grid; gap: 14px; align-content: start; }

/* Labels as a document's small capitals; the boxes white with a fine edge. */
label, .label { display: block; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
label > input, label > textarea { display: block; width: 100%; margin-top: 5px; }
input, textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 2px; padding: 9px 10px; }
textarea { resize: vertical; }
input::placeholder { color: #9aa3af; opacity: 1; }
input:focus, textarea:focus, .terms:focus, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.invalid { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }

.choices { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 7px; }
.choices label { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.choices input { width: 19px; height: 19px; margin: 0; }
.choice.invalid { padding: 6px 8px; background: var(--field); }

/* The builders' merchants warning: as a quote's special order box (amber edge). */
.warn { background: var(--field); border-left: 4px solid var(--amber); padding: 12px 16px; margin: 0 0 16px; }
.warn .boxhead { margin: 0 0 4px; color: var(--amber-ink); }
.warn p { margin: 0; font-size: 14px; }

.refs { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ref h3 { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); font-size: 14px; font-weight: 600; color: var(--ink); }
.ref .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ref label { margin-bottom: 14px; }
.ref .two label { margin-bottom: 0; }
.ref .two { margin-bottom: 14px; }

.terms { max-height: 320px; overflow: auto; background: var(--field); border: 1px solid var(--rule); padding: 12px 16px; font-size: 13px; }
.terms h4 { margin: 10px 0 2px; font-size: 13px; color: var(--navy); }
.terms p { margin: 0 0 6px; text-align: justify; }
.terms p.indent { margin-left: 14px; }

.signature { display: block; width: 100%; height: 150px; margin-top: 5px; background: var(--field); border: 1px solid var(--line); border-radius: 2px; touch-action: none; cursor: crosshair; }
.sigfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; gap: 8px; }
.sigfoot .muted { font-size: 13px; }
.tick { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.tick input { width: 19px; height: 19px; margin: 2px 0 0; flex: none; }

button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; color: var(--navy); text-decoration: underline; padding: 4px; }
.send { text-align: right; }
#send { background: var(--navy); color: #fff; border: 0; border-radius: 2px; padding: 13px 32px; font-weight: 600; font-size: 16px; }
#send:hover { background: #002552; }
#send[disabled] { opacity: .6; cursor: progress; }
.error { color: var(--bad); font-weight: 600; margin: 0 0 12px; }
.privacy { font-size: 12.5px; color: var(--muted); margin: 0 2px 20px; }
.away { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* The foot of a Hub document: Welling's name and registrations, and what this is. */
.foot { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; border-top: 1px solid var(--rule);
        color: var(--muted); font-size: 12px; padding-top: 14px; padding-bottom: 28px; }

@media (max-width: 680px) {
  .grid, .refs { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .meta { grid-template-columns: 1fr 1fr; }
  .head { padding-top: 20px; padding-bottom: 16px; }
  .title h1 { font-size: 23px; }
  .logo { height: 40px; }
  .panel { padding: 16px 16px 18px; }
  .send { text-align: stretch; }
  #send { width: 100%; }
}
