/* Agent Guilds in the platform style (Feature #1078, ET-33861), modelled on /build-it-better:
   an eyebrow + two-line display headline, numbered and coloured section heads, glowing step rail,
   accent-edged cards. House palette only; every class guilds.js creates (.aj-row, .aj-badge,
   .aj-btn, .aj-say, .aj-meta) keeps a rule here. Scoped to .gl so no other page changes. */
.gl {
  --gl-bg: rgb(10 14 23); --gl-bg2: rgb(13 21 32); --gl-card: rgb(17 26 40); --gl-raise: rgb(20 32 51);
  --gl-panel: rgba(17,24,39,0.6); --gl-line: rgba(0,150,255,0.15); --gl-soft: rgba(169,184,204,0.12);
  --gl-text: rgb(255 255 255); --gl-text2: rgb(169 184 204); --gl-muted: rgb(127 147 173);
  --gl-accent: rgb(0 207 255); --gl-pos: rgb(0 255 136); --gl-neg: rgb(255 68 68); --gl-blue: rgb(59 130 246);
  --gl-c: var(--gl-accent);
  max-width: 1080px; margin: 0 auto; padding: 1.25rem 16px 3rem; box-sizing: border-box; color: var(--gl-text);
}
.gl * { box-sizing: border-box; }
.gl a { color: var(--gl-accent); text-decoration: none; }
.gl a:focus-visible, .gl button:focus-visible, .gl input:focus-visible, .gl textarea:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gl-accent); }

/* ── first screen ─────────────────────────────────────────────── */
.gl-top { position: relative; text-align: center; padding: 18px 0 30px; }
.gl-top::before { content: ""; position: absolute; inset: -40px -6% auto; height: 420px; pointer-events: none; z-index: 0;
  background: radial-gradient(460px 230px at 30% 30%, rgba(0,207,255,0.10), rgba(0,207,255,0) 70%), radial-gradient(460px 230px at 72% 40%, rgba(0,255,136,0.08), rgba(0,255,136,0) 70%); }
.gl-top::after { content: ""; position: absolute; inset: -60px -6% auto; height: 460px; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(0,207,255,0.07) 1px, rgba(0,207,255,0) 1px), linear-gradient(90deg, rgba(0,207,255,0.07) 1px, rgba(0,207,255,0) 1px);
  background-size: 48px 48px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 38%, rgb(0 0 0) 20%, transparent 75%); mask-image: radial-gradient(ellipse 55% 60% at 50% 38%, rgb(0 0 0) 20%, transparent 75%); }
.gl-top > * { position: relative; z-index: 1; }
.gl-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--gl-accent); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  padding: 6px 14px; border: 1px solid rgba(0,207,255,0.35); border-radius: 999px; background: rgba(0,207,255,0.06); }
.gl-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gl-pos); box-shadow: 0 0 8px var(--gl-pos); animation: gl-blink 1.6s ease-in-out infinite; }
@keyframes gl-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .gl-eyebrow::before { animation: none; } }
.gl h1 { font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: clamp(1.7rem, 4.2vw, 3.1rem); line-height: 1.05; letter-spacing: -0.01em;
  margin: 14px auto 0; max-width: min(16em, 100%); text-wrap: balance; color: var(--text-heading, var(--gl-text)); word-break: break-word; }
.gl h1 .l2 { display: block; color: var(--gl-accent); }
.gl-lead { margin: 14px auto 0; max-width: 720px; font-size: 1rem; line-height: 1.55; color: var(--gl-text2); }
.gl-lead b { color: var(--gl-pos); }
.gl-ctas { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.gl-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 10px; border: 0; cursor: pointer;
  background: linear-gradient(90deg, rgb(0 207 255), rgb(0 255 136)); color: rgb(4 19 11) !important; font-weight: 800; font-size: 1.02rem; transition: box-shadow .15s, transform .15s; }
