@font-face { font-family: 'Spectral'; font-weight: 700; src: url('fonts/spectral-latin-700-normal.woff2'); }
@font-face { font-family: 'Spectral'; font-weight: 800; src: url('fonts/spectral-latin-800-normal.woff2'); }
@font-face { font-family: 'Plex'; font-weight: 400; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2'); }
@font-face { font-family: 'Plex'; font-weight: 500; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2'); }
@font-face { font-family: 'Plex'; font-weight: 600; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2'); }
@font-face { font-family: 'Plex'; font-weight: 700; src: url('fonts/ibm-plex-sans-latin-700-normal.woff2'); }

:root {
  --canvas: #eef0f3; --surface: #ffffff; --ink: #171a21; --muted: #5f6570; --rule: #d9dde3;
  --accent: #1f4fd8; --accent-ink: #1b47c2; --accent-wash: #e8eefc;
  --ok: #1e7b4f; --ok-wash: #e5f3ec; --bad: #b3261e; --bad-wash: #fbeceb; --warn-wash: #fff6e0;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: 'Plex', system-ui, sans-serif; line-height: 1.5; }
a { color: var(--accent-ink); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

/* top bar */
.bar { background: var(--surface); border-bottom: 1px solid var(--rule); }
.bar-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 28px; }
.wordmark { font-family: 'Spectral'; font-weight: 800; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.nav { display: flex; gap: 20px; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 17px 0 15px; border-bottom: 2px solid transparent; }
.nav a.on, .nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.who { color: var(--muted); font-size: .9rem; display: flex; gap: 14px; align-items: center; }
.plan-pill { font-weight: 600; font-size: .8rem; color: var(--accent-ink); background: var(--accent-wash); padding: 2px 9px; border-radius: 99px; text-decoration: none; }

main.page { max-width: 1120px; margin: 0 auto; padding: 36px 24px 80px; }
h1 { font-family: 'Spectral'; font-weight: 700; font-size: 2.1rem; line-height: 1.15; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 32px 0 12px; }
.lede { color: var(--muted); max-width: 62ch; margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }

/* forms */
label { display: block; font-weight: 500; margin: 0 0 6px; }
.field { margin-bottom: 18px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], select, textarea {
  width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: #2a2f3a; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 6px 12px; font-size: .87rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.alert { padding: 12px 14px; border-radius: 8px; margin: 0 0 20px; background: var(--bad-wash); color: var(--bad); }
.alert.ok { background: var(--ok-wash); color: var(--ok); }
.alert.info { background: var(--accent-wash); color: var(--accent-ink); }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.narrow { max-width: 560px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* tables / lists */
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
table.list th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--rule); background: #f7f8fa; }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
.status { font-weight: 600; font-size: .85rem; }
.status.done { color: var(--ok); } .status.blocked, .status.failed { color: var(--bad); } .status.processing, .status.queued { color: var(--accent-ink); }

/* usage meter */
.meter { display: flex; align-items: center; gap: 12px; }
.meter .track { flex: 1; height: 6px; background: var(--rule); border-radius: 99px; overflow: hidden; max-width: 240px; }
.meter .fill { height: 100%; background: var(--ink); }

/* sheet = a page of paper */
.sheet { background: #fff; box-shadow: 0 1px 0 var(--rule), 0 8px 24px -12px rgba(23,26,33,.35); border-radius: 2px; display: block; }

/* landing */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 28px 0 40px; }
.hero h1 { font-size: 3rem; line-height: 1.05; margin-bottom: 16px; }
.hero .lede { font-size: 1.1rem; }
.before-after { position: relative; height: 470px; }
.before-after figure { position: absolute; margin: 0; width: 58%; }
.before-after figure:first-child { left: 0; top: 40px; transform: rotate(-3deg); filter: saturate(0); opacity: .9; }
.before-after figure:last-child { right: 0; top: 0; }
.before-after figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.before-after figure:last-child { z-index: 2; }
.before-after figure:last-child figcaption { text-align: right; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--rule); padding-top: 28px; margin-top: 12px; }
.steps h3 { font-size: 1rem; margin: 0 0 4px; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.plan { padding: 22px 20px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.plan:last-child { border-right: none; }
.plan.current { background: var(--accent-wash); }
.plan h3 { margin: 0; font-size: 1.05rem; }
.plan .price { font-family: 'Spectral'; font-weight: 700; font-size: 1.7rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 8px; font-size: .9rem; color: var(--muted); flex: 1; }
.plan li { padding: 4px 0; border-bottom: 1px dashed var(--rule); }

/* template gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; }
.tpl { position: relative; cursor: pointer; }
.tpl input { position: absolute; opacity: 0; }
.tpl .pages { position: relative; height: 300px; }
.tpl .pages img { position: absolute; width: 74%; }
.tpl .pages img:first-child { left: 0; top: 0; z-index: 2; }
.tpl .pages img:last-child { right: 0; top: 18px; z-index: 1; }
.tpl .pending { height: 300px; display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--rule); border-radius: 4px; }
.tpl .name { font-weight: 600; margin-top: 12px; display: flex; justify-content: space-between; gap: 8px; }
.tpl .desc { color: var(--muted); font-size: .9rem; }
.tpl .lock { font-size: .8rem; font-weight: 600; color: var(--muted); }
.tpl:has(input:checked) .pages img:first-child { outline: 3px solid var(--accent); outline-offset: 3px; }
.tpl:has(input:checked) .name::after { content: "Selected"; color: var(--accent-ink); font-size: .85rem; }
.tpl.locked { opacity: .55; cursor: not-allowed; }
.tpl:has(input:focus-visible) .pages img:first-child { outline: 3px solid var(--accent); }

.dropzone { border: 1.5px dashed #aab1bc; border-radius: var(--radius); padding: 26px; text-align: center; background: #f8f9fb; }
.dropzone input { margin-top: 10px; }

/* document page */
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.seal { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; padding: 22px 24px; border-radius: var(--radius);
  background: var(--ok-wash); border: 1px solid #bfe0cd; margin: 24px 0; }
.seal .mark { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; }
.seal .mark svg { width: 30px; height: 30px; }
.seal .big { font-family: 'Spectral'; font-weight: 800; font-size: 1.75rem; line-height: 1.1; color: #0f4b30; }
.seal p { margin: 4px 0 0; color: #2c5c45; }
.seal.bad { background: var(--bad-wash); border-color: #f0c7c4; }
.seal.bad .mark { background: var(--bad); }
.seal.bad .big { color: #7d1a14; } .seal.bad p { color: #7d1a14; }
.film { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 18px; }
.film a { flex: 0 0 auto; text-decoration: none; color: var(--muted); font-size: .8rem; text-align: center; }
.film img { height: 340px; width: auto; aspect-ratio: 595 / 842; }
.progress { display: flex; gap: 10px; margin: 26px 0; }
.progress span { flex: 1; padding: 10px 12px; border-top: 3px solid var(--rule); color: var(--muted); font-size: .9rem; }
.progress span.on { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.progress span.past { border-color: var(--ink); color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface); padding: 14px 16px; }
.facts b { display: block; font-size: 1.25rem; }
.facts span { color: var(--muted); font-size: .85rem; }
.roles td.text { font-size: .9rem; max-width: 560px; }
.roles select { width: auto; padding: 5px 8px; font-size: .87rem; }
.roles tr.ai td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

@media (max-width: 860px) {
  .hero, .cols { grid-template-columns: 1fr; }
  .before-after { height: 380px; }
  .steps, .plans, .facts { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .seal .mark { animation: pop .5s ease-out both; }
  @keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}

/* footer, inline forms */
.foot { border-top: 1px solid var(--rule); background: var(--surface); }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .87rem; color: var(--muted); }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }
form.inline { display: inline; margin: 0; }
button.linkish { background: none; border: none; padding: 0; font: inherit; color: var(--accent-ink); text-decoration: underline; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
/* policy pages */
.legal { max-width: 72ch; }
.legal h2 { margin-top: 28px; }
.legal p, .legal li { color: #2d323c; }
.legal .missing { color: var(--bad); font-weight: 600; }
.billing-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main.page { flex: 1; width: 100%; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.warn { background: #c98a12; } .dot.bad { background: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.copyrow { display: flex; gap: 8px; }
.copyrow input { font-family: ui-monospace, monospace; font-size: .88rem; }

/* live progress bars */
.pbar { margin: 10px 0; }
.pbar .ptop { display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; margin-bottom: 4px; }
.pbar .ppct { font-weight: 600; font-variant-numeric: tabular-nums; }
.pbar .ptrack { height: 8px; background: var(--rule); border-radius: 99px; overflow: hidden; }
.pbar .pfill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s linear; }
.pbar.waiting .pfill { background: repeating-linear-gradient(45deg, var(--rule) 0 8px, transparent 8px 16px); width: 100% !important; }
.pbar.big { margin: 26px 0 6px; max-width: 720px; }
.pbar.big .ptop { font-size: 1rem; }
.pbar.big .ptrack { height: 12px; }
.pbar.small { min-width: 150px; margin: 2px 0; }
.picked { margin: 10px 0 0; padding-left: 20px; text-align: left; }
.order-input { width: 64px; text-align: center; font-weight: 600; }
table.list td.num { width: 90px; }
.combine-box { margin-top: 28px; }
