/* Risk Response Capability - shared styles (Regenerative Outcomes) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #1a1714;
  --ink-mid: #3d3830;
  --ink-light: #6f6a62;   /* warmed slightly to sit with the cream, not pure cool grey */
  --rule: #e8e3db;        /* hairline, tinted warm toward the brand */
  --rule-soft: #f0ece5;
  --cream: #faf8f5;
  --cream-deep: #f3efe8;  /* second surface tint for grouping without borders */
  --purple: #3d2c5e;
  --purple-dark: #2a1e42;
  --purple-lift: #4a3670; /* top stop for the button gradient */
  --blue: #5b7be8;
  --white: #ffffff;

  /* Radius scale */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;

  /* Elevation: a tight ambient shadow plus a soft directional one, warm-tinted.
     Light comes from above, so shadows fall below. Used instead of borders. */
  --e1: 0 1px 2px rgba(26,23,20,.05), 0 1px 3px rgba(26,23,20,.05);
  --e2: 0 1px 2px rgba(26,23,20,.05), 0 6px 16px -6px rgba(26,23,20,.12);
  --e3: 0 2px 6px rgba(26,23,20,.06), 0 18px 40px -12px rgba(26,23,20,.20);

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --focus: 0 0 0 3px rgba(91,123,232,.32);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 21px;   /* base reading size; larger for a board audience often reading on phones/shared screens */
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 96px; }
.wrap-wide { max-width: 900px; margin: 0 auto; padding: 40px 20px 96px; }

/* Screens fade and rise in, so navigating between steps feels caused, not abrupt. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.serif { font-family: 'Playfair Display', Georgia, serif; }

/* ── header band ── */
.band {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 36px 36px 34px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--e2);
}
/* A soft glow from the top-right corner: decorate the background with intent. */
.band::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(130% 150% at 88% -20%, rgba(255,255,255,.18), transparent 55%);
  pointer-events: none;
}
.band > * { position: relative; }
.band .eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 14px;
}
.band h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.2rem; font-weight: 700; line-height: 1.12; margin-bottom: 8px;
}
.band p { font-size: 19px; color: rgba(255,255,255,0.8); max-width: 46ch; }

/* ── cards ── */
/* Depth carries the separation; the border is now just a faint hairline. */
.card {
  background: white; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px; margin-bottom: 18px;
  box-shadow: var(--e1);
}
.card h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.muted { color: var(--ink-light); font-size: 18px; }
.label-small {
  font-size: 13px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--ink-light);
}

/* ── inputs ── */
input[type=text], textarea {
  width: 100%; font: inherit; font-size: 19px; color: var(--ink);
  border: 1.5px solid var(--rule); border-radius: var(--radius-sm); padding: 14px 16px;
  background: white; outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input[type=text]:focus, textarea:focus { border-color: var(--blue); box-shadow: var(--focus); }
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

/* ── buttons ── */
.btn {
  font: 600 18px/1 'Source Sans 3', system-ui, sans-serif;
  border: none; border-radius: var(--radius-sm); padding: 15px 26px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease),
              background .15s var(--ease), border-color .15s var(--ease);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* Primary: the one visually distinct action (Von Restorff). A slight top-to-bottom
   gradient plus an inset highlight makes it read as a raised, pressable surface. */
.btn-primary {
  background: linear-gradient(180deg, var(--purple-lift), var(--purple));
  color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--e1), 0 6px 16px -8px rgba(61,44,94,.65);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), var(--e2), 0 12px 24px -8px rgba(61,44,94,.7);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.28);
}
.btn-ghost { background: white; color: var(--ink-mid); border: 1.5px solid var(--rule); box-shadow: var(--e1); }
.btn-ghost:hover:not(:disabled) { background: var(--cream); transform: translateY(-1px); box-shadow: var(--e2); }
.btn-ghost:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn-danger { background: white; color: #b91c1c; border: 1.5px solid #fecaca; box-shadow: var(--e1); }
.btn-danger:hover:not(:disabled) { background: #fef2f2; border-color: #fca5a5; }
.btn-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 24px; flex-wrap: wrap; }

/* ── progress dots ── */
.dots { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.dot {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--rule);
  background: white; color: var(--ink-light); font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--e1);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.dot:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.dot.active { border-color: var(--purple); color: var(--purple); box-shadow: 0 0 0 3px rgba(61,44,94,.14); }
.dot.done { color: white; border-color: transparent; }

/* ── dimension card ── */
.dim { background: white; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--e2); }
.dim-head { padding: 22px 24px; color: white; }
.dim-head .eye { font-size: 12.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; opacity: .8; margin-bottom: 8px; }
.dim-head h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 6px; font-family: 'Playfair Display', Georgia, serif; }
.dim-head p { font-size: 19px; opacity: .92; max-width: 52ch; }
.dim-body { padding: 22px 24px; }

/* "how to answer" list on the exec intro */
.how-list { list-style: none; margin: 4px 0 0; }
.how-list li { position: relative; padding: 7px 0 7px 24px; font-size: 18px; color: var(--ink-mid); line-height: 1.55; }
.how-list li::before { content: '›'; position: absolute; left: 5px; color: var(--purple); font-weight: 700; }

