/* ==========================================================================
   ASEEE member pages: "member console"
   --------------------------------------------------------------------------
   An instrument panel in the language of the ASEEE site (Space Grotesk,
   JetBrains Mono, navy / electric blue, light and dark): mono channel tags,
   status lamps, a segmented meter for the time left, traces with solder
   points. It follows the site's light / dark switch through the --ax-* tokens.
   Loaded after base.css; ASEEE only (each sibling project has its own theme).
   ========================================================================== */

.af-root.afx {
  --af-surface: var(--ax-surface-solid);
  --af-surface-2: color-mix(in srgb, var(--ax-blue) 7%, var(--ax-surface-solid));
  --af-line: var(--ax-line);
  --af-line-strong: var(--ax-line-strong);
  --af-text: var(--ax-text);
  --af-muted: var(--ax-muted);
  --af-primary: var(--ax-blue);
  --af-primary-ink: #ffffff;
  --af-accent: var(--ax-cyan);
  --af-ok: #2fe39a;     --af-ok-bg: rgba(47, 227, 154, .12);
  --af-warn: #ffc24b;   --af-warn-bg: rgba(255, 194, 75, .12);
  --af-bad: #ff6b72;    --af-bad-bg: rgba(255, 107, 114, .12);
  --af-info: #3ee0ff;   --af-info-bg: rgba(62, 224, 255, .10);
  --af-mute: var(--ax-muted); --af-mute-bg: rgba(147, 166, 204, .12);
  --af-radius: 16px;
  --af-radius-sm: 10px;
  --af-font: var(--ax-font);
  --af-display: var(--ax-display);
  --af-mono: var(--ax-mono);
  --af-shadow: var(--ax-shadow);
  --af-gap: 22px;
  --af-input-h: 48px;
  padding-bottom: 96px;
}
html[data-theme="light"] .af-root.afx {
  --af-ok: #0d7a53;     --af-ok-bg: #e3f6ec;
  --af-warn: #8f5200;   --af-warn-bg: #fff2d6;
  --af-bad: #b5232a;    --af-bad-bg: #fdeaea;
  --af-info: #0b63b0;   --af-info-bg: #e6f1fc;
  --af-mute-bg: #e9eef7;
}

/* ---------- status bar ---------- */
.afx-bar { position: relative; padding: calc(var(--ax-header-h) + 46px) 0 34px; border-bottom: 1px solid var(--ax-line); overflow: hidden; isolation: isolate; }
.afx-bar__grid { position: absolute; inset: 0; z-index: -1; opacity: .55; pointer-events: none;
  background-image: linear-gradient(var(--ax-line) 1px, transparent 1px), linear-gradient(90deg, var(--ax-line) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 78%); mask-image: linear-gradient(90deg, #000 0%, transparent 78%); }
.afx-bar__in { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.afx-path, .afx-tag { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ax-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ax-cyan); }
.afx-path::before, .afx-tag::before { content: ""; width: 22px; height: 1px; background: var(--ax-grad); }
.afx-path b, .afx-signal__sub b { color: var(--ax-dim); font-weight: 400; }
.af-root.afx .afx-title { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; font-weight: 700; margin: 12px 0 0; letter-spacing: -.015em; }
.afx-lead { margin: 10px 0 0 !important; color: var(--ax-muted) !important; max-width: 640px; }
.afx-id { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 999px; background: var(--ax-surface); box-shadow: var(--ax-shadow); backdrop-filter: blur(12px); }
.afx-id__text { display: grid; line-height: 1.3; }
.afx-id__text strong { font-family: var(--ax-display); font-size: 15px; }
.afx-id__text small { font-family: var(--ax-mono); font-size: 11px; letter-spacing: .06em; color: var(--ax-muted); text-transform: uppercase; }

/* lamps */
.afx-led { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; background: var(--ax-dim); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-dim) 22%, transparent); }
.afx-led--ok { background: var(--af-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-ok) 25%, transparent), 0 0 14px var(--af-ok); animation: afx-pulse 2.4s ease-in-out infinite; }
.afx-led--warn { background: var(--af-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-warn) 25%, transparent), 0 0 14px var(--af-warn); animation: afx-pulse 1.4s ease-in-out infinite; }
.afx-led--bad { background: var(--af-bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-bad) 25%, transparent), 0 0 14px var(--af-bad); }
.afx-led--info { background: var(--af-info); box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-info) 25%, transparent); }
@keyframes afx-pulse { 50% { opacity: .45; } }

