/* jifto report kit: the visual language of jifto's PDF report (Export > Report) for HTML reports
   agents write. Lato Light text, white A4 landscape pages, thin rules, captions "Top View | Equinox",
   stepped legends with values on the thresholds, distribution bars. Components, not a page sequence:
   the report's structure follows its question. Keep this file next to fonts/ and jifto_logo.svg. */

@font-face { font-family: "Lato"; font-weight: 200; src: url("fonts/Lato-ExtraLight.ttf"); }
@font-face { font-family: "Lato"; font-weight: 300; src: url("fonts/Lato-Light.ttf"); }
@font-face { font-family: "Lato"; font-weight: 400; src: url("fonts/Lato-Regular.ttf"); }
@font-face { font-family: "Lato"; font-weight: 500; src: url("fonts/Lato-Medium.ttf"); }
@font-face { font-family: "Lato"; font-weight: 700; src: url("fonts/Lato-Bold.ttf"); }

:root {
  --ink: #1d1d1b;
  --muted: #6f6f6b;
  --rule: #cfcfcb;
  --faint: #ececea;
  --paper: #ffffff;
  --desk: #eceae6;
  --accent: #e1a36d;          /* sunlight; per report: wind #70acd6, stormwater #4370b7, terrain #9d897c */
  --best: #2f7d4f;
  --page-w: 297mm;
  --page-h: 210mm;
  --margin: 16mm;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--desk); color: var(--ink); }
body { font-family: "Lato", system-ui, sans-serif; font-weight: 300; font-size: 9.5pt; line-height: 1.45; -webkit-font-smoothing: antialiased; }
b, strong { font-weight: 500; }

/* A page: one A4 landscape sheet. */
.page {
  position: relative; width: var(--page-w); min-height: var(--page-h); margin: 10mm auto;
  padding: var(--margin) var(--margin) 22mm; background: var(--paper);
  box-shadow: 0 1px 12px rgba(0, 0, 0, .10); break-after: page; overflow: hidden;
}
.page > footer {
  position: absolute; left: var(--margin); right: var(--margin); bottom: 9mm;
  border-top: .3mm solid var(--rule); padding-top: 2mm; font-size: 7pt; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.page > footer img { height: 4.2mm; }

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 21pt; }
h2 { font-size: 15pt; margin-bottom: 1.5mm; }
h3 { font-size: 10pt; font-weight: 500; margin-bottom: 1.5mm; }
p { margin: 0 0 2.5mm; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; margin-bottom: 6mm; }
.page-head .lead { font-size: 9pt; color: var(--muted); margin-top: 1.5mm; max-width: 160mm; }
.page-head .meta { text-align: right; font-size: 7.5pt; color: var(--muted); line-height: 1.5; white-space: nowrap; }
.page-head .north { width: 9mm; height: 9mm; display: block; margin-left: auto; margin-bottom: 1.5mm; }

/* The answer: the first thing a reader sees. */
.answer { font-size: 14pt; font-weight: 300; line-height: 1.32; max-width: 235mm; margin: 0 0 6mm; }
.answer b { font-weight: 500; }

