@import url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/style.css");
@import url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/style.css");

:root {
  color-scheme: light;
  --ds-background: #ffffff;
  --ds-surface: #ffffff;
  --ds-surface-subtle: #fafafa;
  --ds-text: #171717;
  --ds-text-secondary: #4d4d4d;
  --ds-text-tertiary: #666666;
  --ds-text-quaternary: #808080;
  --ds-border: rgba(0, 0, 0, 0.08);
  --ds-border-light: #ebebeb;
  --ds-shadow-border: 0px 0px 0px 1px rgba(0, 0, 0, 0.08);
  --ds-shadow-ring: 0px 0px 0px 1px rgb(235, 235, 235);
  --ds-shadow-card: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, rgba(0, 0, 0, 0.04) 0px 8px 8px -8px, #fafafa 0px 0px 0px 1px;
  --ds-shadow-card-hover: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.06) 0px 8px 24px -12px, #fafafa 0px 0px 0px 1px;
  --ds-focus: hsla(212, 100%, 48%, 1);
  --ds-focus-ring: 0 0 0 2px hsla(212, 100%, 48%, 0.22);
  --ship: #ff5b4f;
  --preview: #de1d8d;
  --develop: #0a72ef;
  --badge-blue-bg: #ebf5ff;
  --badge-blue-text: #0068d6;
  --radius-2: 2px;
  --radius-4: 4px;
  --radius-6: 6px;
  --radius-8: 8px;
  --radius-12: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 64px;
  --container: 1200px;
  --sans: "Geist", Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ds-background);
  font-feature-settings: "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(10, 114, 239, 0.045), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(222, 29, 141, 0.035), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
  color: var(--ds-text);
  font-family: var(--sans);
}

img,
canvas,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: 2px;
  box-shadow: var(--ds-focus-ring);
}

.shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.shell--compact {
  padding-bottom: 32px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 0 var(--space-5);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, #171717 0%, #2a2a2a 100%);
  box-shadow: var(--ds-shadow-card);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  border-radius: 7px;
}

.brand-mark::after {
  inset: 14px;
  border-radius: 2px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.32px;
}

.brand-subtitle {
  font-size: 12px;
  line-height: 1.33;
  color: var(--ds-text-secondary);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  color: var(--ds-text-secondary);
  box-shadow: var(--ds-shadow-ring);
  background: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.43;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ds-text);
  background: #ffffff;
}

.nav-link.is-active {
  color: var(--ds-text);
  font-weight: 600;
  box-shadow: var(--ds-shadow-card);
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ds-text);
  box-shadow: var(--ds-shadow-card);
  font-size: 14px;
  font-weight: 600;
}

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

.page-grid > .panel {
  align-self: start;
}

.page-grid--split,
.page-grid--home,
.sender-grid,
.receiver-grid,
.route-grid,
.tip-grid,
.metric-grid {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--ds-surface);
  border-radius: var(--radius-12);
  box-shadow: var(--ds-shadow-card);
  padding: clamp(20px, 2.8vw, 32px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent 18%);
  pointer-events: none;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel--compact {
  padding: clamp(18px, 2.4vw, 28px);
}

.hero,
.card-stack,
.control-stack,
.summary-card,
.status-card,
.preset-card,
.metric,
.tip-card,
.link-card,
.stat-card,
.input-shell,
.select-shell,
.video-card,
.canvas-card,
.progress-shell,
.download-card {
  display: grid;
  gap: 12px;
}

.eyebrow,
.control-label,
.metric-label,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ds-text-tertiary);
}

.eyebrow::before,
.kicker::before,
.section-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--develop);
  flex: 0 0 auto;
}

