:root {
  --navy: #1b3556; --navy-2: #264a78; --teal: #1a6b61; --bg: #f4f6f9; --card: #fff; --line: #d5dbe3;
  --text: #1c2430; --muted: #5d6877; --err: #b3261e; --err-bg: #fdecea; --ok: #1d7a46; --ok-bg: #e8f5ee; --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.top { background: #fff; border-bottom: 3px solid var(--navy); display: flex; align-items: center; gap: 14px; padding: 10px 16px; position: sticky; top: 0; z-index: 5; }
.brand img { height: 46px; display: block; }
.top-title { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 18px 14px 40px; flex: 1; }
.foot { text-align: center; padding: 18px 14px 28px; color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); } .small { font-size: .8rem; }
h1 { font-size: 1.5rem; color: var(--navy); margin: .2em 0 .3em; } h2 { font-size: 1.15rem; color: var(--navy); margin: 1.2em 0 .5em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.choice { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--navy); border-radius: var(--radius); padding: 16px; transition: box-shadow .15s, transform .15s; }
.choice:hover, .choice:focus-visible { box-shadow: 0 4px 14px rgba(27,53,86,.15); transform: translateY(-1px); outline: none; }
.choice b { display: block; font-size: 1.1rem; color: var(--navy); }
.choice span { color: var(--muted); font-size: .92rem; }
.notice { background: #fff8e1; border: 1px solid #f0d58a; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.steps { display: flex; gap: 4px; margin: 8px 0 16px; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps i.done { background: var(--teal); } .steps i.cur { background: var(--navy); }
.steplabel { color: var(--muted); font-size: .88rem; margin-bottom: 4px; }
.bar-title { background: var(--navy); color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .02em; text-transform: uppercase; padding: 8px 12px; border-radius: 8px 8px 0 0; margin-top: 18px; }
.block { background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); padding: 14px; margin-bottom: 14px; }
.block.nobar { border-radius: var(--radius); margin-top: 14px; }
.block h3 { margin: 0 0 10px; font-size: .95rem; color: var(--navy); }
.block p { margin: .3em 0 .6em; font-size: .93rem; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } .span2 { grid-column: 1 / -1; } }
label.f { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }
label.f input, label.f select, label.f textarea, .in { display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--text); padding: 11px 12px; border: 1px solid #b8c1cd; border-radius: 8px; background: #fff; min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(38,74,120,.25); border-color: var(--navy-2); }
.invalid input, .invalid .in, .invalid.opt { border-color: var(--err) !important; background: var(--err-bg); }
.hint { font-size: .8rem; font-weight: 400; color: var(--muted); margin-top: 3px; } .hint.warn { color: #8a5a00; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; cursor: pointer; background: #fff; line-height: 1.35; }
.opt:has(input:checked) { border-color: var(--navy-2); background: #eef3fa; }
.opt input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--navy); }
.opts-inline { display: flex; flex-wrap: wrap; gap: 0 10px; } .opts-inline .opt { flex: 1 1 220px; }
.nota { color: var(--teal); font-style: italic; font-size: .85rem; margin-top: 6px; }
.row { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fafbfd; }
@media (min-width: 640px) { .row { grid-template-columns: 1.4fr 1fr auto; align-items: end; } }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 20px; min-height: 48px; cursor: pointer; background: var(--navy); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--navy-2); } .btn:disabled { opacity: .5; cursor: default; }
.btn.sec { background: #fff; color: var(--navy); border: 2px solid var(--navy); } .btn.sec:hover { background: #eef3fa; }
.btn.danger { background: var(--err); } .btn.small { min-height: 38px; padding: 6px 12px; font-size: .88rem; }
.nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 14px 0 6px; }
.nav .btn { flex: 1; max-width: 240px; } .nav .btn:last-child { margin-left: auto; }
.errors { background: var(--err-bg); border: 1px solid #f0b5b0; color: #6b140f; border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; }
.errors ul { margin: 6px 0 0; padding-left: 20px; }
.ok { background: var(--ok-bg); border: 1px solid #a8d9bc; border-radius: var(--radius); padding: 14px; }
.file { border: 1px dashed #9aa6b6; border-radius: 10px; padding: 12px; margin: 10px 0; background: #fff; }
.file b { display: block; font-size: .92rem; margin-bottom: 4px; } .file .hint { margin: 0 0 6px; }
.file ul { list-style: none; padding: 0; margin: 8px 0 0; }
.file li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; background: #eef3fa; border-radius: 8px; margin-top: 6px; font-size: .88rem; word-break: break-all; }
.file input[type=file] { width: 100%; font: inherit; }
.file.invalid { border-color: var(--err); background: var(--err-bg); }
.sig { margin: 8px 0 14px; }
.sig canvas { width: 100%; height: 170px; display: block; border: 2px dashed #8d99aa; border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.sig.invalid canvas { border-color: var(--err); }
.sig .sig-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.pay { background: #f1f6fb; border: 1px solid #c8d7ea; border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.pay code { font-size: 1.02rem; font-weight: 700; word-break: break-all; }
.overlay { position: fixed; inset: 0; background: rgba(20,30,45,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.overlay[hidden] { display: none; }
.overlay-box, .modal { background: #fff; border-radius: 14px; padding: 24px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.modal { text-align: left; max-width: 520px; } .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.spinner { width: 42px; height: 42px; margin: 0 auto 12px; border: 5px solid #d8e0ec; border-top-color: var(--navy); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 8px; background: #e3e8ef; border-radius: 4px; margin-top: 14px; overflow: hidden; } .bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
a { color: var(--navy-2); }

.ts-box { margin-top: 14px; }
