/* ── EDS Brand Tokens ── */
:root {
  /* Core pair — off-black ink, off-white paper */
  --ink:         #12100D;
  --paper:       #FFF5EC;
  --white:       #FFFFFF;
  --error:       #b8472a;   /* terracotta, canon auth.css */

  /* Accent pair — same family, shifted for contrast.
     Gold reads on dark grounds, heritage tan reads on light grounds. */
  --gold:        #CC9762;
  --gold-light:  #D9BA95;
  --heritage:    #8C5A3C;
  --accent:      var(--heritage);

  /* Surfaces. 0/1 are card white; 2-4 are the recessed steps used inside
     the app, ink mixed into white at 3 / 6 / 10% so they stay neutral
     against --app-bg rather than reading as the brand cream. */
  --bg:          #FFF5EC;   /* canon ground: entry + history screens */
  --app-bg:      #FFFFFF;   /* facilitator + participant working surfaces */
  --surface-0:   #FFFFFF;
  --surface-1:   #FFFFFF;
  --surface-2:   #F8F8F7;
  --surface-3:   #F1F1F0;
  --surface-4:   #E7E7E6;
  --row-hover:   #F8EEE6;   /* canon logged-in-studio.html */
  --border:      rgba(18,16,13,0.08);
  --border-hi:   rgba(18,16,13,0.15);

  --text-primary:   #12100D;
  --text-secondary: rgba(18,16,13,0.52);
  --text-accent:    #8C5A3C;
  --ink-dim:        #8c7f6e;   /* canon auth.css */
  --ink-mid:        #5c5244;   /* canon auth.css */
  --border-mid:     #c0b9a6;   /* canon auth.css */
  --rule:           rgba(18,16,13,0.11);  /* canon styles.css */

  /* Text and surfaces used on dark grounds */
  --on-ink:         #FFFFFF;
  --on-ink-dim:     rgba(255,255,255,0.55);

  --sticky-strength:   #C4D0BF;
  --sticky-challenge:  #E9B8A8;
  --sticky-factor:     #B8CEE8;
  --sticky-opportunity:#C4D0BF;
  --sticky-closing:    #CEC4E0;

  --radius: 0;
  --shadow: 0 1px 3px rgba(18,16,13,0.06), 0 2px 8px rgba(18,16,13,0.04);
  --shadow-lg: 0 4px 20px rgba(18,16,13,0.08), 0 1px 4px rgba(18,16,13,0.04);
  --shadow-xl: 0 12px 40px rgba(18,16,13,0.10), 0 2px 8px rgba(18,16,13,0.05);

  /* Type — serif for display, grotesk for body, mono for labels */
  --serif: 'Source Serif 4', Georgia, serif;
  --body:  'Hanken Grotesk', system-ui, sans-serif;
  --mono:  'Overpass', system-ui, sans-serif;
  --font:  var(--body);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; margin: 0; font-family: var(--font); background: var(--app-bg); color: var(--text-primary); }
#app { height: 100%; }
button { font-family: var(--font); cursor: pointer; border: none; -webkit-tap-highlight-color: transparent; outline: none; }
button:focus { outline: none; }
input, textarea { font-family: var(--font); }
/* Form controls carry the surface explicitly rather than inheriting the UA's
   white. :where() holds specificity at zero so component rules still win —
   including deliberate transparency, e.g. .kanban-col-name-input. Checkboxes
   and radios are excluded to keep their native rendering. */
input:where(:not([type='checkbox'], [type='radio'])), textarea, select {
  background: var(--surface-0);
  color: var(--text-primary);
}
a { color: inherit; }

/* ── Typography ── */
/* Serif carries display and headings; grotesk carries body; mono carries
   labels and annotations (applied per-rule alongside uppercase). */
h1, h2, h3,
.modal-card h2,
.section-title,
.ai-statement-display,
.strengths-hero-title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: block; }
#participant-view { background: var(--app-bg); position: relative; }
/* Coordinate grid behind the participant screens — the site's hero motif at
   its 96px spacing, inverted to ink since this ground is white rather than
   dark. Unmasked: the site fades its grid at the hero's edges, but here it is
   a full-page ground, and at this weight it carries to the edge without
   needing to be softened. */
#participant-view::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(18,16,13,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,16,13,0.045) 1px, transparent 1px);
  background-size: 96px 96px;
}
/* Content sits above the grid. */
.part-header, .part-content { position: relative; z-index: 1; }
.hidden { display: none !important; }

/* ── Logo marks ── */
.logo-mark {
  display: inline-block;
  width: 48px; height: 48px;
  background: url('Evaluation_Paint_Full_Light.png') center/contain no-repeat;
}
.logo-mark.dark  { background-image: url('Evaluation_Paint_Full_Dark.png'); }
.logo-mark.small { width: 32px; height: 32px; }
/* In-app mark: the Datum dot. */
.logo-mark.datum { background-image: url('datum-mark.png'); }
.fac-header .logo-mark { background-image: url('datum-mark.png'); }

/* ── Entry Screens (join / session landing) ──
   Modeled on the studio's canonical auth pages (login.html + auth.css):
   a 50/50 split with a heritage panel carrying a coordinate grid on the
   left and the form on cream at the right. Below 800px the panel drops
   its ground and reflows inline above the form, as canon does. */
.auth-screen { min-height: 100vh; background: var(--bg); position: relative; }
.auth-screen.active { display: block; }

/* Film grain, scoped to these screens rather than body so it stays out of
   the facilitator canvas. */
