:root {
  color-scheme: light;
}
.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font: 14px var(--sans);
  padding: 10px 13px;
  white-space: nowrap;
  cursor: pointer;
  min-height: 44px;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
}
.header {
  gap: 22px;
}
.header nav {
  margin-left: auto;
  gap: 22px;
}
.brand-logo {
  width: 52px;
  height: 52px;
}
.process {
  background: #202a2d;
  color: #f5f5f1;
}
.process-controls button {
  color: #f5f5f1;
}
.process-controls button[aria-pressed="true"] {
  color: #202a2d;
}
.process .intro {
  color: #b3c0bd;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141d21;
  --ink: #edf0eb;
  --muted: #b0bdb9;
  --line: #39494d;
  --accent: #dfa27b;
  --copper: #dfa27b;
}
html[data-theme="dark"] .button {
  background: #dfa27b;
  color: #182125;
  border-color: #dfa27b;
}
html[data-theme="dark"] .button:hover {
  background: #efb894;
}
html[data-theme="dark"] .capabilities {
  background: #1d2b2e;
}
html[data-theme="dark"] h2 span {
  color: #afc1b9;
}
html[data-theme="dark"] .service-list,
html[data-theme="dark"] .service {
  border-color: #435451;
}
html[data-theme="dark"] .problem-options button {
  border-color: #61726c;
  color: #edf0eb;
}
html[data-theme="dark"] .problem-options button[aria-pressed="true"] {
  background: #dfa27b;
  color: #182125;
  border-color: #dfa27b;
}
html[data-theme="dark"] .tags span {
  background: #2c3e3d;
}
html[data-theme="dark"] .contact {
  background: #302820;
}
html[data-theme="dark"] .contact-bottom > p {
  color: #ded3c8;
}
html[data-theme="dark"] .text-link {
  border-color: #788d84;
}
html[data-theme="dark"] .skip {
  background: #24343a;
}
html[data-theme="dark"] .demo-banner {
  background: #302820;
  color: #f0dbc9;
}
html[data-theme="dark"] .project {
  background: #203236;
}
html[data-theme="dark"] .pill {
  background: #354740;
  color: #edf0eb;
}
html[data-theme="dark"] .portal-sidebar nav a:hover,
html[data-theme="dark"] .outline-button:hover {
  background: #2c3e3d;
}
html[data-theme="dark"] .avatar {
  background: #dfa27b;
  color: #182125;
}
html[data-theme="dark"] .behind {
  background: #203236;
  color: #edf0eb;
}
html[data-theme="dark"] dialog input,
html[data-theme="dark"] dialog textarea {
  background: #1c2a2e;
  color: #edf0eb;
  border-color: #61726c;
}
html[data-theme="dark"] .next-step {
  border-color: #52645c;
}
@media (max-width: 1100px) and (min-width: 721px) {
  .header {
    padding-left: 25px;
    padding-right: 25px;
    gap: 14px;
  }
  .header nav {
    gap: 14px;
  }
  .header nav .button {
    gap: 12px;
    padding: 10px 12px;
  }
  .theme-toggle {
    padding: 10px;
  }
  .brand {
    font-size: 12px;
  }
  .brand-bottom {
    font-size: 17px;
  }
}
@media (max-width: 720px) {
  .header {
    gap: 10px;
    flex-wrap: wrap;
  }
  .header .brand {
    margin-right: auto;
  }
  .brand-logo {
    width: 43px;
    height: 43px;
  }
  .theme-toggle {
    font-size: 13px;
    padding: 10px;
  }
  .menu-toggle {
    order: 3;
    padding: 10px;
  }
  .header nav {
    margin: 0;
  }
  .header > .theme-toggle {
    order: 2;
  }
  .header nav.open {
    display: flex;
  }
  .header .brand-bottom {
    font-size: 15px;
  }
  .header .brand {
    font-size: 11px;
    gap: 8px;
  }
}
/* Navy / ivory palette with copper interaction accents. */
:root {
  --paper: #f7f5ef;
  --ink: #0b1f33;
  --muted: #4a5a6a;
  --line: #ced3d6;
  --accent: #865a35;
  --copper: #b07c4f;
  --signal: #865a35;
}
html[data-theme="dark"] {
  --paper: #0b1f33;
  --ink: #f7f5ef;
  --muted: #aab8c7;
  --line: #35495e;
  --accent: #dfa27b;
  --copper: #dfa27b;
  --signal: #dfa27b;
}
.button {
  background: #0b1f33;
  color: #f7f5ef;
  border-color: #0b1f33;
}
.button:hover {
  background: #21394e;
}
.cross {
  color: #b07c4f;
}
h2 span {
  color: #4a5a6a;
}
.capabilities {
  background: #ebeef0;
}
.service-list,
.service {
  border-color: #c3cbd1;
}
.contact {
  background: #eaddcf;
}
.contact-bottom > p {
  color: #4a5a6a;
}
.text-link:hover {
  color: var(--accent);
}
.text-link {
  border-color: #7a8ca0;
}
.process,
.video-placeholder,
.behind {
  background: #0b1f33;
  color: #f7f5ef;
}
.process .aside,
.process .intro,
.process-caption,
.stages p,
.video-placeholder > p:last-child {
  color: #b5c1cc;
}
.process-instrument .eyebrow,
.stage-num,
.stage-output,
.video-placeholder .eyebrow {
  color: #dfa27b;
}
.stages article {
  border-color: #7a8ca0;
}
.stages article:before {
  background: #dfa27b;
}
.process-controls button {
  color: #f7f5ef;
  border-color: #7a8ca0;
}
.process-controls button[aria-pressed="true"] {
  background: #dfa27b;
  border-color: #dfa27b;
  color: #0b1f33;
}
.process-controls button:hover {
  border-color: #dfa27b;
}
.theme-toggle:hover {
  border-color: var(--signal);
}
.video-placeholder {
  border-color: #4a5a6a;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 4px;
}
html[data-theme="dark"] .button {
  background: #dfa27b;
  border-color: #dfa27b;
  color: #0b1f33;
}
html[data-theme="dark"] .button:hover {
  background: #edba96;
}
html[data-theme="dark"] .capabilities {
  background: #112a40;
}
html[data-theme="dark"] h2 span {
  color: #aab8c7;
}
html[data-theme="dark"] .service-list,
html[data-theme="dark"] .service {
  border-color: #35495e;
}
html[data-theme="dark"] .contact {
  background: #192e41;
}
html[data-theme="dark"] .contact-bottom > p {
  color: #b5c1cc;
}
html[data-theme="dark"] .text-link {
  border-color: #7a8ca0;
}
html[data-theme="dark"] .process {
  border-block: 1px solid #35495e;
}
html[data-theme="dark"] .theme-toggle:hover {
  border-color: #dfa27b;
}
html[data-theme="dark"] :focus-visible {
  outline-color: #dfa27b;
}
html[data-theme="dark"] .skip {
  background: #112a40;
}
html[data-theme="dark"] .video-placeholder {
  background: #112a40;
}
.project {
  background: #ebeef0;
}
.pill {
  background: #dce7eb;
}
.route .current {
  border-color: var(--signal);
  color: var(--signal);
}
progress {
  accent-color: var(--signal);
}
.activity-dot {
  background: var(--signal);
}
.demo-banner {
  background: #eaddcf;
}
.behind .demo-note,
.backend-flow p {
  color: #b5c1cc;
}
.backend-flow article > span {
  color: #dfa27b;
}
html[data-theme="dark"] .project,
html[data-theme="dark"] .behind {
  background: #112a40;
}
html[data-theme="dark"] .pill {
  background: #254258;
  color: #f7f5ef;
}
html[data-theme="dark"] .route .current {
  color: #dfa27b;
  border-color: #dfa27b;
}
html[data-theme="dark"] progress {
  accent-color: #dfa27b;
}
html[data-theme="dark"] .activity-dot {
  background: #dfa27b;
}
html[data-theme="dark"] .demo-banner {
  background: #192e41;
  color: #dfa27b;
}
html[data-theme="dark"] .portal-sidebar nav a:hover,
html[data-theme="dark"] .outline-button:hover {
  background: #254258;
}
html[data-theme="dark"] .avatar {
  background: #dfa27b;
  color: #0b1f33;
}
html[data-theme="dark"] dialog input,
html[data-theme="dark"] dialog textarea {
  background: #112a40;
  color: #f7f5ef;
  border-color: #7a8ca0;
}