/* Key figures: big numbers with a short label, separated by thin rules. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(46mm, 1fr)); margin: 0 0 6mm; border-top: .3mm solid var(--rule); }
.figure { padding: 3mm 4mm 3mm 0; border-right: .3mm solid var(--faint); }
.figure + .figure { padding-left: 4mm; }
.figure:last-child { border-right: 0; }
.figure .value { display: block; font-size: 20pt; font-weight: 300; line-height: 1.1; }
.figure .value small { font-size: 10pt; color: var(--muted); }
.figure .label { display: block; font-size: 7.5pt; color: var(--muted); margin-top: 1mm; }
.figure.good .value { color: var(--best); }

/* Comparison table: options or routes against criteria; the best value of a row in green. */
table.compare { width: 100%; border-collapse: collapse; font-size: 8.5pt; margin: 0 0 6mm; }
table.compare th { font-weight: 500; text-align: right; padding: 0 3mm 1.6mm; border-bottom: .3mm solid var(--ink); white-space: nowrap; vertical-align: bottom; }
table.compare th:first-child, table.compare td:first-child { text-align: left; padding-left: 0; }
table.compare td { text-align: right; padding: 1.5mm 3mm; border-bottom: .3mm solid var(--faint); font-variant-numeric: tabular-nums; vertical-align: top; }
table.compare td:first-child { min-width: 58mm; }
table.compare td:first-child .unit { display: block; font-size: 7pt; max-width: 75mm; margin-top: .4mm; line-height: 1.3; }
table.compare td.best { color: var(--best); font-weight: 500; }
table.compare td.worst { color: #a5402a; }
table.compare tr.chosen td { background: #f6f5f2; }
table.compare .unit { color: var(--muted); font-weight: 300; }
table.compare caption { caption-side: bottom; text-align: left; font-size: 7pt; color: var(--muted); padding-top: 1.5mm; }

/* Captures in a grid, captioned the report's way: "Top View | Equinox". */
.grid { display: grid; gap: 5mm 6mm; margin-bottom: 4mm; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.with-rowheads { grid-template-columns: 24mm repeat(3, 1fr); align-items: start; }
/* A plate of small captures beside a side column (legend, notes): sized so three rows fit a page. */
.plate { display: grid; grid-template-columns: auto 1fr; gap: 9mm; align-items: start; }
.plate .grid.with-rowheads { grid-template-columns: 20mm repeat(3, 38mm); gap: 2.5mm 4mm; margin: 0; }
.plate figure.capture figcaption { font-size: 7pt; margin-top: .8mm; }
.plate .side { padding-top: 7mm; }
.plate .side .legend { max-width: none; }
.grid .rowhead { font-size: 8.5pt; font-weight: 500; padding-top: 2mm; }
.grid .rowhead span { display: block; font-weight: 300; color: var(--muted); font-size: 7.5pt; margin-top: 1mm; }
.grid .colhead { font-size: 8.5pt; }
.grid .colhead b { font-weight: 500; }
figure.capture { margin: 0; }
figure.capture img { display: block; width: 100%; height: auto; }
figure.capture figcaption { font-size: 8pt; margin-top: 1.5mm; color: var(--ink); }
figure.capture figcaption b { font-weight: 500; }
figure.capture figcaption .stat { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }
figure.capture.chosen img { outline: .6mm solid var(--best); outline-offset: 1mm; }
/* One large view on a page: centred, low enough to leave room for a method block under it. */
figure.capture.hero { max-width: 210mm; margin: 0 auto 2mm; }
figure.capture.hero img { max-height: 88mm; object-fit: contain; }

/* Two columns of text, as the report's Key Statistics. */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; }
.columns.wide-left { grid-template-columns: 3fr 2fr; }
.plus { list-style: none; padding: 0; margin: 0; }
.plus li { position: relative; padding-left: 6mm; margin-bottom: 2.5mm; }
.plus li::before { content: "+"; position: absolute; left: 0; top: -.5mm; font-size: 12pt; font-weight: 300; }

/* Legend: drawn by jiftoLegend from a capture's legend object. */
.legend { width: 100%; max-width: 110mm; margin: 2mm 0 4mm; }
.legend .legend-title { font-size: 8pt; font-weight: 500; margin-bottom: 1.2mm; }
.legend .legend-strip { display: flex; height: 3.6mm; border-radius: 1.8mm; overflow: hidden; }
.legend .legend-strip span { display: block; height: 100%; }
.legend .legend-ticks { position: relative; height: 4mm; font-size: 6.5pt; color: var(--muted); margin-top: .8mm; }
.legend .legend-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.legend .legend-ticks span.first { transform: none; }
.legend .legend-ticks span.last { transform: translateX(-100%); }
.legend .legend-subs { display: flex; justify-content: space-between; font-size: 6.5pt; color: var(--muted); margin-top: .6mm; }
.legend .legend-subs span { white-space: pre-line; text-align: center; flex: 1; }
.legend .legend-subs span:first-child { text-align: left; }
.legend .legend-subs span:last-child { text-align: right; }

/* Distribution bar: drawn by jiftoBar from statistics rows (share_pct, color). */
.bar { margin: 1mm 0 3mm; }
.bar .bar-label { font-size: 7.5pt; margin-bottom: .8mm; }
.bar .bar-strip { display: flex; height: 2.6mm; border-radius: 1.3mm; overflow: hidden; background: var(--faint); }
.bar .bar-strip span { display: block; height: 100%; }
.bar .bar-values { position: relative; height: 3.6mm; font-size: 6.5pt; color: var(--muted); margin-top: .6mm; }
.bar .bar-values span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* Small print: method and limits. */
.method { font-size: 8pt; color: var(--muted); columns: 2; column-gap: 12mm; margin-top: 5mm; }
.method h3 { color: var(--ink); break-after: avoid; }
.method p { break-inside: avoid; }
.note { font-size: 7.5pt; color: var(--muted); }

@media print {
  html, body { background: none; }
  .page { margin: 0; box-shadow: none; }
  @page { size: A4 landscape; margin: 0; }
}
