:root {
  color-scheme: dark;
  --tt-canvas: #101214;
  --tt-band: #15181b;
  --tt-surface: #1b1e22;
  --tt-white: #f6f7f8;
  --tt-copy: #c3c9cf;
  --tt-silver: #aeb7c1;
  --tt-blue: #65c9f0;
  --tt-orange: #ffac57;
  --tt-line: #373d43;
  --tt-action: #42b8e5;
  --tt-action-hover: #7ed3f4;
  --tt-action-ink: #081a23;
  --tt-hero: radial-gradient(ellipse at 84% 15%, #1a2931, transparent 60%), #14171a;
}

html .public-site {
  color: var(--tt-white);
  background: var(--tt-canvas);
  --site-navy: var(--tt-white);
  --site-muted: var(--tt-copy);
  --site-primary: var(--tt-blue);
  --site-teal: var(--tt-blue);
  --site-accent: var(--tt-orange);
  --site-footer-bg: #0e1012;
}
html .public-site .site-header {
  background: #111315;
  border-bottom: 1px solid var(--tt-line);
  box-shadow: 0 4px 18px #0003;
}
html .public-site .site-header nav :is(a,summary) { color: var(--tt-copy); }
html .public-site .site-header nav :is(a:hover,summary:hover,a[aria-current="page"]) {
  color: var(--tt-blue);
  text-decoration-color: var(--tt-orange);
}
html .public-site .site-header nav .site-admin-link,
html .public-site .mobile-navigation > summary,
html .public-site .site-submenu > .site-menu-items {
  background: var(--tt-surface);
  border-color: var(--tt-line);
  color: var(--tt-white);
}
html .public-site .site-feature { color: var(--tt-copy); background: var(--tt-surface); }
html .public-site .site-section:has(.site-feature) .site-feature { box-shadow: 0 5px 20px #0002; }
html .public-site .site-main .site-feature .feature-icon { background: #153341; color: var(--tt-blue); }
html .public-site .site-main a:not(.site-button) { color: var(--tt-blue); }
html .public-site .site-footer { background: #0e1012; border-top: 1px solid var(--tt-line); }
html .public-site .site-footer .website-logo { background: transparent; }
html .public-site .site-footer nav h2 { color: var(--tt-orange); }
html .public-site .site-footer-bottom { border-color: var(--tt-line); }

html .public-site .site-header .site-brand, html .dashboard-page .sidebar .brand.brand-image,
html .sidebar .brand, html .brand .teton-login-logo { background: transparent; }
.tt-brand-filter { position: absolute; width: 0; height: 0; pointer-events: none; }
img[src="/media/023c98b7d3d5fc0c441508a0473e137e708df52712bc265c.jpg"],
img[src="/assets/teton-titan-wordmark.jpg"], img[src="/assets/teton-titan-icon.png"] {
  filter: url(#tt-remove-paper);
}
/* The two UI illustrations follow the surrounding dark workspace. */
img[src="/media/0304f5f13e8eb4c7b8302f69c574a9a12c43c4bcb12b15db.png"],
img[src="/media/9b0aec97eb1f131a4fcfa783953254eea41cad9502b0802d.png"] {
  filter: invert(.91) hue-rotate(167deg) saturate(.75);
}
:focus-visible { outline: 2px solid var(--tt-orange); outline-offset: 3px; }
html body:not(.public-site) :is(.primary, .shortcut.primary) {
  color: var(--tt-action-ink);
  background: var(--tt-action);
  border-color: var(--tt-action);
}
html body:not(.public-site) :is(.primary:hover, .shortcut.primary:hover) { background: var(--tt-action-hover); }
html .dashboard-page .dashboard-panel { border-color: var(--tt-line); border-radius: 12px; }
html .dashboard-page .dashboard-panel-heading h2 { color: var(--tt-white); }
html .dashboard-page .sidebar, html .sidebar { background: #111315; border-right: 1px solid var(--tt-line); }
html .dashboard-page .topbar { background: #16181b; border-bottom: 1px solid var(--tt-line); }
html .public-site .site-main .site-element img.site-image {
  box-shadow: none;
}
@media (max-width: 760px) {
  html .public-site .site-header details.mobile-navigation[open] > nav {
    display: block;
    background: var(--tt-band);
    border-color: var(--tt-line);
  }
}
@media (max-width: 760px) {
  html .public-site .mobile-navigation[open] .site-menu-item > a { min-height: 42px; width: 100%; }
  html .public-site .mobile-navigation[open] .site-menu-item > a > span {
    display: inline; width: auto; font-size: 15px; color: var(--tt-white);
  }
}

/* Keep desktop navigation, page sections and footer on the same wide grid. */
@media (min-width: 1100px) {
  .public-site:not(.preview-mode) {
    --tt-page-width: clamp(1100px, 94%, 1680px);
    --tt-content-inset: calc((100% - var(--tt-page-width)) / 2 + 36px);
  }
  .public-site:not(.preview-mode) main.site-main:not(:has(.row-fluid)),
  .public-site:not(.preview-mode) .site-main:has(.row-fluid) > .site-section:not(.row-fluid) {
    max-width: var(--tt-page-width);
  }
  .public-site:not(.preview-mode) .site-header,
  .public-site:not(.preview-mode) .site-footer {
    padding-inline: var(--tt-content-inset);
  }
}

/* A pale backing preserves the charcoal wordmark on the dark theme. */
html body img[data-teton-logo],
html .public-site .site-footer img[data-teton-logo],
html .brand img.teton-login-logo[data-teton-logo] {
  background-color: #f4f6f7;
  border-radius: 5px;
}

html .public-site :is(.site-header,.site-footer) img[data-teton-logo],
html .sidebar .brand img[data-teton-logo] {
  background: transparent;
  filter: url(#teton-night-wordmark) drop-shadow(0 0 0.7px #c3cbd3);
}

/* Keep the dashboard tour sized to its tallest slide as text and screenshots reflow. */
#ss-teton-dashboard-tour {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 12px;
  width: min(100%, 1040px);
  height: auto;
  margin-inline: auto;
  background: #15181b;
}
#ss-teton-dashboard-tour .ss-stage {
  display: grid;
  grid-column: 1 / -1;
  height: auto;
}
#ss-teton-dashboard-tour .ss-slide { position: relative; grid-area: 1 / 1; min-width: 0; }
/* Leave the sticky header, captions, full-size link and controls in view. */
#ss-teton-dashboard-tour { --tour-top-space: 150px; }
.public-site .site-main #ss-teton-dashboard-tour { scroll-margin-top: var(--tour-top-space); }
@media (max-width: 760px) {
  #ss-teton-dashboard-tour { --tour-top-space: 210px; }
}
#ss-teton-dashboard-tour .ss-content {
  height: auto;
  max-height: calc(100svh - var(--tour-top-space) - 62px);
}
#ss-teton-dashboard-tour .ss-type-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 700 / 399;
  flex-shrink: 1;
  min-height: 0;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}
#ss-teton-dashboard-tour .ss-content-image { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 9px; }
#ss-teton-dashboard-tour .ss-button { text-decoration: underline; }
#ss-teton-dashboard-tour .ss-counter { position: static; grid-row: 2; grid-column: 1; justify-self: start; color: #c3c9cf; }
#ss-teton-dashboard-tour .ss-controls { position: static; grid-row: 2; grid-column: 2; justify-self: end; }
#ss-teton-dashboard-tour .ss-controls button { min-width: 44px; min-height: 44px; border: 1px solid #515c66; border-radius: 6px; }

/* On short landscape screens, place the caption beside the image. */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 550px) {
  .public-site:has(#ss-teton-dashboard-tour) .site-header { position: static; }
  #ss-teton-dashboard-tour { --tour-top-space: 8px; }
  #ss-teton-dashboard-tour .ss-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-content: center;
    column-gap: 14px;
  }
  #ss-teton-dashboard-tour .ss-type-image {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    max-height: calc(100svh - 100px);
  }
  #ss-teton-dashboard-tour .ss-type-title,
  #ss-teton-dashboard-tour .ss-type-text,
  #ss-teton-dashboard-tour .ss-type-button { grid-column: 1; }
}
