:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: var(--slate-900);
  line-height: 1.6;
  background: var(--white);
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 720px; }

a { color: var(--teal-dark); }
a:hover { color: var(--teal); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--slate-900);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.nav a:not(.btn) {
  color: var(--slate-700);
  text-decoration: none;
}

.nav a:not(.btn):hover { color: var(--teal-dark); }

.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white) !important;
  text-decoration: none;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: none;
  transition: background 0.15s;
}

.btn:hover { background: var(--teal-dark); }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1.05rem; }

.btn-ghost {
  background: transparent;
  color: var(--teal-dark) !important;
  border: 2px solid var(--teal);
}

.btn-ghost:hover { background: #f0fdfa; }

.hero {
  background: linear-gradient(160deg, #f0fdfa 0%, #fff 45%, #f8fafc 100%);
  padding: 3.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav a:not(.btn):not(.nav-mobile) { display: none; }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.lead { font-size: 1.15rem; color: var(--slate-700); margin: 0 0 1.5rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.hero-card h3 { margin: 0 0 1rem; font-size: 1rem; }
.hero-card ul { margin: 0; padding-left: 1.2rem; color: var(--slate-700); }
.hero-card li { margin-bottom: 0.5rem; }

.section { padding: 3.5rem 0; }
.section[id] { scroll-margin-top: 4.5rem; }
.section-alt { background: var(--slate-100); }

h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.subhead { font-size: 1.15rem; margin: 2rem 0 1rem; }
.section-intro { color: var(--slate-700); margin: -0.5rem 0 1.5rem; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem;
}

.steps span {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.steps p { margin: 0.25rem 0 0; color: var(--slate-700); font-size: 0.95rem; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 800px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.price-card {
  position: relative;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.price-card.featured {
  border-color: var(--teal);
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.15);
}

.badge {
  position: absolute;
  top: -0.6rem;
  right: 1rem;
  background: var(--teal);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin: 0;
}

.price-card h3 { margin: 0 0 0.25rem; }
.price { font-size: 2rem; font-weight: 800; color: var(--teal-dark); margin: 0; }
.meta { color: var(--slate-500); font-size: 0.85rem; margin: 0 0 1rem; }
.price-card ul { margin: 0; padding-left: 1.1rem; color: var(--slate-700); font-size: 0.95rem; }

.price-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.price-card-actions .btn { width: 100%; text-align: center; }

.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th { background: #f8fafc; font-weight: 600; }

.addons {
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--slate-700);
}

.fine { font-size: 0.85rem; color: var(--slate-500); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

.check-list { margin: 0; padding-left: 1.2rem; }
.check-list li { margin-bottom: 0.75rem; }

.code-card {
  background: var(--slate-900);
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem;
}

.code-card code {
  display: block;
  background: #1e293b;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  word-break: break-all;
}

.code-card .fine { color: #94a3b8; }
.mt { margin-top: 1rem; }

.order-media .subhead { margin-top: 0; }
.order-media .video-wrap { margin: 0; }

.video-wrap {
  max-width: 880px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
  background: #0f172a;
}

.intro-video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.video-links {
  text-align: center;
  margin-top: 1rem;
}

.video-links a { word-break: break-all; }

/* ── Upload form ─────────────────────────────────────────────── */
.upload-page { padding: 2.5rem 0 4rem; }
.upload-page h1 { margin: 0 0 0.75rem; }
.upload-page .lead { color: var(--slate-700); margin-bottom: 2rem; }

.prefill-banner {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #115e59;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.status-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.status-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.status-card h2 {
  font-size: 1.15rem;
  margin: 0;
}

.status-message {
  color: var(--slate-700);
  margin: 0 0 1rem;
}

.status-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}

.status-progress span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.status-progress span.is-complete {
  background: #ccfbf1;
  color: #115e59;
}

.status-progress span.is-current {
  background: var(--teal);
  color: var(--white);
}

.status-card--needs_attention {
  background: #fff7ed;
  border-color: #fed7aa;
}

@media (max-width: 680px) {
  .status-card-header { flex-direction: column; }
  .status-progress { grid-template-columns: 1fr; }
}

.field-hint-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-inline {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-inline:hover { color: var(--teal); }

.slug-preview {
  font-size: 0.9rem;
  color: var(--slate-700);
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.field-details summary {
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--slate-700);
  margin-bottom: 0.75rem;
}

.upload-form fieldset {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
  margin: 0 0 1.25rem;
  background: #fafbfc;
}

.upload-form legend {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 0.35rem;
  color: var(--slate-900);
}

.field {
  display: block;
  margin-bottom: 1.1rem;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.field-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--slate-500);
}

.field input[type="text"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  background: var(--white);
}

.field textarea { resize: vertical; min-height: 6rem; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-top: 0.35rem;
  line-height: 1.45;
}

.field-hint.field-error { color: #b91c1c; font-weight: 600; }

.filename-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filename-row input { flex: 1; }

.filename-suffix {
  font-weight: 600;
  color: var(--slate-700);
  flex-shrink: 0;
}

.password-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.15rem;
  margin: 0 0 1.25rem;
}

.password-fieldset legend {
  font-weight: 600;
  padding: 0 0.35rem;
}

.password-addon-note {
  margin: 0 0 0.75rem;
}

.checkbox-field {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--slate-700);
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.checkbox-field input { margin-top: 0.2rem; flex-shrink: 0; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.form-status {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-status--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.form-status--success {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #115e59;
}

.form-status--pending {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--white);
}

details summary { font-weight: 600; cursor: pointer; }
details p { margin: 0.75rem 0 0; color: var(--slate-700); font-size: 0.95rem; }

.cta {
  background: var(--slate-900);
  color: #e2e8f0;
  padding: 3.5rem 0;
  text-align: center;
}

.cta h2 { color: var(--white); margin-bottom: 0.5rem; }
.cta-inner p { margin: 0 0 1.5rem; }
.cta .contact { margin-top: 1.25rem; font-size: 0.9rem; }
.cta .contact a { color: #5eead4; }

.site-footer {
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--slate-500);
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

code {
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.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;
}

.route-legs-field .field-hint:first-of-type {
  margin-top: 0;
  margin-bottom: 0.65rem;
}

.route-legs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.65rem;
}

.route-legs-table-wrap {
  margin-bottom: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: var(--white);
}

.route-legs-table {
  margin: 0;
  font-size: 0.88rem;
}

.route-legs-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  white-space: nowrap;
}

.route-legs-table td {
  vertical-align: middle;
  padding: 0.45rem 0.5rem;
}

.route-legs-table input,
.route-legs-table select {
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  background: var(--white);
}

.route-connector-cell,
.route-connector-head {
  width: 5.5rem;
  text-align: center;
}

.route-phase-cell,
.route-phase-head {
  width: 10.5rem;
  min-width: 8.5rem;
}

#route-legs-table .route-phase {
  min-width: 8rem;
  font-weight: 600;
}

#route-legs-table .route-phase:invalid {
  border-color: #f59e0b;
  background: #fffbeb;
}

.route-leg-actions {
  width: 2.5rem;
  text-align: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--slate-700);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.btn-icon:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

@media (max-width: 760px) {
  .route-legs-table thead {
    display: none;
  }

  .route-legs-table tr.route-leg-row,
  .route-legs-table tr.phase-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
  }

  #route-legs-table tr.route-leg-row .route-phase-cell {
    grid-column: 1 / -1;
  }

  .route-legs-table td {
    display: block;
    padding: 0;
  }

  .route-legs-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate-500);
    margin-bottom: 0.2rem;
  }

  .route-leg-actions {
    grid-column: 1 / -1;
    text-align: right;
  }

  .route-leg-actions::before {
    display: none;
  }
}
