/* =========================================================
   Wonder Agency · Project intake
   Clean teal canvas · White fields · No floating card
   ========================================================= */

/* --- Design tokens ------------------------------------- */
:root {
  --gold:        #b8a36e;
  --gold-bright: #d4bd82;
  --gold-deep:   #8f7d4e;
  --amber:       #d97c3e;    /* partial / in-progress */
  --amber-soft:  rgba(217, 124, 62, 0.5);
  --teal:        #015b64;
  --teal-deep:   #003b42;
  --teal-darker: #00272c;
  --teal-light:  #e0ebed;
  --cream:       #faf7f0;
  --cream-warm:  #f2ebdb;
  --ink:         #1a1a1a;
  --ink-soft:    #4a4a4a;
  --mute:        #8a8a8a;
  --white:       #ffffff;
  --line:        rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.18);
  --line-teal:   rgba(250, 247, 240, 0.15);

  --ff-display: 'Julius Sans One', sans-serif;
  --ff-serif:   'Cormorant Garamond', serif;
  --ff-body:    'Inter', system-ui, -apple-system, sans-serif;

  --radius-pill: 999px;
  --radius-sm:   4px;
  --radius-md:   6px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --maxw-content: 720px;
  --maxw-wide:    920px;
}

/* --- Reset --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
[x-cloak] { display: none !important; }

/* --- Body: teal canvas --------------------------------- */
body {
  font-family: var(--ff-body);
  font-weight: 400;
  color: var(--cream);
  background: var(--teal-deep);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  background-image:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(184, 163, 110, 0.08), transparent 70%),
    linear-gradient(180deg, var(--teal-deep) 0%, var(--teal-darker) 100%);
  background-attachment: fixed;
}

main, header, footer { position: relative; z-index: 1; }

/* --- Masthead ------------------------------------------ */
.masthead {
  background: var(--teal-darker);
  border-bottom: 1px solid var(--line-teal);
  position: sticky;
  top: 0;
  z-index: 50;
}

.masthead__inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--cream);
}

.brand-mark-img {
  display: block;
  height: 36px;
  width: auto;
}

.masthead__save-indicator {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--gold-bright);
  transition: opacity 0.3s var(--ease-out);
}

/* --- Progress bar -------------------------------------- */
.progress {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 40px 16px;
}

.progress__track {
  height: 3px;
  background: rgba(250, 247, 240, 0.1);
  overflow: hidden;
  border-radius: 2px;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
  transition: width 0.6s var(--ease-out);
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
}

.progress__phase {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gold-bright);
}

.progress__count {
  font-family: var(--ff-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 247, 240, 0.55);
}

/* --- Resume banner ------------------------------------- */
.resume-banner {
  background: var(--gold);
  color: var(--teal-darker);
}

.resume-banner__inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.resume-banner__text {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 500;
}

.resume-banner__actions {
  display: flex;
  gap: 12px;
}

.resume-banner .btn--ghost {
  color: var(--teal-darker);
  border-color: rgba(0, 39, 44, 0.3);
}
.resume-banner .btn--ghost:hover {
  border-color: var(--teal-darker);
  background: rgba(0, 39, 44, 0.08);
}
.resume-banner .btn--solid {
  background: var(--teal-darker);
  color: var(--gold);
}
.resume-banner .btn--solid:hover {
  background: var(--teal);
  color: var(--gold-bright);
}

/* --- Workspace: sidebar + shell layout ---------------- */
.workspace {
  display: flex;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  gap: 56px;
  position: relative;
  align-items: flex-start;
}

/* --- Shell --------------------------------------------- */
.shell {
  flex: 1;
  width: 100%;
  max-width: var(--maxw-content);
  margin: 0 auto;
  padding: 56px 0 96px;
  min-width: 0;
}

.shell--with-sidebar {
  margin: 0;
  max-width: 680px;
}

/* --- Sidebar ------------------------------------------- */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  padding-top: 64px;
  padding-bottom: 48px;
}

.sidebar__inner {
  position: sticky;
  top: 120px;
}

.sidebar__title {
  font-family: var(--ff-display);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-teal);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: grid;
  grid-template-columns: 18px 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 10px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease-out);
  border-left: 2px solid transparent;
  color: rgba(250, 247, 240, 0.55);
  font-family: var(--ff-body);
  width: 100%;
}

.sidebar-item:hover {
  background: rgba(250, 247, 240, 0.04);
  color: var(--cream);
}

