:root {
  color-scheme: light;
  --anth-paper: #f1efe7;
  --anth-surface: #fffdf8;
  --anth-soft: #f8f5ed;
  --anth-muted-surface: #e8e4da;
  --anth-ink: #1f1e1b;
  --anth-muted: #676158;
  --anth-faint: #8c857a;
  --anth-line: #d7d1c5;
  --anth-line-strong: #aaa195;
  --anth-coral: #d97757;
  --anth-coral-deep: #b85e45;
  --anth-coral-soft: #f5e5dc;
  --anth-sage: #6d7d72;
  --anth-sage-soft: #e8eee8;
  --anth-blue: #607c83;
  --anth-blue-soft: #e7eef0;
  --anth-ochre: #b9874f;
  --anth-red: #b95745;
  --anth-black: #181817;
  --anth-black-soft: #24231f;
  --anth-black-line: #48443d;
  --anth-black-ink: #f7f3ea;
  --anth-sans: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --anth-serif: "Noto Serif CJK SC", "Songti SC", STSong, Georgia, serif;
  --anth-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --anth-motion-fast: 170ms;
  --anth-motion-medium: 280ms;
  --anth-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  min-width: 320px;
  background: var(--anth-paper);
}

body[data-viewer] {
  min-width: 320px;
  background: var(--anth-paper);
  color: var(--anth-ink);
  font-family: var(--anth-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-viewer] * {
  letter-spacing: 0;
}

body[data-viewer] .gt-viewer-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  max-width: 1540px;
  margin: 0 auto;
  padding: 14px 24px 0;
  color: var(--anth-muted);
  font: 12px/1.6 var(--anth-sans);
  overflow-wrap: anywhere;
}

body[data-viewer] .gt-viewer-breadcrumb a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

body[data-viewer] .gt-viewer-breadcrumb a:hover {
  text-decoration: underline;
}

body[data-viewer] .gt-viewer-breadcrumb [aria-current] {
  min-width: 0;
  color: var(--anth-ink);
}

@media (max-width: 600px) {
  body[data-viewer] .gt-viewer-breadcrumb {
    padding: 12px 13px 0;
  }
}

body[data-viewer] :focus-visible {
  outline: 3px solid var(--anth-coral);
  outline-offset: 2px;
}

body[data-viewer] h1 {
  color: var(--anth-ink);
  font-family: var(--anth-sans);
  font-weight: 800;
}

body[data-viewer] .intro p,
body[data-viewer] .task,
body[data-viewer] .document-head p,
body[data-viewer] .summary-main p {
  font-family: var(--anth-serif);
}

body[data-viewer="claude"] {
  --ink: var(--anth-ink);
  --muted: var(--anth-muted);
  --paper: var(--anth-paper);
  --panel: var(--anth-surface);
  --line: var(--anth-line);
  --green: var(--anth-sage);
  --green-soft: var(--anth-sage-soft);
  --orange: var(--anth-coral);
  --blue: var(--anth-blue);
  --red: var(--anth-red);
  --sans: var(--anth-sans);
  --mono: var(--anth-mono);
}

body[data-viewer="openclaw"] {
  --bg: var(--anth-paper);
  --surface: var(--anth-surface);
  --surface2: var(--anth-soft);
  --line: var(--anth-line);
  --text: var(--anth-ink);
  --muted: var(--anth-muted);
  --mint: var(--anth-sage);
  --amber: var(--anth-ochre);
  --cyan: var(--anth-blue);
  --coral: var(--anth-coral);
  --sans: var(--anth-sans);
  --mono: var(--anth-mono);
}

body[data-viewer="hermes"] {
  --ink: var(--anth-ink);
  --muted: var(--anth-muted);
  --paper: var(--anth-paper);
  --white: var(--anth-surface);
  --line: var(--anth-line);
  --violet: var(--anth-coral);
  --teal: var(--anth-sage);
  --amber: var(--anth-ochre);
  --red: var(--anth-red);
  --soft-violet: var(--anth-coral-soft);
  --soft-teal: var(--anth-sage-soft);
  --sans: var(--anth-sans);
  --mono: var(--anth-mono);
}

body[data-viewer="math"] {
  --ink: var(--anth-ink);
  --muted: var(--anth-muted);
  --paper: var(--anth-paper);
  --white: var(--anth-surface);
  --line: var(--anth-line);
  --red: var(--anth-coral-deep);
  --red-soft: var(--anth-coral-soft);
  --blue: var(--anth-blue);
  --green: var(--anth-sage);
  --yellow: var(--anth-ochre);
  --sans: var(--anth-sans);
  --mono: var(--anth-mono);
}

