@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Roboto+Slab:wght@300;700&display=swap");

body {
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6,
.home h1, .home h2, .home h3 {
  font-family: "Roboto Slab", "Open Sans", Arial, sans-serif;
  font-weight: 700;
  text-align: left;
}

:root {
  --gap: 24px;
  --content-gap: 20px;
  --nav-width: 1024px;
  --main-width: 720px;
  --header-height: 76px;
  --footer-height: 60px;
  --radius: 8px;

  /* SU Brand Palette */
  --su-dark-grey: #959595;
  --su-charcoal: #2c2825;
  --su-yellow: #f9bd07;
  --su-white: #f5f4f3;
  --su-blue: #5881c1;

  /* Light mode colors */
  --color-foreground: var(--su-charcoal);
  --color-background: var(--su-white);
  --color-primary: var(--su-yellow);
  --color-secondary: var(--su-dark-grey);
  --color-info: var(--su-blue);

  /* Component-level semantic colours */
  --color-on-primary: var(--su-charcoal);
  --color-on-info: var(--su-white);
  --color-link: var(--color-info);
  --color-link-hover: var(--color-foreground);
  --color-navbar-background: var(--color-primary);
  --color-navbar-foreground: var(--color-on-primary);
  --color-navbar-hover: var(--color-foreground);
  --color-navbar-border: var(--color-secondary);
}

.quarto-dark {
  /* Dark mode overrides */
  --color-foreground: var(--su-white);
  --color-background: var(--su-charcoal);
  --color-primary: var(--su-yellow);
  --color-secondary: var(--su-white);
  --color-info: var(--su-yellow);
  --color-link: var(--color-primary);
  --color-link-hover: var(--color-foreground);
  --color-navbar-background: var(--color-background);
  --color-navbar-foreground: var(--color-foreground);
  --color-navbar-hover: var(--color-primary);
  --color-navbar-border: var(--color-primary);
}

body,
.content,
.markdown,
.main-content {
  color: var(--color-foreground) !important;
  background: var(--color-background) !important;
}

.list {
  background: var(--color-background);
}

.center {
  text-align: left;
}

/* SU brand link and text colors */
.content a,
.markdown a,
.main-content a,
a {
  color: var(--color-link) !important;
  text-decoration: underline;
  transition: color 0.2s;
}

.content a:hover,
.markdown a:hover,
.main-content a:hover,
a:hover {
  color: var(--color-link-hover) !important;
}

/* High-contrast call-to-action buttons. */
a.btn.btn-primary {
  color: var(--color-on-primary) !important;
  background-color: var(--color-primary);
  border-color: var(--color-foreground);
  font-weight: 600;
  text-decoration: none;
}

a.btn.btn-primary:hover,
a.btn.btn-primary:focus-visible {
  color: var(--color-background) !important;
  background-color: var(--color-foreground);
  border-color: var(--color-foreground);
  text-decoration: none;
}

a.btn.btn-primary:focus-visible {
  outline: 3px solid var(--color-info);
  outline-offset: 3px;
}

/* Navbar styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  min-height: var(--header-height);
  height: auto;
  background: var(--color-navbar-background);
  border-bottom: 1px solid var(--color-navbar-border);
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .quarto-navigation-tool {
  color: var(--color-navbar-foreground) !important;
}

.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus-visible,
.navbar .nav-link:hover,
.navbar .nav-link:focus-visible,
.navbar .quarto-navigation-tool:hover,
.navbar .quarto-navigation-tool:focus-visible {
  color: var(--color-navbar-hover) !important;
}

/* Use the higher-resolution brand mark at a readable navbar size. */
.navbar-logo {
  height: 48px;
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.navbar-title {
  line-height: 1.2;
}

/*
 * On desktop, give the header two rows: the site title sits above the main
 * page links while the logo spans both rows. Social/search tools stay on the
 * right, so every page has the same header structure.
 */
@media (min-width: 992px) {
  :root {
    --header-height: 88px;
  }

  .navbar {
    padding: 6px 28px;
  }

  .navbar > .navbar-container {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) auto auto auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
    max-width: none;
  }

  .navbar-brand-container,
  #navbarCollapse {
    display: contents !important;
  }

  .navbar-brand-logo {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: start;
    margin: 0;
    padding: 0;
  }

  .navbar-logo {
    height: 70px;
    max-height: 70px;
  }

  .navbar-brand-container > .navbar-brand:not(.navbar-brand-logo) {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0;
    padding: 0;
  }

  .navbar-title {
    font-size: clamp(1.15rem, 1.6vw, 1.55rem);
    white-space: normal;
  }

  #navbarCollapse > .navbar-nav.me-auto {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    flex-direction: row;
    margin: 0 !important;
  }

  #navbarCollapse > .navbar-nav.me-auto .nav-link {
    padding: 0.15rem 1.25rem 0.15rem 0;
  }

  #navbarCollapse > .navbar-nav.ms-auto {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    flex-direction: row;
    margin: 0 !important;
  }

  .quarto-navbar-tools {
    grid-column: 4;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
  }

  #quarto-search {
    grid-column: 5;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    margin: 0;
  }
}

@media (max-width: 991.98px) {
  .navbar-title {
    font-size: 1rem;
    white-space: normal;
  }
}

.navbar-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav-btn {
  padding: 4px 10px;
  border-radius: 3px;
  border: none;
  background: var(--color-navbar-background);
  color: var(--color-navbar-foreground);
  font-weight: 400;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-btn:hover {
  color: var(--color-navbar-hover);
}

.github-icon {
  background: none;
  padding: 0 6px;
  color: var(--color-navbar-foreground);
  display: flex;
  align-items: center;
  border: none;
}
.github-icon:hover {
  color: var(--color-navbar-hover);
  background: none;
}

.logo {
  display: flex;
  align-items: center;
  height: var(--header-height);
}

.logo-image {
  height: 38px;
  width: auto;
  display: block;
  margin-right: 12px;
}

/* TOC styles */
.toc, .TableOfContents {
  background: var(--color-background);
  border-radius: 8px;
  padding: 1em;
  border: 1px solid var(--color-info);
}

.toc a, .TableOfContents a {
  color: var(--color-link);
  font-weight: 500;
  text-decoration: underline;
  transition: color 0.2s;
}

.toc a:hover, .TableOfContents a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* Session detail titles use the same plain treatment as the other pages. */
#quarto-content:has(main.content > section#model-overview) #title-block-header {
  margin-bottom: 1.75rem;
}

#quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-category,
#quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-category a {
  color: var(--color-foreground) !important;
  border-color: var(--color-foreground);
  opacity: 1;
}

/*
 * Keep the session metadata with the title. Quarto outputs the author before
 * the date, so explicit grid positions give the requested visual order:
 * date, author/publisher, then the session tag.
 */
@media (min-width: 576px) {
  #quarto-content:has(main.content > section#model-overview) #title-block-header {
    display: grid;
    grid-template-columns: max-content max-content max-content;
    grid-template-rows: auto auto;
    column-gap: 2rem;
    row-gap: 0.75rem;
    align-items: end;
  }

  #quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-title,
  #quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-title-meta {
    display: contents;
  }

  #quarto-content:has(main.content > section#model-overview) #title-block-header h1.title {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 0;
  }

  #quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-title-meta > div:first-child {
    grid-column: 2;
    grid-row: 2;
  }

  #quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-title-meta > div:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  #quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-categories {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    margin: 0;
  }

  #quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-title-meta > div {
    margin: 0;
  }

  #quarto-content:has(main.content > section#model-overview) #title-block-header .quarto-title-meta-contents p {
    margin-bottom: 0;
  }
}