.auth-screen::after {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.auth-page { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

/* ── Left panel ── */
.auth-left {
  background: var(--heritage);
  padding: 10rem 4rem 4rem;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
/* Coordinate grid, masked so it fades out before the panel edges. */
.auth-left::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 18%, black 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 18%, black 88%, transparent 100%);
  mask-composite: intersect;
}
.auth-left__body {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-title {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  font-weight: 350; line-height: 1.05; letter-spacing: -0.01em;
  text-transform: lowercase;
  color: var(--paper);
}
.auth-title--verbatim { text-transform: none; }
.auth-lede {
  font-family: var(--body); font-weight: 300;
  font-size: clamp(0.875rem, 1.2vw, 1rem); line-height: 1.75;
  color: var(--paper); max-width: 380px; margin-top: 3rem;
}
.auth-org {
  font-family: var(--mono); font-size: 0.8125rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,245,236,0.72); margin-top: 1.5rem;
}

/* ── Right panel ── */
.auth-right {
  padding: 10rem 4rem 4rem;
  display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start;
  max-width: 480px; width: 100%; margin: 0 auto;
  position: relative; z-index: 2;
}
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 1.25rem; }
.auth-field { width: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
.auth-field label {
  font-family: var(--body); font-size: 1rem; font-weight: 300;
  line-height: 1.75; color: var(--ink);
}
/* Underline-only inputs, as canon — no box, no radius. */
.auth-field input {
  background: transparent; border: none;
  border-bottom: 1px solid var(--border-mid);
  border-radius: 0;
  color: var(--ink); font-family: var(--body); font-weight: 300;
  font-size: 1rem; line-height: 1.75;
  padding: 0.5rem 0; width: 100%; outline: none;
  transition: border-color 0.2s;
}
.auth-field input:focus { border-color: var(--heritage); box-shadow: none; }
.auth-field input::placeholder { color: var(--ink-dim); opacity: 0.5; }

.btn-auth {
  align-self: center;
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: calc(0.6rem + 0.18em) 1.5rem calc(0.6rem - 0.18em);
  border-radius: 0; width: auto;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-auth:hover { background: var(--heritage); border-color: var(--heritage); color: var(--paper); }
.btn-auth:disabled { opacity: 0.5; pointer-events: none; }
.btn-auth--ghost { background: transparent; color: var(--ink); }
.btn-auth--ghost:hover { background: var(--heritage); border-color: var(--heritage); color: var(--paper); }

.form-toggle {
  align-self: center; background: none; border: none; padding: 0;
  font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--heritage); transition: color 0.2s;
}
.form-toggle:hover { color: var(--ink); }

/* ── Wordmark ── */
.auth-topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 1.75rem 4rem; }
.auth-wordmark {
  font-family: var(--serif); font-weight: 250; font-size: 1.05rem;
  text-transform: lowercase; color: var(--paper);
}
.auth-wordmark em { font-style: italic; color: var(--ink); }

#recent-sessions-home { width: 100%; margin-top: 1.75rem; }
.recent-head {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim); padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-mid);
}
.recent-session-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.875rem 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: color 0.2s;
}
.recent-session-row:hover { color: var(--heritage); }
.recent-session-name { font-family: var(--body); font-weight: 400; font-size: 0.9375rem; line-height: 1.3; }
.recent-session-org  { font-family: var(--body); font-weight: 300; font-size: 0.8125rem; color: var(--ink-dim); margin-top: 0.125rem; }
.recent-session-code { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.16em; color: var(--heritage); flex-shrink: 0; }

.divider {
  width: 100%; display: flex; align-items: center; gap: 1rem;
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--heritage);
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--heritage); opacity: 0.5;
}

@media (max-width: 800px) {
  .auth-page { grid-template-columns: 1fr; min-height: 0; }
  /* The panel keeps its content but sheds its ground, so dynamic copy
     (the session name on the landing screen) needs no duplicate markup. */
  .auth-left { background: none; padding: 0 1.5rem 2.5rem; overflow: visible; }
  .auth-left::before { display: none; }
  .auth-title, .auth-lede { color: var(--ink); }
  .auth-org { color: var(--heritage); }
  .auth-right { padding: 0 1.5rem 3rem; max-width: 100%; }
  .auth-page { padding: 7rem 0 0; }
  .auth-topbar { padding: 1.5rem; }
  .auth-wordmark { color: var(--ink); }
  .auth-wordmark em { color: var(--heritage); }
}

/* ── Buttons ──
   The site's standard button formatting (styles.css .btn-primary /
   .btn-ghost): Overpass at 0.625rem/0.18em uppercase, square, no lift on
   hover — the colour change is the whole interaction.

   The asymmetric vertical padding is canon's and deliberate: uppercase mono
   has no descenders, but the font still reserves descender space, so
   symmetric padding leaves visibly more room below the letters than above.

   Width stays 100% by default because the sidebar and card layouts rely on
   it; canon's buttons are inline-block since they sit in prose. */
.btn-primary {
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--ink); color: var(--on-ink);
  padding: calc(0.6rem + 0.18em) 1.25rem calc(0.6rem - 0.18em);
  border: none; border-radius: 0;
  transition: background 0.2s, color 0.2s;
  width: 100%;
}
.btn-primary:hover    { background: var(--heritage); color: var(--on-ink); }
.btn-primary:disabled { opacity: 0.45; pointer-events: none; }

/* Canon's .btn-ghost. Padding is the .article-end pairing variant, which
   subtracts the 1px border so a ghost sitting beside a primary matches its
   height rather than standing 2px taller. */
.btn-secondary {
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  background: transparent; color: var(--ink-mid);
  padding: calc(0.6rem - 1px + 0.18em) 1.25rem calc(0.6rem - 1px - 0.18em);
  border: 1px solid var(--rule); border-radius: 0;
  transition: color 0.2s, border-color 0.2s;
  width: 100%;
}
.btn-secondary:hover { color: var(--ink); border-color: var(--ink-mid); }
.btn-secondary.small,
.btn-back.small,
.btn-danger.small { padding: calc(0.45rem - 1px + 0.18em) 0.875rem calc(0.45rem - 1px - 0.18em); width: auto; }
.btn-primary.small { padding: calc(0.45rem + 0.18em) 0.875rem calc(0.45rem - 0.18em); width: auto; }

/* Ghost on a dark ground — the sidebar Back control. Inverts on hover the
   way canon's dark-ground buttons do. */
