:root {
  color-scheme: light dark;
  --bg: #f5f3ee;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --text: #1c2230;
  --muted: #5d6678;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-contrast: #ffffff;
  --accent-soft: #d9f0ec;
  --border: #e4e0d6;
  --success: #15803d;
  --warning: #a16207;
  --shadow: 0 1px 2px rgba(20, 24, 35, 0.06), 0 8px 24px rgba(20, 24, 35, 0.06);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1417;
    --panel: #182025;
    --panel-2: #10171a;
    --text: #eef2f3;
    --muted: #9aa8ae;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-contrast: #05201c;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --border: #2a363c;
    --success: #4ade80;
    --warning: #facc15;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 420px at 85% -80px, rgba(251, 191, 36, 0.18), transparent 70%),
    radial-gradient(900px 480px at 0% -120px, rgba(15, 118, 110, 0.18), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.05rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand::before {
  content: '';
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: url('/favicon.svg') center / cover no-repeat;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav .link-button {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  background: transparent;
}

.site-nav a:hover,
.site-nav .link-button:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.site-nav a[aria-current='page'] {
  color: var(--accent);
  background: var(--accent-soft);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

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

.two-up {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 36px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.28);
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 320px;
  height: 320px;
  right: -90px;
  top: -120px;
  background: rgba(255, 255, 255, 0.12);
}

.hero::after {
  width: 160px;
  height: 160px;
  right: 110px;
  bottom: -80px;
  background: rgba(251, 191, 36, 0.35);
}

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

.hero h1,
.hero .lede,
.hero .eyebrow {
  color: #fff;
}

.hero .lede {
  opacity: 0.92;
}

.hero .eyebrow {
  opacity: 0.8;
}

.hero .button {
  background: #fff;
  color: #0f766e;
}

.hero .button:hover {
  background: #f0fdfa;
}

.hero .button.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.hero .button.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  max-width: 18ch;
}

.hero .lede {
  font-size: 1.1rem;
  max-width: 46ch;
}

.stack {
  display: grid;
  gap: 14px;
}

.compact {
  gap: 10px;
}

.lede,
.muted,
label span,
li,
p {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
button {
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-contrast);
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.32);
}

.button:active,
button:active {
  transform: none;
}

.button.secondary,
button.secondary {
  color: var(--accent);
  background: transparent;
  border-color: var(--accent);
  box-shadow: none;
}

.button.secondary:hover,
button.secondary:hover {
  background: var(--accent-soft);
  box-shadow: none;
}

.site-nav .link-button {
  border: 0;
  box-shadow: none;
  transform: none;
  background: transparent;
  color: var(--muted);
}

.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

label span {
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.inline-checkbox {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.inline-checkbox input {
  width: auto;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.section-heading p {
  margin: 0;
}

.import-method {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.import-method:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.timeline-list,
.review-group,
.stats-grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.timeline-item,
.candidate-card,
.stat-card {
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 12px;
  padding: 14px 16px;
}

.timeline-list {
  position: relative;
  padding-left: 22px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-soft));
  border-radius: 2px;
}

.timeline-list > .timeline-item {
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.timeline-list > .timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-list > .timeline-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow);
}

.stat-card {
  background: linear-gradient(160deg, var(--accent-soft), var(--panel-2));
}

.stat-card strong {
  color: var(--accent);
}

.timeline-item strong,
.candidate-card strong,
.stat-card strong {
  display: block;
  color: var(--text);
}

.stat-card strong {
  font-size: 1.15rem;
}

.candidate-meta,
.timeline-meta {
  font-size: 0.92rem;
  color: var(--muted);
}

.timeline-item .timeline-actions {
  margin-top: 8px;
}

.candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.empty-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border-color: transparent;
}

.empty-cta p {
  margin: 4px 0 0;
}

.edit-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.edit-dialog::backdrop {
  background: rgba(15, 20, 23, 0.55);
}

.status-banner {
  position: sticky;
  bottom: 20px;
  margin-left: auto;
  width: fit-content;
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: none;
}

.status-banner.visible {
  display: block;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 8px;
  border: 1px solid var(--border);
}

.pill.success {
  color: var(--success);
}

.pill.warning {
  color: var(--warning);
}

[hidden] {
  display: none !important;
}

/* Landing page */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.site-nav .nav-action {
  border: 1px solid transparent;
  box-shadow: none;
  color: var(--muted);
  background: transparent;
  padding: 8px 14px;
}

.site-nav .nav-action:hover {
  transform: none;
  box-shadow: none;
  color: var(--text);
  background: var(--accent-soft);
}

.site-nav .nav-action.primary {
  color: var(--accent-contrast);
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
}

.site-nav .nav-action.primary:hover {
  color: var(--accent-contrast);
  background: var(--accent-hover);
}

.link-button.inline {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
  color: var(--accent);
  text-decoration: underline;
}

.link-button.inline:hover {
  transform: none;
  box-shadow: none;
}

.auth-dialog {
  position: relative;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.landing-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 32px;
  align-items: center;
}

.landing-hero .lede {
  margin: 14px 0 22px;
}

.demo-timeline {
  display: grid;
  gap: 10px;
}

.demo-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateX(24px);
  animation: demo-in 0.6s ease forwards;
  animation-delay: calc(var(--i) * 0.45s + 0.3s);
}