body[data-viewer="physics"] {
  --ink: var(--anth-ink);
  --muted: var(--anth-muted);
  --paper: var(--anth-paper);
  --white: var(--anth-surface);
  --line: var(--anth-line);
  --teal: var(--anth-sage);
  --teal-soft: var(--anth-sage-soft);
  --orange: var(--anth-coral);
  --orange-soft: var(--anth-coral-soft);
  --blue: var(--anth-blue);
  --graph: #ded8cc;
  --sans: var(--anth-sans);
  --serif: var(--anth-serif);
  --mono: var(--anth-mono);
}

body[data-viewer] .topbar,
body[data-viewer] .bar,
body[data-viewer] > .header {
  border-color: var(--anth-line);
  background: color-mix(in srgb, var(--anth-paper) 96%, transparent);
  color: var(--anth-ink);
  box-shadow: none;
  backdrop-filter: none;
}

body[data-viewer] .brand {
  color: var(--anth-ink);
  font-weight: 800;
}

body[data-viewer] .brand small,
body[data-viewer] .brand span,
body[data-viewer] .brand b {
  color: var(--anth-coral-deep);
}

body[data-viewer] .language-control,
body[data-viewer] .language-control label {
  display: inline-flex;
  align-items: center;
}

body[data-viewer] .language-control label {
  min-height: 34px;
  border: 1px solid var(--anth-line);
  border-radius: 4px;
  background: var(--anth-surface);
  overflow: hidden;
}

body[data-viewer] .language-control-label {
  padding: 0 8px 0 10px;
  color: var(--anth-faint);
  font: 700 9px var(--anth-mono);
  text-transform: uppercase;
}