.btn-back {
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  background: transparent; color: var(--on-ink);
  padding: calc(0.6rem - 1px + 0.18em) 1.25rem calc(0.6rem - 1px - 0.18em);
  border: 1px solid rgba(255,255,255,0.45); border-radius: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  width: 100%;
}
.btn-back:hover    { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.btn-back:disabled { opacity: 0.25; pointer-events: none; }

.btn-danger {
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  background: transparent; color: var(--error);
  padding: calc(0.6rem - 1px + 0.18em) 1.25rem calc(0.6rem - 1px - 0.18em);
  border: 1px solid var(--error); border-radius: 0;
  transition: background 0.2s, color 0.2s;
  width: 100%;
}
.btn-danger:hover { background: var(--error); color: var(--on-ink); }

/* Icon-only controls keep their own sizing — canon has no icon-button
   spec, and mono/uppercase means nothing for a glyph. */
.btn-icon {
  background: none; color: var(--text-secondary);
  font-size: 14px; padding: 4px 8px;
  border-radius: 0;
  transition: all 0.15s;
}
.btn-icon:hover { color: var(--text-primary); background: var(--surface-2); }

.full-width { width: 100%; }
.error-msg  { color: var(--error); font-size: 13px; }

/* ── Modals ── */
.modal {
  position: fixed; inset: 0;
  background: rgba(18,16,13,0.50);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }

.modal-card {
  background: var(--surface-1);
  border: 1px solid var(--border-hi);
  border-radius: 0;
  padding: 36px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; gap: 16px;
}
.modal-card.wide { max-width: 600px; }
.modal-card h2 { font-size: 18px; font-weight: 600; color: var(--text-primary); }

.modal-card label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-secondary); font-family: var(--mono);
}
.modal-card input, .modal-card textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  font-size: 15px; color: var(--text-primary);
  background: var(--surface-2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-card input::placeholder, .modal-card textarea::placeholder { color: var(--text-secondary); }
.modal-card input:focus, .modal-card textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140,90,60,0.14);
}
.modal-card textarea { resize: vertical; }

.modal-actions { display: flex; gap: 12px; }
.modal-actions .btn-primary, .modal-actions .btn-secondary { width: auto; flex: 1; }

.structured-field { display: flex; flex-direction: column; gap: 6px; }
.structured-field-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.structured-field input, .structured-field textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  font-size: 15px; color: var(--text-primary);
  background: var(--surface-2);
  font-family: var(--font); transition: border-color 0.2s, box-shadow 0.2s;
}
.structured-field input::placeholder, .structured-field textarea::placeholder { color: var(--text-secondary); }
.structured-field input:focus, .structured-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140,90,60,0.14);
}
.structured-field textarea { resize: vertical; }

.sticky-subtext {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(18,16,13,0.10);
  font-size: 11px; opacity: 0.80; line-height: 1.5;
}
.sticky-subtext-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; opacity: 0.55; margin-bottom: 2px; font-family: var(--mono);
}

/* ── Participant Header — always dark ── */
.part-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.session-info { display: flex; flex-direction: column; gap: 2px; }
.org-name     { font-size: 11px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: rgba(255,255,255,0.55); font-family: var(--mono); }
.session-name { font-size: 15px; font-weight: 500; color: var(--on-ink); }
.phase-label  { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.07em; font-family: var(--mono); }

.part-content {
  padding: 28px 24px;
  background: var(--app-bg);
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.part-content.centered {
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

/* ── Facilitator Layout ── */
#facilitator-view { flex-direction: column; height: 100vh; overflow: hidden; background: var(--app-bg); }
#facilitator-view.active { display: flex; }
#facilitator-view .sticky.strength { background: var(--gold-light); }

.fac-header {
  background: var(--ink);
  border-bottom: none;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-left .session-meta { display: flex; flex-direction: column; gap: 1px; }
.header-left .session-name { color: var(--on-ink); }
.header-left .org-name     { color: rgba(255,255,255,0.60); }
.header-right { display: flex; align-items: center; gap: 12px; }

.fac-header .btn-icon { color: var(--on-ink); }
.fac-header .btn-icon:hover { color: var(--on-ink); background: rgba(255,255,255,0.12); }

.participant-count {
  font-size: 11px; color: var(--on-ink);
  white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  padding: 4px 10px; border-radius: 0;
}

/* The two header pills share one height so they line up. Scoped to the
   header: .timer is also used in the mobile nav bar, which sets its own
   size. */
.fac-header { --pill-h: 32px; --pill-radius: 0; }
.fac-header .timer,
.fac-header .participant-count {
  height: var(--pill-h);
  border-radius: var(--pill-radius);
  display: inline-flex; align-items: center;
  padding-top: 0; padding-bottom: 0;
}
.fac-header .timer { padding-left: 12px; padding-right: 12px; }
.fac-header .participant-count { padding-left: 13px; padding-right: 13px; }
/* Tighter than the default icon button so the pill wraps the controls
   rather than being sized by their padding. */
.fac-header .timer .btn-icon { padding: 2px 6px; }

.timer {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  padding: 5px 12px; border-radius: var(--radius);
}
#timer-display {
  font-size: 14px; font-weight: 600;
  color: var(--on-ink); font-variant-numeric: tabular-nums;
}

.fac-body { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar — always dark ── */
.fac-sidebar {
  width: 216px;
  background: var(--ink);
  display: flex; flex-direction: column;
  padding: 0; overflow: hidden; flex-shrink: 0;
  min-height: 0;
}

.phase-nav { flex: 1; padding: 20px 0 12px; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.phase-nav-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--on-ink);
  padding: 0 20px; margin-bottom: 12px; font-family: var(--mono);
}
.phase-list { display: flex; flex-direction: column; gap: 0; flex: 1; }
.phase-item {
  padding: 9px 20px;
  font-size: 13px; color: rgba(255,255,255,0.78);
  cursor: pointer; transition: all 0.15s;
  line-height: 1.4;
  border-left: 2px solid transparent;
  display: flex; align-items: center; gap: 10px;
}
.phase-item:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.04); }
.phase-item.active {
  color: var(--on-ink); font-weight: 500;
  border-left-color: var(--gold);
  background: rgba(204,151,98,0.10);
}
.phase-item.completed { color: rgba(255,255,255,0.28); }
.phase-item.completed::before { content: '✓'; font-size: 9px; color: rgba(204,151,98,0.55); }

.sidebar-actions {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
}

/* Dark sidebar overrides for buttons */
.fac-sidebar .btn-primary { background: var(--gold); color: var(--ink); border: none; }
.fac-sidebar .btn-primary:hover { background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); }


.fac-content {
  flex: 1; padding: 40px 48px; overflow-y: auto;
  background: var(--app-bg);
}
.fac-content > * {
  max-width: 800px; width: 100%;
  margin-left: auto; margin-right: auto;
}

/* ── Canvas ── */
.canvas-wrapper {
  position: relative;
  background: var(--surface-0);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: none;
  overflow: auto; height: 520px; cursor: default;
}
.canvas-area { position: relative; width: 2200px; height: 1100px; }

