/* ============================================================================
   TLN design system — Technology Leaders Network
   ----------------------------------------------------------------------------
   The fifth look this file has carried (glass -> flat replica -> warm
   monochrome -> flat navy/blue replica -> this). Taken from the "Command
   Center" concept screenshots (TLN_UI_SS): a near-black ground, dark indigo
   cards with a hairline border, and one violet->blue gradient for every
   "do this" and "you are here" — Home's hero banner, Feed's Post/RSVP
   buttons, Members' Connect buttons and active filter chip all sample the
   same two colours.

     ground        #05060c   page background
     surface       #11152a   card / sidebar / topbar panels
     sunk          #171b35   hover rows, inset panels
     violet        #8b5cf6   gradient start — Create, active states
     blue          #4f7cff   gradient end — links, focus rings
     ink           #f4f5fb   headings or near-white
     body/muted/faint        the ink stepped down for copy, meta, timestamps

   Structure unchanged: Tailwind still does layout and spacing; every surface,
   control and type role comes from here. The whole look is swappable from
   this one file — the shell markup in base.html never changed between looks.
   ========================================================================= */

:root {
  /* ── Ground and surfaces ─────────────────────────────────────────────── */
  --ctl-ground:       #05060d;
  --ctl-surface:      #11152a;
  --ctl-sunk:         #171c38;
  --ctl-tint:         rgba(139,92,246,0.14);   /* active nav, selected rows */

  /* ── Lines ───────────────────────────────────────────────────────────── */
  --ctl-border:       rgba(255,255,255,0.09);
  --ctl-border-soft:  rgba(255,255,255,0.06);
  --ctl-rule:         rgba(255,255,255,0.07);
  --ctl-divider:      rgba(255,255,255,0.07);

  /* ── Ink: near-white, stepped down ────────────────────────────────────── */
  --ctl-ink:          #f4f5fb;
  --ctl-body:         #c7cbe0;
  --ctl-muted:        #9ba0c2;
  --ctl-faint:        #868cad;   /* ~4.6:1 on --ctl-surface */

  /* ── Action: the concept's violet → blue gradient ─────────────────────── */
  --ctl-action:       #7c6bf0;
  --ctl-action-hover: #6a58e8;
  --ctl-blue:         #7c6bf0;
  --ctl-blue-hover:   #6a58e8;
  --ctl-blue-soft:    rgba(124,107,240,0.16);   /* selected pill, prompt chips */
  --ctl-gradient:     linear-gradient(135deg, #8b5cf6 0%, #6d5ef8 45%, #4f7cff 100%);

  /* ── The bar ─────────────────────────────────────────────────────────── */
  --ctl-bar:          #05060d;
  --ctl-bar-ink:      #ffffff;
  --ctl-bar-muted:    rgba(255,255,255,0.68);
  --ctl-bar-hover:    rgba(255,255,255,0.08);
  --ctl-bar-line:     rgba(255,255,255,0.10);

  /* Brand mark colours, for the logo partial and nothing else. */
  --tln-navy:         #0b1f3a;
  --tln-blue:         #4f7cff;
  --tln-cyan:         #22d3ee;
  --tln-amber:        #f5b942;
  --tln-slate:        #9ba0c2;

  /* Unread markers. */
  --ctl-red:          #fb5a6a;
  --ctl-accent:       #7c6bf0;

  /* Legacy token names kept alive because inline `style=` uses in the
     templates reference them. Remapping here rather than editing the markup is
     the whole reason a restyle costs one file. */
  --ctl-frame:        #05060d;
  --ctl-navy:         #05060d;
  --ctl-violet:       #8b5cf6;
  --ctl-purple:       #a855f7;
  --ctl-lavender:     #ecdcfb;   /* kept LIGHT on purpose: the "Public"/"Leader"
                                    pills pair it with a dark hardcoded text
                                    colour in the templates, so it must stay a
                                    light chip regardless of the app's theme. */
  --ctl-chip:         rgba(255,255,255,0.06);
  --ctl-sidebar:      #0a0d1c;

  /* ── Semantic ────────────────────────────────────────────────────────── */
  --ctl-good:         #4ade80;
  --ctl-good-bg:      rgba(74,222,128,0.14);
  --ctl-warn:         #fbbf24;
  --ctl-warn-bg:      rgba(251,191,36,0.14);
  --ctl-bad:          #fb7185;
  --ctl-bad-bg:       rgba(251,113,133,0.14);
  --ctl-info:         #7c6bf0;
  --ctl-info-bg:      rgba(124,107,240,0.16);

  /* ── Geometry ────────────────────────────────────────────────────────── */
  --ctl-radius:       14px;
  --ctl-radius-sm:    11px;
  --ctl-radius-xs:    9px;
  --ctl-topbar-h:     64px;
  --ctl-sidebar-w:    264px;

  /* Dark cards read as raised through a soft shadow and a hairline border,
     never a light "paper" shadow; overlays get a deeper, cooler one. The
     inset highlight is a glass top-edge catching light — the same trick a
     premium dark UI (a OS window, a modern editor) uses to read as a pane
     rather than a flat rectangle painted on the ground. */
  --ctl-shadow-card:  0 1px 0 rgba(255,255,255,0.06) inset,
                      0 14px 32px -18px rgba(0,0,0,0.75);
  --ctl-shadow-pop:   0 1px 0 rgba(255,255,255,0.08) inset,
                      0 28px 56px -18px rgba(0,0,0,0.8);

  --ctl-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
              Roboto, Helvetica, Arial, sans-serif;
}

/* ── The logo (_partials/wordmark.html) ──────────────────────────────────── */
.tln-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--tln-navy);
}
.tln-logo-dark { color: #ffffff; }
/* The artwork's monogram is 2.3:1, so it reads at the same height the old
   drawn mark used; the tone lives in which file the partial picks. */
.tln-mark { height: 30px; width: auto; flex-shrink: 0; display: block; }
.tln-logo-rule {
  width: 1.5px; align-self: stretch; margin: 3px 0;
  background: var(--tln-slate);
}
.tln-logo-dark .tln-logo-rule { background: rgba(255,255,255,0.35); }
.tln-logo-name {
  max-width: 8.9em;               /* "Technology / Leaders Network", as drawn */
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.tln-logo-lg { gap: 18px; }
.tln-logo-lg .tln-mark { height: 46px; }
.tln-logo-lg .tln-logo-name { font-size: 17px; }

/* ── Base ─────────────────────────────────────────────────────────────────── */
/* Dark, to match the meta tag in _partials/head.html. Without it a light-mode
   browser gives unclassed form controls a light UA fill under our near-white
   text — typed input becomes invisible. */
:root { color-scheme: dark; }
html { background: var(--ctl-ground); }

/* A faint depth field behind every page: two soft glows pinned to the
   viewport (fixed, so they never scroll with the content and never repaint
   per-page) plus a barely-there dot grid for texture. This is what keeps a
   near-black ground from reading as an empty void the way a flat #05060d
   fill does — every TLN_UI_SS screen has it, just subtle enough to never
   fight the content sitting on top. */
body {
  font-family: var(--ctl-font);
  font-size: 16px;
  line-height: 1.7;              /* sampled: 16/27.2 */
  color: var(--ctl-body);
  background: var(--ctl-ground);
  background-image:
    radial-gradient(60rem 36rem at 12% -10%, rgba(139,92,246,0.10), transparent 60%),
    radial-gradient(50rem 34rem at 110% 10%, rgba(79,124,255,0.09), transparent 60%),
    radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px;
  background-position: 0 0, 0 0, 0 0;
  background-attachment: fixed, fixed, fixed;
  background-repeat: no-repeat, no-repeat, repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A soft lift + violet glow on hover rather than the flat-theme's "whisper of
   lift" — this is the dark system's equivalent affordance for "this is
   clickable", used by card-interactive, tool tiles and the workspace cards. */
.ctl-glow-hover { transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.ctl-glow-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 16px 32px -16px rgba(79,70,229,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* Gradient text for a page's one accent word — "Discover & Connect",
   "Members" — never the whole headline, so it reads as emphasis and not a
   novelty font. */
.ctl-grad-text {
  background: linear-gradient(90deg, #bda9ff, #8fb3ff 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* No-op shims kept so templates need no sweep. Do not build on these. */
.ctl-ground { display: none; }
.ctl-sheen  { position: relative; }
.ctl-rise   { animation: none; }
.ctl-glass, .ctl-glass-dark { background: var(--ctl-surface); }

/* ── App frame ────────────────────────────────────────────────────────────── */
/* Navy bar across the top, white sidebar under it, cool ground behind the
   content so white cards read as raised. */
.ctl-app {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--ctl-topbar-h));
}

.ctl-topbar {
  position: relative;
  height: var(--ctl-topbar-h);
  /* Same colour as --ctl-bar, just translucent, with a blur behind it — the
     sticky bar reads as a pane of glass over the content scrolling under it
     rather than a flat opaque strip. No hue changes, only how solid it is. */
  background: rgba(5,6,13,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--ctl-bar-ink);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--ctl-border-soft);
}
/* A hairline gradient under the bar — the one place the brand gradient runs
   edge-to-edge, so every page opens on it rather than only the hero cards. */
.ctl-topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(139,92,246,0.55), rgba(79,124,255,0.35) 50%, transparent 90%);
}

.ctl-logo-tile {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 0.25rem;
}

/* Search: a translucent field on the navy bar. */
.ctl-topbar-search {
  width: 100%;
  height: 40px;
  font-size: 14px;
  color: var(--ctl-bar-ink);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--ctl-bar-line);
  border-radius: var(--ctl-radius-sm);
  padding: 0 0.875rem 0 2.375rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.ctl-topbar-search::placeholder { color: var(--ctl-bar-muted); }
.ctl-topbar-search:focus {
  outline: none;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 3px rgba(61,139,255,0.35);
}
.ctl-topbar-search-icon { color: var(--ctl-bar-muted); }

.ctl-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px; height: 40px;
  border-radius: var(--ctl-radius-sm);
  color: var(--ctl-bar-muted);
  transition: background 140ms ease, color 140ms ease;
}
.ctl-topbar-icon:hover { background: var(--ctl-bar-hover); color: var(--ctl-bar-ink); }

/* The account button on the bar. */
.ctl-topbar-profile {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: var(--ctl-radius-sm);
  color: var(--ctl-bar-ink);
  transition: background 140ms ease;
}
.ctl-topbar-profile:hover { background: var(--ctl-bar-hover); }
.ctl-topbar-profile .ctl-avatar { border-color: rgba(255,255,255,0.25); }
.ctl-topbar-profile-sub { color: var(--ctl-bar-muted); }
.ctl-topbar .ctl-eyebrow { color: var(--ctl-bar-muted); }

/* Unread marker: the accent, used at the smallest possible size. */
.ctl-topbar-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ctl-red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 13px;
  text-align: center;
  border: 2px solid var(--ctl-bar);
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.ctl-sidebar {
  width: var(--ctl-sidebar-w);
  flex-shrink: 0;
  background: var(--ctl-sidebar);
  border-right: 1px solid var(--ctl-border-soft);
  padding: 1.25rem 0.75rem;
}
.ctl-sidebar-inner {
  position: sticky;
  top: calc(var(--ctl-topbar-h) + 1.25rem);
  max-height: calc(100vh - var(--ctl-topbar-h) - 2.5rem);
  overflow-y: auto;
}

.ctl-main {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--ctl-ground);
  padding: 2rem 2rem 4rem;
}

/* ── Right rail: Trending Topics ─────────────────────────────────────────────
   The third column of the shell. Same ground as .ctl-main so its white cards
   read as part of the content, not as more chrome; sticky like the sidebar. It
   leaves below 1280px, where three columns would squeeze the content column
   under the width the feed's cards were designed for — /topics stays
   reachable from the profile menu there. */
.ctl-rail {
  width: 300px;
  flex-shrink: 0;
  background: var(--ctl-ground);
  padding: 2rem 1.25rem 4rem 0;
}
.ctl-rail-inner {
  position: sticky;
  top: calc(var(--ctl-topbar-h) + 2rem);
  max-height: calc(100vh - var(--ctl-topbar-h) - 3rem);
  overflow-y: auto;
}
@media (max-width: 1279px) { .ctl-rail { display: none; } }

/* One topic row: a whole-row button (pick) or link (already picked). */
.ctl-topic-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: var(--ctl-radius-sm);
  font-size: 13px;
  text-align: left;
  color: var(--ctl-body);
  transition: background 140ms ease;
}
.ctl-topic-row:hover { background: var(--ctl-sunk); color: var(--ctl-ink); }
.ctl-topic-rank { width: 1.25rem; flex-shrink: 0; font-size: 11px; color: var(--ctl-faint); }
.ctl-topic-count { margin-left: auto; flex-shrink: 0; font-size: 11px; color: var(--ctl-faint); }

/* The share-of-max bar under a trending row (TLN_UI_SS/2): wraps the row onto
   two lines (name+count, then the bar spanning full width) via `flex-wrap`,
   with the rank/name/count row pinned to 100% width so it doesn't share the
   line with the bar. */
.ctl-topic-row-bar { flex-wrap: wrap; row-gap: 0.3rem; }
.ctl-topic-bar {
  display: block; width: 100%; height: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.08); overflow: hidden;
  margin-left: 1.875rem;    /* aligns under the topic name, past the rank */
}
.ctl-topic-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--ctl-gradient); }

/* A selectable topic chip — the welcome picker and "Your topics". The checkbox
   is visually hidden but stays focusable, so the picker works by keyboard. */
.ctl-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--ctl-border);
  background: var(--ctl-surface);
  font-size: 13px;
  color: var(--ctl-body);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.ctl-topic-chip:hover { border-color: rgba(255,255,255,0.18); background: var(--ctl-sunk); color: var(--ctl-ink); }
/* Picked = the active pill's treatment, so "selected" means one thing here. */
.ctl-topic-chip-on, .ctl-topic-chip-on:hover,
.ctl-topic-chip:has(input:checked) {
  background: var(--ctl-blue-soft);
  border-color: var(--ctl-blue);
  color: var(--ctl-blue);
  font-weight: 500;
}
.ctl-topic-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ctl-topic-chip:has(input:focus-visible) { outline: 2px solid var(--ctl-blue); outline-offset: 2px; }

