/* Shared palette and typography for Watch, Changes and Sessions. */
:root{color-scheme:light;--bg:#f4f5f8;--surface:#fff;--surface-2:#f7f8fa;--surface-3:#eef0f4;--border:#e1e4ea;--border-strong:#c9ced8;--text:#15181e;--text-2:#586170;--text-3:#606b7b;--accent:#4c6ef5;--accent-soft:rgba(76,110,245,.10);--add:#1a7a42;--add-bg:#e6f6ec;--del:#c9363f;--del-bg:#fbe9eb;--radius:9px;--gutter:32px;--font:'Avenir Next','IBM Plex Sans','Segoe UI',system-ui,sans-serif;--mono:'SF Mono',ui-monospace,Menlo,Consolas,monospace}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){color-scheme:dark;--bg:#0e1014;--surface:#151820;--surface-2:#1a1e27;--surface-3:#21262f;--border:#262c37;--border-strong:#3a4250;--text:#e7e9ee;--text-2:#b3bccb;--text-3:#a1acbd;--accent:#7b93ff;--accent-soft:rgba(123,147,255,.14);--add:#4cc27a;--add-bg:#13291c;--del:#f07178;--del-bg:#2d171a}}
:root[data-theme=dark]{color-scheme:dark;--bg:#0e1014;--surface:#151820;--surface-2:#1a1e27;--surface-3:#21262f;--border:#262c37;--border-strong:#3a4250;--text:#e7e9ee;--text-2:#b3bccb;--text-3:#a1acbd;--accent:#7b93ff;--accent-soft:rgba(123,147,255,.14);--add:#4cc27a;--add-bg:#13291c;--del:#f07178;--del-bg:#2d171a}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--font);
}
button,
a,
summary {
  touch-action: manipulation;
}
button,
textarea {
  font: inherit;
}
select {
  cursor: pointer;
}
button {
  cursor: pointer;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 13px;
  min-height: 40px;
  border-radius: 5px;
}
button:hover {
  background: var(--surface-3);
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 5;
  background: var(--surface);
  padding: 10px;
}
.skip:focus {
  top: 8px;
}
header {
  height: 58px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}
.brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.brand b {
  color: var(--accent);
  padding-right: 9px;
  font-size: 23px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.prototype-label {
  font: 11px var(--mono);
  color: var(--text-2);
}
main {
  width: 100%;
  padding: 28px max(16%, calc((100% - 1180px) / 2)) 130px;
}
.identity {
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.identity a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  text-decoration: none;
}
.identity a:hover {
  text-decoration: underline;
}
.identity svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.identity-separator {
  color: var(--text-3);
}
.merged {
  color: var(--accent);
  font-size: 11px;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.7px;
  margin: 10px 0 9px;
  font-weight: 650;
}
.subtitle {
  color: var(--text-2);
  margin: 0;
  font-size: 14px;
}
.toolbar {
  margin: 26px 0 30px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.tabs {
  display: flex;
  gap: 24px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 0;
  color: var(--text-2);
}
.tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 650;
}
.story {
  max-width: 960px;
  margin: auto;
}
.step {
  margin: 0 0 32px;
}
.explanation {
  margin-bottom: 12px;
  position: relative;
  padding-left: 31px;
}
.step-number {
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  font: 12px/1.8 var(--mono);
}
h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 3px;
}
.what {
  color: var(--text-2);
  font-size: 13px;
  margin: 0;
  max-width: 75ch;
}
.code-group {
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}
.file-head {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font: 11px var(--mono);
  color: var(--text-2);
}
.file-head a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.file-head a:hover {
  text-decoration: underline;
}
.file-head .range {
  white-space: nowrap;
  font: 10px var(--mono);
}
.code-scroll {
  overflow: auto;
  padding: 8px 0;
  outline-offset: 1px !important;
}
.code-line {
  display: flex;
  min-width: max-content;
  line-height: 1.9;
  font: 12px/1.9 var(--mono);
  padding-right: 18px;
}
.code-line.added {
  background: var(--add-bg);
}
.ln {
  color: var(--text-3);
  width: 56px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 14px;
  user-select: none;
  border-right: 1px solid var(--border);
}
.sign {
  width: 24px;
  text-align: center;
  color: var(--add);
  flex-shrink: 0;
}
.code-line code {
  white-space: pre;
  padding-left: 6px;
}
.code-group + .code-group {
  margin-top: 8px;
}
.token.keyword,
.token.boolean {
  color: #c6a5f3;
}
.token.string {
  color: #a6c98b;
}
.token.function {
  color: #9dbfec;
}
.token.comment {
  color: var(--text-3);
}
.token.number {
  color: #edbc8d;
}
.token.operator,
.token.punctuation {
  color: var(--text-2);
}
[data-theme="light"] .token.keyword,
[data-theme="light"] .token.boolean {
  color: #6c35a1;
}
[data-theme="light"] .token.string {
  color: #27653c;
}
[data-theme="light"] .token.function {
  color: #285896;
}
[data-theme="light"] .token.number {
  color: #864800;
}
.under-code {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
  color: var(--text-2);
  font-size: 11px;
}
.under-code button {
  min-height: 36px;
  padding: 5px 8px;
  border: 0;
  font-size: 12px;
  color: var(--text-2);
}
.under-code p {
  margin: 7px 0;
}
.footnote {
  color: var(--text-2);
  font-size: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.footnote summary {
  cursor: pointer;
  width: fit-content;
}
.footnote p {
  max-width: 75ch;
  margin: 12px 0;
}
.notes {
  margin-top: 10px;
  border-left: 2px solid var(--accent);
  padding: 8px 14px;
  background: var(--surface-2);
}
.notes label {
  display: block;
  color: var(--text-2);
  font-size: 12px;
  margin-bottom: 5px;
}
.notes textarea {
  resize: vertical;
  display: block;
  width: 100%;
  min-height: 70px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 10px;
  border-radius: 3px;
}
.notes small {
  font-size: 11px;
  color: var(--text-2);
}
.notes .jump {
  float: right;
  border: 0;
  font-size: 11px;
  padding: 0;
  min-height: 28px;
  color: var(--accent);
}
.file-diff {
  margin-bottom: 28px;
}
.file-diff h2 {
  font: 13px var(--mono);
  overflow-wrap: anywhere;
  margin-bottom: 12px;
}
.patch {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 0;
}
.patch-row {
  font: 12px/1.9 var(--mono);
  white-space: pre;
  min-width: max-content;
  padding: 0 16px;
}
.patch-row.plus {
  background: var(--add-bg);
}
.patch-row.minus {
  background: var(--del-bg);
}
.patch-row.hunk {
  color: var(--text-2);
  background: var(--surface-2);
  padding-block: 5px;
}
.diff-intro {
  color: var(--text-2);
  font-size: 12px;
  margin: -10px 0 20px;
}
.story {
  max-width: none;
}
.step {
  display: grid;
  --story-margin: clamp(180px, 17vw, 224px);
  position: relative;
  grid-template-columns: var(--story-margin) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.explanation {
  align-self: start;
  padding-top: 5px;
}
.step-number {
  top: 7px;
}
h2 {
  font-size: 19px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.what {
  max-width: 28ch;
}
@media (max-width: 760px) {
  header {
    padding: 0 18px;
  }
  .prototype-label {
    display: none;
  }
  main {
    width: 100%;
    padding: 23px 18px 130px;
  }
  h1 {
    font-size: 24px;
  }
  .toolbar {
    margin: 20px 0 24px;
    align-items: flex-start;
  }
  .tabs {
    gap: 20px;
  }
  .subtitle {
    font-size: 13px;
  }
  h2 {
    font-size: 16px;
  }
  .what {
    font-size: 12px;
  }
  .explanation {
    padding-left: 25px;
  }
  .file-head {
    font-size: 10px;
    padding: 8px 10px;
  }
  .file-head .range {
    display: none;
  }
  .code-line {
    font-size: 11px;
  }
  .ln {
    width: 42px;
    padding-right: 10px;
  }
  .sign {
    width: 18px;
  }
  .step {
    display: block;
  }
  h2 {
    font-size: 17px;
    margin-bottom: 3px;
  }
  .what {
    max-width: none;
  }
}

body {
  height: 100dvh;
  overflow: hidden;
}
header {
  height: 58px;
}
main {
  height: calc(100dvh - 58px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-bottom: 40px;
}
.code-line.removed {
  background: var(--del-bg);
}
.code-line.removed .sign {
  color: var(--del);
}
.code-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.reference-info {
  position: relative;
  cursor: help;
}
.reference-info {
  font: 13px var(--font);
  color: var(--text-2);
}
.reference-tip {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: min(270px, calc(100vw - 80px));
  white-space: normal;
  padding: 11px 13px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  box-shadow: 0 4px 14px #0004;
  font: 12px/1.5 var(--font);
}
.reference-info:not(.dismissed):hover .reference-tip,
.reference-info:not(.dismissed):focus .reference-tip {
  display: block;
}
#reading-progress {
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .brand {
    font-size: 14px;
  }
  .brand b {
    font-size: 20px;
  }
  .header-right {
    gap: 10px;
  }
  #reading-progress {
    font-size: 10px;
  }
  .code-meta {
    gap: 6px;
  }
}
.before {
  font-size: 12px;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
}
.before summary {
  cursor: pointer;
  padding: 6px 0;
  min-height: 36px;
  width: fit-content;
}
.before[open] {
  margin-bottom: 12px;
}
#addendum {
  padding-top: 8px;
}
#addendum-heading {
  font-size: 21px;
  margin: 0 0 22px;
}
.addendum-file h3 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 550;
  margin: 0;
}
.addendum-file .explanation {
  padding-left: 0;
}
.addendum-file .file-head {
  border: 1px solid var(--border);
  border-bottom: 0;
}
.addendum-file .patch {
  margin-top: 0;
}
.addendum-file .patch-row {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
:root[data-theme="light"] {
  --del: #bb2d38;
}
:root[data-diff-palette="red-blue"] {
  --add: #1756b2;
  --add-bg: #e7f0ff;
}
:root[data-theme="dark"][data-diff-palette="red-blue"] {
  --add: #79b8ff;
  --add-bg: #12253e;
}
.settings {
  position: relative;
}
.settings > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.settings > summary::-webkit-details-marker {
  display: none;
}
.settings > summary:hover {
  background: var(--surface-3);
}
.settings-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: 220px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: 0 8px 24px #0004;
}
.settings-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}
.settings-panel select {
  width: 100%;
  min-height: 40px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 8px;
  font: 13px var(--font);
  border-radius: 4px;
}
.settings-panel select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .settings > summary > span {
    display: inline;
  }
  .settings > summary {
    padding: 8px;
  }
  .header-right {
    gap: 8px;
  }
}
@media (max-width: 380px) {
  .brand {
    font-size: 0;
  }
  .brand b {
    font-size: 24px;
  }
}