.sidebar-item--active {
  background: rgba(184, 163, 110, 0.1);
  border-left-color: var(--gold);
  color: var(--cream);
}

.sidebar-item__dot {
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(250, 247, 240, 0.22);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 0.25s var(--ease-out);
  background: transparent;
}

.sidebar-item--partial .sidebar-item__dot {
  border-color: var(--amber);
  position: relative;
}
.sidebar-item--partial .sidebar-item__dot::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--amber);
  border-radius: 50%;
  opacity: 0.5;
}

.sidebar-item--complete .sidebar-item__dot {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--teal-darker);
}

.sidebar-item__num {
  font-family: var(--ff-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: inherit;
  opacity: 0.65;
}

.sidebar-item__label {
  font-family: var(--ff-serif);
  font-size: 15px;
  line-height: 1.2;
  color: inherit;
  font-weight: 500;
}

.sidebar-item--active .sidebar-item__label,
.sidebar-item--active .sidebar-item__num {
  color: var(--cream);
  opacity: 1;
}

/* Mobile toggle: hidden on desktop, shown on mobile */
.sidebar__mobile-toggle {
  display: none;
}

/* --- Sidebar legend ------------------------------------ */
.sidebar__legend {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-teal);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-body);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(250, 247, 240, 0.5);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.legend-dot--empty {
  border: 1.5px solid rgba(250, 247, 240, 0.22);
}

.legend-dot--partial {
  border: 1.5px solid var(--amber);
  background: var(--amber-soft);
}

.legend-dot--complete {
  background: var(--gold);
  border: 1.5px solid var(--gold);
}

/* --- Phase: no card, lives directly on teal ------------ */
.phase {
  animation: phase-in 0.4s var(--ease-out) both;
  color: var(--cream);
}

@keyframes phase-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Welcome phase ------------------------------------- */
.phase--welcome { padding-top: 24px; }

.welcome { max-width: 600px; }

.welcome__logo {
  display: block;
  height: 72px;
  width: auto;
  margin: 0 0 40px;
}

.eyebrow {
  font-family: var(--ff-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.welcome__title {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  color: var(--cream);
}

.welcome__title em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 500;
}

.welcome__divider {
  width: 56px;
  height: 2px;
  background: var(--gold);
  margin: 32px 0;
}

.welcome__lede {
  font-family: var(--ff-serif);
  font-size: 21px;
  line-height: 1.5;
  color: rgba(250, 247, 240, 0.85);
  margin: 0 0 44px;
}

.welcome__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0 0 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line-teal);
  border-bottom: 1px solid var(--line-teal);
}

.fact { margin: 0; }
.fact dt {
  font-family: var(--ff-display);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 8px;
}
.fact dd {
  margin: 0;
  font-family: var(--ff-serif);
  font-size: 17px;
  color: var(--cream);
  line-height: 1.35;
}

.welcome__footnote {
  margin-top: 24px;
  font-size: 14px;
  color: rgba(250, 247, 240, 0.6);
  font-style: italic;
  font-family: var(--ff-serif);
}

/* --- Phase header: compact teal badge, gold rule below - */
.phase__header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-teal);
  position: relative;
}

.phase__header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 1px;
  background: var(--gold);
}

/* Legacy — hide any lingering huge number */
.phase__number { display: none !important; }

.phase__titleblock { min-width: 0; }

/* THE BADGE — filled gold pill, unmissable */
.phase__kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--gold);
  color: var(--teal-darker);
  font-family: var(--ff-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 20px;
  border-radius: var(--radius-pill);
  font-weight: 400;
}

.phase__kicker-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.phase__kicker::before { display: none; }

.phase__title {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.02;
  margin: 0 0 16px;
  color: var(--cream);
  letter-spacing: -0.015em;
}

.phase__title em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 500;
}

.phase__lede {
  font-family: var(--ff-serif);
  font-size: 19px;
  line-height: 1.45;
  color: rgba(250, 247, 240, 0.8);
  margin: 0;
  max-width: 56ch;
}

/* --- Fields -------------------------------------------- */
.fields {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 48px;
}

/* --- Field group: sub-section within a phase ----------- */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.field-group__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 400;
  margin: 24px 0 4px;
  padding-top: 24px;
  border-top: 1px solid var(--line-teal);
}