/* Group headings: quiet, letterspaced. */
.ctl-sidebar-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ctl-faint);
  transition: color 140ms ease;
}
.ctl-sidebar-group:hover { color: var(--ctl-muted); }

.ctl-sidebar-divider {
  height: 1px;
  background: var(--ctl-divider);
  border: 0;
  margin: 1rem 0.75rem;
}
/* The brand tag line card — _partials/tagline_card.html. Closes the sidebar on
   every page (compact) and can stand alone at full size. */
.ctl-tagline-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 1.5rem 1.25rem 1.25rem;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(139,92,246,0.14), transparent 60%),
    var(--ctl-surface);
}
.ctl-tagline-card-mark { display: flex; justify-content: center; margin-bottom: 0.75rem; }
.ctl-tagline-card-mark .tln-mark { height: 28px; }
.ctl-tagline-card-name {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ctl-ink);
}
.ctl-tagline-card-motto { margin-top: 0.4rem; font-size: 14px; color: var(--ctl-muted); }
.ctl-tagline-card-rule {
  height: 1px; border: 0; background: var(--ctl-divider);
  margin: 1rem 0;
}
.ctl-tagline-card-line { font-size: 14px; line-height: 1.5; color: var(--ctl-body); }

.ctl-tagline-card-compact { padding: 1rem 0.875rem 0.875rem; }
.ctl-tagline-card-compact .tln-mark { height: 20px; }
.ctl-tagline-card-compact .ctl-tagline-card-mark { margin-bottom: 0.5rem; }
.ctl-tagline-card-compact .ctl-tagline-card-name { font-size: 14px; }
.ctl-tagline-card-compact .ctl-tagline-card-motto { font-size: 12px; margin-top: 0.15rem; }
.ctl-tagline-card-compact .ctl-tagline-card-rule { margin: 0.65rem 0; }
.ctl-tagline-card-compact .ctl-tagline-card-line { font-size: 12px; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.ctl-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5625rem 0.75rem;
  border-radius: var(--ctl-radius-xs);
  font-size: 14.5px;
  font-weight: 450;
  color: var(--ctl-muted);
  transition: background 140ms ease, color 140ms ease;
}
.ctl-nav-link svg { color: var(--ctl-faint); transition: color 140ms ease; }
.ctl-nav-link:hover { background: var(--ctl-sunk); color: var(--ctl-ink); }
.ctl-nav-link:hover svg { color: var(--ctl-ink); }

/* Active: a solid gradient chip, not a tint — TLN_UI_SS's sidebar fills the
   whole row for "you are here" rather than tinting it. */
.ctl-nav-link-active,
.ctl-nav-link-active:hover {
  background: var(--ctl-gradient);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px -8px rgba(124,107,240,0.55);
}
.ctl-nav-link-active svg, .ctl-nav-link-active:hover svg { color: #fff; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.ctl-card {
  background: var(--ctl-surface);
  border: 1px solid var(--ctl-border);
  border-radius: var(--ctl-radius);
  box-shadow: var(--ctl-shadow-card);
}
.ctl-card-interactive { transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.ctl-card-interactive:hover {
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 16px 32px -16px rgba(79,70,229,0.4), 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* Overlays: the one place the reference uses elevation. */
.ctl-raised {
  /* Same surface colour, translucent + blurred — an overlay reads as a pane
     lifted above the page rather than another flat card stacked on top of
     it. Same palette throughout; only the opacity and blur are new. */
  background: color-mix(in srgb, var(--ctl-surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--ctl-border);
  border-radius: var(--ctl-radius);
  box-shadow: var(--ctl-shadow-pop);
}

.ctl-sunk { background: var(--ctl-sunk); border-radius: var(--ctl-radius-sm); }

hr.ctl-rule-brass, .ctl-rule-brass {
  height: 1px; border: 0; background: var(--ctl-divider);
}

/* ── Typography ───────────────────────────────────────────────────────────── */
/* The single biggest change from the previous look: display type is LARGER and
   LIGHTER. The reference tops out at weight 600 and sets 64px display at 1.05
   line-height. The old look used 700/800 at small sizes, which reads busy. */
.ctl-display {
  font-family: var(--ctl-font);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ctl-ink);
  text-wrap: balance;
}

.ctl-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ctl-faint);
}

.ctl-prose { max-width: 68ch; line-height: 1.7; color: var(--ctl-body); }
.ctl-prose p + p { margin-top: 1em; }
.ctl-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.ctl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--ctl-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 0.6875rem 1.125rem;
  border-radius: var(--ctl-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: background 140ms ease, border-color 140ms ease,
              color 140ms ease, opacity 140ms ease;
}
.ctl-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ctl-btn:focus-visible { outline: 2px solid var(--ctl-blue); outline-offset: 2px; }

/* Primary is the concept's violet -> blue gradient — Post, Register, RSVP,
   Connect all sample the same two colours. A faint top sheen gives it the
   slightly glassy, tactile edge the concept's buttons have rather than a
   flat colour fill. */
.ctl-btn-primary { background: var(--ctl-gradient); color: #fff; }
.ctl-btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent 55%);
  opacity: 0.8; pointer-events: none;
}
.ctl-btn-primary:hover { filter: brightness(1.08); }

/* Create carries the same gradient: one accent, not a second colour for a
   second kind of "do this". */
