/* Ond black-and-white page system, per /brand.
   A page opts in with class="ond-page" on its wrapper and links this file
   with a version query (CSS is cached for a week). Violet marks the
   governed action and the standard, nothing else. */

.ond-page {
  --ink: #0e0e0e;
  --line: #e6e6e6;
  --muted: #6a6a6a;
  --faint: #9a9a9a;
  --violet: #7f5af0;
  /* Neutral greys in place of the warm site.css tokens. */
  --os-text: #262626;
  --os-muted: #6a6a6a;
  --os-faint: #9a9a9a;
  --os-line: #e6e6e6;
  --os-soft: #f5f5f5;
  --os-paper: #f3f3f3;
  --os-accent: #0e0e0e;
  background: #fff;
  overflow-x: hidden;
}

/* ---- Type ------------------------------------------------------------- */

.ond-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.ond-label::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.ond-display {
  margin: 0;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-wrap: balance;
}

.ond-lead {
  margin: 28px 0 0;
  max-width: 620px;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.ond-h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 700;
  text-wrap: balance;
}

.ond-text {
  margin: 20px 0 0;
  max-width: 600px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.ond-more {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.ond-more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.ond-section {
  padding: 128px 0;
}

.ond-section--flush {
  padding-top: 0;
}

.ond-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.ond-head > div {
  flex: 1 1 560px;
  max-width: 780px;
}

.ond-notes {
  display: grid;
  gap: 6px;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.ond-notes p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.ond-notes a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #c8c8c8;
  text-underline-offset: 3px;
}

.ond-notes a:hover {
  text-decoration-color: var(--ink);
}

.ond-label.ond-kicker {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---- Dark band -------------------------------------------------------- */

.ond-band {
  padding: 128px 0;
  background: var(--ink);
  color: #fff;
}

.ond-band .ond-label {
  color: var(--faint);
}

.ond-band .ond-h2 {
  color: #fff;
}

.ond-band .ond-text {
  color: #a6a6a6;
}

.ond-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 80px;
  align-items: start;
}

.ond-quote {
  margin: 44px 0 0;
  padding: 2px 0 2px 22px;
  border-left: 1.5px solid var(--violet);
  max-width: 520px;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #fff;
}

.ond-repos {
  margin: 44px 0 0;
  border-top: 1px solid #262626;
}

.ond-repo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  padding: 20px 0;
  border-bottom: 1px solid #262626;
  color: #fff;
  text-decoration: none;
}

.ond-repo__name {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.ond-repo__text {
  grid-column: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--faint);
}

.ond-repo__go {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 14px;
  color: var(--faint);
  transition: color 160ms ease;
}

.ond-repo:hover .ond-repo__go {
  color: #fff;
}

/* ---- Code panel ------------------------------------------------------- */

.ond-code {
  margin: 0;
  border: 1px solid #262626;
  border-radius: 16px;
  background: #121212;
  overflow: hidden;
}

.ond-code__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #262626;
  font-size: 12px;
  color: #7a7a7a;
}

.ond-code__file {
  font-family: var(--os-mono);
  color: #bdbdbd;
}