body[data-viewer] .language-control-select {
  align-self: stretch;
  min-width: 78px;
  padding: 0 25px 0 8px;
  border: 0;
  border-left: 1px solid var(--anth-line);
  border-radius: 0;
  background: var(--anth-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23676158' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 7px center;
  color: var(--anth-ink);
  font: 700 10px var(--anth-mono);
  appearance: none;
  cursor: pointer;
}

body[data-viewer] .language-control-select:focus-visible {
  outline: 2px solid var(--anth-coral);
  outline-offset: -2px;
}

body[data-viewer] .link-button,
body[data-viewer] .action,
body[data-viewer] .downloads a,
body[data-viewer] .header-actions a,
body[data-viewer] .header nav a {
  border-color: var(--anth-line);
  border-radius: 4px;
  background: transparent;
  color: var(--anth-ink);
}

body[data-viewer] .link-button:hover,
body[data-viewer] .action:hover,
body[data-viewer] .downloads a:hover,
body[data-viewer] .header-actions a:hover,
body[data-viewer] .header nav a:hover {
  border-color: var(--anth-ink);
  background: var(--anth-soft);
}

body[data-viewer] .link-button.primary,
body[data-viewer] .action.download,
body[data-viewer] .downloads .primary,
body[data-viewer] .header-actions .download,
body[data-viewer] .header nav .download {
  border-color: var(--anth-black);
  background: var(--anth-black);
  color: var(--anth-black-ink);
}

body[data-viewer] .link-button.primary:hover,
body[data-viewer] .action.download:hover,
body[data-viewer] .downloads .primary:hover,
body[data-viewer] .header-actions .download:hover,
body[data-viewer] .header nav .download:hover {
  border-color: var(--anth-coral-deep);
  background: var(--anth-coral-deep);
  color: #fff;
}

body[data-viewer] input[type="search"] {
  border-color: var(--anth-line);
  border-radius: 4px;
  background: var(--anth-surface);
  color: var(--anth-ink);
}

body[data-viewer] input[type="search"]:focus {
  border-color: var(--anth-coral);
}

body[data-viewer] pre {
  border-color: var(--anth-line);
  border-radius: 3px;
  background: var(--anth-soft);
  color: var(--anth-ink);
}

/* Claude Code: audit ledger */
body[data-viewer="claude"] .intro,
body[data-viewer="claude"] .stats,
body[data-viewer="claude"] .workspace,
body[data-viewer="claude"] .turn,
body[data-viewer="claude"] .inspector {
  background: var(--anth-surface);
}

body[data-viewer="claude"] .intro {
  padding-top: 46px;
  padding-bottom: 34px;
}

body[data-viewer="claude"] .intro h1 {
  margin-top: 18px;
  font-size: clamp(32px, 4vw, 58px);
}

body[data-viewer="claude"] .kicker,
body[data-viewer="claude"] .brand small {
  color: var(--anth-coral-deep);
}

body[data-viewer="claude"] .selection-note {
  border-radius: 3px;
  background: var(--anth-coral-soft);
  color: var(--anth-coral-deep);
}

body[data-viewer="claude"] .selection-note i {
  background: var(--anth-coral);
}

body[data-viewer="claude"] .workspace {
  border-radius: 6px;
  overflow: hidden;
}

body[data-viewer="claude"] .ledger-head,
body[data-viewer="claude"] .inspector-head,
body[data-viewer="claude"] .tool-call summary {
  background: var(--anth-soft);
}

body[data-viewer="claude"] .type-filter,
body[data-viewer="hermes"] .type-filter {
  border-color: var(--anth-line);
  border-radius: 3px;
  background-color: var(--anth-surface);
  color: var(--anth-ink);
}

body[data-viewer="claude"] .type-filter:focus,
body[data-viewer="hermes"] .type-filter:focus {
  border-color: var(--anth-coral);
}

body[data-viewer="claude"] .turn:hover {
  background: var(--anth-soft);
}

body[data-viewer="claude"] .turn.active {
  background: var(--anth-coral-soft);
  box-shadow: inset 3px 0 var(--anth-coral);
}

body[data-viewer="claude"] .prose,
body[data-viewer="claude"] .code,
body[data-viewer="claude"] .dim {
  background: var(--anth-soft);
}

body[data-viewer="claude"] .reasoning {
  border-left-color: var(--anth-coral);
  background: var(--anth-coral-soft);
}

body[data-viewer="claude"] .type,
body[data-viewer="claude"] .tool-name {
  color: var(--anth-blue);
}

/* OpenClaw: warm editorial shell with a dark topology plate. */
body[data-viewer="openclaw"] .mast {
  padding-top: 46px;
  padding-bottom: 36px;
  border-color: var(--anth-line);
  background: var(--anth-surface);
}

body[data-viewer="openclaw"] .mast h1 {
  font-size: clamp(34px, 4vw, 60px);
}

body[data-viewer="openclaw"] .eyebrow,
body[data-viewer="openclaw"] .quality strong {
  color: var(--anth-coral-deep);
}

body[data-viewer="openclaw"] .quality {
  border-color: var(--anth-line);
}

body[data-viewer="openclaw"] .selected {
  border-color: var(--anth-line);
  color: var(--anth-ochre);
}

body[data-viewer="openclaw"] .flow {
  border-color: var(--anth-line);
  border-radius: 6px;
  background: var(--anth-surface);
  color: var(--anth-ink);
}

body[data-viewer="openclaw"] .flow .lane {
  border-color: var(--anth-line);
}

body[data-viewer="openclaw"] .flow .lane-label {
  color: var(--anth-muted);
}

body[data-viewer="openclaw"] .flow .node {
  border-color: var(--anth-line-strong);
  background: var(--anth-soft);
  color: var(--anth-ink);
}

body[data-viewer="openclaw"] .flow .node::before {
  background: var(--anth-line-strong);
}

body[data-viewer="openclaw"] .flow .node.user {
  border-color: var(--anth-blue);
  background: var(--anth-blue-soft);
  color: var(--anth-blue);
}

body[data-viewer="openclaw"] .flow .node.tool {
  border-color: var(--anth-sage);
  background: var(--anth-sage-soft);
  color: var(--anth-sage);
}

body[data-viewer="openclaw"] .flow .node.subagent {
  border-color: var(--anth-ochre);
  background: var(--anth-coral-soft);
  color: var(--anth-black);
}

body[data-viewer="openclaw"] .flow .node.merge {
  border-color: var(--anth-coral);
  background: var(--anth-coral-soft);
  color: var(--anth-coral-deep);
}

body[data-viewer="openclaw"] .flow .node.active {
  background: var(--anth-coral);
  color: var(--anth-black);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.2);
}

body[data-viewer="openclaw"] .stream,
body[data-viewer="openclaw"] .detail {
  border-color: var(--anth-line);
  border-radius: 6px;
  background: var(--anth-surface);
  color: var(--anth-ink);
}

body[data-viewer="openclaw"] .stream {
  overflow: hidden;
}

body[data-viewer="openclaw"] .detail {
  overflow: auto;
  overscroll-behavior: contain;
}

body[data-viewer="openclaw"] .search,
body[data-viewer="openclaw"] pre {
  background: var(--anth-soft);
  color: var(--anth-ink);
}

body[data-viewer="openclaw"] .segments button.active {
  background: var(--anth-coral);
  border-color: var(--anth-coral);
  color: var(--anth-black);
}

body[data-viewer="openclaw"] .flow .node.subagent:hover,
body[data-viewer="openclaw"] .flow .node.subagent.active {
  background: var(--anth-coral);
  border-color: var(--anth-coral);
  color: var(--anth-black);
}

body[data-viewer="openclaw"] .event:hover,
body[data-viewer="openclaw"] .event.active {
  background: var(--anth-coral-soft);
}

