/* Print styles for the Docstore brochure (#1039). A4, printed by Chromium (build.mjs). */
@page {
  size: A4;
  margin: 16mm 16mm 18mm;
  @bottom-left { content: "Docstore"; font: 8pt "Noto Sans", sans-serif; color: #64748b; }
  @bottom-right { content: counter(page) " / " counter(pages); font: 8pt "Noto Sans", sans-serif; color: #64748b; }
}
@page cover { margin: 0; @bottom-left { content: none } @bottom-right { content: none } }

:root {
  --ink: #0f172a;
  --muted: #475569;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --brand-soft: #eef2ff;
  --night: #0f172a;
}
* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; font: 9.6pt/1.5 "Noto Sans", "Liberation Sans", sans-serif; color: var(--ink); }

h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 17pt; font-weight: 700; margin: 0 0 2.5mm; letter-spacing: -0.01em; }
h2 + .lede { margin-top: 0; }
h3 { font-size: 10.5pt; font-weight: 700; margin: 0 0 1.5mm; color: var(--brand-dark); }
p { margin: 0 0 2.5mm; }
.lede { font-size: 11pt; color: var(--muted); margin-bottom: 6mm; max-width: 160mm; }
.small { font-size: 8.4pt; color: var(--muted); }
section { break-before: page; }
section.flow { break-before: auto; margin-top: 9mm; }
.eyebrow { font-size: 8pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand); margin-bottom: 1.5mm; }