/* ---------- body: rail + page ---------- */
.afx-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 34px; }
.afx-body--form { display: block; }
.afx-rail { position: sticky; top: calc(var(--ax-header-h) + 18px); padding: 10px; border-radius: var(--af-radius); background: var(--ax-surface); box-shadow: var(--ax-shadow); backdrop-filter: blur(12px); }
.afx-rail ul { display: grid; gap: 2px; }
.afx-rail__link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: none; color: var(--ax-muted) !important; font: inherit; font-weight: 500; font-size: 15px; text-align: start; text-decoration: none !important; cursor: pointer; transition: background .18s, color .18s; }
.afx-rail__no { font-family: var(--ax-mono); font-size: 10px; letter-spacing: .08em; color: var(--ax-dim); width: 18px; }
.afx-rail__link i { width: 18px; text-align: center; font-size: 14px; color: var(--ax-dim); transition: color .18s; }
.afx-rail__label { flex: 1; }
.afx-rail__link:hover { background: color-mix(in srgb, var(--ax-blue) 9%, transparent); color: var(--ax-text) !important; }
.afx-rail__link.is-active { background: var(--ax-grad); color: #fff !important; font-weight: 600; box-shadow: 0 10px 26px -14px var(--ax-blue); }
.afx-rail__link.is-active i, .afx-rail__link.is-active .afx-rail__no { color: rgba(255, 255, 255, .85); }
.afx-rail__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ax-red); color: #fff; font-family: var(--ax-mono); font-size: 11px; display: grid; place-items: center; }
.afx-rail__out { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--ax-line-strong); }
.afx .afx-rail__out .afx-rail__link { color: var(--ax-red) !important; background: none; box-shadow: none; text-transform: none; letter-spacing: 0; height: auto; min-height: 0; line-height: inherit; border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 500; justify-content: flex-start; }
.afx .afx-rail__out .afx-rail__link:hover { background: color-mix(in srgb, var(--ax-red) 10%, transparent); transform: none; }
.afx-rail__out .afx-rail__link i { color: var(--ax-red); }
.afx-main { min-width: 0; }

/* ---------- cards: glass with bracket corners ---------- */
.afx .af-card, .afx .af-step { position: relative; border: 0; background: var(--ax-surface); box-shadow: var(--ax-shadow); backdrop-filter: blur(12px); }
.afx .af-card::before, .afx .af-step::before { content: ""; position: absolute; top: 10px; inset-inline-end: 10px; width: 14px; height: 14px; border-top: 1px solid var(--ax-cyan); border-inline-end: 1px solid var(--ax-cyan); opacity: .55; pointer-events: none; }
.afx .af-card__title { font-size: 19px; letter-spacing: -.01em; }
.afx .af-eyebrow, .afx .af-kv dt, .afx .af-fee__label, .afx .af-table th { font-family: var(--ax-mono); font-size: 11px; letter-spacing: .12em; font-weight: 500; }
.afx .af-kv dd { font-family: var(--ax-display); font-size: 16px; }
.afx .af-pill { font-family: var(--ax-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-radius: 6px; padding: 5px 10px; }
.afx .af-icon { background: var(--af-info-bg); color: var(--ax-cyan); border-radius: 14px; }

/* buttons: pills with the site gradient */
.afx .af-btn { border-radius: 999px; font-family: var(--ax-display); letter-spacing: .01em; }
.afx .af-btn--primary { background: var(--ax-grad); box-shadow: 0 10px 26px -12px var(--ax-blue); }
.afx .af-btn--primary:hover { transform: translateY(-1px); filter: none; box-shadow: 0 14px 30px -12px var(--ax-blue); }
.afx .af-btn--ghost { box-shadow: inset 0 0 0 1px var(--ax-line-strong); border-color: transparent; background: color-mix(in srgb, var(--ax-surface-solid) 60%, transparent); }
.afx .af-btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ax-cyan); color: var(--ax-cyan) !important; }
.afx .af-btn--link { font-family: var(--ax-font); }