.settings-panel {
  width: 240px;
}
.settings-panel label:not(:first-child) {
  margin-top: 16px;
}
.settings-panel select {
  font-size: 14px;
}
[data-syntax-colors="neutral"] .token {
  color: var(--text) !important;
}
[data-syntax-colors="neutral"] .token.keyword {
  font-weight: 650;
}
.reference-badge {
  display: inline-block;
  border: 1px solid var(--border-strong);
  padding: 2px 6px;
  border-radius: 3px;
  font: 10px/1.6 var(--font);
}
.line-comment {
  position: relative;
  display: block;
  min-height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 10px 0 0;
  font: inherit;
  color: var(--text-3);
  flex-shrink: 0;
}
.line-comment:hover,
.line-comment:focus-visible {
  background: var(--accent-soft);
}
.line-plus {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 17px;
}
.line-comment:hover > span:first-child,
.line-comment:focus-visible > span:first-child {
  visibility: hidden;
}
.line-comment:hover .line-plus,
.line-comment:focus-visible .line-plus {
  display: flex;
}
.line-comment.has-comment {
  box-shadow: inset 3px 0 var(--accent);
  color: var(--accent);
}
.patch-line {
  padding: 0;
}
.patch-line.added {
  background: var(--add-bg);
}
.patch-line.removed {
  background: var(--del-bg);
}
.patch-hunk {
  font: 11px/1.8 var(--mono);
  padding: 7px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface-2);
  color: var(--text-2);
}
.patch .code-line code {
  flex: 1;
}
.notes {
  position: sticky;
  left: 0;
  max-width: 100%;
  margin: 0;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  border-block: 1px solid var(--border);
  white-space: normal;
  font: 13px/1.5 var(--font);
}
.note-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.note-head label {
  margin: 0;
}
.note-head button,
.close-note {
  border: 0;
  font-size: 11px;
  padding: 5px 0;
  min-height: 30px;
  color: var(--text-2);
}
.notes textarea {
  margin-top: 7px;
  font-size: 14px;
}
.notes .close-note {
  margin-top: 3px;
}
.before {
  margin-top: 6px;
}
.addendum-file .code-line code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.addendum-file .code-line {
  min-width: 0;
}
.tidbits-content {
  max-width: 680px;
}
.tidbits-content h2 {
  font-size: 21px;
}
.tidbits-content dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  margin-top: 24px;
}
.tidbits-content dt {
  font-weight: 600;
}
.tidbits-content dd {
  margin: 0;
  color: var(--text-2);
}
#other-comments {
  margin: 24px 0;
}
#other-comments .code-group {
  margin-top: 12px;
}
.tabs button {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }
  .tabs {
    gap: 22px;
  }
  .line-comment {
    min-height: 28px;
  }
  .patch .ln {
    width: 32px;
    padding-right: 6px;
  }
  .patch .sign {
    width: 16px;
  }
  .patch .code-line {
    font-size: 11px;
  }
  .settings-panel select {
    font-size: 16px;
  }
  .notes textarea {
    font-size: 16px;
  }
  .tidbits-content dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .tidbits-content dd {
    margin-bottom: 12px;
  }
}
.story-intro {
  margin: 0 0 38px;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--border);
}
#intro-context {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  max-width: 80ch;
}
.review-estimates {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.review-estimates button {
  border: 0;
  min-height: 32px;
  padding: 4px 0;
  color: var(--text-2);
  font-size: 12px;
}
.review-estimates strong {
  font-weight: 600;
  color: var(--text);
  margin-left: 3px;
}
.review-estimates button:hover {
  background: none;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.system-graph {
  margin: 26px 0 28px;
  padding: 20px 24px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.system-graph figcaption {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
  margin-bottom: 20px;
}
.graph-flow {
  display: grid;
  grid-template-columns: minmax(115px, 1fr) 38px minmax(350px, 3fr) 38px minmax(
      100px,
      1fr
    );
  align-items: center;
  gap: 0;
}
.graph-terminal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
}
.graph-terminal strong {
  font-size: 13px;
  font-weight: 550;
}
.graph-terminal > span:last-child {
  font-size: 11px;
  color: var(--text-2);
}
.node-symbol {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 16px var(--mono);
  margin-bottom: 5px;
  color: var(--text-2);
}
.graph-group {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 16px 18px 12px;
  background: var(--bg);
}
.graph-group-label {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 13px;
}
.graph-checks {
  display: flex;
  align-items: center;
}
.graph-node {
  flex: 1;
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 5px;
  background: var(--surface);
}
.graph-node strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.graph-node > span:not(.change-label) {
  font-size: 10px;
  color: var(--text-2);
  line-height: 1.5;
}
.graph-node.changed {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.graph-node.changed:hover {
  box-shadow: 0 0 0 1px var(--accent);
}
.change-label {
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 3px;
}
.graph-edge {
  flex: 0 0 28px;
  position: relative;
  height: 1px;
  background: var(--border-strong);
}
.graph-edge:after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--text-3);
  border-right: 1px solid var(--text-3);
  transform: rotate(45deg);
}
.graph-condition {
  font-size: 10px;
  color: var(--text-2);
  margin-top: 10px;
}
.graph-condition span {
  margin-right: 4px;
}
.before-after {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin: 0;
}
.behavior {
  min-width: 0;
}
.behavior h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 5px;
  font-weight: 600;
}
.behavior p {
  font-size: 12px;
  color: var(--text-2);
  margin: 0 0 9px;
  max-width: 56ch;
}
.behavior code {
  display: inline-block;
  font: 11px/1.6 var(--mono);
  color: var(--text-2);
  background: var(--surface);
  padding: 3px 7px;
  overflow-wrap: anywhere;
  max-width: 100%;
}
#estimate-basis {
  margin-top: 35px;
  scroll-margin-top: 18px;
}
#estimate-basis:focus {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}
#addendum-heading {
  margin-bottom: 5px;
}
.addendum-intro {
  color: var(--text-2);
  font-size: 13px;
  margin: 0 0 24px;
}
.step {
  scroll-margin-top: 24px;
}
.step:focus {
  outline: none;
}
.step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
@media (max-width: 900px) {
  .graph-flow {
    grid-template-columns:
      minmax(90px, 1fr) 20px minmax(310px, 3fr)
      20px minmax(80px, 1fr);
  }
  .system-graph {
    padding: 18px 16px;
  }
  .graph-group {
    padding: 12px;
  }
  .graph-terminal strong {
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  #intro-context {
    font-size: 13px;
  }
  .review-estimates {
    gap: 5px 20px;
    margin-top: 13px;
  }
  .review-estimates button {
    font-size: 11px;
  }
  .system-graph {
    padding: 15px;
    margin: 22px 0;
  }
  .system-graph figcaption {
    margin-bottom: 16px;
  }
  .graph-flow {
    grid-template-columns: 1fr;
  }
  .graph-flow > .graph-edge {
    height: 22px;
    width: 1px;
    justify-self: center;
  }
  .graph-flow > .graph-edge:after {
    top: auto;
    bottom: 0;
    right: -3px;
    transform: rotate(135deg);
  }
  .graph-terminal {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .graph-terminal .node-symbol {
    width: 24px;
    height: 24px;
    margin: 0;
    font-size: 13px;
  }
  .graph-terminal strong {
    font-size: 12px;
  }
  .graph-terminal > span:last-child {
    font-size: 10px;
  }
  .graph-group {
    padding: 13px;
  }
  .graph-checks > .graph-edge {
    flex-basis: 20px;
  }
  .graph-node {
    padding: 10px 8px;
  }
  .graph-node strong {
    font-size: 11px;
  }
  .graph-node > span:not(.change-label) {
    font-size: 10px;
  }
  .before-after {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .behavior p {
    font-size: 12px;
  }
  .story-intro {
    padding-bottom: 26px;
    margin-bottom: 28px;
  }
  .addendum-intro {
    font-size: 12px;
  }
}

.change-sign {
  font: 18px/1 var(--mono);
  color: var(--del);
  flex-shrink: 0;
}
.state-after .change-sign {
  color: #1756b2;
}
[data-theme="dark"] .state-after .change-sign {
  color: #79b8ff;
}
@media (max-width: 760px) {
  .before-after {
    gap: 14px;
  }
}

.chapter-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: -10px 0 72px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.chapter-index a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 12px;
}
.chapter-index a:hover {
  color: var(--text);
  text-decoration: underline;
}
.chapter-index a > span {
  color: var(--accent);
  font: 11px var(--mono);
}
.chapter {
  margin-bottom: 144px;
  scroll-margin-top: 24px;
}
.chapter:focus {
  outline: none;
}
.chapter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}
.chapter-heading {
  margin: 0 0 56px;
}
.chapter-heading > span {
  display: block;
  color: var(--text-2);
  font: 11px/1.5 var(--mono);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chapter .chapter-heading h2 {
  font-size: 32px;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin: 0;
}
.chapter-introduction {
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
  margin: 18px 0 0;
}
.chapter .explanation {
  padding-left: 0;
}
.chapter .explanation h3 {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 8px;
}
.chapter .step {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 64px;
}
.chapter-supporting {
  margin-top: 72px;
}
.chapter-file .file-head {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
}
@media (max-width: 760px) {
  .chapter {
    margin-bottom: 96px;
  }
  .chapter-heading {
    margin-bottom: 40px;
  }
  .chapter .chapter-heading h2 {
    font-size: 26px;
  }
  .chapter-introduction {
    font-size: 14px;
    margin-top: 16px;
  }
  .chapter .explanation h3 {
    font-size: 16px;
  }
  .chapter .step {
    margin-bottom: 48px;
  }
  .chapter-index {
    gap: 3px 20px;
    margin-bottom: 48px;
  }
  .chapter-index a {
    font-size: 11px;
  }
  .chapter-supporting {
    margin-top: 48px;
  }
}

.code-helpers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.code-helper {
  position: absolute;
  left: 0;
  width: var(--story-margin);
  pointer-events: auto;
  font: 13px/1.65 var(--font);
  color: var(--text);
  outline-offset: 6px;
}
.helper-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 11px;
}
.helper-line {
  margin-left: auto;
  font: 10px var(--mono);
}
.helper-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #9a8ae0;
}
[data-kind="Algorithm"] .helper-dot {
  background: #679dc9;
}
[data-kind="Assumption"] .helper-dot {
  background: #bd9855;
}
[data-kind="Warning"] .helper-dot {
  background: #d68e4b;
}
[data-kind="Bug"] .helper-dot {
  background: #d16d78;
}
.code-helper .helper-body {
  margin: 8px 0 0;
  opacity: 0.72;
  transition: opacity 220ms ease;
}
.code-helper[data-active="true"] .helper-body,
.code-helper:hover .helper-body,
.code-helper:focus .helper-body {
  opacity: 1;
}
@media (max-width: 760px) {
  .code-helper {
    left: -15px;
    width: 24px;
    outline-offset: 0;
    min-height: 24px;
    z-index: 2;
  }
  .helper-label {
    font-size: 0;
    gap: 0;
    min-height: 24px;
  }
  .helper-line {
    display: none;
  }
  .code-helper .helper-body {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 22px;
    width: min(260px, calc(100vw - 64px));
    margin: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
  }
  .code-helper:hover .helper-body,
  .code-helper:focus .helper-body {
    visibility: visible;
    opacity: 1;
  }
  .code-helper[data-dismissed="true"] .helper-body {
    visibility: hidden;
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .code-helper .helper-body {
    transition: none;
  }
}

.helper-body p {
  margin: 0;
}
.helper-body ol {
  margin: 0;
  padding-left: 1.25em;
}
.helper-body li {
  padding-left: 2px;
  margin-bottom: 5px;
}
.helper-body li::marker {
  font-size: 11px;
  color: var(--text-2);
}

.visual-overview {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 28px 0 36px;
}
.visual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 16px;
}
.visual-tabs {
  display: flex;
  gap: 22px;
}
.visual-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-2);
}
.visual-tabs button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 650;
}
.visual-tabs button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
}
.visual-caption {
  color: var(--text-3);
  font-size: 11px;
}
.visual-panel {
  padding-bottom: 24px;
}
.result-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.result-images figure {
  margin: 0;
  min-width: 0;
}
.result-images figcaption {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.result-sign {
  font: 17px var(--mono);
}
.result-sign-before {
  color: var(--del);
}
.result-sign-after {
  color: var(--accent);
}
.result-images img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
}
.result-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 26px;
}
.result-controls p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
}
.result-controls button {
  white-space: nowrap;
  font-size: 12px;
}
.result-video video {
  display: block;
  width: 100%;
  max-height: 560px;
  background: #101820;
}
.visual-summary {
  font-size: 14px;
  color: var(--text-2);
  margin: 4px 0 32px;
  max-width: 70ch;
}
.sequence-viewport {
  overflow-x: auto;
}
.sequence-diagram {
  display: block;
  width: 100%;
}
.sequence-diagram text {
  fill: var(--text);
  font: 12px var(--font);
}
.sequence-diagram .lifeline {
  stroke: var(--border-strong);
  stroke-dasharray: 5 6;
}
.sequence-diagram .participant {
  fill: var(--surface);
  stroke: var(--border-strong);
}
.sequence-diagram .participant.changed {
  stroke: var(--accent);
}
.sequence-diagram a:hover .participant,
.sequence-diagram a:focus .participant {
  fill: var(--surface-2);
  stroke: var(--accent);
  stroke-width: 2;
}
.sequence-diagram .participant-title {
  font-weight: 650;
}
.sequence-diagram .participant-detail {
  font-size: 10px;
  fill: var(--text-2);
}
.sequence-message path {
  fill: none;
  stroke: var(--text-2);
  stroke-width: 1.2;
}
.sequence-message.return path {
  stroke-dasharray: 5 4;
}
.sequence-message text {
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 5;
  stroke-linejoin: round;
}
.sequence-diagram marker path {
  fill: var(--text-2);
}
.sequence-diagram .fragment {
  fill: none;
  stroke: var(--border-strong);
}
.sequence-diagram .fragment-tab {
  fill: var(--surface);
  stroke: var(--border-strong);
}
.sequence-diagram .fragment-divider {
  stroke: var(--border-strong);
  stroke-dasharray: 6 5;
}
.sequence-diagram .fragment-guard {
  font-size: 11px;
  fill: var(--text-2);
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 5;
}
.sequence-diagram .fragment-operator {
  font-size: 11px;
  font-weight: 650;
}
.sequence-pan {
  display: none;
}
.interfig-frame {
  width: 100%;
  height: 900px;
  border: 0;
  background: #fff;
}
.explainer-video {
  display: block;
  width: 100%;
  max-height: 620px;
  background: #101820;
}
@media (max-width: 1000px) {
  .sequence-pan {
    display: block;
    color: var(--text-3);
    font-size: 11px;
    margin: 12px 0 0;
  }
}
@media (max-width: 760px) {
  .visual-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .visual-tabs {
    gap: 22px;
  }
  .result-images {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .result-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .visual-summary {
    font-size: 13px;
    margin-bottom: 20px;
  }
}


.visual-tabs { flex-wrap: wrap; gap: 4px 22px; }
.visual-toolbar { align-items: flex-start; flex-wrap: wrap; }
.change-infographic { margin: 8px 0 24px; }
.change-infographic img { display: block; width: 100%; height: auto; border-radius: 4px; }
.change-infographic figcaption { margin-top: 10px; font-size: 12px; color: var(--text-2); }
.review-focus { margin: 12px 0 0; color: var(--text-2); font-size: 14px; }
.review-focus strong { color: var(--text); font-weight: 600; }

#visual-architecture {
  width: min(1480px, calc(100vw - 64px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.architecture-map { margin: 8px 0; min-height: 460px; overflow-wrap: anywhere; }
.architecture-map figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.architecture-map figcaption > span { color: var(--text-3); font-size: 11px; }
.architecture-scope { display: flex; gap: 4px; }
.architecture-scope button { padding: 7px 14px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-2); font-size: 12px; }
.architecture-scope button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); border-color: var(--text-3); }
.system-root { width: fit-content; max-width: 100%; margin: 0 auto; padding: 12px 24px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 6px; font: 15px var(--mono); text-align: center; }
.system-tree { overflow-x: auto; padding: 0 12px 8px; }
.system-canvas { min-width: calc(var(--system-columns) * 180px); }
.system-grid { display: grid; grid-template-columns: repeat(var(--system-columns), minmax(0, 1fr)); gap: 26px 22px; position: relative; padding-top: 32px; align-items: start; }
.system-tree:not(.system-tree-focused) .system-canvas { min-width: 0; }
.system-tree:not(.system-tree-focused) .system-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.system-tree:not(.system-tree-focused) .system-family::before,
.system-tree:not(.system-tree-focused) .system-family::after { display: none; }
.system-grid::before { content: ""; position: absolute; height: 17px; top: 0; left: 50%; border-left: 1px solid var(--border-strong); }
.system-family { position: relative; border: 1px solid color-mix(in srgb, var(--system-color) 45%, var(--border)); border-radius: 7px; background: var(--surface); }
.system-family::before { content: ""; position: absolute; top: -17px; height: 16px; left: 50%; border-left: 1px solid var(--border-strong); }
.system-family::after { content: ""; position: absolute; left: -12px; right: -12px; top: -17px; border-top: 1px solid var(--border-strong); }
.system-family summary { display: grid; grid-template-columns: 10px 1fr; gap: 6px; padding: 16px; border-radius: 6px; border-top: 3px solid var(--system-color); background: color-mix(in srgb, var(--system-color) 9%, var(--surface)); cursor: pointer; }
.system-family summary::before { content: "▸"; color: var(--text-2); }
.system-family[open] summary::before { content: "▾"; }
.system-family summary strong { font-size: 15px; flex: 1; }
.system-family summary > span { grid-column: 2; color: var(--text-2); font: 11px var(--mono); white-space: nowrap; }
.system-body { padding: 0 16px 16px; }
.system-body:empty { display: none; }
.system-branches { list-style: none; margin: 0 0 0 8px; padding: 0 0 0 16px; border-left: 1px solid color-mix(in srgb, var(--system-color) 35%, var(--border)); }
.system-branches > li { position: relative; padding-top: 14px; }
.system-branches > li::before { content: ""; position: absolute; top: 34px; left: -16px; width: 15px; border-top: 1px solid color-mix(in srgb, var(--system-color) 35%, var(--border)); }
.system-node { border: 1px solid var(--border); border-radius: 5px; padding: 10px; font-size: 13px; color: var(--text-2); }
.system-node.system-changed { border: 2px solid var(--system-color); padding: 9px; background: color-mix(in srgb, var(--system-color) 6%, var(--surface)); color: var(--text); }
.system-change-label { display: block; color: var(--text-2); font-size: 10px; margin-top: 3px; }
.system-changes { list-style: none; margin: 8px 0 0; padding: 0; }
.system-changes li { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; color: var(--text-2); font-size: 11px; }
.system-changes code { font: 11px var(--mono); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-changes li > span { font: 13px var(--mono); }
.system-color-0 { --system-color: #6475e9; }
.system-color-1 { --system-color: #279d92; }
.system-color-2 { --system-color: #ba8c35; }
.system-color-3 { --system-color: #b06bbd; }
.system-color-4 { --system-color: #4b94c6; }
.system-color-5 { --system-color: #cb7860; }
.system-color-6 { --system-color: #839b4b; }
.system-color-7 { --system-color: #a17c97; }
.system-color-8 { --system-color: #8c82cd; }
.system-color-9 { --system-color: #619d74; }
.system-color-10 { --system-color: #b79064; }
.system-color-11 { --system-color: #568f9c; }
@media (max-width: 760px) {
  .visual-tabs { gap: 4px 16px; }
  .visual-tabs button { font-size: 12px; }
  .visual-caption { display: none; }
  #visual-architecture { width: 100%; }
  .architecture-map figcaption { align-items: flex-start; flex-direction: column; }
  .system-tree-focused .system-canvas { min-width: 0; }
  .system-tree-focused .system-grid { grid-template-columns: 1fr; padding-left: 12px; }
  .system-tree-focused .system-grid::before { left: 0; top: 16px; bottom: 0; height: auto; }
  .system-tree-focused .system-family::before { display: none; }
  .system-tree-focused .system-family::after { left: -13px; right: auto; width: 12px; top: 25px; }
}

.dev-stats {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.dev-stats::backdrop { background: #0009; }
.dev-stats-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.dev-stats-heading h2, .dev-stats-heading h3 { margin: 0; }
.dev-stats h3 { font-size: 15px; }
.dev-stats p { margin: 8px 0 16px; }
.dev-stats-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.dev-stats-totals span, .dev-stats-totals strong { display: block; }
.dev-stats-totals strong { font-size: 28px; }
.dev-stats-muted, .dev-stats dt, .dev-stats-totals span { color: var(--text-2); font-size: 12px; }
.dev-stats-scope { border-top: 1px solid var(--border); padding: 20px 0; }
.dev-stats dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.dev-stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.dev-stats summary { cursor: pointer; min-height: 40px; padding: 8px 0; }
.dev-stats code { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .dev-stats { padding: 20px; }
  .dev-stats dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-right:has(.dev-stats) #reading-progress { display: none; }
}

.dev-stats > .dev-stats-heading { position: sticky; top: 0; background: var(--surface); z-index: 1; padding-bottom: 12px; }

.infographic-preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.infographic-dialog {
  width: min(1600px, 96vw);
  max-width: 96vw;
  max-height: 94vh;
  padding: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
}
.infographic-dialog::backdrop { background: #0009; }
.infographic-dialog > button { margin-bottom: 12px; }
.infographic-dialog > div { overflow: auto; max-height: 80vh; }
.change-infographic .infographic-dialog img { width: 1536px; max-width: none; }

.result-video { position: relative; }
.comparison-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; white-space: nowrap; padding: 14px 22px; color: #faf8f2; background: #1c1d20ed; border: 1px solid #aaa69d; box-shadow: 0 3px 18px #0008; }
.comparison-play:hover { background: #343538; }

.video-status {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1rem;
  min-height: 18rem;
  padding: 2rem;
  text-align: center;
}
.video-status h3,
.video-status p {
  margin: 0;
}
.video-status p {
  max-width: 48ch;
  color: var(--text-2);
}
.video-status progress {
  width: min(24rem, 100%);
}

/* One identity for the website and the portable story reader. */
:root {
  --bg: #f7f7f5; --surface: #fff; --surface-2: #f4f5f7; --surface-3: #eceef2;
  --border: #dedfe4; --border-strong: #c4c8d1;
  --text: #20232b; --text-2: #5c6370; --text-3: #626b7a;
  --accent: #465fe9; --accent-soft: #edf0ff;
  --font: 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --ink: var(--text); --muted: var(--text-2); --line: var(--border);
  --blue: var(--accent); --blue-light: var(--accent-soft); --wash: var(--surface-2);
  --edge: 1px solid var(--border); --side: none;
}
.wordmark, .brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text);
  font: 700 22px/1 var(--font); letter-spacing: -.8px; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.wordmark:hover, .brand:hover { color: var(--accent); }
.brand-icon { display: block; width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 700; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 760px) {
  .wordmark, .brand { font-size: 20px; gap: 8px; }
  .brand-icon { width: 30px; height: 30px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #101217; --surface: #181b22; --surface-2: #1e222b; --surface-3: #272c37;
    --border: #303642; --border-strong: #454d5e; --text: #eceef3;
    --text-2: #b6bfce; --text-3: #a6b1c3; --accent: #96a7ff; --accent-soft: #252e50;
  }
}
:root[data-theme=dark] {
  --bg: #101217; --surface: #181b22; --surface-2: #1e222b; --surface-3: #272c37;
  --border: #303642; --border-strong: #454d5e; --text: #eceef3;
  --text-2: #b6bfce; --text-3: #a6b1c3; --accent: #96a7ff; --accent-soft: #252e50;
}

/* Page composition only: palette, type, controls and Settings come from the reader. */
.site-page { display: flex; flex-direction: column; }
.site-page main { flex: 1; min-height: 0; height: auto; max-width: 1244px; margin: auto; padding: 32px; }
.site-page header { flex-shrink: 0; }
.site-page header { gap: 16px; }
.site-page header nav, .actions, .pr-actions, .repo-filters, .downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.site-page header nav a { color: var(--text-2); text-decoration: none; }
.site-page header nav a[aria-current], .site-page header nav a:hover { color: var(--accent); }
.site-page h1 { overflow-wrap: anywhere; }
.site-page h2 { font-size: 18px; line-height: 1.4; margin: 0 0 12px; }
.site-page p { max-width: 75ch; }
.site-page input { min-width: 0; padding: 10px 13px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font: inherit; }
.site-page input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-page .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 5px; text-decoration: none; color: var(--text); font: inherit; }
.site-page .button:hover { background: var(--surface-3); }
.site-page .primary, .site-page [aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.site-page button:disabled { opacity: .6; cursor: not-allowed; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 20px 0 32px; }
.page-title .button { flex-shrink: 0; }
.page-grid, .repository-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel, .repository-card, .empty, .automation-panel { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.repository-card, .example { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.repository-card:hover, .example:hover { border-color: var(--accent); }
.repository-card strong { display: block; font-size: 18px; }
.repository-card p, .generation-note, .repo-meta, .pull-row small, #status, #signup-error { color: var(--text-2); }
.repo-meta, .automation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.repo-meta, .generation-note { font-size: 12px; }
.badge { display: inline-block; border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; font-size: 12px; }
.badge.ready { color: var(--add); background: var(--add-bg); }
.badge.failed, .notice { color: var(--del); background: var(--del-bg); }
.notice { padding: 12px; border-radius: 5px; }
.repo-filters, .pr-actions { margin: 24px 0; }
.repo-search { flex: 1; }
.pull-heading { margin-top: 32px !important; }
.pull-list { list-style: none; padding: 0; border-top: 1px solid var(--border); }
.pull-row { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.pull-row>a { flex: 1; color: var(--text); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.pull-row small { display: block; font-weight: 400; margin-top: 4px; }
.metrics { display: flex; flex-wrap: wrap; gap: 20px; color: var(--text-2); padding: 16px 0; border-block: 1px solid var(--border); }
.revision { font: 12px/1.6 var(--mono); color: var(--text-2); overflow-wrap: anywhere; }
.older>a { display: block; padding: 8px 0; }
.setup-steps { display: flex; flex-wrap: wrap; gap: 24px; padding: 0; margin: 32px 0; list-style: none; counter-reset: setup; color: var(--text-2); }
.setup-steps li { display: flex; align-items: center; gap: 8px; counter-increment: setup; }
.setup-steps li::before { content: counter(setup); display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; }
.setup-steps .done::before { content: '✓'; color: var(--add); background: var(--add-bg); }
.setup-steps [aria-current] { color: var(--accent); }
.setup-back { display: inline-block; margin: 16px; }
.automation-panel details { margin-top: 20px; }
.site-page summary { cursor: pointer; }
.site-page progress { width: 100%; accent-color: var(--accent); }
.site-page #status:empty, .site-page #signup-error:empty { display: none; }
.site-page #breadcrumbs { min-height: 20px; }
.site-page .example { padding: 0; overflow: hidden; }
.example img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.example>div { padding: 24px; }
.example span { color: var(--accent); }
.signup main, .privacy main { max-width: 820px; }
.signup h1 { margin-top: 48px; }
.signup #github-signin { margin: 24px 0; }
.signin-permissions { padding-block: 24px; border-top: 1px solid var(--border); }
.signin-permissions p { color: var(--text-2); }
.pending-pr { overflow-wrap: anywhere; }
.privacy h2 { margin-top: 32px; }
.privacy p { color: var(--text-2); }
.site-page video { display: block; width: 100%; max-height: 70vh; border-radius: var(--radius); background: var(--surface); }
.downloads, .watch .actions { margin-top: 24px; }
.site-footer { display: flex; gap: 24px; margin-top: 64px; padding-block: 24px; border-top: 1px solid var(--border); font-size: 12px; }
@media(max-width: 760px) {
  .site-page header { height: auto; min-height: 58px; flex-wrap: wrap; padding: 12px 18px; }
  .site-page .header-right { flex-wrap: wrap; gap: 12px; }
  .site-page main { padding: 24px 18px; }
  .page-grid, .repository-grid { grid-template-columns: 1fr; }
  .page-title { align-items: start; flex-direction: column; }
  .pull-row { align-items: start; }
  .site-page #identity { display: none; }
}
