@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: block;
  font-weight: 100 900;
  src: url("/fonts/InterVariable.woff2") format("woff2-variations");
}

:root,
html.dark {
  color-scheme: dark;
  --radius: 0.625rem;
  --background: oklch(14.5% 0 0);
  --foreground: oklch(98.5% 0 0);
  --card: oklch(20.5% 0 0);
  --popover: oklch(20.5% 0 0);
  --primary: oklch(92.2% 0 0);
  --primary-foreground: oklch(20.5% 0 0);
  --secondary: oklch(26.9% 0 0);
  --muted: oklch(26.9% 0 0);
  --muted-foreground: oklch(70.8% 0 0);
  --destructive: oklch(70.4% 0.191 22.216);
  --border: oklch(100% 0 0 / 0.1);
  --input: oklch(100% 0 0 / 0.15);
  --ring: oklch(55.6% 0 0);
  --fullscreen: oklch(0.11 0 0);
  --sev-high-text: oklch(70.4% 0.191 22.216);
  --sev-medium-text: oklch(82.8% 0.189 84.429);
  --sev-low-text: var(--foreground);
  --warn-text: oklch(82.8% 0.189 84.429);
  --pass-text: oklch(76.5% 0.177 163.223);
  --low-badge-bg: oklch(55.6% 0 0 / 0.2);
  --low-badge-text: oklch(87% 0 0);
  --frame-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.1);
}

html.light {
  color-scheme: light;
  --background: oklch(100% 0 0);
  --foreground: oklch(14.5% 0 0);
  --card: oklch(100% 0 0);
  --popover: oklch(100% 0 0);
  --primary: oklch(20.5% 0 0);
  --primary-foreground: oklch(98.5% 0 0);
  --secondary: oklch(97% 0 0);
  --muted: oklch(97% 0 0);
  --muted-foreground: oklch(55.6% 0 0);
  --destructive: oklch(57.7% 0.245 27.325);
  --border: oklch(92.2% 0 0);
  --input: oklch(92.2% 0 0);
  --ring: oklch(70.8% 0 0);
  --fullscreen: oklch(0.955 0 0);
  --sev-high-text: oklch(50.5% 0.213 27.518);
  --sev-medium-text: oklch(55.5% 0.163 48.998);
  --warn-text: oklch(66.6% 0.179 58.318);
  --pass-text: oklch(50.8% 0.118 165.612);
  --low-badge-bg: oklch(55.6% 0 0 / 0.15);
  --low-badge-text: oklch(37.1% 0 0);
  --frame-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15), 0 4px 6px -4px rgb(0 0 0 / 0.15), 0 0 0 1px rgb(0 0 0 / 0.1);
}

*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}

html,
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
  color: inherit;
  background: none;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.muted {
  color: var(--muted-foreground);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  pointer-events: none;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scan {
  0% {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100cqh);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* Header */

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom-width: 1px;
  background: color-mix(in oklab, var(--background) 80%, transparent);
  backdrop-filter: blur(8px);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding-inline: 16px;
}

.app-header-inner.contained {
  max-width: 80rem;
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.brand {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.header-claims {
  display: none;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground);
}

.header-claims .vsep {
  height: 16px;
}

.theme-toggle {
  margin-left: auto;
}

/* Page */

.page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding: 32px 16px;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-head-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.page-head h1 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.page-head p {
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.slots {
  display: grid;
  gap: 24px;
}

.slot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.slot-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  font-size: 14px;
  line-height: 20px;
}

.slot-head .title {
  flex-shrink: 0;
  font-weight: 500;
}

.slot-head .name {
  min-width: 0;
}

.slot-head .meta {
  display: none;
  flex-shrink: 0;
  color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
}

.slot-head .actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.step {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ratio {
  position: relative;
  aspect-ratio: 16 / 10;
}

.preview {
  overflow: hidden;
  border-radius: 14px;
  border-width: 1px;
  background-color: color-mix(in oklab, var(--muted) 40%, transparent);
}

.dotted {
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 14px 14px;
}

.preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.preview.drop-shadow img {
  filter: drop-shadow(0 3px 3px rgb(0 0 0 / 0.12));
}

.dropzone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: color-mix(in oklab, var(--muted) 30%, transparent);
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.dropzone:hover {
  border-color: color-mix(in oklab, var(--foreground) 25%, transparent);
  background: color-mix(in oklab, var(--muted) 60%, transparent);
}

.dropzone:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.dropzone[data-over] {
  border-color: color-mix(in oklab, var(--foreground) 40%, transparent);
  background: var(--muted);
}

/* Empty state */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  text-align: center;
  text-wrap: balance;
}

.dropzone .empty {
  pointer-events: none;
}

.empty-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 24rem;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--foreground);
}

