/* spool2pdf
   No web fonts, no framework, no external requests. The audience is often on a
   locked-down corporate browser or a slow VPN into a data centre, and a page
   that renders instantly is itself an argument for the service. */

:root {
  --paper:      #fbfaf7;
  --paper-2:    #f3f1ea;
  --ink:        #191917;
  --ink-muted:  #5d5c54;
  --rule:       #e2ded3;
  --accent:     #0d6b5b;
  --accent-2:   #0a5548;
  --toner:      #23241f;
  --bar:        #e8f0e4;   /* greenbar stationery */
  --warn:       #8a5a00;
  --radius:     6px;
  --measure:    68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #131519;
    --paper-2:   #191c21;
    --ink:       #e9e7e1;
    --ink-muted: #9b998f;
    --rule:      #2a2e35;
    --accent:    #52d3b6;
    --accent-2:  #7ee0c9;
    --toner:     #0d0f12;
    --bar:       #1b2420;
    --warn:      #d9a441;
  }
}

:root[data-theme="dark"] {
  --paper:     #131519;
  --paper-2:   #191c21;
  --ink:       #e9e7e1;
  --ink-muted: #9b998f;
  --rule:      #2a2e35;
  --accent:    #52d3b6;
  --accent-2:  #7ee0c9;
  --toner:     #0d0f12;
  --bar:       #1b2420;
  --warn:      #d9a441;
}

:root[data-theme="light"] {
  --paper:     #fbfaf7;
  --paper-2:   #f3f1ea;
  --ink:       #191917;
  --ink-muted: #5d5c54;
  --rule:      #e2ded3;
  --accent:    #0d6b5b;
  --accent-2:  #0a5548;
  --toner:     #23241f;
  --bar:       #e8f0e4;
  --warn:      #8a5a00;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

code, pre, .mono, textarea, .grid-sample {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas,
               "DejaVu Sans Mono", monospace;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1em; max-width: var(--measure); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

section { padding: 64px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }
.lead { color: var(--ink-muted); font-size: 1.08rem; }
.eyebrow {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0 0 .6em; font-weight: 600;
}

/* --- header --------------------------------------------------------- */

header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
header.site .wrap {
  display: flex; align-items: center; gap: 24px; height: 58px;
}
.brand {
  font-weight: 700; letter-spacing: -.02em; color: var(--ink);
  text-decoration: none; font-size: 1.06rem; white-space: nowrap;
}
.brand .dot { color: var(--accent); }
header.site nav { margin-left: auto; display: flex; gap: 20px; align-items: center; }
header.site nav a { color: var(--ink-muted); text-decoration: none; font-size: .93rem; }
header.site nav a:hover { color: var(--ink); }
@media (max-width: 640px) { header.site nav a.hide-sm { display: none; } }

/* --- buttons -------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .62em 1.1em; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--accent-2); color: var(--paper); }
.btn-ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* --- hero ----------------------------------------------------------- */

.hero { padding: 68px 0 40px; }
.hero h1 { max-width: 18ch; }
.hero .lead { max-width: 56ch; font-size: 1.15rem; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { margin-top: 16px; font-size: .88rem; color: var(--ink-muted); }

/* --- before / after ------------------------------------------------- */

.ba {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px;
  align-items: center; margin-top: 8px;
}
@media (max-width: 780px) {
  .ba { grid-template-columns: 1fr; }
  .ba .arrow { transform: rotate(90deg); justify-self: center; }
}
.ba figure { margin: 0; }
.ba figcaption {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-muted); margin-bottom: 8px; font-weight: 600;
}
.arrow { color: var(--ink-muted); font-size: 1.5rem; }
.panel {
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-2); overflow: hidden;
}
.panel svg { display: block; width: 100%; height: auto; }

/* The before/after panels are space-padded fixed-width text, so runs of spaces
   are the layout. SVG collapses whitespace by default, and xml:space="preserve"
   is deprecated in SVG 2, so browsers honour the CSS property instead. Without
   this the illustration that claims columns stay aligned loses its own. */
.panel svg text { white-space: pre; }

/* --- stats ---------------------------------------------------------- */

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
}
.facts div { background: var(--paper); padding: 18px 16px; }
.facts b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.facts span { font-size: .84rem; color: var(--ink-muted); }

/* --- feature grid --------------------------------------------------- */

.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px; margin-top: 28px;
}
.card {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 20px; background: var(--paper-2);
}
.card h3 { margin-bottom: .35em; }
.card p { font-size: .93rem; color: var(--ink-muted); margin-bottom: .8em; }
.card a { font-size: .9rem; font-weight: 600; text-decoration: none; }
.card a::after { content: " \2192"; }

