/* Koordo — Design tokens */
:root {
  /* Couleurs principales */
  --green-900: #1B4332;
  --green-800: #2D6A4F;
  --green-700: #40916C;
  --green-600: #52B788;
  --green-500: #74C69D;
  --green-400: #95D5B2;
  --green-300: #B7E4C7;
  --green-200: #D8F3DC;
  --green-100: #ECF7EE;
  --green-50:  #F4FAF5;

  /* Accents chaleureux */
  --warm-orange: #F4A261;
  --warm-orange-light: #FCE4CC;
  --warm-coral: #E76F51;
  --warm-yellow: #F5D491;
  --warm-yellow-light: #FBF1D9;
  --warm-peach: #FDDDC8;
  --warm-sand: #F0E6D2;

  /* Alerte */
  --alert-red: #C1432B;
  --alert-red-bg: #FBE7E2;

  /* Neutres chauds */
  --bg: #F8F7F4;
  --bg-card: #FFFFFF;
  --bg-cream: #FAF7F0;
  --ink-900: #1A1F1B;
  --ink-700: #3A4339;
  --ink-500: #6B7468;
  --ink-400: #8E968B;
  --ink-300: #B5BBB1;
  --ink-200: #DCDFD8;
  --ink-100: #ECEEE8;
  --ink-50:  #F3F4EE;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(27, 67, 50, 0.04), 0 1px 1px rgba(27, 67, 50, 0.03);
  --shadow-md: 0 4px 16px rgba(27, 67, 50, 0.06), 0 1px 3px rgba(27, 67, 50, 0.04);
  --shadow-lg: 0 12px 32px rgba(27, 67, 50, 0.08), 0 2px 6px rgba(27, 67, 50, 0.04);
  --shadow-xl: 0 24px 60px rgba(27, 67, 50, 0.1), 0 4px 12px rgba(27, 67, 50, 0.05);

  /* Typo */
  --font-sans: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.01em;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
input:focus, textarea:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--green-700);
  outline-offset: 2px;
}

/* ===== App layout ===== */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--green-800);
  display: grid; place-items: center;
  position: relative;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 6px;
  background: radial-gradient(circle at 30% 30%, var(--green-400), var(--green-600));
}

.topbar-aux {
  display: flex; align-items: center; gap: 24px;
  color: var(--ink-500);
  font-size: 13px;
}
.trust-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--green-100);
  color: var(--green-800);
  font-size: 12px; font-weight: 500;
}
.trust-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 0 0 4px var(--green-200);
}

/* ===== Stage ===== */
.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 40px;
  padding: 0 40px 40px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ===== Stepper rail ===== */
.rail {
  position: sticky;
  top: 24px;
  height: fit-content;
  padding: 28px 4px;
}
.rail-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-400);
  font-weight: 500;
  margin-bottom: 24px;
}
.steps { list-style: none; padding: 0; margin: 0; position: relative; }
.steps::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--ink-100);
  border-radius: 1px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  position: relative;
  z-index: 1;
}
.step-bullet {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ink-200);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 12px; font-weight: 600;
  color: var(--ink-400);
  transition: all .3s;
}
.step.done .step-bullet {
  background: var(--green-700);
  border-color: var(--green-700);
  color: white;
}
.step.active .step-bullet {
  background: var(--bg);
  border-color: var(--green-800);
  color: var(--green-800);
  box-shadow: 0 0 0 4px var(--green-100);
}
.step-text {
  padding-top: 4px;
  font-size: 14px;
  color: var(--ink-500);
  transition: color .3s;
  line-height: 1.3;
}
.step.active .step-text { color: var(--ink-900); font-weight: 500; }
.step.done .step-text { color: var(--ink-700); }
.step-substep {
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 2px;
}

/* ===== Card panel ===== */
.panel {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  padding: 56px 64px 48px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: flex;
  flex-direction: column;
}

.panel-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  font-size: 13px;
  color: var(--ink-500);
}
.panel-progress-bar {
  flex: 1;
  margin: 0 24px;
  height: 6px;
  background: var(--ink-100);
  border-radius: 3px;
  overflow: hidden;
}
.panel-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  border-radius: 3px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.panel-progress-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-400);
  letter-spacing: 0.04em;
}

