:root {
  --ink: #1F2A2E;
  --muted: #5B6770;
  --accent: #2F5D50;
  --accent-dark: #22463C;
  --accent-soft: #E8F0EC;
  --bg: #F7F5F1;
  --card: #FFFFFF;
  --line: #E3DFD8;
  --error: #9B2C2C;
  --error-bg: #FBEAEA;
  --ok: #276749;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

.site-header {
  padding: 18px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.wordmark {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.01em;
}

main { padding-top: 28px; padding-bottom: 40px; }

h1, h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  color: var(--accent-dark);
  line-height: 1.25;
}
h1 { font-size: 1.7rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }

.lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

label { display: block; font-weight: 500; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
.hint { display: block; font-weight: 400; font-size: 0.86rem; color: var(--muted); }

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 48px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.code-input {
  font-size: 1.6rem !important;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 10px;
  margin: 0; font-weight: 400;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  cursor: pointer;
}
.choice input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.row2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; justify-content: center; align-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 12px 20px;
  border: 0; border-radius: 8px;
  background: var(--accent); color: #fff;
  font: 600 1rem/1.2 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--accent); text-decoration: underline; cursor: pointer;
}

.notice {
  border-radius: 8px; padding: 12px 14px; margin: 0 0 16px;
  background: var(--accent-soft); color: var(--accent-dark); font-size: 0.94rem;
}
.notice.error { background: var(--error-bg); color: var(--error); }

.savebar {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: 8px 0; margin-bottom: 8px;
  font-size: 0.86rem; color: var(--muted);
  display: flex; justify-content: space-between; gap: 12px;
}
.savebar .saved { color: var(--ok); }

.field-error { color: var(--error); font-size: 0.86rem; margin-top: 4px; }
.invalid { border-color: var(--error) !important; }

.hidden { display: none !important; }

.site-footer { padding-bottom: 32px; text-align: center; font-size: 0.88rem; color: var(--muted); }
.site-footer a, a { color: var(--accent); }

.prose h2 { margin-top: 24px; }
.prose ul { padding-left: 20px; }

/* QR page shown on the landlord's phone at viewings */
body.qr-mode { background: #fff; }
body.qr-mode .site-footer { display: none; }
.qr-page { text-align: center; padding: 8px 0 24px; }
.qr-title { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.5rem; color: var(--accent-dark); margin: 0 0 16px; }
.qr-img { width: 100%; max-width: 420px; height: auto; image-rendering: pixelated; }
.qr-url { font-weight: 600; font-size: 1.1rem; margin: 12px 0 4px; color: var(--ink); word-break: break-all; }
.qr-hint { color: var(--muted); margin: 0; }

a.btn { text-decoration: none; box-sizing: border-box; }