body[data-viewer="openclaw"] .event.active {
  box-shadow: inset 3px 0 var(--anth-coral);
}

body[data-viewer="openclaw"] .detail-head {
  background: var(--anth-soft);
}

body[data-viewer="openclaw"] .detail-head span,
body[data-viewer="openclaw"] .call-head b {
  color: var(--anth-coral-deep);
}

/* Hermes: function calls and skill evolution. */
body[data-viewer="hermes"] .header,
body[data-viewer="hermes"] .hero,
body[data-viewer="hermes"] .tabs-wrap {
  background: var(--anth-surface);
}

body[data-viewer="hermes"] .hero {
  padding-top: 44px;
  padding-bottom: 38px;
}

body[data-viewer="hermes"] .hero h1 {
  font-size: clamp(34px, 3.6vw, 56px);
}

body[data-viewer="hermes"] .eyebrow,
body[data-viewer="hermes"] .selection,
body[data-viewer="hermes"] .tab em {
  color: var(--anth-coral-deep);
}

body[data-viewer="hermes"] .tab.active {
  border-bottom-color: var(--anth-coral);
}

body[data-viewer="hermes"] .call-browser,
body[data-viewer="hermes"] .inspector,
body[data-viewer="hermes"] .skill-browser,
body[data-viewer="hermes"] .skill-summary {
  border-color: var(--anth-line);
  border-radius: 6px;
  background: var(--anth-surface);
}

body[data-viewer="hermes"] .call-browser,
body[data-viewer="hermes"] .skill-browser,
body[data-viewer="hermes"] .skill-summary {
  overflow: hidden;
}

body[data-viewer="hermes"] .inspector {
  overflow: auto;
  overscroll-behavior: contain;
}

body[data-viewer="hermes"] .inspector-head {
  background: var(--anth-soft);
}

body[data-viewer="hermes"] .row,
body[data-viewer="hermes"] .skill-event {
  background: var(--anth-surface);
}

body[data-viewer="hermes"] .row:hover,
body[data-viewer="hermes"] .row.active,
body[data-viewer="hermes"] .skill-event:hover,
body[data-viewer="hermes"] .skill-event.active {
  background: var(--anth-coral-soft);
}

body[data-viewer="hermes"] .row.active,
body[data-viewer="hermes"] .skill-event.active {
  box-shadow: inset 3px 0 var(--anth-coral);
}

body[data-viewer="hermes"] .row .kind,
body[data-viewer="hermes"] .inspector-head span,
body[data-viewer="hermes"] .skill-event strong span {
  color: var(--anth-coral-deep);
}

body[data-viewer="hermes"] .tool-head {
  background: var(--anth-sage-soft);
}

body[data-viewer="openclaw"] .trajectory-length,
body[data-viewer="hermes"] .trajectory-length {
  border-color: var(--anth-line);
  background: var(--anth-soft);
  color: var(--anth-muted);
}

body[data-viewer="openclaw"] .trajectory-length b,
body[data-viewer="hermes"] .trajectory-length b {
  color: var(--anth-ink);
}

/* Mathematics: editorial dossier with explicit reasoning evidence. */
body[data-viewer="math"] .header,
body[data-viewer="math"] .document,
body[data-viewer="math"] .score-block,
body[data-viewer="math"] .case-meta {
  background: var(--anth-surface);
}

body[data-viewer="math"] .case-rail h1,
body[data-viewer="math"] .document-head h2 {
  font-family: var(--anth-serif);
  font-weight: 650;
}

body[data-viewer="math"] .score-block,
body[data-viewer="math"] .case-meta,
body[data-viewer="math"] .document {
  border-color: var(--anth-line);
  border-radius: 6px;
  overflow: hidden;
}

body[data-viewer="math"] .score-block {
  border-top-color: var(--anth-coral);
}

body[data-viewer="math"] .tabs,
body[data-viewer="math"] .document-head {
  background: var(--anth-soft);
}

body[data-viewer="math"] .tab.active {
  background: var(--anth-black);
  color: var(--anth-black-ink);
}

body[data-viewer="math"] .selection,
body[data-viewer="math"] .response-banner,
body[data-viewer="math"] .evaluation {
  background: var(--anth-coral-soft);
}

body[data-viewer="math"] .rubric-step b,
body[data-viewer="math"] .formula-block,
body[data-viewer="math"] .formula-inline {
  background: var(--anth-soft);
}

body[data-viewer="math"] .keyword {
  background: var(--anth-blue-soft);
  color: var(--anth-blue);
}

body[data-viewer="math"] .machine-strip {
  border-radius: 4px;
  background: var(--anth-black);
  color: var(--anth-black-ink);
}