.field-group:first-child .field-group__title {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* THE NUMBERED CIRCLE — small teal on cream */
.field-group__number {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--gold);
  color: var(--teal-darker);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  font-family: var(--ff-body);
  flex-shrink: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.field__label {
  display: block;
  font-family: var(--ff-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 10px;
  font-weight: 400;
}

.field__label em {
  font-family: var(--ff-serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
  color: var(--gold-bright);
}

.field__hint {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(250, 247, 240, 0.65);
  margin: 0 0 14px;
  line-height: 1.4;
}

.field__hint em {
  color: var(--gold-bright);
  font-style: italic;
}

/* --- WHITE FIELDS WITH TEAL BORDERS -------------------- */
.field__input {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--ff-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--teal-light);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

.field__input::placeholder {
  color: var(--mute);
  font-style: italic;
  font-family: var(--ff-serif);
  font-size: 16px;
}

.field__input:hover {
  border-color: var(--gold);
}

.field__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 163, 110, 0.25);
}

.field__input--textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
  font-family: var(--ff-body);
  font-size: 16px;
}

/* --- Pills --------------------------------------------- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 11px 20px;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-pill);
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--gold-bright);
  background: transparent;
  transition: all 0.2s var(--ease-out);
}

.pill:hover {
  background: rgba(184, 163, 110, 0.15);
  color: var(--cream);
}

.pill--selected {
  background: var(--gold);
  color: var(--teal-darker);
  border-color: var(--gold);
}

.pill--selected:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--teal-darker);
}

/* --- Sliders ------------------------------------------- */
.sliders {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 8px;
  padding: 24px 28px;
  background: rgba(250, 247, 240, 0.04);
  border: 1px solid var(--line-teal);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
}

.slider {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider__labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-serif);
  font-size: 16px;
  color: var(--cream);
  font-weight: 500;
}

.slider__label-left,
.slider__label-right { font-style: italic; }

.slider__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(250, 247, 240, 0.2);
  outline: none;
  padding: 0;
  margin: 6px 0;
  border-radius: 2px;
}

.slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--gold);
  border: 3px solid var(--teal-deep);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--gold);
}
.slider__input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--gold);
  border: 3px solid var(--teal-deep);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--gold);
}

.slider__ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
}
.slider__ticks span {
  width: 2px;
  height: 6px;
  background: rgba(250, 247, 240, 0.2);
  border-radius: 1px;
}

/* --- Buttons ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--ff-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.btn--solid {
  background: var(--gold);
  color: var(--teal-darker);
  border-color: var(--gold);
}
.btn--solid:hover:not(:disabled) {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(212, 189, 130, 0.5);
}
.btn--solid:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 247, 240, 0.3);
}
.btn--ghost:hover {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
  background: rgba(250, 247, 240, 0.05);
}

.btn--large {
  padding: 18px 36px;
  font-size: 13px;
}

.btn__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
  font-family: var(--ff-serif);
  font-size: 16px;
  line-height: 1;
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* --- Phase nav ----------------------------------------- */
.phase__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line-teal);
}

/* --- Page card grid (Phase 4) -------------------------- */
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.page-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 18px 20px;
  background: var(--white);
  border: 1.5px solid var(--teal-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  gap: 6px;
  color: var(--ink);
}

.page-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.page-card--selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--teal-darker);
}

.page-card--selected:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.page-card--locked { cursor: default; }

.page-card__check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: transparent;
  transition: all 0.2s var(--ease-out);
  background: var(--white);
}

.page-card--selected .page-card__check {
  background: var(--teal-darker);
  border-color: var(--teal-darker);
  color: var(--gold-bright);
}

.page-card__label {
  font-family: var(--ff-serif);
  font-size: 19px;
  font-weight: 500;
  color: inherit;
  line-height: 1.2;
  padding-right: 32px;
}

.page-card__desc {
  font-family: var(--ff-body);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
  padding-right: 28px;
}

.page-card--selected .page-card__desc { color: rgba(0, 39, 44, 0.7); }

/* --- Choice cards (Phase 5) ---------------------------- */
.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  padding: 26px 24px;
  background: var(--white);
  border: 1.5px solid var(--teal-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  color: var(--ink);
}

.choice-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.choice-card--selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--teal-darker);
  box-shadow: 0 10px 24px -10px rgba(212, 189, 130, 0.35);
}

.choice-card__heading {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  color: inherit;
}

.choice-card__desc {
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.choice-card--selected .choice-card__desc { color: rgba(0, 39, 44, 0.8); }

.choice-card__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  font-family: var(--ff-display);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--teal);
  color: var(--cream);
  border-radius: var(--radius-pill);
}

