/* ── Step 5: Submit (Oct 2026) ── */
.sub-top { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 14px; margin: 6px 0 18px; }
.sub-score, .sub-mkts { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 14px 16px; margin: 0; }
.sub-score strong { display: block; font-size: 34px; line-height: 1.1; color: var(--ink); }
.sub-score p { margin: 0; font-size: 13px; color: var(--muted); }
.sub-mkts { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.sub-mkts legend { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 4px; }
.sub-h { margin: 26px 0 10px; font-size: 16px; }
.sub-muted { color: var(--muted); font-size: 12.5px; }
.sub-fine { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
.sub-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.sub-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
.sub-table th { text-align: left; background: var(--surface); padding: 8px 10px; font-size: 12px; color: var(--muted); }
.sub-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; }
.sub-mini { width: 80px; height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; margin-bottom: 4px; }
.sub-mini span { display: block; height: 100%; background: var(--teal); }
.sub-chip { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface); color: var(--ink); }
.sub-ready { background: var(--teal-soft); color: #0b5f58; }
.sub-nearly { background: #e8eef9; color: #1e3a8a; }
.sub-not { background: #fde7c7; color: #7a3d00; }
.sub-gaps { margin-top: 6px; font-size: 12px; }
.sub-gaps summary { cursor: pointer; color: var(--muted); }
.sub-gaps ul { margin: 4px 0 0; padding-left: 16px; }
.sub-open { white-space: nowrap; }
.sub-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sub-route { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 18px; }
.sub-route h4 { margin: 2px 0 8px; font-size: 18px; }
.sub-route p { line-height: 1.55; }
.sub-route--managed { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; }
.sub-ticks { margin: 10px 0 14px; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
.sub-guides { margin-top: 12px; }
.sub-guides summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.sub-guide { border-top: 1px solid var(--line); padding: 10px 0; }
.sub-guide h5 { margin: 0 0 4px; font-size: 13.5px; }
.sub-guide ol { margin: 0 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.sub-guide a { font-size: 12.5px; color: var(--teal); }
.sub-exports { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sub-exports > div { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.sub-exports h4 { margin: 0 0 6px; }
.sub-exports p { font-size: 13px; line-height: 1.5; }
.sub-exports .sub-fine { grid-column: 1 / -1; }
/* tracker */
.sub-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.sub-pick select { min-height: 36px; max-width: 100%; }
.sub-track { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 18px; }
.sub-track--demo { border-style: dashed; }
.sub-demo-flag { margin: -6px 0 10px; font-size: 12px; font-weight: 800; color: #7a3d00; text-transform: uppercase; letter-spacing: .04em; }
.sub-track header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sub-track header h4 { margin: 2px 0; font-size: 17px; }
.sub-stepper { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 0; margin: 16px 0; counter-reset: s; }
.sub-stepper li { position: relative; text-align: center; font-size: 12px; color: var(--muted); padding-top: 34px; }
.sub-stepper li span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); font-weight: 800; color: var(--muted); }
.sub-stepper li::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.sub-stepper li:first-child::before { display: none; }
.sub-stepper li span { z-index: 1; }
.sub-stepper li.done span { background: var(--teal); border-color: var(--teal); color: #fff; }
.sub-stepper li.done::before, .sub-stepper li.now::before { background: var(--teal); }
.sub-stepper li.now { color: var(--ink); font-weight: 800; }
.sub-stepper li.now span { border-color: var(--teal); color: var(--teal); }
.sub-stepper li.ask span { border-color: #b45309; color: #7a3d00; background: #fde7c7; }
.sub-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.sub-card h4 { margin: 0 0 6px; font-size: 16px; }
.sub-card h4 small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.sub-quote-notes { white-space: pre-wrap; font-size: 13px; background: var(--panel); border-radius: 8px; padding: 8px 10px; }
.sub-auths { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.sub-auths h5 { margin: 0 0 6px; font-size: 13px; }
.sub-auths ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.sub-ok { color: #0b5f58; font-weight: 700; }
.sub-err { color: #a3261a; font-size: 13px; min-height: 1em; }
.sub-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.sub-cols h5 { margin: 0 0 8px; font-size: 13.5px; }
.sub-thread { max-height: 320px; overflow-y: auto; display: grid; gap: 8px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.sub-msg { max-width: 88%; padding: 8px 11px; border-radius: 10px; font-size: 13px; line-height: 1.5; background: var(--panel); border: 1px solid var(--line); }
.sub-msg time { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.sub-msg--client { justify-self: end; background: var(--teal-soft); border-color: transparent; }
.sub-msg--system { justify-self: center; max-width: 100%; background: transparent; border-style: dashed; color: var(--muted); }
.sub-compose { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; }
.sub-compose textarea { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; resize: vertical; background: var(--panel); color: var(--ink); }
.sub-files ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.sub-file-who { display: inline-block; min-width: 46px; font-size: 11px; font-weight: 800; color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; cursor: pointer; font: inherit; text-align: left; }
.linklike:disabled { color: var(--ink); text-decoration: none; cursor: default; }
.sub-upload { display: inline-flex; align-items: center; cursor: pointer; }
.sub-upload.is-disabled { opacity: .55; cursor: not-allowed; }
/* modal */
.sub-modal { position: fixed; inset: 0; background: rgba(10, 20, 28, .55); display: grid; place-items: center; z-index: 1200; padding: 16px; }
.sub-modal-card { position: relative; width: min(620px, 100%); max-height: 90vh; overflow: auto; background: var(--panel); color: var(--ink); border-radius: 14px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.sub-modal-card--wide { width: min(820px, 100%); }
.sub-modal-card h2 { margin: 2px 0 10px; font-size: 20px; }
.sub-x { position: absolute; top: 12px; right: 12px; min-width: 36px; min-height: 36px; }
.sub-form { display: grid; gap: 12px; }
.sub-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.sub-form input:not([type=checkbox]), .sub-form textarea, .sub-form select { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-weight: 400; background: var(--panel); color: var(--ink); }
.sub-form fieldset { border: 0; padding: 0; margin: 0; }
.sub-form legend { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.sub-mkts-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sub-check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 8px; font-weight: 400 !important; line-height: 1.45; }
.sub-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.sub-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sub-letter { max-height: 42vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: 13px; line-height: 1.55; background: var(--surface); margin-bottom: 14px; }
.sub-letter h3 { margin: 0 0 8px; font-size: 15px; }
.sub-sigline { min-height: 40px; border-bottom: 1.5px solid var(--ink); font: italic 26px/40px "Brush Script MT", "Segoe Script", cursive; color: #13324a; padding: 0 6px; }
.sub-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: #13324a; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px; z-index: 1300; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); }
.sub-toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 860px) {
  .sub-top, .sub-routes, .sub-exports, .sub-cols, .sub-grid2 { grid-template-columns: 1fr; }
  .sub-stepper { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .sub-stepper li::before { display: none; }
}
:root[data-theme="dark"] .sub-ready, :root[data-theme="dark"] .sub-ok { color: #8fe3d8; }
:root[data-theme="dark"] .sub-nearly { background: #1e2a44; color: #b9c9f0; }
:root[data-theme="dark"] .sub-not, :root[data-theme="dark"] .sub-stepper li.ask span { background: #4a3214; color: #f8d6a3; }
:root[data-theme="dark"] .sub-sigline { color: #cfe3f2; border-color: #cfe3f2; }
:root[data-theme="dark"] .sub-msg--client { color: #0f1923; }
:root[data-theme="dark"] .sub-err { color: #ff9a8a; }
.sub-tree { margin-top: 8px; font-size: 12px; color: var(--ink); }
.sub-tree summary { cursor: pointer; font-weight: 700; }
.sub-tree ul { max-height: 220px; overflow: auto; margin: 4px 0 0; padding-left: 16px; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.5; }
/* five-step nav on narrow phones */
@media (max-width: 480px) {
  .step-nav-btn { min-width: 0; padding: 0 2px; gap: 4px; }
  .step-nav .step-circle { width: 20px; height: 20px; flex: none; }
  .step-nav .step-label::after { font-size: 11px; }
}
.sub-msg--client time { color: #33514d; }