/* inputs: recessed fields with a live underline */
.afx .af-label { font-family: var(--ax-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--ax-muted); }
.afx .af-input { background: color-mix(in srgb, var(--ax-blue) 5%, var(--ax-surface-solid)); border: 1px solid var(--ax-line-strong); border-radius: 10px; }
.afx .af-input:focus { border-color: var(--ax-cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-cyan) 20%, transparent); }
.afx select.af-input option { background: var(--ax-surface-solid); color: var(--ax-text); }
.afx .af-tile__body { border-radius: 12px; background: color-mix(in srgb, var(--ax-blue) 4%, var(--ax-surface-solid)); border-color: var(--ax-line-strong); }
.afx .af-tile input:checked + .af-tile__body { border-color: var(--ax-cyan); box-shadow: var(--ax-glow); background: color-mix(in srgb, var(--ax-blue) 12%, var(--ax-surface-solid)); }
.afx .af-tile input:checked + .af-tile__body i { color: var(--ax-cyan); }
.afx .af-tile__body small { font-family: var(--ax-mono); font-size: 12px; }
.afx .af-fee, .afx .af-upload, .afx .af-accept, .afx .af-terms, .afx .af-pair__item, .afx .af-bank, .afx .af-timeline__note { background: color-mix(in srgb, var(--ax-blue) 5%, var(--ax-surface-solid)); border-color: var(--ax-line); }
.afx .af-fee__amount { font-family: var(--ax-mono); font-size: 24px; color: var(--ax-cyan); }
.afx .af-upload__drop { background: transparent; border-color: var(--ax-line-strong); }
.afx .af-alert, .afx .af-note { border-radius: 12px; }
.afx .af-table td { border-color: var(--ax-line); }
.afx .af-meter { height: 6px; }

