/* These product plates follow the type, surface and line colors of the editorial shell. */
.product-preview { margin-top: clamp(40px, 5vw, 64px); }
.product-window {
  --accent: color-mix(in srgb, var(--signal) 47%, var(--fg-body));
  --inset: clamp(20px, 3vw, 44px);
  background: var(--bg-1); color: var(--fg-body);
  font: 400 15px/1.5 var(--sans);
}
.product-window .product-icon { width: 16px; height: 16px; flex: none; }
.product-mast {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px var(--inset); border-bottom: 1px solid var(--line-2);
}
.product-mast > span { font: 12px/1.5 var(--mono); color: var(--fg-2); }
.op-brand, .ab-brand svg { filter: brightness(0) invert(.87); object-fit: contain; }
.op-brand { width: 104px; height: 18px; }
.ab-brand { display: flex; align-items: center; gap: 3px; }
.product-choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.product-choices label { display: flex; position: relative; cursor: pointer; }
.product-choices input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-choices label > span { display: flex; align-items: center; gap: 10px; color: var(--fg-2); }
.product-choices label:hover > span { color: var(--fg); }
.product-choices input:focus-visible + span, .op-canvas-head button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.op-spread { display: grid; grid-template-columns: minmax(200px, .78fr) minmax(0, 2fr); }
.op-brief { display: flex; flex-direction: column; gap: 36px; padding: var(--inset); border-right: 1px solid var(--line-2); }
.op-tasks legend { color: var(--fg-2); font: 12px var(--mono); padding: 0 0 12px; }
.op-tasks label span { width: 100%; border-left: 2px solid transparent; padding: 10px 12px; font-size: 14px; }
.op-tasks input:checked + span { color: var(--fg); background: var(--bg-2); border-color: var(--accent); }
.op-tasks input:checked + span .product-icon { color: var(--accent); }
.op-request { border-top: 1px solid var(--line-2); padding-top: 24px; }
.op-prompt { font: 400 clamp(20px, 1.8vw, 27px)/1.32 var(--serif); color: var(--fg-body); }
.op-artifact { min-width: 0; padding: var(--inset); }
.op-canvas-head, .ab-controls, .report-product { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.op-canvas-head h3, .ab-controls h3 { font-weight: 450; line-height: 1.12; letter-spacing: -.035em; }
.op-canvas-head h3 { font-size: clamp(24px, 2.2vw, 34px); }
.op-canvas-head button {
  display: inline-flex; gap: 8px; align-items: center; flex: none; min-height: 38px;
  padding: 8px 14px; font-size: 13px; font-weight: 550; color: var(--bg); background: var(--fg-body); border-radius: 4px;
}
.op-canvas-head button:hover { background: var(--fg); }
.op-canvas-head button[aria-disabled=true] { color: var(--fg-2); background: var(--bg-3); }
.op-canvas-head button .product-icon { width: 14px; height: 14px; }
.op-flow {
  position: relative; margin-top: 24px; border-block: 1px solid var(--line);
  background: radial-gradient(circle, var(--line-2) .65px, transparent .85px) 0 0 / 16px 16px var(--bg);
}
.flow-edges, .op-flow ol { width: 100%; height: 282px; }
.flow-edges { position: absolute; inset: 0; fill: none; stroke: var(--line-3); }
.flow-edges path { vector-effect: non-scaling-stroke; }
.op-flow ol { position: relative; margin: 0; padding: 0; list-style: none; }
.op-flow li {
  position: absolute; transform: translate(-50%,-50%); top: 15.66%; width: 29%;
  display: grid; align-content: center; grid-template-columns: 16px minmax(0,1fr); column-gap: 8px;
  min-height: 56px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 4px;
}
.op-flow li:nth-child(1) { left: 17.5%; }
.op-flow li:nth-child(2) { left: 50%; }
.op-flow li:nth-child(3) { left: 82.5%; }
.op-flow li:nth-child(4) { left: 50%; top: 50%; }
.op-flow li:nth-child(5) { left: 26.5%; top: 84.33%; }
.op-flow li:nth-child(6) { left: 73.5%; top: 84.33%; }
.op-flow li .product-icon { align-self: center; color: var(--fg-2); }
.op-flow li strong { font-size: 14px; line-height: 1.25; font-weight: 500; color: var(--fg); }
.op-flow li small { grid-column: 2; margin-top: 3px; color: var(--fg-2); font-size: 12px; line-height: 1.3; }
.op-flow li[data-state=running] { border-color: var(--accent); }
.op-flow li[data-state=running] .product-icon, .op-flow li[data-state=done] .product-icon { color: var(--accent); }
.op-flow li[data-state=skipped] { border-style: dashed; }
.op-flow:has(li:nth-child(2)[data-state]) .flow-edges path:nth-child(1),
.op-flow:has(li:nth-child(3)[data-state]) .flow-edges path:nth-child(2),
.op-flow:has(li:nth-child(4)[data-state]) .flow-edges path:nth-child(3),
.op-flow:has(li:nth-child(5)[data-state]) .flow-edges path:nth-child(4) { stroke: var(--accent); }
.flow-status, .report-insight { margin-top: 14px; color: var(--fg-2); font-size: 14px; }
.op-report, .ab-metrics[data-days="7"] { display: none; }
.op-window:has(input[value=report]:checked) .op-workflow,
.ab-window:has(input[value="7"]:checked) .ab-metrics[data-days="30"] { display: none; }
.op-window:has(input[value=report]:checked) .op-report,
.ab-window:has(input[value="7"]:checked) .ab-metrics[data-days="7"] { display: block; }

.op-result .op-canvas-head small, .ab-dates { color: var(--fg-2); font: 12px/1.5 var(--mono); }
.report-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 24px 0 0; border-top: 1px solid var(--line-2); padding-top: 16px; }
.report-metrics dt, .ab-secondary h4, .ab-feature h4 { font-size: 14px; font-weight: 450; color: var(--fg-body); }
.report-metrics dd, .ab-total strong, .ab-kpi strong { font-variant-numeric: tabular-nums; font-weight: 450; color: var(--fg); }
.report-metrics dd { margin: 2px 0; font-size: clamp(23px, 2.2vw, 32px); letter-spacing: -.035em; }
.report-plot { width: 100%; height: clamp(140px, 12vw, 176px); margin: 8px 0; color: var(--accent); }
.plot-grid { fill: none; stroke: var(--line-2); stroke-dasharray: 2 5; }
.plot-labels { fill: var(--fg-2); font: 11px var(--mono); }
.report-product { justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--line); }
.report-product img { border-radius: 3px; filter: saturate(.48) brightness(.9); }
.report-product strong, .report-product small { display: block; }
.report-product strong { font-weight: 500; }
.report-product small, .report-product > span { font-size: 12px; color: var(--fg-2); }
.report-product > span { margin-left: auto; font-family: var(--mono); }