.zoom-controls { display: flex; align-items: center; gap: 6px; }
.zoom-btn {
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 0;
  width: 26px; height: 26px; font-size: 15px;
  cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.zoom-btn:hover { background: var(--surface-3); border-color: var(--border-hi); }
.zoom-level { font-size: 11px; color: var(--text-secondary); min-width: 34px; text-align: center; }

/* ── Sticky Notes ── */
.sticky {
  position: absolute;
  width: 160px; min-height: 100px;
  padding: 12px; border-radius: 0;
  font-size: 13px; line-height: 1.5; color: var(--ink);
  box-shadow: none;
  cursor: default; word-break: break-word;
  user-select: none; transition: box-shadow 0.15s;
  display: flex; flex-direction: column;
}
.sticky.draggable { cursor: grab; }
.sticky.dragging  { cursor: grabbing; box-shadow: 3px 6px 14px rgba(18,16,13,0.12); z-index: 100; }
.sticky.selected  { outline: 3px solid rgba(255,255,255,0.6); outline-offset: 2px; z-index: 50; }
.sticky.strength    { background: var(--sticky-strength); }
.sticky.challenge   { background: var(--sticky-challenge); }
.sticky.challenge .sticky-subtext { border-top-color: rgba(18,16,13,0.10); }
.sticky.factor      { background: var(--sticky-factor); }
.sticky.closing     { background: var(--sticky-closing); }
.sticky-delete {
  display: block; margin-left: auto; margin-top: 12px;
  font-size: 10px; padding: 2px 8px; border-radius: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer; font-family: var(--font);
  transition: all 0.15s; white-space: nowrap;
  align-self: flex-end;
}
.sticky-delete:hover { background: var(--error); color: white; border-color: var(--error); opacity: 1; }

/* ── Cluster Labels ── */
.cluster-label {
  position: absolute;
  background: var(--ink);
  color: rgba(255,255,255,0.90);
  padding: 5px 10px 5px 12px; border-radius: 0;
  font-size: 11px; font-weight: 600;
  cursor: grab; letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(18,16,13,0.22);
  white-space: nowrap; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.cluster-label.outside-control {
  background: transparent; color: var(--text-secondary);
  border: 1.5px dashed var(--accent); box-shadow: none;
}
.label-delete {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.55);
  font-size: 14px; line-height: 1; padding: 0 2px; border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.label-delete:hover { color: var(--on-ink); background: rgba(255,255,255,0.12); }
.cluster-label.outside-control .label-delete { color: var(--text-secondary); }


.canvas-toolbar {
  padding: 10px 14px;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  width: 100%; box-sizing: border-box;
}

/* ── Facilitator instruction card ── */
.fac-instruction-card {
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  border-radius: 0;
  padding: 16px 20px;
  margin-bottom: 4px;
}
.fac-instruction-title {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--mono);
}
.fac-instruction-body { font-size: 15px; color: var(--text-primary); line-height: 1.75; }
.fac-instruction-body ol, .fac-instruction-body ul { padding-left: 20px; margin: 8px 0; }
.fac-instruction-body li { margin-bottom: 6px; }
.fac-instruction-body strong { font-weight: 600; }

.fac-label-input {
  padding: 8px 12px;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  background: var(--surface-0);
  color: var(--text-primary);
  font-size: 13px; flex: 1; min-width: 180px;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fac-label-input::placeholder { color: var(--text-secondary); }
.fac-label-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140,90,60,0.14);
}

/* ── Kanban Board ── */
.kanban-board {
  display: flex; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  padding: 4px 2px 16px;
  min-height: 480px;
}
.kanban-column {
  flex-shrink: 0; width: 220px;
  display: flex; flex-direction: column;
  background: var(--surface-0);
  border: none;
  border-top: 3px solid var(--col-accent, transparent);
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(18,16,13,0.06);
  max-height: 560px;
  transition: box-shadow 0.15s, background 0.15s;
}
.kanban-column.drag-over { box-shadow: 0 4px 16px rgba(158,167,154,0.3); background: rgba(158,167,154,0.08); }
.kanban-column.special { background: var(--surface-3); box-shadow: none; opacity: 0.7; }

.kanban-col-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(18,16,13,0.06);
  flex-shrink: 0;
}
.kanban-col-title {
  font-size: 10px; font-weight: 700;
  color: var(--ink); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--mono);
}
.kanban-col-name-input {
  width: 100%; border: none; background: transparent;
  font-size: 10px; font-weight: 700;
  color: var(--ink); letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--font); padding: 0; outline: none;
}
.kanban-col-name-input::placeholder { color: rgba(18,16,13,0.25); font-weight: 500; }
.kanban-col-count { font-size: 10px; color: var(--text-secondary); margin-top: 3px; }
.kanban-col-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.challenge-card {
  background: var(--surface-3);
  border: none;
  border-radius: 0;
  box-shadow: 0 1px 4px rgba(18,16,13,0.05);
  cursor: grab; user-select: none;
  transition: box-shadow 0.15s, transform 0.15s;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.challenge-card .strength-card-body {
  padding: 12px 12px 10px;
}
.challenge-card.has-radial::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--card-radial);
  opacity: 0.8;
  pointer-events: none;
}
.challenge-card:hover { box-shadow: 0 4px 14px rgba(18,16,13,0.10); transform: translateY(-1px); }
.challenge-card.dragging { opacity: 0.4; cursor: grabbing; transform: none; }
.challenge-card.participant-card { cursor: default; background: var(--surface-3); color: var(--ink); }
.challenge-card-text { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.challenge-card-driver {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(18,16,13,0.07);
  font-size: 11px; color: var(--text-secondary); line-height: 1.5;
}
.challenge-card-driver-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink); margin-bottom: 2px; font-family: var(--mono);
}
.challenge-card-actions { display: flex; gap: 4px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.card-quick-btn {
  font-size: 10px; padding: 3px 10px; border-radius: 0;
  border: 1px solid rgba(18,16,13,0.15);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer; font-family: var(--font);
  transition: all 0.15s; white-space: nowrap;
}
.card-quick-btn:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.card-quick-btn.delete { margin-left: auto; background: transparent; }
.card-quick-btn.delete:hover { background: var(--error); color: white; border-color: var(--error); }

/* ── Interview question cards ── */
.interview-questions-page {
  width: 100%; max-width: 640px;
  margin: 0 auto;
}
.interview-question-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
#part-content .interview-question-card {
  background: var(--surface-0);
  border: none;
  border-radius: 0;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(18,16,13,0.06);
}
.interview-q-num {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
#part-content .interview-q-num {
  background: var(--ink); color: var(--on-ink);
}
.interview-question-card p { font-size: 15px; color: var(--text-primary); line-height: 1.7; margin: 0; }


