:root {
  --bg: #f4efe7;
  --bg-top: #f8f3ec;
  --surface: #fffaf4;
  --surface-strong: #fff;
  --ink: #1d2433;
  --muted: #5c6374;
  --line: #d8cfc1;
  --accent: #18676b;
  --accent-strong: #0f4e52;
  --accent-soft: #d6ecec;
  --warm: #d1793f;
  --shadow: 0 18px 40px rgba(29, 36, 51, 0.12);
  --status-error-bg: rgba(214, 50, 50, 0.14);
  --status-error-ink: #8c1d1d;
  --canvas-empty-bg: #eff5f5;
  --canvas-empty-ink: #5c6374;
  --radius: 20px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #111820;
  --bg-top: #1a2430;
  --surface: #18222c;
  --surface-strong: #22303d;
  --ink: #eef4fa;
  --muted: #afbcc8;
  --line: #334150;
  --accent: #6dc9c8;
  --accent-strong: #baf0ef;
  --accent-soft: rgba(109, 201, 200, 0.16);
  --warm: #f2a66d;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  --status-error-bg: rgba(255, 120, 120, 0.16);
  --status-error-ink: #ffb2b2;
  --canvas-empty-bg: #1c2732;
  --canvas-empty-ink: #d8e2ec;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(209, 121, 63, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(24, 103, 107, 0.1), transparent 24%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  transition: background 0.25s ease, color 0.25s ease;
}

.hero {
  padding: 3rem 1.25rem 1.5rem;
}

.hero__content {
  max-width: 1100px;
  margin: 0 auto;
}

.hero__topbar {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent-strong);
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Alegreya Sans", "Trebuchet MS", sans-serif;
  margin-top: 0;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.95;
  max-width: 12ch;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: none;
}

.hero-brand__icon {
  width: clamp(2.2rem, 4vw, 3.2rem);
  height: clamp(2.2rem, 4vw, 3.2rem);
  flex: 0 0 auto;
}

