/* One story, with evidence opened where it is relevant. */
[hidden] { display: none !important; }
button, summary { font: inherit; }
button { cursor: pointer; }
[data-chapter], .detail-panel { scroll-margin-top: 24px; }
.origin-details { margin: 24px 0 0; }
.origin-details summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 48px; padding: 12px 0; color: var(--primary); border-block: 1px solid var(--border); cursor: pointer; font-size: 17px; list-style: none; }
summary::-webkit-details-marker { display: none; }
.disclosure-icon { display: block; flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.origin-details[open] > summary .disclosure-icon, [data-close-detail] .disclosure-icon { transform: rotate(180deg); }
.origin-details .prose-2 { padding-top: 28px; }
.origin-close { margin: 24px 0 0; }
.decision-index { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 32px; margin: 40px 0; }
.decision-index > a { display: flex; flex-direction: column; padding: 24px 0; border-top: 1px solid var(--primary-soft); }
.decision-topic { font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); }
.decision-index strong { font: 700 25px/1.15 var(--f-display); letter-spacing: -.02em; margin: 10px 0 18px; }
.decision-hint { margin-top: auto; }
.decision-index > a:hover { border-top-color: var(--primary); }
.decision-index a:hover strong, .decision-index a:focus-visible strong { color: var(--primary); }
.executive-thesis { max-width: none; width: 100%; font-size: clamp(26px, 2.65vw, 38px); line-height: 1.22; }
.context-links, .branch-links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 32px; }
/* Preserve the hierarchy; carry the same role colours through all three diagrams. */
.team-stage .conns path { stroke: var(--quiet); opacity: .55; stroke-width: 2; }
.team-stage .conns path[data-owner=core], .team-stage .conns path[data-owner=product] { stroke: var(--primary); }
.team-stage .conns path[data-owner=growth], .team-stage .conns path[data-owner=brand] { stroke: var(--indigo); }
.team-stage.focus .conns path.lit { opacity: 1; stroke-width: 3; }
.team-stage .tnode { border-radius: 8px; }
.org-wires .wire, .org-wires .chev { stroke: var(--quiet); opacity: .55; stroke-width: 2; }
.org-wires .arc { stroke: var(--quiet); stroke-width: 2; opacity: .22; }
.org-wires .arc[data-from=product-manager] { --arc-color: var(--depth); }
.org-wires .arc[data-from=designer] { --arc-color: var(--primary); }
.org-wires .arc[data-from=brand], .org-wires .arc[data-from=content-designer], .org-wires .arc[data-from=marketing], .org-wires .arc[data-from=smm] { --arc-color: var(--indigo); }
.org-wires .arc[data-from=architect] { --arc-color: var(--quiet); }
.org-wires .arc[data-from=developer] { --arc-color: var(--text-primary); }
.org-wires .arc[data-from=qa] { --arc-color: var(--signal); }
.org-stage.focus .arc.out, .org-stage.focus .arc.in { stroke: var(--arc-color, var(--quiet)); stroke-width: 3; }
.org-node.role[data-node=product-manager] { border-left-color: var(--depth); }
.org-node.role[data-node=designer] { border-left-color: var(--primary); }
.org-node.role[data-node=brand], .org-node.role[data-node=content-designer], .org-node.role[data-node=marketing], .org-node.role[data-node=smm] { border-left-color: var(--indigo); }
.org-node.role[data-node=architect] { border-left-color: var(--quiet); }
.org-node.role[data-node=developer] { border-left-color: var(--text-primary); }
.org-node.role[data-node=qa] { border-left-color: var(--signal); }
/* The map, its outputs and its explanation form one figure. */
.cycle-map .stage-scroll { padding-bottom: 0; background: var(--surface); }
.cycle-map .outcome { background: var(--surface); }
.cycle-map .cycle-foot { max-width: none; background: var(--surface); padding: 28px max(var(--gutter), calc((100vw - 1104px)/2)) 64px; }
.cycle-map .cycle-artifact { display: flex; flex-direction: column; color: var(--text-primary); border-radius: 8px; }
.cycle-map .cycle-artifact:hover h3 { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.cycle-map .cycle-artifact .artifact-open { align-self: flex-start; margin-top: 8px; }
/* One atlas keeps the eight conceptual artifacts in the same drawing language. */
.artifact-image { display: block; width: 142px; height: 142px; flex: 0 0 142px; background-image: url("/work/assets/ai-team-operating-system/artifact-atlas.png"); background-size: 400% 200%; background-repeat: no-repeat; }
.artifact-image-0 { background-position: 0 0; }
.artifact-image-1 { background-position: 33.333333% 0; }
.artifact-image-2 { background-position: 66.666667% 0; }
.artifact-image-3 { background-position: 100% 0; }
.artifact-image-4 { background-position: 0 100%; }
.artifact-image-5 { background-position: 33.333333% 100%; }
.artifact-image-6 { background-position: 66.666667% 100%; }
.artifact-image-7 { background-position: 100% 100%; }
.cycle-hotspot { position: absolute; left: var(--x); top: var(--y); width: 44px; height: 44px; transform: translate(-50%,-50%); border: 1px solid transparent; border-radius: 50%; background: transparent; z-index: 2; }
.cycle-hotspot:hover, .cycle-hotspot[aria-expanded=true] { border-color: var(--depth); background: color-mix(in srgb, var(--card) 32%, transparent); }
.cycle-note { position: absolute; z-index: 5; width: 330px; max-width: calc(100vw - 64px); padding: 20px; border: 1px solid var(--quiet); border-radius: var(--r-md); background: var(--card); box-shadow: 0 12px 32px -16px var(--text-secondary); }
.cycle-note strong { display: block; padding-right: 24px; font: 700 19px/1.2 var(--f-display); }
.cycle-note p { font-size: 15px; line-height: 1.5; margin-top: 10px; }
.cycle-note .detail-link { margin-top: 8px; }
.cycle-note button { position: absolute; right: 6px; top: 4px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 24px; color: var(--text-secondary); }
/* Details retain the editorial scale and their source artifacts. */
.detail-panel { border-top: 2px solid var(--primary); background: var(--surface); }
.detail-toolbar { max-width: var(--content-wide); margin: auto; padding: 20px var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.detail-toolbar > span { font: 600 13px/1.5 var(--f-mono); color: var(--primary); }
.detail-toolbar button, .detail-end button { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--depth); min-height: 44px; font-size: 17px; padding: 8px 0; }
.detail-chapter > .inner { max-width: var(--content-wide); margin: auto; padding: 64px var(--gutter); }
.detail-chapter h2.h-band { max-width: none; }
.detail-end { max-width: var(--content-wide); margin: auto; padding: 16px var(--gutter) 32px; }
.detail-chapter .seam-wrap { margin-top: 0; }
.fmode h3 { font: 700 20px/1.2 var(--f-display); letter-spacing: -.01em; margin-bottom: 8px; }
.dim h3 { font: 800 19px/1.2 var(--f-display); margin: 4px 0 12px; }
.rev h3 { font: 700 17px/1.2 var(--f-display); margin: 4px 0 8px; }
.pcard h3 { font: 800 23px/1.2 var(--f-display); margin: 8px 0 12px; }
.rev .n, .t2g .c .lab { font-size: 13px; letter-spacing: .08em; }
.t2g .c.gate { margin-top: 0; }
.detail-panel .chain-cap { font-size: 17px; }
.strategy-lede { max-width: 760px; }
.strategy-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 36px; margin: 48px 0 28px; }
.strategy-step { display: flex; flex-direction: column; position: relative; border-top: 3px solid var(--primary); padding-top: 20px; }
.strategy-step:nth-child(2) { border-color: var(--indigo); }
.strategy-step:nth-child(3) { border-color: var(--depth); }
.strategy-step:not(:last-child)::after { content: '→'; position: absolute; top: -23px; right: -28px; color: var(--quiet); font-size: 24px; }
.strategy-step h3 { font: 700 25px/1.2 var(--f-display); margin-bottom: 16px; }
.strategy-step > p:not(.eyebrow) { margin-bottom: 28px; }
.strategy-artifact { background: var(--bg); padding: 24px; margin-top: auto; border-left: 2px solid var(--quiet); }
.strategy-artifact > span { font: 600 13px var(--f-mono); color: var(--depth); overflow-wrap: anywhere; }
.strategy-artifact p { font-size: 15px; margin-top: 12px; }
/* Product work is the visual evidence; checks and corrections explain the bar. */
.product-proof { margin-top: 56px; }
.product-proof-game { display: grid; grid-template-columns: 250px minmax(0,1fr); align-items: center; gap: 64px; max-width: 960px; margin-inline: auto; }
.product-image { display: block; }
.product-image img { height: auto; width: 100%; }
.game-image img { border-radius: 28px; }
.product-copy h3, .quality-proof h3 { font: 700 30px/1.15 var(--f-display); letter-spacing: -.025em; margin-bottom: 20px; }
.product-copy .detail-link { margin-top: 20px; }
.product-proof-copilot .product-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; margin-bottom: 28px; }
.product-proof-copilot .eyebrow { grid-column: 1/-1; }
.product-proof-copilot h3 { grid-column: 1; grid-row: 2/4; }
.product-proof-copilot .detail-link { grid-column: 2; justify-self: start; }
.quality-proof { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 64px; border-top: 1px solid var(--primary-soft); padding-top: 40px; margin-top: 48px; }
.quality-proof h3 { font-size: 25px; }
.quality-proof .detail-link { margin-top: 12px; }
#takeaway h2 { font-size: clamp(32px,3.05vw,44px); }
@media (max-width: 1024px) {
  .detail-toolbar, .detail-end, .detail-chapter > .inner { padding-inline: 32px; }
  .executive-thesis .desktop-break { display: none; }
  .decision-index { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-proof-game { gap: 40px; }
}
@media (max-width: 700px) {
  .desktop-break { display: none; }
  .detail-toolbar { align-items: flex-start; }
  .detail-toolbar button { font-size: 15px; flex-shrink: 0; }
  .strategy-flow { grid-template-columns: 1fr; gap: 40px; }
  .strategy-step:not(:last-child)::after { display: none; }
  .product-proof-game { grid-template-columns: 1fr; gap: 28px; }
  .game-image { max-width: 230px; margin: auto; }
  .product-proof-copilot .product-copy, .quality-proof { display: block; }
  .quality-proof > div + div { margin-top: 36px; }
}
@media (max-width: 640px) {
  .detail-toolbar, .detail-end, .detail-chapter > .inner { padding-inline: 24px; }
  .detail-toolbar > span { max-width: 45%; }
  .decision-index { grid-template-columns: 1fr; margin-block: 28px; }
  .decision-index strong { font-size: 25px; margin-bottom: 12px; }
  .cycle-map .cycle-foot { padding-inline: 24px; }
  .product-copy h3 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
@media print {
  .detail-toolbar, .detail-end { display: none; }
}

/* Shared role accents follow branches, not seniority. */
.team-stage .conns path { --branch-color: var(--quiet); stroke: var(--branch-color); }
.team-stage .conns path[data-owner=core], .team-stage .conns path[data-owner=pd], .team-stage .conns path[data-owner=ds] { --branch-color: var(--primary); }
.team-stage .conns path[data-owner=growth], .team-stage .conns path[data-owner=brand], .team-stage .conns path[data-owner=mkt] { --branch-color: var(--indigo); }
.team-stage.focus .conns path.lit { stroke: var(--branch-color); }
.team-stage .tnode[data-role=core], .team-stage .tnode[data-role=pd], .team-stage .tnode[data-role=ds] { border-left-color: var(--primary); }
.team-stage .tnode[data-role=growth], .team-stage .tnode[data-role=brand], .team-stage .tnode[data-role=mkt] { border-left-color: var(--indigo); }
.strategy-artifact { min-height: 168px; }
.cycle-hotspot[data-note$=review] { height: 76px; border-radius: 12px; transform: translate(-50%,-24px); }
#origin .team-block { margin-top: 40px; }
.team-stage .tnode[data-role=forms], .team-stage .tnode[data-role=inter], .team-stage .tnode[data-role=dataviz], .team-stage .tnode[data-role=nav], .team-stage .tnode[data-role=motion], .team-stage .tnode[data-role=comp], .team-stage .tnode[data-role=icons], .team-stage .tnode[data-role=tokens], .team-stage .tnode[data-role=typo] { border-left-color: var(--primary); }
.team-tip, .org-tip { background: var(--card); color: var(--text-primary); border: 1px solid var(--quiet); box-shadow: 0 12px 32px -16px var(--text-secondary); }
.team-tip::after, .org-tip::after { border-top-color: var(--quiet); }
.team-tip.below::after, .org-tip.below::after { border-bottom-color: var(--quiet); }
.org-tipnums { color: var(--depth); border-top-color: var(--border); }
.detail-panel > .branch-links { max-width: var(--content-wide); margin: 0 auto; padding: 24px var(--gutter) 0; }
@media (max-width: 1024px) { .detail-panel > .branch-links { padding-inline: 32px; } }
@media (max-width: 640px) { .detail-panel > .branch-links { padding-inline: 24px; } }
.detail-chapter .prose-2 { orphans: 2; widows: 2; }
.fan .opt .mark, .tool .not b { font-size: 13px; }
.t2g { grid-auto-rows: 1fr; }
.detail-panel h2[tabindex="-1"]:focus { outline: none; }
.qa-disclosure { margin-top: 48px; }
.qa-disclosure .zone-role.qa { border-left-color: var(--signal); }
.qa-disclosure .zone-role.dev { border-left-color: var(--text-primary); }
.cycle-hotspot[data-note$=review] { transform: translate(-50%,-10px); }
[data-chapter] h1[tabindex="-1"]:focus, [data-chapter] h2[tabindex="-1"]:focus { outline: none; }
.diagram-help { display: none; font-size: 15px; color: var(--text-secondary); margin-top: 32px; }
@media (max-width: 1300px) { .diagram-help { display: block; } }
.team-stage .ax .n, .team-stage .ax .s { color: var(--text-secondary); }
.org-wires .arc { stroke: var(--arc-color, var(--quiet)); }
