/* ------------------------------------------------------------------- home */
/* The Agents page opens on reins.one's navy hero, so the app picks up where
   the site leaves off: what an agent is, live totals, and a rule check that
   replays the testnet run's real trades. Under it, the top templates and the
   chain's latest events, then the full tables. Prefixed hm- because .fcard,
   .duo and .ev-list already belong to other pages. */
.hm-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 16px; background: #111433; box-shadow: var(--shadow);
  padding: 36px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 40px; align-items: center; }
.hm-hero::before { content: ""; position: absolute; z-index: -1; left: 34%; bottom: -100%; width: 125%; aspect-ratio: 1.3 / 1; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(88, 131, 255, .5), rgba(61, 107, 243, .14) 48%, transparent 74%); }
.hm-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hm-kick { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--sans); color: #aab7e8; }
.pulse { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green); }
.hm-hero h1 { margin-top: 14px; font: 600 clamp(30px, 3.3vw, 46px)/1.04 var(--sans); letter-spacing: -.035em; max-width: 15ch; }
.hm-hero h1 em { font-style: normal; color: #aac4ff; }
.hm-lede { margin-top: 14px; max-width: 52ch; color: #b4bbdc; font: 400 15px/1.5 var(--sans); }
.hm-cta { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.hm-cta .chip { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.hm-cta .chip:hover { background: rgba(255, 255, 255, .14); }
.hm-stats { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid rgba(170, 183, 232, .16); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hm-stats div + div { padding-left: 18px; border-left: 1px solid rgba(170, 183, 232, .12); }
.hm-stats dt { color: #8f98c4; font-size: 12.5px; }
.hm-stats dd { margin: 6px 0 0; font: 500 24px/28px var(--sans); letter-spacing: -.02em; white-space: nowrap; }

/* The rule check: one trade request, the contract's checks in order, and
   what the chain did. Every scenario is a real testnet transaction. */
.hm-rc { margin: 0; padding: 16px; border-radius: 14px; background: rgba(8, 10, 32, .72); border: 1px solid rgba(170, 183, 232, .14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); font-size: 13px; }
.hm-rc figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #8f98c4; font-size: 12px; }
.hm-rc figcaption b { color: #fff; font: 500 13px var(--sans); display: inline-flex; align-items: center; gap: 8px; }
.hm-rc figcaption .ic { color: #aac4ff; }
.hm-rc figcaption > span { display: inline-flex; align-items: center; gap: 8px; }
.hm-pause { height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #c9d1f2; font: 500 11.5px var(--sans); }
.hm-pause:hover { background: rgba(255, 255, 255, .13); }
.hm-pause[aria-pressed="true"] { background: rgba(170, 196, 255, .2); color: #fff; }
.hm-ask { margin-top: 14px; padding: 11px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.hm-ask b { font-weight: 500; white-space: nowrap; }
.hm-ask span { font: 400 12px var(--mono); color: #8f98c4; white-space: nowrap; }
.hm-ask span.bad { color: var(--red); }
.hm-checks { list-style: none; margin: 8px 0 0; display: grid; gap: 2px; }
.hm-checks li { height: 30px; padding: 0 8px; border-radius: 8px; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; color: #5d6591; transition: color .2s, background-color .2s; }
.hm-checks .mk { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; }
.hm-checks .mk svg { width: 10px; height: 10px; opacity: 0; }
.hm-checks .v { font: 400 12px var(--mono); color: #8f98c4; opacity: 0; transition: opacity .2s; }
.hm-checks li.run { color: #fff; background: rgba(255, 255, 255, .04); }
.hm-checks li.run .mk { border-color: #7aa5ff; border-top-color: transparent; animation: hm-spin .7s linear infinite; }
.hm-checks li.ok { color: #dfe4fb; }
.hm-checks li.ok .mk { background: var(--green); border-color: var(--green); color: #0c2a1d; }
.hm-checks li.no { color: #fff; background: rgba(232, 113, 107, .12); }
.hm-checks li.no .mk { background: var(--red); border-color: var(--red); color: #2c0e0c; }
.hm-checks li.no .v { color: #f3a6a2; }
.hm-checks li.ok .mk svg, .hm-checks li.no .mk svg, .hm-checks li.ok .v, .hm-checks li.no .v { opacity: 1; }
.hm-checks li.skip { color: #3e4569; }
.hm-checks li.skip .mk { border-style: dashed; }
.hm-out { margin-top: 8px; min-height: 64px; padding: 11px 12px; border-radius: 10px; display: grid; gap: 3px; align-content: center; background: rgba(255, 255, 255, .03);
  opacity: .35; transition: opacity .25s, background-color .25s; }
.hm-out.show { opacity: 1; }
.hm-out.ok { background: rgba(102, 195, 153, .1); }
.hm-out.no { background: rgba(232, 113, 107, .1); }
.hm-out b { font-weight: 600; }
.hm-out.ok b { color: var(--green); }
.hm-out.no b { color: var(--red); }
.hm-out p { color: #b4bbdc; }
.hm-out a { justify-self: start; margin-top: 2px; display: inline-flex; align-items: center; gap: 4px; color: #8f98c4; font: 400 12px var(--mono); }
.hm-out a:hover { color: #fff; }
.hm-out a .ic { width: 12px; height: 12px; }
.hm-dots { margin-top: 10px; display: flex; justify-content: center; gap: 4px; }
.hm-dots button { width: 26px; height: 18px; display: grid; place-items: center; }
.hm-dots button::before { content: ""; width: 18px; height: 4px; border-radius: 4px; background: rgba(170, 183, 232, .2); transition: background-color .2s; }
.hm-dots button:hover::before { background: rgba(170, 183, 232, .45); }
.hm-dots button[aria-pressed="true"]::before { background: #aac4ff; }

/* Panels, and the chain's latest events. */
.hm-panel { min-width: 0; padding: 16px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.hm-panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hm-panel-h h2 { font: 500 14px var(--sans); display: flex; align-items: center; gap: 8px; }
.hm-panel-h h2 small { color: var(--ink-3); font-weight: 400; }
.hm-panel-h a, .hm-panel-h > span { color: var(--ink-3); font-size: 12.5px; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.hm-panel-h a:hover { color: var(--ink); }
.hm-panel-h a .ic { width: 14px; height: 14px; }
.hm-feed { list-style: none; margin: 6px 0 0; max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.hm-ev { padding: 10px 2px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.hm-ev:last-child { border-bottom: 0; }
.hm-ev .ei { width: 30px; height: 30px; border-radius: 50%; background: var(--chip-2); color: var(--ink-2); display: grid; place-items: center; }
.hm-ev .ei .ic { width: 15px; height: 15px; }
.hm-ev.trade .ei { background: rgba(30, 155, 255, .15); color: #8fcbff; }
.hm-ev.stop .ei { background: rgba(232, 113, 107, .14); color: var(--red); }
.hm-ev.money .ei { background: rgba(102, 195, 153, .13); color: var(--green); }
.hm-ev.new .ei { background: rgba(139, 124, 246, .16); color: #b6acff; }
.hm-ev p { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.hm-ev p b, .hm-ev p a { color: var(--ink); font-weight: 500; }
.hm-ev p a:hover { text-decoration: underline; }
.hm-ev .sub { margin-top: 3px; display: flex; gap: 8px; color: var(--ink-4); font-size: 12px; }
.hm-ev .sub a { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); font-family: var(--mono); }
.hm-ev .sub a:hover { color: var(--ink); }
.hm-ev .sub .ic { width: 11px; height: 11px; }
.hm-empty { grid-column: 1 / -1; padding: 28px 8px; text-align: center; color: var(--ink-3); }
.hm-empty b { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: hm-pulse 2s infinite; }
  .hm-ev.fresh { animation: hm-in .45s cubic-bezier(.2, .7, .2, 1) both; }
  .hm-hero::before { animation: hm-drift 16s ease-in-out infinite alternate; }
}
@keyframes hm-pulse { 0% { box-shadow: 0 0 0 0 rgba(102, 195, 153, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(102, 195, 153, 0); } }
@keyframes hm-spin { to { transform: rotate(360deg); } }
@keyframes hm-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes hm-drift { to { transform: translateX(-42%) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hm-checks li.run .mk { animation: none; border-top-color: #7aa5ff; } }

@media (max-width: 1100px) {
  .hm-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 760px) {
  .hm-hero { padding: 22px 18px; }
  .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .hm-stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hm-rc figcaption b { white-space: nowrap; }
}
/* The phone frame (a tab bar from 900px down): touch-sized controls. */
@media (max-width: 900px) {
  .hm-pause { height: 40px; padding: 0 14px; font-size: 12.5px; }
  .hm-out a { padding-block: 13px; margin-block: -11px -13px; }
  .hm-dots { gap: 0; }
  .hm-dots button { width: 40px; height: 40px; }
}

/* ------------------------------------------------------- strategy cards */
/* Every strategy on the Strategies tab: what it does, three numbers, its curve. */
.st-list { display: grid; gap: 12px; }
.st-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 180px; gap: 20px; align-items: center; padding: 20px 22px; border-radius: 12px; background: radial-gradient(120% 140% at 0% 0%, var(--st-tint), rgba(30, 155, 255, .04) 55%, transparent 80%), var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--st-edge); transition: box-shadow .2s, transform .2s; --st-tint: rgba(255, 255, 255, .05); --st-edge: rgba(255, 255, 255, .07); --st-edge-h: rgba(255, 255, 255, .18); }
.st-card.valid { --st-tint: rgba(30, 155, 255, .13); --st-edge: rgba(30, 155, 255, .18); --st-edge-h: rgba(30, 155, 255, .4); }
.st-card.smart { --st-tint: rgba(255, 138, 76, .14); --st-edge: rgba(255, 138, 76, .18); --st-edge-h: rgba(255, 138, 76, .38); }
.st-card:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--st-edge-h); transform: translateY(-1px); }
.st-card:focus-visible { outline: 2px solid #5aaeff; outline-offset: 2px; }
.st-card .k { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink-3); font-size: 12px; }
.st-card .k > * { white-space: nowrap; }
.st-card h3 { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; font: 600 19px/1.2 var(--sans); letter-spacing: -.01em; }
.st-card p { color: var(--ink-3); font-size: 13.5px; line-height: 1.45; font-weight: 400; }
.st-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.st-card dt { color: var(--ink-3); font-size: 11.5px; }
.st-card dd { margin: 4px 0 0; font: 600 18px var(--sans); letter-spacing: -.02em; }
.st-card .sp svg { width: 100%; height: 56px; display: block; }
.st-card .sp path { vector-effect: non-scaling-stroke; stroke-width: 1.6; }
.st-empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.st-empty b { display: block; color: var(--ink); margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .st-card:hover { transform: none; } }
@media (max-width: 1100px) {
  .st-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .st-card .sp { grid-column: 1 / -1; }
  .st-card .sp svg { height: 44px; }
}
@media (max-width: 900px) {
  .st-card { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; }
  .st-card dt { font-size: 12px; }
  /* "Strategies ... All strategies": the note drops to its own line under the two. */
  .hsec h2:has(.st-all) { flex-wrap: wrap; row-gap: 2px; }
  .hsec h2:has(.st-all) small { order: 1; flex-basis: 100%; }
  .st-all { padding-block: 13px; margin-block: -13px; }
}
.st-card dd .yr { margin-left: 2px; color: var(--ink-3); font: 500 11px var(--sans); letter-spacing: 0; }
/* the coins a strategy trades, in a row beside its name */
.st-card h3 .tok.multi, .sg-tags .tok.multi { display: inline-flex; width: auto; height: 22px; }
.st-card h3 .tok.multi img, .st-card h3 .tok.multi i, .sg-tags .tok.multi img, .sg-tags .tok.multi i { position: static; width: 22px; height: 22px; margin-left: -6px; border: 2px solid var(--card); }
.sg-tags .tok.multi img, .sg-tags .tok.multi i { border-color: #1b1f45; }
.st-card h3 .tok.multi :first-child, .sg-tags .tok.multi :first-child { margin-left: 0; }
.st-page { margin-top: 24px; }
.st-all { margin-left: auto; color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.st-all:hover { color: var(--ink); }
