/* Ashton Legal branding, from ashtonlegal.co.nz: ink on paper, Newsreader headings, Archivo text.
   Fonts are served from this site (fonts.css), never from Google. */
:root {
  --ink: #0b0b0b; --ink-soft: #454542; --paper: #fbfbf9; --paper-alt: #f1f1ee; --rule: #d6d6d1;
  --card: #ffffff; --ok: #2f5d3a; --bad: #9b2c2c; --focus: rgba(11,11,11,.18);
  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans: Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
h1:focus { outline: none; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }

.top { background: var(--paper); border-bottom: 1px solid var(--rule); padding: 12px 16px 0; position: sticky; top: 0; z-index: 5; }
.top-inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: block; line-height: 0; }
.brand img { height: 54px; width: auto; }
.tagline { font: 500 15px/1.3 var(--serif); color: var(--ink-soft); text-align: right; }
.steps { list-style: none; display: flex; gap: 6px; margin: 10px auto 0; padding: 0 0 10px; max-width: 680px; }
.steps li { flex: 1; height: 3px; border-radius: 2px; background: var(--rule); }
.steps li.on { background: var(--ink); }

main { max-width: 680px; margin: 0 auto; padding: 18px 16px 40px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 22px 18px; }
h1 { font: 500 30px/1.15 var(--serif); margin: 0 0 14px; letter-spacing: -.01em; }
h2 { font: 500 21px/1.25 var(--serif); margin: 24px 0 6px; }
.muted { color: var(--ink-soft); } .small { font-size: 14px; font-family: var(--sans); font-weight: normal; }
.req { color: var(--bad); }
.fine { font-size: 14px; color: var(--ink-soft); margin-top: 20px; }
ol.plain { padding-left: 22px; } ol.plain li { margin: 3px 0; }
a { color: var(--ink); text-underline-offset: 2px; }

label { display: block; margin: 14px 0 0; font-weight: 600; font-size: 15px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font: 400 17px/1.4 var(--sans); color: inherit;
  border: 1px solid #bdbdb6; border-radius: 4px; background: #fff; }
input:focus, textarea:focus, .terms:focus { outline: 3px solid var(--focus); border-color: var(--ink); }
input[type=date] { min-height: 48px; }
label.nolabel { margin-top: 6px; }
fieldset.kind { border: 0; padding: 0; margin: 0; }
fieldset.kind legend { font-weight: 600; margin-bottom: 4px; }
fieldset.kind label { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 8px 0 0;
  border: 1px solid var(--rule); border-radius: 4px; font-weight: normal; font-size: 17px; cursor: pointer; }
fieldset.kind label:has(input:checked) { border-color: var(--ink); background: var(--paper-alt); }
input[type=radio], input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--ink); flex: none; margin: 0; }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: normal; font-size: 16px; margin: 16px 0 0; cursor: pointer; }
label.check input { margin-top: 2px; }

button, .btn { font: 600 16px/1.2 var(--sans); padding: 12px 18px; border-radius: 4px; border: 1px solid var(--ink);
  background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; min-height: 48px; }