.choice-card--selected .choice-card__tag {
  background: var(--teal-darker);
  color: var(--gold-bright);
}

/* --- Page content cards (Phase 5) ---------------------- */
.page-content-card {
  padding: 22px 24px;
  background: var(--white);
  border: 1.5px solid var(--teal-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold);
  margin-top: 8px;
  color: var(--ink);
}

.page-content-card + .page-content-card { margin-top: 14px; }

.page-content-card__title {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--teal-darker);
  margin: 0 0 4px;
}

.page-content-card__hint {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--mute);
  margin: 0 0 14px;
}

/* --- Colour input (Phase 6) ---------------------------- */
.colour-input {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.colour-input__swatch {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--teal-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  background: var(--white);
  flex-shrink: 0;
}

.colour-input__swatch::-webkit-color-swatch-wrapper { padding: 4px; }
.colour-input__swatch::-webkit-color-swatch { border: none; border-radius: 2px; }

.colour-input .field__input { flex: 1; }

/* --- Upload row (Phase 6, 7, 8) ------------------------ */
.upload-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
}

.upload-btn {
  padding: 12px 20px;
  white-space: nowrap;
  font-size: 11px;
}

.upload-or {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(250, 247, 240, 0.55);
}

/* --- Opening hours (Phase 8) --------------------------- */
.hours-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.hours-row {
  display: grid;
  grid-template-columns: 52px 100px 1fr 1fr 1.2fr;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(250, 247, 240, 0.04);
  border: 1px solid var(--line-teal);
  border-radius: var(--radius-sm);
}

.hours-row--closed { opacity: 0.55; }

.hours-row__day {
  font-family: var(--ff-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.hours-row__closed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(250, 247, 240, 0.8);
  cursor: pointer;
  white-space: nowrap;
}

.hours-row__closed-toggle input {
  accent-color: var(--gold);
  cursor: pointer;
}

.hours-row__input {
  padding: 8px 12px !important;
  font-size: 14px !important;
}

.hours-row__input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Custom pages dynamic list ------------------------- */
.custom-pages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.custom-page-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: rgba(250, 247, 240, 0.04);
  border: 1px solid var(--line-teal);
  border-radius: var(--radius-sm);
}

.custom-page-row__fields {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  min-width: 0;
}

.custom-page-row__remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(250, 247, 240, 0.45);
  transition: all 0.2s var(--ease-out);
  flex-shrink: 0;
}

.custom-page-row__remove:hover {
  background: rgba(217, 124, 62, 0.15);
  color: var(--amber);
}

.add-page-btn {
  align-self: flex-start;
  padding: 11px 22px;
  font-size: 11px;
}

.add-page-btn__icon {
  font-family: var(--ff-serif);
  font-size: 16px;
  line-height: 1;
  margin-right: 2px;
  font-style: normal;
}

/* --- Info panel (informational callout) ---------------- */
.info-panel {
  padding: 18px 24px;
  background: rgba(184, 163, 110, 0.1);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.info-panel__text {
  font-family: var(--ff-serif);
  font-size: 16px;
  color: var(--cream);
  margin: 0;
  line-height: 1.5;
}

.info-panel__text strong {
  color: var(--gold-bright);
  font-weight: 600;
}

/* --- Nested fields ------------------------------------- */
.fields-nested {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px;
  background: rgba(250, 247, 240, 0.04);
  border: 1px solid var(--line-teal);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* --- Review summary (Phase 10) ------------------------- */
.review-summary {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-teal);
  margin-bottom: 8px;
}

.review-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-teal);
}