/* ===== Headings ===== */
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green-800);
  font-weight: 500;
  margin-bottom: 16px;
}
.headline {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--ink-900);
  text-wrap: balance;
}
.headline em {
  font-style: normal;
  color: var(--green-800);
}
.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-500);
  max-width: 540px;
  margin: 0 0 36px;
  text-wrap: pretty;
}

/* ===== Form controls ===== */
.field { margin-bottom: 20px; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 8px;
}
.label .opt {
  color: var(--ink-400);
  font-weight: 400;
  margin-left: 6px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--ink-200);
  background: white;
  font-size: 15px;
  color: var(--ink-900);
  transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover, .textarea:hover {
  border-color: var(--ink-300);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 4px var(--green-100);
}
.input::placeholder { color: var(--ink-400); }
.input.with-icon { padding-left: 44px; }
.input-wrap { position: relative; }
.input-wrap .icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  pointer-events: none;
}
.helper {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: 6px;
  line-height: 1.4;
}
.helper.with-icon {
  display: flex; align-items: flex-start; gap: 6px;
}
.helper.with-icon svg { flex-shrink: 0; margin-top: 1px; }

/* Two cols */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform .12s, background .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green-800);
  color: white;
  box-shadow: 0 1px 2px rgba(45, 106, 79, 0.3), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover { background: var(--green-900); }
.btn-primary:disabled {
  background: var(--ink-200);
  color: var(--ink-400);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}
.btn-ghost:hover { background: var(--ink-50); }
.btn-soft {
  background: var(--green-100);
  color: var(--green-800);
}
.btn-soft:hover { background: var(--green-200); }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ===== Footer (next/back) ===== */
.panel-footer {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.panel-footer .left, .panel-footer .right {
  display: flex; align-items: center; gap: 16px;
}
.skip-link {
  font-size: 14px;
  color: var(--ink-500);
  text-decoration: underline;
  text-decoration-color: var(--ink-300);
  text-underline-offset: 3px;
}
.skip-link:hover { color: var(--ink-700); }

/* ===== Selection cards ===== */
.option-grid {
  display: grid;
  gap: 12px;
}
.option-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.option-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.option-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 18px 20px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-md);
  background: white;
  transition: all .15s;
  position: relative;
  gap: 6px;
  width: 100%;
}
.option:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}
.option.selected {
  border-color: var(--green-800);
  background: var(--green-50);
  box-shadow: 0 0 0 3px var(--green-100);
}
.option.selected::after {
  content: "";
  position: absolute;
  top: 14px; right: 14px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green-800);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6.5l2 2 4-4.5'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}
.option-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 6px;
}
.option-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-900);
}
.option-desc {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.4;
}

/* Big illustrative card */
.welcome-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  flex: 1;
}

.welcome-art {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, var(--green-100) 0%, var(--warm-yellow-light) 100%);
  overflow: hidden;
}

/* Hero shapes */
.shape {
  position: absolute;
}
.shape.circle { border-radius: 50%; }
.shape.arc {
  border-radius: 50%;
  border: 28px solid var(--green-700);
  border-color: transparent var(--green-700) transparent transparent;
  transform: rotate(45deg);
}

/* ===== Children pickers ===== */
.count-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.count-pill {
  padding: 28px 16px;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--ink-200);
  background: white;
  text-align: center;
  transition: all .15s;
  position: relative;
}
.count-pill:hover { border-color: var(--green-500); background: var(--green-50); }
.count-pill.selected {
  border-color: var(--green-800);
  background: var(--green-50);
  box-shadow: 0 0 0 3px var(--green-100);
}
.count-pill .num {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink-900);
}
.count-pill .lbl {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 4px;
}

/* ===== Child sub-tabs ===== */
.child-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink-100);
  flex-wrap: wrap;
}
.child-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--r-pill);
  background: var(--ink-50);
  font-size: 14px;
  color: var(--ink-500);
  transition: all .15s;
}
.child-tab.active {
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 500;
}
.child-tab.complete {
  background: var(--green-50);
  color: var(--green-800);
}
.child-avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

