:root { --navy: #1B3A5C; --teal: #1AABB8; --grey: #64748B; --line: #e2e8f0; --bg: #f4f6f9; --ink: #1f2937; --red: #b91c1c; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; color: var(--ink); background: var(--bg); padding-bottom: 96px; }
body.closed { padding-bottom: 24px; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
a { color: var(--teal); }

.top { background: #fff; border-bottom: 3px solid var(--teal); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding: 14px 16px; flex-wrap: wrap; }
.top .logo { height: 60px; }  /* was 46px; +30% per John 2026-09-15 */
.top .prep { flex: 1; min-width: 220px; }
.top .k { color: var(--grey); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.top .v { font-size: 20px; font-weight: 600; color: var(--navy); }
.top .k2 { color: var(--grey); font-size: 13px; }
.top .muted { color: var(--grey); font-weight: 400; font-size: 16px; }
.top .price { text-align: right; }
.top .price .n { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.top .price .n span { font-size: 14px; color: var(--grey); font-weight: 500; margin-left: 4px; }
.top .price .p { color: var(--grey); font-size: 13px; }

.notice { background: #fff7e6; border: 1px solid #fcd34d; border-radius: 8px; padding: 10px 14px; margin-top: 16px; }
.errors { background: #fef2f2; border: 1px solid #fca5a5; color: var(--red); border-radius: 8px; padding: 10px 14px; margin-top: 16px; }
.errors ul { margin: 6px 0 0 18px; padding: 0; }
.intro { margin: 20px 0 8px; font-size: 15px; }
.fine { color: var(--grey); font-size: 12px; margin: 12px 0 0; }

.doc { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 18px 0; }  /* overflow visible so tooltips can escape; the frame clips itself */
.doc-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.doc-head h2 { margin: 0; font-size: 17px; color: var(--navy); }
.dl { font-size: 13px; font-weight: 600; text-decoration: none; }
.dl:hover { text-decoration: underline; }
.frame-wrap { padding: 0; background: #eef1f5; border-radius: 0 0 10px 10px; overflow: hidden; }
.doc-frame { display: block; width: 100%; border: 0; background: #fff; min-height: 300px; }
.paged .doc-frame { transform-origin: top left; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--navy); color: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.18); z-index: 20; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.bar .sum { font-size: 15px; }
.bar .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 8px; padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; font-family: inherit; }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: #158f9a; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.ghost.danger { border-color: rgba(255,160,160,.7); color: #ffd6d6; }
.btn.danger-solid { background: var(--red); color: #fff; }
.card .btn.ghost { color: var(--navy); border-color: #cbd5e1; }

.modal { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 30; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow: auto; }
.modal.show, .modal[data-show] { display: flex; }
.card { background: #fff; border-radius: 12px; padding: 22px 22px 16px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.card h3 { margin: 0 0 12px; color: var(--navy); font-size: 19px; }
.card label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin: 10px 0 0; }
.card input:not([type=checkbox]), .card textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; font-family: inherit; font-weight: 400; color: var(--ink); }
.card input.sig { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 20px; }
.card .chk { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink); margin-top: 12px; font-size: 14px; line-height: 1.4; }
.card .chk input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.card .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; margin: 24px 0; overflow-wrap: anywhere; min-width: 0; }
.panel code { word-break: break-all; }
main.wrap { min-width: 0; overflow-x: clip; }  /* clip, not hidden: hidden would force vertical clipping too and cut off tooltips */
.panel.ok { border-color: var(--teal); }
.panel h2 { margin: 0 0 8px; color: var(--navy); }
.panel h3 { margin: 18px 0 4px; color: var(--navy); font-size: 15px; }
.panel code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; }

@media (max-width: 640px) {
  .top .price { text-align: left; }
  .top .price .n { font-size: 26px; }
  .bar .wrap { justify-content: center; }
  .bar .sum { width: 100%; text-align: center; }
  .btn { padding: 10px 14px; font-size: 14px; }
}

/* collapsible document sections (client page) */
.doc-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 -6px; }
.doc-controls .fine { margin: 0; }
.doc-controls-btns { white-space: nowrap; }
.doc-controls .sep { color: var(--grey); margin: 0 6px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--teal); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.doc-toggle { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; background: none; border: 0; padding: 0; margin: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.doc-toggle h2 { margin: 0; }
.doc-toggle .chev { width: 9px; height: 9px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; flex: none; margin-left: 2px; }  /* open: points down */
.doc.collapsed .doc-toggle .chev { transform: rotate(-45deg); }  /* closed: points right */
.doc-toggle .state { font-size: 12px; font-weight: 600; color: var(--teal); margin-left: 4px; }
.doc-head:hover { background: #f4f7fa; }
.doc.collapsed .frame-wrap { display: none; }
.doc.collapsed .doc-head { border-bottom: 0; }

/* "what is this?" info icon with a tooltip, one per document heading */
.doc-head { gap: 10px; }
.doc-head .dl { margin-left: auto; }
.info { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--grey); background: #fff; color: var(--grey); font: 700 11px/1 Georgia, "Times New Roman", serif; padding: 0; cursor: help; display: inline-flex; align-items: center; justify-content: center; }
.info:hover, .info:focus-visible, .info.show { border-color: var(--teal); color: var(--teal); outline: none; z-index: 7; }  /* above the sections below */
.info .tip { display: none; position: absolute; top: calc(100% + 10px); left: -12px; z-index: 5; width: max-content; max-width: min(340px, calc(100vw - 48px)); padding: 10px 12px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.16); font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; font-weight: 400; font-size: 13.5px; line-height: 1.45; text-align: left; white-space: normal; cursor: default; }
.info .tip::before { content: ""; position: absolute; top: -6px; left: 16px; width: 10px; height: 10px; background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.info:hover .tip, .info:focus-visible .tip, .info.show .tip { display: block; }
.doc-head { position: relative; }
@media (max-width: 640px) {
  .info { position: static; }
  .info .tip { left: 12px; right: 12px; top: calc(100% - 6px); width: auto; max-width: none; }
  .info .tip::before { display: none; }
}

/* submit in progress */
.btn.busy { opacity: .85; cursor: progress; display: inline-flex; align-items: center; gap: 8px; }
.btn:disabled { cursor: not-allowed; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: rp-spin .8s linear infinite; }
@keyframes rp-spin { to { transform: rotate(360deg); } }
.busy-note { margin: 12px 0 0; padding: 10px 12px; background: #e6f7f8; color: var(--navy); border-radius: 8px; font-size: 14px; line-height: 1.45; }
form.busy input, form.busy textarea, form.busy label { pointer-events: none; }
form.busy input:not([type=checkbox]), form.busy textarea { background: #f1f5f9; color: #64748b; }

.doc .doc-body { margin: 0; padding: 14px 16px; }  /* text inside a document box lines up with its heading */
