:root {
  --navy: #0b1f3a;
  --navy-2: #142d52;
  --navy-ink: #c6d0e2;
  --navy-dim: #7f8fab;
  --red: #f13738;
  --red-ink: #c4262a;
  --red-soft: #fdeeee;
  --paper: #ffffff;
  --soft: #f3f5f9;
  --line: #d7dce5;
  --line-2: #eef1f5;
  --ink: #13203a;
  --ink-2: #4a556b;
  --muted: #7d8699;
  --green: #1b7a44;
  --green-soft: #e6f4ea;
  --amber: #8f5300;
  --amber-soft: #fff2db;
  --side: 300px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.4; -webkit-text-size-adjust: 100%; color-scheme: light; }
body { display: flex; min-height: 100vh; font-feature-settings: "tnum" 1; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }

/* side panel */
.side { position: sticky; top: 0; align-self: flex-start; height: 100vh; width: var(--side); flex: none; background: var(--navy); color: var(--navy-ink); display: flex; flex-direction: column; padding: 28px 28px 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .01em; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--red); position: relative; }
.mark::after { content: ""; position: absolute; inset: 7px 7px 7px 11px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: skewX(-12deg); }
.side-title { margin-top: 34px; font-size: 15px; color: var(--navy-dim); line-height: 1.3; }
.side-title b { display: block; color: #fff; font-family: var(--display); font-size: 24px; font-weight: 600; margin-top: 2px; }
.ring { position: relative; width: 118px; height: 118px; margin: 28px 0 24px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--navy-2); }
.ring .fill { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .5s ease; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 30px; font-weight: 700; }
.index { display: flex; flex-direction: column; gap: 2px; overflow: auto; margin: 0 -10px; }
.ix { display: grid; grid-template-columns: 26px 1fr 10px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--navy-dim); text-decoration: none; font-size: 15px; font-weight: 500; }
.ix i { font-style: normal; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.ix s { text-decoration: none; width: 8px; height: 8px; border-radius: 50%; background: var(--navy-2); }
.ix.ok s { background: #3dbb6c; }
.ix.bad s { background: var(--red); }
.ix.on { background: var(--navy-2); color: #fff; }
.ix:hover { color: #fff; }
.side-foot { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--navy-dim); }
.side-foot span:first-child { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sheet */
.sheet { flex: 1; min-width: 0; padding: 48px 72px 120px; }
.intro { max-width: 680px; margin-bottom: 44px; }
.intro h1 { font-family: var(--display); font-size: 46px; font-weight: 700; line-height: 1; margin: 0 0 18px; letter-spacing: -.01em; }
.intro .ready { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: 15px; }
.intro .ready span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin: 0 8px 2px 0; }
.section { max-width: 680px; padding: 36px 0 44px; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.section.single { border-top: 0; padding-top: 0; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.sec-num { font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--red); line-height: 1; }
.sec-head h1 { margin: 0; }
.sec-state { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.sec-state.ok { color: var(--green); }
.sec-state.bad { color: var(--red-ink); }
h1 { font-family: var(--display); font-size: 30px; line-height: 1.1; font-weight: 700; margin: 0 0 6px; }
h2 { font-family: var(--display); font-size: 20px; font-weight: 600; margin: 30px 0 12px; }
h3 { font-family: var(--display); font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.lead { color: var(--ink-2); margin: 0 0 18px; max-width: 64ch; font-size: 15.5px; }
.submit-row { max-width: 680px; padding: 36px 0 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.btn.big { min-height: 58px; padding: 0 34px; font-size: 18px; }
.submit-note { font-size: 14.5px; color: var(--muted); max-width: 32ch; }

/* fields: underline style */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 36px; }
.grid .full { grid-column: 1 / -1; }
.f { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f label { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.f label .req { color: var(--red); margin-left: 2px; }
.f input[type=text], .f input[type=tel], .f input[type=email], .f input[type=number], .f input[type=date], .f select, .f textarea {
  width: 100%; min-height: 44px; padding: 8px 0; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); outline: none; font-size: 18px; font-weight: 500;
}
.f input::placeholder, .f textarea::placeholder { color: #b4bac6; font-weight: 400; }
.f select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237d8699' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; padding-right: 24px; }
.f textarea { min-height: 72px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-bottom-color: var(--navy); box-shadow: 0 1.5px 0 var(--navy); }
.f.err input, .f.err select, .f.err textarea { border-bottom-color: var(--red); }
.f .msg { font-size: 13.5px; color: var(--red-ink); margin-top: 4px; }
.f .hint { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.my { display: grid; grid-template-columns: 1fr 90px; gap: 14px; }
.seg { display: inline-flex; gap: 8px; }
.seg button { min-width: 84px; min-height: 42px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-weight: 500; color: var(--ink-2); }
.seg button:hover { border-color: var(--navy); color: var(--navy); }
.seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.seg button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.chk input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--navy); }
.chk span { font-size: 15.5px; }
.chk.err { border-bottom-color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: inline-flex; align-items: center; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 500; background: var(--paper); }
.chips label.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips input { display: none; }
.q { margin: 22px 0 0; }
.q .label { font-weight: 500; font-size: 16.5px; margin-bottom: 10px; color: var(--ink); max-width: 64ch; }
.q .label .req { color: var(--red); }
.q.err .seg button { border-color: var(--red); }
.q .msg { color: var(--red-ink); font-size: 13.5px; margin-top: 6px; }
.q ul.law { margin: 6px 0 10px; padding-left: 18px; color: var(--ink-2); font-size: 15px; max-width: 64ch; }
.sub { margin: 14px 0 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--red); }

.alert { padding: 14px 18px; border-radius: 10px; margin: 0 0 20px; font-size: 15px; }
.alert.bad { background: var(--red-soft); color: var(--red-ink); }
.alert.good { background: var(--green-soft); color: var(--green); }
.alert.warn { background: var(--amber-soft); color: var(--amber); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert a { color: inherit; font-weight: 600; }

/* lists */
.cards { display: flex; flex-direction: column; }
.card { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.card:hover b { color: var(--red-ink); }
.card.err { border-bottom-color: var(--red); }
.card b { font-size: 17px; font-weight: 600; }
.card .meta { color: var(--muted); font-size: 14.5px; grid-column: 1; }
.card .tag { font-size: 13px; color: var(--navy); background: var(--soft); border-radius: 999px; padding: 3px 10px; align-self: start; font-weight: 600; }
.card .x { grid-column: 2; grid-row: 2; justify-self: end; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 0; font-size: 13.5px; }
.card .x:hover { color: var(--red-ink); }
.editor { margin-top: 18px; padding: 24px 26px 22px; border-radius: 14px; background: var(--soft); }
.editor-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.add { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--paper); cursor: pointer; font-weight: 600; color: var(--navy); margin-top: 14px; }
.add:hover { background: var(--navy); color: #fff; }
.add.many { margin-top: 14px; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.types button { min-height: 44px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-weight: 500; }
.types button:hover { border-color: var(--navy); color: var(--navy); }

.timeline { margin: 6px 0 22px; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; color: var(--muted); margin-bottom: 8px; }
.tl-head b { color: var(--ink); font-family: var(--display); font-size: 26px; font-weight: 700; }
.tl-bar { display: grid; grid-template-columns: repeat(120, 1fr); height: 14px; border-radius: 7px; overflow: hidden; background: var(--line-2); }
.tl-bar i { display: block; height: 100%; }
.tl-bar i.on { background: var(--navy); }
.tl-bar i.gap { background: repeating-linear-gradient(135deg, var(--red) 0 4px, var(--red-soft) 4px 8px); }
.tl-years { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.gaps { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.gap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--red-soft); color: var(--red-ink); font-size: 15px; }
.gap button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; font-weight: 600; font-size: 14px; }

/* disclosures */
.doc { border-bottom: 1px solid var(--line); }
.doc .doc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; font-weight: 600; font-size: 17px; cursor: pointer; }
.doc .doc-head:hover { color: var(--red-ink); }
.doc .doc-head .state { font-size: 14px; font-weight: 500; color: var(--muted); }
.doc .doc-head .state.ok { color: var(--green); }
.doc .doc-body { display: none; padding: 0 0 8px; }
.doc.open .doc-body { display: block; }
.doc .text { max-height: 320px; overflow: auto; padding: 16px 20px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; background: var(--soft); border-radius: 12px; }
.doc .text div { margin: 0 0 8px; }
.doc .text b, .doc .text strong { color: var(--ink); }
.doc .chk { margin: 6px 0 0; border-bottom: 0; }

/* signature */
.sig { position: relative; border-bottom: 2px solid var(--navy); background: var(--soft); border-radius: 14px 14px 0 0; overflow: hidden; }
.sig canvas { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; }
.sig .baseline { position: absolute; left: 24px; right: 24px; bottom: 54px; border-top: 1px dashed #b4bac6; pointer-events: none; }
.sig .clear { position: absolute; right: 12px; top: 12px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.sig.err { border-bottom-color: var(--red); }
.sig-note { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* status */
.status .big { font-family: var(--display); font-size: 40px; font-weight: 700; margin: 18px 0 6px; }
.status .ring { width: 64px; height: 64px; margin: 0; border-radius: 50%; border: 5px solid var(--line-2); border-top-color: var(--red); animation: spin 1s linear infinite; }
.status .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--green); position: relative; }
.status .ok::after { content: ""; position: absolute; left: 22px; top: 14px; width: 14px; height: 26px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.status .fail { width: 64px; height: 64px; border-radius: 50%; background: var(--red-ink); position: relative; }
.status .fail::before, .status .fail::after { content: ""; position: absolute; left: 30px; top: 16px; width: 4px; height: 32px; background: #fff; transform: rotate(45deg); }
.status .fail::after { transform: rotate(-45deg); }
.log { margin-top: 22px; font-size: 15px; color: var(--ink-2); display: flex; flex-direction: column; gap: 5px; }
.log span { color: var(--muted); font-size: 13px; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status .ring { animation: none; } .ring .fill { transition: none; } }

/* actions */
.btn { text-decoration: none; display: inline-flex; align-items: center; min-height: 46px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-weight: 600; font-size: 16px; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: #d92f30; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .add:focus-visible, .card:focus-visible, .ix:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }

@media (max-width: 1100px) { .sheet { padding: 40px 44px 100px; } }
@media (max-width: 860px) {
  body { display: block; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; width: auto; padding: 10px 14px 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand ring" "index index"; align-items: center; column-gap: 12px; }
  .brand { grid-area: brand; font-size: 19px; }
  .side-title, .side-foot { display: none; }
  .ring { grid-area: ring; width: 44px; height: 44px; margin: 0; }
  .ring circle { stroke-width: 11; }
  .ring b { font-size: 13px; }
  .index { grid-area: index; flex-direction: row; gap: 4px; margin: 8px -14px 0; padding: 0 10px 8px; overflow-x: auto; scrollbar-width: none; }
  .index::-webkit-scrollbar { display: none; }
  .ix { grid-template-columns: auto auto; padding: 6px 10px; font-size: 13.5px; white-space: nowrap; }
  .ix i { display: none; }
  .sheet { padding: 24px 18px 80px; }
  .intro h1 { font-size: 34px; }
  .intro { margin-bottom: 28px; }
  .section { padding: 26px 0 30px; scroll-margin-top: 96px; }
  .sec-num { font-size: 26px; }
  h1 { font-size: 25px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .editor { padding: 18px 16px; }
  .submit-row { padding-top: 26px; }
  .tl-head { flex-direction: column; gap: 2px; }
  .tl-head b { font-size: 22px; }
  .btn.big { width: 100%; }
}
