/* ==========================================================================
   动量日报 · 准入登记 (access)
   --------------------------------------------------------------------------
   A quant desk admission slip: cool graph paper, a deep instrument band, and
   a momentum trace that doubles as the access-progress rail.
   Scoped to the client-facing pages (access.html / empty.html).
   ========================================================================== */

:root {
  --paper: #edf1f6;
  --card: #ffffff;
  --ink: #0e1a2b;
  --ink-2: #3e4d64;
  --muted: #7e8c9e;
  --line: #d8e0ea;
  --line-2: #e8edf4;

  --desk: #112139;
  --desk-2: #1c3a5e;

  --signal: #c9382a;         /* on light */
  --signal-bright: #ff6b6b;  /* on the dark band — matches the report */
  --signal-soft: #fbe9e6;

  --ok: #0e7a55;
  --ok-soft: #e1f3eb;
  --warn: #9a6412;
  --warn-soft: #faf0d9;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --radius: 18px;
  --ease: cubic-bezier(.33, 1, .68, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body.ax-body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(880px 420px at 78% -14%, rgba(255, 107, 107, .13), transparent 62%),
    radial-gradient(720px 380px at 4% 2%, rgba(28, 58, 94, .12), transparent 60%),
    linear-gradient(to right, rgba(20, 40, 70, .05) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(to bottom, rgba(20, 40, 70, .05) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--paper);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

/* ---------------- page shell ---------------- */

.ax-shell {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) clamp(16px, 4vw, 28px) 48px;
}

.ax-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 26px 60px -24px rgba(14, 26, 43, .35);
  overflow: hidden;
}

/* ---------------- instrument band ---------------- */

.ax-band {
  position: relative;
  padding: 22px 28px 26px;
  color: #fff;
  background:
    radial-gradient(520px 200px at 88% -30%, rgba(255, 107, 107, .22), transparent 70%),
    linear-gradient(140deg, var(--desk), var(--desk-2));
}
.ax-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 100% 6px;
  opacity: .5;
  mix-blend-mode: overlay;
}

.ax-band-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ax-brand { display: flex; align-items: center; gap: 12px; }
.ax-brand .ax-mark {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
}
.ax-brand .ax-mark svg { width: 22px; height: 22px; display: block; }
.ax-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.ax-brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.ax-brand-text span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  opacity: .58;
}

.ax-band-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  opacity: .82;
  white-space: nowrap;
}
.ax-band-actions { display: flex; align-items: center; gap: 10px; }
.ax-admin-link {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .06);
  transition: background .18s ease;
}
.ax-admin-link:hover { background: rgba(255, 255, 255, .18); }

/* ---------------- momentum rail ---------------- */

.ax-rail { position: relative; margin-top: 20px; }

.ax-chart { position: relative; height: 74px; }
.ax-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ax-trace { fill: none; stroke: rgba(255, 255, 255, .24); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ax-trace-on {
  fill: none;
  stroke: var(--signal-bright);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(255, 107, 107, .45));
}
/* The bright trace is revealed left -> right as the access steps complete. */
.ax-chart-on {
  --p: 0%;
  clip-path: inset(0 calc(100% - var(--p)) 0 0);
  transition: clip-path 1s var(--ease);
}

