﻿/* ============================================================
   MERIDIAN — application surface
   The access-request instrument.

   Shares the gateway atmosphere with login.html but uses a
   different motion vocabulary:
     · a slowly counter-rotating aperture field (canvas)
     · a protocol spine that grows and lights as fields complete
     · a completion ring driven by real form state
     · per-field capacity bars
     · a submit seal that arms after the anti-bot delay

   Depends on tokens from main.css.
   ============================================================ */

/* ============================================================
   1. TOKENS
   ============================================================ */

:root {
  --ax-void:     #040405;
  --ax-abyss:    #07080A;
  --ax-plate:    #0A0B0E;
  --ax-raise:    #121418;

  --ax-line:     #131519;
  --ax-line-2:   #1A1D22;
  --ax-line-lit: #252A31;
  --ax-line-hot: #363C45;

  --ax-ink:      #EAEDF0;
  --ax-dim:      #B0B7C0;
  --ax-mute:     #767D87;
  --ax-faint:    #565D66;
  --ax-ghost:    #343A42;

  --ax-live:     #7FCBA4;
  --ax-caution:  #D6B571;
  --ax-refuse:   #E0859F;
  --ax-deny:     #D4517C;
  --ax-cool:     #8FA8C8;

  --ax-r-sm: 4px;
  --ax-r-md: 8px;
  --ax-r-lg: 14px;
  --ax-r-xl: 20px;

  --ax-ease:     cubic-bezier(.22, .61, .36, 1);
  --ax-ease-out: cubic-bezier(.16, 1, .3, 1);
  --ax-spring:   cubic-bezier(.34, 1.42, .5, 1);
  --ax-med:  .48s;
  --ax-fast: .22s;
  --ax-slow: .9s;

  --ax-gutter: clamp(20px, 5vw, 64px);
  --ax-maxw:  1360px;
  --ax-spine-w: 1px;
}

/* ============================================================
   2. SHELL
   ============================================================ */

.ax-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ax-void);
  color: var(--ax-ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.ax-body *,
.ax-body *::before,
.ax-body *::after { box-sizing: border-box; }
.ax-body img, .ax-body svg { display: block; }
.ax-body a { color: var(--ax-dim); text-decoration: none; transition: color var(--ax-fast) var(--ax-ease); }
.ax-body a:hover { color: var(--ax-ink); }
.ax-body ::selection { background: #2C3239; color: #fff; }
.ax-body :focus-visible { outline: 1.5px solid var(--ax-mute); outline-offset: 3px; border-radius: 3px; }
.ax-body h1, .ax-body h2, .ax-body h3 { margin: 0; font-weight: 500; color: var(--ax-ink); }

/* ============================================================
   3. ATMOSPHERE
   ============================================================ */

/* base wash: warmer at the base, cooler at the top, unlike login */
/* Background atmosphere layer. Deliberately NOT named .ax-field — that class
   belongs to the form fields below, which are position:relative flex rows. */
.ax-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(105% 78% at 82% 4%,   rgba(212, 81, 124, .05) 0%, transparent 56%),
    radial-gradient(95% 80% at 8% 96%,    rgba(143, 168, 200, .05) 0%, transparent 60%),
    linear-gradient(184deg, #0B0C0F 0%, var(--ax-void) 52%, #030304 100%);
}
.ax-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* fine double grid, rotated off-axis so it never reads as a table */
.ax-lattice {
  position: fixed;
  inset: -40%;
  z-index: 1;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 92px 92px;
  transform: rotate(-14deg);
  mask-image: radial-gradient(60% 55% at 62% 34%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(60% 55% at 62% 34%, #000 0%, transparent 70%);
  animation: ax-breathe-grid 26s ease-in-out infinite;
}
@keyframes ax-breathe-grid {
  0%, 100% { opacity: .30; }
  50%      { opacity: .52; }
}

.ax-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='150' height='150' filter='url(%23n)'/></svg>");
}

.ax-vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(115% 92% at 50% 46%, transparent 40%, rgba(0,0,0,.6) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.45) 0%, transparent 14%, transparent 88%, rgba(0,0,0,.45) 100%);
}

/* travelling light bar */
.ax-scan {
  position: fixed;
  left: 0; right: 0;
  height: 260px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent,
    rgba(200, 215, 230, .014) 44%,
    rgba(200, 215, 230, .026) 50%,
    transparent);
  animation: ax-scan 18s linear infinite;
}
@keyframes ax-scan {
  0%   { transform: translateY(-280px); }
  100% { transform: translateY(100vh); }
}