.hero-title,
.compact-title {
  margin: 0;
  font-size: clamp(2.85rem, 6vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -2.72px;
  max-width: 14ch;
}

.compact-title {
  font-size: clamp(2.35rem, 5vw, 3.5rem);
  letter-spacing: -2.2px;
  max-width: 13ch;
}

.hero-copy,
.compact-copy,
.copy,
.status-detail,
.muted,
.metric-caption,
.tip-card p,
.link-card p,
.stat-card p,
.canvas-caption,
.video-caption {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 18px;
  line-height: 1.56;
}

.compact-copy,
.status-detail,
.muted,
.metric-caption,
.tip-card p,
.link-card p,
.stat-card p,
.canvas-caption,
.video-caption {
  font-size: 16px;
  line-height: 1.5;
}

.badge-row,
.picker-row,
.action-row,
.download-actions,
.preset-header,
.status-topline,
.dialog-header,
.compact-hero,
.link-card,
.header-right,
.header-left {
  display: flex;
  gap: 12px;
}

.badge-row,
.picker-row,
.action-row,
.download-actions,
.topnav {
  flex-wrap: wrap;
}

.badge,
.preset-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.33;
  box-shadow: inset 0 0 0 1px rgba(0, 104, 214, 0.08);
}

.summary-card,
.status-card,
.metric,
.tip-card,
.link-card,
.stat-card,
.input-shell,
.select-shell,
.preset-card,
.video-card,
.canvas-card,
.progress-shell,
.download-card {
  background: var(--ds-surface);
  border-radius: var(--radius-12);
  box-shadow: var(--ds-shadow-card);
  padding: 18px;
}

.download-card,
.preset-card {
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
}

.preset-header,
.dialog-header,
.status-topline,
.link-card,
.compact-hero {
  align-items: flex-start;
  justify-content: space-between;
}

.preset-title,
.estimate-title,
.dialog-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.96px;
}

.status-title,
.tip-card h3,
.link-card h3,
.stat-card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.96px;
}

.metric-value,
.picker-selection {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.32px;
  line-height: 1.5;
  color: var(--ds-text);
}

.metric-grid {
  display: grid;
  gap: 12px;
}

.metric-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.input-shell,
.select-shell {
  gap: 10px;
}

.select-shell select,
.input-shell input[type="file"]::file-selector-button,
.button,
button.button,
a.button-link,
.dialog-close {
  border: 0;
  border-radius: var(--radius-6);
}

.select-shell select {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ds-text);
  box-shadow: var(--ds-shadow-ring);
  font-size: 14px;
  font-weight: 500;
  appearance: none;
}

.input-shell input[type="file"]::file-selector-button {
  margin-right: 12px;
  min-height: 32px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ds-text);
  box-shadow: var(--ds-shadow-ring);
  font-size: 14px;
  font-weight: 500;
}

.button,
button.button,
a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.43;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button:hover,
button.button:hover,
a.button-link:hover,
.button:focus-visible,
button.button:focus-visible,
a.button-link:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: #171717;
  color: #ffffff;
  box-shadow: 0px 0px 0px 1px rgba(23, 23, 23, 1), rgba(0, 0, 0, 0.12) 0px 6px 16px -8px;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #000000;
}

.button-secondary,
.button-ghost,
.dialog-close,
.download-link.button-secondary {
  background: #ffffff;
  color: var(--ds-text);
  box-shadow: var(--ds-shadow-ring);
}

.button-ghost {
  color: var(--ds-text-secondary);
}

button[disabled],
a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--ds-text-quaternary);
  flex: 0 0 auto;
}

.status-card[data-tone="ready"] .status-dot,
.status-card[data-tone="complete"] .status-dot {
  background: var(--develop);
}

.status-card[data-tone="working"] .status-dot,
.status-card[data-tone="live"] .status-dot {
  background: var(--preview);
}

.status-card[data-tone="warning"] .status-dot {
  background: var(--ship);
}

.status-card[data-tone="error"] .status-dot {
  background: var(--ship);
}

.status-legacy,
.mono,
.progress-copy,
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.33;
  color: var(--ds-text-tertiary);
}

.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 9999px;
  background: #efefef;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--develop) 0%, var(--preview) 100%);
  transition: width 180ms ease;
}

.canvas-card,
.video-card {
  background: #171717;
  color: #ffffff;
  box-shadow: rgba(0, 0, 0, 0.18) 0px 24px 64px -24px, 0px 0px 0px 1px rgba(0, 0, 0, 0.08);
}

