/* contextowners.com: layout and brand primitives.
   brand.css is lazulix.co's token file, copied unchanged
   (lazulix_site/static/css/brand.css). The primitives below (wordmark, accent
   bar, section label, card, badge, column header, compare table, takeaway,
   buttons, header, footer) are lifted from lazulix.co's site.css; the
   manifesto's own parts follow them. Colours, radii and shadows come from the
   tokens only: see docs/BRAND.md before adding anything here. */

/* ---- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--lz-heading); margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

/* Small blue text on the page background uses blue-strong (7.1:1); Lazulix
   Blue is kept for white surfaces, where it passes AA. */
a { color: var(--lz-blue-strong); text-underline-offset: 3px; }
.card a { color: var(--lz-blue); }

:focus-visible { outline: 2px solid var(--lz-blue); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--lz-surface); color: var(--lz-ink); padding: 8px 16px;
  border-radius: var(--lz-radius-md); border: 1px solid var(--lz-border);
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.icon { width: 18px; height: 18px; flex: none; }

/* ---- Wordmark (BRAND.md section 4): footer only on this site --------------- */

.lz-wordmark {
  position: relative;
  display: inline-block;
  font-family: var(--lz-font);
  font-weight: 300;
  color: var(--lz-ink-2);
  line-height: 1;
  letter-spacing: 0.005em;
  padding-bottom: 0.17em;
  text-decoration: none;
}
.lz-wordmark-z {
  font-weight: 800;
  font-size: 1.1em;
  line-height: 0;
  background: var(--lz-gradient-z);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lz-wordmark::after {
  content: "";
  position: absolute;
  left: -0.66em;
  right: -0.04em;
  bottom: 0;
  height: 0.12em;
  background: var(--lz-gradient);
}
/* Left-aligned wordmarks leave room for the underline's overhang. */
.lz-wordmark--footer { font-size: 24px; margin-left: 0.75em; }

/* ---- Typography ------------------------------------------------------------ */

.display {
  font-size: clamp(2.25rem, 5.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 24ch;
}
.hl { color: var(--lz-blue); }
h3, .h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }

.lede { font-size: 20px; line-height: 1.5; max-width: 40em; }
.prose { max-width: 46rem; }
.prose p { font-size: 18px; line-height: 1.6; }
.prose p + p { margin-top: 16px; }
.prose--after-pull { margin-top: 32px; }
.prose--after-card { margin-top: 32px; }
.muted { color: var(--lz-text-muted); }
strong { color: var(--lz-ink); font-weight: 700; }

/* The opening line of a section: larger, ink. */
.prose p.statement {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 600; line-height: 1.4;
  color: var(--lz-ink); letter-spacing: -0.01em;
}
.prose p.statement + p { margin-top: 20px; }

/* One contrast line set large, between a section's text and its cards. */
.big-line {
  margin: 40px 0;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.15; color: var(--lz-ink);
}

/* Eyebrow + hairline (SectionLabel). Here it is each section's h2. */
.section-label {
  display: flex; align-items: center; gap: 16px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 1.4; color: var(--lz-blue-strong);
  margin-bottom: 24px;
}
.section-label::after { content: ""; flex: 1; min-width: 24px; height: 1px; background: var(--lz-border); }
.section-label--pink { color: var(--lz-pink); font-weight: 700; }
.section-label--slate { color: var(--lz-slate); }

/* AccentBar: two solid halves, blue then pink. */
.accent-bar {
  display: block; width: 160px; height: 6px; border-radius: 999px; margin-top: 20px;
  background: linear-gradient(90deg, var(--lz-blue) 0 50%, var(--lz-pink) 50% 100%);
}

/* Pull quote: one contrast line per section. */
.pull {
  margin-top: 40px; padding-left: 24px; border-left: 4px solid var(--lz-blue);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 700; line-height: 1.35;
  color: var(--lz-ink); max-width: 36em;
}
.pull--pink { border-left-color: var(--lz-pink); }

.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.more .icon { transition: transform .15s ease; }
.more:hover .icon { transform: translateX(3px); }

/* ---- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--lz-radius-md);
  font: 600 16px/1.2 var(--lz-font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: filter .15s ease, background-color .15s ease;
}
.btn--primary { background: var(--lz-primary); color: var(--lz-surface); }
.btn--primary:hover { filter: brightness(0.92); }
.btn--secondary { background: var(--lz-surface); color: var(--lz-ink); border-color: var(--lz-border); }
.btn--secondary:hover { filter: brightness(0.96); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---- Header: the site's own name, Inter 700 in ink. No logo. --------------- */

.site-header { background: var(--lz-page); border-bottom: 1px solid var(--lz-border); }
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-top: 16px; padding-bottom: 16px;
}
.site-name {
  color: var(--lz-ink); font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
  text-decoration: none; line-height: 1.2;
}
.site-name:hover { text-decoration: underline; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-nav a {
  color: var(--lz-ink-2); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 0;
}
.site-nav a:hover { color: var(--lz-ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--lz-ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--lz-blue); }
@media (min-width: 640px) { .site-header .container { min-height: 72px; } }

/* ---- Sections -------------------------------------------------------------- */

.hero { padding: 56px 0 64px; }
@media (min-width: 900px) { .hero { padding: 96px 0 80px; } }
.hero .lede { margin-top: 28px; }
.hero--short { padding-bottom: 96px; }

.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section + .section, .hero + .section { padding-top: 0; }

.grid { display: grid; gap: 24px; }
@media (min-width: 760px) {
  .grid { gap: 32px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.prose + .grid { margin-top: 40px; }

.split { display: grid; gap: 32px; }
@media (min-width: 960px) { .split { grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; } }

/* ---- Card ------------------------------------------------------------------ */

.card {
  background: var(--lz-surface); border: 1px solid var(--lz-border);
  border-radius: var(--lz-radius-card); box-shadow: var(--lz-shadow-card);
  padding: 24px;
}
@media (min-width: 640px) { .card { padding: 32px; } }
@media (min-width: 900px) { .card { padding: 40px; } }
.card h3 { margin: 20px 0 8px; }
.diagram-card + .card { margin-top: 32px; }

.prose + .card, .prose + .diagram-card { margin-top: 40px; }
.diagram-card { padding: 12px; }
@media (min-width: 640px) { .diagram-card { padding: 32px; } }
@media (min-width: 1100px) { .diagram-card { padding: 28px; } }

/* A card that is one link: the game. */
.card--link {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  text-decoration: none; color: var(--lz-ink);
  transition: border-color .15s ease;
}
.card--link:hover { border-color: var(--lz-blue); }
.card-link-title { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--lz-ink); }
.card-link-url { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--lz-blue); }

/* ---- IconBadge ------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; color: var(--lz-surface);
  background: var(--lz-blue);
}
.badge--soft {
  width: 40px; height: 40px; border-radius: var(--lz-radius-sm);
  background: color-mix(in srgb, var(--lz-blue) 10%, transparent); color: var(--lz-blue);
}
.badge--soft.badge--pink { background: color-mix(in srgb, var(--lz-pink) 10%, transparent); color: var(--lz-pink); }
.badge--soft.badge--slate { background: color-mix(in srgb, var(--lz-slate) 10%, transparent); color: var(--lz-slate); }

.num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--lz-blue); color: var(--lz-surface); font-weight: 700;
}

/* ---- Fix it before, not after: three ways, the third highlighted ----------- */

.ways { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 760px) { .ways { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.way {
  display: flex; align-items: center; gap: 14px;
  background: var(--lz-surface); border: 1px solid var(--lz-border);
  border-radius: var(--lz-radius-lg); padding: 16px 20px;
  font-size: 18px; font-weight: 500; color: var(--lz-ink-2);
}
.way--key { background: var(--lz-blue-tint); border-color: transparent; color: var(--lz-ink); font-weight: 700; }

/* ---- Diagrams: inline SVG, real text, colours from the tokens --------------- */

.diagram { display: block; width: 100%; height: auto; font-family: var(--lz-font); }
.diagram--wide { display: none; }
.diagram--narrow { max-width: 400px; margin: 0 auto; }
/* Below these widths the row's text would shrink under ~15px: the column shows instead. */
@media (min-width: 1100px) {
  .diagram--wide:not(.diagram--flow) { display: block; }
  .diagram--narrow:not(.diagram--flow) { display: none; }
}
@media (min-width: 1200px) {
  .diagram--flow.diagram--wide { display: block; }
  .diagram--flow.diagram--narrow { display: none; }
}

.dg-node { fill: var(--lz-surface); stroke: var(--lz-blue); stroke-width: 2; }
.dg-node--slate { stroke: var(--lz-slate); }
.dg-node--owner { stroke: var(--lz-pink); stroke-width: 2.5; fill: color-mix(in srgb, var(--lz-pink) 6%, var(--lz-surface)); }
.dg-node--key { fill: var(--lz-blue); stroke: var(--lz-blue); }
.dg-node--tint { fill: var(--lz-blue-tint); }
.dg-num { fill: var(--lz-blue); }
.dg-num--owner { fill: var(--lz-pink); }
.dg-num-text { fill: var(--lz-surface); font-size: 15px; font-weight: 700; text-anchor: middle; }
.dg-text { fill: var(--lz-ink); font-size: 17px; font-weight: 600; }
.diagram--flow .dg-text { font-size: 16px; }
.dg-text--center { text-anchor: middle; }
.dg-text--on-key { fill: var(--lz-surface); font-weight: 700; }
.dg-small { fill: var(--lz-slate); font-size: 13px; font-weight: 500; }
.dg-arrow, .dg-head {
  fill: none; stroke: var(--lz-slate); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---- Frame: the four points -------------------------------------------------- */

.rows { border-top: 1px solid var(--lz-line); }
.row {
  display: grid; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--lz-line);
}
@media (min-width: 640px) { .row { grid-template-columns: 280px 1fr; min-height: 56px; align-items: center; } }
.row-label { color: var(--lz-ink); font-weight: 700; }

/* ---- Principles ----------------------------------------------------------------- */

.principles { display: grid; }
.principles li {
  display: flex; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--lz-line);
}
.principles li:first-child { padding-top: 0; }
.principles li:last-child { border-bottom: 0; padding-bottom: 0; }
.principles p { font-size: 18px; line-height: 1.5; color: var(--lz-ink-2); }

/* ---- Golden data vs golden context (ColumnHeader + highlight column) ---------- */

.col-header {
  border-radius: var(--lz-radius-md); padding: 14px 16px; text-align: center;
  color: var(--lz-surface); background: var(--lz-slate);
  display: flex; flex-direction: column; justify-content: center;
}
.col-header strong { color: var(--lz-surface); font-weight: 700; display: block; }
.col-header--blue { background: var(--lz-blue); }

.compare { display: grid; gap: 0; }
.compare-row { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--lz-line); }
.compare-cell { padding: 14px 16px; color: var(--lz-ink-2); }
.compare-cell--label { font-weight: 700; color: var(--lz-ink); padding-bottom: 0; }
.compare-cell--new { color: var(--lz-ink); font-weight: 700; }
.compare-cell .who { display: block; font-size: 13px; font-weight: 400; color: var(--lz-text-muted); }
.compare-cell--empty { color: var(--lz-text-muted); font-style: italic; }
.compare-cell--owner { box-shadow: inset 4px 0 0 var(--lz-pink); }
.compare-headers { display: none; }
@media (min-width: 760px) {
  .compare-headers, .compare-row { grid-template-columns: 160px 1fr 1fr; column-gap: 16px; }
  .compare-headers { display: grid; margin-bottom: 8px; }
  .compare-headers .col-header:not(.col-header--blue) { grid-column: 2; }
  .compare-row { min-height: 56px; align-items: center; }
  .compare-cell--label { padding-bottom: 14px; }
  .compare-cell .who { display: none; }
  .compare-cell--new { background: var(--lz-blue-tint); align-self: stretch; display: flex; align-items: center; }
  .compare-headers + .compare-row .compare-cell--new { border-radius: var(--lz-radius-lg) var(--lz-radius-lg) 0 0; }
  .compare-row:last-child .compare-cell--new { border-radius: 0 0 var(--lz-radius-lg) var(--lz-radius-lg); }
  .compare-cell--empty {
    align-self: stretch; display: flex; align-items: center;
    border: 2px dashed var(--lz-line); border-radius: var(--lz-radius-md); margin: 6px 0;
  }
}
.compare-caption { margin-top: 24px; max-width: 46em; }

/* ---- What belongs in it ---------------------------------------------------------- */

.checks { display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .icon { color: var(--lz-blue); margin-top: 3px; }
.checks--lg { gap: 18px; }
.checks--lg li { font-size: 18px; color: var(--lz-ink); font-weight: 500; }
.checks--lg .icon { margin-top: 4px; }

/* ---- TakeawayBanner: one per page, at the bottom ---------------------------------- */

.takeaway {
  background: var(--lz-ink); border-radius: var(--lz-radius-xl); padding: 24px 32px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
@media (min-width: 900px) { .takeaway { padding: 40px 48px; } }
.takeaway > div { max-width: 40em; }
.takeaway-statement { color: var(--lz-surface); font-weight: 700; font-size: clamp(1.375rem, 2.6vw, 1.5rem); line-height: 1.3; }
.takeaway-support { color: var(--lz-on-dark-muted); margin-top: 6px; }

/* ---- The posts behind it ------------------------------------------------------------ */

.posts { display: grid; gap: 12px; }
@media (min-width: 760px) { .posts { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.posts a {
  display: flex; align-items: center; gap: 14px; height: 100%;
  background: var(--lz-surface); border: 1px solid var(--lz-border); border-radius: var(--lz-radius-lg);
  padding: 16px 20px; text-decoration: none; color: var(--lz-ink); font-weight: 600;
  transition: border-color .15s ease;
}
.posts a:hover { border-color: var(--lz-blue); }
.posts .icon { color: var(--lz-blue); }

/* ---- Footer ----------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--lz-border); padding: 48px 0 40px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-tagline { margin-top: 12px; color: var(--lz-ink); font-weight: 600; }
.footer-title { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lz-slate); margin-bottom: 12px; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: var(--lz-ink-2); }
.footer-links a:hover { color: var(--lz-ink); }
.footer-publisher { margin-top: 40px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--lz-slate); }
.copyright { margin-top: 24px; font-size: 14px; color: var(--lz-text-muted); }