.ax-rule {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 40;
  background: linear-gradient(to right,
    transparent 0%, rgba(255,255,255,.045) 14%,
    rgba(212,81,124,.20) 50%,
    rgba(255,255,255,.045) 86%, transparent 100%);
}

/* ============================================================
   4. HEADER
   ============================================================ */

.ax-top {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
  padding: 20px var(--ax-gutter) 18px;
  border-bottom: 1px solid rgba(255,255,255,.035);
}

.ax-brand { display: flex; align-items: center; gap: 13px; flex: none; }
.ax-brand img { width: 26px; height: 26px; opacity: .95; }
.ax-brand .word { font-size: 11.5px; font-weight: 600; letter-spacing: .36em; color: var(--ax-ink); display: block; }
.ax-brand .sub {
  display: block; font-size: 8.5px; letter-spacing: .26em;
  color: var(--ax-ghost); margin-top: 3px; font-weight: 400;
}

/* step counter in the header */
.ax-stepchip {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 13px 5px 11px;
  border: 1px solid var(--ax-line-2);
  border-radius: 100px;
  background: rgba(10,11,13,.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ax-stepchip .n {
  font-family: var(--mono); font-size: 10px; color: var(--ax-ink-dim); letter-spacing: .04em;
}
.ax-stepchip .s {
  font-size: 8.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--ax-ghost);
  padding-left: 10px; border-left: 1px solid var(--ax-line-2);
}
.ax-stepchip[data-state="armed"] .s { color: var(--ax-live); }

.ax-top .spacer { flex: 1; }
.ax-topnav { display: flex; align-items: center; gap: 4px; }

.ax-navlink {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px;
  border: 1px solid transparent; border-radius: var(--ax-r-sm);
  background: none; color: var(--ax-mute);
  font-family: var(--font); font-size: 9.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
  transition: color var(--ax-fast) var(--ax-ease),
              border-color var(--ax-fast) var(--ax-ease),
              background var(--ax-fast) var(--ax-ease);
}
.ax-navlink:hover { color: var(--ax-ink); border-color: var(--ax-line-lit); background: rgba(255,255,255,.022); }
.ax-navlink svg { width: 12px; height: 12px; opacity: .85; }
.ax-navlink.is-key { color: var(--ax-dim); }
.ax-navlink.is-key:hover { color: #fff; }

/* ============================================================
   5. STAGE
   ============================================================ */

.ax-stage {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 80px);
  align-items: start;
  max-width: var(--ax-maxw);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 62px) var(--ax-gutter) clamp(60px, 8vw, 100px);
}

/* ============================================================
   6. LEFT COLUMN
   ============================================================ */

.ax-aside { position: sticky; top: 34px; min-width: 0; }

.ax-kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: 9px; letter-spacing: .4em; text-transform: uppercase; color: var(--ax-faint);
}
.ax-kicker .n { color: var(--ax-deny); font-family: var(--mono); letter-spacing: .1em; }
.ax-kicker::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--ax-line-hot), transparent); }

.ax-aside h1 {
  font-size: clamp(27px, 3.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -.015em;
  font-weight: 400;
  margin: 22px 0 16px;
}
.ax-aside h1 .dim { color: var(--ax-ghost); }

.ax-lede { font-size: 14.5px; line-height: 1.82; color: var(--ax-mute); max-width: 46ch; }

/* ---------- protocol spine ---------- */
.ax-spine { position: relative; margin-top: 38px; padding-left: 34px; }

/* the growing line */
.ax-spine .track {
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 14px;
  width: var(--ax-spine-w);
  background: var(--ax-line);
  overflow: hidden;
}
.ax-spine .track i {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--ax-deny), var(--ax-cool));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.1s var(--ax-ease-out);
}
/* a light travelling along the spine */
.ax-spine .track b {
  position: absolute;
  left: -1px; right: -1px;
  height: 46px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.5), transparent);
  animation: ax-spine-run 4.2s var(--ax-ease) infinite;
}
@keyframes ax-spine-run {
  0%   { transform: translateY(-50px); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(420px); opacity: 0; }
}