.empty-title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.empty-desc {
  font-size: 14px;
  line-height: 1.625;
  color: var(--muted-foreground);
}

.empty-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
}

.paste-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted-foreground);
}

.kbds {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 4px;
  border-radius: 6px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.upload-footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
  padding-top: 24px;
  border-top-width: 1px;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 40px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground);
}

.status[data-tone="error"] {
  color: var(--destructive);
}

.status[data-tone="warn"] {
  color: var(--warn-text);
}

.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.turnstile:empty {
  display: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding-inline: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background-clip: padding-box;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  outline: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.btn:active:not(:disabled) {
  translate: 0 1px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn:has(> .lead) {
  padding-left: 8px;
}

.btn:has(> .trail) {
  padding-right: 8px;
}

.btn-default {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-default:hover {
  background: color-mix(in oklab, var(--primary) 80%, transparent);
}

.btn-outline {
  border-color: var(--input);
  background: color-mix(in oklab, var(--input) 30%, transparent);
}

.btn-outline:hover {
  background: color-mix(in oklab, var(--input) 50%, transparent);
}

html.light .btn-outline {
  border-color: var(--border);
  background: var(--background);
}

html.light .btn-outline:hover {
  background: var(--muted);
}

.btn-secondary {
  background: var(--secondary);
}

.btn-secondary:hover {
  background: color-mix(in oklch, var(--secondary), var(--foreground) 5%);
}

.btn-ghost:hover {
  background: color-mix(in oklab, var(--muted) 50%, transparent);
}

html.light .btn-ghost:hover {
  background: var(--muted);
}

.btn-sm {
  gap: 4px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.btn-sm:has(> .lead) {
  padding-left: 6px;
}

.btn-sm:has(> .trail) {
  padding-right: 6px;
}

.btn-sm .icon {
  width: 14px;
  height: 14px;
}

.btn-lg {
  height: 36px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
}

.btn.round {
  border-radius: 999px;
}

/* Badges */

.badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  height: 20px;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.badge .icon {
  width: 12px;
  height: 12px;
}

.badge:has(> .icon) {
  padding-left: 6px;
}

.badge-outline {
  border-color: var(--border);
  color: var(--foreground);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.badge-high {
  background: oklch(63.7% 0.237 25.331 / 0.15);
  color: var(--sev-high-text);
}

.badge-medium {
  background: oklch(76.9% 0.188 70.08 / 0.15);
  color: var(--sev-medium-text);
}

.badge-low {
  background: var(--low-badge-bg);
  color: var(--low-badge-text);
}

.badge-pass {
  background: oklch(69.6% 0.17 162.48 / 0.15);
  color: var(--pass-text);
}

.num {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vsep {
  flex-shrink: 0;
  align-self: center;
  width: 1px;
  background: var(--border);
}

/* Analyzing */

.compare-grid {
  display: grid;
  gap: 24px;
}

.compare-grid .label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.scan-wrap {
  container-type: size;
}

.scanline {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 64px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgb(255 255 255 / 0.08));
  animation: scan 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.scanline::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: rgb(255 255 255 / 0.5);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 16px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
  font-size: 14px;
  line-height: 20px;
}

.card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  padding-inline: 16px;
}

.card-title {
  font-size: 16px;
  line-height: 1.375;
  font-weight: 500;
}

.card-desc {
  color: var(--muted-foreground);
}

.card-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-inline: 16px;
}

.progress {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--muted);
}

.progress > div {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

.steps {
  display: grid;
  gap: 12px;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground);
}

.steps li[data-state="done"] {
  color: var(--foreground);
}

.steps li[data-state="active"] {
  color: var(--foreground);
  font-weight: 500;
}

.step-done {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.step-done .icon {
  width: 10px;
  height: 10px;
}

.step-todo {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid color-mix(in oklab, var(--muted-foreground) 25%, transparent);
}

/* Tabs */

.tabs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 32px;
  padding: 3px;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
}

.tab {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: calc(100% - 1px);
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted-foreground);
  outline: none;
  transition: all 0.15s;
}

.tab:hover {
  color: var(--foreground);
}

.tab:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.tab[aria-selected="true"] {
  border-color: var(--input);
  background: color-mix(in oklab, var(--input) 30%, transparent);
  color: var(--foreground);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

html.light .tab {
  color: color-mix(in oklab, var(--foreground) 60%, transparent);
}

html.light .tab[aria-selected="true"] {
  border-color: transparent;
  background: var(--background);
  color: var(--foreground);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Slider */

.slider {
  --value: 50%;
  width: 100%;
  height: 12px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary) var(--value), var(--muted) var(--value));
}

.slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary) var(--value), var(--muted) var(--value));
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 1px solid var(--ring);
  border-radius: 999px;
  background: #fff;
  transition: box-shadow 0.15s;
}

.slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 1px solid var(--ring);
  border-radius: 999px;
  background: #fff;
}

.slider:hover::-webkit-slider-thumb,
.slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.slider:focus-visible {
  outline: none;
}

/* Results */

.results {
  display: flex;
  flex-direction: column;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 16px;
  border-bottom-width: 1px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.toolbar-left h1 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.toolbar-right .vsep {
  display: none;
  height: 20px;
  margin-inline: 4px;
}

.lg-only {
  display: none !important;
}

.results-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.canvas-col {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.canvas {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background-color: color-mix(in oklab, var(--muted) 30%, transparent);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 16px 16px;
}

.side {
  display: flex;
  align-items: center;
  min-height: 100%;
}

.side-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.pill {
  border-width: 1px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--popover) 90%, transparent);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  backdrop-filter: blur(8px);
}

.opacity-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 20px;
}

.opacity-bar {
  max-width: 100%;
}

.opacity-bar .slider {
  flex-shrink: 1;
  width: 160px;
  min-width: 48px;
}

.opacity-bar .value {
  width: 36px;
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.zoombar {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
}

.zoombar .vsep {
  height: 16px;
  margin-inline: 2px;
}

.zoombar .marks {
  padding-inline: 14px;
}

.zoombar .marks:has(> .lead) {
  padding-left: 10px;
}

.stack {
  display: grid;
  text-align: left;
}

.stack > * {
  grid-area: 1 / 1;
}

.stack > [data-off] {
  visibility: hidden;
}

.zoombar .pct {
  width: 56px;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

/* Pane */

.pane {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.pane.center {
  justify-content: center;
  min-height: calc(100% - 3.5rem);
}

.pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 14px;
  line-height: 20px;
}

.pane-head .label {
  font-weight: 500;
}

.pane-head .note {
  font-weight: 400;
  color: var(--muted-foreground);
}

.pane-head .dims {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--frame-shadow);
  touch-action: none;
  user-select: none;
}

.frame.diff {
  background: #000;
}

.frame.zoomable {
  cursor: zoom-in;
}

.frame.zoomed {
  cursor: grab;
}

.frame.zoomed:active {
  cursor: grabbing;
}

.frame .sizer {
  display: block;
  visibility: hidden;
  min-height: 7rem;
  max-width: 100%;
  max-height: 70svh;
  object-fit: contain;
}

.frame.fs .sizer {
  max-height: calc(100svh - 10rem);
}

.layer {
  position: absolute;
}

.layer > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.layer > img.top {
  height: auto;
}

.marks-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.box {
  position: absolute;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
}

.marker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
  box-shadow: 0 0 0 2px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.45);
  transition: opacity 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.marker:focus-visible {
  box-shadow: 0 0 0 2px var(--ring);
}

.marker.passive {
  z-index: 8;
  pointer-events: none;
}

.marker.active {
  z-index: 10;
}

/* Issues panel */

.issues {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 100%;
  min-height: 0;
  border-top-width: 1px;
  background: var(--background);
}

.issues-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-bottom-width: 1px;
}

.issues-head .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.issues-head .title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.issues-head .elapsed {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.issues-head p {
  font-size: 14px;
  line-height: 1.375;
  color: var(--muted-foreground);
}

.issue-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.issue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  outline: none;
  transition: background-color 0.1s;
}

.issue:hover {
  background: color-mix(in oklab, var(--muted) 50%, transparent);
}

.issue:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.issue[aria-pressed="true"] {
  background: color-mix(in oklab, var(--muted) 60%, transparent);
}

.issue-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.issue-title {
  font-weight: 500;
  line-height: 1.375;
}

.issue-detail {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted-foreground);
}

.diffs {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  margin-top: 2px;
  overflow: hidden;
  border-width: 1px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.375;
  font-variant-numeric: tabular-nums;
}

