/* Archives (/archiveindicators, /archiveaccounts, /archiveverify, /archiveblog, /archivestrategies …)
   Phase 21 rewrite. Markup: Views/Posts/Archive.cshtml. Scoped under .arx-page; DS tokens only. */
.arx-page { --arx-ac: hsl(199 89% 52%); --arx-ac2: hsl(217 88% 60%); position: relative; isolation: isolate; color: var(--ds-text); padding-bottom: 1rem; }
.arx--acc { --arx-ac: hsl(266 80% 64%); --arx-ac2: hsl(199 89% 55%); }
.arx--ver { --arx-ac: hsl(42 95% 52%); --arx-ac2: hsl(28 92% 56%); }
.arx--str { --arx-ac: hsl(152 62% 46%); --arx-ac2: hsl(199 89% 52%); }
.arx-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- hero ---------- */
.arx-hero { padding-top: clamp(.75rem, 2vw, 1.5rem); }
.arx-hero__card { position: relative; overflow: clip; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: clamp(1rem, 3vw, 2.5rem); align-items: center;
  padding: clamp(1.25rem, 3.2vw, 2.4rem); border-radius: var(--ds-r-xl); border: 1px solid var(--ds-line);
  background:
    radial-gradient(520px 260px at 100% 0%, color-mix(in srgb, var(--arx-ac) 16%, transparent), transparent 70%),
    radial-gradient(420px 240px at 0% 100%, color-mix(in srgb, var(--arx-ac2) 12%, transparent), transparent 70%),
    var(--ds-surface-1);
  box-shadow: var(--ds-shadow-1); }
.arx-hero__card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: linear-gradient(var(--ds-line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--ds-line-soft) 1px, transparent 1px);
  background-size: 34px 34px; opacity: .55; -webkit-mask-image: radial-gradient(70% 90% at 15% 50%, #000, transparent 75%); mask-image: radial-gradient(70% 90% at 15% 50%, #000, transparent 75%); }
.arx-hero__txt { position: relative; z-index: 1; min-width: 0; }
.arx-eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .75rem .32rem .9rem; border-radius: var(--ds-r-pill); font-size: .76rem; font-weight: 800;
  color: var(--arx-ac); background: color-mix(in srgb, var(--arx-ac) 12%, transparent); border: 1px solid color-mix(in srgb, var(--arx-ac) 28%, transparent); }
.arx-eyebrow svg { width: 15px; height: 15px; }
.arx-title { margin: .8rem 0 .55rem; font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 900; line-height: 1.35; color: var(--ds-text); }
.arx-lead { margin: 0; max-width: 60ch; color: var(--ds-text-2); font-size: clamp(.88rem, 1.3vw, .98rem); line-height: 2; }
.arx-points { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .6rem; }
.arx-points li { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .8rem; border-radius: var(--ds-r-md); font-size: .8rem; font-weight: 700; color: var(--ds-text);
  background: var(--ds-surface-2); border: 1px solid var(--ds-line); }
.arx-points svg { width: 15px; height: 15px; color: var(--ds-up-ink); stroke-width: 2.6; flex: none; }

.arx-hero__art { position: relative; z-index: 1; color: var(--arx-ac); border-radius: var(--ds-r-xl); padding: 1rem 1rem .9rem; border: 1px solid var(--ds-line);
  background: color-mix(in srgb, var(--ds-surface-2) 80%, transparent); box-shadow: var(--ds-shadow-2); }
.arx-chart { display: block; width: 100%; height: auto; overflow: visible; }
.arx-grid-l path { stroke: var(--ds-line); stroke-width: 1; stroke-dasharray: 3 5; }
.arx-line { stroke: currentColor; stroke-width: 2.6; }
.arx-candles path { stroke-width: 1.6; }
.arx-candles .u { color: var(--ds-up-ink); fill: color-mix(in srgb, var(--ds-up-ink) 85%, transparent); stroke: var(--ds-up-ink); }
.arx-candles .d { color: var(--ds-down-ink); fill: color-mix(in srgb, var(--ds-down-ink) 85%, transparent); stroke: var(--ds-down-ink); }
.arx-candles rect { stroke-width: 0; }
.arx-dot { fill: currentColor; stroke: var(--ds-surface-1); stroke-width: 3; }
.arx-hero__stat { display: flex; align-items: baseline; gap: .45rem; margin-top: .65rem; padding-top: .7rem; border-top: 1px dashed var(--ds-line); }
.arx-hero__stat b { font-size: 1.6rem; font-weight: 900; color: var(--ds-text); line-height: 1; font-variant-numeric: tabular-nums; }
.arx-hero__stat span { font-size: .78rem; font-weight: 700; color: var(--ds-text-2); }

/* ---------- toolbar ---------- */
.arx-bar { position: relative; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-top: 1rem; }
.arx-bar__count { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-size: .85rem; font-weight: 700; color: var(--ds-text-2); }
.arx-bar__count svg { width: 17px; height: 17px; color: var(--arx-ac); }
.arx-bar__count b { color: var(--ds-text); font-weight: 900; }
.arx-bar form { margin: 0; }
.arx-secnav { margin-top: 1rem; }

/* ---------- results ---------- */
.arx-results #archive-results .grid { padding-top: 1.25rem; }
/* 1–2 items: centre the cards at a readable width instead of leaving two empty tracks */
.arx-few #archive-results .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 380px)); justify-content: center; }