/* ── Theme tags ── */
.theme-tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 0;
  font-size: 11px; font-weight: 600;
  margin: 3px 2px; cursor: pointer; transition: all 0.15s;
}

/* ── Dot Ranking ── */
.ranking-page {
  width: 100%; max-width: 680px; margin: 0 auto;
}
.ranking-grid {
  display: flex; flex-direction: column; gap: 0;
  border-radius: 0;
}
.ranking-header-row {
  display: grid; grid-template-columns: 1fr 110px 110px 110px;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 20px; gap: 12px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.10em; font-family: var(--mono);
}
.ranking-header-row .ranking-criteria-col,
.ranking-header-row .ranking-theme-col { color: var(--on-ink); }
.ranking-row {
  display: grid; grid-template-columns: 1fr 110px 110px 110px;
  padding: 13px 20px; gap: 12px; align-items: center;
  border-bottom: 1px solid rgba(18,16,13,0.06);
  transition: background 0.2s;
}
.ranking-row:last-child { border-bottom: none; }
.ranking-row.has-rank { background: rgba(158,167,154,0.10); }
.ranking-theme-col    { font-size: 14px; font-weight: 500; color: var(--text-primary); display: flex; align-items: center;
                        text-transform: uppercase; letter-spacing: 0.08em; }
.ranking-criteria-col { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; text-align: center; color: var(--text-secondary); }
.rank-select {
  width: 72px;
  padding: 7px 10px;
  border: 1.5px solid rgba(18,16,13,0.12);
  border-radius: 0;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  background: var(--surface-0); color: var(--ink);
  text-align: center;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rank-select:focus { outline: none; border-color: var(--gold); box-shadow: none; }
.rank-select:hover { border-color: var(--gold); }

/* ── Results Table ── */
/* The table scrolls inside its own wrapper rather than pushing the page
   sideways, the way the kanban board does. Opaque, so the fixed background
   grid cannot show through the rows. */
.results-table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface-0);
}
.results-table {
  width: 100%; min-width: 580px; border-collapse: collapse;
  border-radius: 0; background: var(--surface-0);
}
/* Given the table scrolls, the columns get room rather than compressing. */
.results-table th:first-child,
.results-table td:first-child { min-width: 220px; }
.results-table th:not(:first-child),
.results-table td:not(:first-child) { min-width: 90px; white-space: nowrap; }
.results-theme { display: block; }
.results-table th {
  background: var(--ink); color: var(--surface-0);
  padding: 10px 20px; text-align: left;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.10em; font-family: var(--mono);
}
.results-table td { padding: 13px 20px; border-bottom: 1px solid rgba(18,16,13,0.06); font-size: 14px; color: var(--ink); }
/* First cell is the theme name — same uppercase treatment as the column
   header it came from. The badge beside it keeps its own casing. */
.results-table td:first-child { text-transform: uppercase; letter-spacing: 0.08em; }
.results-table td:first-child .winner-badge {
  text-transform: none; letter-spacing: 0.04em;
  display: inline-block; white-space: nowrap;
  margin: 6px 0 0;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tr.winner td { background: rgba(217,186,149,0.25); font-weight: 600; }
#part-content .results-table tr.winner td { background: rgba(158,167,154,0.10); }
.winner-badge {
  background: var(--gold-light); color: var(--ink);
  padding: 2px 8px; border-radius: 0;
  font-size: 10px; font-weight: 700; margin-left: 8px; letter-spacing: 0.04em;
}
.tied-badge { background: var(--surface-3); color: var(--text-secondary); border: 1px solid var(--border-hi); }

/* ── AI Statement ── */
.part-ai-statement {
  background: var(--surface-0);
  border-radius: 0;
  padding: 32px 36px;
  font-size: 22px; line-height: 1.75;
  color: var(--ink); font-weight: 300; font-style: italic;
  box-shadow: 0 2px 8px rgba(18,16,13,0.06);
}
.part-ai-statement--empty {
  font-size: 15px; font-style: normal; font-weight: 400;
  color: var(--text-secondary);
}
.ai-statement-input {
  width: 100%; padding: 18px 20px;
  font-size: 17px; line-height: 1.7;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  font-family: var(--font); color: var(--text-primary);
  resize: vertical; min-height: 120px;
  background: var(--surface-0);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-statement-input::placeholder { color: var(--text-secondary); }
.ai-statement-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140,90,60,0.14);
}

/* ── Phase content areas ── */
.phase-section { display: flex; flex-direction: column; gap: 20px; background: transparent; padding: 0; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.section-title  { font-size: 24px; font-weight: 500; color: var(--text-primary); letter-spacing: -0.3px; }
.section-prompt { font-size: 15px; color: var(--ink); line-height: 1.70; max-width: 640px; }
#part-content .phase-section .section-prompt {
  background: rgba(18,16,13,0.75);
  border-radius: 0;
  padding: 20px 24px 20px 24px;
  margin-bottom: 20px;
  max-width: 100%;
  font-size: 16px; line-height: 1.75; color: var(--on-ink);
}
#part-content .phase-section .section-prompt::before {
  content: 'PROMPT';
  display: block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.13em;
  color: var(--on-ink); font-style: normal;
  margin-bottom: 10px;
}


/* ── Participant Strengths Page ── */
.strengths-page {
  min-height: 100vh;
  padding: 0 0 60px;
}
.strengths-hero {
  background: var(--ink);
  padding: 56px 40px 36px;
  margin: 0 0 40px;
  border-radius: 0;
}
/* Light variant of the hero block. The base above is styled for a dark
   ground; the participant screens place it on white and were re-declaring
   the whole inversion inline at each call site. */
.strengths-hero.on-light {
  background: var(--surface-0);
  padding: 48px 40px 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(18,16,13,0.06);
}
.strengths-hero.on-light .strengths-hero-label {
  color: var(--ink); border-bottom-color: var(--border);
}
.strengths-hero.on-light .strengths-hero-sub { color: var(--ink); font-size: 15px; }

/* Buttons are full-width by default; this opts one back to its content. */
.btn-inline { width: auto; }