.diffs .th {
  padding: 4px 8px;
  background: color-mix(in oklab, var(--muted) 50%, transparent);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.diffs .td {
  padding: 6px 8px;
  border-top-width: 1px;
  overflow-wrap: anywhere;
}

.diffs .prop {
  color: var(--muted-foreground);
}

.diffs .build {
  font-weight: 500;
}

.diffs .build[data-sev="high"] {
  color: var(--sev-high-text);
}

.diffs .build[data-sev="medium"] {
  color: var(--sev-medium-text);
}

.issues .empty {
  padding-block: 48px;
}

/* Full screen */

.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--fullscreen);
  animation: fade-in 0.15s;
}

.fs-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 64px 12px 80px;
}

.fs-side {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.fs-tl {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fs-tl .opacity-bar {
  position: static;
  height: 32px;
  margin: 0;
  gap: 10px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 16px;
}

.fs-tl .opacity-bar .slider {
  width: 128px;
}

.fs-tl .opacity-bar .value {
  width: 32px;
}

.fs-tr {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
}

.fullscreen .zoombar {
  right: 12px;
  bottom: 80px;
  z-index: 20;
}

.fs-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 560px;
  max-width: calc(100vw - 2rem);
  padding: 6px;
  transform: translateX(-50%);
}

.fs-nav .current {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-inline: 6px;
  font-size: 14px;
  line-height: 20px;
}

.fs-nav .current .title {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.fs-nav .current .count {
  flex-shrink: 0;
  width: 48px;
  text-align: right;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.fs-nav .hint {
  flex: 1;
  text-align: center;
  color: var(--muted-foreground);
}

/* Tooltip */

.tooltip {
  position: fixed;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  max-width: 20rem;
  width: max-content;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--foreground);
  color: var(--background);
  font-size: 12px;
  line-height: 16px;
  pointer-events: none;
  animation: fade-in 0.15s;
}

.tooltip::after {
  content: "";
  position: absolute;
  left: calc(50% - 5px);
  bottom: -4px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: inherit;
  rotate: 45deg;
  z-index: -1;
}

.tooltip[data-side="bottom"]::after {
  top: -4px;
  bottom: auto;
}

/* Toasts */

.toaster {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 356px;
  max-width: calc(100vw - 32px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--popover);
  color: var(--foreground);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
  font-size: 13px;
  line-height: 1.4;
  animation: toast-in 0.4s cubic-bezier(0.21, 1.02, 0.73, 1);
}

.toast .icon {
  margin-top: 1px;
}

.toast .t-title {
  font-weight: 500;
}

.toast .t-desc {
  color: var(--muted-foreground);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
}

/* Breakpoints: sm 640, md 768, lg 1024, xl 1280 */

@media (min-width: 640px) {
  .app-header-inner {
    padding-inline: 24px;
  }

  .header-claims {
    display: flex;
  }

  .theme-toggle {
    margin-left: 8px;
  }

  .page {
    padding: 40px 24px;
  }

  .page-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .page-head h1 {
    font-size: 30px;
    line-height: 36px;
  }

  .upload-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-actions {
    flex-direction: row;
    align-items: center;
  }

  .toolbar {
    padding-inline: 24px;
  }

  .canvas {
    padding: 20px;
  }

  .zoombar {
    right: 20px;
    bottom: 20px;
  }

  .fs-stage {
    padding-inline: 16px;
  }

  .fs-side {
    gap: 16px;
  }

  .fs-tl {
    top: 16px;
    left: 16px;
  }

  .fs-tr {
    top: 16px;
    right: 16px;
  }

  .fullscreen .zoombar {
    right: 16px;
  }
}

@media (min-width: 768px) {
  .slots,
  .compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-inner {
    flex-direction: row;
    gap: 16px;
  }
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .app-header-inner.contained {
    padding-inline: 32px;
  }

  .page {
    padding-inline: 32px;
  }

  .slot-head .meta {
    display: inline;
  }

  .results {
    height: calc(100svh - 57px);
  }

  .results-body {
    flex-direction: row;
  }

  .lg-only {
    display: inline-flex !important;
  }

  .toolbar-right .vsep {
    display: block;
  }

  .issues {
    width: 360px;
    border-top-width: 0;
    border-left-width: 1px;
  }

  .frame .sizer {
    max-height: calc(100svh - 10.75rem);
  }
}

@media (min-width: 1280px) {
  .toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .toolbar-right {
    justify-self: end;
  }

  .fullscreen .zoombar {
    bottom: 20px;
  }
}