button.primary, .btn.primary { background: var(--ink); color: var(--paper); }
button:hover, .btn:hover { filter: brightness(.94); } button.primary:hover, .btn.primary:hover { background: #2a2a28; filter: none; }
button:disabled { opacity: .55; cursor: default; }
.actions { display: flex; gap: 10px; margin-top: 26px; justify-content: flex-end; }
.actions .primary { flex: 1; max-width: 320px; }

/* the terms, as converted from Rob's Word document (explicit clause numbers) */
.terms { border: 1px solid var(--rule); border-radius: 4px; padding: 6px 18px 14px; max-height: 60vh; overflow: auto;
  background: var(--paper); font-size: 16px; overscroll-behavior: contain; }
.terms h2 { font-size: 19px; margin: 22px 0 6px; } .terms h2:first-child { margin-top: 12px; }
.terms p { margin: 8px 0; }
.terms .n { font-weight: 600; display: inline-block; min-width: 2.4em; }
.terms .c3 { margin-left: 1.6em; } .terms .c3 .n, .terms .c4 .n { min-width: 2em; font-weight: 500; }
.terms .c4 { margin-left: 3.2em; }
.terms .block { margin-left: 4.8em; color: var(--ink-soft); }
.terms .bullet { margin-left: 1.2em; } .terms .bullet::before { content: "•"; margin-left: -1em; width: 1em; display: inline-block; }
.terms .signed-online { font-style: italic; color: var(--ink-soft); }
@media (max-width: 480px) { .terms { padding: 4px 12px 12px; } .terms .c3 { margin-left: .8em; } .terms .c4 { margin-left: 1.6em; }
  .terms .block { margin-left: 2em; } }

.qr { display: flex; gap: 14px; align-items: center; background: var(--paper-alt); border-radius: 4px; padding: 12px; margin-top: 18px; }
.qr img { flex: none; background: #fff; border-radius: 2px; }
.qr p { margin: 0; font-size: 15px; }
.sample { background: #fff1f1; color: var(--bad); border: 1px solid #e3b4b4; padding: 10px 12px; border-radius: 4px; margin-top: 16px; font-weight: 600; }
.upload { border: 1px solid var(--rule); border-radius: 4px; padding: 4px 14px 14px; margin-top: 14px; }
.upload h2 { margin-top: 12px; font-size: 18px; } .upload p { margin: 4px 0; font-size: 15px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pick .btn { margin: 0; font-weight: 500; }
.pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload.has .pick .btn { font-size: 14px; min-height: 40px; padding: 8px 12px; }
.preview { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.preview:empty { display: none; }
.preview img { width: 96px; height: 72px; object-fit: cover; border-radius: 3px; border: 1px solid var(--rule); }
.preview .doc { width: 96px; height: 72px; display: grid; place-items: center; border-radius: 3px; background: var(--paper-alt); font-weight: 600; }
.preview .ok { color: var(--ok); font-weight: 600; font-size: 15px; }
.preview button { min-height: 36px; padding: 6px 10px; font-size: 14px; margin-left: auto; }
.pad-wrap { position: relative; margin-top: 8px; }
#pad { display: block; width: 100%; height: 200px; border: 1px dashed #8d8d86; border-radius: 4px; background: #fff;
  touch-action: none; cursor: crosshair; }
.pad-line { position: absolute; left: 16px; right: 16px; bottom: 42px; border-top: 1px solid var(--rule);
  font-size: 12px; color: #9a9a93; padding-top: 2px; pointer-events: none; }
.pad-tools { display: flex; justify-content: flex-end; margin-top: 6px; }
.pad-tools button { min-height: 38px; padding: 6px 14px; font-size: 14px; border-color: var(--rule); }
.msg { position: fixed; left: 12px; right: 12px; bottom: 14px; max-width: 656px; margin: 0 auto; z-index: 9;
  background: var(--bad); color: #fff; padding: 12px 14px; border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.msg.info { background: var(--ink); }
.bad { border-color: var(--bad) !important; }
.foot { max-width: 680px; margin: 0 auto; text-align: center; color: var(--ink-soft); font-size: 13px; padding: 0 16px 28px; line-height: 1.7; }
.foot img { height: 34px; width: auto; opacity: .85; display: block; margin: 0 auto 6px; }
.foot a { color: var(--ink-soft); }
@media (min-width: 700px) { .card { padding: 30px 34px; } h1 { font-size: 36px; } #pad { height: 220px; } .brand img { height: 64px; } }
@media (max-width: 380px) { .qr { flex-direction: column; text-align: center; } .tagline { display: none; } }
.must { background: var(--paper-alt); border-left: 3px solid var(--ink); padding: 10px 12px; margin: 0 0 14px; font-size: 15px; }
.right { text-align: right; margin-top: 8px; }