.ax-node { position: relative; padding-bottom: 26px; }
.ax-node:last-child { padding-bottom: 0; }

.ax-node .pin {
  position: absolute;
  left: -34px;
  top: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1px solid var(--ax-line-hot);
  background: var(--ax-void);
  display: grid;
  place-items: center;
  transition: border-color var(--ax-med) var(--ax-ease),
              box-shadow var(--ax-med) var(--ax-ease),
              transform var(--ax-med) var(--ax-spring);
}
.ax-node .pin::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ax-ghost);
  transition: background var(--ax-med) var(--ax-ease);
}
.ax-node[data-on="true"] .pin { border-color: var(--ax-deny); box-shadow: 0 0 14px -2px rgba(212,81,124,.55); }
.ax-node[data-on="true"] .pin::after { background: var(--ax-deny); }
.ax-node[data-done="true"] .pin { transform: scale(1.06); }
.ax-node[data-done="true"] .pin::after { background: var(--ax-live); }
.ax-node[data-done="true"] .pin { border-color: rgba(127,203,164,.55); box-shadow: 0 0 14px -3px rgba(127,203,164,.5); }

.ax-node .idx {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ax-ghost);
  letter-spacing: .1em;
  margin-bottom: 5px;
}
.ax-node[data-on="true"] .idx { color: var(--ax-faint); }
.ax-node h3 {
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ax-mute); margin-bottom: 6px;
  transition: color var(--ax-med) var(--ax-ease);
}
.ax-node[data-on="true"] h3 { color: var(--ax-ink-dim); }
.ax-node p { font-size: 12.5px; line-height: 1.74; color: var(--ax-faint); max-width: 40ch; }

/* ---------- disclosure ---------- */
.ax-disclose {
  margin-top: 30px;
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-md);
  background: rgba(9,10,12,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
}
.ax-disclose-h {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: 0; padding: 13px 15px;
  color: var(--ax-mute);
  font-family: var(--font); font-size: 9px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase;
  cursor: pointer; text-align: left;
  transition: color var(--ax-fast) var(--ax-ease), background var(--ax-fast) var(--ax-ease);
}
.ax-disclose-h:hover { color: var(--ax-ink-dim); background: rgba(255,255,255,.018); }
.ax-disclose-h .chev { transition: transform var(--ax-med) var(--ax-ease); display: grid; place-items: center; color: var(--ax-ghost); }
.ax-disclose-h .chev svg { width: 12px; height: 12px; }
.ax-disclose[data-open="true"] .ax-disclose-h .chev { transform: rotate(180deg); }
.ax-disclose-b { padding: 0 15px 15px; font-size: 12px; line-height: 1.8; color: var(--ax-faint); }
.ax-disclose-b[hidden] { display: none; }
.ax-disclose-b p { margin-bottom: 9px; }
.ax-disclose-b p:last-child { margin-bottom: 0; }

/* ============================================================
   7. PORTAL
   ============================================================ */

.ax-portal-wrap { position: relative; min-width: 0; }
.ax-portal-wrap::before {
  content: "";
  position: absolute;
  inset: -10% -8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(212,81,124,.06), transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}

.ax-portal {
  position: relative;
  border: 1px solid var(--ax-line-lit);
  border-radius: var(--ax-r-xl);
  background: linear-gradient(170deg, rgba(20,22,27,.93) 0%, rgba(11,12,15,.95) 48%, rgba(7,8,10,.97) 100%);
  backdrop-filter: blur(22px) saturate(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(1.04);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 44px 100px -34px rgba(0,0,0,.92),
    0 0 0 1px rgba(0,0,0,.5);
  overflow: hidden;
}

/* moving highlight along the top edge */
.ax-portal::before {
  content: "";
  position: absolute;
  top: 0; left: -55%;
  width: 38%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.6), transparent);
  animation: ax-sweep 8.5s var(--ax-ease) infinite;
  pointer-events: none; z-index: 3;
}
@keyframes ax-sweep {
  0%   { left: -55%; opacity: 0; }
  14%  { opacity: 1; }
  86%  { opacity: 1; }
  100% { left: 115%; opacity: 0; }
}

