/* ============================================================================
   VENDORED FILE — DO NOT EDIT BY HAND.

   Verbatim copy of the canonical CCI design system:
     repo:   cybercraft-institute/cci-styles
     file:   cci.css
     commit: ca51fdfbe452710bfb71c88c6c89fa5836937a21

   Refresh:     npm run sync:cci-styles
   Check drift: npm run sync:cci-styles -- --check
   Update:      bump PINNED_COMMIT in scripts/sync-cci-styles.mjs, then refresh.
   ============================================================================ */

/* ============================================================================
   CyberCraft Institute — shared UI / design system  (cci.css)

   ONE canonical stylesheet for every CCI subdomain: Chat, Events, Members (MMS),
   Network, and the Forum. Dark theme over a vertical gradient, a single yellow
   accent (#ffed00), Outfit + IBM Plex Mono, sharp corners, semi-transparent
   "frosted" panels with a subtle drop shadow.

   ── Usage ──────────────────────────────────────────────────────────────────
   1. Load the brand fonts in <head> (they must be loaded by the host page):

      <link rel="preconnect" href="https://fonts.googleapis.com">
      <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
      <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet">

   2. Link this stylesheet:   <link rel="stylesheet" href="/cci.css">

   This file is self-contained: it includes the design tokens (also available
   on their own in tokens.css), a reset/base, typography, form controls,
   buttons, cards, badges, tables, and header/footer/nav patterns.
   ============================================================================ */

/* ---- Design tokens -------------------------------------------------------- */
:root {
  /* Brand palette */
  --cci-black: #0e0e10;
  --cci-white: #ffffff;
  --cci-yellow: #ffed00;
  --cci-yellow-soft: rgba(255, 237, 0, 0.14);
  --cci-text-highlight: #ffed0066;
  --cci-ink: #f4f4f6;
  --cci-body: #c7c7cd;
  --cci-muted: #a4a4ac;
  --cci-hairline: rgba(255, 255, 255, 0.16);

  /* Semantic colours (dark theme) */
  --color-bg: #0e0e10;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-alt: rgba(255, 255, 255, 0.07);
  --color-border: rgba(255, 255, 255, 0.16);
  --color-text: #c7c7cd;
  --color-heading: #f4f4f6;
  --color-text-muted: #a4a4ac;
  --color-primary: #f4f4f6;
  --color-accent: #ffed00;
  --color-on-primary: #111114;
  --color-on-accent: #111114;
  --color-highlight: var(--cci-yellow-soft);
  --color-danger: #ff6b6b;
  --color-danger-soft: rgba(255, 107, 107, 0.1); /* tinted danger fill (notices) */
  --color-success: #4ade80;

  /* Form controls (frosted, semi-transparent) */
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.28);

  /* Overlay / popup surfaces ("frosted glass") — floating "windows" over page
     content (popovers, search, drawers). See .cci-overlay and tokens.css for
     the backdrop-filter implementer notes. */
  --overlay-bg: rgba(0, 0, 0, 0.65);
  --overlay-blur: blur(16px) saturate(1.1);

  /* Typography */
  --font-sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: 1.75rem;
  --line-height: 1.6;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;

  /* Radius & elevation (sharp corners; avatars/pills stay round) */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.35);

  /* Layout */
  --content-width: 70rem;
  --feed-width: 640px;
  --header-height: 64px;
  --bp-mobile: 640px; /* responsive-nav collapse; CSS @media can't read a var, so the media queries hardcode 640px — keep them in sync. Apps may read this via getComputedStyle. */
  --cci-gradient: linear-gradient(to bottom, #60606a 0%, #0e0e10 100%);

  color-scheme: dark;
}

/* ---- Reset & base --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  /* Fixed so the gradient covers the viewport and never tiles under long pages. */
  background: var(--cci-gradient) no-repeat fixed;
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  color: var(--color-heading);
  line-height: 1.2;
  font-weight: 600;
}

