/* USADATA quotes. Colors, type and shapes follow the USADATA design system. */
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url(/fonts/dm-sans/dm-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url(/fonts/dm-sans/dm-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url(/fonts/dm-sans/dm-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(/fonts/figtree/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url(/fonts/figtree/figtree-latin-600-normal.woff2) format("woff2"); }

:root {
  --navy: #10294C; --blue: #2E6BF0; --aqua: #05D8D2; --lime: #DEF16A; --green: #7FE19C;
  --ground: #F4F7FD; --surface: #FFFFFF; --text: #10294C; --muted: #5B6475; --border: #D5E1FC;
  --tint-blue: #D5E1FC; --tint-aqua: #CDF7F6; --tint-lime: #F7FAE4;
  --bad: #C8372D; --bad-bg: #FDECEA; --warn: #9A6400; --warn-bg: #FFF4D6; --good: #17794A; --good-bg: #E3F8EB;
  --zone-bad: #F3A49C; --zone-warn: #F6D77A; --zone-good: #7FE19C;
  --depth: linear-gradient(100deg, #0455BF, #2E6BF0 55%, #41E1F2);
  --radius: 14px; --shadow: 0 1px 2px rgba(16,41,76,.06), 0 6px 20px rgba(16,41,76,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 15px/1.5 Figtree, "DM Sans", system-ui, sans-serif; }
h1, h2, h3 { font-family: "DM Sans", Figtree, sans-serif; margin: 0; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.boot { padding: 80px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }

/* top bar */
.top { background: var(--navy); color: #fff; }
.top-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 28px; }
.top img { height: 26px; display: block; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: #C9D6EE; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.on { color: var(--navy); background: #fff; }
.nav .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--lime); color: var(--navy); font-size: 12px; text-align: center; }
.who { font-size: 13px; color: #C9D6EE; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.who button { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.who button:hover { background: rgba(255,255,255,.1); }
main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* forms */
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
label.f > span { display: block; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
  width: 100%; background: #fff; border: 1px solid #B9C7E6; border-radius: 10px; padding: 9px 11px; min-height: 40px; color: var(--text); font-weight: 400; }
textarea { min-height: 70px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(46,107,240,.45); outline-offset: 1px; }
input:disabled, select:disabled, textarea:disabled { background: #F1F4FA; color: var(--muted); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--text); font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid #B9C7E6; background: #fff; color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #1F57D0; border-color: #1F57D0; }
.btn.primary:disabled { background: #B9C7E6; border-color: #B9C7E6; opacity: 1; }
.btn.navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.danger { color: var(--bad); }
.btn.link { border: none; background: none; padding: 0; min-height: 0; color: var(--blue); font-weight: 600; }
.btn.link.danger { color: var(--bad); }
.quiet-links { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 4px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.seg { display: inline-flex; border: 1px solid #B9C7E6; border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: none; background: none; padding: 8px 12px; min-height: 38px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button + button { border-left: 1px solid #B9C7E6; }
.seg button.on { background: var(--navy); color: #fff; }

/* sign in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-brand { background: var(--depth); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand img { width: 210px; }
.auth-brand h1 { font-size: 40px; line-height: 1.1; max-width: 12em; }
.auth-brand p { margin-top: 14px; max-width: 30em; opacity: .92; font-size: 17px; }
.auth-brand .tag { font-family: "DM Sans"; font-weight: 500; opacity: .9; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-form form { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.err { color: var(--bad); background: var(--bad-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-brand { padding: 32px; gap: 40px; } .auth-brand h1 { font-size: 30px; } }

/* builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 20px; align-items: start; }
.side { position: sticky; top: 16px; display: grid; gap: 16px; }
@media (max-width: 1040px) { .builder { grid-template-columns: 1fr; } .side { position: static; } }
@media (max-width: 720px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .top-in { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px; } main { padding: 20px 14px 60px; } }
@media (max-width: 480px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.picker-groups { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid #B9C7E6; background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--navy); }
.chip:hover { border-color: var(--blue); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.picker-products { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 10px; margin-right: -20px; scrollbar-width: thin; }
.prod { flex: 0 0 188px; scroll-snap-align: start; text-align: left; border: 1px solid var(--border); background: var(--ground); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; align-items: flex-start; min-height: 84px; }
.prod:hover { border-color: var(--blue); background: #fff; }
.prod b { font-weight: 600; font-size: 14px; }
.prod span { font-size: 12px; color: var(--muted); white-space: nowrap; }

.line { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); margin-top: 14px; overflow: hidden; }
.line-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: #FAFCFF; }
.line-head h3 { flex: 1; min-width: 0; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--tint-blue); color: var(--navy); white-space: nowrap; }
.tag.aqua { background: var(--tint-aqua); }
.line-body { padding: 16px 18px 18px; display: grid; gap: 16px; }
.note { font-size: 13px; color: var(--muted); }
.warnline { font-size: 13px; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; }

.selects { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--ground); }
.selects-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.results { max-height: min(42vh, 380px); overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.results button { display: flex; width: 100%; justify-content: space-between; gap: 12px; text-align: left; border: none; border-bottom: 1px solid #EEF2FB; background: none; padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
.results button:last-child { border-bottom: none; }
.results button:hover { background: var(--ground); }
.results button span:last-child { color: var(--muted); white-space: nowrap; }
.results .empty { padding: 12px; color: var(--muted); font-size: 13.5px; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.picked .pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #B9C7E6; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; max-width: 100%; }
.picked .pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked .pill button { border: none; background: var(--tint-blue); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; flex: none; }

/* the margin range */
.range { display: grid; gap: 8px; }
.range-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.track { position: relative; height: 44px; }
.track .bar { position: absolute; left: 0; right: 0; top: 14px; height: 16px; border-radius: 8px; }
.track input[type=range] { position: absolute; left: 0; right: 0; top: 5px; width: 100%; height: 34px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.track input[type=range]::-webkit-slider-runnable-track { background: none; height: 34px; }
.track input[type=range]::-moz-range-track { background: none; height: 34px; }
.track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 34px; border-radius: 7px; background: var(--navy); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(16,41,76,.5); }
.track input[type=range]::-moz-range-thumb { width: 8px; height: 28px; border-radius: 7px; background: var(--navy); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(16,41,76,.5); }
.track input[type=range]:disabled { cursor: default; }
.marks { position: relative; height: 34px; font-size: 12px; color: var(--muted); }
.marks div { position: absolute; top: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; line-height: 1.3; }
.marks div::before { content: ""; display: block; width: 1px; height: 6px; background: #8FA0C4; margin: 0 auto 2px; }
.marks div.l { transform: none; text-align: left; } .marks div.l::before { margin-left: 0; }
.marks div.r { transform: translateX(-100%); text-align: right; } .marks div.r::before { margin-right: 0; }
.marks b { color: var(--navy); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.below { background: var(--bad-bg); color: var(--bad); }
.badge.caution { background: var(--warn-bg); color: var(--warn); }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.none { background: #EEF2FB; color: var(--muted); }
.badge.info { background: var(--tint-blue); color: var(--navy); }

/* summary */
.big { font-family: "DM Sans"; font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.gauge { position: relative; height: 18px; border-radius: 9px; margin: 14px 0 6px; }
.gauge i { position: absolute; top: -6px; width: 6px; height: 30px; margin-left: -3px; border-radius: 3px; background: var(--navy); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(16,41,76,.5); transition: left .15s ease; }
.gauge-scale { position: relative; height: 16px; font-size: 12px; color: var(--muted); }
.gauge-scale span { position: absolute; transform: translateX(-50%); }
.gauge-scale span:first-child { transform: none; } .gauge-scale span:last-child { transform: translateX(-100%); }
.rows { display: grid; gap: 8px; margin-top: 14px; }
.rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.rows div span:first-child { color: var(--muted); }
.rows div.total { font-family: "DM Sans"; font-weight: 700; font-size: 19px; padding-top: 10px; border-top: 1px solid var(--border); }
.rows div.total span:first-child { color: var(--navy); }
.status { margin-top: 16px; padding: 2px 0 2px 12px; border-left: 3px solid var(--border); font-size: 14px; }
.status b { display: block; font-family: "DM Sans"; }
.status ul { margin: 4px 0 0; padding-left: 18px; }
.status.below { border-left-color: var(--bad); } .status.below b { color: var(--bad); }
.status.pending { border-left-color: #D99A00; } .status.pending b { color: var(--warn); }
.status.good { border-left-color: var(--good); } .status.good b { color: var(--good); }
.actions { display: grid; gap: 8px; }
.actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--navy); padding: 10px 12px; white-space: nowrap; }
th:first-child { border-radius: 10px 0 0 10px; } th:last-child { border-radius: 0 10px 10px 0; }
td { padding: 12px; border-bottom: 1px solid #E6ECF8; vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--ground); }
td.r, th.r { text-align: right; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state h2 { color: var(--navy); margin-bottom: 6px; }
.history { display: grid; gap: 8px; font-size: 13px; }
.history div { display: flex; justify-content: space-between; gap: 12px; }
.history div span:last-child { color: var(--muted); white-space: nowrap; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 30px rgba(16,41,76,.35); opacity: 0; pointer-events: none; transition: all .2s ease; max-width: min(560px, 92vw); z-index: 50; font-size: 14px; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* connected steps */
.steps { display: flex; margin: 0 0 20px; position: sticky; top: 0; z-index: 5; background: var(--ground); padding: 10px 0; }
.step { flex: 1; position: relative; display: grid; grid-template-columns: 30px 1fr; column-gap: 0; text-align: left; border: none; background: none; padding: 0 12px 0 0; cursor: pointer; min-width: 0; }
.step::after { content: ""; position: absolute; left: 34px; right: 4px; top: 14px; height: 2px; background: #B9C7E6; }
.step:last-child::after { display: none; }
.step .dot { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #B9C7E6; background: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--muted); position: relative; z-index: 1; }
.step .lbl { font-family: "DM Sans"; font-weight: 700; font-size: 14px; background: var(--ground); justify-self: start; padding: 0 8px 0 10px; position: relative; z-index: 1; line-height: 30px; }
.step .sub { padding-left: 10px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step.done .dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.done::after { background: var(--navy); }
.step.current .dot { border-color: var(--blue); color: var(--blue); }
.step.warn .dot { border-color: var(--bad); color: var(--bad); background: #fff; }
.side { top: 66px; }
@media (max-width: 720px) { .step .sub { display: none; } .step { padding-right: 6px; } }

/* focused panel: everything behind it is dimmed */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(16, 41, 76, .62); display: grid; place-items: start center; padding: 6vh 16px 16px; overflow: auto; }
.panel { width: min(760px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(8, 20, 40, .45); padding: 20px; display: grid; gap: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel .picker-groups { margin: 0; }
.panel-foot { border-top: 1px solid var(--border); padding-top: 12px; }
.panel-foot .picked { max-height: 120px; overflow: auto; }

/* predictive company field */
.combo { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 20; background: #fff; border: 1px solid #B9C7E6; border-radius: 12px; box-shadow: 0 12px 32px rgba(16,41,76,.18); overflow: hidden; }
.suggest button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: none; border-bottom: 1px solid #EEF2FB; background: none; padding: 10px 12px; cursor: pointer; font-size: 14px; min-height: 42px; }
.suggest button:last-child { border-bottom: none; }
.suggest button:hover, .suggest button.on { background: var(--ground); }
.suggest .tags { display: flex; gap: 6px; flex: none; }
.hint { margin-top: 10px; font-size: 14px; display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; padding-left: 12px; border-left: 3px solid var(--aqua); }

/* narrow screens: nothing may push the page sideways */
html, body { overflow-x: clip; }
@media (max-width: 720px) {
  .step .lbl { font-size: 12px; padding: 0 4px 0 6px; }
  .picker-products { margin-right: -14px; }
  .who span { display: none; }
}
