/* ------------------------------------------------------------------
   Tiqanah CTF — a faithful FlagYard layout (measured from the live site) in Tiqanah's colours.
   body #0b0d0f · surfaces #131619 · text #f9f9f9 / #babbbc / #cac9d4 · radius 6px · IBM Plex Sans (Arabic)
   top banner 48px · top bar 48px · sidebar 248px (padding 24) · content padding 48px
   FlagYard's pink (#f0004f) → Tiqanah blue (#3b82f6); logo → Tiqanah mark.
------------------------------------------------------------------ */
:root, [data-bs-theme=dark] {
  --fy-bg: #0b0d0f;
  --fy-surface: #131619;
  --fy-surface-2: #1b1f24;
  --fy-surface-3: #23282e;
  --fy-line: rgba(255, 255, 255, 0.06);
  --fy-text: #f9f9f9;
  --fy-text-2: #babbbc;
  --fy-text-3: #cac9d4;
  --fy-text-soft: #f6f5fc;
  --fy-accent: #3b82f6;
  --fy-accent-hover: #2f6fe4;
  --fy-accent-2: #8ee3fb;
  --fy-green: #34d399;
  --fy-easy: #6efff6;
  --fy-medium: #c6f886;
  --fy-hard: #ffb454;
  --fy-insane: #fc3535;
  --fy-outline: #d7e5ff;
  --fy-radius: 6px;
  --fy-banner: 48px;
  --fy-topbar: 48px;
  --fy-sidebar: 248px;
  --fy-gutter: 48px;

  --bs-body-bg: var(--fy-bg);
  --bs-body-color: var(--fy-text);
  --bs-secondary-color: var(--fy-text-2);
  --bs-tertiary-color: var(--fy-text-3);
  --bs-secondary-bg: var(--fy-surface);
  --bs-tertiary-bg: var(--fy-surface-2);
  --bs-border-color: var(--fy-line);
  --bs-link-color: var(--fy-text);
  --bs-link-hover-color: var(--fy-accent-2);
  --bs-link-color-rgb: 249, 249, 249;
  --bs-heading-color: var(--fy-text);
  --bs-body-font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --bs-body-font-size: 16px;
  --bs-primary: var(--fy-accent);
  --bs-primary-rgb: 59, 130, 246;
  --bs-dark: var(--fy-surface);
  --bs-gray-dark: var(--fy-surface);
  --bs-secondary: var(--fy-surface-3);
  --bs-secondary-rgb: 35, 40, 46;
  --bs-info: var(--fy-accent);
  --bs-info-rgb: 59, 130, 246;
  --bs-success: var(--fy-green);
  --bs-danger: var(--fy-insane);
  --bs-warning: var(--fy-hard);
}

html { scroll-behavior: smooth; }
body.tq-body { background: var(--fy-bg); color: var(--fy-text); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; color: var(--fy-accent-2); }
h1, h2, h3, h4 { font-weight: 600; }

/* ---------- banner + top bar (both full width, like FlagYard) ---------- */
.fy-banner { display: flex; align-items: center; justify-content: center; gap: 16px; height: var(--fy-banner); background: var(--fy-accent); color: #fff; font-size: 14px; font-weight: 600; padding: 0 16px; }
.fy-banner-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--fy-radius); background: #fff; color: var(--fy-accent); font-weight: 700; font-size: 14px; white-space: nowrap; }
.fy-banner-btn:hover { color: var(--fy-accent-hover); }
.fy-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; height: var(--fy-topbar); padding: 0 var(--fy-gutter); background: var(--fy-bg); }
.fy-logo { display: inline-flex; align-items: center; gap: 10px; height: 30px; color: var(--fy-text); font-weight: 700; font-size: 20px; letter-spacing: -0.2px; }
.fy-logo img { width: 30px; height: 30px; }
.fy-logo:hover { color: var(--fy-text); }
.fy-topbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.fy-menu-btn { display: none; width: 40px; height: 40px; border: 0; background: transparent; color: var(--fy-text); font-size: 20px; margin-inline-end: 8px; }
.fy-user { display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 6px 0 0; border: 0; background: transparent; color: var(--fy-text); font-weight: 700; font-size: 16px; }
[dir=rtl] .fy-user { padding: 0 0 0 6px; }
.fy-user:hover { color: var(--fy-text); }
.fy-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--fy-surface-3); color: var(--fy-text); font-weight: 700; font-size: 16px; overflow: hidden; }
.fy-user-caret { font-size: 12px; color: var(--fy-text-2); }
.fy-icon-btn { width: 40px; height: 40px; border: 0; border-radius: var(--fy-radius); background: transparent; color: var(--fy-text-2); font-size: 18px; }
.fy-icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--fy-text); }
.fy-auth { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: var(--fy-radius); font-weight: 700; font-size: 14px; white-space: nowrap; }
.fy-auth-primary { background: var(--fy-accent); color: #fff; }
.fy-auth-primary:hover { background: var(--fy-accent-hover); color: #fff; }
.fy-auth-ghost { color: var(--fy-text-2); border: 2px solid var(--fy-surface-3); }
.fy-auth-ghost:hover { color: var(--fy-text); }

.dropdown-menu { background: var(--fy-surface); border: 1px solid var(--fy-line); border-radius: var(--fy-radius); padding: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.dropdown-item { display: flex; align-items: center; gap: 10px; color: var(--fy-text-2); border-radius: 4px; padding: 9px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.dropdown-item i { width: 16px; text-align: center; }
.dropdown-item:hover, .dropdown-item.active { background: rgba(255, 255, 255, 0.06); color: var(--fy-text); }
.dropdown-divider { border-color: var(--fy-line); }

/* ---------- sidebar (below the top bar) ---------- */
.fy-shell { display: flex; align-items: flex-start; }
.fy-sidebar { position: sticky; top: var(--fy-topbar); width: var(--fy-sidebar); flex: 0 0 var(--fy-sidebar); height: calc(100dvh - var(--fy-topbar)); padding: 24px; background: var(--fy-surface); display: flex; flex-direction: column; gap: 8px; overflow-y: auto; z-index: 20; }
.fy-nav-link { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px; border-radius: var(--fy-radius); color: var(--fy-text-2); font-weight: 600; font-size: 16px; }
.fy-nav-link i, .fy-nav-link svg { width: 20px; text-align: center; font-size: 17px; }
.fy-nav-link:hover { color: var(--fy-text); }
.fy-nav-link.is-active { color: var(--fy-text); font-weight: 700; background: rgba(255, 255, 255, 0.05); }
.fy-nav-toggle { margin-inline-start: auto; border: 0; background: transparent; padding: 0 4px; color: inherit; }
.fy-nav-link .fy-nav-caret {  font-size: 12px; color: var(--fy-text-2); transition: transform .2s; width: auto; }
.fy-nav-group.is-open .fy-nav-caret { transform: rotate(180deg); }
.fy-nav-sub { display: none; flex-direction: column; gap: 2px; padding: 4px 0; }
.fy-nav-group.is-open .fy-nav-sub { display: flex; }
.fy-nav-sub a { display: block; padding: 8px 16px; padding-inline-start: 48px; color: var(--fy-text-2); font-size: 14px; font-weight: 600; border-radius: var(--fy-radius); }
.fy-nav-sub a:hover { color: var(--fy-text); background: rgba(255, 255, 255, 0.04); }
.fy-badge { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--fy-accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.fy-nav-admin { color: var(--fy-hard); }
.fy-nav-spacer { flex: 1; }
.fy-nav-foot { padding: 12px 16px 0; font-size: 13px; color: var(--fy-text-2); border-top: 1px solid var(--fy-line); }
.fy-scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); border: 0; z-index: 15; }

/* ---------- main ---------- */
.fy-main { flex: 1; min-width: 0; padding: var(--fy-gutter); }
.fy-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--fy-text-2); font-size: 16px; margin-bottom: 24px; }
.fy-crumbs a { color: var(--fy-text-2); }
.fy-crumbs a:hover { color: var(--fy-text); }
.fy-crumbs .is-current { color: var(--fy-text); }
.fy-label { display: block; font-size: 13.33px; font-weight: 600; color: var(--fy-text-2); margin: 0 0 8px; }
.fy-card { background: var(--fy-surface); border-radius: var(--fy-radius); }
.fy-empty { display: grid; place-items: center; min-height: 274px; color: var(--fy-text-soft); font-size: 14px; }
.fy-section { margin-bottom: 24px; }

/* stat tiles */
.fy-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.fy-tile { display: flex; align-items: center; gap: 24px; height: 80px; padding: 0 32px; background: var(--fy-surface); border-radius: var(--fy-radius); min-width: 0; }
.fy-tile-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--fy-radius); background: #2a2960; color: #b9b3ff; font-size: 18px; flex-shrink: 0; }
.fy-tile-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fy-tile-label { font-size: 16px; color: var(--fy-text-2); }
.fy-tile-value { font-size: 16px; font-weight: 700; color: var(--fy-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fy-tile-level { flex-direction: column; justify-content: center; gap: 10px; align-items: center; }
.fy-dashes { display: flex; gap: 6px; }
.fy-dash { width: 29px; height: 11px; border-radius: 30px; background: var(--fy-surface-3); }
.fy-dash.is-on { background: var(--fy-accent); }
.fy-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--fy-green); margin-inline-end: 8px; vertical-align: middle; }

