/* Montserrat (SIL Open Font License) is the brand's fallback where Proxima Nova is not installed. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/montserrat-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/montserrat-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #1c2b32;
  --muted: #5c6b72;
  --line: #d9e0e2;
  --bg: #f4f6f6;
  --card: #ffffff;
  --red: #b3261e;
  --red-tint: #fbe9e7;
  --radius: 8px;
  /* Onguard brand (BRAND/!Brand Guidelines.pdf), as used by the design tools */
  --brand-teal: #00b7d5;
  --brand-teal-dark: #0090a8;
  --brand-teal-tint: #e2f6fb;
  --brand-orange: #faa626;
  --brand-grey: #54666f;
  --font: "Proxima Nova", "proxima-nova", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 22px; padding-bottom: 90px; }

/* ---------- header ---------- */
.site-header {
  background: var(--brand-grey);
  color: #fff;
  border-bottom: 3px solid var(--brand-orange);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner { display: flex; align-items: center; gap: 14px 22px; padding: 16px 20px; flex-wrap: wrap; }
.brand img { display: block; height: 55px; width: auto; }
.header-titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  border-left: 1px solid rgba(255,255,255,.35);
  padding-left: 22px;
  min-width: 0;
  max-width: 100%;
}
/* Banner type is outlined-path SVG (Proxima Nova), as on the design tools, so
   the brand font shows for every visitor. Regenerate with tools/render-banner.py. */
.header-titles img { display: block; width: auto; flex: none; }
.tool-name { height: 15px; max-width: 100%; object-fit: contain; object-position: left center; }
.tagline { height: 11px; }
.internal-flag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.75);
  border-radius: 999px;
  padding: 8px 14px;
}

/* ---------- cards and forms ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card.option { border-top: 3px solid var(--brand-teal); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 18px; color: var(--brand-grey); }
.actions { display: flex; gap: 12px; align-items: center; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tank-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-teal); outline-offset: 0; border-color: var(--brand-teal); }
.title-input { font-size: 18px; font-weight: 700; color: var(--brand-grey); border-color: transparent; padding-left: 0; width: 260px; }
.title-input:hover { border-color: var(--line); padding-left: 9px; }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: var(--brand-teal-dark);
  border: 1px solid var(--brand-teal-dark);
  border-radius: 6px;
  padding: 9px 16px;
  cursor: pointer;
}
.btn:hover { background: var(--brand-teal); border-color: var(--brand-teal); }
.btn.ghost { background: #fff; color: var(--brand-teal-dark); }
.link { font: inherit; font-size: 13px; font-weight: 600; background: none; border: 0; padding: 0; color: var(--brand-teal-dark); cursor: pointer; }
.link.danger { color: var(--red); }

.tank { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 14px; background: #fbfcfc; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand-teal-dark); margin-bottom: 10px; }

.tank-result { margin-top: 12px; }
.quote {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--brand-teal-tint);
  border-left: 4px solid var(--brand-teal);
  border-radius: 6px;
  padding: 10px 14px;
}
.quote span { font-size: 13px; font-weight: 600; color: var(--brand-grey); }
.quote strong { font-size: 24px; }
.quote em { font-style: normal; color: var(--muted); font-size: 13px; }
table.internal { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.internal th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 8px 4px 0; width: 24%; }
table.internal td { padding: 4px 8px 4px 0; width: 26%; font-variant-numeric: tabular-nums; }

.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.totals span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.totals strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.notice.bad { background: var(--red-tint); color: var(--red); border-radius: 6px; padding: 10px 14px; margin-top: 14px; font-weight: 600; }

.savebar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  z-index: 15;
}
#status { color: var(--muted); font-size: 13px; margin-right: auto; }

@media (max-width: 820px) {
  .grid, .tank-grid, .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two { grid-template-columns: 1fr; }
}

/* ---------- proposal document ---------- */
.doc-body { background: #e9edee; }
.doc-toolbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--brand-grey); color: #fff; padding: 10px 20px; font-size: 14px;
}
.page {
  background: #fff;
  width: 210mm;
  min-height: 297mm;
  max-width: calc(100% - 24px);
  margin: 18px auto;
  padding: 18mm 18mm 20mm;
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
  font-size: 10.5pt;
}
.page h2 {
  font-size: 20pt;
  color: var(--brand-grey);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.page h3 { font-size: 10pt; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-teal-dark); margin: 16px 0 4px; }
