:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202826;
  background: #f6f7f8;
  font-synthesis: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid #187561; outline-offset: 4px; }
.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 2;
  padding: 10px 14px;
  color: #fff;
  background: #164f43;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.page-header { background: #fff; border-bottom: 1px solid #dee3e1; }
.header-inner, main, .page-footer {
  width: calc(100% - 64px);
  max-width: 1200px;
  margin-inline: auto;
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-size: 25px; font-weight: 750; }
.brand-accent { color: #15745f; }
.header-label { color: #5e6764; font-size: 13px; }
main { padding-block: 40px 48px; }
.page-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 34px; }
h1 { margin: 0; font-size: 28px; font-weight: 650; line-height: 1.25; }
h2 { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.5; }
.mode-label { font-size: 13px; color: #626c69; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.playback { min-width: 0; }
.section-heading { min-height: 24px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#playback-status { color: #626c69; font-size: 13px; line-height: 1.5; }
.player-surface { width: 100%; aspect-ratio: 16 / 9; background: #171b1a; border: 1px solid #252c29; border-radius: 6px; overflow: hidden; }
video { width: 100%; height: 100%; display: block; object-fit: contain; }
.error-message { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid #af3945; background: #fff0f1; color: #802b35; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.file-panel { min-width: 0; border-left: 1px solid #dce2df; padding-left: 28px; }
.file-name { min-height: 48px; margin: 16px 0 20px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.primary-button, .secondary-button { width: 100%; min-height: 46px; border-radius: 5px; padding: 10px 14px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.primary-button { background: #176650; color: #fff; border: 1px solid #176650; }
.primary-button:hover { background: #125541; border-color: #125541; }
.secondary-button { background: transparent; color: #39443f; border: 1px solid #bdc9c2; }
.secondary-button:hover:enabled { background: #e9eeeb; }
.secondary-button:disabled { color: #6e7773; border-color: #d4ddd7; }
.file-details { margin: 28px 0; }
.file-details > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: baseline; gap: 14px; padding-block: 10px; border-bottom: 1px solid #e1e6e3; font-size: 13px; line-height: 1.5; }
dt { color: #626c69; }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 22px 30px; border-top: 1px solid #dce2df; font-size: 12px; color: #626c69; }

@media (max-width: 760px) {
  .header-inner, main, .page-footer { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; }
  main { padding-block: 28px 32px; }
  .page-title { margin-bottom: 26px; }
  h1 { font-size: 25px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .file-panel { border-left: 0; border-top: 1px solid #dce2df; padding: 24px 0 0; }
  .file-name { min-height: 24px; margin-block: 12px 20px; }
  .file-details { margin-block: 20px; }
  .file-details > div { grid-template-columns: 100px minmax(0, 1fr); }
}

@media (forced-colors: active) {
  .primary-button, .secondary-button, .player-surface, .error-message { border: 1px solid CanvasText; }
}
