/* Insurance Agent Roadmap: the apply site, in the channel's house look "the canary review form"
   (channel/STYLE.md section 0, samples/out/identity/D-mix/NOTES.md).
   Roles: canary sheet, under-sheet behind it, printed labels in form ink (Plex Sans Condensed),
   anything a person types in carbon blue (Plex Mono), stamp red once per page. No other colors. */

@font-face { font-family: "Plex Form"; src: url("fonts/IBMPlexSansCondensed-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Form"; src: url("fonts/IBMPlexSansCondensed-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Form"; src: url("fonts/IBMPlexSansCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Form"; src: url("fonts/IBMPlexSansCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Typed"; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Typed"; src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --canary: #F6E592;   /* the sheet */
  --under: #EAD677;    /* the next sheet showing behind */
  --carbon: #2A3486;   /* typed entries only */
  --ink: #1F2321;      /* printed rules, labels, titles */
  --stamp: #B01E28;    /* once per page */

  --font-form: "Plex Form", "Arial Narrow", sans-serif;
  --font-typed: "Plex Typed", ui-monospace, monospace;

  --rule: 2px;         /* 3px at video scale reads heavy on a phone; 2px here, 3px on the sheet edge */
  --rule-heavy: 4px;
  --gut: 16px;         /* page side gutter at phone width */
  --pad: 16px;         /* inside a box */
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gut: 40px; --pad: 22px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--under); color: var(--ink);
  font-family: var(--font-form); font-size: 18px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--carbon); outline-offset: 3px; }
.vh { position: absolute !important; width: 1px !important; height: 1px; padding: 0 !important; margin: -1px; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--canary); border: var(--rule) solid var(--ink); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }

/* ---- The pad: a glued binding, then a perforation, then the sheet ---- */
.pad { max-width: 820px; margin: 0 auto; padding: 0 0 48px; }
@media (min-width: 800px) { .pad { padding: 32px 0 64px; } }
.sheet { background: var(--canary); position: relative; }
@media (min-width: 800px) { .sheet { border: 1px solid rgba(31,35,33,.18); } }
.binding { height: 12px; background: var(--ink); }
.perf { height: 18px; position: relative; }
.perf::after { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 6px;
  background: radial-gradient(circle at 5px 3px, rgba(31,35,33,.45) 1.8px, transparent 2.3px) repeat-x; background-size: 12px 6px; }
.sheet-body { padding: 18px var(--gut) 32px; }

/* ---- Header: printed title, form name, status cells ---- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; padding-bottom: 10px; border-bottom: var(--rule-heavy) solid var(--ink); }
.head .brand { font-weight: 700; font-size: 24px; line-height: 1.05; letter-spacing: -0.01em; text-decoration: none; }
.head .formname { font-size: 18px; font-weight: 400; }
.cells { display: inline-flex; flex-wrap: wrap; border: var(--rule) solid var(--ink); font-weight: 500; font-size: 15px; line-height: 1.2; }
.cells > * { padding: 5px 10px 6px; }
.cells > * + * { border-left: var(--rule) solid var(--ink); }
.head .cells { margin-left: auto; font-weight: 600; }
@media (max-width: 559px) { .head.compact { padding-bottom: 8px; } .head.compact .formname, .head.compact .cells { display: none; } .sheet-body { padding-top: 14px; } }
@media (min-width: 720px) { .head .brand { font-size: 32px; } .head .formname { font-size: 21px; } }

h1 { font-weight: 700; font-size: 34px; line-height: 1.02; letter-spacing: -0.015em; margin: 20px 0 10px; max-width: 22ch; }
@media (max-width: 559px) { h1 { font-size: 31px; max-width: none; margin-top: 16px; } }
@media (min-width: 720px) { h1 { font-size: 58px; margin-top: 36px; } }
h2 { font-weight: 700; font-size: 22px; line-height: 1.15; margin: 0; }
p { margin: 0 0 12px; max-width: 64ch; }
.lede { font-size: 18px; line-height: 1.35; font-weight: 500; }
@media (min-width: 720px) { .lede { font-size: 20px; } }

/* ---- Ruled boxes ---- */
.box { border: var(--rule) solid var(--ink); margin: 18px 0 0; }
.box > .row { padding: var(--pad); }
.box > .row + .row { border-top: var(--rule) solid var(--ink); }
.lbl { display: block; font-weight: 500; font-size: 17px; line-height: 1.25; }
.lbl .opt { font-weight: 400; }
.hint { font-size: 15.5px; line-height: 1.35; margin: 4px 0 0; max-width: 60ch; }
.typed { font-family: var(--font-typed); color: var(--carbon); font-weight: 500; }

/* disclosure cells: exact wording, ruled, no separators */
.disc { display: grid; grid-template-columns: 1fr; border: var(--rule) solid var(--ink); font-weight: 500; font-size: 16px; line-height: 1.25; margin-top: 18px; }
.disc > * { padding: 8px 12px 9px; }
.disc > * + * { border-top: var(--rule) solid var(--ink); }
/* name and "Independent recruiter" share the first row at every width */
.disc { grid-template-columns: auto 1fr; }
.disc > :nth-child(2) { border-top: 0; border-left: var(--rule) solid var(--ink); }
.disc > :nth-child(n+3) { grid-column: span 2; }
@media (max-width: 559px) { form { margin-top: 12px; } .disc { font-size: 15px; margin-top: 12px; } .disc > * { padding: 6px 10px 7px; } }

/* ---- Steps: what happens after you send the form (a real sequence, so numbered) ---- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; border-top: var(--rule) solid var(--ink); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); font-weight: 600; padding: 12px 0 12px 14px; border-right: var(--rule) solid var(--ink); }
.steps li > span { padding: 12px var(--pad) 12px 14px; }

/* ---- The stamp: the one red mark on a page ---- */
.stamp-wrap { position: relative; }
.stamp { display: inline-block; color: var(--stamp); border: 4px solid var(--stamp); padding: 6px 12px 7px; position: relative;
  font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: 0.01em; mix-blend-mode: multiply; transform: rotate(-4deg);
  text-transform: uppercase; white-space: nowrap; }
.stamp::after { content: ""; position: absolute; inset: 3px; border: 1.5px solid var(--stamp); }
.intro-stamp { margin: 10px 0 16px 4px; }
@media (min-width: 720px) { .intro-stamp { font-size: 30px; margin: 14px 0 20px 6px; } }
/* lede and stamp share a row on wide screens; on a phone the stamp sits under the lede, smaller */
.lede-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; }
.lede-row .lede { flex: 1 1 26ch; margin-bottom: 0; }
.lede-row .intro-stamp { margin: 12px 0 4px 4px; }
@media (max-width: 559px) {
  .lede-row { flex-wrap: nowrap; gap: 12px; }
  .lede-row .lede { font-size: 17.5px; }
  .lede-row .intro-stamp { flex: none; font-size: 18px; line-height: 1.05; padding: 6px 8px 7px; border-width: 3px; white-space: normal; text-align: center; width: 6.4em; margin: 0 2px 0 0; transform: rotate(-5deg); }
}

