/* Candidate 13. Warm paper, graphite type and bronze controls. */
html[data-theme="light"] {
  --light-paper: #f8f4ea;
  --light-card: #fffcf5;
  --light-champagne: #eee3ce;
  --light-graphite: #292821;
  --light-secondary: #61594d;
  --light-bronze: #724819;
  --light-bronze-deep: #55320f;
  --light-on-bronze: #fffaf0;
  --light-rule: #cec3af;
  --light-control-edge: #8a7358;
}

html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] body.paper-page,
html[data-theme="light"] body.paper-page .site-header {
  --background: var(--light-paper);
  --surface: var(--light-card);
  --text: var(--light-graphite);
  --muted: var(--light-secondary);
  --line: var(--light-rule);
  --accent: var(--light-bronze);
  --accent-warm: var(--light-bronze-deep);
  --editorial-paper: var(--light-card);
  --editorial-ink: var(--text);
  --editorial-muted: var(--muted);
  --editorial-line: var(--line);
  --editorial-accent: var(--accent);
  color-scheme: light;
  background: var(--background);
  color: var(--text);
}

html[data-theme="light"] body .site-header {
  color: var(--text);
  background: var(--background);
  border-color: var(--line);
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark] {
  --scan-primary: #8a7358;
  --scan-warm: #724819;
  --scan-core: #724819;
  --scan-dark-edge: #55320f;
  --scan-glint: #eee3ce;
  --scan-edge-shadow: rgb(85 50 15 / 20%);
  --scan-line-shadow: rgb(85 50 15 / 18%);
  color: var(--light-graphite);
  background: transparent;
  border-radius: 0;
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark] .ag-mark__letters {
  color: var(--light-graphite);
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark] .ag-mark__letters b {
  color: var(--light-bronze-deep);
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark] .ag-mark__frame {
  stroke: var(--light-bronze);
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark][data-motion="static"]::before {
  background: var(--light-bronze);
  opacity: .65;
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark] .ag-mark__edge {
  --scan-axis: 90deg;
  --scan-bronze: var(--scan-warm);
  background: linear-gradient(var(--scan-axis), transparent, var(--scan-dark-edge) 10%,
    var(--scan-bronze) 32%, var(--scan-glint) 44% 56%, var(--scan-bronze) 68%,
    var(--scan-dark-edge) 90%, transparent);
  box-shadow: 0 1px 2px var(--scan-edge-shadow);
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark] :is(.ag-mark__edge--left, .ag-mark__edge--right) {
  --scan-axis: 180deg;
  --scan-bronze: var(--scan-primary);
}
html[data-theme="light"] .brand .ag-mark[data-ag-mark] .ag-mark__reading-wave::before {
  box-shadow: 0 1px 2px var(--scan-line-shadow);
}
html[data-theme="light"] .brand small,
html[data-theme="light"] .main-nav a { color: var(--muted); }
html[data-theme="light"] .main-nav a:is([aria-current="page"], :hover) {
  color: var(--accent);
  border-bottom-color: currentColor;
}
html[data-theme="light"] .mark-toggle { color: var(--accent); }
html[data-theme="light"] .mark-toggle:hover { color: var(--light-bronze-deep); }
html[data-theme="light"] .skip-link {
  background: var(--accent);
  color: var(--light-on-bronze);
}

html[data-theme="light"] .hero-position { color: var(--text); }
html[data-theme="light"] .portrait-frame {
  background: var(--light-champagne);
  border-color: var(--light-control-edge);
  box-shadow: 0 12px 30px rgb(64 46 25 / 12%);
}
html[data-theme="light"] .text-link,
html[data-theme="light"] .candidate-timeline a,
html[data-theme="light"] .reading-surface a,
html[data-theme="light"] .reader-breadcrumb a,
html[data-theme="light"] .reader-aside a,
html[data-theme="light"] .editorial-toc a,
html[data-theme="light"] .editorial-reader-end a,
html[data-theme="light"] .editorial-path-links a,
html[data-theme="light"] .editorial-publication > a {
  color: var(--accent);
  border-color: var(--light-control-edge);
}

