:root {
  --ink: #1a1a1a;
  --paper: #fffdf8;
  --accent: #e4572e;
  --muted: #6b6b6b;
}
* { box-sizing: border-box; }
/* JS toggles rely on the hidden attribute; it must beat display rules like
   .field-row { display: flex }. */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
.site-header, .site-footer, main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem;
}
.site-header { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--accent); text-decoration: none; }
.hero { text-align: center; padding: clamp(2.5rem, 12vh, 5.5rem) 0 3rem; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.2; text-wrap: balance; margin: 0; }
.hero .sub { color: var(--muted); font-size: 1.05rem; max-width: 38ch; margin: .8rem auto 0; }
.hero .error { margin: 1.25rem 0 -.5rem; }
.cta {
  display: inline-block; margin-top: 1.9rem; padding: .95rem 2.1rem;
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  font-size: 1.08rem; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 8px rgba(228, 87, 46, .25);
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cta:hover { background: #cf4a24; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(228, 87, 46, .3); }
.cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.signup { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; max-width: 27rem; margin: 1.9rem auto .5rem; }
.signup input[type="email"] { flex: 1 1 13rem; width: auto; margin: 0; }
.signup button { white-space: nowrap; }
.hero .fine { color: var(--muted); font-size: .85rem; margin-top: .9rem; }
@media (prefers-reduced-motion: no-preference) {
  .signup:not([hidden]) { animation: rise .35s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
form { margin: 1rem 0; }
input[type="email"], input[type="text"], input[type="date"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%; padding: .65rem; border: 1px solid #ccc; border-radius: 8px;
  font-size: 1rem; margin: .25rem 0 .75rem; background: #fff;
}
.phone-row { display: flex; gap: .5rem; }
.phone-row select { flex: 0 0 7.5rem; width: auto; }
.phone-row input { flex: 1; }
button {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: .65rem 1.2rem; font-size: 1rem; font-weight: 600; cursor: pointer;
}
button.link { background: none; color: var(--muted); text-decoration: underline; padding: 0; font-weight: 400; }
fieldset { border: 1px solid #e0e0e0; border-radius: 8px; margin: 1rem 0; padding: 1rem 1.25rem 1.4rem; }
legend { font-weight: 700; padding: 0 .3rem; }
fieldset > label, [data-elevator-row] > label, [data-pets-row] > label {
  display: block; font-weight: 600; margin: 1.25rem 0 .4rem;
}
.pets-options { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
#id_sell_categories, #id_buy_categories { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
#id_sell_categories > div, #id_buy_categories > div { margin: .2rem 0; }
.pets-options label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; margin: 0; }
.pets-other input { width: auto; margin: 0; }
/* Texts / calls consent pair: flush left, side by side when they fit and
   stacked when they don't — never indented into a label gutter. */
.optins { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; margin: 1rem 0 0; }
.optins label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; margin: 0; }
.optins input[type="checkbox"] { margin: 0; }
/* Matches .field-label's weight so the consents read like the rows above. */
.optins .optin-label { font-weight: 600; }
fieldset > label:first-of-type { margin-top: .5rem; }
fieldset div[id^="id_"] { margin-bottom: .5rem; }
fieldset div[id^="id_"] > div { margin: .45rem 0; }
fieldset div[id^="id_"] label {
  font-weight: 400; margin: 0; display: inline-flex; align-items: center; gap: .5rem;
}
fieldset div[id^="id_"] input[type="radio"] { margin: 0; }
fieldset textarea { margin-top: .5rem; }
.role-buttons { display: flex; flex-direction: column; gap: .6rem; }
.role-btn {
  display: block; padding: .9rem 1rem; border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 1.05rem; font-weight: 600; cursor: pointer; text-align: center;
}
.role-btn:has(input:checked) { border-color: var(--accent); background: #fdeee8; }
.role-btn input { margin-right: .5rem; }
.wiz-back-top { display: inline-block; margin-bottom: .25rem; }
.card { position: relative; }
.card .card-edit { position: absolute; top: .35rem; right: .9rem; }
.field-row { display: flex; align-items: baseline; gap: .75rem; margin: .55rem 0; }
.field-row .field-label { font-weight: 600; flex: 0 0 9rem; }
.field-row .view-field { flex: 1; }
.card .edit-field { display: none; flex: 1; }
.card.editing .edit-field { display: block; }
.card.editing .view-field { display: none; }
.card .field-row.edit-field { display: none; }
.card.editing .field-row.edit-field { display: flex; }
.card .edit-field input, .card .edit-field textarea, .card .edit-field select { margin: 0; }
/* Beats `.card.editing .edit-field { display: block }` so the pair stays flex.
   On the summary card the two consents stack — one per line, flush left. */
.card .optins { margin-top: 0; flex-direction: column; align-items: flex-start; gap: .3rem; }
.card.editing .edit-field.optins { display: flex; }
.empty-card p { color: var(--muted); margin: .4rem 0 .9rem; }
.moves-section { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .6rem; }
.moves-group { margin: 0; }
.moves-group > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: .4rem;
}
.moves-group > summary::-webkit-details-marker { display: none; }
/* Own disclosure triangle, so it sits tight against the label at any size. */
.moves-group > summary::before {
  content: ""; flex: 0 0 auto; width: 0; height: 0;
  border-left: 5px solid var(--muted);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .12s ease;
}
.moves-group[open] > summary::before { transform: rotate(90deg); }
.moves-group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.moves-empty { color: var(--muted); }
.move-card {
  display: block; border: 1px solid #e0e0e0; border-radius: 8px;
  padding: .8rem 1rem; margin-bottom: .7rem;
  text-decoration: none; color: var(--ink); background: #fff;
  transition: background-color .12s ease, border-color .12s ease,
              box-shadow .12s ease, transform .12s ease;
}
.move-card--next { border-color: var(--accent); box-shadow: 0 1px 4px rgba(228, 87, 46, .12); }
/* Hover must read on the next-move card too, which already sits on an accent
   border — so shift the fill and lift it, not just the border colour. */
.move-card:hover {
  border-color: var(--accent); background: #fdeee8;
  box-shadow: 0 3px 10px rgba(228, 87, 46, .2); transform: translateY(-1px);
}
.move-card:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(228, 87, 46, .2); }
.move-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.move-card .field-row { margin: .3rem 0; }
.move-card .field-label { flex: 0 0 6.5rem; }
.btn-link {
  display: inline-block; background: var(--accent); color: #fff; padding: .55rem 1.1rem;
  border-radius: 8px; text-decoration: none; font-weight: 600;
}
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.wizard-nav .link { margin-right: auto; }
.wizard-nav button:last-child { margin-left: auto; }
.notice { background: #e7f6ec; border-radius: 8px; padding: .6rem .8rem; }
/* Local development only — never rendered on a deployed host. */
.dev-banner {
  background: #fff4e0; border: 1px dashed #d08b00; border-radius: 8px;
  padding: .6rem .8rem; font-size: .9rem;
}
.error { color: #b3261e; }
.fine { color: var(--muted); font-size: .85rem; }
.site-footer { color: var(--muted); font-size: .85rem; }