/* two counter-rotating conic washes */
.ax-portal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: conic-gradient(from 40deg at 88% -10%,
    transparent 0deg,
    rgba(212,81,124,.055) 48deg,
    transparent 118deg,
    transparent 360deg);
  animation: ax-turn 26s linear infinite;
  pointer-events: none;
}
@keyframes ax-turn { to { transform: rotate(360deg); } }

.ax-portal > * { position: relative; z-index: 2; }

/* ---------- head ---------- */
.ax-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px 20px;
  border-bottom: 1px solid var(--ax-line);
}
.ax-head .mark {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--ax-line-lit);
  border-radius: 10px;
  background: linear-gradient(160deg, #1A1D22, #0B0C0F);
  box-shadow: 0 0 22px -8px rgba(212,81,124,.5);
}
.ax-head .mark img { width: 19px; height: 19px; }
.ax-head .who { min-width: 0; }
.ax-head .name { font-size: 11px; font-weight: 600; letter-spacing: .34em; color: var(--ax-ink); display: block; }
.ax-head .role { display: block; font-size: 8px; letter-spacing: .28em; text-transform: uppercase; color: var(--ax-ghost); margin-top: 4px; }

/* completion ring */
.ax-ring { margin-left: auto; flex: none; display: flex; align-items: center; gap: 10px; }
.ax-ring .dial { position: relative; width: 40px; height: 40px; }
.ax-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); overflow: visible; }
.ax-ring .bg { fill: none; stroke: var(--ax-line-lit); stroke-width: 2; }
.ax-ring .fg {
  fill: none;
  stroke: var(--ax-live);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100.5;
  stroke-dashoffset: 100.5;
  transition: stroke-dashoffset .7s var(--ax-ease-out), stroke var(--ax-med) var(--ax-ease);
  filter: drop-shadow(0 0 4px rgba(127,203,164,.45));
}
.ax-ring .pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ax-dim);
  letter-spacing: -.02em;
}
.ax-ring .lbl {
  font-size: 8px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ax-ghost); white-space: nowrap;
}

/* ---------- body ---------- */
.ax-body-pad { padding: 28px 26px 26px; }

/* notice */
.ax-notice {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 24px;
  border: 1px solid #3A3222;
  border-radius: var(--ax-r-md);
  background: linear-gradient(180deg, rgba(34,28,14,.6), rgba(15,13,7,.5));
  padding: 14px 15px;
  font-size: 12px; line-height: 1.7; color: #BCAC88;
}
.ax-notice svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--ax-caution); }
.ax-notice b { color: #DCCBA4; font-weight: 600; }
.ax-notice code {
  font-family: var(--mono); font-size: 11px; color: #D3C398;
  background: rgba(0,0,0,.3); padding: 1px 5px; border-radius: 3px;
}
.ax-notice[hidden] { display: none; }

/* ============================================================
   8. FORM
   ============================================================ */

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

.ax-group { display: flex; flex-direction: column; gap: 16px; }

.ax-group-h {
  display: flex; align-items: center; gap: 12px;
  font-size: 8.5px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ax-ghost);
}
.ax-group-h .n { font-family: var(--mono); color: var(--ax-faint); letter-spacing: .06em; }
.ax-group-h .line { flex: 1; height: 1px; background: var(--ax-line); }
.ax-group-h .tick { color: var(--ax-live); opacity: 0; transition: opacity var(--ax-med) var(--ax-ease); }
.ax-group[data-done="true"] .ax-group-h .tick { opacity: 1; }
.ax-group-h .tick svg { width: 12px; height: 12px; }

.ax-field { position: relative; display: flex; flex-direction: column; }

