:root {
  color-scheme: light dark;
  --fu-black: #000000;
  --fu-black-90: #1a1a1a;
  --fu-black-80: #333333;
  --fu-black-70: #4d4d4d;
  --fu-black-20: #cccccc;
  --fu-black-10: #e6e6e6;
  --fu-green: #ccff00;
  --fu-white: #ffffff;
  --fu-blue: #004659;
  --fu-blue-90: #195869;
  --fu-blue-10: #e5ecee;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f5f7f7;
  --text: #000000;
  --muted: #4d4d4d;
  --line: #cccccc;
  --accent: #ccff00;
  --link: #004659;
  --focus: 0 0 0 3px rgba(204, 255, 0, 0.9);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --panel: #1a1a1a;
  --panel-soft: #262626;
  --text: #ffffff;
  --muted: #cccccc;
  --line: #4d4d4d;
  --link: #ccff00;
  --focus: 0 0 0 3px rgba(204, 255, 0, 0.75);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", "Source Sans Pro", "Source Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
iframe:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  padding: 0.55rem 0.8rem;
  background: var(--accent);
  color: var(--fu-black);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.page-shell {
  width: min(1300px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding-top: 0.75rem;
}

.brand-row {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 5.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--fu-white);
  color: var(--fu-black);
}

.fu-wordmark {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.fu-wordmark img {
  display: block;
  width: min(100%, 19rem);
  height: auto;
}

.unit-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 13rem;
  padding: 0.8rem 0 0.8rem 1rem;
  border-left: 1px solid var(--line);
  color: var(--fu-black-70);
  text-align: right;
}

.unit-title strong {
  color: var(--fu-black);
}

.page-shell {
  padding: 1.4rem 0 2.5rem;
}

.intro {
  max-width: 760px;
  padding: 1.2rem 0 1.5rem;
  border-top: 0.45rem solid var(--accent);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--fu-blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

[data-theme="dark"] .eyebrow {
  color: var(--fu-green);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p:last-child {
  max-width: 66ch;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.topic-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1rem;
  overflow-x: auto;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  scrollbar-width: thin;
}

.topic-tab {
  flex: 0 0 auto;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.55rem 0.85rem;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.topic-tab:hover {
  border-color: var(--fu-blue);
  background: var(--fu-blue-10);
}

[data-theme="dark"] .topic-tab:hover {
  background: var(--panel-soft);
}

.topic-tab.is-active {
  border-color: var(--fu-green);
  background: var(--fu-green);
  color: var(--fu-black);
}

.topic-panel[hidden] {
  display: none;
}

.section-block {
  margin-top: 1rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0;
}

.section-action {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--link);
  font-weight: 800;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

.section-action:hover {
  background: var(--fu-blue-10);
}

[data-theme="dark"] .section-action:hover {
  background: var(--panel-soft);
}

.demo-showcase {
  width: min(1300px, calc(100vw - 2rem));
  margin-left: 50%;
  transform: translateX(-50%);
}

.demo-showcase .section-heading,
.demo-showcase .demo-intro,
.demo-showcase .demo-caption {
  width: min(100%, 1300px);
}

.demo-intro {
  max-width: 68ch;
  margin: -0.25rem 0 0.85rem;
  color: var(--muted);
}

.demo-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 0.75rem;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.demo-option {
  display: grid;
  gap: 0.18rem;
  min-height: 6rem;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.85rem 1rem;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.demo-option strong {
  font-size: 1.2rem;
  line-height: 1.15;
}

.demo-option span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.demo-option-kicker {
  color: var(--fu-blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

[data-theme="dark"] .demo-option-kicker {
  color: var(--fu-green);
}

.demo-actions button {
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  color: var(--link);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.demo-option:hover,
.demo-actions button:hover {
  border-color: var(--fu-blue);
}

.demo-option.is-active {
  border-color: var(--fu-green);
  background: var(--fu-green);
  color: var(--fu-black);
}

.demo-option.is-active .demo-option-kicker,
.demo-option.is-active span:last-child {
  color: var(--fu-black);
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.demo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.demo-frame-wrap {
  background: var(--fu-black);
  border-bottom: 1px solid var(--line);
}

.demo-frame {
  display: block;
  width: 100%;
  height: min(82vh, 880px);
  min-height: 42rem;
  border: 0;
  background: var(--fu-black);
}

.demo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
}

.demo-caption h3,
.demo-caption p {
  margin: 0;
}

.demo-caption p:last-child {
  max-width: 78ch;
  margin-top: 0.25rem;
  color: var(--muted);
}

.demo-caption a {
  flex: 0 0 auto;
  color: var(--link);
  font-weight: 800;
  text-decoration: none;
}

.demo-caption a:hover {
  text-decoration: underline;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.camera-card,
.service-link {
  border: 1px solid var(--line);
  background: var(--panel);
}

.camera-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--fu-black);
}

.camera-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.8rem;
  border-top: 1px solid var(--line);
}

.camera-caption h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.camera-caption a,
.site-footer a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.camera-caption a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-link {
  display: grid;
  gap: 0.3rem;
  min-height: 8.5rem;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
  border-left: 0.45rem solid var(--accent);
}

.service-link:hover {
  background: var(--fu-blue-10);
}

[data-theme="dark"] .service-link:hover {
  background: var(--panel-soft);
}

.service-link strong {
  font-size: 1.35rem;
  line-height: 1.15;
}

.service-link span:last-child {
  color: var(--muted);
}

.service-kicker {
  color: var(--fu-blue);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

[data-theme="dark"] .service-kicker {
  color: var(--fu-green);
}

.service-link.is-pending {
  border-left-color: var(--fu-black-20);
  color: var(--muted);
}

.stats-panel {
  display: grid;
  gap: 1rem;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
}

.stats-control {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border-left: 0.45rem solid var(--accent);
  background: var(--panel-soft);
}

.stats-control label,
.stats-tools label,
.stats-table-tools label {
  color: var(--muted);
  font-weight: 800;
}

.stats-control select,
.stats-tools input,
.stats-tools select,
.stats-tools button,
.stats-table-tools input,
.stats-table-tools select,
.stats-table-tools button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.stats-control select,
.stats-tools select,
.stats-tools input,
.stats-tools button,
.stats-table-tools select,
.stats-table-tools button {
  min-height: 2.8rem;
  padding: 0.45rem 0.6rem;
}

.stats-control select {
  font-weight: 700;
}

.stats-table-tools input {
  min-height: 2.4rem;
  margin-top: 0.25rem;
  padding: 0.35rem 0.5rem;
}

.stats-stage {
  display: grid;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.stats-stage h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.15;
}

.stats-stage p {
  max-width: 78ch;
  margin: 0;
  color: var(--muted);
}

.stats-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.stats-chart {
  min-height: 22rem;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.stats-chart:empty {
  display: none;
}

.stats-tools {
  display: grid;
  grid-template-columns: minmax(12rem, 1.5fr) repeat(3, minmax(8rem, 0.8fr)) auto auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.8rem;
}

.stats-tools label,
.stats-table-tools label {
  display: grid;
  gap: 0.25rem;
}

.stats-tools button,
.stats-table-tools button {
  min-width: 6.25rem;
  color: var(--link);
  font-weight: 800;
  cursor: pointer;
}

.stats-tools button:hover,
.stats-table-tools button:hover {
  background: var(--fu-blue-10);
}

[data-theme="dark"] .stats-tools button:hover,
[data-theme="dark"] .stats-table-tools button:hover {
  background: var(--panel-soft);
}

.stats-series-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 10rem;
  margin-bottom: 0.9rem;
  overflow: auto;
  padding: 0.55rem;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.stats-series-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
}

.stats-series-actions button {
  min-height: 2rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--link);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
}

.stats-series-actions button:hover {
  background: var(--fu-blue-10);
}

[data-theme="dark"] .stats-series-actions button:hover {
  background: var(--panel-soft);
}

.stats-series-filter label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  font-size: 0.9rem;
}

.stats-series-filter input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.stats-series-filter i {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border-radius: 50%;
}

.stats-chart-shell {
  position: relative;
  min-width: 52rem;
}

.stats-tooltip {
  position: absolute;
  z-index: 5;
  max-width: min(28rem, calc(100vw - 2rem));
  max-height: min(22rem, calc(100% - 1rem));
  overflow: auto;
  pointer-events: none;
  border: 1px solid var(--line);
  background: var(--fu-black);
  color: var(--fu-white);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.22);
  font-size: 0.92rem;
  line-height: 1.25;
  padding: 0;
}

.stats-tooltip[hidden] {
  display: none;
}

.stats-tooltip-title {
  position: sticky;
  top: 0;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--fu-black);
  font-weight: 900;
}

.stats-tooltip-rows {
  display: grid;
  gap: 0.12rem;
  padding: 0.45rem 0.55rem 0.55rem;
}

.stats-tooltip-row {
  display: grid;
  grid-template-columns: 0.75rem minmax(8rem, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  min-width: 16rem;
}

.stats-tooltip-row i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.stats-tooltip-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-tooltip-row strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stats-svg {
  display: block;
  min-width: 52rem;
  width: 100%;
  height: auto;
}

.stats-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.stats-axis {
  fill: var(--muted);
  font-size: 0.82rem;
}

.stats-axis-x {
  text-anchor: middle;
}

.stats-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.stats-point {
  stroke: var(--panel);
  stroke-width: 1.5;
  cursor: pointer;
}

.stats-point:hover,
.stats-point:focus {
  r: 6;
  stroke-width: 2.5;
}

.stats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  max-height: 8.2rem;
  overflow: auto;
  padding: 0.5rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.stats-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.stats-legend i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
}

.stats-wordcloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.45rem;
  min-height: 24rem;
  padding: 1.4rem 0.7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 50%, var(--panel-soft), var(--panel) 72%);
}

.stats-wordcloud span {
  font-weight: 800;
  line-height: 1;
}

.stats-word {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  margin: -0.02rem 0.02rem;
  padding: 0.08rem 0.16rem;
  transition: transform 120ms ease, background 120ms ease;
}

.stats-word:hover,
.stats-word:focus {
  background: var(--fu-blue-10);
  outline: none;
  transform: scale(1.08) !important;
}

[data-theme="dark"] .stats-word:hover,
[data-theme="dark"] .stats-word:focus {
  background: var(--panel-soft);
}

.stats-inspector {
  display: block;
  min-height: 2.4rem;
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-left: 0.35rem solid var(--accent);
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 700;
}

.stats-table-tools {
  display: grid;
  grid-template-columns: minmax(12rem, 1.4fr) minmax(9rem, 0.8fr) auto auto auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.25rem;
}

.stats-table-wrap {
  max-height: 34rem;
  overflow: auto;
  border: 1px solid var(--line);
}

.stats-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.stats-table-wrap th,
.stats-table-wrap td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.stats-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-soft);
  color: var(--text);
}

