:root {
  --bg: #f2f6f5;
  --surface: #ffffff;
  --ink: #12302f;
  --muted: #5c7472;
  --line: #d5e2df;
  --teal: #0e7c86;
  --teal-deep: #0a5f66;
  --teal-soft: #e3f2f2;
  --coral: #ee5f3a;
  --coral-soft: #fdeae4;
  --danger: #b3261e;
  --accent: var(--teal);
  --accent-soft: var(--teal-soft);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
body[data-space="room"] {
  --accent: var(--coral);
  --accent-soft: var(--coral-soft);
}

/* Without this, rules like .field { display:flex } override the hidden attribute */
[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.page-head {
  margin-bottom: 2rem;
  max-width: 34rem;
}
.page-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
.page-head p {
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 2rem;
  align-items: start;
}

/* Steps */
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.step-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.step-num {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.step-title h2 {
  font-size: 1.3rem;
}

/* Space choice */
.space-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.space-card {
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.1rem 1.2rem;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.space-card:hover {
  border-color: var(--muted);
}
.space-card .icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  color: #fff;
}
.space-card[data-space="desk"] .icon {
  background: var(--teal);
}
.space-card[data-space="room"] .icon {
  background: var(--coral);
}
.space-card[data-space="conference"] .icon {
  background: var(--teal-deep);
}
.space-card h3 {
  font-size: 1.1rem;
}
.space-card p {
  margin: 0.25rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.space-card .from {
  font-weight: 600;
  font-size: 0.92rem;
}
.space-card[aria-checked="true"][data-space="desk"],
.space-card[aria-checked="true"][data-space="conference"] {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.space-card[aria-checked="true"][data-space="room"] {
  border-color: var(--coral);
  background: var(--coral-soft);
}

/* Packages */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.pkg {
  cursor: pointer;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.pkg:hover {
  border-color: var(--muted);
}
.pkg .pkg-name {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}
.pkg .pkg-price {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
}
.pkg .pkg-price small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--muted);
}
.pkg[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Schedule */
.sched-msg {
  margin: 1rem 0 0;
  min-height: 1.5em;
  font-size: 0.95rem;
  color: var(--muted);
}
.sched-msg.is-error {
  color: var(--danger);
  font-weight: 500;
}
.sched-msg.is-ok {
  color: var(--ink);
  font-weight: 500;
}

.counters {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 1.25rem;
}
.counter-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.stepper button {
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 1.3rem;
  border-radius: 50%;
  line-height: 1;
}
.stepper button:hover:not(:disabled) {
  background: var(--accent-soft);
}
.stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.stepper output {
  min-width: 2.6rem;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.3rem 0 0;
}
.hint:empty {
  display: none;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}
.field {
  display: flex;
  flex-direction: column;
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}
.field label .opt {
  font-weight: 400;
  color: var(--muted);
}
.field input,
.field textarea {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  background: #fff;
  transition: border-color 0.15s;
}
.field input:hover:not(:disabled),
.field textarea:hover {
  border-color: var(--muted);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input:disabled {
  background: #edf3f2;
  color: var(--muted);
  cursor: not-allowed;
}
.field textarea {
  resize: vertical;
  min-height: 5rem;
}
.field [aria-invalid="true"] {
  border-color: var(--danger);
}
.error {
  color: var(--danger);
  font-size: 0.88rem;
  min-height: 1.2em;
  margin-top: 0.25rem;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400;
}
.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.25rem;
  accent-color: var(--accent);
  flex: none;
}

.submit {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.95rem 1.2rem;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: filter 0.15s;
}
.submit:hover {
  filter: brightness(0.92);
}
.submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Summary */
.summary {
  position: sticky;
  top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: 18px;
  padding: 1.4rem;
}
.summary h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.summary dl {
  margin: 0;
}
.summary .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.summary dt {
  color: var(--muted);
}
.summary dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}
.summary .empty {
  color: var(--muted);
  margin: 0;
}
.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1.1rem;
}
.total span:first-child {
  font-weight: 600;
}
.total .amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
}
.total .amount small {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.25rem;
}

/* Confirmation */
.confirm {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.confirm .tick {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}
.confirm h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}
.confirm .ref {
  display: inline-block;
  margin: 0.8rem 0 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.confirm p {
  color: var(--muted);
  max-width: 30rem;
  margin: 0.4rem auto;
}
.link-btn {
  margin-top: 1.2rem;
  background: none;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
}
.link-btn:hover {
  border-color: var(--ink);
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
    order: 2;
  }
}
@media (max-width: 640px) {
  .space-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .step {
    padding: 1.15rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
