:root {
  /* Official EO brand palette — from the EO Brand Guidelines (brand.eonetwork.org).
     The primary interactive color keeps the name --purple so the whole
     stylesheet re-themes from these few variables. */
  --purple: #3D46F2;        /* EO Blue (primary) — buttons, links, accents */
  --purple-dark: #0C0C31;   /* EO Base Blue (navy) — hovers, gradient end, headers */
  --purple-light: #ECEDFE;  /* light EO Blue tint — soft backgrounds */
  --ink: #0C0C31;           /* EO Base Blue body text */
  --muted: #5E617D;         /* EO Primary Gray */
  --line: #e4e5ee;
  --bg: #f4f5f9;
  --green: #1EA691;         /* EO Primary Green — success */
  --red: #dc2626;
  /* Full EO accent set (Primary Colors) for brand touches */
  --eo-blue: #3D46F2;
  --eo-pink: #FF346E;
  --eo-orange: #FA653C;
  --eo-gold: #EFB82E;
  --eo-teal: #1EA691;
  --eo-navy: #0C0C31;
  --eo-gray: #5E617D;
}
/* A thin multicolor bar echoing the EO logo ring, shown atop brand surfaces. */
.eo-accent-bar,
header.app::before,
.hero::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    var(--eo-blue) 0%, var(--eo-pink) 28%, var(--eo-orange) 52%,
    var(--eo-gold) 74%, var(--eo-teal) 100%);
}
header.app, .hero { position: relative; }
header.app::before, .hero::before {
  position: absolute; top: 0; left: 0; right: 0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Roboto', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 12px; }

/* Privacy reassurance shown just under the header on data-entry pages. */
.privacy-note {
  max-width: 1100px; margin: 10px auto 0; padding: 0 16px;
  text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--muted);
}
.privacy-note strong { color: var(--ink); font-weight: 600; }