.gl-cta::after { content: "\2192"; }
.gl-cta:disabled { opacity: .55; cursor: wait; }
.gl-cta:hover { box-shadow: 0 0 34px rgba(0,255,136,0.4); transform: translateY(-1px); }
.gl-ghost { display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 10px; border: 1px solid rgba(0,207,255,0.4); color: var(--gl-accent); font-weight: 700; background: rgba(0,207,255,0.05); }
.gl-ghost:hover { border-color: var(--gl-accent); background: rgba(0,207,255,0.1); }
.gl-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0 0; padding: 0; text-align: left; }
.gl-facts li { padding: 14px 16px; border-radius: 12px; background: var(--gl-panel); border: 1px solid var(--gl-line); border-top: 2px solid var(--gl-c); color: var(--gl-text2); font-size: .86rem; line-height: 1.5; }
.gl-facts li:nth-child(1) { --gl-c: var(--gl-accent); } .gl-facts li:nth-child(2) { --gl-c: var(--gl-pos); } .gl-facts li:nth-child(3) { --gl-c: var(--gl-blue); }

/* ── sections: a numbered, coloured head over a panel ─────────── */
.gl-sec { margin-top: 34px; --gl-c: var(--gl-accent); }
.gl-sec.c-pos { --gl-c: var(--gl-pos); } .gl-sec.c-blue { --gl-c: var(--gl-blue); } .gl-sec.c-neg { --gl-c: var(--gl-neg); }
.gl-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; padding-left: 14px; border-left: 3px solid var(--gl-c); }
.gl-kick { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gl-c); margin-bottom: 4px; }
.gl h2 { font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: clamp(1.2rem, 2.6vw, 1.55rem); line-height: 1.15; margin: 0; color: var(--text-heading, var(--gl-text)); letter-spacing: .01em; }
.gl-sub { margin: 6px 0 0; font-size: .86rem; line-height: 1.5; color: var(--gl-text2); max-width: 720px; }
.gl-panel { background: var(--gl-panel); border: 1px solid var(--gl-line); border-radius: 14px; padding: 16px; }

/* subsection cards: title in display font, coloured edge per card */
.gl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gl-card { position: relative; padding: 18px 16px 16px; border-radius: 14px; background: linear-gradient(180deg, var(--gl-raise), var(--gl-card)); border: 1px solid var(--gl-line); border-top: 2px solid var(--gl-c); }
.gl-card:nth-child(1) { --gl-c: var(--gl-accent); } .gl-card:nth-child(2) { --gl-c: var(--gl-pos); } .gl-card:nth-child(3) { --gl-c: var(--gl-blue); }
.gl-card h3 { font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: 1.02rem; line-height: 1.2; margin: 0 0 8px; color: var(--gl-c); }
.gl-card p { margin: 0; color: var(--gl-text2); font-size: .88rem; line-height: 1.55; }

/* step rail, as on Build it Better */
.gl-how { list-style: none; counter-reset: gl-step; margin: 0; padding: 4px 0 0; position: relative; }
.gl-how::before { content: ""; position: absolute; left: 17px; top: 22px; bottom: 18px; width: 2px; background: linear-gradient(180deg, var(--gl-accent), var(--gl-pos)); opacity: .45; }
.gl-how li { counter-increment: gl-step; position: relative; padding: 7px 0 16px 52px; min-height: 36px; color: var(--gl-text2); font-size: .9rem; line-height: 1.5; }
.gl-how li::before { content: counter(gl-step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display, 'Archivo Black', sans-serif); font-size: .92rem; color: var(--gl-accent); background: var(--gl-bg); border: 1px solid var(--gl-accent); box-shadow: 0 0 14px rgba(0,207,255,0.22); }
.gl-how li:last-child { padding-bottom: 0; }
.gl-how li:last-child::before { color: var(--gl-pos); border-color: var(--gl-pos); box-shadow: 0 0 14px rgba(0,255,136,0.3); }