.lead {
  max-width: 65ch;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-link {
  display: inline-flex;
  margin-top: 0.3rem;
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.hero-link:hover {
  text-decoration: underline;
}

.hero__tools {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-picker {
  display: grid;
  gap: 0.3rem;
  min-width: 10.5rem;
  color: var(--ink);
  font-weight: 700;
}

.language-picker span {
  font-size: 0.88rem;
}

.language-picker select {
  min-width: 0;
  padding: 0.72rem 0.85rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.theme-toggle {
  width: auto;
  flex: 0 0 auto;
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.theme-toggle:hover:not(:disabled) {
  background: var(--surface-strong);
}

.theme-toggle__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1rem;
}

.panel {
  background: rgba(255, 250, 244, 0.88);
  border: 1px solid rgba(216, 207, 193, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

:root[data-theme="dark"] .panel {
  background: rgba(24, 34, 44, 0.9);
  border-color: rgba(77, 94, 110, 0.8);
}

.controls {
  grid-row: span 2;
}

.viewer,
.charts {
  min-width: 0;
}

.field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.field-hint {
  margin: -0.1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.field > span:first-child,
.field > .title-with-info:first-child {
  font-weight: 700;
}

input[type="file"],
input[type="number"],
input[type="text"],
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.58rem 0.82rem;
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
}

.checkbox-field {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  color: var(--ink);
  font-weight: 700;
}

.checkbox-field input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.checkbox-field span {
  font-weight: 600;
}

.checkbox-field > .title-with-info {
  font-weight: 600;
}

.checkbox-field--compact {
  gap: 0.5rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.checkbox-field--compact input {
  margin-top: 0.15rem;
}

.checkbox-field--compact span,
.checkbox-field--compact > .title-with-info {
  font-weight: 600;
  line-height: 1.3;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.actions {
  display: grid;
  gap: 0.7rem;
  margin: 1.25rem 0;
}

.viewer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 1rem;
  align-items: start;
}

.viewer-stage {
  min-width: 0;
}

.viewer-actions {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

#orientationControl {
  padding: 0.72rem 0.75rem;
}

.viewer-tools {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.viewer-tools[hidden] {
  display: none;
}

.viewer-tools__field {
  margin-bottom: 0;
  gap: 0.32rem;
}

.viewer-tools__field select {
  padding: 0.55rem 0.7rem;
}

.viewer-tools__check {
  align-items: flex-start;
}

.actions--viewer {
  margin: 0;
  gap: 0.55rem;
}

.action-control {
  display: grid;
  gap: 0.22rem;
  padding: 0.72rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.action-control__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-control__row > button {
  width: 100%;
  justify-content: center;
  padding: 0.78rem 0.72rem;
  font-size: 0.84rem;
  line-height: 1.15;
  white-space: nowrap;
}

.action-control__row > div {
  position: relative;
  flex: 0 0 auto;
}

.action-control .title-with-info {
  justify-content: space-between;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.action-control .info-tooltip {
  left: auto;
  right: 0;
}

.calibration-editor {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.15rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.calibration-editor[hidden] {
  display: none;
}

.calibration-editor__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.calibration-editor__field {
  margin: 0;
  gap: 0.22rem;
}

.calibration-editor__field > .title-with-info:first-child,
.calibration-editor__field > span:first-child {
  font-size: 0.78rem;
}

.calibration-editor__row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.calibration-editor input[type="number"],
.calibration-editor input[type="text"] {
  padding: 0.48rem 0.68rem;
  border-radius: 10px;
}

.calibration-editor input[type="number"] {
  width: 4.8rem;
  min-width: 4.8rem;
  -moz-appearance: textfield;
  appearance: textfield;
}

.calibration-editor input[type="number"]::-webkit-outer-spin-button,
.calibration-editor input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calibration-editor .field-hint {
  margin-top: 0;
}

.calibration-editor__apply {
  flex: 0 0 auto;
  padding: 0.42rem 0.72rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.viewer-actions .status {
  padding: 0.75rem 0.8rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.player-bar,
.player-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.player-bar {
  margin-top: 0.7rem;
  gap: 0.85rem;
}

.player-bar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 50%;
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
}

.player-bar__toggle--play {
  padding-left: 0.12rem;
}

.player-bar__toggle--pause {
  padding-left: 0;
}

.player-bar__time {
  min-width: 4.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.timeline-range-wrap {
  --start-percent: 0%;
  --end-percent: 100%;
  position: relative;
  flex: 1 1 auto;
  height: 2rem;
  display: flex;
  align-items: center;
}

.timeline-range-wrap::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 0.32rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.timeline-selection {
  position: absolute;
  top: 50%;
  left: var(--start-percent);
  width: calc(var(--end-percent) - var(--start-percent));
  height: 0.44rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(109, 201, 200, 0.8);
  box-shadow: 0 0 0 1px rgba(109, 201, 200, 0.18);
  pointer-events: none;
}

.timeline-boundary {
  position: absolute;
  top: 50%;
  width: 1rem;
  height: 1.45rem;
  padding: 0;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: ew-resize;
  z-index: 2;
}

.timeline-boundary::before {
  content: "";
  position: absolute;
  inset: 0.12rem 0.36rem;
  border-radius: 999px;
  background: var(--warm);
  box-shadow: 0 0 0 2px rgba(17, 24, 32, 0.65);
}

.timeline-boundary:hover::before,
.timeline-boundary:focus-visible::before {
  box-shadow:
    0 0 0 2px rgba(17, 24, 32, 0.65),
    0 0 0 4px rgba(109, 201, 200, 0.24);
}

.timeline-boundary:hover:not(:disabled),
.timeline-boundary:focus-visible {
  transform: translate(-50%, -50%);
  background: transparent;
}

.timeline-boundary:disabled {
  cursor: default;
  opacity: 0.7;
  pointer-events: none;
}

.timeline-boundary--start {
  left: var(--start-percent);
}

.timeline-boundary--end {
  left: var(--end-percent);
}

.player-actions {
  margin-top: 0.55rem;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem 1rem;
}

.player-actions .button {
  padding: 0.52rem 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.player-actions__group {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.player-actions__group--interval {
  width: 100%;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
}

.button--interval-reset {
  padding: 0.42rem 0.78rem;
  font-size: 0.84rem;
}

.player-meta {
  margin: 0.02rem 0;
}

.player-speed {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-left: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.player-actions__group--interval > .player-speed,
.player-actions__group--interval > .button--interval-reset {
  flex: 0 0 auto;
}

.player-actions__group--interval > .button--interval-reset {
  margin-left: auto;
}

.player-actions__group--interval > .button--interval-reset + .player-speed {
  margin-left: 0;
}

.player-actions__group--interval > .player-speed {
  margin-left: 0;
}

.player-speed > span:first-child {
  font-weight: 700;
}

.player-speed--compact {
  gap: 0.32rem;
  margin-left: 0;
  font-size: 0.82rem;
  white-space: nowrap;
}

.player-speed input {
  width: 4.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.player-speed input::-webkit-outer-spin-button,
.player-speed input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.player-speed.player-speed--compact input {
  width: 2.8rem;
  padding: 0.18rem 0.32rem;
  font-size: 0.82rem;
  line-height: 1.1;
}

.button--subtle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button--subtle:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.button--active,
#manualModeBtn.button--active {
  background: var(--warm);
  color: white;
}

.button--active:hover:not(:disabled),
#manualModeBtn.button--active:hover:not(:disabled) {
  background: #b76431;
}

.timeline-range {
  position: relative;
  width: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.timeline-range::-webkit-slider-runnable-track {
  height: 0.32rem;
  background: transparent;
}

.timeline-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: -0.42rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--surface-strong);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.timeline-range::-moz-range-track {
  height: 0.32rem;
  background: transparent;
}

.timeline-range::-moz-range-thumb {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--surface-strong);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.timeline-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.15;
  text-align: center;
}

.player-range-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.player-range-field > span:first-child {
  font-weight: 700;
}

.button--mark-time {
  min-width: auto;
  padding: 0.18rem 0.22rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.button--mark-time:hover:not(:disabled),
.button--mark-time:focus-visible {
  background: transparent;
  color: var(--ink);
}

.player-range-field .title-with-info {
  min-width: 0;
}

.player-range-field .info-tooltip {
  width: min(220px, 60vw);
  white-space: normal;
}

.time-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.14rem 0.42rem 0.14rem 0.46rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.time-input-wrap input {
  width: 4.15rem;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.88rem;
}

.time-input-wrap__unit {
  color: var(--muted);
  font-size: 0.8rem;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.status {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.status--error {
  background: var(--status-error-bg);
  color: var(--status-error-ink);
}

.help {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.help ol {
  padding-left: 1.2rem;
  color: var(--muted);
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24, 103, 107, 0.14), rgba(209, 121, 63, 0.12)),
    #dfe8e8;
}

.selection-status {
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(24, 103, 107, 0.1);
  border: 1px solid rgba(24, 103, 107, 0.18);
  color: var(--accent-strong);
  font-weight: 600;
}

#videoCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.canvas-hint {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  background: rgba(29, 36, 51, 0.72);
  color: white;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.95rem;
  pointer-events: none;
}

.selection-toast {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(24, 103, 107, 0.92);
  color: white;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(29, 36, 51, 0.2);
  pointer-events: none;
}

.legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  margin-right: 0.45rem;
}

.dot--target {
  background: #d63232;
}

.dot--path {
  background: var(--warm);
}

.dot--fit {
  background: #3a78b3;
}

.charts-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.charts-header h2 {
  margin-bottom: 0;
}

.fit-toggle-wrap {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.fit-toggle-wrap--viewer {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.fit-toggle {
  gap: 0.8rem;
}

.fit-toggle__hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.chart-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
}

:root[data-theme="dark"] .chart-card,
:root[data-theme="dark"] .fit-toggle-wrap,
:root[data-theme="dark"] .fit-panel,
:root[data-theme="dark"] .table-scroll,
:root[data-theme="dark"] .calibration-editor,
:root[data-theme="dark"] .viewer-tools,
:root[data-theme="dark"] .action-control {
  background: rgba(34, 48, 61, 0.82);
}

.summary-wrap {
  margin-top: 1rem;
}

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

.summary-grid--fit {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.summary-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.summary-card__label {
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-card__label-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.title-with-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.info-button {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
}

.info-button:hover:not(:disabled),
.info-button[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: none;
}

.info-tooltip {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 5;
  width: min(280px, 70vw);
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 400;
}

.summary-card__value {
  font-size: 1.15rem;
  line-height: 1.2;
}

.summary-card__value--formula {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.96rem;
  line-height: 1.5;
}

:root[data-theme="dark"] .summary-card {
  background: rgba(34, 48, 61, 0.82);
}

.fit-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.fit-panel__lead {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.table-wrap {
  margin-top: 1rem;
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:nth-child(even) {
  background: rgba(24, 103, 107, 0.05);
}

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  color: var(--muted);
  text-align: center;
}

.footer__version {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.footer a {
  color: var(--accent-strong);
}

@media (max-width: 900px) {
  .hero__topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__tools {
    justify-content: flex-start;
    align-items: stretch;
  }

  .theme-toggle {
    align-self: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-row: auto;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .charts-header {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .viewer-workspace {
    grid-template-columns: 1fr;
  }

  .player-bar,
  .player-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .player-actions__group {
    width: 100%;
  }

  .player-speed {
    margin-left: 0;
  }

  .player-actions__group--interval {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .player-range-field {
    justify-content: space-between;
  }

  .button--interval-reset {
    align-self: stretch;
    margin-left: 0;
  }

  .player-bar__time {
    text-align: left;
  }
}