/* ---- Form parts ---- */
form { margin-top: 16px; }
form + .box { margin-top: 28px; }
fieldset.part { border: var(--rule) solid var(--ink); margin: 0 0 20px; padding: 0; min-width: 0; }
fieldset.part > legend { float: left; width: 100%; padding: 10px var(--pad); border-bottom: var(--rule-heavy) solid var(--ink); font-weight: 700; font-size: 20px; line-height: 1.2; }
fieldset.part > legend + * { clear: both; }
.f { padding: 12px var(--pad) 14px; border-top: var(--rule) solid var(--ink); position: relative; }
.f:first-of-type { border-top: 0; }
.pair { display: grid; grid-template-columns: 1fr; border-top: var(--rule) solid var(--ink); }
.pair > .f + .f { border-top: var(--rule) solid var(--ink); }
@media (min-width: 600px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .pair > .f { border-top: 0; }
  .pair > .f + .f { border-top: 0; border-left: var(--rule) solid var(--ink); }
}
.part > .pair:first-of-type { border-top: 0; }

/* text entries: the box is the cell; what you type is carbon mono */
.f input[type=text], .f input[type=email], .f input[type=tel], .f select, .f textarea {
  display: block; width: 100%; margin-top: 6px; padding: 6px 0 4px; border: 0; border-bottom: var(--rule) dotted rgba(31,35,33,.55);
  background: transparent; border-radius: 0; color: var(--carbon); font-family: var(--font-typed); font-weight: 500;
  font-size: 18px; line-height: 1.35; -webkit-appearance: none; appearance: none; }