.ax-field > label {
  position: absolute;
  top: 16px; left: 14px; z-index: 3;
  font-size: 13.5px; color: var(--ax-mute);
  pointer-events: none; transform-origin: left top;
  transition: transform var(--ax-fast) var(--ax-ease),
              color var(--ax-fast) var(--ax-ease),
              letter-spacing var(--ax-fast) var(--ax-ease);
}
.ax-field.is-filled > label,
.ax-field:focus-within > label {
  transform: translateY(-13px) scale(.72);
  color: var(--ax-faint);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ax-field:focus-within > label { color: var(--ax-mute); }

/* fields inside a group have a label row instead of a floating label,
   because the long prompt text does not fit above a narrow control */
.ax-field--stacked { padding-top: 20px; }
.ax-field--stacked > label {
  position: static;
  display: block;
  margin-bottom: 8px;
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ax-faint);
  transform: none;
  transition: color var(--ax-fast) var(--ax-ease);
}
.ax-field--stacked:focus-within > label { color: var(--ax-dim); }
.ax-field--stacked > label .req { color: var(--ax-deny); margin-left: 4px; }

.ax-wrap { position: relative; display: flex; align-items: center; }

.ax-input, .ax-area {
  width: 100%;
  border: 1px solid var(--ax-line-lit);
  border-radius: var(--ax-r-md);
  background: rgba(6,7,9,.72);
  color: var(--ax-ink);
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: .01em;
  transition: border-color var(--ax-fast) var(--ax-ease),
              background var(--ax-fast) var(--ax-ease),
              box-shadow var(--ax-fast) var(--ax-ease);
  appearance: none;
}
.ax-input { height: 52px; padding: 4px 46px 0 14px; }
.ax-area {
  min-height: 96px;
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  font-family: var(--font);
}
.ax-input:hover, .ax-area:hover { border-color: var(--ax-line-hot); }
.ax-input:focus, .ax-area:focus {
  outline: none;
  border-color: var(--ax-mute);
  background: rgba(8,9,11,.9);
  box-shadow: 0 0 0 3px rgba(143,168,200,.07);
}
.ax-input::placeholder, .ax-area::placeholder { color: var(--ax-ghost); }
.ax-input:-webkit-autofill {
  -webkit-text-fill-color: var(--ax-ink);
  -webkit-box-shadow: 0 0 0 40px #0B0C0F inset;
  caret-color: var(--ax-ink);
}

.ax-glyph {
  position: absolute; left: 14px;
  width: 15px; height: 15px;
  color: var(--ax-ghost);
  pointer-events: none; z-index: 2;
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--ax-fast) var(--ax-ease),
              transform var(--ax-fast) var(--ax-ease),
              color var(--ax-fast) var(--ax-ease);
}
.ax-field.is-filled .ax-glyph,
.ax-field:focus-within .ax-glyph { opacity: 1; transform: none; }
.ax-field:focus-within .ax-glyph { color: var(--ax-mute); }
.ax-field.is-filled .ax-input { padding-left: 40px; }

/* validation states */
.ax-field[data-state="bad"] .ax-input,
.ax-field[data-state="bad"] .ax-area {
  border-color: #4A2431;
  background: rgba(24, 11, 16, .34);
}
.ax-field[data-state="bad"] .ax-glyph { color: var(--ax-refuse); }
.ax-field[data-state="good"] .ax-input,
.ax-field[data-state="good"] .ax-area { border-color: #22392F; }

/* one-shot confirmation flash when a field first becomes valid */
.ax-field.just-valid { animation: ax-valid .7s var(--ax-ease-out); }
@keyframes ax-valid {
  0%   { box-shadow: 0 0 0 0 rgba(127,203,164,0); }
  35%  { box-shadow: 0 0 0 3px rgba(127,203,164,.16); }
  100% { box-shadow: 0 0 0 0 rgba(127,203,164,0); }
}

/* character capacity meter — appears only once the field has content */
.ax-cap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  opacity: 0;
  transition: opacity var(--ax-med) var(--ax-ease);
}
.ax-field.is-filled .ax-cap { opacity: 1; }
.ax-cap .bar {
  width: 74px;
  flex: none;
  height: 2px;
  border-radius: 1px;
  background: var(--ax-line-lit);
  overflow: hidden;
}
.ax-cap .bar i {
  display: block; height: 100%; width: 0;
  background: var(--ax-cool);
  transition: width .45s var(--ax-ease-out), background var(--ax-med) var(--ax-ease);
}
.ax-cap .bar i[data-level="mid"] { background: var(--ax-caution); }
.ax-cap .bar i[data-level="high"] { background: var(--ax-deny); }
.ax-cap .n {
  font-family: var(--mono); font-size: 9.5px; color: var(--ax-faint);
  letter-spacing: .02em; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: color var(--ax-med) var(--ax-ease);
}
.ax-cap .n[data-level="high"] { color: var(--ax-deny); }
.ax-cap .n[data-level="mid"] { color: var(--ax-caution); }