.page ul { margin: 0; padding-left: 18px; }
.page li { margin-bottom: 2px; }
.lede { color: var(--muted); margin-top: -6px; }
.fine { color: var(--muted); font-size: 9pt; }
.doc-running { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11mm; font-size: 8.5pt; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.doc-running img { height: 13.5mm; width: auto; }

.cover { background: var(--brand-grey); color: #fff; display: flex; flex-direction: column; border-bottom: 6px solid var(--brand-orange); padding: 0 !important; }
/* The photograph untouched across the top, the white logo on it, and the
   title on a solid panel below. */
.cover-photo { flex: 1 1 auto; min-height: 150mm; background: url(images/front-cover.jpg) center 35% / cover no-repeat; padding: 16mm 18mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cover .cover-body, .cover .cover-tag { margin-left: 18mm; margin-right: 18mm; }
.cover .cover-body { margin-top: 14mm; }
.cover .cover-tag { margin-bottom: 14mm; }
.cover-logo { height: 24mm; width: auto; align-self: flex-start; }
.cover-body { margin-top: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 11pt; color: var(--brand-orange); font-weight: 700; margin: 0 0 6px; }
.cover h1 { font-size: 30pt; line-height: 1.12; margin: 0 0 12px; }
.cover-client { font-size: 14pt; margin: 0; }
.cover-date { color: rgba(255,255,255,.75); margin: 4px 0 0; }
.cover-tag { margin: 14mm 0 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.35); letter-spacing: .12em; text-transform: uppercase; font-size: 9pt; }

table.invest { width: 100%; border-collapse: collapse; }
table.invest th { background: var(--brand-grey); color: #fff; text-align: left; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; }
table.invest td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.invest .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.invest tr.total td { font-weight: 700; font-size: 11.5pt; background: var(--brand-teal-tint); border-top: 2px solid var(--brand-teal); border-bottom: 2px solid var(--brand-teal); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10mm; }

table.spec { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
table.spec th { text-align: left; width: 38%; font-weight: 600; color: var(--brand-grey); padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec td { padding: 7px 0; border-bottom: 1px solid var(--line); }

.choices { display: grid; gap: 8px; margin: 8px 0 4px; }
.choices label { flex-direction: row; align-items: center; gap: 10px; font-size: 10.5pt; font-weight: 400; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; }
.choices .box { width: 14px; height: 14px; border: 1.5px solid var(--brand-grey); border-radius: 3px; flex: none; }
.choices em { margin-left: auto; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.sign { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-top: 22mm; font-size: 9.5pt; }
.sign-line { display: block; border-bottom: 1px solid var(--ink); height: 14mm; margin-bottom: 6px; }
.tandc { column-count: 2; column-gap: 7mm; }
.tandc p { font-size: 7.5pt; line-height: 1.32; margin: 0 0 4px; }

/* Every printed page gets top and bottom margins, including the pages a long
   section runs on to. Only the cover prints edge to edge. */
@page { size: A4; margin: 16mm 0 18mm; }
@page cover { size: A4; margin: 0; }
@media print {
  .no-print { display: none !important; }
  .doc-body { background: #fff; }
  .page { margin: 0; box-shadow: none; max-width: none; width: auto; min-height: 0; padding: 0 18mm; page-break-after: always; break-after: page; }
  .page.cover { page: cover; min-height: 297mm; padding: 0 !important; }
  .page:last-child { page-break-after: auto; break-after: auto; }
  .cover, table.invest th, table.invest tr.total td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

[hidden] { display: none !important; }

.ticks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
label.tick { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--ink); }
label.tick input { width: auto; }

/* content sections on the proposal */
.page h4 { font-size: 11pt; color: var(--brand-grey); margin: 14px 0 2px; }
.page blockquote { margin: 0 0 14px; padding: 8px 14px; border-left: 4px solid var(--brand-orange); color: var(--brand-grey); font-weight: 600; font-style: italic; }
.person { border-bottom: 1px solid var(--line); padding: 14px 0 16px; display: flex; align-items: flex-start; gap: 7mm; }
.person img { flex: none; width: 30mm; height: 30mm; object-fit: cover; border-radius: 50%; border: 2px solid var(--brand-teal); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.person strong { font-size: 12pt; color: var(--brand-grey); }
.person span { color: var(--brand-teal-dark); font-weight: 600; }
.person small { display: block; color: var(--muted); }
.person p { margin: 6px 0 0; }
.tandc p.head { font-weight: 700; color: var(--brand-grey); margin-top: 7px; break-after: avoid; }

.section-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.section-row:last-child { border-bottom: 0; }
.section-row details.more { margin: 6px 0 0 24px; }
.spec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.unit { font-weight: 400; }

.banner { display: block; width: 100%; height: auto; border-radius: 4px; margin: 0 0 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tank-title { font-size: 16pt; font-weight: 700; color: var(--ink); margin: 0 0 2px; }
.tank-title + .lede { margin-top: 0; }

/* design summary entries on the builder */
.spec-list { display: grid; gap: 6px; }
.spec-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: center; }
.spec-row.sub .spec-label { padding-left: 16px; font-weight: 400; }
.spec-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.spec-on { width: 16px; height: 16px; padding: 0; }
.spec-wall { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spec-wall select { width: 120px; }
.spec-wall input { width: 84px; }

/* selecting, signing and the signing record */
.toolbar-actions { display: flex; gap: 10px; }
.choices label.live { cursor: pointer; }
.choices label.live input { width: 16px; height: 16px; flex: none; }
.choices label.live:has(input:checked), .choices label.on { border-color: var(--brand-teal); background: var(--brand-teal-tint); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.choices label.off { color: var(--muted); }
.choices label.off em { font-weight: 400; }
.choices .box { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; line-height: 1; }
.accept { border: 2px solid var(--brand-teal); border-radius: var(--radius); padding: 4px 16px 16px; margin: 16px 0 0; }
.accept-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 12px; margin: 6px 0 12px; }
.tickline { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 10pt; font-weight: 400; color: var(--ink); }
.tickline input { width: auto; margin-top: 3px; }
.accept-msg { color: var(--red); font-weight: 600; min-height: 1.2em; margin: 8px 0; }
.signed { border-bottom: 1px solid var(--ink); min-height: 14mm; margin-bottom: 6px; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 3px; }
.sig { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 20pt; line-height: 1.1; color: #123; }
.signed small { color: var(--muted); font-size: 7.5pt; }
.ps1 p { font-size: 9.5pt; margin: 0 0 9px; }
table.cert td { font-size: 8.5pt; padding: 7px 10px; }
@media (max-width: 700px) { .accept-grid { grid-template-columns: 1fr; } .page { padding: 10mm 6mm; } .cols, .sign { grid-template-columns: 1fr; } }

/* issue and sign, on the builder */
a.internal-flag { color: #fff; text-decoration: none; }
a.internal-flag:hover { background: rgba(255,255,255,.15); }
.internal-flag.solid { margin-left: 0; background: rgba(255,255,255,.18); }
.pill { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 3px 12px; background: var(--line); color: var(--brand-grey); }
.pill.issued { background: #fbf1de; color: #8a5a06; }
.pill.accepted, .pill.complete { background: #e6f4ea; color: #1f7a3d; }
ol.steps { margin: 0 0 12px; padding-left: 22px; }
ol.steps li { margin-bottom: 6px; color: var(--muted); }
ol.steps li.done { color: var(--ink); }
ol.steps li.done::marker { color: #1f7a3d; font-weight: 700; }
ol.steps select { width: auto; display: inline-block; }
.btn.small { padding: 5px 12px; font-size: 13px; }
a.btn { text-decoration: none; display: inline-block; }
.linkrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.linkrow input { flex: 1; min-width: 260px; font-size: 13px; color: var(--muted); }
.locked #header-fields, .locked #options, .locked #add-option, .locked #sections, .locked .grid.two { pointer-events: none; opacity: .6; }
.locked #save { display: none; }

/* price list admin */
.wrap.wide { max-width: 1280px; }
.tabs { display: flex; gap: 6px; }
.tab { font: inherit; font-size: 14px; font-weight: 700; padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--brand-grey); cursor: pointer; }
.tab.on { background: var(--brand-grey); border-color: var(--brand-grey); color: #fff; }
.table-scroll { overflow-x: auto; }
table.edit { border-collapse: collapse; width: 100%; }
table.edit th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 6px; white-space: nowrap; }
table.edit td { padding: 2px 3px; }
table.edit input { min-width: 76px; padding: 5px 7px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.edit input.text { min-width: 190px; }
#status.bad { color: var(--red); font-weight: 600; }

.draft-note { background: #fbf1de; color: #8a5a06; border-left: 4px solid var(--brand-orange); padding: 8px 12px; font-weight: 600; font-size: 9.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* logins */
/* The account links take whatever room is left after the logo and titles,
   which never shrink, so the two can't overlap. On a narrow window the links
   and buttons drop to a second row instead. */
.header-inner > .brand, .header-inner > .header-titles { flex: none; }
.whoami { margin-left: auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; font-size: 12.5px; line-height: 1.3; color: rgba(255,255,255,.85); }
.whoami .who { font-weight: 700; color: #fff; }
.whoami .links { white-space: nowrap; }
.whoami a { color: #fff; }
.whoami + .internal-flag { margin-left: 0; }
form.login { max-width: 420px; margin: 40px auto; display: grid; gap: 12px; }
form.login h2 { margin: 0; color: var(--brand-grey); }
form.login #fields { display: grid; gap: 12px; }
h3.sub { font-size: 14px; color: var(--brand-grey); margin: 18px 0 8px; }
table.people td { padding: 7px 6px; font-size: 14px; border-top: 1px solid var(--line); }

/* HubSpot deal and recipients */
#hubspot { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.deal-linked { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 14px; }
.deal-linked a { color: var(--brand-teal-dark); font-weight: 600; font-size: 13px; }
.deal-results { margin-top: 6px; }
.deal-list { display: grid; gap: 4px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
button.deal.closed strong { font-weight: 400; color: var(--muted); }
button.deal { font: inherit; text-align: left; display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
button.deal:hover { border-color: var(--brand-teal); background: var(--brand-teal-tint); }
button.deal span { color: var(--muted); font-size: 13px; pointer-events: none; }
button.deal strong { pointer-events: none; }
#recipients { margin-top: 6px; }
.recipient { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 4px 0; }
.recipient.add { margin-top: 6px; }
.recipient.add input { width: 230px; }
.locked #hubspot, .locked #recipients { pointer-events: none; opacity: .6; }

.files { font-size: 14px; margin: 10px 0 0; }
.files a { color: var(--brand-teal-dark); font-weight: 600; }

#sharepoint { margin-top: 6px; }
#ps1-wording { margin-top: 10px; }
.tiers { display: grid; gap: 4px; }
.tier-row { display: grid; grid-template-columns: 82px 1fr 1fr; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.tier-row input { width: 100%; }
.locked #ps1-wording, .locked #clause-card { pointer-events: none; opacity: .6; }
.locked #sharepoint { pointer-events: none; opacity: .6; }

pre.check { white-space: pre-wrap; font-size: 13px; background: #fbfcfc; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; min-height: 1.5em; }
table.activity td { width: auto; padding: 4px 12px 4px 0; vertical-align: top; }
table.activity td:first-child { white-space: nowrap; color: var(--muted); }
table.activity td.warn { color: var(--red); font-weight: 600; }
.tier-row.head span { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* one-time code for the signer */
.code-step { margin: 4px 0 10px; }
.code-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.code-row label { width: 140px; }
.code-row input { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.code-msg { font-size: 9.5pt; color: var(--brand-teal-dark); min-height: 1.2em; margin: 6px 0 0; }
.code-msg.bad { color: var(--red); font-weight: 600; }

/* the list of saved proposals */
.plist { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; background: #fbfcfc; }
.plist-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.plist-bar #plist-search { width: 240px; }
.plist-bar select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; color: var(--brand-grey); }
.chip span { color: var(--muted); }
.chip.on { background: var(--brand-grey); border-color: var(--brand-grey); color: #fff; }
.chip.on span { color: rgba(255,255,255,.8); }
#plist-rows { max-height: 420px; overflow-y: auto; }
.plist-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.plist-table td { padding: 7px 10px 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.plist-table tr { cursor: pointer; }
.plist-table tr:hover td { background: var(--brand-teal-tint); }
.plist-table tr.current td { background: #eef4f5; }
.tidy { margin-top: 12px; font-size: 13px; }

/* drawn signatures */
canvas.sigpad { display: block; width: 100%; max-width: 520px; height: 150px; border: 1px dashed var(--brand-grey); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; }
.sig-card canvas.sigpad { margin: 12px 0; }
.sig-step { margin: 8px 0 12px; }
.tickline.inline { display: inline-flex; margin-left: 14px; }
.sig-img { display: block; max-height: 16mm; max-width: 70mm; width: auto; margin-bottom: 2px; }

/* ---------- API 650 compliance instruction ---------- */
.page .eyebrow { margin-bottom: 2px; }
.cover-photo.api650 { background-image: url(images/api650-cover.jpg); background-position: right center; }
.clause-points { padding-left: 20px; margin: 4px 0 10px; }
.clause-points li { margin-bottom: 8px; }
.clause-points li strong { display: block; color: var(--brand-grey); }
.clause-points li p { margin: 2px 0 6px; }
.page sub { font-size: 70%; }
.fig { margin: 12px 0 16px; break-inside: avoid; }
.fig svg { display: block; width: 100%; max-width: 160mm; height: auto; margin: 0 auto; }
.fig figcaption { color: var(--muted); font-size: 8.5pt; font-style: italic; text-align: center; margin-top: 6px; }
table.e7 { width: 100%; border-collapse: collapse; font-size: 10pt; }
table.e7 th { background: var(--brand-grey); color: #fff; padding: 7px 10px; text-align: center; font-size: 9pt; letter-spacing: .04em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
table.e7 th:first-child, table.e7 td:first-child { text-align: left; }
table.e7 td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: center; }
.e7-notes { font-size: 8.5pt; color: var(--muted); margin: 8px 0 0; padding-left: 20px; }
.decide { margin-top: 16px; padding-top: 4px; border-top: 2px solid var(--brand-teal); break-inside: avoid; }
.decide h3 { margin-top: 10px; }
.choices .box.round { border-radius: 50%; }
.decide-warn { background: var(--red-tint); color: var(--red); font-weight: 600; font-size: 10pt; border-radius: 6px; padding: 8px 12px; margin: 4px 0 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.decide-alt { margin-top: 6px; font-size: 10pt; font-weight: 400; color: var(--ink); }
.decide-alt-given { border-left: 4px solid var(--brand-orange); padding: 4px 12px; margin-top: 6px; font-size: 10pt; }
.decide-alt-given p { margin: 2px 0; }
.choices-summary { margin: 12px 0; }
.choices-summary a { color: inherit; text-decoration: none; }
.instruction { font-weight: 700; color: var(--brand-grey); margin: 14px 0; }

/* expiry */
.expiry-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; margin: 10px 0; font-size: 14px; }
.expiry-row label { flex-direction: column; }
.expiry-row label.tick { flex-direction: row; align-self: center; }
.expiry-row input[type=date] { width: 170px; }
.expiry-row.expired > span { color: var(--red); }
.pill.expired { background: var(--red-tint); color: var(--red); }

/* The header buttons sit together at the right, after "signed in as". */
.internal-flag + .internal-flag, .whoami + .internal-flag { margin-left: 0; }
.header-inner > .internal-flag { flex: none; }

/* Header, right-hand side: the buttons in one row with the account links
   beneath them, kept together as one block. On a narrow window the whole
   block moves below the logo instead of splitting up. */
.header-right { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.header-buttons { display: flex; gap: 8px; }
.header-buttons .internal-flag { margin-left: 0; }
.header-right .whoami { margin-left: 0; display: block; white-space: nowrap; text-align: right; font-size: 12.5px; }
@media (max-width: 1000px) { .header-right { margin-left: 0; align-items: flex-start; } }