.ctl-btn-violet { background: var(--ctl-gradient); color: #fff; }
.ctl-btn-violet:hover { filter: brightness(1.08); }

.ctl-btn-ghost, .ctl-btn-brass {
  background: rgba(255,255,255,0.04);
  color: var(--ctl-ink);
  border-color: var(--ctl-border);
}
.ctl-btn-ghost:hover, .ctl-btn-brass:hover {
  background: var(--ctl-sunk);
  border-color: rgba(255,255,255,0.18);
}

.ctl-btn-danger { background: var(--ctl-bad); color: #1a0506; }
.ctl-btn-danger:hover { background: #f65569; }

.ctl-btn-sm { padding: 0.4375rem 0.75rem; font-size: 13px; border-radius: var(--ctl-radius-xs); }

/* A light pill on a dark/gradient field — the inverse of the usual button. */
.ctl-btn-on-blue { background: #fff; color: var(--ctl-ink-on-light, #0b1f3a); }
.ctl-btn-on-blue:hover { background: #eef0fb; }

/* ── Fields ───────────────────────────────────────────────────────────────── */
.ctl-input, .ctl-select, .ctl-textarea {
  width: 100%;
  font-family: var(--ctl-font);
  font-size: 14px;
  color: var(--ctl-ink);
  background: var(--ctl-surface);
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--ctl-border);
  border-radius: var(--ctl-radius-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.ctl-input::placeholder, .ctl-textarea::placeholder { color: var(--ctl-faint); }
.ctl-input:focus, .ctl-select:focus, .ctl-textarea:focus {
  outline: none;
  border-color: var(--ctl-blue);
  box-shadow: 0 0 0 3px rgba(124,107,240,0.18);
}
.ctl-textarea { resize: vertical; line-height: 1.65; }
.ctl-select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23c7cbe0' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
}
.ctl-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ctl-muted);
  margin-bottom: 0.375rem;
}

/* ── Feed filter chips ────────────────────────────────────────────────────── */
/* Was a grey block; now a hairline pill, matching the reference's date picker
   and segmented controls. */
.ctl-filter-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;   /* "Sorted by" broke onto two lines at phone width */
  max-width: 100%;
  gap: 0.375rem;
  background: var(--ctl-surface);
  border: 1px solid var(--ctl-border);
  border-radius: 999px;
  padding: 0.5rem 0.875rem;
  font-size: 12px;
  color: var(--ctl-faint);
  cursor: pointer;
  transition: border-color 140ms ease;
}
.ctl-filter-chip:hover { border-color: rgba(255,255,255,0.18); }
.ctl-filter-chip select {
  appearance: none;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ctl-ink);
  text-transform: none;
  cursor: pointer;
  padding-right: 1.125rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' fill='none' stroke='%23f4f5fb' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}
.ctl-filter-chip select:focus { outline: none; }

/* ── Filter pills ─────────────────────────────────────────────────────────── */
.ctl-pill {
  padding: 0.4375rem 0.9375rem;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ctl-body);
  background: var(--ctl-surface);
  border: 1px solid var(--ctl-border);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.ctl-pill:hover { background: var(--ctl-sunk); border-color: rgba(255,255,255,0.18); }
/* Active is a solid gradient fill, as TLN_UI_SS's "Explore"/"Upcoming" pill
   is — not a tinted outline. Same gradient the primary button and the active
   nav item use, so "this is the one that's on" means one thing everywhere. */
.ctl-pill-active, .ctl-pill-active:hover {
  background: var(--ctl-gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px -8px rgba(124,107,240,0.55);
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.ctl-tab {
  padding: 0.625rem 0 0.875rem;
  font-size: 15px;
  font-weight: 400;
  color: var(--ctl-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 140ms ease, border-color 140ms ease;
}
.ctl-tab:hover { color: var(--ctl-ink); }
.ctl-tab-active, .ctl-tab-active:hover {
  color: var(--ctl-ink);
  font-weight: 600;
  border-image: var(--ctl-gradient) 1;
  border-bottom-color: var(--ctl-blue);   /* fallback where border-image is unsupported */
}

/* ── Chips ────────────────────────────────────────────────────────────────── */
.ctl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 12px;
  font-weight: 500;
  padding: 0.25rem 0.5625rem;
  border-radius: 999px;             /* sampled: 100px pills */
  border: 1px solid transparent;
}
.ctl-chip-good { color: var(--ctl-good); background: var(--ctl-good-bg); }
.ctl-chip-warn { color: var(--ctl-warn); background: var(--ctl-warn-bg); }
.ctl-chip-bad  { color: var(--ctl-bad);  background: var(--ctl-bad-bg); }
.ctl-chip-info { color: var(--ctl-info); background: var(--ctl-info-bg); }
/* Provenance, not status. good/warn/bad are a scale about how a thing IS;
   this says where it CAME FROM, so it gets an outline instead of a fill and
   sits outside that scale — otherwise "Global" reads as a severity. */
.ctl-chip-global {
  color: var(--ctl-info);
  background: transparent;
  border-color: color-mix(in srgb, var(--ctl-info) 40%, transparent);
}
.ctl-chip-mute { color: var(--ctl-muted); background: var(--ctl-sunk); }

/* ── Avatars ──────────────────────────────────────────────────────────────── */
.ctl-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ctl-muted);
  background: var(--ctl-sunk);
  border: 1px solid var(--ctl-border);
}
.ctl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ctl-avatar-brass { background: var(--ctl-sunk); color: var(--ctl-ink); }

/* An overlapping avatar stack (circle participants, event RSVPs): the gap
   between faces has to be the CARD's surface colour, not white — this app's
   cards are dark, and a white ring read as a stray halo on every face. */
.ctl-avatar-stack-item { border-color: var(--ctl-surface); }

/* `bg-slate-200` remaps to a near-transparent white (rgba(255,255,255,0.1))
   on this dark theme, which reads fine sitting on a card but goes almost
   invisible over a vivid gradient cover — a profile avatar half-overlapping
   its banner needs an OPAQUE backing regardless of what is behind it.
   Compound selector, not just `.ctl-avatar-opaque`: the Tailwind remap below
   also carries `!important` on the single class, and with equal specificity
   the LATER rule in the file wins regardless of class order in the markup —
   `.bg-slate-200` sits after this block, so it would otherwise win every
   time. Matching both classes outranks it on specificity instead of relying
   on source order. */
.ctl-avatar-opaque.bg-slate-200 { background-color: var(--ctl-surface) !important; }

/* ── Avatar ring (member grid seniority, TLN_UI_SS/2) ─────────────────────
   A Tailwind `ring-*` utility plus an inline `--tw-ring-color` was tried
   here and rendered as a broken, partial arc rather than a clean circle —
   reported, and reproducible: Tailwind's ring box-shadow stacks with the
   avatar's own border and this file's shadows in a way that does not nest
   concentrically. This is the padding-trick instead: a gradient PAINTS the
   wrapper, and the avatar sits on top with a ring-coloured border acting as
   the gap — guaranteed to be a full, clean circle regardless of what the
   avatar itself draws, because it never relies on more than one box-shadow
   stacking correctly. */
.ctl-avatar-ring {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 2.5px;
}
.ctl-avatar-ring .ctl-avatar { border: 2px solid var(--ctl-surface); }
.ctl-avatar-ring-csuite       { background: linear-gradient(135deg, #a855f7, #6d5ef8); }
.ctl-avatar-ring-vp           { background: linear-gradient(135deg, #38bdf8, #4f7cff); }
.ctl-avatar-ring-director     { background: linear-gradient(135deg, #4f7cff, #8b6bf0); }
.ctl-avatar-ring-manager      { background: linear-gradient(135deg, #ec4899, #a855f7); }
.ctl-avatar-ring-practitioner { background: linear-gradient(135deg, #14b8a6, #38bdf8); }
/* No seniority to read (platform admin, a title the directory has no level
   for): the brand gradient itself, so the ring is never a bare flat colour —
   this is also what killed the plain white halo a profile avatar used to
   get from a literal `border-white`. */
.ctl-avatar-ring-default { background: var(--ctl-gradient); }

/* Initials inside a ring whose avatar is see-through sit directly on the
   gradient, where the muted grey every other avatar uses is unreadable
   (reported: grey "DM" on a blue-violet disc). White, with a soft shadow for
   the lighter end of the pink and teal gradients. Compound selector for the
   reason given above: the `.text-slate-500` remap carries `!important`. */
.ctl-avatar-ring .ctl-avatar-initials.text-slate-500 {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(8, 12, 30, 0.45);
}

.ctl-online {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #22a06b;
  box-shadow: 0 0 0 2px var(--ctl-surface);
}

/* ── The in-post prompt ───────────────────────────────────────────────────── */
/* The one high-emphasis surface: the brand gradient. */
.ctl-prompt {
  background: var(--ctl-gradient);
  border-radius: var(--ctl-radius);
  padding: 2.5rem 2rem;
  text-align: center;
}
.ctl-prompt-title {
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

/* ── Hero banner ──────────────────────────────────────────────────────────
   Home's "Good evening" panel (TLN_UI_SS/4 — Executive Hub) — a dark,
   gradient-lit band with the greeting, the brand motto, and a row of stat
   chips for the numbers that matter on arrival. One instance per page, at
   the top of the content column. */
.ctl-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--ctl-radius);
  border: 1px solid var(--ctl-border);
  padding: 2.5rem 2.25rem;
  background:
    radial-gradient(120% 160% at 88% -10%, rgba(139,92,246,0.32), transparent 55%),
    radial-gradient(90% 140% at 5% 115%, rgba(79,124,255,0.32), transparent 60%),
    linear-gradient(160deg, #171c3d 0%, #0a0c1b 75%);
}
/* A faint grain, the way a premium dark surface is textured rather than a
   flat colour fill — the same trick behind Linear/Arc-style hero panels.
   Pure noise, 3% opacity, so it is felt rather than seen; no new colour. */
.ctl-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Every piece of hero TEXT sits in its own stacking context above the orb and
   is capped to a width that stays clear of it — the orb used to bleed a
   120px blur most of the way across the card and wash out whatever copy
   happened to sit behind it (reported: the Networks hero's subtitle became
   unreadable where it crossed the glow). Width + a shadow are both belt and
   braces: either alone was not enough once a hero got long copy. */
.ctl-hero-eyebrow, .ctl-hero-title, .ctl-hero-sub, .ctl-hero-stats {
  position: relative; z-index: 1;
}
.ctl-hero-eyebrow, .ctl-hero-title, .ctl-hero-sub { max-width: 30rem; }
.ctl-hero-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #cfc9fc;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.ctl-hero-title {
  margin-top: 0.5rem;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.ctl-hero-title span {
  background: linear-gradient(90deg, #cabdff, #a9c6ff 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ctl-hero-sub {
  margin-top: 0.5rem; font-size: 15px; color: rgba(255,255,255,0.86);
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.ctl-hero-stats { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.ctl-hero-stat {
  display: flex; align-items: center; gap: 0.625rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--ctl-radius-sm);
  padding: 0.7rem 1rem;
  backdrop-filter: blur(10px);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.ctl-hero-stat:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.24); transform: translateY(-1px); }
.ctl-hero-stat-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.14); color: #fff;
}
.ctl-hero-stat b {
  display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: #fff;
  font-variant-numeric: tabular-nums;
}
.ctl-hero-stat-label { font-size: 11.5px; color: rgba(255,255,255,0.65); }
@media (max-width: 640px) {
  .ctl-hero { padding: 1.75rem 1.25rem; }
  .ctl-hero-stats { gap: 0.5rem; }
  .ctl-hero-stat { padding: 0.55rem 0.75rem; flex: 1 1 calc(50% - 0.5rem); }
}

/* A decorative "planet" glow for a hero that wants the Members/Events/
   Network-graph concepts' globe art without shipping a stock photo: a lit
   sphere built from gradients and masked to a circle, floating top-right.
   Purely `aria-hidden` decoration — never content. */
.ctl-hero-orb {
  position: absolute; z-index: 0; top: -22%; right: -14%; width: 40%; aspect-ratio: 1;
  border-radius: 999px; pointer-events: none;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.3), transparent 35%),
    radial-gradient(circle at 60% 65%, rgba(79,124,255,0.55), transparent 55%),
    radial-gradient(circle at 50% 50%, #2a2f66, #0a0c1b 72%);
  box-shadow: 0 0 60px 0 rgba(79,124,255,0.15);
  opacity: 0.8;
}
@media (max-width: 1100px) { .ctl-hero-orb { display: none; } }

/* A profile header banner, in the same layered-radial-plus-grain language as
   .ctl-hero rather than one flat `background: var(--ctl-gradient))` — a
   single linear-gradient read as "a plain colour" next to the richer heroes
   elsewhere, so this gives it the same two soft highlights and grain, scaled
   down for a short banner instead of a full panel. Shared by both profile
   pages (the network member page and the cross-network /people/{id} one) so
   a person looks like the same product wherever you meet them. */
.ctl-profile-cover {
  position: relative; overflow: hidden;
  background:
    radial-gradient(130% 220% at 88% -60%, rgba(255,255,255,0.26), transparent 55%),
    radial-gradient(90% 180% at 2% 170%, rgba(10,12,27,0.4), transparent 60%),
    var(--ctl-gradient);
}
.ctl-profile-cover::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Seniority badges ─────────────────────────────────────────────────────
   The member grid's role-level pill (TLN_UI_SS/2, /7) — the same title_level
   member_codes.py already derives, just relabelled short for a compact chip.
   One hue per level rather than a severity-style ramp: these are categories,
   not a scale, so each gets its own identity. */
.ctl-seniority {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 5px;
  border: 1px solid transparent;
}
.ctl-seniority-csuite       { background: rgba(168,85,247,0.16); color: #c89bfb; border-color: rgba(168,85,247,0.3); }
.ctl-seniority-vp           { background: rgba(56,189,248,0.16); color: #7dd3fc; border-color: rgba(56,189,248,0.3); }
.ctl-seniority-director     { background: rgba(79,124,255,0.16); color: #93b4ff; border-color: rgba(79,124,255,0.3); }
.ctl-seniority-manager      { background: rgba(236,72,153,0.16); color: #f7a8d2; border-color: rgba(236,72,153,0.3); }
.ctl-seniority-practitioner { background: rgba(20,184,166,0.16); color: #7ee6da; border-color: rgba(20,184,166,0.3); }

/* ── Active-now row (Home) ────────────────────────────────────────────────
   A compact presence list — who's around right now and what they're doing —
   TLN_UI_SS/5's "Active Now". The activity line is a reviewed, honest one:
   it reads a real field already on the page (nothing invented per-person). */
.ctl-now-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem; border-radius: var(--ctl-radius-sm);
  transition: background 140ms ease;
}
.ctl-now-item:hover { background: var(--ctl-sunk); }
.ctl-now-item-name { font-size: 13.5px; font-weight: 600; color: var(--ctl-ink); }
.ctl-now-item-meta { font-size: 12px; color: var(--ctl-faint); }

/* ── Workspace / network cards (networks/directory.html) ─────────────────
   TLN_UI_SS/10: a gradient "cover" band standing in for artwork no network
   necessarily has, an icon badge, and the join/open action pinned to the
   card's foot. The cover is pure CSS — five hand-picked gradients cycled by
   list position, so a page of them reads as a designed set rather than a
   repeated tile. */
.ctl-workspace-card {
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ctl-workspace-cover {
  position: relative;
  aspect-ratio: 20 / 9;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 12px;
}
.ctl-workspace-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 14px);
}
.ctl-workspace-cover-0 { background: linear-gradient(135deg, #2b1f6b 0%, #1b2a66 100%); }
.ctl-workspace-cover-1 { background: linear-gradient(135deg, #1e2a5e 0%, #0e3b63 100%); }
.ctl-workspace-cover-2 { background: linear-gradient(135deg, #2c1150 0%, #0b1f3a 100%); }
.ctl-workspace-cover-3 { background: linear-gradient(135deg, #0b2a4a 0%, #142d63 100%); }
.ctl-workspace-cover-4 { background: linear-gradient(135deg, #3a1250 0%, #1a1550 100%); }

/* An admin's own cover image (networks.cover_url) in place of the cycled
   gradient. The diagonal texture is part of the invented-gradient look, not
   of a real photo, so it is dropped; a dark wash keeps the logo badge and
   "Member"/"Private" chip readable over an arbitrary image. */
.ctl-workspace-cover.has-image::before {
  background-image: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.05) 45%);
}

/* Circles discovery hero: "Browse by technology" pills/tiles and the
   Featured Leaders cluster — all inside the dark .ctl-hero panel, so they
   share its z-index: 1 positioning rule above. */
.ctl-circles-hero-title { font-size: clamp(26px, 3.4vw, 40px); }
.ctl-circles-hero-title span {
  background: linear-gradient(90deg, #f472b6, #c084fc 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.ctl-circles-topics {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem; margin-top: 1.5rem;
}
.ctl-circles-topic-pill {
  padding: 0.5rem 1.1rem; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  transition: background 150ms ease, border-color 150ms ease; text-decoration: none; white-space: nowrap;
}
.ctl-circles-topic-pill:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); }
.ctl-circles-topic-pill.is-active { background: var(--ctl-blue); border-color: var(--ctl-blue); }
.ctl-circles-topic-pill-add {
  width: 2.1rem; height: 2.1rem; padding: 0; display: inline-flex; align-items: center;
  justify-content: center; font-size: 18px; line-height: 1; flex-shrink: 0;
}

.ctl-circles-tiles-wrap { position: relative; z-index: 1; display: flex; align-items: stretch; gap: 0.5rem; margin-top: 1.25rem; }
.ctl-circles-tiles {
  display: flex; gap: 0.9rem; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
  padding-bottom: 2px; flex: 1 1 auto;
  scrollbar-width: none;
}
.ctl-circles-tiles::-webkit-scrollbar { display: none; }
.ctl-circles-tiles-nav {
  flex-shrink: 0; width: 2.25rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 150ms ease;
}
.ctl-circles-tiles-nav:hover { background: rgba(255,255,255,0.16); }
.ctl-circles-tiles-nav svg { width: 1.1rem; height: 1.1rem; }
.ctl-circles-tile {
  --tile-accent: #60a5fa;
  flex: 0 0 200px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 0.75rem; padding: 1.1rem;
  border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--tile-accent) 22%, #0b1230) 0%, #0b1230 65%);
  border: 1px solid color-mix(in srgb, var(--tile-accent) 45%, transparent);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 10px 24px -16px color-mix(in srgb, var(--tile-accent) 70%, transparent);
  text-decoration: none; transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.ctl-circles-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tile-accent) 60%, transparent) inset,
              0 16px 32px -14px color-mix(in srgb, var(--tile-accent) 85%, transparent);
}
.ctl-circles-tile.is-active { border-color: var(--tile-accent); }
.ctl-circles-tile-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 12px; display: flex;
  align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tile-accent) 28%, transparent); color: var(--tile-accent);
}
.ctl-circles-tile-icon svg { width: 1.3rem; height: 1.3rem; }
.ctl-circles-tile-label { font-size: 14px; font-weight: 700; color: #fff; }
.ctl-circles-tile-count { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: -0.5rem; }

.ctl-circles-featured { position: relative; z-index: 1; margin-top: 2rem; }
.ctl-circles-featured-label {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.75); margin-bottom: 1.25rem;
}
.ctl-circles-cluster { position: relative; display: flex; align-items: center; justify-content: center; min-height: 6.5rem; }
.ctl-circles-cluster-glow {
  position: absolute; inset: -1.5rem 15%; z-index: 0; pointer-events: none; border-radius: 999px;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(192,132,252,0.14) 50%, transparent 56%),
    radial-gradient(ellipse at center, transparent 62%, rgba(96,165,250,0.12) 64%, transparent 72%);
}
.ctl-circles-cluster-item {
  position: relative; z-index: 1; display: inline-flex; margin-left: -0.9rem;
  border-radius: 999px; box-shadow: 0 0 0 3px #0b1230, 0 0 14px -2px var(--ring-color, var(--ctl-blue));
}
.ctl-circles-cluster-item :is(img, span) { border-radius: 999px; }
.ctl-circles-cluster-item > span { border: 2px solid var(--ring-color, var(--ctl-blue)); }
.ctl-circles-cluster-item:first-child { margin-left: 0; }
.ctl-circles-cluster-center {
  margin-left: 0.4rem; margin-right: 0.4rem; z-index: 2;
  box-shadow: 0 0 0 4px #0b1230, 0 0 28px 2px var(--ring-color, var(--ctl-blue));
}
.ctl-circles-cluster-center > span { border: 3px solid #fff; }
.ctl-circles-cluster-online {
  position: absolute; right: 2px; bottom: 2px; width: 0.85rem; height: 0.85rem; border-radius: 999px;
  background: #22c55e; border: 2px solid #0b1230; z-index: 3;
}
.ctl-circles-cluster-caption { position: relative; z-index: 1; text-align: center; margin-top: 1rem; }
.ctl-circles-cluster-caption .ctl-circles-cluster-name { font-weight: 700; font-size: 14px; color: #fff; }
.ctl-circles-cluster-caption .ctl-circles-cluster-role { font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 1px; }

/* The Executive Hub — /home's hero, stat row, recommendations, activity card
   and next-event tile. A mountain-at-dusk "photo" is simulated with layered
   gradients and a jagged ridge silhouette rather than an actual landscape
   photograph: this deployment has no licensed asset library and no image
   model, so a drawn skyline is honest where a sourced photo would not be. */
.ctl-hub-hero {
  position: relative; overflow: hidden; border-radius: var(--ctl-radius);
  border: 1px solid var(--ctl-border); padding: 2rem 2.25rem;
  background: linear-gradient(180deg, #0c1222 0%, #1b1430 55%, #2c1a2e 100%);
}
.ctl-hub-hero-glow {
  position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 90% at 85% 100%, rgba(251,191,36,0.35), transparent 60%),
    radial-gradient(40% 70% at 100% 20%, rgba(244,114,182,0.18), transparent 65%);
}
.ctl-hub-hero-ridge {
  position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 48%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5,8,20,0.9) 90%);
  clip-path: polygon(0% 100%, 0% 55%, 8% 40%, 16% 58%, 26% 22%, 36% 50%, 46% 30%,
                      58% 60%, 68% 18%, 78% 46%, 88% 28%, 100% 50%, 100% 100%);
  background-color: rgba(8,12,28,0.85);
}
.ctl-hub-hero-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.1rem; }
.ctl-hub-hero-avatar { border: 3px solid rgba(255,255,255,0.85); box-shadow: 0 4px 18px rgba(0,0,0,0.4); }
.ctl-hub-hero-title { font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.ctl-hub-hero-sub { font-size: 14px; color: rgba(255,255,255,0.82); margin-top: 0.2rem; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }

.ctl-hub-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
@media (max-width: 760px) { .ctl-hub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ctl-hub-stat {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1rem;
  border-radius: 12px; background: var(--ctl-surface); border: 1px solid var(--ctl-border);
}
.ctl-hub-stat-icon {
  flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ctl-sidebar); color: var(--ctl-blue);
}
.ctl-hub-stat-icon svg { width: 1.1rem; height: 1.1rem; }
.ctl-hub-stat-value { display: block; font-size: 17px; color: var(--ctl-ink); }
.ctl-hub-stat-label { display: block; font-size: 12px; color: var(--ctl-faint); margin-top: -1px; }

.ctl-hub-activity-icon {
  flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ctl-sidebar); color: var(--ctl-blue);
}
.ctl-hub-activity-icon svg { width: 1rem; height: 1rem; }

.ctl-hub-next-event {
  position: relative; overflow: hidden; border-radius: var(--ctl-radius);
  display: flex; flex-direction: column; align-items: flex-start; padding: 1.25rem;
  background: linear-gradient(165deg, #1b1430 0%, #0c1222 100%);
  color: #fff; text-decoration: none; transition: transform 150ms ease;
}
.ctl-hub-next-event:hover { transform: translateY(-2px); }
.ctl-hub-next-event-ridge {
  position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 55%; pointer-events: none;
  background-color: rgba(8,12,28,0.7);
  clip-path: polygon(0% 100%, 0% 60%, 12% 38%, 24% 56%, 38% 24%, 52% 52%, 66% 20%, 80% 48%, 92% 30%, 100% 46%, 100% 100%);
}
.ctl-hub-next-event > * { position: relative; z-index: 1; }
.ctl-workspace-mark {
  position: relative; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
}

/* The circle discovery grid's topic glyph: a WATERMARK filling the cover,
   not a small badge sitting on it — what "a logo per community" means in
   TLN_UI_SS/10. Monotone (one colour, the gradient's own white) rather than
   each topic getting its own hue, because the gradient already carries the
   colour; a second, icon-specific colour per card would compete with it
   instead of sitting inside it. */
.ctl-circle-mark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ctl-circle-mark svg {
  width: 46%; height: 46%; max-width: 92px; max-height: 92px;
  color: rgba(255,255,255,0.9);
}
.ctl-workspace-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ctl-workspace-title { font-size: 17px; font-weight: 700; color: var(--ctl-ink); letter-spacing: -0.01em; line-height: 1.25; }
.ctl-workspace-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.ctl-table { width: 100%; font-size: 14px; border-collapse: collapse; }
.ctl-table thead th, .ctl-thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ctl-faint);
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
}
.ctl-table thead th, .ctl-thead {
  background: var(--ctl-sunk);
  border-bottom: 1px solid var(--ctl-border);
}
.ctl-table tbody td { padding: 0.8125rem 1.25rem; color: var(--ctl-body); }
.ctl-table tbody tr { border-top: 1px solid var(--ctl-divider); }
.ctl-table tbody tr:first-child { border-top: 0; }
.ctl-table tbody tr:hover { background: rgba(255,255,255,0.04); }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.ctl-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.ctl-scroll::-webkit-scrollbar-track { background: transparent; }
.ctl-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; }
.ctl-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* Native controls default to the browser's blue, which is the last bright accent
   left over from the previous look. accent-color aligns them with the palette
   without replacing them with divs — they keep full keyboard and AT behaviour. */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--ctl-blue);
  width: 15px;
  height: 15px;
}
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: 2px solid var(--ctl-blue);
  outline-offset: 2px;
}

[x-cloak] { display: none !important; }

/* ── Motion & loading ───────────────────────────────────────────────────────
   Three jobs, each small:
     1. Content ARRIVES rather than appears: cards rise 6px and fade in, lightly
        staggered, once per page load (and when HTMX inserts new ones).
     2. Waiting LOOKS like the thing being waited for: skeleton blocks with a
        shimmer, in the panels HTMX fills, behind images still downloading, and
        in the content column between a click and the next page.
     3. Every request is ACKNOWLEDGED within a frame: a 3px bar across the top.
   static/js/ui.js drives 2 and 3. The `prefers-reduced-motion` rule below this
   block collapses every duration, so skeletons stay but stop moving.

   The rise uses `animation-fill-mode: backwards`, NOT both/forwards: a
   transform left on a card after the animation would become the containing
   block for any position:fixed descendant (a dropdown, a modal) and pin it to
   the card instead of the viewport. */
@keyframes ctl-rise-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ctl-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ctl-shimmer {
  from { background-position: 150% 0; }
  to   { background-position: -50% 0; }
}
@keyframes ctl-pop {
  0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); }
}

.ctl-page .ctl-card,
.ctl-page .ctl-tile,
.ctl-rail .ctl-card {
  animation: ctl-rise-in 380ms cubic-bezier(.2,.7,.2,1) backwards;
}
.ctl-page .ctl-card:nth-child(2), .ctl-page .ctl-tile:nth-child(2), .ctl-rail .ctl-card:nth-child(2) { animation-delay: 40ms; }
.ctl-page .ctl-card:nth-child(3), .ctl-page .ctl-tile:nth-child(3), .ctl-rail .ctl-card:nth-child(3) { animation-delay: 80ms; }
.ctl-page .ctl-card:nth-child(4), .ctl-page .ctl-tile:nth-child(4) { animation-delay: 120ms; }
.ctl-page .ctl-card:nth-child(5), .ctl-page .ctl-tile:nth-child(5) { animation-delay: 160ms; }
.ctl-page .ctl-card:nth-child(n+6), .ctl-page .ctl-tile:nth-child(n+6) { animation-delay: 200ms; }
/* Cards nested in cards (a comment inside a post) arrive with their parent. */
.ctl-page .ctl-card .ctl-card { animation: none; }

/* Page heading and flash slide in with the content, not after it. */
.ctl-page > * > h1:first-child,
.ctl-page .ctl-display { animation: ctl-fade-in 300ms ease backwards; }
#ctl-flash { animation: ctl-rise-in 300ms ease backwards; }

/* Anything HTMX swaps in: a new chat line, a notification list, a reaction. */
.htmx-added { animation: ctl-rise-in 260ms ease backwards; }
.ctl-topbar-badge { animation: ctl-pop 360ms cubic-bezier(.3,1.6,.5,1) backwards; }

/* Micro-interactions. Press feels physical; cards lift on hover. */
.ctl-btn:not(:disabled):active { transform: translateY(1px) scale(0.98); }
.ctl-btn { transition: background 140ms ease, border-color 140ms ease, color 140ms ease,
                       opacity 140ms ease, transform 90ms ease, box-shadow 140ms ease; }
.ctl-btn-primary:not(:disabled):hover { box-shadow: 0 4px 12px -4px rgba(124,107,240,0.5); }
.ctl-card-interactive:hover, a.ctl-tile-link:hover { transform: translateY(-2px); }
a.ctl-tile-link { transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
a.ctl-tile-link:hover { box-shadow: 0 8px 20px -10px rgba(11,31,58,0.22); }
.ctl-nav-link svg { transition: color 140ms ease, transform 160ms ease; }
.ctl-nav-link:hover svg { transform: translateX(1px) scale(1.06); }
.ctl-topbar-icon svg { transition: transform 160ms ease; }
.ctl-topbar-icon:hover svg { transform: scale(1.08); }
.ctl-avatar img { animation: ctl-fade-in 240ms ease backwards; }

/* ── Skeletons ─────────────────────────────────────────────────────────── */
.ctl-skel {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, #1c2140 0%, #262c4c 20%, #1c2140 40%, #1c2140 100%);
  background-size: 200% 100%;
  animation: ctl-shimmer 1.3s linear infinite;
}
.ctl-skel-line   { height: 10px; }
.ctl-skel-title  { height: 22px; border-radius: 8px; }
.ctl-skel-circle { border-radius: 999px; flex-shrink: 0; }
.ctl-skel-block  { border-radius: var(--ctl-radius-sm); }

/* An image still on its way shimmers in its own box, then fades in. */
img.ctl-img-loaded { animation: ctl-fade-in 260ms ease backwards; }
.ctl-img-wait {
  background: linear-gradient(90deg, #1c2140 0%, #262c4c 20%, #1c2140 40%, #1c2140 100%) !important;
  background-size: 200% 100% !important;
  animation: ctl-shimmer 1.3s linear infinite;
}

/* Between a click and the next page: the content column swaps to a skeleton.
   ui.js sets .is-navigating on <body> after a short delay, so a fast page
   never flashes one. */
.ctl-page-skeleton { display: none; }
body.is-navigating .ctl-page { display: none; }
body.is-navigating .ctl-page-skeleton { display: block; animation: ctl-fade-in 160ms ease; }

/* ── Progress bar ──────────────────────────────────────────────────────────
   Blue into the glyph's cyan: the one place a logo colour leaves the logo,
   because the bar is a brand flourish, not a control. */
#ctl-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0;
  background: linear-gradient(90deg, #1769e0, #22d3ee);
  box-shadow: 0 0 8px rgba(34,211,238,0.6);
}
#ctl-progress.is-running {
  opacity: 1;
  transform: scaleX(0.85);
  transition: transform 8s cubic-bezier(.1,.7,.2,1), opacity 120ms ease;
}
#ctl-progress.is-done {
  opacity: 0;
  transform: scaleX(1);
  transition: transform 180ms ease, opacity 260ms ease 180ms;
}
.ctl-overflow-x { overflow-x: auto; }

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

@media (max-width: 640px) {
  .ctl-topbar { gap: 0.5rem; padding: 0 0.75rem; }
  .ctl-topbar .tln-logo-rule, .ctl-topbar .tln-logo-name { display: none; }
  .ctl-topbar .tln-mark { height: 24px; }
}

/* ── Phone and tablet shell (below 1024px) ──────────────────────────────────
   The sidebar used to stack ABOVE the content here, so on a phone every page
   opened on ~600px of menu and the page itself started below the fold. It is
   an off-canvas drawer now (the menu button in the bar), with a bottom tab
   bar for the five places a member goes most. Content gets the full width. */
.ctl-topbar-menu-btn, .ctl-topbar-search-btn, .ctl-tabbar, .ctl-drawer-backdrop { display: none; }
.ctl-topbar-spacer { display: none; }
/* Events calendar rail (community/events.html). A dot under the number
   marks a day with events; only those days are links. */
.ctl-cal-day {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px; font-size: 12px; color: var(--ctl-faint);
}
.ctl-cal-day.has-events { color: var(--ctl-ink); font-weight: 600; }
.ctl-cal-day.has-events:hover { background: var(--ctl-sunk); }
.ctl-cal-day.has-events::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 999px; background: var(--ctl-blue);
}
.ctl-cal-day.is-today { background: var(--ctl-blue); color: #fff; font-weight: 600; }
.ctl-cal-day.is-today.has-events::after { background: #fff; }
.ctl-cal-day.is-picked { box-shadow: inset 0 0 0 2px var(--ctl-blue); }

/* The welcome checklist, in the sidebar (base.html). It used to float
   bottom-right and covered the rail and page content; here it opens in place. */
.ctl-checklist {
  background: var(--ctl-surface);
  border: 1px solid var(--ctl-border);
  border-radius: 10px;
  overflow: hidden;
}
.ctl-checklist-head {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%; padding: 0.75rem 0.875rem;
}
.ctl-checklist-head:hover { background: var(--ctl-sunk); }
.ctl-checklist-head:focus-visible { outline: 2px solid var(--ctl-blue); outline-offset: -2px; }
#ctl-checklist-panel { border-top: 1px solid var(--ctl-border-soft); }
body.ctl-noscroll { overflow: hidden; }

@media (max-width: 1023px) {
  .ctl-topbar-menu-btn { display: inline-flex; margin-left: -0.375rem; }
  .ctl-sidebar {
    position: fixed; z-index: 50;
    top: var(--ctl-topbar-h); bottom: 0; left: 0;
    width: min(var(--ctl-sidebar-w), 86vw);
    overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    transform: translateX(-102%);
    /* Hidden from tab order and screen readers while closed; `visibility` is
       delayed until the slide-out finishes so the animation still plays. */
    transition: transform 220ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 220ms;
    visibility: hidden;
  }
  .ctl-sidebar.is-open {
    transform: none; visibility: visible; box-shadow: var(--ctl-shadow-pop);
    transition: transform 220ms cubic-bezier(.2,.8,.2,1), visibility 0s;
  }
  .ctl-sidebar-inner { position: static; max-height: none; overflow: visible; }
  .ctl-drawer-backdrop {
    display: block; position: fixed; z-index: 45; inset: var(--ctl-topbar-h) 0 0 0;
    background: rgba(11, 31, 58, 0.45);
  }
  .ctl-main { padding: 1.25rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); }

  .ctl-tabbar {
    display: grid; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--ctl-surface); border-top: 1px solid var(--ctl-border);
  }
  .ctl-tabbar-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; height: 58px; color: var(--ctl-muted); font-size: 11px; font-weight: 500;
    -webkit-tap-highlight-color: transparent;
  }
  .ctl-tabbar-link.is-active { color: var(--ctl-blue); }
  .ctl-tabbar-link.is-active .ctl-tabbar-label { font-weight: 600; }
  .ctl-tabbar-link.is-create .ctl-tabbar-icon {
    display: grid; place-items: center; width: 40px; height: 30px; border-radius: 10px;
    background: var(--ctl-blue); color: #fff;
  }
  .ctl-tabbar-link.is-create .ctl-tabbar-label { color: var(--ctl-blue); }
}

@media (max-width: 639px) {
  /* Search becomes an icon (→ /search); settings and invite live in the
     profile menu. Six 40px targets did not fit beside the logo at 390px. */
  .ctl-topbar-search-wrap { display: none; }
  .ctl-topbar-spacer { display: block; }
  .ctl-topbar-search-btn { display: inline-flex; }
  .ctl-hide-phone { display: none !important; }
}

/* ── Usage meters ─────────────────────────────────────────────────────────
   A budget bar. The FILL WIDTH is set inline because it is data, not styling;
   the colour never is — an inline background on a control beats the class and
   silently flattens it, which has already happened once in this file's history.
   State comes from the semantic tokens, so "over budget" reads the same here as
   everywhere else. */
.ctl-meter {
  height: 6px;
  border-radius: 999px;
  background: var(--ctl-sunk);
  overflow: hidden;
}
.ctl-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ctl-gradient);
  transition: width .3s ease;
}
.ctl-meter-fill.is-warn { background: var(--ctl-warn); }
.ctl-usage-link { color: inherit; }
.ctl-usage-link.is-warn { color: var(--ctl-warn); }
.ctl-usage-link.is-over { color: var(--ctl-bad); font-weight: 600; }
.ctl-meter-fill.is-over { background: var(--ctl-bad); }

/* Figure + label pair sitting above a meter. */
.ctl-meter-value { font-size: 20px; font-weight: 600; color: var(--ctl-ink);
                   font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ctl-meter-of    { font-size: 13px; font-weight: 500; color: var(--ctl-faint);
                   font-variant-numeric: tabular-nums; }

/* ── Risk dashboard components ────────────────────────────────────────────
   Built on the existing tokens rather than a second palette, so /ciso does not
   read as a different product from the rest of CTL. The reference look is flat,
   so these carry a hairline and no shadow like every other surface here. */

/* KPI card: label, figure, signed delta, sparkline. */
.ctl-kpi { display: flex; flex-direction: column; gap: 6px; }
.ctl-kpi-label { font-size: 12px; font-weight: 500; color: var(--ctl-faint);
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctl-kpi-value { font-size: 25px; font-weight: 700; letter-spacing: -.035em;
                 line-height: 1.05; color: var(--ctl-ink);
                 font-variant-numeric: tabular-nums; }
.ctl-kpi-foot { display: flex; align-items: flex-end; justify-content: space-between;
                gap: 10px; }
.ctl-kpi-note { font-size: 11px; color: var(--ctl-faint); }
.ctl-kpi-note.is-alarm { color: var(--ctl-bad); font-weight: 500; }

/* The delta is an arrow plus a number, and its colour follows the
   INTERPRETATION, not the sign: falling exposure and rising coverage are both
   good news with opposite signs. */
.ctl-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px;
             font-weight: 600; white-space: nowrap;
             font-variant-numeric: tabular-nums; }
.ctl-delta.is-good { color: var(--ctl-good); }
.ctl-delta.is-bad  { color: var(--ctl-bad); }

/* Attention strip — the one block on the page that asks for action. */
.ctl-attention { background: var(--ctl-bad-bg); border: 1px solid var(--ctl-bad);
                 border-radius: var(--ctl-radius-sm); padding: 9px 13px; }
.ctl-attention-title { font-size: 12.5px; font-weight: 600; color: var(--ctl-bad); }
.ctl-attention-item { font-size: 12.5px; color: var(--ctl-body); }

/* Posture gauge, sized for the page header. */
.ctl-gauge { display: flex; align-items: center; gap: 11px;
             background: var(--ctl-sunk); border: 1px solid var(--ctl-border);
             border-radius: var(--ctl-radius-sm); padding: 7px 13px 7px 9px; }
.ctl-gauge-num { font-size: 21px; font-weight: 700; letter-spacing: -.03em; line-height: 1;
                 color: var(--ctl-ink); font-variant-numeric: tabular-nums; }
.ctl-gauge-meta { font-size: 11px; color: var(--ctl-faint); line-height: 1.35; }

/* Severity rows. Severity is an ORDERED status scale, so it gets one hue
   stepped light-to-dark, not four separate warm hues — red against orange
   against amber is indistinguishable to a colour-blind reader, and every row
   carries its name in text regardless. */
.ctl-sev-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; display: block; }
.ctl-sev-critical { background: #7f1d1d; }
.ctl-sev-high     { background: #b91c1c; }
.ctl-sev-medium   { background: #ef4444; }
.ctl-sev-low      { background: #f87171; }
.ctl-sev-info     { background: var(--ctl-faint); }

/* A part-to-whole strip. 2px surface gaps between fills, per the mark spec. */
.ctl-stack { display: flex; gap: 2px; height: 10px; }
.ctl-stack > span { display: block; border-radius: 2px; }
.ctl-stack > span:first-child { border-radius: 5px 2px 2px 5px; }
.ctl-stack > span:last-child  { border-radius: 2px 5px 5px 2px; }

/* A denser table, for a wide grid of small values — the platform console's
   network list, where eight columns of counts otherwise spend 320px on cell
   padding alone and force a horizontal scrollbar on a laptop. */
/* Reserve room for a two-word network name only where there is room to
   reserve; below the fit threshold the cell shrinks and the name wraps. */
@media (min-width: 1401px) { .ctl-name-cell { min-width: 176px; } }

.ctl-table-compact th,
.ctl-table-compact td { padding-left: 12px; padding-right: 12px; }
.ctl-table-compact td { font-size: 13px; }
/* On a dense table the HEADERS are what set the minimum width — the values are
   two or three digits, while "MEMBERS" in wide uppercase tracking needs 80px.
   Tightening the header alone buys back ~40px across six columns. */
.ctl-table-compact thead th { font-size: 10px; letter-spacing: .05em; }

/* A long hostname is the table's width floor — it cannot shrink and no amount
   of trimming elsewhere gets past it. Below the width where the table fits, let
   it break instead, so a narrow window wraps one cell rather than scrolling the
   whole table sideways. Two lines of hostname beats a scrollbar. */
/* Between the point where the sidebar still takes its full 296px and the point
   where the shell reflows, the content column is at its tightest — so the shell
   gives back some of its own padding there rather than letting a table scroll. */
@media (max-width: 1200px) {
  .ctl-main { padding-left: 1rem; padding-right: 1rem; }
  .max-w-7xl.px-6 { padding-left: .75rem; padding-right: .75rem; }
}

@media (max-width: 1400px) {
  .ctl-break-anywhere { overflow-wrap: anywhere; word-break: break-word; }
  /* Anything held on one line above the fit threshold has to be allowed to
     wrap below it, or a single nowrap cell re-creates the scrollbar the rest of
     this work removed. */
  .ctl-nowrap-wide { white-space: normal; }
}

/* ── Tool tiles ───────────────────────────────────────────────────────────
   Square cards in a grid. `aspect-ratio: 1` sets the shape, but the tile is
   also given a min-height and allowed to grow past the square — a tile that
   clips its own description to stay geometrically perfect is a worse tile.
   The three rows (mark, text, action) are a grid so the button sits on the
   same baseline across the row no matter how long the copy is. */
.ctl-tile {
  aspect-ratio: 1 / 1;
  min-height: 250px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 18px;
  background: var(--ctl-surface);
  border: 1px solid var(--ctl-border);
  border-radius: var(--ctl-radius);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.ctl-tile:hover {
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 16px 32px -16px rgba(79,70,229,0.4), 0 1px 0 rgba(255,255,255,0.04) inset;
  transform: translateY(-2px);
}
/* Not built yet: recessive, so the live tools read first. */
.ctl-tile.is-planned { background: var(--ctl-tint); }
.ctl-tile.is-planned .ctl-tile-mark { opacity: .5; }
.ctl-tile.is-planned .ctl-tile-name { color: var(--ctl-muted); }

.ctl-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ctl-tile-mark {
  width: 38px; height: 38px; flex: none;
  border-radius: 10px;
  background: var(--ctl-blue-soft);
  color: var(--ctl-blue);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
}

.ctl-tile-body { min-width: 0; overflow: hidden; }
.ctl-tile-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em;
                 color: var(--ctl-ink); }
.ctl-tile-tagline { font-size: 11.5px; margin-top: 2px; color: var(--ctl-faint); }
/* Clamped rather than truncated at a character count: the cut lands on a line
   boundary and adapts to the tile's real width. */
.ctl-tile-desc {
  font-size: 12.5px; line-height: 1.5; margin-top: 8px; color: var(--ctl-body);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6;
  overflow: hidden;
}
.ctl-tile-foot { align-self: end; }

/* A usable tool's whole tile is the link, so the click target is the thing the
   member is looking at rather than a button in the corner of a square. */
a.ctl-tile-link { color: inherit; text-decoration: none; }
a.ctl-tile-link:hover { border-color: var(--ctl-blue); }
a.ctl-tile-link:focus-visible {
  outline: 2px solid var(--ctl-blue);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  /* One per row on a phone, where a square would waste most of the screen. */
  .ctl-tile { aspect-ratio: auto; min-height: 0; }
  .ctl-tile-desc { -webkit-line-clamp: 3; }
}

/* ============================================================================
   Tailwind utility remap
   ----------------------------------------------------------------------------
   ~450 inherited `slate-*` / `blue-*` utilities in the templates. Tailwind's
   slate is close to but not on the TLN palette, so they are remapped here in one
   place rather than edited across 44 files. Loads after the Tailwind CDN and
   matches its specificity, so it wins on order.

   New markup should use the semantic classes above.
   ========================================================================= */
.text-slate-900, .text-slate-800, .text-slate-700 { color: var(--ctl-ink) !important; }
.text-slate-600 { color: var(--ctl-body) !important; }
.text-slate-500 { color: var(--ctl-muted) !important; }
.text-slate-400, .text-slate-300 { color: var(--ctl-faint) !important; }

.bg-slate-50  { background-color: var(--ctl-tint) !important; }
.bg-slate-100 { background-color: var(--ctl-sunk) !important; }
.bg-slate-200 { background-color: rgba(255,255,255,0.1) !important; }

.border-slate-100, .border-slate-200 { border-color: var(--ctl-border-soft) !important; }
.border-slate-300, .border-slate-400 { border-color: var(--ctl-border) !important; }

.text-blue-600, .text-blue-700 { color: var(--ctl-blue) !important; }
.bg-blue-500, .bg-blue-600 { background-color: var(--ctl-action) !important; }
.bg-blue-700, .hover\:bg-blue-700:hover { background-color: var(--ctl-action-hover) !important; }
.bg-blue-50, .bg-blue-100 { background-color: var(--ctl-info-bg) !important; }
.border-blue-200, .border-blue-400 { border-color: rgba(124,107,240,0.4) !important; }
.bg-violet-600, .bg-violet-500 { background-color: var(--ctl-action) !important; }
.text-violet-600 { color: var(--ctl-blue) !important; }
.border-violet-400 { border-color: var(--ctl-blue) !important; }
.bg-violet-50 { background-color: var(--ctl-blue-soft) !important; }
.text-indigo-300, .text-indigo-400 { color: var(--ctl-blue) !important; }
.border-indigo-500 { border-color: var(--ctl-blue) !important; }
.bg-indigo-500 { background-color: var(--ctl-action) !important; }

/* Semantic Tailwind families (amber/red/green/emerald…) used directly in a
   handful of templates instead of the .ctl-chip-* classes. Tailwind's own
   50/100 shades are near-white and its 500+ shades assume dark text on a
   light card — both disappear or clash on this theme's dark surfaces, so they
   are remapped to the same semantic tokens the chip classes use. One file
   fixes every stray badge rather than sweeping each template. */
.bg-amber-50, .bg-amber-100  { background-color: var(--ctl-warn-bg) !important; }
.bg-amber-500, .bg-amber-600 { background-color: var(--ctl-warn) !important; color: #2b1a03 !important; }
.text-amber-500, .text-amber-600, .text-amber-700,
.text-amber-800, .text-amber-900 { color: var(--ctl-warn) !important; }
.border-amber-100, .border-amber-200, .border-amber-300,
.border-amber-500 { border-color: rgba(251,191,36,0.4) !important; }

.bg-red-50, .bg-red-100 { background-color: var(--ctl-bad-bg) !important; }
.text-red-500, .text-red-700 { color: var(--ctl-bad) !important; }
.border-red-200, .border-red-300 { border-color: rgba(251,113,133,0.4) !important; }

.bg-green-50, .bg-green-100 { background-color: var(--ctl-good-bg) !important; }
.bg-green-500, .bg-green-600, .bg-green-700 { background-color: var(--ctl-good) !important; color: #042713 !important; }
.text-green-500, .text-green-600, .text-green-700, .text-green-800 { color: var(--ctl-good) !important; }
.border-green-200, .border-green-500 { border-color: rgba(74,222,128,0.4) !important; }

.bg-white { background-color: var(--ctl-surface) !important; }

/* The `hover:` variants of the above. Tailwind's CDN build generates these as
   literal classes from what appears in the markup, each needing the same
   token so a hover state does not flash the old light palette. */
.hover\:bg-slate-50:hover, .hover\:bg-slate-100:hover { background-color: var(--ctl-sunk) !important; }
.hover\:bg-slate-200:hover { background-color: rgba(255,255,255,0.14) !important; }
.hover\:bg-white:hover { background-color: var(--ctl-surface) !important; }
.hover\:border-slate-300:hover, .hover\:border-slate-400:hover { border-color: rgba(255,255,255,0.22) !important; }
.hover\:text-slate-600:hover, .hover\:text-slate-700:hover, .hover\:text-slate-800:hover { color: var(--ctl-ink) !important; }
.hover\:text-blue-600:hover { color: var(--ctl-blue) !important; }
.hover\:bg-blue-700:hover { background-color: var(--ctl-action-hover) !important; }
.hover\:bg-red-50:hover { background-color: var(--ctl-bad-bg) !important; }
.hover\:bg-amber-100:hover, .hover\:bg-amber-600:hover { background-color: var(--ctl-warn-bg) !important; }
.hover\:bg-green-700:hover { background-color: var(--ctl-good) !important; }

/* ============================================================================
   Auth pages — auth/_layout.html, driven by static/js/auth-fx.js
   ----------------------------------------------------------------------------
   Split screen: a navy brand panel with a live constellation in the logo's
   colours, and the form on the light ground. Cursor effects — the spotlight
   on the panel and the glow on the card's edge — read the pointer position
   from custom properties, and are off on touch screens and under reduced
   motion (auth-fx.js simply does not start them). Without the script this is
   a still, complete page. A trailing cursor ring was tried and removed at the
   owner's request: the effects follow the pointer, they do not replace it.
   ========================================================================= */
.ctl-auth { background: var(--ctl-ground); }
.ctl-auth-shell { display: flex; min-height: 100vh; }

/* ── The brand panel ───────────────────────────────────────────────────── */
.ctl-auth-hero {
  position: relative;
  flex: 0 0 46%;
  max-width: 680px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(60rem 40rem at 110% 110%, rgba(139,92,246,0.5), transparent 60%),
    radial-gradient(40rem 30rem at -10% -10%, rgba(34,211,238,0.14), transparent 60%),
    #0b1f3a;
  --mx: 50%; --my: 40%;
}
.ctl-auth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The spotlight that follows the cursor across the panel. */
.ctl-auth-spot {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(22rem 22rem at var(--mx) var(--my),
              rgba(61,139,255,0.22), transparent 70%);
  transition: opacity 400ms ease;
}
.ctl-auth-hero-inner {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 56px 36px;
}
.ctl-auth-pitch { position: relative; max-width: 30rem; }
/* A soft navy backing so constellation dots drifting under the copy never
   cut through a letter. Blurred, so it reads as depth rather than a box. */
.ctl-auth-pitch::before {
  content: ""; position: absolute; inset: -40px -60px -40px -70px; z-index: -1;
  background: radial-gradient(closest-side, rgba(11,31,58,0.85), rgba(11,31,58,0) 100%);
  pointer-events: none;
}
.ctl-auth-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #7fb3ff;
  animation: ctl-rise-in 600ms 100ms cubic-bezier(.2,.7,.2,1) backwards;
}
.ctl-auth-headline {
  margin-top: 14px;
  font-size: clamp(30px, 3.1vw, 44px); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.03em;
  animation: ctl-rise-in 700ms 180ms cubic-bezier(.2,.7,.2,1) backwards;
}
.ctl-auth-headline span {
  background: linear-gradient(90deg, #3d8bff, #22d3ee 55%, #f5b942);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ctl-auth-points { margin-top: 32px; display: grid; gap: 14px; }
.ctl-auth-points li {
  display: flex; align-items: center; gap: 14px;
  font-size: 15px; color: rgba(255,255,255,0.82);
  animation: ctl-rise-in 600ms cubic-bezier(.2,.7,.2,1) backwards;
  animation-delay: calc(300ms + var(--i) * 90ms);
}
.ctl-auth-point-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: #7fb3ff;
  backdrop-filter: blur(4px);
}
.ctl-auth-legal { font-size: 12px; color: rgba(255,255,255,0.45); }

/* ── The form column ───────────────────────────────────────────────────── */
.ctl-auth-main {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.ctl-auth-column { width: 100%; max-width: 440px; }
.ctl-auth-column.ctl-auth-column-wide { max-width: 560px; }
.ctl-auth-mobile-logo { display: none; justify-content: center; margin-bottom: 28px; }
.ctl-auth-legal-mobile { display: none; text-align: center; font-size: 12px; color: var(--ctl-faint); margin-top: 20px; }

.ctl-auth-card {
  position: relative;
  background: var(--ctl-surface);
  border: 1px solid var(--ctl-border);
  border-radius: 18px;
  padding: 36px 34px 32px;
  box-shadow: 0 1px 2px rgba(11,31,58,.04), 0 24px 48px -24px rgba(11,31,58,.18);
  animation: ctl-rise-in 520ms cubic-bezier(.2,.7,.2,1) backwards;
  --gx: 50%; --gy: 0%; --glow: 0;
}
/* The edge glow: a gradient border masked to the 1px ring, centred on the
   cursor. --glow fades it in only while the pointer is near the card. */
.ctl-auth-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: radial-gradient(18rem 18rem at var(--gx) var(--gy),
              rgba(139,92,246,0.9), rgba(34,211,238,0.5) 35%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: var(--glow); transition: opacity 300ms ease;
  pointer-events: none;
}
.ctl-auth-card .ctl-input { padding-top: .75rem; padding-bottom: .75rem; }

.ctl-auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0 18px;
  font-size: 12px; color: var(--ctl-faint);
}
.ctl-auth-divider::before, .ctl-auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--ctl-divider);
}
.ctl-auth-back { font-size: 14px; color: var(--ctl-blue); }
.ctl-auth-back:hover { text-decoration: underline; }

.ctl-auth-alert {
  margin-bottom: 18px; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; line-height: 1.5; border: 1px solid transparent;
  animation: ctl-rise-in 300ms ease backwards;
}
.ctl-auth-alert-bad  { background: var(--ctl-bad-bg);  color: var(--ctl-bad);  border-color: rgba(251,113,133,0.35); }
.ctl-auth-alert-good { background: var(--ctl-good-bg); color: var(--ctl-good); border-color: rgba(74,222,128,0.35); }
.ctl-auth-alert-warn { background: var(--ctl-warn-bg); color: var(--ctl-warn); border-color: rgba(251,191,36,0.35); }
.ctl-auth-alert-info { background: var(--ctl-info-bg); color: var(--ctl-body); border-color: rgba(124,107,240,0.3); }

/* Show / hide password — the button auth-fx.js adds inside the field. */
.ctl-pw-wrap { position: relative; }
.ctl-pw-wrap .ctl-input { padding-right: 2.75rem; }
.ctl-pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; color: var(--ctl-faint);
  transition: color 140ms ease, background 140ms ease;
}
.ctl-pw-toggle:hover { color: var(--ctl-ink); background: var(--ctl-sunk); }
.ctl-pw-toggle:focus-visible { outline: 2px solid var(--ctl-blue); outline-offset: 1px; }

/* Submit in flight: the label gives way to a spinner. */
.ctl-btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.ctl-btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff;
  animation: ctl-spin 700ms linear infinite;
}
.ctl-btn-ghost.is-busy::after { border-color: var(--ctl-border); border-top-color: var(--ctl-blue); }
@keyframes ctl-spin { to { transform: rotate(360deg); } }

@media (max-width: 1023px) {
  .ctl-auth-hero { display: none; }
  .ctl-auth-mobile-logo, .ctl-auth-legal-mobile { display: flex; }
  .ctl-auth-legal-mobile { display: block; }
  .ctl-auth-main { align-items: flex-start; padding-top: 48px; }
}
@media (max-width: 480px) {
  .ctl-auth-card { padding: 28px 22px 24px; border-radius: 16px; }
  .ctl-auth-mobile-logo .tln-mark { height: 36px; }
  .ctl-auth-mobile-logo .tln-logo-name { font-size: 14px; }
}

/* ───────────────────────────────────────────────────────────────────────────
   Claim landing page — claim/claim.html, claim/_matches.html
   The page a prospect reaches from "your profile is ready". It has to sell the
   network in one scroll, so it is a landing page rather than an auth form:
   a navy band with their name, then three ranked lists (events, people,
   Leaders), with the claim card pinned beside them on desktop and a pinned
   bar on a phone. Flat surfaces like the rest of the product; the only shadow
   is on the pinned card and bar, which genuinely float over the content.
   ─────────────────────────────────────────────────────────────────────────── */
.ctl-claim { background: var(--ctl-ground); color: var(--ctl-body); }
.ctl-claim-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.ctl-claim-bar {
  position: sticky; top: 0; z-index: 40;
  background: var(--ctl-bar); color: var(--ctl-bar-ink);
  border-bottom: 1px solid var(--ctl-bar-line);
}
.ctl-claim-bar-inner { height: 60px; display: flex; align-items: center; gap: 24px; }
.ctl-claim-nav { display: flex; gap: 4px; margin-left: auto; }
.ctl-claim-nav a {
  font-size: 14px; font-weight: 500; color: var(--ctl-bar-muted);
  padding: 8px 12px; border-radius: 8px; transition: background 140ms ease, color 140ms ease;
}
.ctl-claim-nav a:hover, .ctl-claim-nav a.is-active { color: #fff; background: var(--ctl-bar-hover); }
.ctl-claim-nav .ctl-claim-nav-count {
  font-size: 11px; font-weight: 600; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,0.14); color: #fff;
}

.ctl-claim-hero { background: var(--ctl-bar); color: #fff; padding: 40px 0 88px; }
.ctl-claim-hero-grid { display: flex; align-items: center; gap: 28px; }
.ctl-claim-hero-avatar { border-radius: 999px; box-shadow: 0 0 0 4px rgba(255,255,255,0.14); }
.ctl-claim-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #7cc4ff;
}
.ctl-claim-title {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.1;
  letter-spacing: -0.025em; margin-top: 6px;
}
.ctl-claim-lede { font-size: 16px; line-height: 1.55; color: var(--ctl-bar-muted); margin-top: 10px; max-width: 40rem; }
.ctl-claim-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ctl-claim-stat {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--ctl-bar-line);
  font-size: 13px; color: var(--ctl-bar-muted);
}
.ctl-claim-stat b { font-size: 16px; color: #fff; font-variant-numeric: tabular-nums; }
.ctl-claim-stat-hot { background: rgba(124,107,240,0.35); border-color: rgba(124,196,255,0.45); color: #fff; }

/* Body: content column + pinned claim card, pulled up into the navy band. */
.ctl-claim-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px;
  margin-top: -56px; padding-bottom: 64px; align-items: start;
}
.ctl-claim-aside { position: sticky; top: 76px; }
.ctl-claim-card {
  background: var(--ctl-surface); border: 1px solid var(--ctl-border);
  border-radius: 16px; padding: 22px;
}
.ctl-claim-aside .ctl-auth-card { padding: 24px 22px 22px; animation: none; }
.ctl-claim-aside .ctl-auth-card .ctl-input { padding-top: .625rem; padding-bottom: .625rem; }

.ctl-claim-section { scroll-margin-top: 80px; margin-top: 28px; }
.ctl-claim-section-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.ctl-claim-section-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--ctl-blue-soft); color: var(--ctl-blue);
}
.ctl-claim-section-title { font-size: 20px; font-weight: 700; color: var(--ctl-ink); letter-spacing: -0.01em; line-height: 1.2; }
.ctl-claim-section-sub { font-size: 13px; color: var(--ctl-muted); margin-top: 2px; }
.ctl-claim-unlock {
  margin-left: auto; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ctl-blue);
}
.ctl-claim-unlock:hover { text-decoration: underline; }