header.app {
  background: var(--purple);
  color: #fff;
  padding: 7px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
header.app .brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
header.app .brand-logo { height: 30px; width: auto; display: block; flex-shrink: 0; }
header.app h1 { margin: 0; font-size: 18px; font-weight: 700; }
header.app h1 a { color: #fff; text-decoration: none; }
header.app .forum-name {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 11px;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
header.app .forum-name i { font-size: 11px; color: #d3d7fb; }
header.app .powered { font-size: 11px; color: #d3d7fb; white-space: nowrap; }
header.app .powered a { color: #fff; font-weight: 600; text-decoration: none; }
header.app .account { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #d3d7fb; }
header.app .header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
header.app .home-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,.28);
  transition: background .15s ease;
}
header.app .home-btn:hover { background: rgba(255,255,255,.26); }

.card {
  background: #fff; border-radius: 14px; padding: 16px;
  margin: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.card h2 {
  margin: 0 0 12px; font-size: 16px; font-weight: 600;
  position: relative;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  text-align: center;
  border-bottom: 1px solid var(--line); padding-bottom: 8px;
}
/* Title stays centered regardless of a leading icon or a trailing pill:
   pin the icon to the left edge and the pill to the right edge, out of flow. */
.card h2 > i:first-child,
.card h2 > .badge { position: absolute; top: calc(50% - 4px); transform: translateY(-50%); }
.card h2 > i:first-child { left: 0; }
.card h2 > .badge { right: 0; }
/* Headers whose right side is an action button keep the title-left / button-right split. */
.card h2:has(button) { justify-content: space-between; text-align: left; }
.badge {
  background: var(--purple-light); color: var(--purple);
  font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
}

label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; font-size: 16px; /* 16px prevents iOS zoom */
  font-family: inherit; color: var(--ink);
  border: 1px solid #d1d5db; border-radius: 10px;
  padding: 11px 12px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple); border-color: var(--purple); }
textarea { min-height: 80px; resize: vertical; }

button {
  font-family: inherit; font-size: 15px; font-weight: 600;
  border: none; border-radius: 10px; padding: 12px 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:active, .btn-primary:hover { background: var(--purple-dark); }
.btn-secondary { background: #e5e7eb; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--purple); padding: 8px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { font-size: 13px; padding: 8px 12px; }
.btn-white { background: #fff; color: var(--purple); }
button:disabled { opacity: .5; }

.notice { border-radius: 10px; padding: 12px; font-size: 14px; margin-top: 10px; }
.notice.ok { background: #ecfdf5; color: #065f46; }
.notice.err { background: #fef2f2; color: #991b1b; }
.notice.info { background: #eef2ff; color: #3730a3; }
.hidden { display: none !important; }

.modal {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(31,41,55,.55); align-items: flex-end; justify-content: center;
}
.modal.open { display: flex; }
.modal-content {
  background: #fff; width: 100%; max-width: 460px;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto;
}
@media (min-width: 700px) {
  .modal { align-items: center; }
  .modal-content { border-radius: 18px; }
}
.modal-content h3 { margin: 0 0 12px; font-size: 17px; }
.btnrow { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btnrow button { flex: 1; min-width: 120px; }

footer.app {
  text-align: center; color: var(--muted); font-size: 12.5px;
  padding: 24px 16px 32px;
}
footer.app a { color: var(--purple); font-weight: 600; text-decoration: none; }

/* toast */
#toast {
  visibility: hidden; min-width: 250px; max-width: 90vw;
  background: var(--purple); color: #fff; text-align: center;
  border-radius: 50px; padding: 14px 20px; position: fixed; z-index: 1000;
  left: 50%; transform: translateX(-50%); bottom: 30px; font-size: 14.5px;
  box-shadow: 0 4px 10px rgba(0,0,0,.3); opacity: 0; transition: opacity .4s, bottom .4s;
}
#toast.show { visibility: visible; opacity: 1; bottom: 46px; }

/* ---- hub page ---- */
.hero {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff; padding: 20px 170px 20px 40px;
  display: flex; align-items: center; justify-content: flex-start; gap: 18px; flex-wrap: wrap;
}
/* Narrower screens don't need the wide right gutter — content is left-aligned
   and clears the corner pills on its own. */
@media (max-width: 860px) {
  .hero { padding: 20px 16px 22px; }
}
.hero-text { text-align: left; }
.hero h1 { margin: 0 0 4px; font-size: 25px; font-weight: 700; }
.hero p { margin: 0; max-width: 560px; color: #d3d7fb; font-size: 14px; line-height: 1.5; }
@media (max-width: 620px) {
  .hero { flex-direction: column; align-items: center; gap: 6px; padding: 16px 14px 20px; }
  .hero-text { text-align: center; }
}
.hero .brand-logo { height: 58px; width: auto; display: block; margin: 0; }
.hero h1 { margin: 0 0 10px; font-size: 32px; font-weight: 700; letter-spacing: -.5px; }
.hero p { margin: 0 auto; max-width: 620px; color: #d3d7fb; font-size: 15.5px; line-height: 1.6; }
.hero .powered { display: inline-block; margin-top: 14px; font-size: 12.5px; color: #d3d7fb; }
.hero .powered a { color: #fff; font-weight: 600; text-decoration: none; }
.hero-mod { position: absolute; top: 12px; right: 14px; margin: 0 !important; z-index: 2; }
.hero-mod a {
  display: inline-block; color: #fff; font-weight: 600; font-size: 13px; text-decoration: none;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  padding: 5px 13px; border-radius: 999px;
}
.hero-mod a:hover { background: rgba(255,255,255,.22); }
.hero-lang { position: absolute; top: 46px; right: 14px; margin: 0 !important; z-index: 2; }
.hero-lang a {
  display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; font-size: 13px; text-decoration: none;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  padding: 4px 12px; border-radius: 999px;
}
.hero-lang a:hover { background: rgba(255,255,255,.22); }
.hero-lang .flag { font-size: 15px; line-height: 1; }
/* Mobile: logo sits top-left in the same band as the corner pills — no wasted gap.
   (Placed after the base hero rules so these values win.) */
@media (max-width: 620px) {
  .hero .brand-logo { height: 46px; align-self: flex-start; margin: 6px 0 14px; }
  .hero-mod { top: 14px; }
  .hero-lang { top: 50px; }
}
/* Tools are a full-width list — one row per tool (icon · title · preview · CTA). */
.resources { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 22px; }
.hub-section { font-size: 20px; font-weight: 700; color: var(--purple-dark); margin: 30px 4px 0; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.hub-section:first-child { margin-top: 14px; }
.hub-section .hub-section-sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.resource {
  background: #fff; border-radius: 12px; padding: 13px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--ink); border: 1px solid var(--line);
}
a.resource:hover { border-color: var(--purple); background: var(--purple-light); }
.resource .icon { font-size: 18px; color: var(--purple); width: 24px; text-align: center; flex: none; }
.resource h3 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; flex: none; }
.resource p {
  margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4;
  flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.resource .cta { color: var(--purple); font-weight: 600; font-size: 13.5px; white-space: nowrap; flex: none; }
.resource.soon { opacity: .7; }
.resource.soon .cta { color: var(--muted); font-weight: 500; }
/* No-login tools — EO teal accent + reassurance pill */
.resource.free { border-left: 3px solid var(--eo-teal); }
.resource.free .icon { color: var(--eo-teal); }
.resource.free .cta { color: var(--eo-teal); }
a.resource.free:hover { border-color: var(--eo-teal); background: #e9f7f4; }
.resource .pill {
  flex: none; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .2px;
  text-transform: uppercase; padding: 4px 9px; border-radius: 999px; white-space: nowrap;
  background: rgba(30,166,145,.14); color: #0f6f60;
}
/* Login-required tools (any signed-in member) — EO orange accent + sign-in pill */
.resource.login { border-left: 3px solid var(--eo-orange); }
.resource.login .icon { color: var(--eo-orange); }
.resource.login .cta { color: var(--eo-orange); }
a.resource.login:hover { border-color: var(--eo-orange); background: #fff1ec; }
.resource .pill.login { background: rgba(250,101,60,.14); color: #b83c17; }
/* Moderator-only tools — EO blue accent + lock pill */
.resource.locked { border-left: 3px solid var(--purple); }
.resource .pill.lock { background: var(--purple-light); color: var(--purple); }
@media (max-width: 640px) {
  /* Two-row tile: icon spans both rows, full title on top, badge underneath. */
  .resource {
    display: grid; align-items: center;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "icon title cta"
      "icon pill  cta";
    column-gap: 12px; row-gap: 5px; padding: 12px 14px;
  }
  .resource .icon { grid-area: icon; }
  .resource h3 { grid-area: title; flex: none; white-space: normal; align-self: end; }
  .resource p { display: none; }                 /* phones: icon + title + badge + arrow only */
  .resource .pill { grid-area: pill; justify-self: start; align-self: start; }
  .resource .cta { grid-area: cta; font-size: 0; }   /* hide the verbose CTA text… */
  .resource .cta::after { content: '\203A'; font-size: 22px; line-height: 1; }  /* …show a chevron */
}

/* ---- update sheet grid ---- */
.grid-wrapper {
  display: grid;
  grid-template-columns: 170px 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.grid-header {
  background: var(--purple); color: #fff; font-weight: 600;
  padding: 10px; text-align: center; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  letter-spacing: .5px;
}
.row-label {
  background: var(--purple-light); color: var(--purple);
  padding: 10px; font-size: 13.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; border-radius: 10px;
}
.row-label .hint { font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.input-cell { display: flex; flex-direction: column; }
.placeholder-hint { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-style: italic; }
.mobile-category-header { display: none; }
.desktop-hint { display: none; }

/* "Build your 5%" links under each dimension column (not part of the PDF/print) */
.btn-5pct {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 10px; border-radius: 8px; text-align: center; line-height: 1.2;
  background: rgba(30,166,145,.12); color: #0f6f60; border: 1px solid rgba(30,166,145,.35);
  font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.btn-5pct:hover { background: rgba(30,166,145,.2); }
@media print { .no-print { display: none !important; } }

.bottom-section { margin-bottom: 16px; }
.bottom-section h3 { color: var(--purple); margin: 0 0 4px; font-size: 16px; }
.bottom-section .sub { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

.controls {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 26px 0 10px;
}

@media (max-width: 768px) {
  .grid-wrapper { display: block; }
  .grid-header { display: none; }
  .row-label { display: none; }
  .mobile-category-header {
    display: block; background: var(--purple); color: #fff;
    padding: 10px; margin-top: 20px; text-align: center; font-weight: 600;
    border-radius: 10px 10px 0 0; letter-spacing: .5px;
  }
  .input-cell {
    background: #fff; border: 1px solid var(--line); border-top: none;
    padding: 10px; margin-bottom: 0;
  }
  .placeholder-hint { font-style: normal; font-weight: 600; color: var(--purple); }
}
@media (min-width: 769px) {
  .placeholder-hint.mobile-only { display: none; }
}

/* history panel */
.history-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; margin-top: 8px; font-size: 14px;
  background: var(--purple-light);
}
.history-item .meta { color: var(--muted); font-size: 12.5px; }
.history-item .acts { display: flex; gap: 6px; flex-shrink: 0; }

/* ---- 5% reflections wizard ---- */
.steps { display: flex; gap: 6px; margin: 14px 0 2px; }
.step-dot {
  flex: 1; text-align: center; font-size: 12px; color: var(--muted);
  padding: 8px 4px; border-radius: 10px; background: #e9e5f2;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.step-dot span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #d5cce8; color: var(--purple-dark); font-weight: 700; font-size: 12px;
}
.step-dot.active { background: var(--purple); color: #d3d7fb; }
.step-dot.active span { background: #fff; color: var(--purple); }
.step-dot.done { background: var(--purple-light); color: var(--purple); }
.step-dot.done span { background: var(--purple); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.chip {
  background: #fff; border: 1.5px solid #d1d5db; color: var(--ink);
  font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 999px;
}
.chip.on { background: var(--purple); border-color: var(--purple); color: #fff; font-weight: 600; }

.why-level { margin-top: 4px; }
.why-label { font-weight: 600; color: var(--purple); font-size: 14px; }
#whyL2 { margin-left: 14px; border-left: 3px solid var(--purple-light); padding-left: 12px; }
#whyL3 { margin-left: 28px; border-left: 3px solid var(--purple); padding-left: 12px; }

pre.reflection {
  white-space: pre-wrap; background: var(--purple-light); border-radius: 10px;
  padding: 14px; font-size: 13.5px; font-family: inherit; line-height: 1.55;
}

/* ---- parking lot quadrants ---- */
.quad-axis-top { text-align: center; font-size: 11.5px; letter-spacing: 1px; color: var(--muted); margin: 14px 0 4px; }
.quadrants { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quad { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow: hidden; display: flex; flex-direction: column; }
.quad-head {
  background: var(--purple-light); color: var(--purple);
  font-size: 12.5px; font-weight: 600; padding: 8px 12px;
}
.quad.q2 { border: 2px solid var(--purple); }
.quad.q2 .quad-head { background: var(--purple); color: #fff; }
.quad-sub { font-weight: 400; opacity: .85; float: right; }
.quad-body { padding: 10px; flex: 1; min-height: 90px; }
.quad-empty { color: #c3c8d1; font-size: 13px; text-align: center; padding: 24px 0; }
.topic { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.topic.promoted { background: var(--purple-light); outline: 1.5px solid var(--purple); }
.topic-title { font-size: 14px; font-weight: 600; }
.topic-notes { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topic-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.topic-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.topic-acts select { width: auto; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; }
.topic-acts .btn-sm { font-size: 12px; padding: 6px 10px; }
.tag-owner { font-size: 10.5px; font-weight: 600; color: var(--purple); background: var(--purple-light); border-radius: 999px; padding: 1px 8px; }
.forum-switch {
  font-size: 17px; font-weight: 600; color: var(--ink);
  border: none; background: transparent; padding: 4px 26px 4px 0; width: auto; max-width: 100%;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233D46F2' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center;
}
.forum-switch:focus { outline: 2px solid var(--purple); border-radius: 8px; }
@media (max-width: 640px) { .quadrants { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr !important; } }

/* ---- agenda runner ---- */
.runner {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff; border-radius: 16px; padding: 26px 18px; margin: 12px 0;
  text-align: center;
}
.runner-segment { font-size: 22px; font-weight: 700; }
.runner-clock {
  font-size: 84px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.runner-clock.warn { color: #ffd66e; }
.runner-clock.over { color: #ff8d8d; }
.runner-sub { min-height: 20px; font-size: 14px; color: #d3d7fb; font-weight: 600; }
.runner-next { font-size: 13.5px; color: #d3d7fb; margin-top: 4px; }
.runner-launch {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
  background: #fff; color: var(--purple); font-weight: 700; font-size: 14px;
  text-decoration: none; padding: 8px 16px; border-radius: 999px;
}
.runner-launch:hover { filter: brightness(.95); }
.runner .btn-secondary { background: rgba(255,255,255,.16); color: #fff; }
.runner .btn-primary { background: #fff; color: var(--purple); }
.runner input[type="checkbox"] { accent-color: #fff; }
@media (max-width: 520px) { .runner-clock { font-size: 60px; } }

.seg-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border-radius: 10px; margin-top: 6px; background: var(--bg);
}
.seg-row.now { background: var(--purple-light); outline: 1.5px solid var(--purple); }
.seg-row.past { opacity: .55; }
/* Wall-clock highlight (agenda open during the meeting): past red, current green, future grey */
.seg-row.clock-past { background: #FDECEC; }
.seg-row.clock-now { background: #E4F5F1; outline: 1.5px solid var(--green); }
.seg-contingency { background: transparent; border: 1px dashed var(--line); }
.seg-contingency .seg-name { color: var(--muted); font-style: italic; }
.seg-contingency .seg-min { color: var(--muted); background: transparent; }
.seg-overrun { border-color: var(--red); }
.seg-overrun .seg-name, .seg-overrun .seg-hint { color: var(--red); font-style: normal; }
.seg-overrun .seg-min { color: var(--red); }
/* Meal / social line — a trailing, uncounted "after the meeting" row */
.seg-meal { background: transparent; border: 1px dashed var(--line); }
.seg-meal .seg-name { color: var(--muted); font-style: italic; }
.seg-meal .seg-min { color: var(--muted); background: transparent; }
.seg-meal .seg-status { font-style: normal; }
/* Red, prominent "Restore defaults" */
.btn-ghost.ag-danger { color: var(--red); }
.btn-ghost.ag-danger:hover { background: rgba(220, 38, 38, .08); }
.seg-status { width: 18px; text-align: center; color: var(--purple); font-weight: 700; }
.seg-name { flex: 2; min-width: 0; border: none; background: transparent; font-weight: 600; font-size: 14px; padding: 6px; }
.seg-name:focus, .seg-min:focus { outline: 1px solid var(--purple); border-radius: 6px; }
.seg-min { width: 58px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; padding: 5px 6px; text-align: right; }
.seg-minlbl { font-size: 12px; color: var(--muted); }
.seg-hint { flex: 1.5; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-rec {
  border: none; background: transparent; cursor: pointer; font-size: 14px;
  padding: 2px 4px; line-height: 1; opacity: .35; -webkit-tap-highlight-color: transparent;
}
.seg-rec:hover { opacity: .7; }
.seg-name-link { flex: 2; min-width: 0; font-weight: 600; font-size: 14px; padding: 6px; color: var(--purple); text-decoration: underline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-name-link:hover { color: var(--purple-dark); }
.seg-start {
  font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700;
  color: var(--purple); min-width: 58px; text-align: right; flex-shrink: 0;
}
.seg-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: 4px 0 10px; }
.seg-starttime { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.seg-controls .seg-starttime { margin: 0; }
.seg-starttime label { margin: 0; font-size: 13px; color: var(--muted); }
.seg-starttime input { width: auto; max-width: 140px; }
.seg-starttime input[type="text"] { max-width: 200px; }
.seg-loc, .seg-meal-ctl { flex: 1 1 auto; }
.seg-loc input[type="text"], .seg-meal-ctl input[type="text"] { flex: 1; max-width: 320px; }
.seg-grip { cursor: grab; color: var(--muted); padding: 0 2px; font-size: 13px; line-height: 1; flex-shrink: 0; }
.seg-grip:active { cursor: grabbing; }
.seg-row.drop-target { outline: 2px dashed var(--purple); outline-offset: -2px; }

/* Agenda read-only — a signed-in member views the moderator's agenda but can't edit it.
   Hide the edit-only controls and the prep/attendance chrome; neutralise every field. */
body.ag-readonly #modeCard,
body.ag-readonly #attendanceCard,
body.ag-readonly #rateCard,
body.ag-readonly .ag-edit-only,
body.ag-readonly .toggle-att,
body.ag-readonly #templateCard p { display: none !important; }
body.ag-readonly input:not([type=checkbox]),
body.ag-readonly select,
body.ag-readonly textarea {
  pointer-events: none; background: #f3f4f8 !important;
  color: var(--muted) !important; border-color: var(--line) !important;
}
#roBanner { background: #FFF4EF; border: 1px solid #FCD9C9; }

/* Deep Dive topic pickers */
.dd-select { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 14px; }
.dd-field { flex: 1 1 240px; min-width: 200px; }
.dd-field label { margin: 0 0 4px; }
.dd-field select, .dd-field input { width: 100%; }
.dd-field input { margin-top: 6px; }

/* Saved-template chips */
.chip-custom { display: inline-flex; align-items: center; gap: 6px; }
.chip-custom .chip-x { opacity: .55; font-size: 12px; padding: 0 2px; border-radius: 999px; }
.chip-custom .chip-x:hover { opacity: 1; }
.seg-rec.off { opacity: 1; filter: none; }            /* overridden — clock is a live "reset" control */
.seg-rec.off::after { content: '↺'; font-size: 11px; color: var(--purple); margin-left: 1px; vertical-align: super; }
.seg-rec:disabled { opacity: .2; cursor: default; }
.budget-note { font-size: 12.5px; font-weight: 600; margin: 0 0 10px; }
.budget-note.ok { color: var(--green); }
.budget-note.over { color: var(--red); }
.budget-note.under { color: var(--muted); }
@media (max-width: 640px) { .seg-hint { display: none; } }

/* ---- norms builder ---- */
.norm-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--ink); margin: 8px 0; line-height: 1.5;
}
.norm-row input { width: auto; margin-top: 3px; accent-color: var(--purple); }
.agreement { border: 2px solid var(--purple); }
.ag-head { text-align: center; border-bottom: 3px solid var(--purple); padding-bottom: 12px; margin-bottom: 14px; }
.ag-title { font-size: 22px; font-weight: 700; color: var(--purple); }
.ag-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ag-intro { font-size: 14px; line-height: 1.6; }
.agreement h3 { color: var(--purple); font-size: 15.5px; margin: 18px 0 6px; }
.agreement ul { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.7; }
.ag-foot { font-size: 11.5px; color: var(--muted); margin-top: 22px; text-align: center; }
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 18px; margin-top: 18px; }
.sig-block { font-size: 13px; }
.sig-line { border-bottom: 1.5px solid var(--ink); height: 26px; }
.sig-name { font-weight: 600; margin-top: 4px; }
.sig-date { color: var(--muted); font-size: 11.5px; }
@media print {
  body.norms-page .agreement { border: none; }
  body.norms-page .card:not(.agreement) { display: none !important; }
}

/* ---- one-word board ---- */
.oneword-phase h3 { color: var(--purple); font-size: 15px; margin: 12px 0 6px; }
.word-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.word-chip {
  background: var(--purple-light); color: var(--purple-dark);
  font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.word-chip em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.word-chip button {
  background: none; border: none; color: var(--muted); font-size: 15px;
  padding: 0 2px; cursor: pointer; line-height: 1;
}
.word-chip button:hover { color: var(--red); }

/* ---- cloud sync card ---- */
.cloud-card .cloud-row { display: flex; gap: 8px; align-items: center; }
.cloud-card .cloud-row input { flex: 1; }
.cloud-status { color: var(--muted); }
.cloud-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; word-break: break-all;
  background: var(--purple-light); color: var(--purple-dark);
  border-radius: 10px; padding: 10px 12px; user-select: all;
}

/* ---- Deep Dive parking-lot line items ---- */
.dd-list { display: flex; flex-direction: column; gap: 8px; }
.dd-row { display: flex; align-items: center; gap: 8px; }
.dd-row .dd-text { flex: 1 1 auto; min-width: 0; }
.dd-row .dd-urgency { flex: 0 0 auto; width: auto; min-width: 140px; }
.dd-row .dd-think, .dd-row .dd-del {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  font-size: 17px; line-height: 1; padding: 8px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.dd-row .dd-think { color: var(--purple); }
.dd-row .dd-think:hover { background: var(--purple-light); }
.dd-row .dd-del { color: var(--red); }
.dd-row .dd-del:hover { background: rgba(220, 38, 38, .08); }
.dd-add { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; width: auto; }
@media (max-width: 560px) {
  .dd-row { flex-wrap: wrap; }
  .dd-row .dd-text { flex-basis: 100%; }
  .dd-row .dd-urgency { flex: 1 1 auto; min-width: 0; }
}

/* ---- online-account card ---- */
.acct-h { color: var(--purple); margin: 0 0 6px; font-size: 16px; }
.acct-signin { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.acct-signin #authEmail { flex: 1 1 220px; }
.acct-signin .btn-primary { flex: 0 0 auto; width: auto; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.acct-actions button { width: auto; }

/* ---- saved-update history ---- */
.history-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 8px;
}
.history-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-meta strong { font-size: 14px; color: var(--ink); }
.history-name { font-size: 12.5px; color: var(--muted); }
.history-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.history-acts .btn-sm { font-size: 12px; padding: 6px 10px; }

/* ---- forum roster + attendance ---- */
.roster-list { display: flex; flex-wrap: wrap; gap: 8px; }
.roster-chip {
  background: var(--purple-light); color: var(--purple-dark);
  font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.roster-chip button {
  background: none; border: none; color: var(--muted); font-size: 16px;
  padding: 0 2px; cursor: pointer; line-height: 1;
}
.roster-chip button:hover { color: var(--red); }

#attList { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.attendee-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 11px; border-radius: 10px; background: var(--bg);
  flex: 0 1 auto;
}
.attendee-row .who { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.attendee-row.absent { opacity: .6; }
.attendee-row.absent .who { text-decoration: line-through; }
.toggle-att { min-width: 0; padding: 5px 10px; font-size: 12px; }

/* prominent "whose turn" name on the ice-breaker card */
.opener-name { margin-top: 14px; font-size: 30px; font-weight: 700; color: #fff; line-height: 1.15; min-height: 34px; }
.opener-name .of { display: block; font-size: 13px; font-weight: 600; color: #d3d7fb; margin-top: 4px; letter-spacing: .3px; }
@media (max-width: 560px) { .opener-name { font-size: 24px; } }

/* one-word "next up" banner */
.ow-nextup {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--purple-light); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
}
.ow-nextup .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.ow-nextup .nm { font-size: 18px; font-weight: 700; color: var(--purple); }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.stat { background: #fff; border-radius: 12px; padding: 12px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat .n { font-size: 22px; font-weight: 700; color: var(--purple); }
.stat .l { font-size: 11.5px; color: var(--muted); }
table.adm { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border-radius: 12px; overflow: hidden; }
table.adm th { background: var(--purple-light); color: var(--purple); text-align: left; padding: 9px 8px; font-size: 12px; }
table.adm td { padding: 9px 8px; border-bottom: 1px solid var(--bg); vertical-align: top; }
.scroll-x { overflow-x: auto; }

/* ---- document-style print view ----
   Pages build a plain #printView (markdown-like: headings + text) and print that,
   never the GUI form. */
#printView { display: none; }
@media print {
  body.print-doc > *:not(#printView) { display: none !important; }
  body.print-doc { background: #fff; padding: 0; }
  body.print-doc #printView { display: block !important; }
}
#printView { color: #111; font-size: 12.5pt; line-height: 1.55; }
#printView h1 { font-size: 19pt; margin: 0 0 2px; color: #111; }
#printView .doc-meta { color: #555; font-size: 10.5pt; margin: 0 0 18px; }
#printView h2 {
  font-size: 14pt; margin: 18px 0 6px; padding-bottom: 3px;
  border-bottom: 2px solid var(--purple); color: #111; display: block;
}
#printView h3 { font-size: 11.5pt; margin: 10px 0 2px; color: #444; }
#printView p { margin: 0 0 6px; white-space: pre-wrap; }
#printView p.empty { color: #999; }
#printView .doc-foot { margin-top: 24px; font-size: 9.5pt; color: #777; }
#printView h2, #printView h3 { break-after: avoid; }

/* ---- opening questions ---- */
.opener {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff; border-radius: 16px; padding: 28px 22px 22px;
  margin: 12px 0; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.opener-cat {
  display: inline-block; background: rgba(255,255,255,.16); color: #fff;
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
  padding: 4px 14px; border-radius: 999px; text-transform: uppercase;
}
.opener-desc { color: #d3d7fb; font-size: 13.5px; margin: 10px 0 0; }
.opener-q {
  font-size: 26px; font-weight: 700; line-height: 1.35;
  margin: 16px auto 22px; max-width: 640px; min-height: 84px;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 560px) { .opener-q { font-size: 21px; } }

.opener-timer { display: inline-flex; gap: 6px; align-items: center; }
.opener-timer select { width: auto; padding: 9px 10px; font-size: 14px; }
.btn-success { background: var(--green); color: #fff; }
.opener-timerbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 4px; }
.opener-timerbar select { width: auto; padding: 9px 10px; font-size: 14px; }
.opener-att { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; font-weight: 600; }
.opener-att input { width: 66px; text-align: center; padding: 9px 8px; font-size: 14px; }
.opener-person { margin-top: 14px; font-size: 15px; font-weight: 700; color: #fff; min-height: 20px; letter-spacing: .3px; }
#opNextBtn:disabled { opacity: .45; }
.opener-qlist { display: flex; flex-direction: column; gap: 6px; }
.opener-qrow {
  text-align: left; width: 100%; background: var(--bg);
  border: 1px solid transparent; border-radius: 10px;
  padding: 11px 13px; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer;
}
.opener-qrow:hover { border-color: var(--purple); }
.opener-qrow.on { background: var(--purple-light); border-color: var(--purple); color: var(--purple-dark); font-weight: 600; }