.demo-item strong,
.demo-item small {
  display: block;
  color: #fff;
}

.demo-item small {
  opacity: 0.85;
}

.demo-year {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.9);
  color: #0f766e;
  border-radius: 999px;
  padding: 4px 12px;
}

@keyframes demo-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.landing-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding-top: 24px;
  scroll-margin-top: 80px;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.feature:hover {
  transform: translateY(-3px);
}

.feature h3 {
  margin-bottom: 8px;
}

.feature p {
  margin: 0;
}

.carousel {
  padding: 20px;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  flex: 0 0 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
  align-items: center;
  padding: 8px;
}

.slide figcaption h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.mock {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.mock-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.mock-bar span {
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.mock-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.mock-row,
.mock-input,
.mock-stats > div {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.mock-row b,
.mock-stats b {
  display: block;
  color: var(--text);
}

.mock-row small,
.mock-row em,
.mock-stats small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.slide .mock-row,
.slide .mock-chips span,
.slide .mock-stats > div,
.slide .mock-profile {
  opacity: 0;
  transform: translateY(10px);
}

.slide.active .mock-row,
.slide.active .mock-chips span,
.slide.active .mock-stats > div,
.slide.active .mock-profile {
  animation: demo-in 0.5s ease forwards;
}

.slide.active .mock-row:nth-child(2),
.slide.active .mock-chips span:nth-child(2),
.slide.active .mock-stats > div:nth-child(2) {
  animation-delay: 0.25s;
}

.slide.active .mock-row:nth-child(3),
.slide.active .mock-chips span:nth-child(3),
.slide.active .mock-stats > div:nth-child(3) {
  animation-delay: 0.5s;
}

.slide.active .mock-stats > div:nth-child(4) {
  animation-delay: 0.75s;
}

.mock-input {
  color: var(--muted);
  font-style: italic;
}

.mock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mock-chips span {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
}

.mock-progress {
  height: 6px;
  border-radius: 6px;
  background: var(--border);
  overflow: hidden;
}

.mock-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.slide.active .mock-progress span {
  animation: fill 2.4s ease forwards;
}

@keyframes fill {
  to {
    width: 100%;
  }
}

.mock-stats {
  grid-template-columns: 1fr 1fr;
}

.mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
  padding: 0 16px 16px;
}

.mock-bars span {
  flex: 1;
  height: 0;
  border-radius: 6px 6px 0 0;
  background: var(--accent);
}

.slide.active .mock-bars span {
  animation: grow 0.8s ease forwards;
}

@keyframes grow {
  to {
    height: var(--h);
  }
}

.mock-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mock-profile b {
  display: block;
  color: var(--text);
}

.mock-profile small {
  color: var(--muted);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent-contrast);
  background: var(--accent);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.carousel-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  background: var(--border);
  box-shadow: none;
}

.carousel-dot[aria-selected='true'] {
  background: var(--accent);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.steps li p {
  margin: 6px 0 0;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 50%;
  font-weight: 700;
  color: var(--accent-contrast);
  background: var(--accent);
}

.cta-center {
  justify-content: center;
}

.photo-hero {
  background:
    linear-gradient(105deg, rgba(8, 62, 58, 0.88) 0%, rgba(13, 110, 102, 0.55) 55%, rgba(13, 148, 136, 0.15) 100%),
    url('/img/hero.jpg') center / cover no-repeat;
  min-height: 460px;
}

.photo-hero .demo-item {
  background: rgba(8, 40, 38, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.photo-hero .demo-item:nth-child(odd) {
  margin-left: 18px;
}

.photo-band {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.photo-band figure {
  position: relative;
  margin: 0;
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.photo-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.photo-band figure:hover img {
  transform: scale(1.05);
}

.photo-band figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 22px 18px;
  color: #fff;
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  font-size: 1.2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-band strong {
  display: block;
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  font-size: 1.5rem;
  color: var(--accent);
}

.stat-band span {
  color: var(--muted);
}

.final-cta {
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(rgba(8, 40, 38, 0.82), rgba(8, 40, 38, 0.88)),
    url('/img/phones-glass.jpg') center / cover no-repeat;
}

.final-cta-inner {
  padding: 56px 24px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.final-cta h2,
.final-cta p {
  color: #fff;
  max-width: 28ch;
}

.final-cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.final-cta .button.primary {
  background: #fff;
  color: #0f766e;
}

.final-cta .button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.site-footer {
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--accent);
}

.js-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}

.js-reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (max-width: 720px) {
  .photo-band {
    grid-template-columns: 1fr;
  }

  .photo-band figure {
    min-height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .photo-band img {
    transition: none;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .guest-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .site-header.menu-open .guest-nav {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-item,
  .slide .mock-row,
  .slide .mock-chips span,
  .slide .mock-stats > div,
  .slide .mock-profile {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .mock-progress span {
    width: 100%;
  }

  .mock-bars span {
    height: var(--h);
    animation: none !important;
  }

  .carousel-track {
    transition: none;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 20px 14px 48px;
  }

  .card {
    padding: 18px;
  }
}
