:root {
  --navy: #1A2356;
  --deep-dark: #141B3D;
  --gold: #B8962E;
  --light-blue: #CADCFC;
  --bg-light: #F4F5F8;
  --mid: #2C3E7E;
  --muted: #6b7280;
  --rule: #dfe3ee;
  --ok: #1f7a4d;
  --err: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg-light); color: #1c1c1c; }
a { color: var(--mid); }
header { background: var(--deep-dark); padding: 22px 32px; border-bottom: 3px solid var(--gold); }
header .brand { color: var(--gold); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
header h1 { color: #fff; margin: 0; font-size: 24px; font-weight: 600; }
header p { color: var(--light-blue); margin: 6px 0 0; font-size: 14px; }
header .bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
header .who { color: var(--light-blue); font-size: 13px; }
header .who button { margin-left: 10px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px 32px 64px; }
.card { background: #fff; border-radius: 8px; border: 1px solid var(--rule); padding: 22px 24px; margin-bottom: 20px; }
.card h2 { font-size: 17px; color: var(--navy); margin: 0 0 14px; }
.card h2 .step { display: inline-block; width: 24px; height: 24px; border-radius: 12px; background: var(--gold); color: #fff;
                 font-size: 13px; text-align: center; line-height: 24px; margin-right: 8px; }
label { display: block; font-size: 13px; font-weight: bold; color: #333; margin: 12px 0 5px; }
.hint { font-size: 12px; color: var(--muted); font-weight: normal; }
input[type=text], input[type=email], textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c9cfdd; border-radius: 5px; font-size: 15px; font-family: inherit; background: #fff;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
button, .button {
  background: var(--navy); color: #fff; border: 0; border-radius: 5px; padding: 11px 18px; font-size: 15px; cursor: pointer;
  font-family: inherit; display: inline-block; text-decoration: none;
}
button.secondary, .button.secondary { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
button.gold { background: var(--gold); }
button.small, .button.small { padding: 6px 12px; font-size: 13px; }
button:disabled { opacity: 0.55; cursor: default; }
.msg { margin-top: 12px; font-size: 14px; min-height: 18px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }
.hidden { display: none !important; }

/* landing */
.landing { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.landing .pitch h2 { font-size: 26px; color: var(--navy); margin: 8px 0 12px; line-height: 1.25; }
.landing .pitch p, .landing .pitch li { font-size: 15px; line-height: 1.6; color: #333; }
.landing .pitch ul { padding-left: 20px; }
.tabs { display: flex; gap: 0; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
.tabs button { background: none; color: var(--muted); border-radius: 0; padding: 10px 14px; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--gold); font-weight: bold; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.status-grid div { background: var(--bg-light); border-radius: 6px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.status-grid strong { display: block; color: #1c1c1c; font-size: 15px; margin-top: 3px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
footer { text-align: center; font-size: 12px; color: var(--muted); padding: 0 16px 32px; }


@media (max-width: 900px) {
  header { padding: 18px 16px; }
  main { padding: 16px 16px 48px; }
  .landing { grid-template-columns: 1fr; }
}

/* research */
select { width: 100%; padding: 10px 12px; border: 1px solid #c9cfdd; border-radius: 5px; font-size: 15px; font-family: inherit; background: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label.button { display: inline-block; margin: 0; font-weight: normal; }   /* colours come from .button / .secondary */
.open-file { border-top: 1px solid var(--rule); margin-top: 18px; padding-top: 14px; }
.steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.9; }
.steps li.doing { color: var(--navy); font-weight: bold; }
.steps li.done { color: var(--ok); }
.steps li.warn { color: #9a6700; }
.summary-preview { background: var(--bg-light); border-left: 3px solid var(--gold); padding: 10px 14px; margin: 12px 0; font-size: 14px; line-height: 1.55; }
.profile-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.profile-bar .actions { margin-top: 0; }
.kicker { color: var(--gold); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
#profile-title { font-size: 22px; margin: 4px 0; }
.notice { background: #fff8e6; border: 1px solid #f0d58c; border-radius: 6px; padding: 10px 14px; font-size: 14px; margin: 14px 0; }
.notice.err { background: #fdecea; border-color: #f3b7b0; }
.section { margin-top: 22px; }
.section h3 { font-size: 15px; color: var(--navy); border-bottom: 1px solid var(--rule); padding-bottom: 6px; margin: 0 0 10px; }
.section p { line-height: 1.6; margin: 0 0 10px; font-size: 15px; }
.section h4 { font-size: 14px; color: var(--mid); margin: 14px 0 6px; }
.section ul { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; font-size: 15px; }
.facts { list-style: none; padding-left: 0 !important; }
.facts li { padding: 8px 0; border-bottom: 1px solid #eef0f5; }
.cite { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cite a { color: var(--mid); }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #eef0f5; color: #444; margin-left: 6px; vertical-align: 1px; }
.badge.gold { background: #f6edd2; color: #7a5d0e; }
.badge.warn { background: #fff1d6; color: #8a5a00; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.person { border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.person strong { display: block; }
.person button { margin-top: 8px; }
.reg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.reg div { background: var(--bg-light); border-radius: 6px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
details { margin-top: 6px; }
details summary { cursor: pointer; color: var(--mid); font-size: 14px; }
.disregarded li { margin-bottom: 6px; font-size: 13px; }
@media (max-width: 900px) { .grid2, .grid3, .reg { grid-template-columns: 1fr; } }
.cite-n { font-size: 10px; margin-left: 1px; }
.cite-n a { text-decoration: none; }
.refs { margin: 0; padding-left: 22px; font-size: 13px; line-height: 1.7; }
.docs { list-style: none; padding: 0; margin: 4px 0; font-size: 14px; }
.docs li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #eef0f5; }
.li-import { background: var(--bg-light); border-radius: 6px; padding: 10px 14px; margin-top: 8px; font-size: 13px; line-height: 1.6; }
.li-import ul { margin: 2px 0 8px; padding-left: 18px; }
.cite-own { color: var(--muted); cursor: help; border-bottom: 1px dotted var(--muted); }
.li-headline { font-weight: bold; color: var(--navy); margin-bottom: 4px; }
.li-about { margin: 0 0 8px; white-space: pre-line; }
#m-linkedin-tools { margin-top: 6px; }
.linkish { background: none; border: 0; color: var(--mid); font-size: 12px; padding: 0 0 0 8px; text-decoration: underline; cursor: pointer; }
.beta { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 8px; border-radius: 4px;
        background: var(--gold); color: var(--deep-dark); font-size: 11px; font-weight: bold; letter-spacing: 1.5px;
        text-transform: uppercase; position: relative; top: -2px; }
h3.sub { font-size: 14px; color: var(--navy); margin: 18px 0 8px; }

/* Download PDF: the browser's print dialog, "Save as PDF". Nothing leaves the browser. */
.print-only { display: none; }
.print-frame, .print-frame > thead, .print-frame > tbody, .print-frame > tfoot, .print-frame > * > tr,
.print-frame > * > tr > td { display: block; width: auto; border: 0; padding: 0; }     /* on screen: plain blocks */
.pf-space { display: none; }
@media print {
  /* All page margins come from the layout, so they hold whatever the print dialog's Margins setting
     ("None"/"Minimum" ignore @page margins: Rob's PDFs printed edge to edge). Sides: padding on <main>.
     Top and bottom: the print frame's header/footer rows, which repeat on every page. */
  @page { margin: 0; }
  .print-frame { display: table; width: 100%; border-collapse: collapse; }
  .print-frame > thead { display: table-header-group; }
  .print-frame > tfoot { display: table-footer-group; }
  .print-frame > tbody { display: table-row-group; }
  .print-frame > * > tr { display: table-row; }
  .print-frame > * > tr > td { display: table-cell; padding: 0; }
  .pf-space { display: block; height: 14mm; }
  body { background: #fff; color: #111; font-size: 11pt; }
  header, footer, #account, #start, #progress, #material, .profile-bar .actions, #unsaved,
  button, .linkish, label.button { display: none !important; }
  main { max-width: none; padding: 0 20mm; }
  .card { border: 0; padding: 0; margin: 0; }
  .print-only { display: block; }
  #print-head { border-bottom: 2px solid #B8962E; padding-bottom: 6px; margin-bottom: 14px; }
  .print-brand { color: #1A2356; font-weight: bold; letter-spacing: 1px; font-size: 10pt; text-transform: uppercase; }
  .print-meta { color: #555; font-size: 9pt; margin-top: 2px; }
  #profile-title { font-size: 18pt; }
  .section h3 { break-after: avoid; page-break-after: avoid; }
  .facts li, .refs li, .people .person, .reg div, .disregarded li { break-inside: avoid; page-break-inside: avoid; }
  .section p, .section li { orphans: 3; widows: 3; }
  a { color: #1A2356; text-decoration: none; }
  .notice { border: 1px solid #ccc; background: #fafafa; }
  .badge { border: 1px solid #ccc; background: #fff; }
  .people { grid-template-columns: 1fr 1fr; }
}
.about { max-width: 860px; }
.about p, .about li { font-size: 15px; line-height: 1.6; }
.about ul, .about ol { padding-left: 22px; }
footer a { color: var(--muted); }
#material .m-section { margin-top: 28px; }
#material .m-final { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); }