/* ===== Child preview cards in count step ===== */
.children-preview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-top: 32px;
}
.child-card-mini {
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  display: flex; align-items: center; gap: 12px;
  font-size: 14px;
}
.child-card-mini .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600;
  color: white;
  font-size: 14px;
}

/* ===== Document drop zone ===== */
.dropzone {
  border: 2px dashed var(--ink-200);
  border-radius: var(--r-lg);
  padding: 40px;
  background: var(--bg-cream);
  text-align: center;
  transition: all .2s;
  position: relative;
}
.dropzone:hover {
  border-color: var(--green-700);
  background: var(--green-50);
}
.dropzone-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-900);
  margin: 12px 0 4px;
}
.dropzone-sub {
  font-size: 13px;
  color: var(--ink-500);
}
.dropzone-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: white;
  display: inline-grid; place-items: center;
  box-shadow: var(--shadow-sm);
  color: var(--green-800);
  margin-bottom: 8px;
}

.doc-list {
  margin-top: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.doc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: white;
  border: 1px solid var(--ink-100);
  font-size: 14px;
}
.doc-row .ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
}
.doc-row .meta {
  font-size: 12px;
  color: var(--ink-400);
  font-family: var(--font-mono);
}
.doc-row .x {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-400);
}
.doc-row .x:hover { background: var(--ink-50); color: var(--ink-700); }

/* ===== Invitation rows ===== */
.invite-list {
  display: flex; flex-direction: column;
  gap: 12px;
}
.invite-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: white;
  border: 1px solid var(--ink-100);
}
.invite-row .role-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
}
.invite-row .input {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
}
.invite-add {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--ink-200);
  background: transparent;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  justify-content: center;
}
.invite-add:hover { border-color: var(--green-700); color: var(--green-800); background: var(--green-50); }

.role-suggestions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  font-size: 13px;
  color: var(--ink-700);
  transition: all .15s;
}
.role-chip:hover { background: var(--green-50); border-color: var(--green-300); color: var(--green-800); }

/* ===== Done screen ===== */
.done-hero {
  text-align: center;
  padding: 32px 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.done-checkmark {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--green-100);
  display: grid; place-items: center;
  margin-bottom: 24px;
  position: relative;
}
.done-checkmark::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--green-200);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin: 24px 0 32px;
  text-align: left;
}
.summary-stat {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--bg-cream);
  border: 1px solid var(--ink-100);
}
.summary-stat .v {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}
.summary-stat .l {
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 2px;
}

.next-card {
  width: 100%;
  padding: 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  color: white;
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}
.next-card .ic {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.15);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.next-card h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.next-card p {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.4;
}
.next-card .go {
  margin-left: auto;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: white;
  color: var(--green-900);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}