.ax-msg {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 11.5px; line-height: 1.5;
  color: var(--ax-refuse);
  margin-top: 8px;
  padding-left: 9px;
  border-left: 2px solid var(--ax-refuse);
  opacity: 0; transform: translateY(-3px);
  transition: opacity var(--ax-fast) var(--ax-ease), transform var(--ax-fast) var(--ax-ease);
}
.ax-msg.is-shown { opacity: 1; transform: none; }
.ax-msg svg { width: 12px; height: 12px; flex: none; margin-top: 1.5px; }

/* honeypot: present for bots, invisible to humans */
.ax-trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ============================================================
   9. FOOTER OF THE FORM
   ============================================================ */

.ax-formfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--ax-line);
}

/* the seal */
.ax-seal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border: 1px solid var(--ax-signal, #E9EDF0);
  border-radius: var(--ax-r-md);
  background: #E9EDF0;
  color: #06070A;
  font-family: var(--font);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--ax-fast) var(--ax-ease),
              filter var(--ax-fast) var(--ax-ease),
              opacity var(--ax-med) var(--ax-ease),
              background var(--ax-med) var(--ax-ease),
              color var(--ax-med) var(--ax-ease),
              border-color var(--ax-med) var(--ax-ease);
}
.ax-seal svg { width: 13px; height: 13px; }
.ax-seal:hover:not([disabled]) { filter: brightness(1.08); }
.ax-seal:active:not([disabled]) { transform: translateY(1px); }

/* sheen */
.ax-seal::after {
  content: "";
  position: absolute;
  top: 0; left: -70%;
  width: 42%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg);
  transition: left .68s var(--ax-ease);
}
.ax-seal:hover:not([disabled])::after { left: 128%; }

/* disabled / arming */
.ax-seal[disabled] {
  cursor: not-allowed;
  background: transparent;
  color: var(--ax-ghost);
  border-color: var(--ax-line-lit);
  opacity: .8;
}
.ax-seal[data-mode="arming"] {
  background: transparent;
  color: var(--ax-mute);
  border-color: var(--ax-line-hot);
}
.ax-seal[data-mode="armed"] { animation: ax-armed .6s var(--ax-spring); }
@keyframes ax-armed {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}

.ax-seal .spin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.6px solid rgba(6,7,10,.25);
  border-top-color: currentColor;
  animation: ax-spin .68s linear infinite;
}
@keyframes ax-spin { to { transform: rotate(360deg); } }

