:root {
  color-scheme: dark;
  --background: #100d18;
  --panel: #191523;
  --edge: #332b43;
  --white: #f7f4fb;
  --muted: #b6acc4;
  --lime: #d3fa82;
  --lavender: #ceb9ff;
  font-family: "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--white); line-height: 1.5; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.frame { width: min(1192px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: #100d18; border-bottom: 1px solid #2a2336; }
.bar-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; text-decoration: none; font-size: 1.27rem; font-weight: 780; letter-spacing: -.05em; }
.brand > span:last-child { color: var(--lavender); }
.brand-icon { display: inline-flex; gap: 3px; align-items: flex-end; justify-content: center; width: 31px; height: 31px; padding-bottom: 8px; border-radius: 9px; background: var(--lime); margin-right: 10px; }
.brand-icon i { width: 3px; border-radius: 2px; background: #202514; height: 5px; }
.brand-icon i:nth-child(2) { height: 9px; }
.brand-icon i:nth-child(3) { height: 14px; }
.method-link { font-size: .9rem; color: var(--muted); text-underline-offset: 4px; text-decoration-color: #6b5d7c; }
.method-link:hover { color: var(--white); }

.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: 330px; margin-block: 26px 22px; border: 1px solid #423452; border-radius: 22px;
  background-color: #21172d;
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: url("/studio.jpg") 100% 52% / 65% auto no-repeat; }
.hero::after { background: linear-gradient(90deg, #21172d 8%, #21172d 35%, #21172d99 53%, #1c10262b 75%, #27144113), linear-gradient(0deg,#130e23a3,transparent 65%); }
.hero-copy { padding: 32px 42px; }
.eyebrow { color: var(--lime); font-size: .78rem; font-weight: 750; letter-spacing: .13em; display: flex; gap: 9px; align-items: center; margin: 0 0 15px; }
.live-dot { height: 7px; width: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px #d3fa8270; }
.hero h1 { margin: 0; font-size: clamp(2.6rem, 5.3vw, 4.55rem); line-height: .99; letter-spacing: -.068em; font-weight: 780; }
.hero h1 em { color: var(--lavender); font-style: normal; }
.hero-copy > p:last-child { color: #ddd4e8; max-width: 380px; margin: 17px 0 0; font-size: 1.03rem; }

.dashboard { display: grid; grid-template-columns: minmax(0, 1.77fr) minmax(0, 1fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 19px; padding: 23px; }
.panel-heading { display: flex; gap: 13px; align-items: center; }
.section-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; font-size: 1.4rem; font-weight: 650; }
.upload-icon { background: #303824; color: var(--lime); }
.bitrate-icon { background: #352848; color: var(--lavender); }
.bitrate-icon span { width: 20px; height: 14px; border: 1.6px solid currentColor; border-radius: 3px; position: relative; margin-bottom: 4px; }
.bitrate-icon span::after { content: ""; position: absolute; width: 10px; height: 2px; border-radius: 2px; background: currentColor; bottom: -5px; left: 3.5px; }
.panel h2 { font-size: 1.21rem; letter-spacing: -.025em; margin: 0; line-height: 1.2; }
.panel-heading p { color: var(--muted); margin: 3px 0 0; font-size: .875rem; }
.test-area { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; padding: 17px 0 21px; }
.meter { margin: 0 auto; position: relative; width: 154px; height: 154px; display: grid; align-content: center; justify-items: center; padding-bottom: 8px; }
.dial, .dial-inner { position: absolute; border-radius: 50%; pointer-events: none; }
.dial { inset: 1px; background: conic-gradient(from 224deg, #a485e8 0deg, #d5bcff 105deg, #bba2ed 235deg, #6c568c 272deg, transparent 272deg); }
.dial-inner { inset: 5px; background: radial-gradient(ellipse at 50% 40%, #302440, var(--panel) 70%); }
.meter[data-running="true"] .dial { background: conic-gradient(from 224deg, #d3fa82 0deg, #d3fa82 var(--sweep, 0deg), #413450 var(--sweep, 0deg) 272deg, transparent 272deg); }
.meter[data-running="true"] .meter-arrow { color: var(--lime); }
.meter > :not(.dial, .dial-inner) { position: relative; }
.meter-arrow { color: var(--lavender); font-size: 1rem; line-height: 1; }
.meter strong { font-variant-numeric: tabular-nums; font-size: 2.45rem; line-height: 1.17; letter-spacing: -.065em; }
.meter-unit { color: var(--muted); font-size: .78rem; }
.test-controls { display: grid; justify-items: start; gap: 10px; }
.mode-control { display: grid; gap: 3px; color: var(--muted); font-size: .875rem; }
.mode-control select {
  appearance: none; padding: 6px 27px 6px 9px; color: var(--white); font: inherit;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 13px center / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 8px center / 5px 5px no-repeat, #211a2d;
  border: 1px solid #4b3b5f; border-radius: 8px;
}
.mode-control select:disabled { opacity: .63; }
.status { color: #e6deee; font-size: .9rem; margin: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 43px; border-radius: 10px; border: 1px solid transparent; font-size: .94rem; font-weight: 750; padding: 8px 17px; }
.primary { color: #1b2510; background: var(--lime); }
.primary:hover { background: #e4ffa6; }
.secondary { color: var(--white); background: #2a2038; border-color: #504066; min-height: 34px; padding: 3px 9px; }
.secondary:hover { background: #3a2b4d; }
.play { display: inline-block; border-block: 6px solid transparent; border-left: 9px solid currentColor; }
.primary[data-active="true"] .play { border: 0; width: 10px; height: 10px; background: currentColor; border-radius: 2px; }
.skip-options { min-height: 34px; }
.skip-control { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: .875rem; color: var(--muted); position: relative; min-height: 34px; }
.skip-control input { position: absolute; opacity: 0; width: 32px; height: 21px; margin: 0; }
.skip-control:has(:disabled) { opacity: .63; cursor: default; }
.switch { width: 32px; height: 19px; border-radius: 12px; border: 1px solid #655675; background: #2b2236; padding: 2px; flex: none; }
.switch::after { content: ""; display: block; width: 13px; height: 13px; border-radius: 50%; background: #b2a1c5; transition: transform .14s; }
.skip-control input:checked + .switch { background: #323c24; border-color: #758b51; }
.skip-control input:checked + .switch::after { transform: translateX(13px); background: var(--lime); }
.skip-control input:focus-visible + .switch { outline: 2px solid var(--lime); outline-offset: 3px; }

.metrics { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.result-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 23px; margin-top: 16px; }
.partner-panel { margin-top: 16px; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; list-style: none; padding: 0; margin: 14px 0 0; }
.partner-grid li { background: #211a2d; border: 1px solid #352b44; border-radius: 10px; padding: 11px 13px; overflow-wrap: anywhere; }
.partner-grid a { color: var(--lavender); font-weight: 700; text-underline-offset: 3px; }
.partner-grid p { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.result-details { margin: 12px 0 0; }
.result-details > div { display: grid; grid-template-columns: minmax(85px, 110px) minmax(0, 1fr); gap: 8px; padding: 4px 0; }
.result-details dt, .result-share p { color: var(--muted); font-size: .9rem; }
.result-details dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.result-share p { margin: 6px 0 10px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-services { margin-top: 12px; }
.share-services a { padding: 3px 8px; border: 1px solid #4b3b5f; border-radius: 6px; color: var(--lavender); text-underline-offset: 3px; font-size: .875rem; }
.share-status { margin-top: 8px; }
#manual-copy { margin-top: 7px; padding: 7px; border: 1px solid #4b3b5f; border-radius: 7px; width: 100%; }
@media (max-width: 680px) { .result-panel { grid-template-columns: minmax(0, 1fr); } }
.metric { min-width: 0; border: 1px solid #352b44; background: #211a2d; border-radius: 10px; padding: 8px 11px; }
.metric dt { font-size: .83rem; color: var(--muted); white-space: nowrap; }
.metric dt span { color: var(--lavender); margin-right: 2px; }
.is-upload dt span { color: var(--lime); }
.metric dd { margin: 1px 0 0; font-size: .98rem; font-weight: 690; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.loaded { color: var(--muted); margin: 9px 0 0; font-size: .875rem; }
.field { margin-top: 21px; }
.field label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 700; }
.field-box { display: flex; align-items: center; border: 1px solid #4b3b5f; background: #110d1b; border-radius: 10px; }
.field-box:focus-within { outline: 2px solid var(--lavender); outline-offset: 2px; }
.field-box input { color: var(--white); width: 100%; min-width: 0; font-weight: 680; border: 0; background: transparent; padding: 9px 0 9px 12px; outline: none; }
.field-box span { color: var(--lavender); font-size: .83rem; padding: 0 12px 0 8px; white-space: nowrap; }
.field p { color: var(--muted); font-size: .85rem; margin: 7px 0 0; }
.verdict { border-radius: 11px; background: #261e33; border: 1px solid #3e3051; margin-top: 18px; padding: 11px 13px; }
.verdict[data-tone="good"] { background: #242d1f; border-color: #526340; }
.verdict[data-tone="good"] strong { color: var(--lime); }
.verdict[data-tone="warn"] { background: #302525; border-color: #664746; }
.verdict[data-tone="warn"] strong { color: #ffd3b6; }
.verdict strong { font-size: .92rem; color: #eadbff; }
.verdict p { color: var(--muted); font-size: .875rem; margin: 3px 0 0; }
.method { margin: 16px 0 0; padding: 12px 15px; border: 1px solid var(--edge); border-radius: 11px; }
.method summary { cursor: pointer; color: var(--lavender); font-size: .9rem; width: fit-content; }
.method p { max-width: 74ch; color: var(--muted); margin: 10px 0 3px; }
.footer { display: flex; justify-content: space-between; color: var(--muted); gap: 14px; padding: 17px 0 20px; font-size: .83rem; }

@media (max-width: 850px) {
  .frame { width: calc(100% - 36px); }
  .dashboard { grid-template-columns: 1fr; }
  .hero { min-height: 290px; }
  .hero::before { background-size: cover; background-position: center; }
  .hero::after { background: linear-gradient(90deg, #21172dfa 5%, #21172dde 40%, #21172d33), linear-gradient(0deg, #130e23aa, transparent); }
  .hero-copy { padding: 26px; }
}
@media (max-width: 480px) {
  .bar-inner { height: 59px; }
  .hero { margin-block: 15px; }
  .hero-copy { padding: 23px 18px; }
  .eyebrow { font-size: .7rem; }
  .panel { padding: 16px; }
  .test-area { grid-template-columns: auto 1fr; gap: 10px; }
  .meter { width: 110px; height: 110px; }
  .meter strong { font-size: 1.9rem; }
  .button { font-size: .85rem; padding-inline: 11px; gap: 8px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