a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color 120ms;
}
a:hover,
a:focus-visible {
  text-decoration: underline solid var(--cci-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  outline: none;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}
::selection {
  background: var(--cci-text-highlight);
}
/* Readable match / search highlight: solid yellow with DARK text — light text
   on yellow is hard to read. Distinct from ::selection (--cci-text-highlight)
   and the faint inline tint (--color-highlight). */
mark,
.cci-mark {
  background: var(--cci-yellow);
  color: var(--color-on-accent);
  padding: 0 0.1em;
  border-radius: var(--radius-sm);
}
button {
  font: inherit;
}

/* ---- Form controls -------------------------------------------------------- */
/* Frosted/transparent over the gradient. Fields never exceed their container;
   textareas resize vertically only (default `resize: both` lets them spill out). */
input,
select,
textarea {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--color-heading);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  max-width: 100%;
}
textarea {
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cci-yellow);
  outline-offset: 0;
  border-color: var(--color-heading);
}
/* Native <select> popup readability comes from `color-scheme: dark` (set on
   :root): the browser then draws the OS option list dark with light text on its
   own. IMPORTANT: do NOT set `option { background-color }` on the *native* popup —
   it pushes Chrome out of its dark popup onto a white OS surface while keeping the
   light text (white-on-white, unreadable). That regressed the dropdowns; keep it out.

   Where the customizable <select> is supported (Chromium 130+), the popup becomes
   in-page content we control, so we swap the OS-blue hover/selected highlight for
   the brand yellow. Firefox/Safari ignore this block and keep the dark native popup. */
@supports (appearance: base-select) {
  select,
  ::picker(select) {
    appearance: base-select;
  }
  ::picker(select) {
    background: #1c1c20; /* solid raised panel */
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 0.25rem;
  }
  option {
    padding: 0.5rem 0.7rem;
    color: var(--color-heading);
    background: transparent;
  }
  /* Brand the hovered / focused / selected option yellow instead of OS blue. */
  option:hover,
  option:focus,
  option:checked {
    background: var(--cci-yellow);
    color: var(--color-on-accent);
  }
  option::checkmark {
    color: var(--cci-yellow);
  }
  option:checked::checkmark {
    color: var(--color-on-accent); /* readable on the yellow selected row */
  }
}

/* ---- Layout & utilities --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.muted {
  color: var(--color-text-muted);
}

/* ---- Cards / panels ("windows") ------------------------------------------- */
.cci-card {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
/* Interactive variant — lifts on hover (event cards, clickable tiles). */
.cci-card-interactive {
  transition: border-color 130ms, box-shadow 130ms, transform 130ms;
}
.cci-card-interactive:hover {
  border-color: var(--color-heading);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---- Overlay / popup surfaces ("frosted glass") --------------------------- */
/* Floating "windows" layered OVER page content: hover popovers, search panels,
   drawers. Unlike .cci-card (a light frosted panel that sits IN the page), this
   is near-opaque dark glass for things that float over it.
   IMPORTANT (see the token note in tokens.css): keep `backdrop-filter`
   UNPREFIXED, and set this on the POSITIONED element ITSELF — not a child — or
   the blur won't composite the page behind it. */
.cci-overlay {
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  border: 1px solid var(--cci-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

/* ---- Buttons -------------------------------------------------------------- */
/* Primary: light "ink" fill, dark text, yellow underline, uppercase, square. */
.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: none;
  border-bottom: 3px solid var(--cci-yellow);
  border-radius: 0;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
}
.btn:hover,
.btn-primary:hover {
  text-decoration: none;
  background: #ffffff;
}
/* Ghost / secondary: transparent, hairline border (e.g. Cancel). */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 0;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
}
.btn-ghost:hover {
  text-decoration: none;
  border-color: var(--color-heading);
}
/* Compact transparent action button — table rows, toolbars (works on <a> + <button>). */
.act {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--color-heading);
  cursor: pointer;
  text-align: center;
}
.act:hover,
.act:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}
/* Danger variant. */
.act-danger {
  border-color: #ff6b7a;
  color: #ff6b7a;
}
.act-danger:hover {
  background: #c0142b;
  color: #fff;
}
/* Solid / emphasised action — filled ink with the yellow underbar. */
.act-solid {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
  border-bottom: 2px solid var(--cci-yellow);
}
.act-solid:hover {
  background: #ffffff;
}