/* Physics: scientific bench with the same editorial shell. */
body[data-viewer="physics"] .header {
  border-bottom: 1px solid var(--anth-line);
  background: var(--anth-paper);
  color: var(--anth-ink);
}

body[data-viewer="physics"] .rail,
body[data-viewer="physics"] .summary-band,
body[data-viewer="physics"] .sheet {
  border-color: var(--anth-line);
  border-radius: 6px;
  background: var(--anth-surface);
  overflow: hidden;
}

body[data-viewer="physics"] .rail-head h1,
body[data-viewer="physics"] .summary-main h2 {
  font-family: var(--anth-serif);
  font-weight: 650;
}

body[data-viewer="physics"] .score,
body[data-viewer="physics"] .column.model .column-head {
  background: var(--anth-coral-soft);
}

body[data-viewer="physics"] .nav button.active {
  background: var(--anth-coral-soft);
  color: var(--anth-coral-deep);
  box-shadow: inset 3px 0 var(--anth-coral);
}

body[data-viewer="physics"] .sheet-head,
body[data-viewer="physics"] .score-margin {
  background: var(--anth-soft);
}

body[data-viewer="physics"] .evidence-banner {
  background: linear-gradient(180deg, var(--anth-coral-soft), var(--anth-surface));
}

body[data-viewer="physics"] .evidence-step .idx {
  background: var(--anth-soft);
  border-color: var(--anth-line);
}

body[data-viewer="physics"] .evidence-step .mark.full {
  background: var(--anth-sage-soft);
  border-color: color-mix(in srgb, var(--anth-sage) 35%, var(--anth-line));
  color: var(--anth-sage);
}

body[data-viewer="physics"] .evidence-step .mark.zero {
  background: var(--anth-coral-soft);
  border-color: color-mix(in srgb, var(--anth-coral) 35%, var(--anth-line));
  color: var(--anth-coral-deep);
}

body[data-viewer="physics"] .evidence-step .bar i {
  background: var(--anth-sage);
}

body[data-viewer="physics"] .evidence-step .bar i.partial {
  background: var(--anth-coral);
}

body[data-viewer="physics"] .evidence-summary {
  background: var(--anth-sage-soft);
}

body[data-viewer="physics"] .column.reference .column-head {
  background: var(--anth-sage-soft);
}

body[data-viewer="physics"] .graph-paper .scientific,
body[data-viewer="physics"] .formula-block,
body[data-viewer="physics"] .formula-inline {
  background: color-mix(in srgb, var(--anth-surface) 94%, transparent);
}

body[data-viewer="physics"] .keyword {
  background: var(--anth-sage-soft);
  color: var(--anth-sage);
}

/* Shared trajectory workbench language. */
body[data-viewer="claude"] .topbar,
body[data-viewer="openclaw"] .bar,
body[data-viewer="hermes"] .header {
  height: 62px;
  min-height: 62px;
  z-index: 30;
}