.f textarea { min-height: 96px; resize: vertical; border: var(--rule) dotted rgba(31,35,33,.55); padding: 8px 10px; }
.f select { padding-right: 28px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 10px top 55%, right 4px top 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.f select:has(option[value=""]:checked) { color: rgba(31,35,33,.6); font-family: var(--font-form); font-weight: 400; }
.f select option { color: var(--ink); background: #fff; }
.f input::placeholder, .f textarea::placeholder { color: rgba(31,35,33,.55); font-family: var(--font-form); font-weight: 400; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-bottom: var(--rule-heavy) solid var(--carbon); }
.f textarea:focus { border: var(--rule) solid var(--carbon); box-shadow: inset 0 0 0 1px var(--carbon); }
.f:focus-within { box-shadow: inset 4px 0 0 var(--carbon); }
.f input:-webkit-autofill, .f input:-webkit-autofill:hover, .f input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--carbon); -webkit-box-shadow: 0 0 0 40px var(--canary) inset; caret-color: var(--carbon); }

/* tick boxes: a real checkbox/radio sits on the box; the X is typed in carbon */
.ticks { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 8px; border: 0; padding: 0; }
.ticks.col { flex-direction: column; gap: 4px; }
.tick { position: relative; display: inline-flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 9px 0; cursor: pointer; font-size: 18px; line-height: 1.3; }
.tick input { position: absolute; left: -8px; top: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.tick .tb { flex: none; width: 24px; height: 24px; border: var(--rule) solid var(--ink); position: relative; margin-top: 0; background: var(--canary); }
.tick .tb::after { content: "X"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-typed);
  color: var(--carbon); font-weight: 500; font-size: 20px; line-height: 1; visibility: hidden; transform: translate(1px, -1px); }
.tick input:checked + .tb::after { visibility: visible; }
.tick input:checked + .tb + .t { font-weight: 600; }
.tick input:focus-visible + .tb { outline: 3px solid var(--carbon); outline-offset: 3px; }
.tick input:checked + .tb { border-width: 3px; }
.tick.big .t { font-size: 16.5px; line-height: 1.4; font-weight: 400 !important; max-width: 62ch; }
@media (max-width: 559px) { .tick.big .t { font-size: 15.5px; line-height: 1.35; } }

/* notes inside a part (license "no", non-solicit) */
.note { border: var(--rule) solid var(--ink); border-left-width: 8px; padding: 10px 14px; margin: 10px 0 2px; font-size: 16.5px; line-height: 1.4; max-width: 62ch; }
.note p { margin: 0; }
.note p + p { margin-top: 6px; }

/* errors: no second red. A heavy ink rule, the word "Check", and a plain sentence that says how to fix it */
.err { display: block; margin-top: 8px; font-weight: 600; font-size: 16px; line-height: 1.3; padding-left: 10px; border-left: var(--rule-heavy) solid var(--ink); }
.f.is-bad { box-shadow: inset 8px 0 0 var(--ink); }
.sub.is-bad input { border-bottom: var(--rule-heavy) solid var(--ink); }
.sub.is-bad input:focus { border-bottom-color: var(--carbon); }
.f.is-bad input, .f.is-bad select { border-bottom: var(--rule-heavy) solid var(--ink); }
.f.is-bad input:focus, .f.is-bad select:focus { border-bottom-color: var(--carbon); }
.f.is-bad:focus-within { box-shadow: inset 8px 0 0 var(--carbon); }

