/* Shared palette and page furniture for the academic site. */
:root {
  color-scheme: light;
  --site-paper: #fff;
  --site-ink: #515151;
  --site-muted: #717171;
  --site-blue: #0a3b76;
  --site-link: #5a81b0;
  --site-rule: #dce3eb;
  --site-panel: #f9f9f9;
  --site-caption: rgba(255, 255, 255, .92);
  background: var(--site-paper);
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.58;
}

body {
  margin: 0;
  padding-bottom: 76px;
  border-top: 4px solid var(--site-blue);
  background: var(--site-paper);
  color: var(--site-ink);
  font-family: "Source Sans Pro", Arial, sans-serif;
}
.drawing-artwork { padding-bottom: 0; background: var(--site-paper); color: var(--site-ink); }

a { color: var(--site-link); text-underline-offset: 4px; }
h1, h2, h3, h4, h5, h6 {
  color: var(--site-blue);
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0;
}
strong { color: inherit; }
h1, .page-title, .resources-heading h1, .guide-header h1 {
  color: var(--site-blue);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}
h2 { font-size: 23px; line-height: 1.3; }
hr, blockquote { border-color: var(--site-rule); }
blockquote { color: var(--site-muted); }
:is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--site-blue);
  outline-offset: 4px;
}

/* Keep the logo and its expanding ring outside any clipping context. */
body .nav-main {
  position: relative;
  z-index: 10;
  margin: 0;
  font: 16px/1.58 "Source Sans Pro", Arial, sans-serif;
}
.resources-landing .nav-main, .resource-guide .nav-main { margin-bottom: 0; }
body .nav-main > ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: 70px;
  margin: 0;
  padding: 10px 24px;
  border: 0;
  border-bottom: 1px solid var(--site-rule);
  list-style: none;
}
body .nav-main > ul > li { margin: 0; padding: 0; }
body .nav-main > ul > li > a {
  padding: 7px 0;
  color: var(--site-blue);
}
body .nav-main li.logo { overflow: visible; }
body .nav-main li.logo a {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--site-blue);
  color: var(--site-paper);
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}
.hvr-ripple-out::before { border-color: var(--site-blue); }
.hvr-underline-reveal::before { background: var(--site-blue); }
body .nav-main .nav-resources > a { padding-right: 0; }
body .resource-menu summary { width: 22px; color: var(--site-blue); }
body .nav-main .resource-dropdown {
  width: 250px;
  border-color: var(--site-rule);
  background: var(--site-paper);
  box-shadow: 0 10px 25px #00000018;
}
body .nav-main .resource-dropdown a { color: var(--site-link); }
body .nav-main .resource-dropdown a:hover,
body .nav-main .resource-dropdown a:focus-visible { background: var(--site-panel); }
body .nav-main [aria-current="page"] { color: var(--site-blue); }
body .nav-main a:focus-visible,
body .resource-menu summary:focus-visible { outline-color: var(--site-blue); }

body > .container.content {
  position: relative;
  z-index: 1;
  padding-top: 55px;
  padding-bottom: 32px;
}
body:where(:not(.resource-guide):not(.resources-landing):not(.drawing-artwork)) > .container.content {
  max-width: 922px;
  padding-right: 42px;
  padding-left: 42px;
}
.page { margin-bottom: 2rem; }
.message {
  padding: 0 0 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--site-rule);
  background: none;
  color: var(--site-muted);
}
.talks-page .page > h3 {
  margin: 32px 0 18px;
  padding-top: 22px;
  border-top: 1px solid var(--site-rule);
  font-size: 23px;
}
.talks-page .page > .message + h3 { padding-top: 0; border-top: 0; }
.talks-page .page > ol { padding-left: 24px; }
.talks-page .page > ol > li { padding-left: 4px; margin-bottom: 22px; }
.talks-page .talk-meta { margin: 5px 0 0; color: var(--site-muted); font-style: normal; }
.talks-page time { font-variant-numeric: tabular-nums; }
.drawing-caption {
  background: var(--site-caption);
  border: 1px solid var(--site-rule);
  font-family: inherit;
}
.drawing-caption p { color: var(--site-muted); }
.drawing-controls { flex-wrap: wrap; font-family: inherit; }
.drawing-controls a, .drawing-controls button {
  color: var(--site-link);
  border-color: var(--site-rule);
}
.drawing-controls :focus-visible { outline-color: var(--site-blue); }

:root[data-theme="dark"] {
    color-scheme: dark;
    --site-paper: #171b22;
    --site-ink: #e5e9ee;
    --site-muted: #aeb9c8;
    --site-blue: #9fbfe8;
    --site-link: #aac6eb;
    --site-rule: #35404e;
    --site-panel: #202732;
    --site-caption: rgba(23, 27, 34, .92);
}
/* Only the neutral background geometry changes ink with the selected palette. */
:root[data-theme="dark"] .minimal-surface-background { filter: invert(1); }

.theme-toggle {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 80px;
  height: 44px;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--site-rule);
  border-radius: 24px;
  background: var(--site-paper);
  color: var(--site-muted);
  box-shadow: 0 3px 16px #00000018;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { border-color: var(--site-blue); }
.theme-toggle:focus-visible { outline: 2px solid var(--site-blue); outline-offset: 4px; }
.theme-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.theme-icon svg { display: block; width: 20px; height: 20px; }
:root[data-theme="light"] .theme-icon-sun,
:root[data-theme="dark"] .theme-icon-moon {
  background: var(--site-blue);
  color: var(--site-paper);
}

@media (max-width: 680px) {
  .theme-toggle {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .drawing-caption { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  h1, .page-title, .resources-heading h1, .guide-header h1 { font-size: 34px; }
  body .nav-main { font-size: 15px; }
  body .nav-main > ul { gap: 23px; min-height: 62px; padding: 8px 16px; }
  body > .container.content { padding: 32px 24px; }
  body:where(:not(.resource-guide):not(.resources-landing):not(.drawing-artwork)) > .container.content {
    padding: 32px 24px;
  }
}
@media (max-width: 370px) {
  body .nav-main { font-size: 14px; }
  body .nav-main > ul { gap: 14px; }
  body > .container.content,
  body:where(:not(.resource-guide):not(.resources-landing):not(.drawing-artwork)) > .container.content {
    padding: 28px 19px;
  }
  h1, .page-title, .resources-heading h1, .guide-header h1 { font-size: 31px; }
}
@media print {
  :root, :root[data-theme] {
    color-scheme: light;
    --site-paper: #fff;
    --site-ink: #515151;
    --site-muted: #717171;
    --site-blue: #0a3b76;
    --site-link: #5a81b0;
    --site-rule: #dce3eb;
    --site-panel: #f9f9f9;
    --site-caption: rgba(255, 255, 255, .92);
  }
  body .nav-main, .minimal-surface-background, .theme-toggle { display: none; }
  body { border-top: 0; padding-bottom: 0; }
}