body[data-viewer="claude"] .intro h1,
body[data-viewer="openclaw"] .mast h1,
body[data-viewer="hermes"] .hero h1 {
  font-size: 52px;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

body[data-viewer="claude"] .turn,
body[data-viewer="openclaw"] .event,
body[data-viewer="hermes"] .row {
  min-height: 56px;
  align-items: center;
  border-color: var(--anth-line);
  scroll-margin-block: 68px;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

body[data-viewer="claude"] .ledger-head,
body[data-viewer="openclaw"] .stream-tools,
body[data-viewer="hermes"] .browser-head {
  min-height: 62px;
  border-color: var(--anth-line);
  background: var(--anth-soft);
}

body[data-viewer="claude"] .inspector-head,
body[data-viewer="openclaw"] .detail-head,
body[data-viewer="hermes"] .inspector-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-content: center;
  min-height: 76px;
  padding: 14px 18px;
  border-color: var(--anth-line);
  background: var(--anth-soft);
}

body[data-viewer="claude"] .inspector-head h2,
body[data-viewer="openclaw"] .detail-head h2,
body[data-viewer="hermes"] .inspector-head h2 {
  grid-row: 2;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

body[data-viewer="claude"] .inspector-head span,
body[data-viewer="openclaw"] .detail-head span,
body[data-viewer="hermes"] .inspector-head span {
  grid-row: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-viewer="claude"] .turn-list,
body[data-viewer="openclaw"] .events,
body[data-viewer="hermes"] .call-table,
body[data-viewer="hermes"] .skill-list {
  min-width: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body[data-viewer="openclaw"] .detail,
body[data-viewer="hermes"] .inspector,
body[data-viewer="hermes"] .skill-detail {
  scroll-margin-top: 78px;
}

body[data-viewer="claude"] .turn-title,
body[data-viewer="openclaw"] .event-title,
body[data-viewer="hermes"] .row .name {
  min-width: 0;
}

/* KaTeX output stays readable without widening or clipping the document. */
body[data-viewer="math"] .content,
body[data-viewer="math"] .evaluation,
body[data-viewer="math"] .rubric-step .markdown,
body[data-viewer="physics"] .scientific,
body[data-viewer="physics"] .column-content,
body[data-viewer="physics"] .grader,
body[data-viewer="physics"] .evidence-step .rationale,
body[data-viewer="physics"] .evidence-summary .markdown,
body[data-viewer="physics"] .rubric-item .markdown {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body[data-viewer] .katex {
  max-width: 100%;
  color: currentColor;
  font-size: 1.04em;
  vertical-align: -0.08em;
}

body[data-viewer] .katex-display {
  max-width: 100%;
  margin: 1.2em 0;
  padding: 12px 14px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border-left: 3px solid var(--anth-blue);
  background: var(--anth-soft);
  text-align: left;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

body[data-viewer] .katex-display > .katex {
  min-width: max-content;
  text-align: left;
  vertical-align: baseline;
}

body[data-viewer] .katex-error {
  color: var(--anth-coral-deep) !important;
  font-family: var(--anth-mono);
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Markdown content in academic answers and evidence panels. */
body[data-viewer="math"] .markdown,
body[data-viewer="physics"] .markdown {
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-viewer="math"] .markdown h1,
body[data-viewer="math"] .markdown h2,
body[data-viewer="math"] .markdown h3,
body[data-viewer="math"] .markdown h4,
body[data-viewer="physics"] .markdown h1,
body[data-viewer="physics"] .markdown h2,
body[data-viewer="physics"] .markdown h3,
body[data-viewer="physics"] .markdown h4 {
  margin: 1.35em 0 0.55em;
  font-family: var(--anth-serif);
  font-weight: 650;
  line-height: 1.25;
}

body[data-viewer="math"] .markdown h1,
body[data-viewer="physics"] .markdown h1 {
  font-size: 1.35em;
}

body[data-viewer="math"] .markdown h2,
body[data-viewer="physics"] .markdown h2 {
  font-size: 1.2em;
}

body[data-viewer="math"] .markdown h3,
body[data-viewer="physics"] .markdown h3 {
  font-size: 1.08em;
}

body[data-viewer="math"] .markdown p,
body[data-viewer="physics"] .markdown p {
  margin: 0 0 1em;
  line-height: 1.8;
}

body[data-viewer="math"] .markdown > :first-child,
body[data-viewer="physics"] .markdown > :first-child {
  margin-top: 0;
}

body[data-viewer="math"] .markdown ul,
body[data-viewer="math"] .markdown ol,
body[data-viewer="physics"] .markdown ul,
body[data-viewer="physics"] .markdown ol {
  margin: 0 0 1em;
  padding-left: 1.55em;
  line-height: 1.8;
}

body[data-viewer="math"] .markdown li + li,
body[data-viewer="physics"] .markdown li + li {
  margin-top: 0.35em;
}

body[data-viewer="math"] .markdown blockquote,
body[data-viewer="physics"] .markdown blockquote {
  margin: 1em 0;
  padding: 0.7em 1em;
  border-left: 3px solid var(--anth-coral);
  background: var(--anth-coral-soft);
  color: var(--anth-muted);
}

body[data-viewer="math"] .markdown code:not(pre code),
body[data-viewer="physics"] .markdown code:not(pre code) {
  padding: 0.12em 0.35em;
  border: 1px solid var(--anth-line);
  border-radius: 3px;
  background: var(--anth-soft);
  font-family: var(--anth-mono);
  font-size: 0.88em;
}

body[data-viewer="math"] .markdown pre,
body[data-viewer="physics"] .markdown pre {
  max-width: 100%;
  margin: 1em 0;
  padding: 14px;
  overflow: auto;
  white-space: pre;
  background: var(--anth-black);
  color: var(--anth-black-ink);
  font-family: var(--anth-mono);
  font-size: 0.88em;
  line-height: 1.6;
}

body[data-viewer="math"] .markdown hr,
body[data-viewer="physics"] .markdown hr {
  margin: 1.5em 0;
  border: 0;
  border-top: 1px solid var(--anth-line);
}

body[data-viewer="math"] .markdown table,
body[data-viewer="physics"] .markdown table {
  display: block;
  max-width: 100%;
  margin: 1em 0;
  overflow-x: auto;
  border-collapse: collapse;
}

body[data-viewer="math"] .markdown th,
body[data-viewer="math"] .markdown td,
body[data-viewer="physics"] .markdown th,
body[data-viewer="physics"] .markdown td {
  padding: 0.55em 0.75em;
  border: 1px solid var(--anth-line);
  text-align: left;
  vertical-align: top;
}

body[data-viewer="math"] .markdown th,
body[data-viewer="physics"] .markdown th {
  background: var(--anth-soft);
  font-weight: 700;
}

body[data-viewer="math"] .markdown input[type="checkbox"],
body[data-viewer="physics"] .markdown input[type="checkbox"] {
  margin-right: 0.45em;
  accent-color: var(--anth-coral);
}

body[data-viewer="math"] .score-block strong,
body[data-viewer="physics"] .score strong {
  font-size: 34px;
}

body[data-viewer="math"] .low-score-scale,
body[data-viewer="physics"] .score-rule {
  opacity: 0.72;
}

@keyframes viewer-panel-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes viewer-detail-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body[data-viewer] .link-button,
body[data-viewer] .action,
body[data-viewer] .downloads a,
body[data-viewer] .header-actions a,
body[data-viewer] .header nav a,
body[data-viewer] .tab,
body[data-viewer] .segments button,
body[data-viewer="physics"] .nav button,
body[data-viewer="claude"] .turn,
body[data-viewer="openclaw"] .event,
body[data-viewer="hermes"] .row,
body[data-viewer="hermes"] .skill-event,
body[data-viewer="openclaw"] .flow .node,
body[data-viewer="claude"] .turn-title,
body[data-viewer="openclaw"] .event-title,
body[data-viewer="hermes"] .row .name,
body[data-viewer="claude"] .tool-call,
body[data-viewer="claude"] .tool-call summary,
body[data-viewer="openclaw"] .call,
body[data-viewer="hermes"] .tool,
body[data-viewer="math"] .rubric-step,
body[data-viewer="physics"] .rubric-item,
body[data-viewer="physics"] .metric,
body[data-viewer="physics"] .metric b,
body[data-viewer] input[type="search"],
body[data-viewer] .type-filter {
  transition-duration: var(--anth-motion-fast);
  transition-timing-function: var(--anth-motion-ease);
}

body[data-viewer] .link-button,
body[data-viewer] .action,
body[data-viewer] .downloads a,
body[data-viewer] .header-actions a,
body[data-viewer] .header nav a {
  transition-property: color, background-color, border-color, box-shadow, transform;
}

body[data-viewer] .tab,
body[data-viewer] .segments button,
body[data-viewer="physics"] .nav button,
body[data-viewer="claude"] .turn,
body[data-viewer="openclaw"] .event,
body[data-viewer="hermes"] .row,
body[data-viewer="hermes"] .skill-event {
  transition-property: color, background-color, border-color, box-shadow;
}

body[data-viewer="claude"] .turn-title,
body[data-viewer="openclaw"] .event-title,
body[data-viewer="hermes"] .row .name,
body[data-viewer="physics"] .metric b {
  transition-property: color, transform;
}

body[data-viewer="openclaw"] .flow .node {
  transition-property: color, background-color, border-color, box-shadow, scale;
}

body[data-viewer="claude"] .tool-call,
body[data-viewer="openclaw"] .call,
body[data-viewer="hermes"] .tool,
body[data-viewer="math"] .rubric-step,
body[data-viewer="physics"] .rubric-item,
body[data-viewer="physics"] .metric {
  transition-property: background-color, border-color, box-shadow, transform;
}

body[data-viewer] input[type="search"],
body[data-viewer] .type-filter {
  transition-property: background-color, border-color, box-shadow;
}

body[data-viewer] input[type="search"]:focus,
body[data-viewer] .type-filter:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--anth-coral) 13%, transparent);
}

body[data-viewer="math"] .panel.active,
body[data-viewer="physics"] .sheet.active,
body[data-viewer="hermes"] .view.active {
  animation: viewer-panel-enter var(--anth-motion-medium) var(--anth-motion-ease) backwards;
}

body[data-viewer="claude"] .inspector-body > *,
body[data-viewer="openclaw"] .detail-body > *,
body[data-viewer="hermes"] .inspector-body > *,
body[data-viewer="hermes"] .skill-detail > * {
  animation: viewer-detail-enter 230ms var(--anth-motion-ease) backwards;
}

body[data-viewer="claude"] .inspector-body > :nth-child(2),
body[data-viewer="openclaw"] .detail-body > :nth-child(2),
body[data-viewer="hermes"] .inspector-body > :nth-child(2),
body[data-viewer="hermes"] .skill-detail > :nth-child(2) {
  animation-delay: 25ms;
}

body[data-viewer="claude"] .inspector-body > :nth-child(n + 3),
body[data-viewer="openclaw"] .detail-body > :nth-child(n + 3),
body[data-viewer="hermes"] .inspector-body > :nth-child(n + 3),
body[data-viewer="hermes"] .skill-detail > :nth-child(n + 3) {
  animation-delay: 50ms;
}

body[data-viewer="claude"] .tool-call[open] .tool-grid {
  animation: viewer-detail-enter 220ms var(--anth-motion-ease) backwards;
}

body[data-viewer] .link-button:active,
body[data-viewer] .action:active,
body[data-viewer] .downloads a:active,
body[data-viewer] .header-actions a:active,
body[data-viewer] .header nav a:active {
  transform: translateY(0) scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  body[data-viewer] .link-button:hover,
  body[data-viewer] .action:hover,
  body[data-viewer] .downloads a:hover,
  body[data-viewer] .header-actions a:hover,
  body[data-viewer] .header nav a:hover {
    box-shadow: 0 7px 18px color-mix(in srgb, var(--anth-ink) 10%, transparent);
    transform: translateY(-2px);
  }

  body[data-viewer] .tab:not(.active):hover,
  body[data-viewer] .segments button:not(.active):hover,
  body[data-viewer="physics"] .nav button:not(.active):hover {
    background: var(--anth-coral-soft);
    color: var(--anth-coral-deep);
  }

  body[data-viewer="claude"] .turn:hover .turn-title,
  body[data-viewer="openclaw"] .event:hover .event-title,
  body[data-viewer="hermes"] .row:hover .name {
    color: var(--anth-coral-deep);
    transform: translateX(3px);
  }

  body[data-viewer="openclaw"] .flow .node:hover {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--anth-coral) 14%, transparent);
    scale: 1.12;
  }

  body[data-viewer="claude"] .tool-call:hover,
  body[data-viewer="openclaw"] .call:hover,
  body[data-viewer="hermes"] .tool:hover {
    border-color: var(--anth-line-strong);
    box-shadow: 0 7px 16px color-mix(in srgb, var(--anth-ink) 7%, transparent);
    transform: translateY(-1px);
  }

  body[data-viewer="claude"] .tool-call summary:hover {
    background: var(--anth-coral-soft);
  }

  body[data-viewer="math"] .rubric-step:hover,
  body[data-viewer="physics"] .rubric-item:hover {
    background: color-mix(in srgb, var(--anth-coral-soft) 42%, var(--anth-surface));
    box-shadow: inset 3px 0 var(--anth-coral);
  }

  body[data-viewer="physics"] .metric:hover {
    background: var(--anth-coral-soft);
  }

  body[data-viewer="physics"] .metric:hover b {
    color: var(--anth-coral-deep);
    transform: translateY(-2px);
  }
}

@media (min-width: 901px) {
  body[data-viewer="claude"] .workspace {
    height: min(760px, calc(100vh - 88px));
    min-height: 640px;
  }

  body[data-viewer="claude"] .ledger,
  body[data-viewer="claude"] .inspector {
    min-height: 0;
  }

  body[data-viewer="claude"] .ledger {
    display: flex;
    flex-direction: column;
  }

  body[data-viewer="claude"] .ledger-head,
  body[data-viewer="claude"] .inspector-head {
    position: static;
    flex: 0 0 auto;
  }

  body[data-viewer="claude"] .turn-list {
    flex: 1 1 auto;
    max-height: none;
  }

  body[data-viewer="claude"] .inspector {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body[data-viewer="claude"] .inspector-body {
    flex: 1 1 auto;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 900px) {
  body[data-viewer] h1 {
    line-height: 1.12;
  }

  body[data-viewer="claude"] .intro h1,
  body[data-viewer="openclaw"] .mast h1,
  body[data-viewer="hermes"] .hero h1 {
    font-size: 32px;
  }

  body[data-viewer="claude"] .intro,
  body[data-viewer="openclaw"] .mast,
  body[data-viewer="hermes"] .hero {
    padding-top: 30px;
    padding-bottom: 26px;
  }

  body[data-viewer] .katex-display {
    margin: 1em 0;
    padding: 10px 11px 12px;
  }

}

@media (max-width: 420px) {
  body[data-viewer="claude"] .topbar,
  body[data-viewer="openclaw"] .bar {
    padding-right: 12px;
    padding-left: 12px;
  }

  body[data-viewer="claude"] .brand small {
    display: none;
  }

  body[data-viewer] .language-control-label {
    display: none;
  }

  body[data-viewer] .language-control-select {
    min-width: 72px;
    border-left: 0;
  }

  body[data-viewer] .link-button.primary,
  body[data-viewer] .action.download,
  body[data-viewer] .downloads .primary,
  body[data-viewer] .header-actions .download,
  body[data-viewer] .header nav .download {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-viewer],
  body[data-viewer] *,
  body[data-viewer] *::before,
  body[data-viewer] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