.ab-main { padding: var(--inset); }
.ab-controls h3 { font-size: clamp(28px, 2.7vw, 40px); }
.ab-period { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line-2); border-radius: 5px; }
.ab-period label span { padding: 6px 12px; font-size: 13px; border-radius: 2px; }
.ab-period input:checked + span { background: var(--bg-3); color: var(--fg); }
.ab-dates { margin: 6px 0 24px; }
.ab-spread { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--inset); border-top: 1px solid var(--line-2); padding-top: 24px; }
.ab-total { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 14px; }
.ab-total strong { font-size: clamp(38px, 4.1vw, 62px); line-height: 1.2; letter-spacing: -.055em; }
.ab-change { font: 12px/1.4 var(--mono); color: var(--fg-2); }
.ab-plot { display: grid; grid-template-columns: max-content minmax(0,1fr); column-gap: 12px; row-gap: 6px; margin-top: 24px; }
.ab-plot svg { width: 100%; height: 144px; color: var(--accent); overflow: visible; }
.chart-scale, .chart-dates { display: flex; justify-content: space-between; font: 11px/1 var(--mono); color: var(--fg-2); }
.chart-scale { flex-direction: column; text-align: right; }
.chart-dates { grid-column: 2; }
.chart-rule { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.ab-secondary { min-width: 0; border-left: 1px solid var(--line-2); padding-left: var(--inset); }
.ab-secondary dl { margin: 12px 0 0; }
.ab-kpi { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.ab-kpi dt { font-size: 14px; }
.ab-kpi dd { display: grid; grid-template-columns: 6em 4.1em 48px; gap: 8px; align-items: center; margin: 0; text-align: right; }
.ab-kpi strong { font-size: 16px; }
.ab-kpi svg { width: 100%; height: 18px; color: var(--fg-3); overflow: visible; }
@media (max-width: 1080px) {
  .product-window { --inset: 24px; }
  .ab-spread { grid-template-columns: 1fr 1fr; }
  .ab-kpi dd { grid-template-columns: auto 4.1em; }
  .ab-kpi svg { display: none; }
}
@media (max-width: 800px) {
  .op-spread { grid-template-columns: 1fr; }
  .op-brief { padding-bottom: 0; border: 0; gap: 16px; }
  .op-tasks { display: flex; flex-wrap: wrap; gap: 4px; }
  .op-tasks legend { padding-bottom: 8px; }
  .op-tasks label span { padding: 8px 12px; }
  .op-request { padding-top: 12px; }
  .op-prompt { font-size: 20px; max-width: 36em; }
  .ab-spread { grid-template-columns: 1fr; }
  .ab-secondary { border-left: 0; border-top: 1px solid var(--line-2); padding: 16px 0 0; }
  .ab-kpi dd { grid-template-columns: 6em 4.1em 52px; }
  .ab-kpi svg { display: block; }
}
@media (max-width: 620px) {
  .product-window { --inset: 16px; }
  .product-mast { padding-block: 12px; }
  .product-mast > span { font-size: 11px; }
  .op-tasks label span { gap: 6px; padding: 7px 8px; font-size: 13px; }
  .op-tasks .product-icon { display: none; }
  .op-flow { margin-top: 16px; }
  .op-flow ol { height: auto; display: grid; gap: 8px; padding: 12px; }
  .op-flow li { position: relative; width: 100%; min-height: 42px; transform: none; z-index: 1; }
  .op-flow li small { grid-column: 2; }
  .op-flow li:nth-child(n) { inset: auto; }
  .op-flow li:nth-child(n+5) { width: calc(100% - 16px); margin-left: 16px; }
  .flow-edges { display: none; }
  .op-flow ol::before { content: ''; position: absolute; top: 16px; bottom: 28px; left: 20px; width: 1px; background: var(--line-3); }
  .op-flow li:nth-child(n+5)::before { content: ''; position: absolute; left: -9px; top: 50%; width: 8px; border-top: 1px solid var(--line-3); }
  .ab-kpi dd { grid-template-columns: auto 4.1em; gap: 6px; }
  .ab-kpi svg { display: none; }
  .ab-dates span { display: block; }
  .ab-plot svg { height: 122px; }
  .ab-period label span { padding-inline: 8px; }
}

.page-product #main { padding-top: calc(var(--header) + clamp(20px, 3vw, 44px)); }
.integration-overview { display: flex; align-items: baseline; gap: 24px; justify-content: space-between; margin-bottom: clamp(24px, 4vw, 52px); }
.integration-overview p { max-width: 44em; color: var(--fg-2); font-size: clamp(14px, 1.2vw, 18px); }
.integration-chapter { padding-bottom: clamp(48px, 6vw, 88px); }
.integration-context { display: flex; align-items: center; gap: 16px; }
.integration-context a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; }
.integration-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0 16px; }
.integration-title a:hover { text-decoration: underline; text-underline-offset: .15em; }
.integration-title h2 span { font-size: .6em; color: var(--fg-2); }
.integration-chapter .product-preview { margin-top: 0; }
.integration-notes { padding-bottom: clamp(48px, 6vw, 88px); }
.integration-notes .infra-band { margin-top: 40px; }