/* Cover */
.cover { page: cover; height: 297mm; background: var(--night); color: #fff; padding: 22mm 18mm 0; display: flex; flex-direction: column; break-after: page; }
.cover .mark { display: flex; align-items: center; gap: 3mm; font-weight: 700; font-size: 13pt; }
.cover .mark span { width: 9mm; height: 9mm; border-radius: 2.2mm; background: var(--brand); display: grid; place-items: center; font-size: 12pt; }
.cover h1 { font-size: 32pt; font-weight: 800; letter-spacing: -0.02em; margin: 18mm 0 4mm; max-width: 150mm; }
.cover .sub { font-size: 13pt; color: #cbd5e1; max-width: 150mm; margin-bottom: 9mm; }
.cover ul { list-style: none; padding: 0; margin: 0 0 12mm; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5mm; }
.cover li { border-top: 2px solid var(--brand); padding-top: 2.5mm; font-size: 9.4pt; color: #e2e8f0; }
.cover li b { display: block; color: #fff; font-size: 10.5pt; margin-bottom: 1mm; }
.cover .hero { margin-top: auto; border-radius: 3mm 3mm 0 0; overflow: hidden; box-shadow: 0 -2mm 12mm rgba(0,0,0,.45); }
.cover .hero img { display: block; width: 100%; }

/* Feature lists */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm 9mm; }
.card { break-inside: avoid; }
.card ul { margin: 0; padding-left: 4.2mm; }
.card li { margin-bottom: 1.1mm; }
.card li::marker { color: var(--brand); }

/* Pipeline strip */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2.5mm; margin: 0 0 7mm; }
.pipeline div { background: var(--brand-soft); border-radius: 2mm; padding: 3mm; font-size: 8.4pt; color: var(--muted); position: relative; }
.pipeline b { display: block; color: var(--brand-dark); font-size: 9.4pt; margin-bottom: 0.8mm; }

/* Screenshots */
figure { margin: 0 0 6mm; break-inside: avoid; }
/* Capped so two screenshots and their captions share an A4 page. */
figure img { display: block; max-width: 100%; max-height: 102mm; margin: 0 auto; border: 1px solid var(--line); border-radius: 2mm; box-shadow: 0 1mm 4mm rgba(15,23,42,.12); }
figcaption { max-width: 164mm; margin-left: auto; margin-right: auto; }
figcaption { margin-top: 2.2mm; font-size: 8.8pt; color: var(--muted); }
figcaption b { color: var(--ink); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1mm 0 5mm; font-size: 8.9pt; break-inside: avoid; }
th, td { text-align: left; padding: 1.8mm 2.4mm; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: #f8fafc; font-weight: 700; color: var(--muted); font-size: 8pt; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1.5px solid #cbd5e1; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody th { font-weight: 600; }

.note { background: #f8fafc; border-left: 1.2mm solid var(--brand); padding: 3mm 4mm; margin: 2mm 0 5mm; font-size: 9pt; break-inside: avoid; }
.note.warn { border-left-color: #d97706; background: #fffbeb; }
.sources { font-size: 7.6pt; color: var(--muted); padding-left: 4mm; }
.sources li { margin-bottom: 0.6mm; word-break: break-all; }

/* A heading never ends a page, and a heading with its table moves as one. */
h2, h3 { break-after: avoid; }
.keep { break-inside: avoid; }
/* The local-model page carries more than the others; tighter so it stays on one sheet. */
.compact table { font-size: 8.4pt; margin-bottom: 3.5mm; }
.compact th, .compact td { padding: 1.3mm 2.2mm; }
.compact .lede { margin-bottom: 4mm; }
.compact p { margin-bottom: 2mm; }

/* --- The web page (https://docstore.lucidlogic.com, #1205) ------------------------------------
   Everything below is screen-only, so printing (and so Docstore.pdf) is unchanged. The A4 rules
   above size things in mm and pt; here the same content becomes a centred, readable page that
   folds to one column on a phone. */
.webbar { display: none; }

@media screen {
  html { scroll-behavior: smooth; }
  body { background: #f1f5f9; font-size: 16px; line-height: 1.6; }

  .webbar { display: flex; position: sticky; top: 0; z-index: 10; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px max(16px, calc((100% - 1000px) / 2)); background: rgba(15, 23, 42, .96); color: #fff; }
  .webbar .mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
  .webbar .mark span { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); display: grid; place-items: center; font-size: 15px; }
  .webbar a { background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
  .webbar a:hover { background: var(--brand-dark); }

  .cover { height: auto; padding: 56px max(16px, calc((100% - 1000px) / 2)) 0; }
  .cover .mark { display: none; }
  .cover h1 { margin-top: 0; font-size: clamp(30px, 6vw, 48px); max-width: 760px; }
  .cover .sub { font-size: 19px; max-width: 760px; }
  .cover ul { margin-bottom: 40px; }
  .cover li { font-size: 15px; }
  .cover li b { font-size: 17px; }

  body > section { max-width: 1000px; margin: 28px auto; padding: 44px 48px; background: #fff; border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
  section.flow { margin-top: 44px; }
  h2 { font-size: 28px; margin-bottom: 10px; }
  h3 { font-size: 18px; margin-bottom: 6px; }
  .eyebrow { font-size: 13px; margin-bottom: 6px; }
  .lede { font-size: 18px; max-width: 760px; margin-bottom: 24px; }
  .small { font-size: 14px; }
  .pipeline div { font-size: 14px; padding: 12px; }
  .pipeline b { font-size: 15px; }
  figure { margin-bottom: 32px; }
  figure img { max-height: none; }
  figcaption { font-size: 15px; max-width: none; }
  table, .compact table { font-size: 15px; }
  thead th { font-size: 12px; }
  th, td, .compact th, .compact td { padding: 8px 10px; }
  .note { font-size: 15px; padding: 14px 18px; }
  .sources { font-size: 13px; }
}

@media screen and (max-width: 720px) {
  .cols, .pipeline, .cover ul { grid-template-columns: 1fr; }
  body > section { margin: 0 0 12px; padding: 28px 18px; border-radius: 0; }
  /* Wide tables scroll sideways inside the page rather than widening it or crushing their
     text columns to a word per line. */
  table { display: block; overflow-x: auto; }
  /* A cell's width, unlike min-width, is honoured by table layout. */
  td:last-child:not(.num) { width: 15em; min-width: 15em; }
  .cover { padding-top: 36px; }
}