.ax-seal-note {
  font-size: 11.5px;
  color: var(--ax-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ax-seal-note .dotmark {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ax-ghost);
  flex: none;
}
.ax-seal-note[data-state="armed"] { color: var(--ax-live); }
.ax-seal-note[data-state="armed"] .dotmark { background: var(--ax-live); }

/* ============================================================
   10. TRANSMISSION LOG
   ============================================================ */

.ax-wire {
  display: none;
  margin-top: 20px;
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-md);
  background: rgba(5,6,8,.6);
  padding: 13px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.95;
  color: var(--ax-faint);
  overflow: hidden;
}
.ax-wire.is-shown { display: block; }
.ax-wire .row {
  display: flex; gap: 9px; align-items: baseline;
  animation: ax-row .3s var(--ax-ease-out) both;
}
.ax-wire .row .m { flex: 1; color: var(--ax-mute); overflow: hidden; text-overflow: ellipsis; }
.ax-wire .row .s { color: var(--ax-live); font-size: 9px; letter-spacing: .1em; white-space: nowrap; }
.ax-wire .row.pending .s { color: var(--ax-ghost); }
.ax-wire .row .tk { color: var(--ax-live); width: 8px; flex: none; }
.ax-wire .row.failed .s { color: var(--ax-refuse); }
@keyframes ax-row {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   11. RESULT
   ============================================================ */

.ax-result { display: none; }
.ax-result.is-active { display: block; animation: ax-in .5s var(--ax-ease-out) both; }
@keyframes ax-in {
  from { opacity: 0; transform: translateY(12px) scale(.995); }
  to   { opacity: 1; transform: none; }
}

/* the stamp */
.ax-stamp {
  position: relative;
  width: 74px; height: 74px;
  margin-bottom: 26px;
}
.ax-stamp svg { width: 74px; height: 74px; overflow: visible; }
.ax-stamp .ring-bg { fill: none; stroke: var(--ax-line-lit); stroke-width: 1.2; }
.ax-stamp .ring-fg {
  fill: none; stroke: var(--ax-live); stroke-width: 1.2; stroke-linecap: round;
  animation: ax-stamp 1.15s var(--ax-ease-out) .12s both;
}
/* keyframes carry the start state so content is visible even if the
   animation never runs (headless capture, throttling, no support) */
@keyframes ax-stamp {
  from { stroke-dashoffset: 214; }
  to   { stroke-dashoffset: 0; }
}

.ax-stamp .glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ax-live);
  animation: ax-glyph-in .55s var(--ax-spring) .78s both;
}
.ax-stamp .glyph svg { width: 26px; height: 26px; position: relative; z-index: 2; }
@keyframes ax-glyph-in {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: none; }
}
/* pulse ring behind the stamp */
.ax-stamp::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(127,203,164,.4);
  animation: ax-pulse 3s var(--ax-ease) infinite;
}
@keyframes ax-pulse {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.5); opacity: 0; }
}
/* caution variant */
.ax-result[data-kind="notice"] .ax-stamp .ring-fg { stroke: var(--ax-caution); }
.ax-result[data-kind="notice"] .ax-stamp .glyph { color: var(--ax-caution); }
.ax-result[data-kind="notice"] .ax-stamp::after { border-color: rgba(214,181,113,.4); }

.ax-result h2 {
  font-size: 22px;
  letter-spacing: .01em;
  margin-bottom: 12px;
  line-height: 1.25;
}
/* word-by-word entrance — start state lives in the keyframes */
.ax-result h2 .w {
  display: inline-block;
  margin-right: .28em;
  animation: ax-word .6s var(--ax-ease-out) both;
}
@keyframes ax-word {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.ax-result p { font-size: 14px; line-height: 1.8; color: var(--ax-mute); margin-bottom: 10px; max-width: 56ch; }
.ax-result p.quiet { color: var(--ax-faint); font-size: 12.5px; }

/* reference block */
.ax-ref {
  margin-top: 22px;
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-md);
  background: rgba(6,7,9,.55);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  max-width: 440px;
}
.ax-ref dt {
  font-size: 8.5px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ax-ghost); padding-top: 2px;
}
.ax-ref dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ax-dim);
  overflow-wrap: anywhere;
}

.ax-result .acts { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 26px; }

/* ============================================================
   12. BUTTONS
   ============================================================ */