/* ---- Badges --------------------------------------------------------------- */
.badge {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.badge-accent {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
}
.badge-solid {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}
.badge-soft {
  background: var(--color-highlight);
}
/* Outline status variants (layer on .badge): coloured text + border, no fill. */
.badge-success {
  color: var(--color-success);
  border-color: rgba(74, 222, 128, 0.5);
}
.badge-warning {
  color: var(--cci-yellow);
  border-color: rgba(255, 237, 0, 0.5);
}
.badge-muted {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

/* ---- Tables --------------------------------------------------------------- */
.cci-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.cci-table th,
.cci-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}
.cci-table th {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}
/* Opt-in row hover (admin lists) — add .cci-table-hover to the table. */
.cci-table-hover tbody tr {
  transition: background 120ms;
}
.cci-table-hover tbody tr:hover {
  background: var(--color-surface-alt);
}
/* Muted / inactive row. */
.cci-table tr.is-muted td {
  color: var(--color-text-muted);
}

/* ---- Header (transparent over the gradient) ------------------------------- */
.cci-header {
  border-bottom: 1px solid var(--cci-hairline);
  background: transparent;
}
.cci-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1rem;
}
.cci-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.cci-brand:hover,
.cci-brand:focus-visible {
  text-decoration: none;
}
.cci-brand img {
  display: block;
  width: 40px;
  height: 40px;
}
.cci-brand-word {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--color-heading);
  line-height: 1;
}
.cci-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 500;
}
.cci-nav a {
  padding: 0.25rem 0;
  color: var(--color-heading);
}
/* Active item underline matches hover, so hovering the active link never doubles. */
.cci-nav a.active {
  text-decoration: underline solid var(--cci-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.cci-nav .lang-switch {
  color: var(--color-text-muted);
}

/* ---- Footer --------------------------------------------------------------- */
.cci-footer {
  border-top: 1px solid var(--cci-hairline);
  margin-top: 3rem;
  padding-block: 2.5rem;
}
.cci-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cci-footer-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cci-footer-copy {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-heading);
}
/* Social icon row (icon font / inline SVG inside the links). */
.cci-footer-social {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 1.1rem;
}
.cci-footer-social a {
  display: inline-flex;
  color: var(--color-text-muted);
  transition: color 120ms, transform 120ms;
}
.cci-footer-social a:hover,
.cci-footer-social a:focus-visible {
  color: var(--color-heading);
  transform: scale(1.15);
  text-decoration: none;
}

/* ---- Secondary tab bar ---------------------------------------------------- */
/* Admin / section sub-navigation: a strip of tabs with a yellow underline on the
   active one. Distinct from .cci-nav (the top-level header nav). */
.cci-tabs {
  display: flex;
  gap: var(--space-5);
  padding-inline: var(--space-3);
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--cci-hairline);
}
.cci-tab {
  padding-block: var(--space-3);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.cci-tab:hover {
  color: var(--color-heading);
  text-decoration: none;
}
.cci-tab.active {
  color: var(--color-heading);
  border-bottom-color: var(--cci-yellow);
}

/* ---- Responsive nav (opt-in: hamburger below --bp-mobile) ----------------- */
/* Markup: a .cci-nav-toggle button next to <nav class="cci-nav cci-nav--collapsible">,
   with app JS toggling .open on the nav. The base .cci-nav is untouched, so existing
   (non-collapsible) navs keep their desktop row at every width. */
.cci-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-heading);
  padding: 0.4rem 0.55rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 640px) {
  /* 640px == --bp-mobile (CSS can't read a var here) */
  .cci-nav-toggle {
    display: inline-flex;
  }
  .cci-nav--collapsible {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    width: 100%;
  }
  .cci-nav--collapsible.open {
    display: flex;
  }
}

/* ---- Notices / callouts --------------------------------------------------- */
/* Inline flash messages and banners: a left accent bar over a tinted fill.
   .cci-notice-danger swaps the accent + fill to the danger colour. */
.cci-notice {
  border-left: 3px solid var(--cci-yellow);
  background: var(--cci-yellow-soft);
  padding: var(--space-3) var(--space-4);
  color: var(--color-heading);
  font-size: var(--font-size-sm);
}
.cci-notice-danger {
  border-left-color: var(--color-danger);
  background: var(--color-danger-soft);
}

/* ---- Disabled & busy states ----------------------------------------------- */
.btn:disabled,
.btn-primary:disabled,
.btn-ghost:disabled,
.act:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* Busy: add .is-loading to a control (optionally with a .cci-spinner inside). */
.is-loading {
  pointer-events: none;
  opacity: 0.7;
}
.cci-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: cci-spin 0.7s linear infinite;
  vertical-align: -0.15em;
}
@keyframes cci-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Heading accent bar --------------------------------------------------- */
/* A short yellow underline beneath a heading (brand flourish for h1/h2). */
.cci-heading-bar {
  position: relative;
  padding-bottom: var(--space-2);
}
.cci-heading-bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  background: var(--cci-yellow);
}

/* ---- Reduced motion ------------------------------------------------------- */
/* Honour the OS "reduce motion" setting for the optional animated/lift patterns. */
@media (prefers-reduced-motion: reduce) {
  .cci-spinner {
    animation: none;
  }
  .cci-card-interactive,
  .cci-footer-social a {
    transition: none;
  }
  .cci-card-interactive:hover,
  .cci-footer-social a:hover,
  .cci-footer-social a:focus-visible {
    transform: none;
  }
}