html[data-theme="light"] .button,
html[data-theme="light"] .topic-filters :is(button, a),
html[data-theme="light"] .editorial-quote-controls button,
html[data-theme="light"] .editorial-quote-note [data-note-save] {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--light-control-edge);
}
html[data-theme="light"] .button-primary,
html[data-theme="light"] .topic-filters [aria-pressed="true"],
html[data-theme="light"] .editorial-quote-controls button:is([aria-pressed="true"], [aria-expanded="true"]) {
  background: var(--accent);
  color: var(--light-on-bronze);
  border-color: var(--accent);
}
html[data-theme="light"] .button:hover,
html[data-theme="light"] .topic-filters :is(button, a):hover,
html[data-theme="light"] .editorial-quote-controls button:hover,
html[data-theme="light"] .editorial-quote-note [data-note-save]:hover {
  background: var(--light-bronze-deep);
  color: var(--light-on-bronze);
  border-color: var(--light-bronze-deep);
}

html[data-theme="light"] .recent-grid > .editorial-card,
html[data-theme="light"] .article-list > .editorial-card {
  background: var(--surface);
  border-color: var(--line);
}
html[data-theme="light"] .candidate-recent-grid > .editorial-card:first-of-type {
  background: var(--light-champagne);
  border-color: var(--light-control-edge);
}
html[data-theme="light"] .editorial-topic,
html[data-theme="light"] .candidate-recent-grid > .editorial-card:first-of-type .editorial-topic {
  color: var(--accent);
}
html[data-theme="light"] .prototype-label,
html[data-theme="light"] .candidate-recent-grid > .editorial-card:first-of-type .prototype-label {
  background: var(--background);
  color: var(--muted);
  border-color: var(--light-control-edge);
}
html[data-theme="light"] .editorial-open,
html[data-theme="light"] .candidate-recent-grid > .editorial-card:first-of-type .editorial-open {
  color: var(--accent);
  border-color: var(--light-control-edge);
}
html[data-theme="light"] .reading-surface { background: transparent; }
html[data-theme="light"] .editorial-download {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--light-control-edge);
}
html[data-theme="light"] .editorial-download:hover {
  background: var(--light-champagne);
  border-color: var(--accent);
}

/* Only the three fixed-palette editorial diagrams use this conversion. */
html[data-theme="light"] .editorial-figure img[src*="illustrations/"] {
  filter: grayscale(1) invert(1) sepia(.24);
  background: #202123;
  border-color: #534e45;
}
html[data-theme="light"] .editorial-table-scroll,
html[data-theme="light"] .editorial-table-scroll :is(table, th, td) {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
html[data-theme="light"] .editorial-table-scroll caption {
  background: var(--background);
  color: var(--muted);
}
html[data-theme="light"] .editorial-table-scroll tbody tr:nth-child(even) > * {
  background: var(--background);
}
html[data-theme="light"] .editorial-table-scroll thead th,
html[data-theme="light"] .editorial-callout {
  background: var(--light-champagne);
  color: var(--text);
}
html[data-theme="light"] .editorial-quote-note [data-quote-target].quote-marked {
  color: var(--text);
  background: linear-gradient(transparent 53%, #e7ce97 53%, #e7ce97 94%, transparent 94%);
}
html[data-theme="light"] .editorial-quote-note textarea,
html[data-theme="light"] :is(textarea, input, select) {
  color-scheme: light;
  background: var(--surface);
  color: var(--text);
  border-color: var(--light-control-edge);
  caret-color: var(--accent);
}
html[data-theme="light"] .editorial-quote-note textarea::placeholder,
html[data-theme="light"] :is(textarea, input)::placeholder { color: var(--muted); opacity: 1; }
html[data-theme="light"] .editorial-quote-note [data-note-panel] > [data-note-status],
html[data-theme="light"] :is([data-note-status], [data-demo-status], .demo-status, .list-status) {
  color: var(--accent);
}
html[data-theme="light"] body .read-progress [data-progress-fill],
html[data-theme="light"] body.paper-page .read-progress [data-progress-fill] {
  background: var(--accent);
}
html[data-theme="light"] :is(a, button, textarea, input, select, .editorial-table-scroll):focus-visible {
  outline-color: var(--accent);
}
html[data-theme="light"] ::selection { background: #695030; color: #fffaf0; }