.session-end-card {
  background: var(--surface-0);
  border-radius: 0;
  box-shadow: 0 2px 12px rgba(18,16,13,0.06);
  width: 100%; max-width: 560px;
  overflow: hidden;
  padding: 48px 40px 40px;
  display: flex; flex-direction: column; align-items: center;
}
.strengths-hero-label {
  font-size: 22px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.45);
  margin-bottom: 0; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12); font-family: var(--mono);
}
.strengths-hero-sub {
  font-size: 17px; color: var(--surface-0);
  margin: 20px 0 0; font-weight: 400; line-height: 1.6;
}
/* Participant action buttons — same treatment as .btn-primary /
   .btn-secondary, sized to their content since they sit inline in cards. */
.challenge-add-btn,
.strengths-submit-btn {
  background: var(--ink); color: var(--on-ink);
  border: 1px solid var(--ink); border-radius: 0;
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: calc(0.6rem - 1px + 0.18em) 1.25rem calc(0.6rem - 1px - 0.18em);
  cursor: pointer; display: inline-block;
  /* opacity stays in the transition — the ranking page fades this button
     while the form is incomplete. */
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.15s;
}
.challenge-add-btn { margin-top: 28px; }
.challenge-add-btn:hover,
.strengths-submit-btn:hover {
  background: var(--heritage); border-color: var(--heritage); color: var(--on-ink);
}
.strengths-form-card {
  background: var(--surface-0);
  border-radius: 0;
  padding: 24px 24px 20px;
  margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.strengths-form-field { display: flex; flex-direction: column; gap: 6px; }
.strengths-form-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink); font-family: var(--mono);
}
.strengths-form-input, .strengths-form-textarea {
  background: var(--surface-0); border: 1px solid rgba(18,16,13,0.10);
  border-radius: 0; padding: 12px 14px;
  font-size: 15px; font-family: var(--font); color: var(--ink);
  outline: none; resize: none; transition: border-color 0.15s;
  width: 100%; box-sizing: border-box;
}
.strengths-form-input:focus, .strengths-form-textarea:focus {
  border-color: #9EA79A;
}
.strengths-form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.strengths-cancel-btn {
  background: transparent; color: var(--ink-mid);
  border: 1px solid var(--rule); border-radius: 0;
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: calc(0.6rem - 1px + 0.18em) 1.25rem calc(0.6rem - 1px - 0.18em);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.strengths-cancel-btn:hover { color: var(--ink); border-color: var(--ink-mid); }
.strengths-empty {
  font-size: 14px; color: var(--text-secondary);
  text-align: center; padding: 40px 0;
  grid-column: 1 / -1;
}
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 0 8px;
}
.strength-card {
  background: var(--surface-0);
  border-radius: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 220px;
  box-shadow: 0 2px 8px rgba(18,16,13,0.06);
  transition: box-shadow 0.2s;
}
.strength-card:hover { box-shadow: 0 8px 24px rgba(18,16,13,0.12); }
.strength-card-body {
  padding: 22px 20px 16px;
  display: flex; flex-direction: column; flex: 1;
}
.strength-card-label { display: none; }
.strength-card-text {
  font-size: 20px; font-weight: 700 !important; color: var(--ink);
  line-height: 1.3; margin-bottom: 12px;
}
.dreaming-page .strength-card-text {
  font-size: 16px; font-weight: 400 !important; line-height: 1.6;
}
/* This is substantive content, not a caption. --text-secondary's 52% ink
   only reached 2.9-3.5:1 against the card colours, under the 4.5:1 floor;
   0.78 puts every card in the 5.3-7.7:1 range. */
.strength-card-sub {
  font-size: 15px; color: rgba(18,16,13,0.78); line-height: 1.6;
  border-top: 1px solid rgba(18,16,13,0.08);
  padding-top: 12px; flex: 1;
}
.strength-card-sub-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 6px; font-family: var(--mono);
}
.strength-card-actions {
  display: flex; justify-content: flex-end; gap: 6px;
  margin-top: auto; padding-top: 12px;
}
.strength-edit-btn, .strength-card .sticky-delete {
  font-size: 10px; padding: 3px 10px;
  border-radius: 0; border: 1px solid rgba(18,16,13,0.18);
  background: transparent; color: var(--text-secondary);
  cursor: pointer; font-family: var(--font);
  transition: all 0.15s; white-space: nowrap;
  display: inline-block; margin-left: 0; margin-top: 0; align-self: auto;
}
.strength-edit-btn:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.strength-card .sticky-delete:hover { background: var(--error); color: var(--on-ink); border-color: var(--error); }

/* ── Fac note input ── */
.fac-note-area {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 14px;
}
.fac-note-area label {
  font-size: 10px; color: var(--text-secondary);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.10em;
  margin-bottom: 8px; display: block; font-family: var(--mono);
}
.fac-note-area textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 0;
  font-family: var(--font); font-size: 13px;
  background: var(--surface-0); color: var(--text-primary);
  resize: vertical; min-height: 60px;
  transition: border-color 0.2s;
}
.fac-note-area textarea::placeholder { color: var(--text-secondary); }
.fac-note-area textarea:focus { outline: none; border-color: var(--accent); }

/* ── Toggle ── */
.toggle-row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-primary); }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-hi); border-radius: 24px;
  cursor: pointer; transition: 0.2s;
  border: 1px solid var(--border);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface-0); top: 2px; left: 2px; transition: 0.2s;
  box-shadow: 0 1px 4px rgba(18,16,13,0.20);
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Vote prompt ── */
.vote-prompt { text-align: center; padding: 32px; font-size: 16px; color: var(--text-secondary); }