/* form steps: a trace with solder points */
.afx .af-shell__nav { top: calc(var(--ax-header-h) + 18px); padding: 16px; border-radius: var(--af-radius); background: var(--ax-surface); box-shadow: var(--ax-shadow); backdrop-filter: blur(12px); display: grid; gap: 14px; }
.afx .af-progress { height: 2px; margin: 0; background: var(--ax-line-strong); }
.afx .af-progress::before { background: var(--ax-grad); }
.afx .af-steps { position: relative; gap: 0; }
.afx .af-steps::before { content: ""; position: absolute; inset-inline-start: 25px; top: 20px; bottom: 20px; width: 1px; background: var(--ax-line-strong); }
.afx .af-steps__item { position: relative; padding: 10px 12px; }
.afx .af-steps__no { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; background: var(--ax-surface-solid); border-color: var(--ax-line-strong); color: var(--ax-muted); position: relative; z-index: 1; }
.afx .af-steps__item.is-active .af-steps__no { background: var(--ax-grad); border-color: transparent; color: #fff; box-shadow: var(--ax-glow); }
.afx .af-steps__item.is-done .af-steps__no { background: var(--af-ok-bg); border-color: var(--af-ok); color: var(--af-ok); }
.afx .af-steps__label { font-family: var(--ax-display); font-size: 14px; }
.afx .af-steps__hint { font-size: 12px; color: var(--ax-muted); }
.afx .af-step__no { color: var(--ax-cyan); font-size: 12px; }
.afx .af-step__no::before { content: "STEP "; opacity: .6; }
.afx .af-step__title { font-size: 24px; letter-spacing: -.015em; }
.afx .af-how li { background: var(--ax-surface); border: 0; box-shadow: var(--ax-shadow); }

/* ---------- dashboard: the membership signal ---------- */
.afx-signal { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 0; margin-bottom: var(--af-gap); border-radius: var(--af-radius); overflow: hidden; color: #e9efff;
  background: linear-gradient(150deg, #0e2a6b 0%, #0b1b3d 58%, #060f26 100%); box-shadow: 0 26px 60px -30px rgba(0, 40, 104, .75), 0 0 0 1px rgba(120, 170, 255, .2); }
.afx-signal::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image: linear-gradient(rgba(120, 170, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 170, 255, .12) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000); mask-image: linear-gradient(120deg, transparent 20%, #000); }
.afx-signal__main { position: relative; padding: 30px 32px; }
.afx-signal .afx-tag { color: #3ee0ff; }
.afx-signal .afx-tag::before { background: linear-gradient(120deg, #2f7bff, #3ee0ff); }
.af-root.afx .afx-signal__state { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; letter-spacing: -.02em; color: #fff; }
.afx-signal__state .afx-led { width: 14px; height: 14px; }
.afx-signal__sub { font-family: var(--ax-mono); font-size: 12px; letter-spacing: .06em; color: #93a6cc !important; margin: 0 0 22px !important; text-transform: uppercase; }
.afx-signal__sub b { color: #61739a; }
.afx-signal__note { color: #b8c6e6 !important; max-width: 520px; margin: 10px 0 0 !important; }
.afx-meter { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 3px; height: 34px; }
.afx-meter i { border-radius: 2px; background: rgba(120, 170, 255, .16); transition: background .3s; }
.afx-meter i.is-on { background: linear-gradient(180deg, #3ee0ff, #2f7bff); box-shadow: 0 0 10px rgba(62, 224, 255, .45); }
.afx-signal--warn .afx-meter i.is-on { background: linear-gradient(180deg, #ffd27a, #ff9f1c); box-shadow: 0 0 10px rgba(255, 180, 60, .45); }
.afx-meter__scale { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--ax-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #93a6cc; }
.afx-signal__read { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 28px; border-inline-start: 1px solid rgba(120, 170, 255, .2); background: rgba(4, 10, 28, .35); }
.afx-readout { font-family: var(--ax-mono); font-size: 62px; line-height: 1; font-weight: 500; letter-spacing: .04em; color: #fff; margin: 8px 0 6px; text-shadow: 0 0 22px rgba(62, 224, 255, .45); }
.afx-signal--bad .afx-readout { text-shadow: 0 0 22px rgba(255, 107, 114, .55); color: #ffb3b7; }
.afx-signal--warn .afx-readout { text-shadow: 0 0 22px rgba(255, 180, 60, .55); color: #ffe0a3; }
.afx-readout--text { font-size: 22px; letter-spacing: .1em; line-height: 1.25; }
.afx-signal__until { font-family: var(--ax-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #93a6cc; }
.afx-signal__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.afx-signal .af-btn--ghost { color: #e9efff !important; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(120, 170, 255, .35); }

/* next action */
.afx-next { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: var(--af-gap); padding: 22px 26px; border-radius: var(--af-radius); background: var(--ax-surface); box-shadow: var(--ax-shadow); border-inline-start: 3px solid var(--ax-cyan); backdrop-filter: blur(12px); }
.afx-next--warn { border-inline-start-color: var(--af-warn); }
.afx-next--bad { border-inline-start-color: var(--af-bad); }
.afx-next--ok { border-inline-start-color: var(--af-ok); }
.afx-next__text { flex: 1 1 320px; min-width: 0; }
.af-root.afx .afx-next h2 { font-size: 22px; margin: 8px 0 4px; }
.af-root.afx .afx-next p { margin: 0; color: var(--ax-muted); }

/* trace */
.afx-trace-card { padding-bottom: 26px; }
.afx .afx-trace { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; }
.afx-trace__node { position: relative; padding-top: 30px; padding-inline-end: 14px; display: grid; gap: 2px; }
.afx-trace__node::before { content: ""; position: absolute; top: 8px; inset-inline-start: 0; inset-inline-end: 0; height: 2px; background: var(--ax-line-strong); }
.afx-trace__node:last-child::before { inset-inline-end: 60%; }
.afx-trace__dot { position: absolute; top: 1px; inset-inline-start: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--ax-surface-solid); border: 2px solid var(--ax-line-strong); }
.afx-trace__node strong { font-family: var(--ax-display); font-size: 15px; }
.afx-trace__node small { font-family: var(--ax-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ax-muted); }
.afx-trace__node.is-done::before { background: var(--ax-grad); }
.afx-trace__node.is-done .afx-trace__dot { background: var(--ax-cyan); border-color: var(--ax-cyan); box-shadow: 0 0 12px var(--ax-cyan); }
.afx-trace__node.is-current .afx-trace__dot { border-color: var(--ax-cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ax-cyan) 25%, transparent); animation: afx-pulse 1.6s ease-in-out infinite; }
.afx-trace__node.is-current small { color: var(--ax-cyan); }
.afx-trace__node.is-problem .afx-trace__dot { border-color: var(--af-bad); background: var(--af-bad); }
.afx-trace__node.is-problem small { color: var(--af-bad); }

/* panels */
.afx-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--af-gap); }
.afx-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
.af-root.afx .afx-panel__title { font-size: 18px; margin: 10px 0 0; }
.afx-panel__meta { font-size: 14px; color: var(--ax-muted) !important; margin: 0 !important; }
.afx-panel__line { margin: 0 !important; }
.afx-panel__warn { font-size: 13px; color: var(--af-bad) !important; margin: 0 !important; }
.afx-panel .af-btn { margin-top: auto; }
.afx .afx-list { display: grid; gap: 8px; width: 100%; margin: 4px 0 8px; font-size: 14px; }
.afx-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed var(--ax-line); }
.afx-list li a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afx-list li > span:nth-child(2) { font-family: var(--ax-mono); font-size: 12px; text-align: end; }
.afx-list li .af-pill { grid-column: 1 / -1; justify-self: start; }
.afx-list--plain li { grid-template-columns: 20px minmax(0, 1fr); border: 0; padding: 0; color: var(--ax-muted); overflow-wrap: anywhere; }
.afx-list--plain i { color: var(--ax-dim); text-align: center; }

/* ---------- sign-in ---------- */
.afx-join .afx-id { background: none; box-shadow: none; padding: 0; backdrop-filter: none; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .afx-panels { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  .afx-body { grid-template-columns: 1fr; gap: 20px; }
  .afx-rail { position: static; padding: 6px; overflow-x: auto; display: flex; gap: 2px; border-radius: 14px; }
  .afx-rail ul { grid-auto-flow: column; grid-auto-columns: max-content; }
  .afx-rail__no { display: none; }
  .afx-rail__link { padding: 10px 12px; white-space: nowrap; }
  .afx-rail__out { margin: 0; padding: 0; border: 0; }
  .afx-signal { grid-template-columns: 1fr; }
  .afx-signal__read { border-inline-start: 0; border-top: 1px solid rgba(120, 170, 255, .2); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
  .afx-readout { font-size: 44px; margin: 0; }
  .afx-signal__actions { margin: 0; margin-inline-start: auto; }
  .afx .af-shell__nav { position: static; }
  .afx .af-steps::before { display: none; }
}
@media (max-width: 640px) {
  .afx-bar { padding-top: calc(var(--ax-header-h) + 26px); }
  .afx-signal__main { padding: 22px 20px; }
  .afx-meter { height: 24px; gap: 2px; }
  .afx .afx-trace { grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
  .afx-trace__node { padding: 0; padding-inline-start: 30px; }
  .afx-trace__node::before { top: 0; bottom: -14px; inset-inline-start: 7px; inset-inline-end: auto; width: 2px; height: auto; }
  .afx-trace__node:last-child::before { display: none; }
  .afx-id { width: 100%; border-radius: 14px; }
}