.ax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid var(--ax-line-lit);
  border-radius: var(--ax-r-md);
  background: transparent;
  color: var(--ax-mute);
  font-family: var(--font);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase;
  cursor: pointer;
  transition: color var(--ax-fast) var(--ax-ease),
              border-color var(--ax-fast) var(--ax-ease),
              background var(--ax-fast) var(--ax-ease),
              transform var(--ax-fast) var(--ax-ease);
}
.ax-btn svg { width: 12px; height: 12px; }
.ax-btn:hover { color: var(--ax-ink); border-color: var(--ax-line-hot); background: rgba(255,255,255,.025); }
.ax-btn:active { transform: translateY(1px); }
.ax-btn.solid { background: #E9EDF0; color: #06070A; border-color: #E9EDF0; }
.ax-btn.solid:hover { background: #fff; color: #06070A; }

/* ============================================================
   13. FOOTER
   ============================================================ */

.ax-foot {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: var(--ax-maxw);
  margin: 0 auto;
  width: 100%;
  padding: 18px var(--ax-gutter) 26px;
  border-top: 1px solid rgba(255,255,255,.035);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--ax-ghost);
}
.ax-foot .c { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ax-foot .mono { font-family: var(--mono); letter-spacing: .04em; }
.ax-foot a { color: var(--ax-ghost); transition: color var(--ax-fast) var(--ax-ease); }
.ax-foot a:hover { color: var(--ax-dim); }

/* ============================================================
   14. REVEAL
   ============================================================ */

.ax-rise { animation: ax-rise .85s var(--ax-ease-out) both; }
@keyframes ax-rise { to { opacity: 1; transform: none; } }
.ax-r1 { animation-delay: .04s; }
.ax-r2 { animation-delay: .12s; }
.ax-r3 { animation-delay: .2s; }
.ax-r4 { animation-delay: .28s; }
.ax-r5 { animation-delay: .36s; }
.ax-r6 { animation-delay: .44s; }

/* form fields cascade in */
.ax-cascade > * {
  animation: ax-rise .7s var(--ax-ease-out) both;
}
.ax-cascade > *:nth-child(1) { animation-delay: .16s; }
.ax-cascade > *:nth-child(2) { animation-delay: .24s; }
.ax-cascade > *:nth-child(3) { animation-delay: .32s; }
.ax-cascade > *:nth-child(4) { animation-delay: .40s; }
.ax-cascade > *:nth-child(5) { animation-delay: .48s; }
.ax-cascade > *:nth-child(6) { animation-delay: .56s; }

/* ============================================================
   15. RESPONSIVE
   ============================================================ */

@media (max-width: 1160px) {
  .ax-stage { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 34px; }
}

@media (max-width: 980px) {
  .ax-stage { grid-template-columns: minmax(0, 1fr); padding-top: 34px; }
  .ax-aside { position: static; }
  .ax-spine { display: none; }
  .ax-aside h1 { margin-top: 18px; }
  .ax-disclose { margin-top: 22px; }
}

@media (max-width: 720px) {
  .ax-top { padding: 15px 20px 14px; flex-wrap: wrap; gap: 10px 12px; }
  .ax-topnav { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .ax-topnav .ax-navlink { height: 28px; padding: 0 10px; font-size: 8.5px; letter-spacing: .16em; }
  .ax-stage { padding: 26px 20px 56px; gap: 30px; }
  .ax-body-pad { padding: 22px 18px 20px; }
  .ax-head { padding: 18px 18px 16px; }
  .ax-ring .lbl { display: none; }
  .ax-formfoot { flex-direction: column-reverse; align-items: stretch; }
  .ax-seal { width: 100%; }
  .ax-seal-note { justify-content: center; }
  .ax-foot { justify-content: center; text-align: center; }
  .ax-ref { grid-template-columns: 1fr; gap: 3px 0; }
  .ax-ref dt { margin-top: 8px; }
}

@media (max-width: 420px) {
  .ax-brand .sub { display: none; }
  .ax-stepchip .s { display: none; }
}

/* ============================================================
   16. MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .ax-scan,
  .ax-lattice,
  .ax-spine .track b,
  .ax-portal::before,
  .ax-portal::after,
  .ax-stamp::after { animation: none !important; }

  .ax-rise,
  .ax-cascade > *,
  .ax-result.is-active { opacity: 1; transform: none; animation: none !important; }

  .ax-stamp .ring-fg { stroke-dashoffset: 0; animation: none !important; }
  .ax-stamp .glyph { opacity: 1; transform: none; animation: none !important; }
  .ax-result h2 .w { opacity: 1; transform: none; animation: none !important; }
  .ax-wire .row { opacity: 1; animation: none !important; }
  .ax-seal[data-mode="armed"] { animation: none !important; }
  .ax-seal::after { display: none; }
  .ax-field.just-valid { animation: none !important; }
  .ax-msg, .ax-cap, .ax-ring .fg { transition: none !important; }
}