/* activity rows (each row is its own card, like FlagYard) */
.fy-rows { display: flex; flex-direction: column; gap: 8px; }
.fy-row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 24px; background: var(--fy-surface); border-radius: var(--fy-radius); }
.fy-rows { gap: 20px; }
.fy-row-flag { color: #4f7bff; font-size: 18px; margin-inline-end: 8px; }
.fy-row-avatar { display: grid; place-items: center; width: 36px; height: 36px; background: linear-gradient(135deg, #1f2937, #3b4252);  border-radius: 50%; background: var(--fy-surface-3); color: var(--fy-text); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.fy-row-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 16px; }
.fy-row-text b { font-weight: 600; color: var(--fy-text); }
.fy-row-text span { color: var(--fy-text-2); }
.fy-row-pts { display: inline-flex; align-items: center; gap: 6px; color: var(--fy-text-soft); font-size: 16px; white-space: nowrap; padding: 0 24px; }
.fy-row-pts i { color: var(--fy-hard); font-size: 14px; }
.fy-row-time { margin-inline-start: auto; color: var(--fy-text-3); font-size: 13.33px; white-space: nowrap; }
.fy-ann { display: flex; flex-direction: column; gap: 6px; padding: 16px 24px; }
.fy-ann + .fy-ann { border-top: 1px solid var(--fy-line); }
.fy-ann h3 { font-size: 16px; font-weight: 600; margin: 0; }
.fy-ann p { margin: 0; color: var(--fy-text-2); font-size: 14px; }
.fy-ann time { color: var(--fy-text-3); font-size: 13.33px; }

/* ---------- labs (challenges) ---------- */
.fy-lab-head { display: flex; align-items: center; gap: 24px; padding: 32px 24px; background: var(--fy-surface); border-radius: var(--fy-radius); margin-bottom: 24px; }
.fy-lab-icon { display: grid; place-items: center; width: 65px; height: 65px; border-radius: 12px; background: var(--fy-surface-2); color: var(--fy-accent-2); font-size: 26px; flex-shrink: 0; }
.fy-lab-title { font-size: 19.2px; font-weight: 600; color: var(--fy-text-soft); margin: 0; }
.fy-lab-count { font-size: 13.33px; color: var(--fy-text-2); margin: 4px 0 0; }
.fy-lab-desc { font-size: 16px; color: var(--fy-text-soft); margin: 12px 0 0; }
.fy-ring { margin-inline-start: auto; position: relative; width: 136px; height: 136px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: conic-gradient(var(--fy-green) calc(var(--p, 0) * 1%), var(--fy-surface-3) 0); }
.fy-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--fy-surface); }
.fy-ring-inner { position: relative; text-align: center; }
.fy-ring-pct { font-size: 19.2px; font-weight: 700; color: var(--fy-text-soft); }
.fy-ring-sub { font-size: 12px; color: var(--fy-text-3); }
.fy-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--fy-line); margin-bottom: 24px; }
.fy-tab { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0; border: 0; background: transparent; color: var(--fy-text-2); font-weight: 600; font-size: 16px; border-bottom: 2px solid transparent; }
.fy-tab.is-active { color: var(--fy-text); border-bottom-color: var(--fy-accent); }
.fy-count { display: inline-grid; place-items: center; height: 20px; min-width: 26px; padding: 0 6px; border-radius: 10px; background: rgba(186, 187, 188, 0.1); color: #fff; font-size: 12px; font-weight: 500; }
.fy-list { display: flex; flex-direction: column; gap: 16px; }
.fy-chal { display: grid; grid-template-columns: minmax(0, 1.5fr) 110px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 24px; align-items: center; gap: 16px; width: 100%; height: 72px; padding: 0 40px; background: var(--fy-surface); border: 0; border-radius: var(--fy-radius); color: var(--fy-text); text-align: start; }
.fy-chal:hover { background: var(--fy-surface-2); }
.fy-chal-name { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fy-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 13.33px; font-weight: 600; white-space: nowrap; width: fit-content; }
.fy-pill-easy { color: var(--fy-easy); background: rgba(110, 255, 246, 0.12); }
.fy-pill-medium { color: var(--fy-medium); background: rgba(198, 248, 134, 0.12); }
.fy-pill-hard { color: var(--fy-hard); background: rgba(255, 180, 84, 0.14); }
.fy-pill-insane { color: var(--fy-insane); background: rgba(252, 53, 53, 0.14); }
.fy-meta { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fy-text-soft); white-space: nowrap; }
.fy-meta i { color: var(--fy-text-2); font-size: 15px; }
.fy-meta i.fa-star, .fy-meta i.fa-wand-magic-sparkles { color: var(--fy-hard); }
.fy-done { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fy-text-soft); white-space: nowrap; }
.fy-done i { color: var(--fy-green); font-size: 16px; }
.fy-chev { color: var(--fy-text); font-size: 12px; text-align: end; }