/* --- code ----------------------------------------------------------- */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: -1px; }
.tabs button {
  font: inherit; font-size: .85rem; padding: .45em .9em; cursor: pointer;
  background: transparent; color: var(--ink-muted);
  border: 1px solid transparent; border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tabs button[aria-selected="true"] {
  background: var(--toner); color: #e9e7e1; border-color: var(--toner);
}
pre {
  margin: 0; background: var(--toner); color: #e9e7e1;
  padding: 18px; border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow-x: auto; font-size: .875rem; line-height: 1.55;
}
pre .c { color: #8d9a94; }
pre .s { color: #a8d5c6; }
pre .k { color: #7fd1b9; }
:not(pre) > code {
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: .1em .38em; border-radius: 4px; font-size: .9em;
}

/* --- demo ----------------------------------------------------------- */

.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; } }
textarea, select, input[type="text"], input[type="number"] {
  width: 100%; font-size: .9rem; padding: .5em .6em; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius); font-family: inherit;
}
textarea { min-height: 240px; resize: vertical; white-space: pre; overflow-wrap: normal; overflow-x: auto; }

/* The demo holds fixed-width text, so it has to be shown in a fixed-width font.
   The generic form-control rule above sets font-family:inherit, which the
   contact form wants, and being later in the file it was beating the monospace
   rule at the top. This has to win over both. */
textarea#doc {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas,
               "DejaVu Sans Mono", monospace;
  font-size: .78rem; line-height: 1.35; min-height: 300px;
}
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.controls label { font-size: .78rem; color: var(--ink-muted); display: block; margin-bottom: 3px; }
.preview {
  border: 1px solid var(--rule); border-radius: var(--radius);
  min-height: 300px; background: var(--paper-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: .9rem; text-align: center; padding: 20px;
}
.preview iframe { width: 100%; height: 520px; border: 0; border-radius: var(--radius); }
.notice {
  border-left: 3px solid var(--warn); background: var(--paper-2);
  padding: 12px 14px; font-size: .88rem; border-radius: 0 var(--radius) var(--radius) 0;
}

/* --- contact form ----------------------------------------------------- */

.contact-form { max-width: 640px; margin-top: 26px; }
.contact-form .row2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 620px) { .contact-form .row2 { grid-template-columns: 1fr; } }
.contact-form .field { margin-bottom: 14px; }
.contact-form label {
  display: block; font-size: .8rem; color: var(--ink-muted);
  margin-bottom: 4px; font-weight: 600;
}
.contact-form input[type="email"],
.contact-form input[type="text"],
.contact-form select,
.contact-form textarea {
  width: 100%; font-size: .95rem; padding: .55em .7em;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-family: inherit;
}
.contact-form textarea { min-height: 130px; resize: vertical; white-space: pre-wrap; }
.contact-form input[type="file"] {
  width: 100%; font-size: .85rem; padding: .45em;
  background: var(--paper); color: var(--ink);
  border: 1px dashed var(--rule); border-radius: var(--radius);
  font-family: inherit;
}
.contact-form input[type="file"]:hover { border-color: var(--accent); }
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
/* Honeypot. Not display:none, which some bots detect and skip. */
.contact-form .trap {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden;
}
.form-note { font-size: .86rem; color: var(--ink-muted); margin-top: 10px; }
.form-result { margin-top: 14px; font-size: .95rem; }
.form-result.ok { color: var(--accent); font-weight: 600; }
.form-result.err { color: #c0392b; }
@media (prefers-color-scheme: dark) { .form-result.err { color: #ff8a7a; } }

/* --- use cases / faq ------------------------------------------------- */

.who { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; margin-top: 24px; }
.who h3 { font-size: .98rem; }
.who p { font-size: .92rem; color: var(--ink-muted); }

details {
  border-bottom: 1px solid var(--rule); padding: 14px 0;
}
details summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; }
details[open] summary::after { content: "\2212"; }
details p { margin: .8em 0 0; color: var(--ink-muted); font-size: .95rem; }

/* --- pricing --------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 26px; }
.plan { border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; background: var(--paper-2); }
.plan.featured { border-color: var(--accent); }
.plan .price { font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; }
.plan ul { margin: 14px 0 0; padding-left: 1.1em; font-size: .9rem; color: var(--ink-muted); }
.plan li { margin-bottom: .35em; }

/* --- footer ---------------------------------------------------------- */

footer.site { border-top: 1px solid var(--rule); padding: 40px 0; font-size: .9rem; }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 26px; }
footer.site h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); margin: 0 0 .7em; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: .4em; }
footer.site a { color: var(--ink-muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
.colophon { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ink-muted); font-size: .84rem; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: var(--paper); padding: .6em 1em; z-index: 50;
}
.skip:focus { left: 8px; top: 8px; }