.review-item__label {
  font-family: var(--ff-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.review-item__value {
  font-family: var(--ff-serif);
  font-size: 18px;
  color: var(--cream);
  line-height: 1.35;
  word-break: break-word;
}

.review-item__edit {
  font-family: var(--ff-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 5px 12px;
  border: 1px solid rgba(250, 247, 240, 0.3);
  border-radius: var(--radius-pill);
  transition: all 0.2s var(--ease-out);
}

.review-item__edit:hover {
  background: var(--gold);
  color: var(--teal-darker);
  border-color: var(--gold);
}

/* --- Submit panel (Phase 10) --------------------------- */
.submit-panel {
  margin-top: 32px;
  padding: 36px 36px;
  background: rgba(250, 247, 240, 0.04);
  border: 1px solid var(--line-teal);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
}

.submit-panel__title {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.05;
  margin: 0 0 12px;
  color: var(--cream);
}

.submit-panel__lede {
  font-family: var(--ff-serif);
  font-size: 17px;
  color: rgba(250, 247, 240, 0.8);
  margin: 0 0 24px;
  line-height: 1.45;
}

.submit-panel__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.submit-panel__error {
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(184, 163, 110, 0.12);
  border-left: 2px solid var(--gold);
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--cream);
}

/* --- Footer -------------------------------------------- */
.footcolumn {
  padding: 32px 0;
  margin-top: auto;
  border-top: 1px solid var(--line-teal);
}

.footcolumn__inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(250, 247, 240, 0.55);
}

.footcolumn__brand {
  font-family: var(--ff-display);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.footcolumn__divider { color: var(--gold); }

/* --- Mobile sidebar (below 960px) ----------------------- */
@media (max-width: 960px) {
  .workspace {
    flex-direction: column;
    padding: 0 20px;
    gap: 0;
  }

  .sidebar {
    width: 100%;
    padding: 20px 0 0;
    position: sticky;
    top: 68px; /* below masthead */
    z-index: 40;
  }

  .sidebar__mobile-toggle {
    display: flex;
    width: 100%;
    padding: 14px 18px;
    background: var(--teal-darker);
    border: 1px solid var(--line-teal);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--cream);
    font-family: var(--ff-body);
    font-size: 14px;
  }

  .sidebar__mobile-toggle:hover {
    background: var(--teal-deep);
  }

  .sidebar__mobile-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ff-serif);
    font-style: italic;
    font-size: 16px;
    color: var(--cream);
  }

  .sidebar__mobile-toggle-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold-bright);
    border-radius: 50%;
    display: inline-block;
  }

  .sidebar__mobile-toggle-icon {
    color: var(--gold-bright);
    transition: transform 0.25s var(--ease-out);
  }

  .sidebar__mobile-toggle-icon--open {
    transform: rotate(180deg);
  }

  .sidebar__inner {
    position: static;
    display: none;
    padding: 16px 18px;
    margin-top: 6px;
    background: var(--teal-darker);
    border: 1px solid var(--line-teal);
    border-radius: var(--radius-sm);
  }

  .sidebar--open .sidebar__inner {
    display: block;
  }

  .sidebar__title {
    display: none;
  }

  .shell--with-sidebar {
    max-width: 100%;
    padding-top: 24px;
  }
}

@media (max-width: 720px) {
  .shell { padding: 32px 0 64px; }
  .masthead__inner { padding: 14px 20px; }
  .progress { padding: 0 20px 14px; }
  .resume-banner__inner { padding: 14px 20px; flex-direction: column; align-items: flex-start; }
  .brand-mark-img { height: 30px; }

  .phase--welcome { padding-top: 8px; }
  .welcome__logo { height: 60px; margin-bottom: 32px; }
  .welcome__title { font-size: 44px; }
  .welcome__lede { font-size: 18px; }
  .welcome__facts { grid-template-columns: 1fr; gap: 18px; padding: 22px 0; }

  .phase__header { margin-bottom: 32px; padding-bottom: 24px; }
  .phase__title { font-size: 32px; }
  .phase__lede { font-size: 17px; }

  .field-row { grid-template-columns: 1fr; gap: 24px; }
  .phase__nav { flex-direction: column-reverse; align-items: stretch; }
  .btn { justify-content: center; width: 100%; }

  .sliders { padding: 20px 18px; }
  .choice-cards { grid-template-columns: 1fr; }
  .page-grid { grid-template-columns: 1fr; }

  .upload-row { grid-template-columns: 1fr; gap: 8px; }
  .upload-or { text-align: center; }

  .hours-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px;
  }
  .hours-row__day { grid-column: 1; }
  .hours-row__closed-toggle { grid-column: 2; justify-self: end; }
  .hours-row__input { grid-column: 1 / -1; }

  .review-item {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }
  .review-item__label { grid-column: 1 / -1; }
  .review-item__value { grid-column: 1; font-size: 16px; }
  .review-item__edit { grid-column: 2; grid-row: 2; }

  .submit-panel { padding: 24px 20px; }
  .submit-panel__title { font-size: 24px; }
  .submit-panel__actions { flex-direction: column; }
  .submit-panel .btn { width: 100%; }

  .custom-page-row__fields {
    grid-template-columns: 1fr;
  }
}

/* --- Reduced motion ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
