/* boqit theme: Ink #0E1726 · Paper #F5F4EE · Highlighter #E6FF3F · Blueprint #2F5BFF */
:root {
  --ink: #0e1726; --paper: #f5f4ee; --hi: #e6ff3f; --blue: #2f5bff;
  --card: #ffffff; --line: #e2e0d6; --grid: rgba(14, 23, 38, .045);
  --text: #0e1726; --muted: #5d6573; --soft: #3a4352;
  --ok: #1f7a4d; --ok-bg: #e7f5ec; --err: #b42318; --err-bg: #fdecea; --warn-bg: #fbffd6; --chip: #ecebe3;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font: 17px/1.55 "Barlow", "Segoe UI", system-ui, sans-serif;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; }
a { color: var(--blue); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---- header ---- */
header.top .in { max-width: 1140px; margin: 0 auto; padding: 34px 24px 20px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand svg { width: 26px; height: 41px; }
.brand b { font-size: 27px; font-weight: 700; letter-spacing: .2px; }
nav { display: flex; gap: 28px; margin-left: auto; align-items: center; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; }
nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.who { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.who button { background: none; border: 1.5px solid var(--ink); color: var(--ink); border-radius: 8px; padding: 4px 12px; font-weight: 600; cursor: pointer; }

/* ---- buttons ---- */
button, .btn { display: inline-block; background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 12px;
  padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn.hi, button.hi { color: var(--hi); }
button.secondary, .btn.secondary { background: transparent; color: var(--ink); }
button.danger { background: var(--err); border-color: var(--err); }
button:disabled { background: #a9adb5; border-color: #a9adb5; cursor: not-allowed; }
.btn.big, button.big { padding: 17px 24px; font-size: 19px; border-radius: 12px; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: start; padding: 40px 0 70px; position: relative; }
.hero > *:not(canvas) { position: relative; z-index: 1; }
.hero .btn.secondary, .hero button.secondary { background: var(--paper); }      /* numbers never show through buttons */
#heroFloat { position: absolute; z-index: 0; top: 0; bottom: 0; left: -24px; width: calc(100% + 48px); height: 100%;
  pointer-events: none; }
.hero h1 { font-size: 66px; line-height: 1.02; font-weight: 700; letter-spacing: -.5px; margin: 0 0 26px; color: var(--ink); }
.mark { background: var(--hi); padding: 0 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero p.lead { font-size: 21px; line-height: 1.5; color: var(--soft); font-weight: 500; max-width: 520px; margin: 0 0 34px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.bill { background: #fff; border: 1px solid #d8d6cc; border-radius: 18px; padding: 22px 22px 14px; margin-top: 8px;
  box-shadow: 0 22px 50px rgba(14, 23, 38, .10); font-size: 15px; }
.bill .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.bill .head b { font-size: 16px; }
.pill { font-family: var(--mono); font-size: 12px; background: var(--ink); color: var(--hi); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pill::before { content: "● "; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.bill table th { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.bill td.n, .bill th.n { text-align: right; }
.bill td.m { font-family: var(--mono); font-size: 14px; }
.bill tr.now td { background: #f4ffc2; }
.bill .foot { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 12px 2px 4px; }

/* ---- sections ---- */
section.band { padding: 60px 0; border-top: 1px solid var(--line); }
section.band h2 { font-size: 40px; margin: 0 0 28px; line-height: 1.1; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.watch { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-weight: 600; color: var(--ink); text-decoration: none; }
.watch i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--hi); display: grid; place-items: center; font-size: 12px; }
.watch span { color: var(--soft); font-weight: 500; }
.watch:hover i { transform: scale(1.08); }
.hiw-wrap { margin: 0 0 26px; }
.step { transition: border-color .4s, box-shadow .4s; }
.step.hiw-lit { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hi); }
.step .num { font-family: var(--mono); font-size: 13px; background: var(--hi); padding: 2px 8px; border-radius: 6px; }
.step h3 { font-size: 22px; margin: 12px 0 6px; }
.step p { margin: 0; color: var(--soft); }
footer { padding: 30px 0 50px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* ---- app pages ---- */
main { max-width: 1140px; margin: 0 auto; padding: 10px 24px 60px; }
main.landing { padding-top: 0; }
h1 { font-size: 34px; margin: 0 0 16px; line-height: 1.15; }
h2 { font-size: 20px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flash { padding: 11px 15px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.note { background: var(--warn-bg); border: 1px solid #e3ec9f; border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.muted { color: var(--muted); font-size: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.released, .chip.Ready, .chip.Draft { background: var(--hi); color: var(--ink); }
.chip.failed, .chip.needs_info, .chip.Needs { background: var(--err-bg); color: var(--err); }
.chip.quoted, .chip.Quote { background: #e4eaff; color: var(--blue); }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #cfcdc2; border-radius: 10px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--hi); border-color: var(--ink); }
textarea { min-height: 120px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.row > button { flex: 0 0 auto; }
.actions form { margin: 0 0 14px; }
.msg { border-left: 3px solid var(--line); padding: 4px 12px; margin: 10px 0; }
.msg.admin { border-color: var(--blue); }
.msg .meta { font-size: 12px; color: var(--muted); }
.pre { white-space: pre-wrap; }
.files li { margin: 3px 0; }
.big-num { font-size: 26px; font-weight: 700; }
.login { max-width: 420px; margin: 40px auto; }
.login .forgot { display: block; margin: 6px 0 4px; font-size: 14px; color: var(--muted); text-decoration: none; }
.login .forgot:hover { color: var(--ink); text-decoration: underline; }
nav .btn.secondary { padding: 9px 18px; }
.oauth { margin: 6px 0 4px; }
.logo-now { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; background: #fff; }
.logo-now img { max-width: 110px; max-height: 64px; object-fit: contain; }
.logo-line { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.logo-line img { max-width: 70px; max-height: 40px; object-fit: contain; }
.logo-line.top { margin: 16px 0 4px; cursor: pointer; }
.extra-line { margin: 14px 2px 4px; }
.phone-field { position: relative; display: flex; gap: 8px; }
.phone-field input[type=tel] { flex: 1; min-width: 0; }
.cc-btn { display: flex; align-items: center; gap: 8px; flex: none; background: #fff; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; font-weight: 600; }
.cc-btn:hover, .cc-btn[aria-expanded=true] { border-color: var(--ink); }
.cc-btn img, .cc-panel img { width: 22px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); object-fit: cover; }
.cc-btn i { font-style: normal; font-size: 11px; color: var(--muted); }
.cc-panel { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: min(340px, 100%); background: #fff;
  border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 0 12px 30px rgba(14,23,38,.18); padding: 8px; }
.cc-panel[hidden] { display: none; }
.cc-panel input[type=search] { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1.5px solid var(--line);
  border-radius: 8px; font: inherit; margin-bottom: 6px; }
.cc-panel ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.cc-panel li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.cc-panel li[hidden] { display: none; }        /* the rule above would otherwise keep searched-out rows visible */
.cc-panel li:hover, .cc-panel li:focus, .cc-panel li.match { background: var(--chip); outline: none; }
.cc-panel .cc-none { padding: 10px 8px; color: var(--muted); font-size: 14px; }
.cc-panel li[aria-selected=true] { font-weight: 700; }
.cc-panel li span { flex: 1; }
.cc-panel li small { color: var(--muted); font-family: var(--mono); }
.cc-panel li.top-last { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; padding-bottom: 9px; }
.phone-field.searching li.top-last { border-bottom: 0; margin-bottom: 0; padding-bottom: 7px; }
.sample-card { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sample-card > div:first-child { flex: 1 1 420px; }
.sample-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: end; margin: 10px 0 18px; }
.sample-head h1 { font-size: 44px; margin: 4px 0 0; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts div { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.facts b { display: block; font-size: 22px; font-family: var(--mono); }
.facts span { color: var(--muted); font-size: 13px; }
.bill-card { margin: 14px 0; }
.bill-card h2 { font-size: 19px; margin: 0 0 10px; }
.bill-card h2 .num { font-family: var(--mono); font-size: 13px; background: var(--ink); color: var(--hi);
  padding: 3px 8px; border-radius: 6px; margin-right: 8px; vertical-align: middle; }
.table-wrap { overflow-x: auto; }
table.boq { width: 100%; border-collapse: collapse; font-size: 14px; }
table.boq th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1.5px solid var(--line); padding: 6px 8px; }
table.boq td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
table.boq td:first-child { white-space: nowrap; color: var(--muted); }
table.boq .n { text-align: right; white-space: nowrap; }
table.boq .m { font-family: var(--mono); }
@media (max-width: 760px) { .sample-head { grid-template-columns: 1fr; } .sample-head h1 { font-size: 32px; } }
.contact-btn { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 14px 16px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.contact-btn:hover { border-color: var(--ink); }
.contact-btn svg { width: 26px; height: 26px; flex: none; }
.contact-btn.wa svg { color: #25D366; }
.contact-btn span { display: flex; flex-direction: column; }
.contact-btn small { color: var(--muted); font-size: 14px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; box-sizing: border-box;
  margin: 10px 0 0; padding: 11px 16px; background: #fff; color: var(--ink); border: 1.5px solid var(--line);
  border-radius: 12px; font-weight: 600; text-decoration: none; }
.oauth-btn:hover { border-color: var(--ink); }
.oauth-btn svg { width: 20px; height: 20px; flex: none; }
.oauth .or { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; color: var(--muted); font-size: 13px; }
.oauth .or::before, .oauth .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
code.link { display: block; word-break: break-all; background: var(--chip); padding: 8px 10px; border-radius: 8px; margin-top: 6px; font-family: var(--mono); font-size: 13px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { padding: 6px 0 6px 36px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 6px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--chip); text-align: center; font-size: 13px; line-height: 26px; font-family: var(--mono); }
.steps li.done::before { background: var(--ink); color: var(--hi); content: "✓"; }
.steps li.now { font-weight: 700; }
.steps li.now::before { background: var(--hi); color: var(--ink); }

/* ---- upload window ---- */
.pricebar { display: grid; grid-template-columns: 260px 1fr; gap: 6px 20px; align-items: end; padding: 14px 24px; border-top: 1px solid var(--line); background: #fbffe0; }
.pricebar label { margin-top: 0; }
.pricebar p { grid-column: 1 / -1; margin: 0; }
.price-out { display: flex; flex-direction: column; }
.price-out b { font-size: 26px; line-height: 1.2; }
dialog.up { border: 0; border-radius: 20px; padding: 0; width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: 0 30px 80px rgba(14, 23, 38, .35); color: var(--ink); background: var(--paper); }
dialog.up::backdrop { background: rgba(14, 23, 38, .55); }
.up .bar { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.up .bar b { font-size: 22px; }
.up .x { background: none; border: 0; color: var(--ink); font-size: 28px; padding: 0 6px; line-height: 1; }
.up .body { padding: 22px 24px; overflow-y: auto; max-height: calc(100vh - 190px); }
.up .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.slot { background: #fff; border: 2px dashed #bdbbb0; border-radius: 16px; padding: 20px; min-height: 250px; display: flex; flex-direction: column; transition: .15s; }
.slot.over { border-color: var(--ink); background: #fbffe0; }
.slot.has { border-style: solid; border-color: var(--ink); }
.slot h3 { margin: 0 0 4px; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.slot .tag { font-family: var(--mono); font-size: 12px; background: var(--hi); padding: 1px 7px; border-radius: 5px; }
.slot .drop { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 16px 0; color: var(--soft); }
.slot .drop .ico { font-size: 34px; line-height: 1; }
.flist { list-style: none; padding: 0; margin: 8px 0 0; font-size: 15px; }
.flist li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.flist li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flist button { background: none; border: 0; color: var(--err); padding: 0 4px; font-size: 18px; }
.linkbtn { background: none; border: 0; color: var(--blue); padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.brief-form { display: none; margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 6px 20px 18px; }
.brief-form.open { display: block; }
.brief-form .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.progress { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; display: none; flex: 1; min-width: 160px; }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.uperr { color: var(--err); font-weight: 600; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 20px; }
  .hero h1 { font-size: 48px; }
  .steps3, .grid, .slots, .brief-form .g2, .pricebar { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  header.top .in { padding: 18px 16px 10px; gap: 14px; }
  nav { gap: 16px; margin-left: 0; width: 100%; }
  nav a.opt { display: none; }
  .wrap, main { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 40px; }
  .hero p.lead { font-size: 18px; }
  section.band h2 { font-size: 30px; }
  .bill { padding: 16px 12px 10px; font-size: 14px; }
  .bill td.m { font-size: 12px; }
}

/* ---- live BOQ progress on the client's job page (app/progress.py, static/progress.js) ---- */
.live { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; margin: 6px 0 22px; }
.live-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.live-top h2 { margin: 0; font-size: 24px; }
.live-top p { margin: 4px 0 0; color: var(--soft); }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--mono); background: var(--ink); color: var(--hi);
  border-radius: 99px; padding: 6px 12px; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--hi); animation: liveBlink 1.4s infinite; }
@keyframes liveBlink { 50% { opacity: .25; } }
.pbar { position: relative; height: 22px; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; margin: 22px 0 10px; background: var(--paper); }
.pbar b { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--hi);
  background-image: repeating-linear-gradient(-45deg, rgba(14,23,38,.10) 0 10px, transparent 10px 20px);
  background-size: 28px 28px; animation: liveStripes 1.2s linear infinite; transition: width 1s ease; border-right: 2px solid var(--ink); }
@keyframes liveStripes { to { background-position: 28px 0; } }
.pnums { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 14px; color: var(--soft); }
.pnums strong { font-size: 28px; color: var(--ink); }
.pnums .left { text-align: right; }
.stages { list-style: none; margin: 24px 0 0; padding: 0; }
.stages li { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.stages li:first-child { border-top: 0; }
.stages .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--mono);
  border: 2px solid #cfcdc2; color: #9aa0aa; background: #fff; }
.stages .done .ic { background: var(--ink); border-color: var(--ink); color: var(--hi); }
.stages .now .ic { border-color: var(--ink); color: var(--ink); background: var(--hi); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(230,255,63,.9); } 70% { box-shadow: 0 0 0 10px rgba(230,255,63,0); } 100% { box-shadow: 0 0 0 0 rgba(230,255,63,0); } }
.stages b { font-size: 17px; display: block; }
.stages .todo b { color: #9aa0aa; font-weight: 600; }
.stages .sub { color: var(--soft); font-size: 14px; margin-top: 2px; }
.stages .act { font-family: var(--mono); font-size: 13px; color: var(--ink); background: #f4ffc2; border-radius: 8px; padding: 6px 10px; margin-top: 8px; display: inline-block; }
.stages .act::before { content: "▸ "; }
.stages time { font-family: var(--mono); font-size: 13px; color: var(--soft); white-space: nowrap; }
.calm { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--paper); color: var(--soft); }
.calm[hidden] { display: none; }
.calm span { font-size: 20px; }
.listchip { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--mono); white-space: nowrap; }
.mini { width: 90px; height: 8px; border: 1.5px solid var(--ink); border-radius: 99px; overflow: hidden; display: inline-block; }
.mini i { display: block; height: 100%; background: var(--hi); }
@media (max-width: 640px) { .live { padding: 20px 16px; } .stages li { grid-template-columns: 30px 1fr; } .stages time { grid-column: 2; } }
@media (prefers-reduced-motion: reduce) { .pbar b, .stages .now .ic, .live-dot i { animation: none; } }
.pay-note{margin-top:8px}
.pay-bad{color:#b42318}
#payBtn:disabled{opacity:.7;cursor:wait}
