/* =========================================================================
   GLAS app shell — the gated surface.
   Layout follows the "Built for Clarity" spec: market status first, then the
   four ranked lists, then drill-downs. Locked panels blur but never carry
   real data; the server withholds it.
   ========================================================================= */

.appbar { border-bottom: 1px solid var(--rule-strong); background: var(--paper); position: sticky; top: 0; z-index: 40; }
.appbar__in { max-width: 1280px; margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; gap: 28px; height: 62px; }
.appbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.appbar__brand img { width: 26px; height: 26px; }
.appbar__brand b { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; }
.appnav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.appnav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft); padding: 4px 0; border-bottom: 1px solid transparent;
}
.appnav a:hover { color: var(--accent); }
.appnav a.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.access-pill {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid var(--rule-strong); color: var(--ink-soft); white-space: nowrap;
}
.access-pill--on { border-color: var(--accent); color: var(--accent); }

/* Header account slot — pushes the access pill + CTA to the end of the nav. */
.nav__slot { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; }

/* Evidence lists on the marketing pages. */
.ticklist { margin: 14px 0 0; padding: 0; list-style: none; }
.ticklist li {
  position: relative; padding: 7px 0 7px 20px; font-size: 13px; color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}
.ticklist li:last-child { border-bottom: 0; }
.ticklist li::before {
  content: '—'; position: absolute; left: 0; top: 7px; color: var(--accent); font-family: var(--mono); font-size: 11px;
}
.ticklist li b { color: var(--ink); font-weight: 600; }

/* ---------- market status strip ---------- */

.status-strip { border-bottom: 1px solid var(--rule); background: var(--paper-2, #fafaf8); }
.status-strip__in { max-width: 1280px; margin: 0 auto; padding: 22px var(--gut); display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); background: var(--rule); }
.status-cell { background: var(--paper); padding: 16px 18px; }
.status-cell__k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.status-cell__v {
  font-size: 21px; font-weight: 600; margin-top: 6px; letter-spacing: -.01em;
  /* Wrap at word boundaries only — `anywhere` + hyphens split words mid-syllable. */
  overflow-wrap: break-word; line-height: 1.2;
}
/* Long prose values (risk posture) step down rather than wrapping to four lines. */
.status-cell__v--long { font-size: 15px; font-weight: 500; }
.status-cell__n { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }

.mfi { display: flex; align-items: baseline; gap: 9px; }
.mfi__score { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.mfi__of { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }

/* Regime colours run outflow (warn) -> neutral -> inflow (accent). */
.regime--extreme-inflow, .regime--strong-inflow { color: #1a7f4b; }
.regime--mild-inflow { color: #3d8f63; }
.regime--neutral { color: var(--ink-soft); }
.regime--mild-outflow { color: #b4762a; }
.regime--strong-outflow, .regime--extreme-outflow { color: #b03030; }

/* ---------- the four ranked lists ---------- */

/* Four answers, so a 2x2 grid — auto-fit gives 3 + a stranded fourth on wide screens. */
.lists { max-width: 1280px; margin: 0 auto; padding: 34px var(--gut) 60px; display: grid; gap: 26px;
  grid-template-columns: 1fr; }
@media (min-width: 900px) { .lists { grid-template-columns: repeat(2, 1fr); } }
.rank { border: 1px solid var(--rule-strong); background: var(--paper); display: flex; flex-direction: column; }
.rank__head { padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.rank__head h2 { font-size: 15px; letter-spacing: -.01em; margin: 0; }
.rank__head p { font-size: 11.5px; color: var(--ink-soft); margin: 4px 0 0; }
.rank--avoid .rank__head { border-left: 3px solid #b03030; }
.rank--quick .rank__head { border-left: 3px solid var(--accent); }
.rank--early .rank__head { border-left: 3px solid #3d8f63; }
.rank--hold .rank__head { border-left: 3px solid #2f6f9f; }

.rank__list { list-style: none; margin: 0; padding: 0; }
.rank__row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--rule); }
.rank__row:last-child { border-bottom: 0; }
.rank__sym { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.rank__why { font-size: 11.5px; color: var(--ink-soft); flex: 1; }
.rank__score { font-family: var(--mono); font-size: 13px; font-weight: 600; margin-left: auto; }
.rank__status {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 7px; border: 1px solid var(--rule-strong); color: var(--ink-soft);
}
.rank__empty { padding: 22px 18px; font-size: 12px; color: var(--ink-soft); }

/* ---------- locked panels ---------- */

.locked { position: relative; border: 1px solid var(--rule-strong); margin: 18px 0; overflow: hidden; }
.locked__fake { padding: 18px; filter: blur(5px); user-select: none; pointer-events: none; opacity: .55; }
.locked__fake div { height: 11px; background: var(--rule-strong); margin-bottom: 9px; border-radius: 2px; }
.locked__fake div:nth-child(2) { width: 82%; }
.locked__fake div:nth-child(3) { width: 64%; }
.locked__fake div:nth-child(4) { width: 90%; }
.locked__fake div:nth-child(5) { width: 47%; }
.locked__over {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; text-align: center; padding: 18px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
}
.locked__label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.locked__note { font-size: 11.5px; color: var(--ink-soft); max-width: 340px; }

.unlock {
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--paper));
  padding: 22px; margin: 26px 0;
}
.unlock h3 { margin: 0 0 6px; font-size: 16px; }
.unlock p { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-soft); }
.unlock__ways { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 16px; }
.unlock__way {
  border: 1px solid var(--rule-strong); background: var(--paper); padding: 14px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.unlock__way b { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 5px; }
/* Buttons sit on their own line — inline they wrap into the middle of a sentence. */
.unlock__way span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 12px; }
.unlock__way .btn { margin-top: auto; }

/* ---------- auth ---------- */

.auth { max-width: 430px; margin: 60px auto; padding: 0 var(--gut); }
.auth__card { border: 1px solid var(--rule-strong); padding: 28px; background: var(--paper); }
.auth h1 { font-size: 22px; margin: 0 0 6px; }
.auth__sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 22px; }
.auth__field { margin-bottom: 14px; }
.auth__field label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 5px; }
.auth__field input { width: 100%; padding: 11px 12px; border: 1px solid var(--rule-strong); background: var(--paper); font: inherit; font-size: 13px; }
.auth__field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth__or { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--ink-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; }
.auth__or::before, .auth__or::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.auth__msg { font-size: 12px; padding: 10px 12px; margin-bottom: 14px; border: 1px solid; }
.auth__msg--err { border-color: #b03030; color: #b03030; background: #fdf4f4; }
.auth__msg--ok { border-color: #1a7f4b; color: #1a7f4b; background: #f3faf6; }
.auth__toggle { margin-top: 16px; font-size: 12px; color: var(--ink-soft); text-align: center; }
.auth__toggle a { color: var(--accent); }

@media (max-width: 760px) {
  .appnav { gap: 14px; }
  .appnav a { font-size: 10px; }
  .lists { grid-template-columns: 1fr; }
}

/* Pill badges to match the buttons. */
.access-pill { border-radius: 999px; padding: 5px 12px; }
.access-pill--cta {
  border-color: var(--accent); color: var(--accent); text-decoration: none;
}
.access-pill--cta:hover { background: var(--accent); color: #fff; }
