/* ═══════════════════════════════════════════════════════════════════════════
   authentication.css — the parts of /authentication/ that /rules/ does not use.

   This route loads `legal.css,authentication.css`. legal.css carries everything
   the two pages share (hero, breadcrumb, `.lg-note` callouts, closing CTA) and
   is the layer to edit if a change should land on both. What is left here is
   only what is unique to a step-by-step guide: the prep checklist, the numbered
   timeline, the accept/reject grid and the FAQ list.

   Additive on top of the generated bundle, same as legal.css — tokens, .glass,
   .section*, .divider, .reveal/.stagger-child all come from there.

   RTL: logical properties throughout. The timeline rail in particular is
   `inset-inline-start`, so it sits on the right in this dir="rtl" document and
   would move to the left, correctly, if the page were ever served LTR.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── PREP CHECKLIST ─── */
.au-prep-wrap { padding: 8px 0 8px; }
.au-prep {
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.au-prep::before {
  content: '';
  position: absolute;
  inset-block-start: -90px;
  inset-inline-end: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal), transparent);
  opacity: 0.08;
  pointer-events: none;
}
.au-prep > * { position: relative; }
.au-prep-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.au-prep-icon {
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,229,200,0.10);
  box-shadow: 0 0 0 1px rgba(0,229,200,0.2);
  color: var(--teal);
}
.au-prep-icon svg { width: 21px; height: 21px; }
.au-prep-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 0;
}
.au-prep-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 5px 0 0;
  line-height: 1.8;
}
.au-prep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.au-prep-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-sub);
}
.au-prep-list b { color: var(--text); font-weight: 700; }
/* An empty span drawn as a tick rather than an inline <svg> repeated four
   times: the mark carries no information the sentence beside it does not, so it
   is decoration and belongs in the stylesheet. */
.au-tick {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(0,229,200,0.14);
  box-shadow: 0 0 0 1px rgba(0,229,200,0.3);
  position: relative;
}
.au-tick::after {
  content: '';
  position: absolute;
  inset-block-start: 4px;
  inset-inline-start: 6px;
  width: 4px; height: 8px;
  border: solid var(--teal);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ─── STEP TIMELINE ───
   A rail with three numbered nodes. The rail is a ::before on the <ol> rather
   than a border on each <li>, so it stops at the last node instead of running
   past it into the whitespace below. */
.au-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  gap: 22px;
}
/* ⚠️ THE BASE VALUES HERE ARE THE PHONE ONES, and they are tighter than the
   node's natural size on purpose. The rail is a fixed column, so on a 390px
   screen every pixel it takes comes straight out of the reading measure:
   measured at 44px + 16px gap + 24px card padding, the text column was 286px —
   about 30 Persian characters a line for a page whose entire job is being read.
   38/14/20 buys back ~24px of that. The wider values are restored at ≥640px
   below, where the column costs nothing. */
.au-step {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  scroll-margin-top: 96px;
}
.au-step-rail {
  position: relative;
  display: flex;
  justify-content: center;
  align-self: stretch;
}
/* The connector between one node and the next. On the last step it is removed,
   otherwise the line runs off the bottom of the final card. */
.au-step-rail::before {
  content: '';
  position: absolute;
  /* Starts just below the node and ends one `gap` further down, so it bridges
     into the next node instead of stopping short. Both numbers track the node
     size and the list gap — change either and change these. */
  inset-block-start: 40px;
  inset-block-end: -22px;
  width: 2px;
  background: linear-gradient(180deg, rgba(92,134,255,0.35), rgba(92,134,255,0.05));
}
.au-step:last-child .au-step-rail::before { display: none; }

.au-step-n {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  background: rgba(92,134,255,0.16);
  box-shadow: 0 0 0 1px rgba(92,134,255,0.35);
  position: relative;
  z-index: 1;
}

.au-step-body {
  border-radius: var(--radius-lg);
  padding: 20px;
  min-width: 0;
}
.au-step-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--blue2);
  margin-bottom: 8px;
}
.au-step-title {
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 0 0 14px;
}
.au-step-desc {
  font-size: 15px;
  line-height: 2.15;
  color: var(--text-sub);
  margin: 0 0 14px;
}
.au-step-body b { color: var(--text); font-weight: 700; }
.au-step-body a { color: var(--blue2); text-decoration: none; }
.au-step-body a:hover { text-decoration: underline; }

.au-step-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.au-step-list li {
  position: relative;
  font-size: 14.5px;
  line-height: 2.05;
  color: var(--text-sub);
  padding-inline-start: 22px;
}
.au-step-list li::before {
  content: '';
  position: absolute;
  inset-inline-start: 4px;
  inset-block-start: 0.95em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue2);
  opacity: 0.8;
}

/* The two official lookups, side by side — they happen at the same moment on
   the same submission, so stacking them would imply an order that is not real. */
.au-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 4px 0 18px;
}
.au-check {
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.au-check-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.au-check-name::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  margin-inline-end: 8px;
  vertical-align: middle;
}
.au-check-desc {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-muted);
}

/* ─── SELFIE HOW-TO ─── */
.au-selfie {
  border-radius: var(--radius);
  padding: 18px;
  margin: 6px 0 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
}
.au-selfie-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.au-selfie-head svg { width: 19px; height: 19px; color: var(--violet); flex: 0 0 auto; }
.au-selfie-head h4 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
/* Instructions and the worked example, side by side at desktop. They are one
   unit: the numbered steps say what to write, the photo shows the result, and
   a reader checking their own attempt wants both in view at once rather than
   scrolling between them. Stacked below 992px, copy first — on a phone the
   steps are the actionable part and the photo is confirmation. */