/* the required part has no visible legend: three fields and a box */
fieldset.part.main > legend + * { border-top: 0; }
fieldset.part.main { margin-bottom: 14px; }
/* label and entry line on one row, like a printed form: "Email ________" */
.line { display: grid; grid-template-columns: 6.2em 1fr; align-items: end; column-gap: 8px; }
.line > .lbl { padding-bottom: 6px; }
.f.line > input, .f .line > input { margin-top: 0; min-height: 44px; }
.line > .err { grid-column: 1 / -1; }
/* contact pair: email and mobile sit under one label, either one will do */
.contact .sub { margin-top: 4px; }
.lbl-sm { font-size: 15.5px; font-weight: 400; }
.contact > .lbl .opt { font-size: 15.5px; }
.contact > .err { margin-top: 12px; }
@media (max-width: 559px) { .main .f { padding-top: 10px; padding-bottom: 12px; } }

/* the optional part: same ruled box, lighter weight, so it reads as second */
fieldset.part.extra { border-style: dashed; margin-top: 22px; }
fieldset.part.extra > legend { font-size: 18px; font-weight: 600; border-bottom: var(--rule) solid var(--ink); }
fieldset.part.extra > legend .opt { font-weight: 400; }
.extra-hint { clear: both; padding: 10px var(--pad) 0; margin: 0; }
.extra .f:first-of-type, .extra .extra-hint + .f { border-top: 0; }
.extra .lbl { font-size: 16.5px; }
.send-2 { padding-top: 16px; padding-bottom: 18px; }
.f input[type=text], .f input[type=email], .f input[type=tel], .f select { min-height: 44px; }

/* consent rows */
.consent .f { padding-top: 10px; }
.consent .req { font-weight: 600; }

/* ---- Send row ---- */
.send { display: grid; gap: 14px; margin-top: 4px; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 54px; padding: 12px 28px; width: 100%;
  background: var(--ink); color: var(--canary); border: var(--rule) solid var(--ink); border-radius: 0; cursor: pointer;
  font-family: var(--font-form); font-weight: 700; font-size: 21px; line-height: 1; letter-spacing: 0.005em; text-decoration: none; }
.btn:hover { background: var(--carbon); border-color: var(--carbon); }
.btn:focus-visible { outline: 3px solid var(--carbon); outline-offset: 4px; }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (min-width: 600px) { .btn { width: auto; justify-self: start; } }
.btn-2 { background: transparent; color: var(--ink); min-height: 50px; font-size: 19px; }
.btn-2:hover { background: var(--ink); color: var(--canary); border-color: var(--ink); }
form > .send { margin: -4px 0 0; }
.notice { border: var(--rule) dashed var(--ink); padding: 10px 14px; font-size: 16px; font-weight: 500; }
.notice .typed { font-weight: 500; }
.status { font-weight: 600; min-height: 1px; }

/* ---- Foot ---- */
.foot { margin-top: 32px; padding-top: 14px; border-top: var(--rule-heavy) solid var(--ink); font-size: 15.5px; }
.foot p { margin-bottom: 6px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 10px 0 0; padding: 0; list-style: none; }

/* ---- Long-form text (privacy) ---- */
.doc h2 { margin: 30px 0 8px; padding-top: 12px; border-top: var(--rule) solid var(--ink); }
.doc ul { margin: 0 0 12px; padding-left: 22px; max-width: 64ch; }
.doc li { margin-bottom: 6px; }
.ph { font-family: var(--font-typed); color: var(--carbon); font-weight: 500; font-size: .92em; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { body { background: #fff; } .btn, .skip { display: none; } }
.row > p:last-child, .note > p:last-child { margin-bottom: 0; }
