@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #4B3BD1; --navy-light: #EFECFF; --ink: #16151C; --ink2: #3E3D48; --muted: #6E6C78;
  --warm: #F8F6F2; --cool: #F0EDE7; --sun: #F6E27A; --sun-soft: #FBF3C4; --line: #E4E0D8;
  --red: #E0605A; --amber: #E8A23A; --green: #3BA776;
}
@page { size: A4; margin: 14mm 13mm 16mm 13mm; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Manrope, Inter, sans-serif; color: var(--ink); font-size: 9.6pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 7.4pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pill.navy { background: var(--navy-light); color: var(--navy); }
.pill.sun { background: var(--sun); color: var(--ink); }
.pill.dark { background: var(--ink); color: #fff; }
.who { font-size: 8pt; color: var(--muted); font-weight: 600; }
.who b { color: var(--ink); }

.hero { background: var(--warm); border-radius: 18px; padding: 20px 22px 18px; margin-bottom: 16px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--navy-light); opacity: .8; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 22pt; font-weight: 800; line-height: 1.1; margin: 8px 0 8px; max-width: 150mm; }
.hero .lede { font-size: 10pt; color: var(--ink2); max-width: 160mm; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.meta span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; font-size: 7.6pt; color: var(--ink2); font-weight: 600; }
.meta span b { color: var(--navy); font-weight: 700; }

.label { font-size: 7.4pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin-bottom: 6px; }
h2 { font-size: 13pt; font-weight: 800; margin-bottom: 8px; }
.section { margin-bottom: 16px; break-inside: avoid; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; break-inside: avoid; }
.card.tint { background: var(--warm); border-color: transparent; }
.card.sun { background: var(--sun-soft); border-color: transparent; }
.card.navy { background: var(--navy-light); border-color: transparent; }

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 8.4pt; }
th { text-align: left; font-size: 7pt; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1.5px solid var(--ink); }
td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink2); }
td b, td strong { color: var(--ink); }
tr { break-inside: avoid; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.red { background: var(--red); } .dot.amber { background: var(--amber); } .dot.green { background: var(--green); } .dot.navy { background: var(--navy); }
.tag { display: inline-block; font-size: 6.8pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--cool); color: var(--ink2); }
.tag.navy { background: var(--navy-light); color: var(--navy); }
.small { font-size: 8pt; color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 8pt; background: var(--cool); padding: 1px 5px; border-radius: 4px; }
.page-break { break-before: page; }
.note { border-left: 3px solid var(--sun); padding: 6px 10px; background: var(--sun-soft); border-radius: 0 10px 10px 0; font-size: 8.4pt; color: var(--ink2); }

/* ---- web view ---- */
.toolbar { display: none; }
@media screen {
  html { background: #F0EDE7; }
  .sheet { display: block; max-width: 210mm; margin: 0 auto 48px; padding: 14mm 13mm; background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(22,21,28,.10); }
  .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; max-width: 210mm; margin: 0 auto; padding: 18px 4px 14px; font-family: Manrope, sans-serif; }
  .toolbar a, .toolbar button { font: 600 13px Manrope, sans-serif; color: #16151C; text-decoration: none; background: none; border: 0; cursor: pointer; }
  .toolbar button { background: #16151C; color: #fff; padding: 10px 18px; border-radius: 999px; }
  .toolbar button:hover { background: #4B3BD1; }
  .web-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 7.5pt; color: var(--muted); }
}
html.embed, html.embed body { background: #fff; overflow: hidden; }
html.embed .toolbar, html.embed .web-foot { display: none !important; }
html.embed .sheet { margin: 0; border-radius: 0; box-shadow: none; max-width: none; width: 794px; }
@media screen and (max-width: 700px) {
  .sheet { margin: 0 0 32px; padding: 18px 16px; border-radius: 0; }
  .toolbar { padding: 14px 16px 10px; }
  .grid2, .grid3, .dec, .us, .stats, .conn, .rhythm, .arch { grid-template-columns: 1fr !important; }
  .arch .link { transform: rotate(90deg); height: 16px; }
  .flow { flex-direction: column; } .flow .arrow { transform: rotate(90deg); height: 14px; width: auto; }
  .hero h1 { font-size: 18pt; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 6px; }
  table { font-size: 7.6pt; } th, td { padding: 5px 4px; }
}
@media print { .toolbar, .web-foot { display: none !important; } .sheet { display: block; } }
