/* The three Roboto faces used on the Smart Systems website. */
@font-face {
  font-family: "Smarts Roboto";
  src: url("articles/smartpress/fonts/roboto-light.woff") format("woff");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Smarts Roboto";
  src: url("articles/smartpress/fonts/roboto-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Smarts Roboto";
  src: url("articles/smartpress/fonts/roboto-medium.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:where(:root:has(#theme-smarts:checked)) :is(.site-header, .index-pane, .contact-confirmation) {
  --font-ui: "Smarts Roboto", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font-ui);
}

/* Masthead and navigation */
:where(:root:has(#theme-smarts:checked)) .site-header {
  border-block-end-color: var(--smart-steel);
}

:where(:root:has(#theme-smarts:checked)) .brand-icon-inline .colour-in {
  fill: #981634;
}

:where(:root:has(#theme-smarts:checked)) :is(.brand, .article .kicker) {
  color: var(--smart-blue);
}

:where(:root:has(#theme-smarts:checked)) :is(.brand:hover, .feed-link:hover) {
  color: var(--smart-red);
}

:where(:root:has(#theme-smarts:checked)) .index-pane {
  background-color: var(--smart-blue);
  border-color: var(--smart-steel);
  scrollbar-color: var(--smart-pale-blue) var(--smart-blue);
}

/* Contact and licence dialogs also live inside the index pane. */
:where(:root:has(#theme-smarts:checked)) .index-pane > :is(.index-head, .index-list, .index-section-lists, .index-subsection-lists, .index-footer) {
  --panel-bg: var(--smart-blue);
  --interactive-text: var(--smart-paper);
  --muted: var(--smart-paper);
  --strong: var(--smart-paper);
  --line: var(--smart-steel);
  --functional-cue: var(--smart-pale-blue);
  --index-selected-border: var(--smart-paper);
  --index-subsection-selected-bg: var(--smart-paper);
  --index-subsection-selected-border: var(--smart-pale-blue);
}

:where(:root:has(#theme-smarts:checked)) :is(.index-list, .index-section-list, .index-subsection-list) a:hover {
  color: var(--smart-blue);
}

/* Article text and existing dividers */
:where(:root:has(#theme-smarts:checked)) .article-pane-background .colour-in {
  fill: var(--smart-line);
}

:where(:root:has(#theme-smarts:checked)) .article-header {
  border-block-end-color: var(--smart-blue);
}

:where(:root:has(#theme-smarts:checked)) .article h2:not(:where(.image-viewer-head h2)) {
  color: var(--smart-red);
}

:where(:root:has(#theme-smarts:checked)) :is(.article h3, .article > section :where(p, li, dt, dd) a) {
  color: var(--smart-link);
}

:where(:root:has(#theme-smarts:checked)) .article > section :where(p, li, dt, dd) a:is(:hover, :focus-visible) {
  color: var(--smart-blue);
}

:where(:root:has(#theme-smarts:checked)) .article :is(h4, h5, h6, .article-meta) {
  color: var(--smart-grey);
}

:where(:root:has(#theme-smarts:checked)) .article-header .summary {
  color: var(--smart-ink);
}

:where(:root:has(#theme-smarts:checked)) .article dd {
  border-inline-start-color: var(--smart-pale-blue);
}

:where(:root:has(#theme-smarts:checked)) .article hr {
  border-block-start-color: var(--smart-steel);
}

:where(:root:has(#theme-smarts:checked)) .article blockquote {
  border-inline-start-color: var(--smart-red);
}

/* Download states use the shared block and hover colours. */
:where(:root:has(#theme-smarts:checked)) .article-download:not(.article-download-missing) {
  --code-border: var(--smart-blue);
  --code-title-bg: var(--smart-blue);
  --code-title-text: var(--smart-paper);
  --theme-chrome-fg: currentColor;
  --code-bg: #dee6ee;
  --download-hover-border: var(--smart-red);
  --strong: var(--smart-blue);
}

:where(:root:has(#theme-smarts:checked)) .article-download:focus-within {
  background-color: var(--code-bg);
  border-color: var(--download-hover-border);
  color: var(--strong);
}

:where(:root:has(#theme-smarts:checked)) .article-download-hit:focus-visible {
  outline-color: var(--download-hover-border);
}

:where(:root:has(#theme-smarts:checked)) .article-download-missing {
  --code-bg: var(--panel-bg);
  --download-hover-border: var(--interface-error);
  --strong: var(--interface-error);
}

/* Dialogs and controls */
:where(:root:has(#theme-smarts:checked)) :is(.theme-menu, .contact-popover, .contact-confirmation, .license-popover, .image-viewer) {
  --panel-bg: var(--smart-paper);
  --functional-cue: var(--smart-blue);
}

:where(:root:has(#theme-smarts:checked)) :is(.theme-head, .contact-head, .license-head, .image-viewer-head) {
  --code-title-bg: var(--smart-blue);
  --code-title-text: var(--smart-paper);
}

:where(:root:has(#theme-smarts:checked)) :is(.theme-button, .contact-submit) {
  background-color: var(--smart-blue);
  border-color: var(--smart-blue);
  color: var(--smart-paper);
}

:where(:root:has(#theme-smarts:checked)) :is(.theme-button, .contact-submit):is(:hover, :active),
:where(:root:has(#theme-smarts:checked)) :is(.theme-head, .contact-head, .license-head, .image-viewer-head) :is(a, button):focus-visible {
  background-color: var(--smart-deep-blue);
  color: var(--smart-paper);
}

:where(:root:has(#theme-smarts:checked)) :is(.theme-head, .contact-head, .license-head, .image-viewer-head) :is(a, button):focus-visible {
  outline-color: var(--smart-paper);
}

:where(:root:has(#theme-smarts:checked)) :is(.theme-mode, .theme-list) label:hover,
:where(:root:has(#theme-smarts:checked)) :is(.code-details, .media-details) summary:hover,
:where(:root:has(#theme-smarts:checked)) .block-footer .block-action:hover {
  background-color: var(--smart-pale-blue);
  color: var(--smart-blue);
}

:where(:root:has(#theme-smarts:checked)) :is(.theme-mode, .theme-list) input:checked + label {
  background-color: var(--smart-red);
  border-color: var(--smart-red);
  color: var(--smart-paper);
}

:where(:root:has(#theme-smarts:checked)) .contact-field :is(input, textarea) {
  border-color: #7c7c7c;
}

:where(:root:has(#theme-smarts:checked)) .contact-field :is(input, textarea):focus-visible {
  border-color: var(--smart-blue);
}
