:root {
  --bg: #FAFAF7;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --accent: #2D4A3E;
  --accent-hover: #3A5E4F;
  --border: #E5E3DC;
  --error: #8B2D2D;
  --serif: "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main, header, footer {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  padding-top: 40px;
  padding-bottom: 24px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.01em;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.hero {
  padding-top: 56px;
  padding-bottom: 80px;
}

.hero.solo {
  padding-top: 96px;
  padding-bottom: 96px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.12;
  font-weight: 500;
  margin: 0 0 20px;
  letter-spacing: -0.012em;
}

.hero .lead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 520px;
}

.waitlist {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  position: relative;
}

.waitlist input[type=email] {
  flex: 1 1 240px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.waitlist input[type=email]:focus {
  border-color: var(--accent);
}

.waitlist button {
  padding: 14px 22px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.waitlist button:hover { background: var(--accent-hover); }

.error {
  color: var(--error);
  font-size: 14px;
  margin: 0 0 8px;
}

.micro {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.back { color: var(--accent); text-decoration: none; }
.back:hover { text-decoration: underline; }

section {
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--border);
}

main > section.hero { border-top: 0; }

section h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 24px;
  letter-spacing: -0.005em;
}

.how ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.how li {
  counter-increment: step;
  padding: 18px 0 18px 56px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.how li:last-child { border-bottom: 0; padding-bottom: 0; }

.how li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.how strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
  font-weight: 600;
}

.trust p {
  margin: 0 0 18px;
}

.trust p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.faq dl { margin: 0; }
.faq dt { font-weight: 600; margin-top: 22px; margin-bottom: 6px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 0; color: var(--muted); }

footer {
  padding-top: 40px;
  padding-bottom: 60px;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .hero h1 { font-size: 34px; }
  section h2 { font-size: 24px; }
  .waitlist { flex-direction: column; align-items: stretch; }
  .waitlist input[type=email], .waitlist button { width: 100%; }
}

/* ===================== Booking prototype ===================== */

.proto-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: rgba(45, 74, 62, 0.08);
  border-radius: 999px;
  vertical-align: middle;
}

header { display: flex; align-items: center; }

.alert {
  background: #FBEDED;
  border: 1px solid #E7C9C9;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 8px;
}
.alert ul { margin: 0; padding-left: 18px; }
.alert li { color: var(--error); font-size: 15px; }

/* ---- form ---- */
.book-form { display: block; }
.field-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.field-label:first-of-type { margin-top: 0; }
.field-label .opt { font-weight: 400; color: var(--muted); font-size: 13px; }

.book-form textarea,
.book-form input[type=text],
.book-form select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.book-form textarea { resize: vertical; line-height: 1.5; }
.book-form textarea:focus,
.book-form input[type=text]:focus,
.book-form select:focus { border-color: var(--accent); }