.ax-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}
.ax-node i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--desk);
  border: 2px solid rgba(255, 255, 255, .3);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.ax-node.is-done i {
  background: var(--signal-bright);
  border-color: var(--signal-bright);
  box-shadow: 0 0 0 5px rgba(255, 107, 107, .16);
}
.ax-node.is-active i { animation: ax-pulse 2.1s ease-out infinite; }
@keyframes ax-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 107, 107, .45); }
  70%  { box-shadow: 0 0 0 11px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

.ax-legend {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.ax-legend li { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.ax-legend b { font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .55); transition: color .3s ease; }
.ax-legend small {
  font-size: 10.5px;
  color: rgba(255, 255, 255, .42);
  max-width: 15ch;
  line-height: 1.35;
}
.ax-legend li.is-lit b { color: #fff; }
.ax-legend li.is-lit small { color: rgba(255, 255, 255, .66); }

/* ---------------- card body ---------------- */

.ax-body-inner { padding: clamp(20px, 3.4vw, 30px); }

.ax-kicker {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--signal);
}
.ax-head h1 { margin: 0 0 8px; font-size: clamp(20px, 2.6vw, 24px); font-weight: 800; letter-spacing: -.01em; }
.ax-lead { margin: 0 0 22px; font-size: 13.5px; color: var(--ink-2); line-height: 1.78; max-width: 54ch; }

/* ---------------- notice ---------------- */

.ax-notice {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: #f4f7fb;
  color: var(--ink-2);
}
.ax-notice.is-error { background: var(--signal-soft); border-color: #f0cec9; color: var(--signal); }
.ax-notice.is-success { background: var(--ok-soft); border-color: #bfe3d0; color: var(--ok); }
.ax-notice.is-info { background: #eaf1fa; border-color: #cfe0f3; color: var(--desk-2); }

/* ---------------- ledger form ---------------- */

.ax-form { display: flex; flex-direction: column; }

.ax-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
}
.ax-row:first-child { border-top: 0; padding-top: 2px; }

.ax-row-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding-top: 3px;
}
.ax-label { font-size: 13.5px; font-weight: 700; letter-spacing: .02em; }
.ax-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  padding: 2px 7px;
  border-radius: 4px;
  background: #eef2f7;
  color: var(--muted);
  white-space: nowrap;
}
.ax-tag.is-req { background: var(--signal-soft); color: var(--signal); }

.ax-row-field { position: relative; display: flex; flex-direction: column; }
.ax-row-field::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .26s var(--ease);
}
.ax-row-field:focus-within::after { transform: scaleX(1); }

.ax-row-field input,
.ax-row-field textarea {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 2px 0 6px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  resize: vertical;
}
.ax-row-field input:focus,
.ax-row-field textarea:focus { outline: none; }
.ax-row-field textarea { min-height: 76px; line-height: 1.7; }
.ax-row-field input::placeholder,
.ax-row-field textarea::placeholder { color: #a8b4c3; }

.ax-counter {
  align-self: flex-end;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
}

/* ---------------- actions ---------------- */

.ax-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.ax-submit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border: 0;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--desk-2), var(--desk));
  box-shadow: 0 12px 24px -10px rgba(17, 33, 57, .7);
  transition: transform .16s ease, box-shadow .2s ease;
}
.ax-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(17, 33, 57, .75); }
.ax-submit:disabled { opacity: .62; cursor: progress; transform: none; }
.ax-submit svg { width: 15px; height: 15px; }
.ax-submit svg path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.ax-ghost {
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.ax-ghost:hover { background: #f4f7fb; border-color: #c6d2e0; }

.ax-hint { margin: 0; font-size: 11.5px; color: var(--muted); max-width: 34ch; line-height: 1.5; }

/* ---------------- submitted / stamp ---------------- */

.ax-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 26px 0 14px;
}
.ax-stamp {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3em;
  text-indent: .3em;
  padding: 9px 18px;
  border: 2px solid currentColor;
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 1), 0 0 0 4px currentColor inset;
  transform: rotate(-3.5deg);
  color: var(--warn);
  background: var(--warn-soft);
}
.ax-stamp.is-approved { color: var(--ok); background: var(--ok-soft); }
.ax-stamp.is-rejected { color: var(--signal); background: var(--signal-soft); }

.ax-result h2 { margin: 12px 0 0; font-size: 19px; font-weight: 800; }
.ax-result p { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 40ch; line-height: 1.75; }
.ax-result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

/* ---------------- identity chips ---------------- */

.ax-ident {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.ax-ident > span { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.ax-ident em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.ax-ident b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  word-break: break-all;
}

/* ---------------- footnote ---------------- */

.ax-foot {
  margin: 18px 2px 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
}

/* ---------------- responsive ---------------- */

@media (max-width: 620px) {
  .ax-shell { padding-left: 14px; padding-right: 14px; }
  .ax-band { padding: 16px 16px 18px; }
  .ax-band-top { flex-wrap: wrap; gap: 10px; }
  .ax-band-tag { display: none; }
  .ax-brand { min-width: 0; }
  .ax-brand .ax-mark { width: 32px; height: 32px; border-radius: 9px; }
  .ax-brand .ax-mark svg { width: 19px; height: 19px; }
  .ax-brand-text strong { font-size: 15.5px; }
  .ax-brand-text span { font-size: 8.5px; letter-spacing: .15em; }
  .ax-admin-link { padding: 6px 12px; font-size: 12px; }
  .ax-chart { height: 58px; }
  .ax-legend b { font-size: 11.5px; }
  .ax-legend small { display: none; }
  .ax-row { grid-template-columns: 1fr; gap: 6px; }
  .ax-row-label { flex-direction: row; align-items: center; gap: 8px; padding-top: 0; }
  .ax-actions { align-items: stretch; }
  .ax-submit { justify-content: center; width: 100%; }
  .ax-hint { text-align: center; max-width: none; }
}

/* ---------------- motion preferences ---------------- */

@media (prefers-reduced-motion: reduce) {
  .ax-chart-on { transition: none; }
  .ax-node.is-active i { animation: none; }
  * { transition-duration: .001ms !important; }
}