/* ---------- how it works ---------- */
.arx-how { margin-top: clamp(.5rem, 2vw, 1.5rem); padding-bottom: 1rem; }
.arx-how__head { text-align: center; margin-bottom: 1.25rem; }
.arx-h2 { margin: 0 0 .35rem; font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 900; }
.arx-how__head p { margin: 0; color: var(--ds-text-2); font-size: .9rem; }
.arx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; counter-reset: none; }
.arx-step { position: relative; padding: 1.25rem 1.2rem 1.15rem; border-radius: var(--ds-r-xl); background: var(--ds-surface-1); border: 1px solid var(--ds-line); box-shadow: var(--ds-shadow-1); }
.arx-steps > .arx-step:not(:last-child)::after { content: ""; position: absolute; top: 2.05rem; inset-inline-end: -1rem; width: 1rem; border-top: 2px dashed color-mix(in srgb, var(--arx-ac) 45%, transparent); }
.arx-step__n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: var(--ds-r-md); font-weight: 900; font-size: 1.05rem; color: #fff;
  background: linear-gradient(135deg, var(--arx-ac), var(--arx-ac2)); box-shadow: 0 10px 22px -12px var(--arx-ac); }
.arx-step h3 { margin: .85rem 0 .3rem; font-size: .98rem; font-weight: 900; }
.arx-step p { margin: 0; color: var(--ds-text-2); font-size: .84rem; line-height: 1.95; }

.arx-help { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding: 1rem 1.15rem; border-radius: var(--ds-r-xl);
  border: 1px solid color-mix(in srgb, var(--arx-ac) 30%, var(--ds-line)); background: color-mix(in srgb, var(--arx-ac) 7%, var(--ds-surface-1)); }
.arx-help__ic { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: var(--ds-r-lg); color: var(--arx-ac); background: color-mix(in srgb, var(--arx-ac) 14%, transparent); flex: none; }
.arx-help__ic svg { width: 22px; height: 22px; }
.arx-help__txt { flex: 1 1 260px; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.arx-help__txt b { font-weight: 900; font-size: .95rem; }
.arx-help__txt span { color: var(--ds-text-2); font-size: .84rem; }
.arx-help__act { display: flex; gap: .5rem; flex-wrap: wrap; }
.arx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1rem; border-radius: var(--ds-r-md); font-weight: 800; font-size: .86rem; text-decoration: none; white-space: nowrap;
  color: var(--ds-text); background: var(--ds-surface-1); border: 1px solid var(--ds-line); transition: var(--ds-t-hover); }
.arx-btn:hover { transform: translateY(var(--ds-lift-1)); border-color: color-mix(in srgb, var(--arx-ac) 50%, transparent); color: var(--ds-text); }
.arx-btn--pri { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--arx-ac), var(--arx-ac2)); box-shadow: 0 10px 22px -12px var(--arx-ac); }
.arx-btn--pri:hover { color: #fff; }
.arx-btn:focus-visible { outline: 2px solid var(--ds-focus, var(--arx-ac)); outline-offset: 2px; }

@media (max-width: 860px) {
  .arx-hero__card { grid-template-columns: 1fr; }
  .arx-hero__art { display: flex; align-items: center; gap: 1rem; padding: .75rem .9rem; }
  .arx-chart { width: 46%; max-width: 180px; }
  .arx-hero__stat { margin: 0; padding: 0 1rem 0 0; border-top: 0; border-inline-start: 1px dashed var(--ds-line); flex-direction: column; gap: .3rem; }
  .arx-steps { grid-template-columns: 1fr; gap: .7rem; }
  .arx-step { display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-items: start; padding: 1rem; }
  .arx-step__n { grid-row: span 2; }
  .arx-step h3 { margin: .1rem 0 .2rem; }
  .arx-steps > .arx-step:not(:last-child)::after { display: none; }
}
@media (max-width: 560px) {
  .arx-bar { flex-direction: column; align-items: stretch; }
  .arx-points li { font-size: .76rem; padding: .36rem .65rem; }
  .arx-help__act { width: 100%; }
  .arx-help__act .arx-btn { flex: 1; }
}

/* ---------- search (/Search) ---------- */
.srx-card { grid-template-columns: 1fr; }
.srx-card::after { -webkit-mask-image: radial-gradient(60% 90% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(60% 90% at 50% 0%, #000, transparent 75%); }
.srx-form { position: relative; display: flex; align-items: center; gap: .5rem; margin-top: 1rem; max-width: 720px; padding: .35rem; padding-inline-start: 2.6rem;
  border-radius: var(--ds-r-lg); background: var(--ds-surface-2); border: 1px solid var(--ds-line-strong, var(--ds-line)); box-shadow: var(--ds-shadow-1); transition: border-color .15s, box-shadow .15s; }
.srx-form:focus-within { border-color: color-mix(in srgb, var(--arx-ac) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--arx-ac) 16%, transparent); }
.srx-form > svg { position: absolute; inset-inline-start: .9rem; width: 19px; height: 19px; color: var(--ds-text-3, var(--ds-text-2)); pointer-events: none; }
.srx-form input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--ds-text); font: inherit; font-size: .95rem; }
.srx-form input::placeholder { color: var(--ds-text-3, var(--ds-text-2)); }
.srx-form .arx-btn { min-height: 44px; }
.srx-topics { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .9rem; font-size: .8rem; color: var(--ds-text-2); }
.srx-topics > span { font-weight: 700; margin-inline-end: .2rem; }
.srx-topics a { padding: .3rem .7rem; border-radius: var(--ds-r-pill); text-decoration: none; font-weight: 700; color: var(--ds-text); background: var(--ds-surface-2); border: 1px solid var(--ds-line); transition: border-color .15s, color .15s; }
.srx-topics a:hover, .srx-topics a[aria-current] { border-color: color-mix(in srgb, var(--arx-ac) 55%, transparent); color: var(--arx-ac); }