/* ---------- challenge (modal styled as FlagYard's challenge page) ---------- */
#challenge-window .modal-dialog { max-width: 1096px; margin: 24px auto; }
#challenge-window .modal-content { background: transparent; border: 0; box-shadow: none; }
.fy-chal-page { display: flex; flex-direction: column; gap: 24px; position: relative; }
.fy-chal-close { position: absolute; inset-inline-end: 0; top: -4px; width: 40px; height: 40px; border: 0; border-radius: var(--fy-radius); background: var(--fy-surface); color: var(--fy-text); font-size: 18px; z-index: 2; }
.fy-chal-close:hover { background: var(--fy-surface-2); }
.fy-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.fy-stat { display: flex; align-items: center; gap: 24px; height: 80px; padding: 0 32px; background: var(--fy-surface); border-radius: var(--fy-radius); min-width: 0; }
.fy-stat-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: var(--fy-radius); background: var(--fy-surface-2); font-size: 17px; flex-shrink: 0; }
.fy-stat-icon.is-pts { color: var(--fy-hard); background: rgba(255, 180, 84, 0.14); }
.fy-stat-icon.is-hacks { color: #a5b4fc; background: rgba(129, 140, 248, 0.16); }
.fy-stat-icon.is-blood { color: var(--fy-insane); background: rgba(252, 53, 53, 0.14); }
.fy-stat-label { font-size: 13.33px; font-weight: 600; color: var(--fy-text-3); }
.fy-stat-value { font-size: 16px; font-weight: 700; color: var(--fy-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fy-stat-value .fy-fb-time { color: var(--fy-insane); font-size: 13.33px; font-weight: 600; margin-inline-start: 8px; }
.fy-stat-value .fy-fb-avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fy-green); color: #06132e; font-size: 12px; margin-inline-end: 8px; vertical-align: middle; }
.fy-chal-head { display: flex; align-items: flex-start; gap: 24px; padding: 32px; background: var(--fy-surface); border-radius: var(--fy-radius); }
.fy-chal-avatar { display: grid; place-items: center; width: 65px; height: 65px; border-radius: 50%; background: var(--fy-surface-2); color: var(--fy-text); font-size: 24px; flex-shrink: 0; }
.fy-chal-head-body { flex: 1; min-width: 0; }
.fy-chal-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fy-chal-title { font-size: 19.2px; font-weight: 600; color: var(--fy-text-soft); margin: 0; }
.fy-chal-cat { font-size: 13.33px; font-weight: 600; color: var(--fy-text-2); text-transform: uppercase; margin-top: 4px; }
.fy-chal-by { font-size: 13.33px; font-weight: 600; color: var(--fy-text-2); white-space: nowrap; }
.fy-chal-desc { margin: 24px 0 0; color: var(--fy-text-soft); font-size: 16px; line-height: 1.6; }
.fy-chal-desc p:last-child { margin-bottom: 0; }
.fy-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fy-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: var(--fy-text); font-size: 13.33px; font-weight: 600; }
.fy-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.fy-box { display: flex; flex-direction: column; gap: 24px; padding: 24px 20px; background: var(--fy-surface); border-radius: var(--fy-radius); }
.fy-box-head { display: flex; align-items: flex-start; gap: 16px; }
.fy-box-icon { display: grid; place-items: center; width: 48px; height: 44px; border-radius: var(--fy-radius); background: var(--fy-surface-2); color: var(--fy-text); font-size: 18px; flex-shrink: 0; }
.fy-box-icon.is-flag { color: var(--fy-accent-2); background: rgba(59, 130, 246, 0.16); }
.fy-box-title { font-size: 16px; font-weight: 600; color: var(--fy-text-3); }
.fy-box-sub { font-size: 13.33px; color: var(--fy-text-2); }
.fy-status { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13.33px; font-weight: 600; color: var(--fy-text-2); white-space: nowrap; }
.fy-status i { font-size: 8px; color: var(--fy-insane); }
.fy-status.is-on i { color: var(--fy-green); }
.fy-box-body { padding-inline-start: 64px; }
.fy-btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 20px; border: 2px solid var(--fy-outline); border-radius: var(--fy-radius); background: transparent; color: var(--fy-outline); font-weight: 700; font-size: 16px; }
.fy-btn-outline:hover { background: rgba(215, 229, 255, 0.08); color: var(--fy-outline); }
.fy-btn-outline.is-muted { border-color: var(--fy-surface-3); color: var(--fy-text-2); }
.fy-btn-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 24px; border: 0; border-radius: var(--fy-radius); background: var(--fy-accent); color: #fff; font-weight: 700; font-size: 16px; }
.fy-btn-primary:hover { background: var(--fy-accent-hover); color: #fff; }
.fy-conn code { display: inline-block; direction: ltr; padding: 10px 14px; border-radius: var(--fy-radius); background: var(--fy-surface-2); color: var(--fy-accent-2); font-size: 14px; word-break: break-all; }
.fy-submit-row { display: flex; gap: 12px; }
.fy-submit-row .challenge-input { flex: 1; height: 48px; border-radius: var(--fy-radius); background: var(--fy-surface-2); border: 1px solid var(--fy-line); color: var(--fy-text); direction: ltr; text-align: left; font-family: "IBM Plex Mono", monospace; font-size: 15px; padding: 0 16px; }
.fy-submit-row .challenge-input:focus { outline: 0; border-color: var(--fy-accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); background: var(--fy-surface-2); color: var(--fy-text); }
.fy-solved { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0 4px; }
.fy-solved i { font-size: 36px; color: var(--fy-text-soft); }
.fy-solved b { font-size: 16px; font-weight: 700; }
.fy-solved span { color: var(--fy-text-2); font-size: 14px; }
.fy-hints details { background: var(--fy-surface-2); border-radius: var(--fy-radius); padding: 10px 14px; }
.fy-hints summary { cursor: pointer; color: var(--fy-accent-2); font-weight: 600; font-size: 14px; }
.fy-alert { border-radius: var(--fy-radius); padding: 12px 16px; font-weight: 600; text-align: center; }
.fy-alert-success { background: rgba(52, 211, 153, 0.14); color: #a7f3d0; }
.fy-alert-info { background: rgba(59, 130, 246, 0.16); color: #bfdbfe; }
.fy-alert-danger { background: rgba(252, 53, 53, 0.14); color: #fecaca; }
.fy-alert-warning { background: rgba(255, 180, 84, 0.14); color: #fde68a; }
.fy-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.fy-table th { font-size: 13.33px; font-weight: 600; color: var(--fy-text-2); padding: 0 24px 4px; text-align: start; }
.fy-table td { background: var(--fy-surface); padding: 14px 24px; font-size: 14px; }
.fy-table tr td:first-child { border-start-start-radius: var(--fy-radius); border-end-start-radius: var(--fy-radius); }
.fy-table tr td:last-child { border-start-end-radius: var(--fy-radius); border-end-end-radius: var(--fy-radius); }
.fy-table td a { color: var(--fy-text); font-weight: 600; }
.modal-backdrop { background: #000; }
.modal-backdrop.show { opacity: 0.75; }

/* ---------- leaderboard ---------- */
.fy-lb-row { display: grid; grid-template-columns: 56px 48px minmax(0, 1fr) auto; align-items: center; gap: 16px; height: 64px; padding: 0 24px; background: var(--fy-surface); border-radius: var(--fy-radius); }
.fy-lb-rank { font-size: 16px; font-weight: 700; color: var(--fy-text-2); font-family: "IBM Plex Mono", monospace; }
.fy-lb-row.is-1 .fy-lb-rank { color: #fcd34d; }
.fy-lb-row.is-2 .fy-lb-rank { color: #e5e7eb; }
.fy-lb-row.is-3 .fy-lb-rank { color: #f59e0b; }
.fy-lb-name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fy-lb-score { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--fy-text-soft); }
.fy-lb-score i { color: var(--fy-hard); }
#score-graph { background: var(--fy-surface); border-radius: var(--fy-radius); padding: 12px; margin-bottom: 24px; }
.nav-pills .nav-link { color: var(--fy-text-2); border-radius: var(--fy-radius); font-weight: 600; }
.nav-pills .nav-link.active { background: var(--fy-accent); color: #fff; }

/* ---------- generic pages (login, register, settings, profile…) ---------- */
.jumbotron { background: transparent; color: var(--fy-text); padding: 0 0 24px; margin: 0; text-align: start; }
.jumbotron h1 { font-size: 24px; font-weight: 600; }
.jumbotron h2, .jumbotron h3 { font-size: 16px; color: var(--fy-text-2); font-weight: 600; }
.container { max-width: 100%; padding: 0; }
.fy-form-card { max-width: 520px; padding: 32px; background: var(--fy-surface); border-radius: var(--fy-radius); }
.form-control, .form-select { min-height: 48px; border-radius: var(--fy-radius); background: var(--fy-surface-2); border: 1px solid var(--fy-line); color: var(--fy-text); }
.form-control:focus, .form-select:focus { background: var(--fy-surface-2); border-color: var(--fy-accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); color: var(--fy-text); }
.form-control::placeholder { color: var(--fy-text-2); }
.form-label, label { color: var(--fy-text-3); font-weight: 600; font-size: 14px; }
.btn { border-radius: var(--fy-radius); font-weight: 700; min-height: 44px; }
.btn-primary { background: var(--fy-accent); border-color: var(--fy-accent); }
.btn-primary:hover { background: var(--fy-accent-hover); border-color: var(--fy-accent-hover); }
.btn-secondary, .btn-outline-secondary, .btn-info, .btn-outline-info { background: transparent; border: 2px solid var(--fy-outline); color: var(--fy-outline); }
.btn-outline-secondary:hover, .btn-secondary:hover { background: rgba(215, 229, 255, 0.08); color: var(--fy-outline); }
.card, .bg-body-tertiary { background: var(--fy-surface) !important; border: 0; border-radius: var(--fy-radius); }
.table { --bs-table-bg: transparent; --bs-table-striped-bg: rgba(255, 255, 255, 0.025); --bs-table-hover-bg: rgba(255, 255, 255, 0.04); --bs-table-color: var(--fy-text); --bs-table-border-color: var(--fy-line); }
.table thead th { color: var(--fy-text-2); font-size: 13.33px; font-weight: 600; }
.table td, .table th { padding: 12px 16px; vertical-align: middle; }
.alert { border-radius: var(--fy-radius); border: 0; }
.alert-success { background: rgba(52, 211, 153, 0.14); color: #a7f3d0; }
.alert-danger { background: rgba(252, 53, 53, 0.14); color: #fecaca; }
.alert-info { background: rgba(59, 130, 246, 0.16); color: #bfdbfe; }
.alert-warning { background: rgba(255, 180, 84, 0.14); color: #fde68a; }
.badge.bg-secondary, .badge.bg-primary, .badge.bg-info { background: rgba(255, 255, 255, 0.08) !important; color: var(--fy-text); font-weight: 600; }
.text-muted { color: var(--fy-text-2) !important; }
hr { border-color: var(--fy-line); opacity: 1; }
.fy-page-content { padding: 24px; line-height: 1.9; }
.nav-tabs { border-bottom-color: var(--fy-line); }
.nav-tabs .nav-link { color: var(--fy-text-2); border: 0; border-bottom: 2px solid transparent; font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--fy-text); background: transparent; border-bottom-color: var(--fy-accent); }
.snackbar, .toast { background: var(--fy-surface) !important; color: var(--fy-text) !important; border: 1px solid var(--fy-line); border-radius: var(--fy-radius); }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
  :root { --fy-gutter: 24px; }
  .fy-chal { grid-template-columns: minmax(0, 1.4fr) 100px minmax(0, 1fr) minmax(0, 1fr) 24px; padding: 0 24px; }
  .fy-chal .fy-done { display: none; }
}
@media (max-width: 991.98px) {
  .fy-menu-btn { display: inline-grid; place-items: center; }
  .fy-sidebar { position: fixed; top: var(--fy-topbar); inset-inline-start: 0; height: calc(100dvh - var(--fy-topbar)); transform: translateX(100%); transition: transform .25s ease; z-index: 25; box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }
  [dir=ltr] .fy-sidebar { transform: translateX(-100%); }
  body.fy-nav-open .fy-sidebar { transform: none; }
  body.fy-nav-open .fy-scrim { display: block; }
  body.fy-nav-open { overflow: hidden; }
  .fy-tiles, .fy-stats { grid-template-columns: 1fr; gap: 16px; }
  .fy-two { grid-template-columns: 1fr; }
  .fy-lab-head { flex-wrap: wrap; }
  .fy-ring { width: 104px; height: 104px; }
  .fy-chal { grid-template-columns: minmax(0, 1fr) 24px; height: auto; padding: 16px 20px; row-gap: 8px; }
  .fy-chal-name { grid-column: 1; }
  .fy-chal .fy-chev { grid-column: 2; grid-row: 1; }
  .fy-chal .fy-pill, .fy-chal .fy-meta, .fy-chal .fy-done { grid-column: 1 / -1; display: inline-flex; }
  .fy-row { flex-wrap: wrap; padding: 12px 16px; }
  .fy-row-pts { padding: 0; }
  .fy-row-time { width: 100%; margin: 0; }
  .fy-box-body { padding-inline-start: 0; }
  .fy-banner { font-size: 13px; gap: 10px; }
}
@media (max-width: 575.98px) {
  :root { --fy-gutter: 16px; }
  .fy-tile { padding: 0 20px; gap: 16px; }
  .fy-lab-head { padding: 20px; }
  .fy-chal-head { padding: 20px; flex-direction: column; }
  .fy-submit-row { flex-direction: column; }
  .fy-lb-row { grid-template-columns: 40px 40px minmax(0, 1fr) auto; padding: 0 12px; }
  .fy-user-name { display: none; }
}

/* ---------- standalone auth pages (FlagYard SSO look) ---------- */
.fy-auth-body { position: relative; overflow-x: hidden; max-width: 100vw; }
.fy-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.fy-orb { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #1d2126, #0f1215 70%); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03); }
.fy-orb-a { width: 520px; height: 520px; top: -110px; inset-inline-start: -60px; }
.fy-orb-b { width: 320px; height: 320px; top: 40px; inset-inline-start: 240px; opacity: .9; }
.fy-orb-c { width: 360px; height: 360px; bottom: -80px; inset-inline-end: 40px; }
.fy-orb-d { width: 230px; height: 230px; bottom: 120px; inset-inline-end: 270px; opacity: .9; }
.fy-auth-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 30px 40px; }
.fy-auth-logo { display: inline-flex; align-items: center; gap: 16px; color: var(--fy-text); }
.fy-auth-logo:hover { color: var(--fy-text); }
.fy-auth-logo img { width: 48px; height: 48px; }
.fy-auth-logo-sep { width: 1px; height: 40px; background: rgba(255, 255, 255, 0.25); }
.fy-auth-wordmark { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
.fy-auth-wordmark em { font-style: normal; color: var(--fy-accent-2); }
.fy-lang { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--fy-radius); background: rgba(19, 22, 25, 0.6); }
.fy-lang-btn { height: 30px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--fy-text-2); font-weight: 600; font-size: 14px; }
.fy-lang-btn.is-active { background: #2a2f36; color: var(--fy-text); }
.fy-auth-main { position: relative; z-index: 1; display: grid; place-items: center; min-height: calc(100dvh - 108px); padding: 24px 16px 48px; }
.fy-auth-card { width: 100%; max-width: 600px; padding: 32px; background: var(--fy-surface); border-radius: var(--fy-radius); }
.fy-auth-title { font-size: 24px; font-weight: 700; margin: 0 0 24px; }
.fy-auth-form { display: flex; flex-direction: column; gap: 24px; }
.fy-field { display: flex; flex-direction: column; gap: 8px; }
.fy-field label { font-size: 14px; color: var(--fy-text-2); font-weight: 500; }
.fy-field small { font-size: 12.5px; color: var(--fy-text-2); }
.fy-field .form-control { height: 48px; background: var(--fy-bg); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 16px; }
.fy-field .form-control:focus { background: var(--fy-bg); border-color: var(--fy-accent); box-shadow: 0 0 0 1px var(--fy-accent); }
.fy-pass { position: relative; }
.fy-pass .form-control { padding-inline-end: 44px; }
.fy-eye { position: absolute; inset-block: 0; inset-inline-end: 8px; width: 32px; border: 0; background: transparent; color: var(--fy-text-2); }
.fy-auth-submit { height: 48px; margin-top: 8px; }
.fy-auth-links { margin-top: 40px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.fy-auth-links p { margin: 0; color: var(--fy-text); font-size: 16px; }
.fy-auth-links a { color: var(--fy-accent); font-weight: 700; }
.fy-auth-links a:hover { color: var(--fy-accent-2); }
.fy-auth-text { color: var(--fy-text-2); font-size: 15px; margin: 0; line-height: 1.7; }
.fy-auth-fine { color: var(--fy-text-2); font-size: 13px; text-align: center; margin: 0; }
.fy-auth-fine a { color: var(--fy-accent); }
.fy-extra:empty { display: none; }
.fy-extra .mb-3 { margin-bottom: 0 !important; }
@media (max-width: 575.98px) {
  .fy-auth-top { padding: 20px 16px; }
  .fy-auth-logo img { width: 36px; height: 36px; }
  .fy-auth-wordmark { font-size: 22px; }
  .fy-auth-card { padding: 24px 20px; }
  .fy-orb-b, .fy-orb-d { display: none; }
}

/* ---------- standalone challenge page: the core "modal" rendered in the page flow ---------- */
.fy-static-modal, .fy-static-modal.show { position: static !important; display: block !important; opacity: 1 !important; overflow: visible; z-index: auto; }
.fy-static-modal .modal-dialog { max-width: none; margin: 0; transform: none !important; transition: none; }
.fy-standalone .fy-chal-close { display: none; }
.fy-standalone .fy-chal-page > .fy-crumbs { display: none; }
body:has(.fy-static-modal.show) { overflow: auto !important; padding-right: 0 !important; }
body:has(.fy-static-modal) .modal-backdrop { display: none !important; }

/* ---------- public landing page ---------- */
.fy-landing-body { overflow-x: hidden; }
.fy-land-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 48px; }
.fy-land-actions { display: flex; align-items: center; gap: 24px; }
.fy-land-lang { border: 0; background: transparent; color: var(--fy-text); font-weight: 600; font-size: 15px; }
.fy-land-login { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 1.5px solid var(--fy-text); border-radius: var(--fy-radius); color: var(--fy-text); font-weight: 700; font-size: 14px; }
.fy-land-login:hover { background: rgba(255, 255, 255, 0.08); color: var(--fy-text); }
.fy-hero { position: relative; min-height: 560px; display: grid; place-items: center; text-align: center; padding: 80px 24px 120px; overflow: hidden; }
.fy-hero-orbs { position: absolute; inset: 0; pointer-events: none; }
.fy-hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.fy-hero-orb-a { width: 560px; height: 560px; top: -220px; inset-inline-start: -120px; }
.fy-hero-orb-b { width: 300px; height: 300px; top: -60px; inset-inline-end: 30px; }
.fy-hero-orb-c { width: 190px; height: 190px; bottom: 60px; left: 50%; margin-left: -20px; }
.fy-bubble { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; font-size: 18px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06); }
.fy-bubble-1 { width: 56px; height: 56px; border-radius: 12px; background: #6b5cff; top: 110px; inset-inline-start: 135px; }
.fy-bubble-2 { background: #2a2960; color: #b9b3ff; top: 300px; inset-inline-start: 205px; }
.fy-bubble-3 { background: #3b6cf5; top: 375px; inset-inline-start: 410px; }
.fy-bubble-4 { background: #ff7a1a; top: 305px; left: 50%; margin-left: 100px; width: 40px; height: 40px; font-size: 15px; }
.fy-bubble-5 { background: #3b82f6; top: 435px; left: 50%; margin-left: 60px; width: 30px; height: 30px; font-size: 12px; }
.fy-bubble-6 { width: 56px; height: 56px; border-radius: 12px; background: #6b5cff; top: 220px; inset-inline-end: 50px; }
.fy-bubble-7 { background: #22c55e; top: 405px; inset-inline-end: 315px; }
.fy-hero-inner { position: relative; max-width: 720px; }
.fy-hero h1 { font-size: 56px; font-weight: 700; margin: 0 0 20px; }
.fy-hero p { font-size: 22px; color: var(--fy-text-soft); line-height: 1.6; margin: 0 0 32px; }
.fy-cta { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: var(--fy-radius); background: var(--fy-accent); color: #fff; font-weight: 700; font-size: 15px; }
.fy-cta:hover { background: var(--fy-accent-hover); color: #fff; }
.fy-land-section { max-width: 940px; margin: 0 auto; padding: 96px 24px; text-align: center; }
.fy-eyebrow { display: block; font-size: 16px; font-weight: 600; color: var(--fy-text); margin-bottom: 12px; }
.fy-land-section h2, .fy-band h2 { font-size: 30px; font-weight: 700; margin: 0 0 16px; }
.fy-land-section p, .fy-band-inner > p { font-size: 18px; line-height: 1.8; color: var(--fy-text-soft); margin: 0 auto; max-width: 900px; }
.fy-land-section .fy-cta { margin-top: 32px; }
.fy-cats { display: grid; grid-template-columns: repeat(4, 240px); justify-content: center; gap: 40px; padding: 0 24px 40px; }
.fy-cat { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 40px 20px 32px; background: var(--fy-surface); border-radius: var(--fy-radius); }
.fy-cat-art { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #262b33, #14171b 70%); color: #8b93ff; font-size: 44px; }
.fy-cat-2 { color: #ff4d6d; } .fy-cat-3 { color: #4f7bff; } .fy-cat-4 { color: #ff8a1f; } .fy-cat-5 { color: #7dd3fc; } .fy-cat-6 { color: #6b5cff; } .fy-cat-7 { color: #f0004f; } .fy-cat-8 { color: #ff8a1f; } .fy-cat-9 { color: #8ee3fb; } .fy-cat-10 { color: #a78bfa; }
.fy-cat-name { font-size: 18px; font-weight: 600; }
.fy-band { position: relative; background: #1a1c1f; padding: 120px 24px 96px; margin-top: 40px; }
.fy-band::before { content: ""; position: absolute; left: 0; right: 0; top: -70px; height: 70px; background: #1a1c1f; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.fy-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: -70px; height: 70px; background: #1a1c1f; clip-path: polygon(0 0, 100% 0, 0 100%); }
.fy-band-inner { max-width: 1084px; margin: 0 auto; text-align: center; }
.fy-band-title { margin-top: 120px !important; margin-bottom: 40px !important; }
.fy-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 48px; text-align: start; }
.fy-feat { background: var(--fy-surface); border-radius: var(--fy-radius); overflow: hidden; min-height: 200px; }
.fy-feat-head { display: flex; align-items: center; gap: 12px; height: 78px; padding: 0 28px; font-size: 18px; font-weight: 700; color: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 78%); }
[dir=rtl] .fy-feat-head { clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%); }
.fy-feat-head i { font-size: 22px; }
.fy-feat p { padding: 20px 28px 28px; margin: 0; color: var(--fy-text-soft); font-size: 15px; line-height: 1.8; }
.fy-tone-blue { background: #3b6cf5; } .fy-tone-orange { background: #ff7a1a; } .fy-tone-purple { background: #6b5cff; } .fy-tone-green { background: #16c05a; } .fy-tone-pink { background: #f0004f; } .fy-tone-gray { background: #5b636d; } .fy-tone-teal { background: #0ea5a5; }
.fy-land-foot { background: #1a1c1f; padding: 48px 24px 24px; margin-top: 40px; }
.fy-land-foot-top { max-width: 1392px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.fy-land-foot-brand { display: flex; flex-direction: column; gap: 12px; }
.fy-land-foot-ksu { color: var(--fy-text-2); font-size: 14px; }
.fy-land-foot-cols { display: flex; gap: 64px; }
.fy-land-foot-cols > div { display: flex; flex-direction: column; gap: 12px; }
.fy-land-foot-label { font-size: 13.33px; font-weight: 600; color: var(--fy-text-2); }
.fy-land-foot-cols a { display: inline-flex; align-items: center; gap: 10px; color: var(--fy-text); font-size: 15px; }
.fy-land-foot-bottom { max-width: 1392px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--fy-line); display: flex; justify-content: space-between; color: var(--fy-text-2); font-size: 13.33px; }
@media (max-width: 1199.98px) { .fy-cats { grid-template-columns: repeat(3, 1fr); gap: 24px; } .fy-feats { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 767.98px) {
  .fy-land-head { padding: 14px 16px; } .fy-land-actions { gap: 12px; }
  .fy-hero { min-height: 420px; padding: 48px 16px 80px; } .fy-hero h1 { font-size: 36px; } .fy-hero p { font-size: 17px; }
  .fy-bubble-2, .fy-bubble-3, .fy-bubble-5, .fy-bubble-7 { display: none; }
  .fy-land-section { padding: 64px 16px; } .fy-land-section h2, .fy-band h2 { font-size: 24px; } .fy-land-section p, .fy-band-inner > p { font-size: 16px; }
  .fy-cats { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px 24px; } .fy-cat { padding: 24px 12px; } .fy-cat-art { width: 88px; height: 88px; font-size: 32px; }
  .fy-feats { grid-template-columns: 1fr; gap: 16px; } .fy-band-title { margin-top: 64px !important; }
  .fy-land-foot-cols { flex-direction: column; gap: 24px; } .fy-land-foot-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ================= borrowed from Tuwaiq Challenges (nav, hero, event card, glass rows, footer) ================= */
.fy-landing-body { background: #050711; }
.tw-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 48px; position: relative; z-index: 3; }
.tw-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.tw-brand img { width: 40px; height: 40px; }
.tw-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.tw-brand-text b { font-size: 16px; font-weight: 700; }
.tw-brand-text small { font-size: 10px; color: #b7bacb; font-family: "IBM Plex Sans", sans-serif; }
.tw-links { display: flex; gap: 40px; }
.tw-links a { color: #fff; font-size: 16px; font-weight: 500; padding: 6px 0; }
.tw-links a:hover, .tw-links a.is-active { color: var(--fy-accent-2); }
.tw-nav-end { display: flex; align-items: center; gap: 12px; }
.tw-lang { display: inline-flex; align-items: center; gap: 8px; height: 39px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: #fff; font-size: 14px; font-weight: 500; }
.tw-login { display: inline-flex; align-items: center; height: 44px; padding: 10px 24px; border-radius: 12px; background: var(--fy-accent); color: #fff; font-size: 16px; font-weight: 500; }
.tw-login:hover { background: var(--fy-accent-hover); color: #fff; }
.tw-menu-btn { display: none; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: #fff; }
.tw-mobile-nav { display: none; flex-direction: column; padding: 8px 16px 16px; gap: 4px; }
.tw-mobile-nav.is-open { display: flex; }
.tw-mobile-nav a { padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: #fff; font-weight: 500; }

.tw-hero { position: relative; text-align: center; padding: 56px 24px 160px; overflow: hidden; }
.tw-planet { position: absolute; left: 50%; top: 330px; width: 2400px; height: 2400px; margin-left: -1200px; border-radius: 50%; background: radial-gradient(circle at 50% 0%, #0b1b5e 0%, #060a1f 22%, #050711 45%); box-shadow: 0 -2px 40px rgba(59, 130, 246, 0.55), 0 -1px 0 rgba(142, 227, 251, 0.5); }
.tw-stars { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px), radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px); background-size: 140px 140px, 90px 90px; background-position: 20px 30px, 60px 80px; opacity: .5; mask-image: linear-gradient(#000 60%, transparent); }
.tw-eyebrow { position: relative; display: inline-flex; align-items: center; height: 34px; padding: 8px 24px; border-radius: 999px; border: 1px solid #31344a; background: rgba(255, 255, 255, 0.05); color: #fff; font-size: 12px; }
.tw-title { position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; margin: 28px 0 20px; }
.tw-title img { width: 96px; height: 96px; filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.7)); }
.tw-title div { text-align: start; }
.tw-title h1 { font-size: 48px; font-weight: 700; margin: 0; line-height: 1.1; }
.tw-title span { display: block; font-family: "IBM Plex Sans", sans-serif; font-size: 22px; font-weight: 600; color: #fff; }
.tw-sub { position: relative; color: #ddd; font-size: 20px; margin: 0 auto; max-width: 720px; }

.tw-event-wrap { padding: 0 48px; margin-top: -110px; position: relative; z-index: 2; }
.tw-event { position: relative; display: flex; align-items: center; gap: 32px; padding: 40px 48px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.1); background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(20, 30, 70, 0.55) 60%, rgba(15, 20, 40, 0.5)); backdrop-filter: blur(16px); overflow: hidden; }
.tw-event-mark { position: absolute; inset-inline-start: -40px; top: -40px; width: 320px; height: 320px; opacity: .08; filter: blur(2px); pointer-events: none; }
.tw-event-body { flex: 1; min-width: 0; position: relative; }
.tw-tag { display: inline-flex; align-items: center; height: 27px; padding: 4px 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: radial-gradient(circle, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)); color: #fff; font-size: 14px; font-weight: 500; }
.tw-event h3 { font-size: 42px; font-weight: 700; margin: 18px 0 14px; }
.tw-event p { color: #dfe3f2; font-size: 16px; line-height: 1.8; margin: 0 0 22px; max-width: 900px; }
.tw-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.tw-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 14px; }
.tw-pill i { color: var(--fy-accent-2); }
.tw-round-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 22px 28px; border-radius: 999px; background: #fff; color: #0a2b70; font-size: 29px; font-weight: 500; white-space: nowrap; }
.tw-round-btn:hover { background: #eaf1ff; color: #0a2b70; }
.tw-section { max-width: 1200px; margin: 0 auto; padding: 48px 24px 24px; }
.tw-h3 { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 600; margin: 0 0 32px; }
.tw-h3-mark { width: 32px; height: 32px; }

.tw-foot { position: relative; padding: 120px 24px 32px; overflow: hidden; }
.tw-floor { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px); background-size: 80px 80px; transform: perspective(600px) rotateX(60deg) translateY(-60px); transform-origin: top; opacity: .5; mask-image: linear-gradient(transparent, #000 40%, transparent); }
.tw-foot::after { content: ""; position: absolute; left: 50%; bottom: -260px; width: 900px; height: 500px; margin-left: -450px; border-radius: 50%; background: radial-gradient(circle, rgba(88, 60, 255, 0.55), rgba(59, 130, 246, 0.25) 45%, transparent 70%); filter: blur(30px); pointer-events: none; }
.tw-foot-logos { position: relative; display: flex; align-items: center; justify-content: center; gap: 28px; }
.tw-foot-sep { width: 1px; height: 40px; background: rgba(255, 255, 255, 0.25); }
.tw-foot-bottom { position: relative; display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 100px auto 0; color: #b7bacb; font-size: 14px; }
.tw-foot-social { display: flex; gap: 18px; font-size: 18px; }
.tw-foot-social a { color: #fff; }

/* Tuwaiq-style glass leaderboard */
.tw-seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); margin: 0 auto 32px; }
.tw-seg button { height: 34px; padding: 0 24px; border: 0; border-radius: 999px; background: transparent; color: #b7bacb; font-size: 14px; font-weight: 500; }
.tw-seg button.is-active { background: rgba(255, 255, 255, 0.2); color: #fff; }
.tw-lb-head, .tw-lb-row { display: grid; grid-template-columns: 90px minmax(0, 1.4fr) 1fr 1fr 1fr; align-items: center; gap: 16px; padding: 16px 24px; }
.tw-lb-head { color: #b7bacb; font-size: 13px; padding-bottom: 8px; }
.tw-lb-row { min-height: 76px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(15, 20, 40, 0.35)); margin-bottom: 12px; color: #fff; }
.tw-lb-row:hover { border-color: rgba(142, 227, 251, 0.4); color: #fff; }
.tw-rank { display: inline-flex; align-items: center; gap: 4px; font-size: 36px; font-weight: 700; color: #6b8bff; font-family: "IBM Plex Sans", sans-serif; }
.tw-rank::before, .tw-rank::after { content: ""; width: 14px; height: 22px; background: currentColor; opacity: .7; clip-path: polygon(0 0, 100% 40%, 60% 60%, 100% 100%, 0 100%, 40% 60%); }
.tw-rank::after { transform: scaleX(-1); }
.tw-lb-name { display: flex; flex-direction: column; }
.tw-lb-name b { font-size: 20px; font-weight: 400; }
.tw-lb-name small { color: #b7bacb; font-size: 12px; }
.tw-lb-stat { display: inline-flex; align-items: baseline; gap: 8px; font-size: 20px; font-weight: 700; }
.tw-lb-stat small { font-size: 12px; color: #9aa0b8; font-weight: 400; }
.tw-more { display: inline-flex; align-items: center; height: 40px; padding: 0 24px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #fff; font-size: 14px; }
.tw-page-title { display: flex; align-items: center; gap: 12px; font-size: 34px; font-weight: 700; margin: 0 0 24px; }
.tw-search { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); max-width: 540px; margin: 0 auto 20px; }
.tw-search input { flex: 1; border: 0; background: transparent; color: #fff; font-size: 14px; outline: 0; }
.tw-search input::placeholder { color: #8a8f9f; }
.tw-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 32px; }
.tw-chip { height: 46px; padding: 0 28px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: #fff; font-size: 14px; font-weight: 500; }
.tw-chip.is-active { background: rgba(255, 255, 255, 0.18); }
.tw-ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tw-ev { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); }
.tw-ev-banner { height: 118px; border-radius: 12px; background: linear-gradient(135deg, #1e3fb8, #3b82f6 55%, #8ee3fb); display: grid; place-items: center; color: #fff; font-size: 40px; }
.tw-ev h3 { font-size: 20px; font-weight: 600; margin: 0; }
.tw-ev p { color: #dfe3f2; font-size: 14px; margin: 0; line-height: 1.7; }
.tw-ev time { color: #b7bacb; font-size: 13px; }
.tw-arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--fy-accent); color: #fff; }

/* ================= borrowed from KSU Cyverse (numbered "// section" labels, tiles, schedule, FAQ) ================= */
.cv-section { max-width: 1200px; margin: 0 auto; padding: 64px 24px 0; }
.cv-label { display: flex; align-items: center; gap: 10px; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 1.5px; color: rgba(232, 237, 245, 0.5); margin-bottom: 28px; }
.cv-dash { flex: 1; border-bottom: 1px dashed rgba(232, 237, 245, 0.2); }
.cv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 56px; }
.cv-tile { padding: 18px; border: 1px solid rgba(232, 237, 245, 0.12); border-radius: 6px; background: rgba(255, 255, 255, 0.02); display: flex; flex-direction: column; gap: 8px; }
.cv-tile-label { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 1px; color: rgba(232, 237, 245, 0.5); display: inline-flex; gap: 8px; align-items: center; }
.cv-tile-label i { color: var(--fy-accent); }
.cv-tile b { font-size: 18px; font-weight: 500; font-family: "IBM Plex Mono", monospace; }
.cv-tile small { color: rgba(232, 237, 245, 0.6); font-size: 13px; line-height: 1.6; }
.cv-sched { border: 1px solid rgba(232, 237, 245, 0.12); border-radius: 6px; padding: 8px 24px; }
.cv-sched > div { display: flex; align-items: center; gap: 12px; padding: 14px 0; font-size: 15px; }
.cv-sched > div + div { border-top: 1px solid rgba(232, 237, 245, 0.06); }
.cv-sq { width: 8px; height: 8px; background: #6b7280; }
.cv-sq.is-g { background: #22c55e; } .cv-sq.is-b { background: #3b82f6; }
.cv-leader { flex: 1; border-bottom: 1px dotted rgba(232, 237, 245, 0.25); margin: 0 12px; height: 0; }
.cv-sched b { font-weight: 500; color: #e8edf5; }
.cv-faq { display: flex; flex-direction: column; gap: 10px; }
.cv-q { border: 1px solid rgba(232, 237, 245, 0.12); border-radius: 6px; background: rgba(255, 255, 255, 0.02); }
.cv-q summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 500; }
.cv-q summary::-webkit-details-marker { display: none; }
.cv-q summary i { color: rgba(232, 237, 245, 0.5); font-size: 12px; transition: transform .2s; }
.cv-q[open] summary i { transform: rotate(180deg); }
.cv-q p { margin: 0; padding: 0 20px 18px; color: rgba(232, 237, 245, 0.7); line-height: 1.8; font-size: 14px; }

@media (max-width: 1199.98px) { .cv-tiles { grid-template-columns: repeat(2, 1fr); } .tw-ev-grid { grid-template-columns: repeat(2, 1fr); } .tw-lb-head, .tw-lb-row { grid-template-columns: 70px minmax(0, 1.4fr) 1fr 1fr; } .tw-lb-row > :nth-child(4) { display: none; } .tw-lb-head > :nth-child(4) { display: none; } }
@media (max-width: 991.98px) { .tw-links { display: none; } .tw-menu-btn { display: inline-grid; place-items: center; } .tw-login { display: none; } .tw-nav { padding: 12px 16px; } .tw-event { flex-direction: column; align-items: stretch; padding: 24px; } .tw-event h3 { font-size: 28px; } .tw-round-btn { font-size: 20px; padding: 14px 22px; align-self: center; } .tw-event-wrap { padding: 0 16px; margin-top: -60px; } .tw-hero { padding: 40px 16px 110px; } .tw-title h1 { font-size: 34px; } .tw-title img { width: 64px; height: 64px; } .tw-sub { font-size: 16px; } .cv-tiles { grid-template-columns: 1fr; } .tw-ev-grid { grid-template-columns: 1fr; } .tw-lb-head { display: none; } .tw-lb-row { grid-template-columns: 60px minmax(0, 1fr); row-gap: 6px; } .tw-lb-row > :nth-child(n+3) { grid-column: 2; } .tw-rank { font-size: 26px; } .tw-foot-bottom { flex-direction: column; gap: 12px; text-align: center; } .cv-section { padding: 40px 16px 0; } }