.process :focus-visible, .behind :focus-visible {
  outline-color: #dfa27b;
}
/* Shared appearance switch: sun and moon with a sliding selected surface. */
button.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  isolation: isolate;
  width: 88px;
  height: 44px;
  min-width: 88px;
  min-height: 44px;
  padding: 0 12px;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 5%);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
button.theme-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0b1f33;
  box-shadow: 0 2px 5px rgb(0 0 0 / 14%);
  z-index: -1;
  transition: transform 180ms ease, background-color 180ms ease;
}
button.theme-toggle .theme-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.theme-toggle .theme-icon-sun {
  color: #f7f5ef;
}
button.theme-toggle[aria-pressed="true"]::before {
  transform: translateX(44px);
  background: #dfa27b;
}
button.theme-toggle[aria-pressed="true"] .theme-icon-sun {
  color: var(--muted);
}
button.theme-toggle[aria-pressed="true"] .theme-icon-moon {
  color: #0b1f33;
}
button.theme-toggle:hover {
  border-color: var(--accent);
}
button.theme-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  button.theme-toggle::before {
    transition: none;
  }
}

/* Back links: "Back to home" on the legal pages, "All perspectives" on articles. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font: 500 14px/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease,
    color 0.2s ease;
}
.back-link .back-arrow {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.back-link:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.back-link:hover .back-arrow {
  transform: translateX(-3px);
}
.back-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
html[data-theme="dark"] .back-link .back-arrow {
  color: var(--copper);
}
html[data-theme="dark"] .back-link:hover {
  border-color: var(--copper);
  background: color-mix(in srgb, var(--copper) 12%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .back-link,
  .back-link .back-arrow {
    transition: none;
  }
  .back-link:hover .back-arrow {
    transform: none;
  }
}
.header > .back-link {
  margin-left: auto;
}
@media (max-width: 720px) {
  .header > .back-link {
    padding: 8px 14px 8px 12px;
    font-size: 13px;
  }
}