/* Interest chips: a real checkbox under each, so the picks post with the
   claim form and work with JavaScript off. */
.ctl-claim-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.ctl-claim-topic { position: relative; cursor: pointer; }
.ctl-claim-topic input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ctl-claim-topic > span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--ctl-surface); color: var(--ctl-body); border: 1px solid var(--ctl-border);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.ctl-claim-topic:hover > span { border-color: rgba(255,255,255,0.22); }
.ctl-claim-topic.is-suggested > span { border-style: dashed; border-color: rgba(124,107,240,0.5); }
.ctl-claim-topic input:checked + span {
  background: var(--ctl-blue); border-color: var(--ctl-blue); border-style: solid; color: #fff;
}
.ctl-claim-topic input:focus-visible + span { outline: 2px solid var(--ctl-blue); outline-offset: 2px; }
.ctl-claim-topic .ctl-claim-tick { display: none; }
.ctl-claim-topic input:checked + span .ctl-claim-tick { display: inline; }
.ctl-claim-matches { transition: opacity 160ms ease; }
.ctl-claim-matches.htmx-request { opacity: .55; }

/* Events */
.ctl-claim-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ctl-claim-event {
  background: var(--ctl-surface); border: 1px solid var(--ctl-border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
}
.ctl-claim-event-cover { position: relative; aspect-ratio: 16 / 9; background: var(--ctl-tint); }
.ctl-claim-event-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ctl-claim-date {
  position: absolute; left: 12px; top: 12px; width: 48px; border-radius: 10px;
  background: #fff; text-align: center; padding: 5px 0 6px; color: #0b1f3a;
  box-shadow: 0 2px 8px rgba(11,31,58,0.18);
}
.ctl-claim-date small { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--ctl-blue); }
.ctl-claim-date b { display: block; font-size: 18px; line-height: 1; font-weight: 800; }
.ctl-claim-past-tag {
  position: absolute; right: 10px; top: 12px; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; background: rgba(11,31,58,0.78); color: #fff;
}
.ctl-claim-event-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ctl-claim-event-title {
  font-size: 15px; font-weight: 700; color: var(--ctl-ink); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ctl-claim-when { font-size: 13px; color: var(--ctl-muted); }

/* The reason line every recommendation carries. */
.ctl-claim-why {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: 12px; font-weight: 600; color: var(--ctl-blue);
  background: var(--ctl-blue-soft); padding: 3px 9px; border-radius: 999px;
}
.ctl-claim-why-mute { color: var(--ctl-muted); background: var(--ctl-sunk); }

/* People */
.ctl-claim-people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ctl-claim-person {
  background: var(--ctl-surface); border: 1px solid var(--ctl-border); border-radius: 14px;
  padding: 18px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.ctl-claim-person-name { font-size: 15px; font-weight: 700; color: var(--ctl-ink); margin-top: 8px; }
.ctl-claim-person-role { font-size: 13px; color: var(--ctl-muted); line-height: 1.35; min-height: 2.7em; }
.ctl-claim-person .ctl-claim-why { align-self: center; margin-top: 6px; }
/* Follow on a card: a toggle pill, saved when the visitor claims. */
.ctl-claim-follow { margin-top: 10px; cursor: pointer; }
.ctl-claim-follow input { position: absolute; opacity: 0; pointer-events: none; }
.ctl-claim-follow span {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--ctl-border); color: var(--ctl-ink); background: var(--ctl-surface);
}
.ctl-claim-follow input:checked + span { background: var(--ctl-blue); border-color: var(--ctl-blue); color: #fff; }
.ctl-claim-follow input:checked + span::before { content: "✓ "; }
.ctl-claim-follow input:focus-visible + span { outline: 2px solid var(--ctl-blue); outline-offset: 2px; }
.ctl-claim-mini-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
.ctl-claim-mini-topics span {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--ctl-sunk); color: var(--ctl-muted);
}
.ctl-claim-mini-topics span.is-shared { background: var(--ctl-blue-soft); color: var(--ctl-blue); font-weight: 600; }

/* A person's chosen topics, left-aligned (directory and Leader cards). The
   claim page's .ctl-claim-mini-topics is the centred variant of the same chip. */
.ctl-topic-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ctl-topic-chips > * {
  font-size: 11px; line-height: 16px; padding: 2px 8px; border-radius: 999px;
  background: var(--ctl-sunk); color: var(--ctl-muted); white-space: nowrap;
  /* A long topic ("Board Reporting & Risk Communication") must not run past
     the card edge: shrink to the row and ellipsise; the full name is in title. */
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.ctl-topic-chips > a:hover { color: var(--ctl-ink); }
.ctl-topic-chips > .is-shared { background: var(--ctl-blue-soft); color: var(--ctl-blue); font-weight: 600; }

/* Leaders */
.ctl-claim-leaders { display: grid; gap: 14px; }
.ctl-claim-leader {
  background: var(--ctl-surface); border: 1px solid var(--ctl-border); border-radius: 14px;
  padding: 20px; display: flex; gap: 18px; align-items: flex-start;
}
.ctl-claim-leader-face { position: relative; flex-shrink: 0; }
.ctl-claim-leader-star {
  position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 999px;
  display: grid; place-items: center; background: #f5b301; color: #fff; border: 2px solid #fff;
}
.ctl-claim-leader-name { font-size: 16px; font-weight: 700; color: var(--ctl-ink); }
.ctl-claim-leader-role { font-size: 13px; color: var(--ctl-muted); margin-top: 1px; }
.ctl-claim-leader-blurb {
  font-size: 14px; color: var(--ctl-body); line-height: 1.5; margin-top: 8px;
  padding-left: 12px; border-left: 3px solid var(--ctl-blue-soft);
}
.ctl-claim-caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ctl-claim-caps span {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--ctl-border); color: var(--ctl-body);
}
.ctl-claim-caps span.is-match { border-color: var(--ctl-blue); color: var(--ctl-blue); font-weight: 600; background: var(--ctl-blue-soft); }

.ctl-claim-empty {
  border: 1px dashed var(--ctl-border); border-radius: 14px; padding: 20px;
  text-align: center; font-size: 14px; color: var(--ctl-muted); background: var(--ctl-surface);
}

/* Phone: the claim card follows the lists, and a pinned bar keeps it one tap away. */
.ctl-claim-dock { display: none; }
@media (max-width: 1023px) {
  .ctl-claim-grid { grid-template-columns: minmax(0, 1fr); }
  .ctl-claim-aside { position: static; }
  .ctl-claim-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctl-claim-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctl-claim-dock {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--ctl-surface); border-top: 1px solid var(--ctl-border);
    box-shadow: 0 -6px 20px -10px rgba(11,31,58,0.25);
    transition: transform 200ms ease;
  }
  .ctl-claim-dock.is-hidden { transform: translateY(110%); }
  .ctl-claim { padding-bottom: 76px; }
}
@media (max-width: 640px) {
  .ctl-claim-container { padding: 0 16px; }
  .ctl-claim-nav a:not(.ctl-claim-nav-cta) { display: none; }
  .ctl-claim-hero { padding: 28px 0 76px; }
  .ctl-claim-hero-grid { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ctl-claim-events { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%;
                      overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .ctl-claim-event { scroll-snap-align: start; }
  .ctl-claim-people { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ctl-claim-person { flex-direction: row; text-align: left; align-items: flex-start; gap: 12px; padding: 14px; }
  .ctl-claim-person-name { margin-top: 0; }
  .ctl-claim-person-role { min-height: 0; }
  .ctl-claim-person .ctl-claim-why { align-self: flex-start; }
  .ctl-claim-mini-topics { justify-content: flex-start; }
  .ctl-claim-leader { flex-direction: column; gap: 12px; }
  .ctl-claim-unlock { display: none; }
}

/* ── Chat room ─────────────────────────────────────────────────────────────
   The network's one room (community/chat.html): full height with the composer
   pinned to the bottom, day separators, consecutive messages from one person
   grouped under one name. Flat like every other surface. */
.ctl-chat-room { height: calc(100vh - 9rem); min-height: 26rem; }
.ctl-chat-head { border-bottom: 1px solid var(--ctl-border); }
.ctl-chat-composer { border-top: 1px solid var(--ctl-border); }
.ctl-chat-box { border: 1px solid var(--ctl-border); background: var(--ctl-surface); }
.ctl-chat-box:focus-within { border-color: var(--ctl-blue); }
.ctl-chat-day {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 8px; font-size: 11px; font-weight: 600;
  color: var(--ctl-faint); text-transform: uppercase; letter-spacing: .04em;
}
.ctl-chat-day::before, .ctl-chat-day::after { content: ""; flex: 1; height: 1px; background: var(--ctl-border); }
.ctl-chat-msg { display: flex; gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; }
.ctl-chat-msg:hover { background: var(--ctl-sunk); }
.ctl-chat-msg.is-grouped { padding-top: 1px; padding-bottom: 1px; }
.ctl-chat-msg.is-mine { box-shadow: inset 2px 0 0 var(--ctl-blue); }
.ctl-chat-gutter { width: 36px; flex-shrink: 0; display: flex; justify-content: center; }
.ctl-chat-time-hover { font-size: 10px; color: var(--ctl-faint); line-height: 24px; visibility: hidden; }
.ctl-chat-msg:hover .ctl-chat-time-hover { visibility: visible; }
.ctl-chat-msg { position: relative; }
/* Reactions take space only when a message has some. The "+" sits in the
   message's top-right corner, shown on hover / focus — and always, faintly,
   on touch screens, which have no hover. */
.ctl-chat-reactions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctl-chat-reactions.has-reactions { margin-top: 4px; }
.ctl-chat-react-add { position: absolute; top: 4px; right: 6px; opacity: 0; }
.ctl-chat-msg:hover .ctl-chat-react-add, .ctl-chat-react-add:focus-within { opacity: 1; }
@media (hover: none) { .ctl-chat-react-add { opacity: .6; } }
.ctl-chat-reaction {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px;
  border-radius: 999px; font-size: 12px;
  background: var(--ctl-surface); border: 1px solid var(--ctl-border); color: var(--ctl-body);
}
@media (max-width: 1023px) {
  /* Room for the top bar and the bottom tab bar on a phone. */
  .ctl-chat-room { height: calc(100vh - 11.5rem); }
}

/* What a planned tool will do (tools/index.html). */
.ctl-tile-features { margin-top: 8px; padding-left: 0; list-style: none; font-size: 12px; color: var(--ctl-muted); }
.ctl-tile-features li { position: relative; padding-left: 14px; margin-top: 3px; line-height: 1.4; }
.ctl-tile-features li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 5px; height: 5px;
  border-radius: 999px; background: var(--ctl-blue); }

/* Network Map (community/network_map.html) — a visual read of the same
   connection graph /members lists. Flat dark card, no glass; the graph is
   server-rendered inline SVG per CLAUDE.md's "no charting library" rule. */
.ctl-netmap-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .ctl-netmap-layout { grid-template-columns: 1fr; } }

.ctl-netmap-filters { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 80px; }
.ctl-netmap-filter-group label.ctl-label { display: block; margin-bottom: 6px; }
.ctl-netmap-check {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--ctl-radius-sm);
  border: 1px solid var(--ctl-border); background: var(--ctl-surface); font-size: 13px; color: var(--ctl-body);
  cursor: pointer; transition: border-color 140ms ease, background 140ms ease;
}
.ctl-netmap-check:hover { border-color: rgba(255,255,255,0.18); }
.ctl-netmap-check input { accent-color: var(--ctl-blue); width: 15px; height: 15px; }
.ctl-netmap-check.is-locked { opacity: .75; cursor: default; }