/* per-dimension steer + "what good looks like" anchor at rating time */
.rate-steer { font-size: 16.5px; color: var(--ink-light); margin: 6px 0 12px; }
.anchor { margin-top: 14px; border-top: 1px solid var(--rule-soft); padding-top: 12px; }
.anchor summary { cursor: pointer; font-size: 16.5px; font-weight: 600; color: var(--purple); list-style: none; }
.anchor summary::-webkit-details-marker { display: none; }
.anchor summary::before { content: '▸ '; }
.anchor[open] summary::before { content: '▾ '; }
.anchor p { font-size: 17.5px; color: var(--ink-mid); line-height: 1.6; margin-top: 8px; }

/* "cannot judge" option below the 1 to 5 scale */
.rating-na { margin-top: 8px; }
.rating-na button {
  width: 100%; font: 600 15.5px/1.2 'Source Sans 3', system-ui, sans-serif;
  border: 1.5px dashed var(--rule); border-radius: var(--radius-sm); padding: 13px; background: white;
  color: var(--ink-light); cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.rating-na button:hover { border-color: var(--ink-light); }
.rating-na button.selected { border-style: solid; border-color: var(--ink-light); background: var(--cream-deep); color: var(--ink-mid); font-weight: 700; }

/* rating buttons */
.rating-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.rating-btn {
  font: 600 15.5px/1.2 'Source Sans 3', system-ui, sans-serif; text-align: center;
  border: 1.5px solid var(--rule); border-radius: var(--radius-sm); padding: 15px 6px; background: white;
  color: var(--ink-mid); cursor: pointer;
  transition: transform .12s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.rating-btn:hover { transform: translateY(-2px); box-shadow: var(--e2); border-color: transparent; }
.rating-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.rating-btn.selected { color: white; font-weight: 700; box-shadow: var(--e2); }
@media (max-width: 560px) { .rating-row { grid-template-columns: repeat(5, 1fr); gap: 5px; } .rating-btn { padding: 13px 3px; font-size: 13.5px; } }

/* probes */
.probes { margin-top: 18px; background: var(--cream); border-radius: var(--radius-sm); padding: 16px 18px; }
.probes .label-small { display: block; margin-bottom: 8px; }
.probes ul { list-style: none; }
.probes li { font-size: 18px; color: var(--ink-mid); padding: 6px 0 6px 20px; position: relative; line-height: 1.55; }
.probes li::before { content: '·'; position: absolute; left: 4px; color: var(--blue); font-weight: 700; }

/* ── gap bars (synthesis) ── */
.gap-row { margin-bottom: 16px; }
.gap-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.gap-dim-name { font-size: 17px; font-weight: 700; }
.gap-badge { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.gap-track { position: relative; height: 26px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.gap-exec-bar { position: absolute; top: 0; left: 0; height: 100%; background: #c7d7fb; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.gap-exec-label { font-size: 10px; font-weight: 700; color: var(--purple); white-space: nowrap; }
.gap-board-bar { position: absolute; top: 22%; left: 0; height: 56%; border-radius: 5px; opacity: .9; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.gap-board-label { font-size: 10px; font-weight: 700; color: white; white-space: nowrap; }
.gap-empty { display: flex; align-items: center; height: 100%; padding-left: 10px; }
.gap-empty span { font-size: 11px; color: #9ca3af; }

.legend { display: flex; gap: 20px; justify-content: center; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #4b5563; }
.legend-line { width: 20px; height: 3px; border-radius: 2px; }

/* questions */
.question-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.question-num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--purple); color: white; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.question-text { font-size: 18.5px; color: var(--ink-mid); line-height: 1.55; }

/* misc */
.screen { display: none; }
.screen.active { display: block; animation: rise .35s var(--ease) both; }
.center { text-align: center; }
.pill { display: inline-block; font-size: 15px; font-weight: 600; padding: 5px 14px; border-radius: 20px; background: #ecfdf5; color: #15803d; border: 1px solid #a7f3d0; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--cream); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 8px 8px 8px 14px; margin-top: 6px; }
.linkbox code { font-size: 16px; color: var(--ink-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.err { color: #b91c1c; font-size: 17px; margin-top: 8px; }
.spinner { text-align: center; color: var(--ink-light); padding: 60px 20px; font-size: 18px; }

/* Designed empty state: says what this is and offers one clear next step. */
.empty { text-align: center; padding: 44px 24px; }
.empty .empty-mark {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 24px;
  background: var(--cream-deep); color: var(--purple);
}
.empty h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }
.empty p { color: var(--ink-light); font-size: 18px; max-width: 40ch; margin: 0 auto; }

/* Peak-end: a completion moment worth celebrating (exec "thank you"). */
.success-mark {
  width: 68px; height: 68px; border-radius: 50%; margin: 4px auto 4px;
  display: grid; place-items: center; color: white; font-size: 32px;
  background: linear-gradient(180deg, #22c55e, #15803d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 24px -8px rgba(21,128,61,.6);
  animation: rise .45s var(--ease) both;
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .btn:hover, .dot:hover, .rating-btn:hover { transform: none !important; }
}