/* leaderboard + guild list rows */
.gl-list { display: flex; flex-direction: column; gap: 10px; }
.gl-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--gl-card); border: 1px solid var(--gl-line); transition: border-color .15s; }
.gl-row:hover { border-color: rgba(0,207,255,0.4); }
.gl-rank { flex: 0 0 auto; min-width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display, 'Archivo Black', sans-serif); font-size: 1rem;
  color: var(--gl-blue); border: 1px solid rgba(59,130,246,0.45); background: rgba(59,130,246,0.08); }
.gl-row.top1 .gl-rank { color: var(--gl-pos); border-color: rgba(0,255,136,0.5); background: rgba(0,255,136,0.08); box-shadow: 0 0 16px rgba(0,255,136,0.2); }
.gl-name { flex: 1 1 180px; min-width: 0; font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: 1rem; color: var(--text-heading, var(--gl-text)); word-break: break-word; }
.gl-name a { color: inherit; display: inline-block; padding: 10px 0; }
.gl-name a:hover { color: var(--gl-accent); }
.gl-score { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--gl-pos); font-size: .95rem; }
.gl-score.neg { color: var(--gl-neg); }
.gl-row .aj-meta { flex: 1 1 100%; }
.gl-empty { text-align: center; padding: 22px 12px; color: var(--gl-text2); }

/* shared controls guilds.js creates */
.gl .aj-row { border: 1px solid var(--gl-line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--gl-card); }
.gl .aj-row b { font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; color: var(--text-heading, var(--gl-text)); }
.gl .aj-meta { color: var(--gl-muted); font-size: .8rem; font-family: 'JetBrains Mono', monospace; word-break: break-word; }
.gl .aj-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; border: 1px solid rgba(0,207,255,0.4); color: var(--gl-accent); background: rgba(0,207,255,0.06); }
.gl .aj-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; margin: 12px 8px 0 0; background: var(--gl-accent); color: rgb(4 19 30); border: 0; border-radius: 10px; font-weight: 800; cursor: pointer; }
.gl .aj-btn.alt { background: transparent; color: var(--gl-accent); border: 1px solid rgba(0,207,255,0.45); }
.gl .aj-btn:disabled { opacity: .55; cursor: wait; }
.gl .aj-say { margin-top: 10px; font-size: .88rem; min-height: 1.2em; }
.gl .aj-say.err { color: var(--gl-neg); font-weight: 700; }
.gl .aj-say.ok { color: var(--gl-pos); }
.gl-crumb { font-size: .82rem; margin: 0 0 4px; color: var(--gl-muted); text-align: left; }
.gl-crumb a { display: inline-block; padding: 10px 0; }
.gl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; text-align: left; }
.gl-stat { padding: 14px 16px; border-radius: 12px; background: var(--gl-panel); border: 1px solid var(--gl-line); border-top: 2px solid var(--gl-c); }
.gl-stat:nth-child(1) { --gl-c: var(--gl-pos); } .gl-stat:nth-child(2) { --gl-c: var(--gl-accent); } .gl-stat:nth-child(3) { --gl-c: var(--gl-blue); }
.gl-stat .k { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gl-c); }
.gl-stat .v { display: block; margin-top: 6px; font-family: var(--font-display, 'Archivo Black', sans-serif); font-size: 1.3rem; color: var(--text-heading, var(--gl-text)); word-break: break-word; }
.gl-note { margin: 12px 0 0; font-size: .82rem; color: var(--gl-text2); text-align: center; }

.gl-form label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; margin: 12px 0 5px; color: var(--gl-text2); }
.gl-form input, .gl-form textarea, .gl-panel > input { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(0,150,255,0.28); background: var(--gl-bg2); color: var(--gl-text); font: inherit; }
.gl-form input[type="checkbox"] { width: auto; min-height: 0; }
.gl-form textarea { resize: vertical; }
.gl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }

@media (max-width: 760px) {
  .gl-facts, .gl-cards, .gl-stats { grid-template-columns: 1fr; }
  .gl-grid2 { grid-template-columns: 1fr; }
  .gl-top { padding-top: 8px; }
  .gl-ctas > a { flex: 1 1 100%; justify-content: center; }
}

/* ── #1087 (ET-33886): clickable steps, step breakdowns, the All guilds directory ── */
.gl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gl-step { display: flex; align-items: flex-start; gap: 14px; height: 100%; padding: 16px; border-radius: 14px; background: var(--gl-panel); border: 1px solid var(--gl-line);
  color: var(--gl-text2) !important; transition: border-color .15s, transform .15s, box-shadow .15s; }
.gl-step .n { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display, 'Archivo Black', sans-serif);
  font-size: .9rem; color: var(--gl-accent); background: var(--gl-bg); border: 1px solid var(--gl-accent); box-shadow: 0 0 14px rgba(0,207,255,0.22); }
.gl-steps li:last-child .gl-step .n { color: var(--gl-pos); border-color: var(--gl-pos); box-shadow: 0 0 14px rgba(0,255,136,0.3); }
.gl-step .t { flex: 1 1 auto; min-width: 0; font-size: .9rem; line-height: 1.5; }
.gl-step .t b { display: block; margin-bottom: 4px; font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: 1rem; color: var(--text-heading, var(--gl-text)); }
.gl-step .go { flex: 0 0 auto; align-self: center; font-size: 1.3rem; color: var(--gl-accent); transition: transform .15s; }
.gl-step:hover, .gl-step:focus-visible { border-color: rgba(0,207,255,0.55); transform: translateY(-2px); box-shadow: 0 0 26px rgba(0,207,255,0.14); }
.gl-step:hover .go, .gl-step:focus-visible .go { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .gl-step, .gl-step .go { transition: none; } .gl-step:hover { transform: none; } }

.gl-modal { display: none; position: fixed; inset: 0; z-index: 1000; padding: 16px; background: rgba(5,8,14,0.78); align-items: center; justify-content: center; }
.gl-modal:target, .gl-modal.open { display: flex; }
.gl-modal-box { position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px 22px 22px; border-radius: 16px;
  background: var(--gl-card); border: 1px solid rgba(0,207,255,0.35); box-shadow: 0 0 60px rgba(0,207,255,0.12); text-align: left; }
.gl-modal-box h2 { margin-bottom: 12px; padding-right: 40px; }
.gl-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--gl-text2) !important; border-radius: 10px; }
.gl-x:hover { color: var(--gl-accent) !important; background: rgba(0,207,255,0.08); }
.gl-dl { margin: 0 0 6px; padding-left: 18px; }
.gl-dl li { color: var(--gl-text2); font-size: .92rem; line-height: 1.55; margin-bottom: 8px; }
.gl-dl li::marker { color: var(--gl-accent); }
.gl-ladder { list-style: none; margin: 0 0 10px; padding: 0; }
.gl-ladder li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--gl-soft); color: var(--gl-text2); font-size: .9rem; }
.gl-ladder b { font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; min-width: 110px; color: var(--gl-blue); }
.gl-ladder li:nth-last-child(2) b { color: var(--gl-pos); }
.gl-ladder li:last-child b { color: var(--gl-accent); }