/* Two stills from the creator app, with Home in front. */
.creator-preview { display: flex; flex-direction: column; margin: 0; }
.creator-preview figcaption { order: -1; margin-bottom: 24px; color: var(--fg-2); font-size: 14px; }
.creator-preview-stack {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  width: min(100%, 650px);
  margin-inline: auto;
}
.creator-preview-stack img { grid-row: 1; width: 100%; height: auto; border-radius: 6.15% / 2.84%; }
.creator-preview-home {
  z-index: 1;
  grid-column: 3 / 6;
  box-shadow: -12px 12px 40px rgb(0 0 0 / .55);
}
.creator-preview-campaigns { grid-column: 1 / 4; margin-top: 10%; }

.product-chapter-intro { max-width: 54ch; margin-bottom: 16px; }
.creator-commission-heading { justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; color: var(--fg-2); }
.creator-commission-heading strong { color: var(--fg); font-weight: 500; }
.creator-commission-rates { margin: 0; }
.creator-commission-rates > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: baseline;
  gap: 4px 18px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.creator-commission-rates dd { margin: 0; font-variant-numeric: tabular-nums; }
.creator-commission-rates dd:last-child { text-align: right; }
.creator-commission-rates > div:last-child dd { color: var(--signal); }
.creator-commission-total { margin-top: 16px; color: var(--fg-2); }
.creator-commission-total strong { color: var(--fg); font-weight: 500; }
.creator-workflow { margin-block: 24px 16px; }
.chain.creator-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chain.creator-flow li + li { padding-left: 26px; border-left: 1px solid var(--line); }
.creator-flow li + li::before { content: '→' / ''; position: absolute; top: 1px; left: 7px; color: var(--signal); }

@media (max-width: 760px) {
  .integration-overview { display: grid; gap: 8px; }
  .chain.creator-flow { grid-template-columns: 1fr; row-gap: 0; }
  .chain.creator-flow li { padding: 4px 0 12px; }
  .chain.creator-flow li + li { padding: 27px 0 12px; border-left: 0; border-top: 1px solid var(--line); }
  .creator-flow li + li::before { content: '↓' / ''; left: 0; }
}
@media (max-width: 480px) {
  .creator-commission-rates > div { grid-template-columns: minmax(0, 1fr) max-content; }
  .creator-commission-rates dt { grid-column: 1 / -1; }
}
/* a principles grid that wraps onto further rows of three */
.principles.three.rows { row-gap: 8px; }
.principles.three.rows > div:nth-child(3n+1) { padding-left: 0; border-left: 0; }
.principles.three.rows > div:nth-child(n+4) { border-top: 1px solid var(--line); }
@media (max-width: 760px) { .principles.three.rows > div { padding-left: 0; border-left: 0; } .principles.three.rows > div + div { border-top: 1px solid var(--line); } }