.ond-code pre {
  margin: 0;
  padding: 24px 20px;
  overflow-x: auto;
  font-family: var(--os-mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #6e6e6e;
}

.ond-code .k {
  color: #fff;
}

.ond-code .s {
  color: #b8b8b8;
}

.ond-code .c {
  color: #6e6e6e;
}

.ond-code .ond-code__sh {
  color: #d0d0d0;
}

.ond-code__run {
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid #262626;
  font-family: var(--os-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #fff;
  overflow-x: auto;
  white-space: nowrap;
}

.ond-code__run span {
  color: #6e6e6e;
}

/* ---- Hairline grids --------------------------------------------------- */

.ond-surfaces {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 88px 0 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.ond-surfaces--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ond-surfaces--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ond-surfaces--flush {
  margin-top: 0;
}

.ond-surface {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 24px 28px 0;
  color: var(--ink);
  text-decoration: none;
}

.ond-surface + .ond-surface {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.ond-surface__logo {
  display: flex;
  align-items: center;
  height: 28px;
  margin-bottom: 22px;
}

.ond-surface__logo img {
  display: block;
  width: auto;
  filter: brightness(0);
}

.ond-surface__logo svg {
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.ond-surface__logo .l-anthropic { height: 22px; }
.ond-surface__logo .l-openai { height: 19px; }
.ond-surface__logo .l-n8n { height: 28px; }
.ond-surface__logo .l-dify { height: 21px; }
.ond-surface__logo .l-hooks { height: 26px; }

.ond-surface__name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.ond-surface__kicker {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--faint);
}

.ond-surface__text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.ond-surface__go {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
  color: var(--faint);
  transition: color 160ms ease;
}

p.ond-surface__text {
  margin-bottom: 0;
}

.ond-surface__text strong {
  font-weight: 600;
  color: var(--ink);
}

a.ond-surface:hover .ond-surface__go {
  color: var(--ink);
}

.ond-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 96px 0 0;
  border-top: 1px solid var(--ink);
}

.ond-stat {
  min-width: 0;
  padding: 28px 24px 0 0;
}

.ond-stat + .ond-stat {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.ond-stat__num {
  display: block;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.ond-stat__label {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* One-line list of runtimes under a hero. */
.ond-runtimes .os-runtimes {
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.ond-runtimes .os-runtimes > span {
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}

.ond-runtimes .os-runtimes > span.ond-runtimes__label {
  padding-left: 0;
  border-left: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Line motifs (Route, Review, Prove, Control) drawn inline. */
.ond-motif {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.ond-motif .fill {
  fill: var(--ink);
  stroke: none;
}

/* ---- Editorial blocks ------------------------------------------------- */

.ond-meta {
  margin: 32px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
}

.ond-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #c8c8c8;
  text-underline-offset: 3px;
}

.ond-meta a:hover {
  text-decoration-color: var(--ink);
}

.ond-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: start;
  padding-top: 40px;
  border-top: 1px solid var(--ink);
}

.ond-split + .ond-split {
  margin-top: 96px;
}

.ond-h3 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}

.ond-prose p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

.ond-prose p:last-child {
  margin-bottom: 0;
}

.ond-prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #c8c8c8;
  text-underline-offset: 3px;
}

.ond-prose a:hover {
  text-decoration-color: var(--ink);
}

.ond-prose .ond-prose__links {
  font-size: 14px;
}

.ond-intro {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: pretty;
}

/* Stacked rows inside a split: kicker, title, text. */
.ond-row {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.ond-row + .ond-row {
  padding-top: 28px;
}

.ond-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ond-row__kicker {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.ond-row__title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.ond-row__text {
  margin: 0;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

/* Publication index: one row per entry, newest first. */
.ond-pubs {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.ond-pub {
  border-bottom: 1px solid var(--line);
}

.ond-pub__link {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) 180px 20px;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  color: var(--ink);
  text-decoration: none;
}

.ond-pub__date {
  font-size: 14px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.ond-pub__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ond-pub__kind {
  font-size: 14px;
  color: var(--muted);
}

.ond-pub__go {
  font-size: 15px;
  color: var(--faint);
  transition: transform 160ms ease, color 160ms ease;
}

.ond-pub__link:hover .ond-pub__title {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.ond-pub__link:hover .ond-pub__go {
  color: var(--ink);
  transform: translateX(3px);
}

/* Card index: a generated card grid read as one row per entry. The cards
   keep their markup (visual, title, meta); the visual is hidden and the
   meta spans move into their own columns. */
.ond-index {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--ink);
}

.ond-index > .os-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.ond-index > .os-card .os-visual {
  display: none;
}

.ond-index > .os-card .os-card__title {
  grid-column: 2;
  grid-row: 1;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ond-index > .os-card:hover .os-card__title {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.ond-index > .os-card .os-card__meta {
  display: contents;
}

.ond-index > .os-card .os-card__meta span {
  grid-row: 1;
  font-size: 14px;
}

.ond-index > .os-card .os-card__meta span:first-child {
  grid-column: 3;
  color: var(--muted);
}

.ond-index > .os-card .os-card__meta span:last-child {
  grid-column: 1;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.ond-index > .os-card .os-card__meta span + span::before {
  display: none;
}

/* Index variant for cards whose only meta is a label (deployment patterns). */
.ond-index--patterns > .os-card {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.ond-index--patterns > .os-card .os-card__title {
  grid-column: 1;
}

.ond-index--patterns > .os-card .os-card__meta span:only-child {
  grid-column: 2;
  color: var(--muted);
}

/* Ambit overview: layers with an honest status each. */
.ond-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}

.ond-status--published {
  border-color: var(--violet);
  color: var(--violet);
}

.ond-layers {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.ond-layers--extra {
  margin-top: 48px;
}

.ond-layer {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.2fr) minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.ond-layer__n {
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.ond-layer__name {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.ond-layer__what {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.ond-layer__source {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.ond-layer__source a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #c8c8c8;
  text-underline-offset: 3px;
}

.ond-layer__status {
  justify-self: end;
}

/* Series pages. */
.ond-shero {
  padding: 112px 0 72px;
}

.ond-shero .os-article-back {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.ond-shero .os-article-back:hover {
  color: var(--ink);
}

.ond-series-rows {
  border-top: 1px solid var(--ink);
}

/* ---- site.css components, restyled for this system -------------------- */

.ond-page .os-code {
  flex-wrap: wrap;
  gap: 6px 16px;
  white-space: normal;
  background: #fff;
  border: 1px solid var(--line);
}

.ond-page .os-shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.ond-page .os-demo-card,
.ond-page .os-console {
  box-shadow: 0 0 0 1px var(--line);
}

.ond-page .os-chip {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}

.ond-page .os-chip:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink);
}

.ond-page .os-chip[aria-current="page"],
.ond-page .os-chip[aria-pressed="true"] {
  background: var(--ink);
  box-shadow: none;
  color: #fff;
}

.ond-page .os-empty {
  background: #fff;
  border: 1px solid var(--line);
}

.ond-page .os-visual--paper img {
  filter: brightness(0);
}

.ond-page .os-visual--lime img {
  filter: brightness(0) invert(1);
}

.ond-page .os-visual--ink img {
  filter: grayscale(1);
}

/* The Ond mark keeps its own colours. */
.ond-page .os-visual--nd img {
  filter: none;
}

.ond-page .os-section--ink .os-text,
.ond-page .os-section--ink .os-lead,
.ond-page .os-section--ink .os-eyebrow,
.ond-page .os-section--ink .os-item__text {
  color: #a6a6a6;
}

/* ---- Article pages (blog, research and story entries) ------------------ */

.ond-article .os-article-head {
  padding-top: 96px;
}

.ond-article .os-article-back {
  margin-bottom: 40px;
  color: var(--muted);
}

.ond-article .os-article-title {
  margin-bottom: 24px;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.ond-article .os-article-dek {
  margin-bottom: 36px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
}

.ond-article .os-article-byline {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.ond-article .os-article-byline .os-article-byline__avatar {
  display: flex;
  font-size: 15px;
  background: var(--ink);
  color: #fff;
}

.ond-article .os-article-chip {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ond-article a.os-article-chip:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink);
}

.ond-article .os-publication-resources a {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ond-article .os-publication-resources a:first-child {
  background: var(--ink);
  box-shadow: none;
}

.ond-article .os-article-glance,
.ond-article .os-article-metrics > div {
  padding: 24px 0 0;
  border-radius: 0;
  background: none;
  border-top: 1px solid var(--ink);
}

.ond-article .os-article-cover > img {
  background: #fff;
  border: 1px solid var(--line);
}

.ond-article .ond-related .ond-label {
  margin-bottom: 28px;
}

/* ---- Responsive ------------------------------------------------------- */

/* Hairline grids that wrap onto a second row start each row flush left. */
@media (min-width: 1081px) {
  .ond-surfaces--3 > .ond-surface:nth-child(3n + 1),
  .ond-surfaces--4 > .ond-surface:nth-child(4n + 1) {
    padding-left: 0;
    border-left: 0;
  }

  .ond-surfaces--3 > .ond-surface:nth-child(n + 4),
  .ond-surfaces--4 > .ond-surface:nth-child(n + 5) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 1080px) {
  .ond-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .ond-band__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .ond-surfaces,
  .ond-surfaces--3,
  .ond-surfaces--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 0;
  }

  .ond-surface,
  .ond-surface + .ond-surface {
    padding: 24px 20px 24px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .ond-section,
  .ond-band {
    padding: 88px 0;
  }

  .ond-article .os-article-head {
    padding-top: 56px;
  }

  .ond-section--flush {
    padding-top: 0;
  }

  .ond-head {
    margin-bottom: 48px;
  }

  .ond-notes {
    margin-top: 24px;
  }

  .ond-quote {
    font-size: 18px;
  }

  .ond-split + .ond-split {
    margin-top: 64px;
  }

  .ond-pub__link {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 16px;
    padding: 18px 0;
  }

  .ond-pub__date {
    grid-column: 1;
    grid-row: 1;
  }

  .ond-pub__kind {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .ond-pub__title {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 17px;
  }

  .ond-pub__go {
    display: none;
  }

  .ond-index > .os-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 16px;
    padding: 18px 0;
  }

  .ond-index > .os-card .os-card__title {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 17px;
  }

  .ond-index > .os-card .os-card__meta span:first-child {
    grid-column: 2;
    text-align: right;
  }

  .ond-index--patterns > .os-card .os-card__meta span:only-child {
    grid-column: 1;
    text-align: left;
  }

  .ond-shero {
    padding: 64px 0 48px;
  }

  .ond-layer {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .ond-layer__source,
  .ond-layer__status {
    grid-column: 2;
    justify-self: start;
  }

  .ond-code pre,
  .ond-code__run {
    font-size: 12px;
  }

  .ond-runtimes .os-runtimes > span {
    padding: 12px 14px;
    font-size: 14px;
  }

  .ond-runtimes .os-runtimes > span.ond-runtimes__label {
    flex-basis: 100%;
    padding: 14px 0 4px;
  }

  .ond-surfaces,
  .ond-surfaces--3,
  .ond-surfaces--4 {
    margin-top: 56px;
  }

  .ond-surfaces--flush {
    margin-top: 0;
  }

  .ond-surfaces--3,
  .ond-surfaces--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ond-surface__logo {
    margin-bottom: 16px;
  }

  .ond-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 64px;
  }

  .ond-stat,
  .ond-stat + .ond-stat {
    padding: 24px 16px 24px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}