.stats-table-wrap th button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.stats-empty {
  padding: 2rem 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer span:last-child {
  display: inline-flex;
  gap: 0.8rem;
}

body[data-embed="true"],
body.is-embed {
  background: transparent;
}

body[data-embed="true"] .page-shell,
body.is-embed .page-shell {
  width: 100%;
  padding: 0;
}

body[data-embed="true"] .topic-tabs,
body.is-embed .topic-tabs {
  top: 0;
}

body.is-embed [data-standalone] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --panel: #1a1a1a;
    --panel-soft: #262626;
    --text: #ffffff;
    --muted: #cccccc;
    --line: #4d4d4d;
    --link: #ccff00;
    --focus: 0 0 0 3px rgba(204, 255, 0, 0.75);
  }
}

@media (max-width: 880px) {
  .brand-row,
  .camera-grid,
  .demo-picker,
  .service-list,
  .stats-tools,
  .stats-table-tools {
    grid-template-columns: 1fr;
  }

  .demo-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .unit-title {
    min-width: 0;
    padding-left: 0;
    border-left: 0;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  .page-shell {
    width: min(100% - 1rem, 1300px);
  }

  .fu-wordmark img {
    width: min(100%, 16rem);
  }

  h1 {
    font-size: 2.15rem;
  }

  .camera-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topic-tabs {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  body[data-embed="true"] .topic-tabs,
  body.is-embed .topic-tabs {
    margin-left: 0;
    margin-right: 0;
  }

  .topic-tab {
    min-height: 2.6rem;
    padding: 0.5rem 0.7rem;
  }

  .demo-frame {
    height: 74vh;
    min-height: 30rem;
  }

  .stats-chart-shell,
  .stats-svg {
    min-width: 44rem;
  }
}