/* ===== Animation ===== */
.fade-in {
  animation: fadeIn .4s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge-green { background: var(--green-100); color: var(--green-800); }
.badge-warm  { background: var(--warm-yellow-light); color: #8B6914; }
.badge-coral { background: #FCE4DC; color: #B23A1F; }
.badge-neutral { background: var(--ink-50); color: var(--ink-500); }

/* ===== Inline child color helpers ===== */
.av-coral { background: linear-gradient(135deg, #F4A261, #E76F51); }
.av-sage  { background: linear-gradient(135deg, #74C69D, #40916C); }
.av-sun   { background: linear-gradient(135deg, #F5D491, #E8B14A); }

/* ===== Login screen ===== */
.login-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  padding: 0 40px 40px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  align-items: stretch;
}
.login-aside {
  background: linear-gradient(160deg, var(--green-800) 0%, var(--green-900) 100%);
  border-radius: var(--r-2xl);
  padding: 56px 56px 48px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-height: 640px;
}
.login-aside::before {
  content: "";
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(149, 213, 178, 0.25) 0%, transparent 70%);
  top: -120px; right: -160px;
}
.login-aside::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 162, 97, 0.18) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}
.login-aside-inner { position: relative; z-index: 1; }
.login-aside h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 32px 0 20px;
  text-wrap: balance;
}
.login-aside p {
  font-size: 16px;
  line-height: 1.55;
  opacity: 0.85;
  max-width: 440px;
  margin: 0;
}
.login-quote {
  position: relative;
  z-index: 1;
  padding: 24px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}
.login-quote .text {
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 16px;
  font-style: italic;
}
.login-quote .who {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.login-quote .who .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F4A261, #E76F51);
}
.login-quote .who-meta { line-height: 1.3; }
.login-quote .who-meta b { font-weight: 500; }
.login-quote .who-meta span { display: block; opacity: 0.7; font-size: 12px; }

.login-card {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  padding: 56px 56px 48px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.login-card .sub {
  font-size: 15px;
  color: var(--ink-500);
  margin: 0 0 32px;
}
.login-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0;
  font-size: 12px;
  color: var(--ink-400);
}
.login-divider::before, .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink-100);
}
.btn-sso {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--ink-200);
  background: white;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-900);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all .15s;
}
.btn-sso:hover { border-color: var(--ink-300); background: var(--ink-50); }
.login-toggle-link {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-500);
}
.login-toggle-link a {
  color: var(--green-800);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.login-toggle-link a:hover { text-decoration: underline; }

/* checkbox */
.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-row input { display: none; }
.checkbox-box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--ink-300);
  flex-shrink: 0;
  margin-top: 1px;
  display: grid; place-items: center;
  background: white;
  transition: all .15s;
}
.checkbox-row input:checked + .checkbox-box {
  background: var(--green-800);
  border-color: var(--green-800);
}
.checkbox-row input:checked + .checkbox-box::after {
  content: "";
  width: 10px; height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M2.5 6l2.5 2.5L9.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.checkbox-row a { color: var(--green-800); }

/* Multi-child indicator strip */
.multi-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--green-900);
}
.multi-strip-stack {
  display: flex;
}
.multi-strip-stack .av {
  width: 28px; height: 28px;
  border-radius: 50%;
  margin-left: -6px;
  border: 2px solid var(--green-50);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  color: white;
}
.multi-strip-stack .av:first-child { margin-left: 0; }
.multi-strip-progress {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-700);
}

/* Geo gradient backgrounds for art tiles */
.art-tile {
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}

/* Reset transform helper for fixed prototype frame on small screens */
@media (max-width: 1100px) {
  .stage { grid-template-columns: 1fr; gap: 16px; padding: 0 16px 24px; }
  .rail { display: none; }
  .panel { padding: 32px 24px; min-height: 0; }
  .login-shell { grid-template-columns: 1fr; padding: 0 16px 24px; }
  .login-aside { display: none; }
  .login-card { padding: 32px 24px; }
  .topbar { padding: 0 16px; }
  .welcome-grid { grid-template-columns: 1fr; gap: 24px; }
  .summary-grid { grid-template-columns: 1fr; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar { height: 56px; }
  .topbar-aux { gap: 8px; }
  .trust-pill { display: none; }

  .panel { padding: 24px 16px; border-radius: 20px; }
  .headline { font-size: clamp(1.5rem, 6vw, 2rem); }
  .lede { font-size: 14px; }

  .panel-footer { flex-direction: column-reverse; gap: 12px; align-items: stretch; }
  .panel-footer .left, .panel-footer .right { width: 100%; justify-content: center; }
  .btn { width: 100%; justify-content: center; }

  .option-grid.cols-2,
  .option-grid.cols-3,
  .option-grid.cols-4 { grid-template-columns: 1fr; }

  .child-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .child-tab { flex-shrink: 0; }

  .invite-row { grid-template-columns: 1fr; gap: 8px; }
  .role-suggestions { gap: 6px; }

  .count-picker { flex-wrap: wrap; gap: 8px; }
  .count-pill { flex: 1 1 calc(50% - 4px); min-width: 0; }
}

@media (max-width: 480px) {
  .panel { padding: 20px 14px; }
  .headline { font-size: clamp(1.375rem, 7vw, 1.75rem); }
  .input, .select, .textarea { font-size: 15px; padding: 10px 14px; }
  .login-card { padding: 24px 16px; }
  .login-card h1 { font-size: 22px; }
  .summary-stat .v { font-size: 24px; }
}