.canvas-frame,
.video-frame {
  display: grid;
  place-items: center;
  min-height: min(70vw, 560px);
  padding: 20px;
  border-radius: var(--radius-12);
  background: linear-gradient(180deg, #1f1f1f 0%, #111111 100%);
  box-shadow: inset 0px 0px 0px 1px rgba(255, 255, 255, 0.08);
}

#qrCanvas,
#video {
  width: 100%;
  height: auto;
  background: #ffffff;
  border-radius: var(--radius-12);
  box-shadow: 0px 0px 0px 1px #ebebeb;
}

#qrCanvas {
  max-width: 760px;
}

#video {
  max-width: 760px;
  max-height: calc(100dvh - 320px);
  object-fit: contain;
  background: #050505;
}

.canvas-caption,
.video-caption {
  color: rgba(255, 255, 255, 0.72);
}

.route-grid,
.tip-grid,
.sender-grid,
.receiver-grid {
  display: grid;
  gap: 16px;
}

.route-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sender-grid {
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
}

.receiver-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.link-card {
  min-height: 152px;
}

.arrow-link {
  font-size: 20px;
  font-weight: 500;
  color: var(--develop);
}

.route-list,
.help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ds-text-secondary);
  font-size: 16px;
  line-height: 1.56;
}

.route-list li + li,
.help-list li + li {
  margin-top: 8px;
}

.dialog {
  width: min(720px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: rgba(0, 0, 0, 0.14) 0px 24px 64px -16px, var(--ds-shadow-border);
}

.dialog--stage {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
}

.dialog::backdrop {
  background: hsla(0, 0%, 98%, 0.92);
  backdrop-filter: blur(6px);
}

.dialog-body {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 2.8vw, 32px);
}

.dialog-body--stage {
  gap: 20px;
}

.dialog-close {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.hide {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.canvas-card--modal,
.video-card--modal,
.progress-shell--modal {
  padding: 18px;
}

.canvas-frame--modal {
  min-height: min(72vh, 760px);
}

.video-frame--modal {
  min-height: min(68vh, 720px);
}

.download-link {
  width: 100%;
  min-height: 44px;
}

@media (min-width: 960px) {
  .page-grid--split {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  }

  .page-grid--home {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

@media (max-width: 960px) {
  .sender-grid,
  .receiver-grid,
  .route-grid,
  .metric-grid,
  .metric-grid--compact {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 20px, var(--container));
    padding-top: 16px;
  }

  .site-header,
  .compact-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .header-left,
  .header-right {
    justify-content: space-between;
  }

  .hero-title,
  .compact-title {
    max-width: none;
  }

  .action-row > * {
    flex: 1 1 100%;
  }

  .canvas-frame,
  .video-frame {
    min-height: 320px;
  }

  .dialog--stage {
    width: 100vw;
    max-width: none;
    max-height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 16px);
  }

  .panel,
  .summary-card,
  .status-card,
  .metric,
  .tip-card,
  .link-card,
  .stat-card,
  .input-shell,
  .select-shell,
  .preset-card,
  .video-card,
  .canvas-card,
  .progress-shell,
  .download-card {
    padding: 16px;
  }

  .hero-title {
    font-size: clamp(2.4rem, 10vw, 3.1rem);
    letter-spacing: -2.3px;
  }

  .compact-title {
    font-size: clamp(2rem, 9vw, 2.7rem);
    letter-spacing: -1.9px;
  }

  .hero-copy,
  .compact-copy,
  .copy,
  .status-detail,
  .muted,
  .metric-caption,
  .tip-card p,
  .link-card p,
  .stat-card p,
  .canvas-caption,
  .video-caption,
  .route-list,
  .help-list {
    font-size: 15px;
  }

  .nav-link {
    min-height: 34px;
    padding: 0 12px;
  }

  .video-frame--modal,
  .canvas-frame--modal {
    padding: 4px;
  }

  .video-frame--modal {
    min-height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  .video-frame--modal #video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  .dialog-body--stage {
    padding: 8px;
    gap: 8px;
  }

  .video-card--modal,
  .canvas-card--modal,
  .progress-shell--modal {
    padding: 8px;
  }
}