.ctl-netmap-stage { position: relative; min-height: 420px; border-radius: var(--ctl-radius);
  background: radial-gradient(circle at 50% 38%, rgba(124,107,240,0.14), transparent 62%), var(--ctl-surface);
  border: 1px solid var(--ctl-border); box-shadow: var(--ctl-shadow-card); overflow: hidden; }
/* Scoped to the graph svg itself, never ".ctl-netmap-stage svg" — that
   descendant selector also matched the detail card's small icons (the card
   is a child of .ctl-netmap-stage) and overrode their Tailwind w-3.5/h-3.5
   sizing with a 132px icon, because a class+type selector outranks a single
   Tailwind utility class regardless of source order. */
.ctl-netmap-graph { width: 100%; height: auto; display: block; }

.ctl-netmap-edge { stroke: var(--ctl-blue); stroke-width: 1.25; opacity: .38; }
.ctl-netmap-edge.is-tier2 { stroke: var(--ctl-faint); stroke-width: 1; opacity: .3; stroke-dasharray: 3 4; }

.ctl-netmap-node { cursor: pointer; transition: transform 140ms ease; transform-box: fill-box; transform-origin: center; }
.ctl-netmap-node:hover, .ctl-netmap-node.is-selected { transform: scale(1.12); }
.ctl-netmap-node-ring { fill: none; stroke: var(--ctl-blue); stroke-width: 2; }
.ctl-netmap-node.is-tier2 .ctl-netmap-node-ring { stroke: var(--ctl-faint); stroke-width: 1.4; opacity: .7; }
.ctl-netmap-node-face { fill: var(--ctl-sunk); }
.ctl-netmap-node-initials { fill: var(--ctl-ink); font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.ctl-netmap-node-label { fill: var(--ctl-body); font-size: 10.5px; text-anchor: middle; }

.ctl-netmap-center-glow { fill: url(#ctl-netmap-glow); }
.ctl-netmap-center-ring { fill: none; stroke: url(#ctl-netmap-gradient); stroke-width: 3; }
.ctl-netmap-center-face { fill: var(--ctl-sunk); }

.ctl-netmap-detail {
  position: absolute; right: 16px; bottom: 16px; width: 248px; padding: 14px;
  background: var(--ctl-surface); border: 1px solid var(--ctl-border); border-radius: var(--ctl-radius-sm);
  box-shadow: var(--ctl-shadow-pop);
}
@media (max-width: 640px) { .ctl-netmap-detail { position: static; width: auto; margin-top: 14px; } }
.ctl-netmap-detail-name { font-weight: 600; color: var(--ctl-ink); font-size: 14px; }
.ctl-netmap-detail-role { font-size: 12px; color: var(--ctl-faint); margin-top: 1px; }
.ctl-netmap-detail-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ctl-body); margin-top: 9px; }
.ctl-netmap-detail-topics { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ctl-netmap-legend { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--ctl-faint); }
.ctl-netmap-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 5px; }

/* ── Event organiser pages: compact form, stepper, audience, analytics ─────── */
.ctl-compact .ctl-input, .ctl-compact .ctl-select, .ctl-compact .ctl-textarea {
  padding: 0.4375rem 0.75rem; font-size: 13.5px;
}
.ctl-compact .ctl-select { padding-right: 2rem; background-position: right 0.75rem center; }
.ctl-compact .ctl-textarea { line-height: 1.5; }
.ctl-compact .ctl-label { font-size: 12px; margin-bottom: 0.25rem; }
.ctl-steps { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ctl-faint); }
.ctl-step { display: inline-flex; align-items: center; gap: 7px; }
.ctl-step-n { width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 600; border: 1px solid var(--ctl-border); }
.ctl-step-on { color: var(--ctl-ink); font-weight: 600; }
.ctl-step-on .ctl-step-n { background: var(--ctl-blue); border-color: transparent; color: #fff; }
.ctl-step-bar { width: 28px; height: 1px; background: var(--ctl-border); }
.ctl-optchip { display: inline-flex; align-items: center; padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 12.5px; color: var(--ctl-body); background: var(--ctl-surface); border: 1px solid var(--ctl-border);
  cursor: pointer; user-select: none; }
.ctl-optchip:hover { border-color: rgba(255,255,255,0.22); }
/* Unselected options sit back (darker, muted); selected ones are bright, bold
   and carry a tick, so the choice never rests on colour alone. */
.ctl-optchip { background: #eef1f6; color: #1b2a41; border-color: #c9d1de; }
.ctl-optchip:hover { background: #fff; border-color: #1769e0; }
.ctl-optchip-on, .ctl-optchip-on:hover { background: var(--ctl-blue); border-color: #fff; color: #fff; font-weight: 600;
  box-shadow: 0 0 0 2px rgba(124,107,240,0.35); }
button.ctl-optchip-on::before { content: "\2713"; margin-right: 0.35rem; font-weight: 700; }
.ctl-stat { border: 1px solid var(--ctl-border); border-radius: var(--ctl-radius-sm); padding: 0.75rem 1rem;
  background: var(--ctl-surface); }
.ctl-stat-n { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ctl-ink); }
.ctl-stat-l { font-size: 12px; color: var(--ctl-muted); margin-top: 2px; }
.ctl-rsvp-seg { display: inline-flex; border: 1px solid var(--ctl-border); border-radius: var(--ctl-radius-sm); overflow: hidden; }
.ctl-rsvp-seg button { padding: 0.5rem 1rem; font-size: 13.5px; color: var(--ctl-body); background: var(--ctl-surface);
  border: 0; border-right: 1px solid var(--ctl-border); cursor: pointer; }
.ctl-rsvp-seg button:last-child { border-right: 0; }
.ctl-rsvp-seg button:hover { background: var(--ctl-sunk); }
.ctl-rsvp-seg button.is-on { background: var(--ctl-blue); color: #fff; font-weight: 600; }

/* Anything the user types into or picks from is LIGHT on the dark shell, so the
   editable parts are obvious at a glance. Placed last so it wins the cascade. */
.ctl-input, .ctl-select, .ctl-textarea { background-color: #f4f6fa; color: #14213a; border-color: #c9d1de; }
.ctl-input::placeholder, .ctl-textarea::placeholder { color: #6b7587; }
.ctl-input:focus, .ctl-select:focus, .ctl-textarea:focus { background-color: #fff; }
.ctl-select option { color: #14213a; background: #fff; }
.ctl-btn-ghost.ctl-tool { background: #eef1f6; color: #1b2a41; border-color: #c9d1de; }
/* The email preview is a real white page: the dark remap of .bg-white must not touch it. */
.ctl-mail-preview { background: #fff !important; color: #1f2937 !important; border-color: #d5dbe6 !important; }

/* Audience page: the networks picker is a primary control, so its chips are
   larger, and the house network (the default, Technology Leaders) is a warm
   amber: it stands out as the starting point without the "error" reading of red. */
.ctl-optchip-lg { padding: 0.5rem 1rem; font-size: 0.9rem; }
.ctl-optchip-house { background: #fff3dc; color: #8a4b00; border-color: #f0b45a; font-weight: 600; }
.ctl-optchip-house:hover { background: #fff; border-color: #d97706; }
.ctl-optchip-house.ctl-optchip-on, .ctl-optchip-house.ctl-optchip-on:hover { background: #b45309; border-color: #fff; color: #fff; }
:root[data-theme="dark"] .ctl-optchip-house:not(.ctl-optchip-on) { background: rgba(245,158,11,0.16); color: #fcd34d; border-color: rgba(245,158,11,0.55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ctl-optchip-house:not(.ctl-optchip-on) { background: rgba(245,158,11,0.16); color: #fcd34d; border-color: rgba(245,158,11,0.55); } }

/* ── Compose-the-invitation page (event_message.html) ───────────────────── */
.ctl-compose .ctl-panel { padding: 1.25rem; }
.ctl-compose .ctl-panel-title { display: block; font-size: 14px; font-weight: 700; color: var(--ctl-ink); margin-bottom: 0.75rem; }
.ctl-compose .ctl-input, .ctl-compose .ctl-select { font-size: 13.5px; }
.ctl-notice { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; border-radius: 12px; font-size: 13.5px;
  background: rgba(32, 97, 240, 0.08); border: 1px solid rgba(32, 97, 240, 0.28); color: var(--ctl-body); }
.ctl-editor { border: 1px solid var(--ctl-border); border-radius: 12px; overflow: hidden; background: #fff; }
.ctl-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 8px; border-bottom: 1px solid #e3e6ef; background: #f6f7fb; }
.ctl-toolbar button { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  color: #1b2a41; font-size: 14px; background: transparent; }
.ctl-toolbar button:hover { background: #e7eaf3; }
.ctl-toolbar button:disabled { opacity: .5; }
.ctl-toolbar-sep { width: 1px; height: 18px; background: #d5d9e6; margin: 0 4px; }
.ctl-editor-text { display: block; width: 100%; border: 0; outline: 0; padding: 12px 14px; background: #fff; color: #1b2a41; resize: vertical; min-height: 240px; line-height: 1.55; }
.ctl-editor-foot { display: flex; justify-content: space-between; gap: 8px; padding: 6px 14px 8px; font-size: 11.5px; color: #82858b; background: #fff; }
.ctl-token { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--ctl-border); font-size: 12px; line-height: 16px;
  background: rgba(255,255,255,0.04); color: var(--ctl-body); }
.ctl-token:hover { border-color: var(--ctl-blue); }
.ctl-icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--ctl-blue); }
.ctl-icon-btn:hover { background: rgba(32, 97, 240, 0.10); }
.ctl-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.ctl-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.ctl-switch span { position: absolute; inset: 0; border-radius: 999px; background: #4b5575; transition: background .15s; }
.ctl-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ctl-switch input:checked + span { background: #5b4de0; }
.ctl-switch input:checked + span::after { transform: translateX(18px); }
.ctl-switch input:focus-visible + span { outline: 2px solid #8b83ff; outline-offset: 2px; }
.ctl-seg { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--ctl-border); }
.ctl-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 12px; color: var(--ctl-muted); }
.ctl-seg button.is-on { background: #5b4de0; color: #fff; }


/* ── The guest landing page (claim/guest.html) ─────────────────────────────
   Four stacked cards in the sign-in layout's right column: the answer, the
   event, what the network is, then one button. Dark surfaces, 1px hairlines. */
.ctl-auth-column.ctl-gp-column { max-width: 720px; }
.ctl-gp { display: grid; gap: 16px; }
.ctl-gp-card { border: 1px solid rgba(255,255,255,0.12); border-radius: 18px; background: rgba(255,255,255,0.04); color: #e7ecf8; }
.ctl-gp-answer { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-color: rgba(52,211,153,0.4);
  background: linear-gradient(90deg, rgba(16,185,129,0.14), rgba(255,255,255,0.03)); }
.ctl-gp-answer[data-tone="maybe"] { border-color: rgba(251,191,36,0.4); background: linear-gradient(90deg, rgba(251,191,36,0.12), rgba(255,255,255,0.03)); }
.ctl-gp-answer[data-tone="no"] { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.05); }
.ctl-gp-tick { flex: none; width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: #22c55e; color: #fff; }
.ctl-gp-answer[data-tone="maybe"] .ctl-gp-tick { background: #f59e0b; }
.ctl-gp-answer[data-tone="no"] .ctl-gp-tick { background: #64748b; }
.ctl-gp-tick svg { width: 24px; height: 24px; }
.ctl-gp-answer-title { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.25; }
.ctl-gp-answer-sub { font-size: 13px; color: rgba(231,236,248,0.8); margin-top: 2px; }
.ctl-gp-when { margin-left: auto; flex: none; display: flex; align-items: center; gap: 10px; padding-left: 18px;
  border-left: 1px solid rgba(255,255,255,0.14); font-size: 13px; }
.ctl-gp-when svg { width: 22px; height: 22px; color: #7fb0ff; }
.ctl-gp-when b { display: block; font-weight: 600; color: #fff; }
.ctl-gp-when small { display: block; font-size: 12px; color: rgba(231,236,248,0.75); }

.ctl-gp-event { display: flex; gap: 18px; padding: 18px; }
.ctl-gp-cover { flex: none; width: 240px; min-height: 190px; border-radius: 12px; background-size: cover; background-position: center;
  --gp-fallback: radial-gradient(circle at 30% 30%, rgba(61,139,255,0.8), transparent 60%), linear-gradient(135deg, #0b1f3a, #5b4de0);
  background-image: var(--gp-fallback); }
.ctl-gp-event-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ctl-gp-event-title { font-size: 24px; font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 14px; }
.ctl-gp-line { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #f1f4fb; margin-bottom: 8px; }
.ctl-gp-line svg { width: 22px; height: 22px; flex: none; color: #4aa3ff; }
.ctl-gp-desc { font-size: 13px; color: rgba(231,236,248,0.7); margin-top: 2px; }
.ctl-gp-actions { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.ctl-gp-menu { position: relative; }
.ctl-gp-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; font-size: 14px;
  color: #e7ecf8; padding: 9px 14px; border-radius: 12px; }
.ctl-gp-menu > summary::-webkit-details-marker { display: none; }
.ctl-gp-menu > summary svg { width: 20px; height: 20px; color: #4aa3ff; }
.ctl-gp-menu > summary .ctl-gp-caret { width: 14px; height: 14px; color: rgba(231,236,248,0.7); }
.ctl-gp-menu-right > summary { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); font-weight: 600; }
.ctl-gp-menu > summary:hover { background: rgba(255,255,255,0.1); }
.ctl-gp-menu-list { position: absolute; bottom: calc(100% + 6px); left: 0; min-width: 210px; z-index: 5; display: grid; padding: 6px;
  background: #101a33; border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
.ctl-gp-menu-right .ctl-gp-menu-list { left: auto; right: 0; }
.ctl-gp-menu-list a, .ctl-gp-menu-list button { text-align: left; font-size: 14px; color: #e7ecf8; padding: 9px 12px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; }
.ctl-gp-menu-list a:hover, .ctl-gp-menu-list button:hover { background: rgba(255,255,255,0.09); }

.ctl-gp-discover { position: relative; overflow: hidden; padding: 24px 24px 18px;
  border-color: rgba(96,140,255,0.45);
  background: radial-gradient(40rem 22rem at 105% 0%, rgba(91,77,224,0.55), transparent 60%), linear-gradient(135deg, rgba(14,30,66,0.9), rgba(30,24,80,0.85)); }
.ctl-gp-discover-text { position: relative; z-index: 1; max-width: 22rem; }
.ctl-gp-pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #fff;
  background: #4f5be8; padding: 6px 14px; border-radius: 999px; }
.ctl-gp-discover h2 { font-size: 26px; font-weight: 700; color: #fff; line-height: 1.2; margin: 14px 0 10px; }
.ctl-gp-discover p { font-size: 15px; color: rgba(231,236,248,0.82); line-height: 1.5; }
.ctl-gp-globe { position: absolute; right: -50px; top: -30px; width: 300px; height: 300px; border-radius: 999px; opacity: .9;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.95) 0 2px, transparent 3px) 0 0 / 38px 38px,
    radial-gradient(circle at 50% 50%, rgba(120,170,255,0.6) 0 1.5px, transparent 2.5px) 19px 19px / 38px 38px,
    radial-gradient(circle at 40% 35%, rgba(80,120,255,0.55), rgba(30,20,110,0.2) 60%, transparent 70%);
  -webkit-mask: radial-gradient(circle, #000 55%, transparent 72%); mask: radial-gradient(circle, #000 55%, transparent 72%); }
.ctl-gp-features { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.ctl-gp-features li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #f1f4fb; line-height: 1.25; padding: 4px 12px; }
.ctl-gp-features li + li { border-left: 1px solid rgba(255,255,255,0.14); }
.ctl-gp-features li > span { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); color: #4aa3ff; }
.ctl-gp-features svg { width: 24px; height: 24px; }

.ctl-gp-cta { display: grid; justify-items: center; gap: 14px; margin-top: 4px; }
.ctl-gp-claim { display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; width: 100%; max-width: 470px; padding: 16px 24px; text-decoration: none;
  font-size: 18px; font-weight: 700; color: #fff; border-radius: 14px; background: linear-gradient(90deg, #5b4de0, #7b6cf6);
  box-shadow: 0 10px 28px rgba(91,77,224,0.4); }
.ctl-gp-claim:hover { filter: brightness(1.08); }
.ctl-gp-claim svg { width: 20px; height: 20px; }
.ctl-gp-first { font-size: 15px; text-align: center; color: #cfd8f2; text-decoration: underline; text-underline-offset: 3px; }
.ctl-gp-first:hover { color: #fff; }

@media (max-width: 640px) {
  .ctl-gp-answer { flex-wrap: wrap; }
  .ctl-gp-when { margin-left: 0; padding-left: 0; border-left: 0; width: 100%; }
  .ctl-gp-event { flex-direction: column; }
  .ctl-gp-cover { width: 100%; min-height: 150px; }
  .ctl-gp-globe { opacity: .35; }
  .ctl-gp-features { grid-template-columns: 1fr; gap: 10px; }
  .ctl-gp-features li + li { border-left: 0; }
  .ctl-gp-menu-list { left: 0; right: auto; }
  .ctl-gp-menu-right .ctl-gp-menu-list { right: 0; left: auto; }
}


/* ── Statistics pages (platform + event) ─────────────────────────────────────
   Built for a phone first. Rules: the PAGE never scrolls sideways; a row of tabs
   scrolls inside itself; charts scale to the column; every figure is a link with
   a target a thumb can hit (>= 44px); wide tables become cards under 640px. */
.ctl-tabs-scroll { overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ctl-tabs-scroll::-webkit-scrollbar { display: none; }
.ctl-tabs-scroll > * { flex: 0 0 auto; }

.ctl-fluid svg { max-width: 100%; height: auto; display: block; }
.ctl-chart-link { cursor: pointer; }
.ctl-chart-link:hover text { fill: var(--ctl-blue); }

/* A figure that opens the list behind it. */
a.ctl-stat-tile { display: block; position: relative; color: inherit; text-decoration: none;
                  transition: border-color .12s; min-height: 44px; }
a.ctl-stat-tile::after { content: "\203A"; position: absolute; top: 10px; right: 14px;
                         color: var(--ctl-faint); font-size: 18px; line-height: 1; }
a.ctl-stat-tile:hover, a.ctl-stat-tile:focus-visible { border-color: var(--ctl-blue); }
a.ctl-stat-tile:hover .ctl-num, a.ctl-stat-tile:focus-visible .ctl-num { color: var(--ctl-blue); }
a.ctl-stat-tile:focus-visible, a.ctl-statlink:focus-visible { outline: 2px solid var(--ctl-blue); outline-offset: 2px; }

a.ctl-statlink { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 44px; min-width: 44px;
                 color: inherit; text-decoration: underline; text-decoration-color: var(--ctl-divider);
                 text-underline-offset: 4px; }
a.ctl-statlink:hover { color: var(--ctl-blue); text-decoration-color: var(--ctl-blue); }
/* In a dense desktop table the 44px floor would triple the row height. */
@media (min-width: 640px) { a.ctl-statlink { min-height: 28px; min-width: 0; } }

/* Number-over-label cell inside a card (mobile network / activity rows). */
a.ctl-statcell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px;
                 padding: 4px 2px; border-radius: 8px; color: inherit; text-decoration: none; }
a.ctl-statcell:hover, a.ctl-statcell:focus-visible { background: var(--ctl-sunk, rgba(120,130,160,.12)); }
a.ctl-statcell .ctl-num { font-size: 16px; font-weight: 600; color: var(--ctl-ink); }
a.ctl-statcell .lbl { font-size: 11px; color: var(--ctl-muted); text-align: center; line-height: 1.2; }

/* Buttons and links on these pages: a finger, not a cursor. */
@media (max-width: 639px) {
  .ctl-stats-page .ctl-btn-sm { min-height: 44px; padding-left: 14px; padding-right: 14px; }
  .ctl-stats-page .ctl-tab { min-height: 44px; display: inline-flex; align-items: center; }
  .ctl-stats-page h1 { overflow-wrap: anywhere; }
}
.ctl-wrap-anywhere { overflow-wrap: anywhere; word-break: break-word; }

/* The event's Circle on the guest answer page (services/event_circles.py). */
.ctl-gp-circle { padding: 22px 24px; }
.ctl-gp-circle h2 { font-size: 20px; font-weight: 700; color: #fff; margin: 12px 0 8px; }
.ctl-gp-circle p { font-size: 15px; line-height: 1.5; color: rgba(231,236,248,0.85); }
.ctl-gp-circle strong { color: #fff; }
.ctl-gp-circle-btn { display: inline-flex; margin-top: 14px; padding: 10px 16px; border-radius: 10px;
  background: #1769e0; color: #fff; font-weight: 600; font-size: 14px; }
.ctl-gp-circle-btn:hover { filter: brightness(1.08); }