.au-selfie-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.au-selfie-copy { min-width: 0; }

.au-sample { margin: 0; }
.au-sample img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  /* The source is a bright studio shot dropped into a near-black page. At full
     brightness it glares; knocking it back a touch seats it in the surface
     without making the card or the handwriting any harder to read — which is
     the whole point of the image, so the values stay conservative. */
  filter: brightness(0.94) saturate(0.96);
}
.au-sample figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-muted);
  text-align: center;
}

.au-mini-steps {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.au-mini-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14.5px;
  line-height: 2;
  color: var(--text-sub);
}
.au-mini-n {
  width: 24px; height: 24px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--violet);
  background: rgba(153,69,255,0.12);
  box-shadow: 0 0 0 1px rgba(153,69,255,0.25);
}

/* ─── ACCEPT / REJECT GRID ─── */
.au-dd {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 4px 0 4px;
}
.au-dd-col {
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--border);
}
.au-dd-ok { background: rgba(34,197,94,0.05);  border-color: rgba(34,197,94,0.2); }
.au-dd-no { background: rgba(239,68,68,0.05);  border-color: rgba(239,68,68,0.2); }
.au-dd-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}
.au-dd-title svg { width: 17px; height: 17px; flex: 0 0 auto; }
.au-dd-ok .au-dd-title { color: var(--green); }
.au-dd-no .au-dd-title { color: #ff8a8a; }
.au-dd-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.au-dd-col li {
  position: relative;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-sub);
  padding-inline-start: 18px;
}
.au-dd-col li::before {
  position: absolute;
  inset-inline-start: 0;
  font-weight: 800;
}
.au-dd-ok li::before { content: '✓'; color: var(--green); }
.au-dd-no li::before { content: '×'; color: #ff8a8a; font-size: 15px; }

/* ─── WHAT HAPPENS NEXT ─── */
/* Indented to the STEP BODIES' edge, not the container's. This card is not a
   step — it has no node on the rail — but sitting flush to the container while
   every card above it was inset by the rail column left a ragged edge that
   reads as a bug, not as "this one is different". The offset is the rail column
   plus the grid gap, so it tracks the three breakpoints of .au-step; if those
   move, this moves with them. */
.au-after {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 34px;
  margin-inline-start: 52px; /* 38 rail + 14 gap */
}
.au-after-icon {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34,197,94,0.10);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.22);
  color: var(--green);
}
.au-after-icon svg { width: 20px; height: 20px; }
.au-after-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}
.au-after p {
  font-size: 14.5px;
  line-height: 2.1;
  color: var(--text-sub);
  margin: 0;
}

/* ─── WHY ─── */
.au-why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.au-why-card {
  border-radius: var(--radius-lg);
  padding: 24px;
}
.au-why-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.au-why-icon svg { width: 21px; height: 21px; }
.au-why-icon.w1 { background: rgba(61,123,255,0.12);  box-shadow: 0 0 0 1px rgba(61,123,255,0.2);  color: var(--blue2); }
.au-why-icon.w2 { background: rgba(153,69,255,0.12);  box-shadow: 0 0 0 1px rgba(153,69,255,0.2);  color: var(--violet); }
.au-why-icon.w3 { background: rgba(0,229,200,0.10);   box-shadow: 0 0 0 1px rgba(0,229,200,0.2);   color: var(--teal); }
.au-why-card h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 0 0 10px;
}
.au-why-card p {
  font-size: 14px;
  line-height: 1.95;
  color: var(--text-sub);
  margin: 0;
}

/* ─── FAQ ───
   Plain blocks, not <details>. A stuck user scanning for their symptom needs
   every answer visible at once, and a collapsed answer is also invisible to
   in-page find. Same call as the FAQ on /app/. */
.au-faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.au-faq-item {
  border-radius: var(--radius);
  padding: 20px 22px;
}
.au-q {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 0 0 10px;
}
.au-a {
  font-size: 14.5px;
  line-height: 2.05;
  color: var(--text-sub);
  margin: 0;
}
.au-a a { color: var(--blue2); text-decoration: none; }
.au-a a:hover { text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (min-width: 640px) {
  .au-prep-list { grid-template-columns: repeat(2, 1fr); }
  .au-checks    { grid-template-columns: repeat(2, 1fr); }
  .au-dd        { grid-template-columns: repeat(2, 1fr); }
  /* Rail restored to full size — see the note on .au-step for why the phone
     gets the smaller one. The three rail numbers move together. */
  .au-step   { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
  .au-step-n { width: 44px; height: 44px; font-size: 17px; }
  .au-step-rail::before { inset-block-start: 46px; }
  .au-step-body { padding: 24px; }
  .au-after     { margin-inline-start: 60px; } /* 44 + 16 */
}
@media (min-width: 992px) {
  .au-step { grid-template-columns: 52px minmax(0, 1fr); gap: 22px; }
  .au-step-body { padding: 30px; }
  .au-after     { margin-inline-start: 74px; } /* 52 + 22 */
  /* 340px matches the `sizes` attribute on the <img>; if this column width
     changes, change that too or the browser picks the wrong candidate. */
  .au-selfie-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .au-why-grid  { grid-template-columns: repeat(3, 1fr); }
  .au-faq-list  { grid-template-columns: repeat(2, 1fr); }
}
