:root {
  --green: #29592B;
  --green-2: #41642C;
  --ink: #232323;
  --paper: #F8F8F8;
  --white: #ffffff;
  --line: #e2e2e2;
  --muted: #5a5a5a;
  --danger: #9b1c1c;
  --radius: 12px;
  --tap: 48px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  padding-bottom: calc(116px + env(safe-area-inset-bottom));
}

.topbar { height: 8px; background: var(--green); }
.topbar2 { height: 4px; background: var(--green-2); }

.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.logo-mark { width: 48px; height: auto; display: block; }
.logo-wordmark { width: min(210px, 58vw); height: auto; display: block; }

main { padding: 20px 16px 8px; max-width: 560px; margin: 0 auto; }

.intro { margin-bottom: 16px; }
.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-2);
}
h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--green);
}
.lede { margin: 0; color: var(--muted); }
.lede .req { font-size: 1em; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--green);
}

label, .photos-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.req, .opt {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  margin-left: 4px;
}
.req { color: var(--green-2); }
.opt { color: var(--muted); font-weight: 500; }

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px; /* keeps iOS from zooming on focus */
  appearance: none;
  -webkit-appearance: none;
}
input[type="date"] { padding-right: 8px; }
textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.4;
}
input:focus, textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}
input.invalid, textarea.invalid { border-color: var(--danger); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
}
.field-full { grid-column: 1 / -1; }

.amount-wrap { position: relative; }
.amount-wrap .currency {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
}
.amount-wrap input { padding-left: 26px; }

.photos-block { margin-top: 14px; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.photo-grid:empty { display: none; margin: 0; }

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #ececec;
  border: 1px solid var(--line);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.thumb .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(35, 35, 35, 0.8);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.btn:disabled { opacity: 0.65; cursor: wait; }

.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:active { background: #1e4320; }

.btn-secondary {
  background: var(--white);
  color: var(--green);
  border: 2px solid var(--green);
  margin-bottom: 8px;
}

.btn-photo {
  background: #eef4ee;
  color: var(--green);
  border: 1.5px dashed var(--green-2);
}

.btn-text {
  background: none;
  border: 0;
  color: var(--danger);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 36px;
  padding: 4px 8px;
  cursor: pointer;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  z-index: 20;
}
.dock-total span {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.dock-total strong {
  display: block;
  font-size: 1.35rem;
  color: var(--green);
  line-height: 1.2;
}

.banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(110px + env(safe-area-inset-bottom));
  background: #3a1212;
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 30;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.success {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.success[hidden] { display: none; }
.success-card { text-align: center; max-width: 360px; }
.success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 32px;
  line-height: 64px;
}
#success-msg { color: var(--muted); margin: 0 0 20px; }

@media (min-width: 600px) {
  main { padding-top: 28px; }
}