.field-row { display: flex; gap: 14px; }
.field-col { flex: 1 1 0; min-width: 0; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cat-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.cat-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cat-chip:hover { border-color: var(--accent); }
.cat-chip:has(input:checked) {
  border-color: var(--accent);
  background: rgba(45, 74, 62, 0.06);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.cat-emoji { font-size: 24px; line-height: 1; }
.cat-label { font-size: 13px; font-weight: 500; line-height: 1.25; }

/* ---- buttons ---- */
.btn-primary {
  padding: 14px 22px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-block { width: 100%; }
.book-form .btn-primary { margin-top: 28px; width: 100%; }

.btn-text {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: underline;
}
.btn-text:hover { color: var(--text); }

/* ---- status ---- */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.status-new { background: rgba(45,74,62,0.10); color: var(--accent); }
.status-requested { background: #FBF1DD; color: #8A6A1E; }
.status-confirmed { background: #E4F0E8; color: #1E6B3E; }
.status-done { background: #ECECEC; color: #555; }
.status-cancelled { background: #F4E3E3; color: var(--error); }

.job-desc {
  margin-top: 18px;
  padding: 16px 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-style: italic;
  color: var(--text);
}
.section-intro { color: var(--muted); margin: 0 0 24px; }

/* ---- fixer cards ---- */
.fixer-list { display: flex; flex-direction: column; gap: 16px; }
.fixer-card, .job-card {
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  padding: 20px;
}
.fixer-card.confirmed { border-color: #BFE0CB; box-shadow: 0 0 0 1px #BFE0CB; }
.fixer-top { display: flex; gap: 14px; align-items: flex-start; }
.fixer-avatar {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
}
.fixer-meta { min-width: 0; }
.fixer-name { font-weight: 600; font-size: 17px; }
.verified-badge {
  display: inline-block;
  width: 17px; height: 17px;
  line-height: 17px;
  text-align: center;
  font-size: 11px;
  color: white;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
}
.fixer-trade { color: var(--muted); font-size: 14px; margin-top: 1px; }
.fixer-stats { font-size: 14px; margin-top: 4px; }
.fixer-blurb { margin: 14px 0 16px; color: var(--text); font-size: 15px; line-height: 1.5; }

/* ---- job cards (fixer portal) ---- */
.job-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.job-card-head .status-pill { margin-bottom: 0; }
.job-cat { font-weight: 600; font-size: 15px; }
.job-card-desc { font-style: italic; margin: 0 0 12px; }
.job-card-meta { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.job-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.job-actions form { margin: 0; }
.done-list { margin: 0; padding-left: 18px; color: var(--muted); }
.done-list li { margin-bottom: 6px; }

@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { flex-direction: column; gap: 0; }
}

/* ===================== Booking v2: on-demand dispatch ===================== */

.surge-banner {
  margin-top: 16px;
  padding: 12px 16px;
  background: #FBF1DD;
  border: 1px solid #EAD9B0;
  border-radius: 10px;
  font-size: 14px;
  color: #8A6A1E;
}

/* Step 1: Service-Richtung */
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dir-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 8px; border: 1px solid var(--border); border-radius: 12px;
  background: white; cursor: pointer; font-family: inherit; text-align: center;
  transition: border-color .15s, background .15s;
}
.dir-card:hover { border-color: var(--accent); }
.dir-card.sel { border-color: var(--accent); background: rgba(45,74,62,.06); box-shadow: inset 0 0 0 1px var(--accent); }
.dir-emoji { font-size: 26px; line-height: 1; }
.dir-label { font-size: 13px; font-weight: 500; line-height: 1.25; }

/* Step 2: service rows with live price */
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: white; cursor: pointer; font-family: inherit; font-size: 16px;
  text-align: left; transition: border-color .15s, background .15s;
}
.svc-row:hover { border-color: var(--accent); }
.svc-row.sel { border-color: var(--accent); background: rgba(45,74,62,.06); box-shadow: inset 0 0 0 1px var(--accent); }
.svc-name { font-weight: 500; }
.svc-price { font-weight: 600; white-space: nowrap; color: var(--accent); }
.svc-surge { color: #B8791A; margin-right: 3px; }

.chosen-svc {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; background: rgba(45,74,62,.06); border-radius: 10px; margin-bottom: 8px;
}
.chosen-svc strong { color: var(--accent); }

/* price line on job page */
.price-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.price-line strong { font-size: 22px; }
.price-note { font-size: 13px; color: var(--muted); }

/* searching state */
.searching-box { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: white; margin-bottom: 20px; }
.searching-box p { margin: 0; }
.pulse { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45,74,62,.4); } 70% { box-shadow: 0 0 0 12px rgba(45,74,62,0); } 100% { box-shadow: 0 0 0 0 rgba(45,74,62,0); } }

/* live timeline */
.timeline { list-style: none; padding: 0; margin: 20px 0 0; }
.timeline li { position: relative; padding: 0 0 22px 30px; color: var(--muted); font-size: 15px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--border); border: 2px solid var(--bg); }
.timeline li::after { content: ''; position: absolute; left: 11px; top: 15px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li.past { color: var(--text); }
.timeline li.past::before { background: var(--accent); }
.timeline li.now { color: var(--text); font-weight: 600; }
.timeline li.now::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(45,74,62,.18); animation: pulse 1.4s ease-out infinite; }

/* status pill colors (v2 statuses) */
.status-searching { background: rgba(45,74,62,.10); color: var(--accent); }
.status-accepted, .status-on_way, .status-arrived, .status-in_progress { background: #E4F0E8; color: #1E6B3E; }
.status-no_handwerker { background: #FBF1DD; color: #8A6A1E; }

/* online toggle */
.toggle-form { margin-top: 18px; }
.toggle-btn { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--border); background: white; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; color: var(--muted); }
.toggle-btn .dot { width: 10px; height: 10px; border-radius: 50%; background: #BBB; }
.toggle-btn.on { border-color: #BFE0CB; color: #1E6B3E; background: #ECF6F0; }
.toggle-btn.on .dot { background: #2CA05A; box-shadow: 0 0 0 3px rgba(44,160,90,.2); }

/* incoming job ping */
.job-card.incoming { border-color: #BFE0CB; box-shadow: 0 0 0 1px #BFE0CB; }
.ping { font-size: 17px; }
.job-price { margin-left: auto; font-weight: 600; color: var(--accent); }

/* ratings */
.rate-form { margin-top: 4px; }
.rate-form-inline { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 4px; }
.star { background: none; border: 0; font-size: 30px; line-height: 1; color: var(--border); cursor: pointer; padding: 0; font-family: inherit; }
.star.on { color: #E8B84B; }
.tip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tip-btn { padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; background: white; font-family: inherit; font-size: 15px; cursor: pointer; }
.tip-btn.on { border-color: var(--accent); background: rgba(45,74,62,.06); color: var(--accent); font-weight: 600; }

@media (max-width: 600px) {
  .dir-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Public demo (app/demo.py) */
.demo-banner { background: #1f2622; color: #f4f1e6; font-size: 14px; line-height: 1.5; padding: 10px 20px; text-align: center; }
.demo-banner a { color: #f4f1e6; text-decoration: underline; }
.demo-play { margin: 18px 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.demo-play p { margin: 0; }