/* ── Opportunity question selector ── */
.opp-q-btn {
  background: var(--surface-0);
  border: 1.5px solid var(--border-hi);
  color: var(--text-secondary);
  border-radius: var(--radius);
  padding: 9px 16px; font-size: 13px; font-weight: 500;
  font-family: var(--font); cursor: pointer;
  text-align: center; width: 120px; transition: all 0.15s;
}
.opp-q-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.opp-q-btn.active { background: var(--ink); color: var(--surface-0); border-color: var(--ink); font-weight: 600; }
.opp-columns {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 16px;
}
.opp-column {
  flex: 1; min-width: 0;
  background: var(--surface-0);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(18,16,13,0.06);
  border-top: 3px solid var(--opp-accent, #9EA79A);
}
.opp-col-header {
  padding: 12px 16px 10px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink);
  border-bottom: 1px solid rgba(18,16,13,0.06); font-family: var(--mono);
}
.opp-col-body {
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.opp-card {
  background: var(--surface-3);
  border-radius: 0;
  padding: 10px 12px;
  font-size: 13px; color: var(--ink); line-height: 1.5;
  box-shadow: 0 1px 3px rgba(18,16,13,0.04);
}

/* ── Utilities ── */
.card {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px 24px;
  color: var(--text-primary);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.edit-pencil-btn {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  color: var(--ink); line-height: 1;
  border-radius: 0; opacity: 1; transition: color 0.15s;
  display: inline-flex; align-items: center;
}
.edit-pencil-btn:hover { color: var(--heritage); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 12px;
  border-radius: 0; font-size: 12px; font-weight: 500;
  background: var(--surface-3);
  border: 1px solid var(--border-hi);
  color: var(--text-secondary);
}
.chip.sage { background: var(--gold-light); color: var(--ink); border-color: var(--gold-light); }
.chip-delete {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.55;
  font-size: 14px; line-height: 1; padding: 0 2px; border-radius: 50%;
  transition: opacity 0.15s, background 0.15s;
}
.chip-delete:hover { opacity: 1; background: rgba(18,16,13,0.08); }

.status-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: #4CAF50;
  animation: pulse 2s infinite;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse  { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Responsive ── */
/* ── Hamburger button ── */
.hamburger-btn {
  display: none; /* shown only on mobile */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px; height: 36px;
  padding: 0;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--surface-0);
  border-radius: 0;
}
.desktop-only { display: flex; }

/* ── Mobile nav bar (hidden on desktop) ── */
.mobile-nav-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 8px 14px;
  gap: 8px;
  flex-shrink: 0;
}
.mob-nav-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  color: var(--on-ink);
  font-family: var(--mono);
  font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: calc(0.5rem - 1px + 0.18em) 0.875rem calc(0.5rem - 1px - 0.18em);
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.mob-nav-btn:hover { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.mob-nav-btn:disabled { opacity: 0.35; pointer-events: none; }
.timer-mob .btn-icon { -webkit-tap-highlight-color: transparent; outline: none; }
.mob-nav-next { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.mob-nav-next:hover { background: #73452C; }
.timer-mob {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 0;
  padding: 7px 10px;
  color: var(--on-ink);
}
#timer-display-mob {
  color: var(--on-ink);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timer-mob .btn-icon {
  color: var(--on-ink);
  font-size: 11px;
  width: auto;
  height: auto;
  padding: 2px 4px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.timer-reset-mob-btn {
  font-size: 9px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.65;
  padding: 2px 4px !important;
  width: auto !important; font-family: var(--mono);
}

/* ── Phase drawer (hidden on desktop) ── */
.phase-drawer {
  display: none;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  flex-shrink: 0;
}
.phase-drawer.open { display: block; }
.phase-list-mob {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  max-height: 55vh;
  overflow-y: auto;
}
.phase-list-mob .phase-item {
  padding: 10px 20px;
}

@media (max-width: 768px) {
  .fac-header     { padding-left: 14px; padding-right: 14px; }
  .hamburger-btn  { display: flex; }
  .mobile-nav-bar { display: flex; }
  .desktop-only   { display: none !important; }

  /* Hide desktop sidebar entirely */
  .fac-sidebar    { display: none; }

  .fac-content    { padding: 16px; }
  .ranking-header-row, .ranking-row { grid-template-columns: 1fr 80px 80px 80px; padding: 10px 12px; gap: 8px; }
  .ranking-criteria-col { font-size: 11px; }

  /* Show mobile timer when it has the timer visible (not hidden class) */
  #fac-timer-mob:not(.hidden) { display: flex; }
}
@media (max-width: 480px) {
  .part-content { padding: 20px 16px; }
}

/* ── Session History ── */
.history-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 16px;
}
.history-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px; margin-bottom: 14px; font-family: var(--mono);
}
.history-feed-item {
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: 0;
  margin-bottom: 6px; font-size: 13px; line-height: 1.5;
}
.history-feed-author { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.history-sticky {
  padding: 12px 14px; border-radius: 0;
  font-size: 13px; line-height: 1.5; max-width: 220px;
  box-shadow: var(--shadow);
}
.history-sticky.strength    { background: var(--sticky-strength); }
.history-sticky.opportunity { background: var(--sticky-opportunity); }
.history-sticky-sub {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px solid rgba(18,16,13,0.10);
  font-size: 11px; color: var(--text-secondary);
}
.history-tag {
  display: inline-block;
  background: var(--gold-light); color: var(--ink);
  padding: 2px 10px; border-radius: 0;
  font-size: 11px; font-weight: 600; margin: 2px 4px 2px 0;
}
.history-fac-note {
  margin-top: 16px; padding: 10px 14px;
  background: rgba(158,167,154,0.10);
  border: 1px solid rgba(158,167,154,0.25);
  border-radius: var(--radius);
  font-size: 12px; color: var(--text-secondary); font-style: italic;
}
.history-empty { font-size: 13px; color: var(--text-secondary); }
.history-session-card:hover {
  border-color: var(--accent) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg) !important;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}


/* ── History view ──
   Follows the studio dashboard (logged-in-studio.html): cream page,
   wordmark top-left, lowercase serif heading, and a table whose heads are
   serif/heritage rather than the mono uppercase used elsewhere. */
.topnav {
  width: 100%; background: var(--bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2.5rem; flex-shrink: 0;
  position: sticky; top: 0; z-index: 100;
}
.topnav__wordmark {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 250;
  letter-spacing: 0.01em; text-transform: lowercase;
  color: var(--ink); line-height: 1.5;
}
.topnav__wordmark em { font-style: italic; color: var(--heritage); }
.topnav__back {
  font-family: var(--body); font-size: 0.8rem; color: var(--ink-dim);
  background: none; border: none; padding: 0; opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}
.topnav__back:hover { opacity: 1; color: var(--ink); }

#history-view { background: var(--bg); min-height: 100vh; }
.history-content { padding: 0 2.5rem 2.5rem; }

.page-heading { margin-bottom: 2.5rem; }
.page-heading h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 350; text-transform: lowercase;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.1;
}
.history-toolbar {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 1rem; margin-bottom: 1.25rem; min-height: 2.5rem;
}

.session-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.session-table th {
  text-align: left; padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif); font-size: 1.05rem; font-weight: 400;
  letter-spacing: normal; text-transform: none; color: var(--heritage);
}
.session-table td {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  font-family: var(--body); font-size: 0.9375rem; font-weight: 300;
  color: var(--text-secondary); vertical-align: middle; overflow-wrap: break-word;
}
.session-table th:first-child,
.session-table td:first-child { padding-left: 0; width: 2.5rem; }
.session-table th:nth-child(2), .session-table td:nth-child(2) { width: 26%; }
.session-table th:nth-child(3), .session-table td:nth-child(3) { width: 22%; }
.session-table th:nth-child(4), .session-table td:nth-child(4) { width: 15%; }
.session-table th:nth-child(5), .session-table td:nth-child(5) { width: 13%; }
.session-table tbody tr { cursor: pointer; transition: background 0.1s; }
.session-table tbody tr:hover td { background: var(--row-hover); }
.session-table tbody tr:last-child td { border-bottom: none; }
.session-table .cell-name { color: var(--ink); font-weight: 400; }
.session-table .cell-sub  { font-size: 0.8125rem; color: var(--ink-dim); margin-top: 0.125rem; }
.session-table .cell-code {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.16em; color: var(--heritage);
}

/* Checkbox — the studio's shared control (.check-item / .check-box in the
   site's styles.css, as used on creative-collaborations.html): the real
   input is hidden and covers the label, with a 14px square that fills with
   heritage when checked. */
.check-item {
  display: inline-flex; align-items: center;
  position: relative; cursor: pointer; vertical-align: middle;
}
.check-item input[type="checkbox"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.check-box {
  width: 14px; height: 14px; border: 1px solid var(--rule);
  flex-shrink: 0; position: relative; transition: border-color 0.15s;
}
.check-item input[type="checkbox"]:checked + .check-box { border-color: var(--heritage); }
.check-item input[type="checkbox"]:checked + .check-box::after {
  content: ''; position: absolute; inset: 3px; background: var(--heritage);
}
.check-item input[type="checkbox"]:focus + .check-box {
  outline: 2px solid var(--heritage); outline-offset: 2px;
}

.btn-outline--danger {
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--error);
  background: none; border: 1px solid var(--error);
  padding: calc(0.6rem + 0.18em) 1.25rem calc(0.6rem - 0.18em);
  transition: background 0.2s, color 0.2s;
}
.btn-outline--danger:hover { background: var(--error); color: var(--on-ink); }

.history-content[data-mode="detail"] { max-width: 900px; }
.detail-title {
  font-family: var(--serif); font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 350; letter-spacing: -0.01em; color: var(--ink); line-height: 1.15;
}
.detail-code {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.16em; color: var(--gold);
  background: var(--ink); padding: 0.5rem 0.85rem; flex-shrink: 0;
}

.history-empty-state {
  font-family: var(--body); font-style: italic;
  color: var(--ink-dim); font-weight: 300;
}

@media (max-width: 800px) {
  .topnav { padding: 1.25rem 1.5rem; }
  .history-content { padding: 0 1.5rem 2.5rem; overflow-x: auto; }
  .session-table { min-width: 680px; }
}

/* ── Confirm / alert dialog ──
   Replaces the browser's native confirm()/alert(), which render in the OS
   style and ignore the brand entirely. Buttons follow canon's mono/uppercase
   treatment; destructive actions take terracotta. */
#app-dialog { background: rgba(18,16,13,0.45); }
.dialog-card:focus { outline: none; }
.dialog-card {
  background: var(--surface-0);
  border: 1px solid var(--border);
  padding: 2rem 2rem 1.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; gap: 1.75rem;
}
.dialog-message {
  font-family: var(--body); font-weight: 300;
  font-size: 1rem; line-height: 1.6; color: var(--ink);
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }
.btn-dialog {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--ink); color: var(--on-ink);
  border: 1px solid var(--ink); border-radius: 0;
  padding: calc(0.6rem + 0.18em) 1.25rem calc(0.6rem - 0.18em);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-dialog:hover { background: var(--heritage); border-color: var(--heritage); }
.btn-dialog--ghost { background: transparent; color: var(--ink); border-color: var(--border-mid); }
.btn-dialog--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-dialog--danger { background: var(--error); border-color: var(--error); color: var(--on-ink); }
.btn-dialog--danger:hover { background: transparent; color: var(--error); border-color: var(--error); }
.btn-dialog:focus-visible { outline: 2px solid var(--heritage); outline-offset: 2px; }

/* ── Custom select ──
   A native <select>'s dropdown is drawn by the OS and cannot be styled, so
   the list is rebuilt as markup. The <select> itself stays in the DOM as the
   source of truth — existing code still reads .value, toggles option.disabled
   and listens for 'change'. Modelled on the studio dashboard's .custom-select
   (logged-in-studio.html). */
.custom-select { position: relative; display: inline-block; width: 72px; }
.custom-select .rank-select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none;
}
.custom-select-trigger {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid rgba(18,16,13,0.12);
  background: var(--surface-0); color: var(--ink);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  text-align: center;
  transition: border-color 0.2s;
}
.custom-select-trigger:hover { border-color: var(--gold); }
.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus-visible { border-color: var(--gold); outline: none; }
.custom-select-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface-0);
  border: 1.5px solid var(--gold); border-top: none;
  max-height: 200px; overflow-y: auto;
  z-index: 30; display: none;
}
.custom-select-menu.active { display: block; }
.custom-select-option {
  padding: 7px 10px; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  text-align: center; color: var(--ink);
  transition: background 0.15s;
}
.custom-select-option:hover,
.custom-select-option.is-active { background: var(--surface-2); }
.custom-select-option.selected { background: var(--surface-3); }
.custom-select-option.disabled { opacity: 0.28; cursor: not-allowed; }

/* The Datum mark in the facilitator header doubles as a home button. */
#home-btn {
  border: none; padding: 0; background-color: transparent;
  cursor: pointer; opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}
#home-btn:hover { opacity: 1; transform: scale(1.06); }
#home-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Wordmark for light grounds — the participant welcome card. The entry
   screens' .auth-wordmark is the same lockup inverted for the heritage panel. */
.wordmark {
  font-family: var(--serif);
  font-weight: 250;
  font-size: 1.375rem;
  line-height: 1;
  text-transform: lowercase;
  color: var(--ink);
  display: inline-block;
}
.wordmark em { font-style: italic; color: var(--heritage); }