.gl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.gl-search { position: relative; flex: 1 1 260px; min-width: 0; }
.gl-search input { width: 100%; min-height: 44px; padding: 9px 46px 9px 12px; border-radius: 10px; border: 1px solid rgba(0,150,255,0.28); background: var(--gl-bg2); color: var(--gl-text); font: inherit; }
.gl-search input::-webkit-search-cancel-button { display: none; }
.gl-clear { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: transparent; color: var(--gl-text2); font-size: 1.35rem; cursor: pointer; border-radius: 10px; }
.gl-clear:hover { color: var(--gl-accent); }
.gl-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gl-text2); font-size: .88rem; cursor: pointer; }
.gl-check input { width: 18px; height: 18px; accent-color: rgb(0 207 255); }
.gl-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--gl-text2); font-size: .82rem; }
.gl-sort select { min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(0,150,255,0.28); background: var(--gl-bg2); color: var(--gl-text); font: inherit; }
.gl-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gl-dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.gl-gcard { display: flex; flex-direction: column; padding: 16px; border-radius: 14px; background: linear-gradient(180deg, var(--gl-raise), var(--gl-card)); border: 1px solid var(--gl-line); border-top: 2px solid var(--gl-accent); }
.gl-gcard[hidden] { display: none; }
.gl-gcard h3 { margin: 0 0 10px; font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: 1.15rem; line-height: 1.2; word-break: break-word; }
.gl-gcard h3 a { color: var(--text-heading, var(--gl-text)); }
.gl-gcard h3 a:hover { color: var(--gl-accent); }
.gl-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.gl-kv div { padding: 8px 10px; border-radius: 10px; background: var(--gl-bg2); border: 1px solid var(--gl-soft); min-width: 0; }
.gl-kv dt { font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gl-muted); }
.gl-kv dd { margin: 4px 0 0; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .9rem; color: var(--gl-text); word-break: break-word; }
.gl-kv dd.gl-score { color: var(--gl-pos); }
.gl-kv dd.gl-score.neg { color: var(--gl-neg); }
.gl-founded { margin: 10px 0 0; font-size: .84rem; color: var(--gl-text2); }
.gl-founded b { color: var(--gl-pos); font-weight: 700; }
.gl-gact { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: auto; }
@media (max-width: 760px) {
  .gl-steps { grid-template-columns: 1fr; }
  .gl-tools { flex-direction: column; align-items: stretch; }
  .gl-search { flex-basis: auto; }
}

/* ── landing rework (#1069 follow-up, ET-33888): quiet link row under the hero, facts as one-liners ── */
.gl-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; }
.gl-links a { font-weight: 700; font-size: .92rem; padding: 8px 2px; border-bottom: 1px solid rgba(0,207,255,0.35); }
.gl-links a:hover { border-bottom-color: var(--gl-accent); }
.gl-links a[hidden] { display: none; }
.gl-empty .gl-cta { margin: 4px auto; }
@media (max-width: 760px) { .gl-links { gap: 4px 18px; } }
.gl-check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gl-accent); }

/* ET-34103 / ET-34100: the Sponsors card (full width, expandable) and the mentorship list in the rank breakdown */
.gl-card-wide { grid-column: 1 / -1; --gl-c: var(--gl-accent); }
.gl-card:nth-child(4) { --gl-c: var(--gl-accent); }
.gl-more { margin-top: 12px; }
.gl-more > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(0,207,255,0.35); color: var(--gl-accent); font-weight: 700; font-size: .9rem; cursor: pointer; list-style: none; }
.gl-more > summary::-webkit-details-marker { display: none; }
.gl-more > summary::after { content: "\25BE"; margin-left: 8px; transition: transform .15s; }
.gl-more[open] > summary::after { transform: rotate(180deg); }
.gl-more-body { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--gl-line); }
.gl-more-body h4 { font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: .98rem; margin: 16px 0 6px; color: var(--gl-text); }
.gl-more-body h5 { font-size: .9rem; font-weight: 700; margin: 12px 0 4px; color: var(--gl-pos); }
.gl-more-body .gl-lead2 { font-weight: 700; color: var(--gl-text); font-size: .98rem; margin-top: 12px; }
.gl-sub-h { font-family: var(--font-display, 'Archivo Black', sans-serif); font-weight: 400; font-size: 1rem; margin: 16px 0 8px; color: var(--gl-accent); }
