/* Lucidblock sample reports - document style (light, printable) */

:root {
  --ink: #0b0c0f;
  --text: #15171c;
  --text-2: #4d5360;
  --text-3: #858b97;
  --line: #e4e5e9;
  --paper: #ffffff;
  --desk: #f1f0ec;
  --accent: #e6007a;
  --good: #0f8a55;
  --warn: #b26a00;
  --bad: #c6283a;
  --sans: "Geist", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--desk);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f3f3f5;
}

/* Top bar (never part of the report) */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.topbar .in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 9px 20px;
}

.topbar .mockflag {
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  flex: 1;
}

.topbar nav a {
  padding: 4px 9px;
  border-radius: 6px;
  color: #a9aebb;
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav a.on {
  color: #fff;
  background: #1d2027;
}

.topbar button {
  padding: 5px 11px;
  border: 1px solid #3a3f4b;
  border-radius: 7px;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.pubbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 10px 20px;
  background: var(--ink);
  color: #a9aebb;
  font-size: 13px;
}

.pubbar a {
  color: #fff;
  text-decoration: none;
}

.pubbar .pdf {
  padding: 5px 12px;
  border: 1px solid #3a3f4b;
  border-radius: 7px;
}

/* Document */

.doc {
  max-width: 900px;
  margin: 28px auto 60px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.cover {
  padding: 40px 56px 36px;
  background: var(--ink);
  color: #fff;
}

.cover img {
  display: block;
  margin-left: -4px;
}

.cover .kind {
  margin-top: 44px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff4da6;
}

.sampleflag {
  margin-left: 14px;
  padding: 2px 9px;
  border: 1px solid #ff4da6;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.cover h1 {
  margin-top: 10px;
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.cover .meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid #262a33;
}

.cover .meta label,
.kpis span,
.ilabel,
.vlabel {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cover .meta label {
  margin-bottom: 4px;
  color: #7d8392;
}

.cover .meta span {
  font-size: 14px;
}

section,
.verdict,
.kpis,
.doc > .internal,
.docfoot {
  margin: 0 56px;
}

section {
  padding: 30px 0 6px;
  border-top: 1px solid var(--line);
}

section:first-of-type {
  border-top: 0;
}

h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

h4 {
  margin-bottom: 6px;
  font-size: 13.5px;
}

p,
ul,
ol {
  margin-bottom: 14px;
  color: var(--text-2);
}

p.lead {
  padding-top: 28px;
  font-size: 17px;
  color: var(--text);
}

ul,
ol {
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

li b,
p b {
  color: var(--text);
  font-weight: 600;
}

/* Verdict + KPIs */

.verdict {
  margin-top: 36px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--text-3);
  border-radius: 8px;
  background: #fafafb;
}

.verdict.good {
  border-left-color: var(--good);
}

.verdict.warn {
  border-left-color: var(--warn);
}

.verdict.bad {
  border-left-color: var(--bad);
}

.vlabel {
  margin-bottom: 8px;
  color: var(--text-3);
}

.verdict h3 {
  color: var(--text);
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.verdict p {
  margin: 0;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 18px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

section .kpis {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 16px;
}

.kpis div {
  padding: 16px 18px;
  background: var(--paper);
}

.kpis strong {
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.kpis span {
  margin-top: 6px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: none;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.35;
}

.good {
  color: var(--good);
}

.warn {
  color: var(--warn);
}

.bad {
  color: var(--bad);
}

/* Tables */

table.t {
  width: 100%;
  margin-bottom: 18px;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.t th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--text);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--text-3);
}

table.t td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text-2);
}

table.t td:first-child {
  color: var(--text);
}

table.t.num td:not(:first-child):not(:last-child) {
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.tag.good {
  background: #e4f5ec;
}

.tag.warn {
  background: #fbefdb;
}

.tag.bad {
  background: #fbe6e8;
}

/* Bars */

.bars {
  display: grid;
  gap: 9px;
  margin: 4px 0 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr 66px;
  gap: 14px;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-2);
}

.bar {
  height: 8px;
  border-radius: 8px;
  background: #eeeef1;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: #9aa0ad;
}

.bar i.good {
  background: var(--good);
}

.bar i.warn {
  background: var(--warn);
}

.bar i.bad {
  background: var(--bad);
}

.bar i.a {
  background: var(--accent);
}

.bar-row b {
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
}

/* Charts */

.chart {
  margin: 6px 0 18px;
  padding: 14px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart text {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--text-3);
}

.chart .grid {
  stroke: #ececf0;
  stroke-width: 1;
}

.chart .ln {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
}

.chart .a {
  stroke: var(--accent);
}

.chart .a-fill {
  fill: rgba(230, 0, 122, 0.08);
}

.chart .b {
  stroke: #15171c;
  stroke-dasharray: 5 4;
}

.chart .c {
  stroke: var(--good);
}

.chart figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}

.chart figcaption i {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: middle;
  background: var(--text-3);
}

.chart figcaption i.a {
  background: var(--accent);
}

.chart figcaption i.b {
  background: #15171c;
}

.chart figcaption i.c {
  background: var(--good);
}

/* Funding tree */

.tree {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px;
  align-items: center;
  margin: 4px 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.tree .root {
  padding: 12px 14px;
  border: 1px solid var(--bad);
  border-radius: 8px;
  background: #fdf3f4;
}

.tree span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 12px;
}

.tree .leaves {
  display: grid;
  gap: 6px;
  padding-left: 22px;
  border-left: 2px solid var(--bad);
}

.tree .leaf {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tree .leaf span {
  margin: 0;
}

.tree .leaf.more {
  border-style: dashed;
  color: var(--text-3);
}

/* Internal notes */

.internal {
  margin-top: 4px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px dashed #d9b64a;
  border-radius: 8px;
  background: #fffaf0;
  font-size: 13px;
}

.doc > .internal {
  margin-top: 30px;
  margin-bottom: 8px;
}

.ilabel {
  margin-bottom: 8px;
  color: #8a6a00;
}

.internal p,
.internal ul {
  margin: 8px 0 0;
  color: #4a4330;
}

.internal li {
  margin-bottom: 4px;
}

.itable {
  width: 100%;
  border-collapse: collapse;
}

.itable th {
  padding: 4px 8px 6px 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: #8a6a00;
}

.itable td {
  padding: 6px 10px 6px 0;
  border-top: 1px solid #f0e2b8;
  vertical-align: top;
  color: #4a4330;
}

.itable td:nth-child(2) {
  white-space: nowrap;
}

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chip {
  display: inline-block;
  margin-right: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  background: #6b7280;
}

.chip.have {
  background: #0f8a55;
}

.chip.feed {
  background: #2563eb;
}

.chip.build {
  background: #52525b;
}

.chip.ext {
  background: #b26a00;
}

.chip.gap {
  background: #c6283a;
}

.chip.client {
  background: #7c3aed;
}

body.clean .internal {
  display: none;
}

.docfoot {
  margin-top: 30px;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
}

@media (max-width: 760px) {
  section,
  .verdict,
  .kpis,
  .doc > .internal,
  .docfoot {
    margin-left: 20px;
    margin-right: 20px;
  }
  .cover {
    padding: 28px 20px;
  }
  .cover h1 {
    font-size: 28px;
  }
  .cover .meta,
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .cols,
  .tree {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 1fr 70px 50px;
  }
  table.t {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  body {
    background: #fff;
  }
  .topbar,
  .pubbar {
    display: none;
  }
  .doc {
    max-width: none;
    margin: 0;
    border: 0;
    box-shadow: none;
  }
  .cover {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .verdict,
  .kpis,
  .chart,
  .tree,
  .bar-row,
  table.t tr {
    break-inside: avoid;
  }
  h2 {
    break-after: avoid;
  }
}
