/* Portal hub + reporting — consumes locked tokens.css + shared.css only. */

/* viewport-fit=cover means the page runs under the notch in landscape — hold the
   gutter at --s5 unless the inset is wider. */
.portal, .report {
  max-width: 1040px;
  margin-inline: auto;
  padding: calc(var(--s6) + env(safe-area-inset-top, 0px))
           max(var(--s5), env(safe-area-inset-right, 0px))
           calc(var(--s16) + env(safe-area-inset-bottom, 0px))
           max(var(--s5), env(safe-area-inset-left, 0px));
  display: grid;
  gap: var(--s8);
}

/* Hero */
.portal-hero {
  position: relative;
  overflow: hidden;
  background: var(--froyo);
  color: var(--app-on-brand);
  border-radius: var(--r-2xl);
  padding: var(--s10) var(--s8);
  display: grid;
  gap: var(--s6);
}
.portal-hero::after {
  content: '';
  position: absolute;
  right: calc(var(--s20) * -1);
  top: calc(var(--s16) * -1);
  width: calc(var(--s20) * 3);
  height: calc(var(--s20) * 3);
  background: var(--glow-gradient);
  filter: blur(var(--s16));
  opacity: .55;
  border-radius: var(--r-pill);
  pointer-events: none;
}
.portal-logo { width: calc(var(--s20) * 2); position: relative; z-index: 1; }
.portal-hero-copy { position: relative; z-index: 1; display: grid; gap: var(--s3); max-width: 44ch; }
.portal-hero .eyebrow, .portal-sub { color: var(--app-on-brand); }
.portal-hero .eyebrow { opacity: .82; }
.portal-sub { opacity: .9; }
.portal-title { font-size: var(--text-3xl); line-height: 1.05; }

/* Nav cards */
.nav-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nav-card {
  display: grid;
  gap: var(--s4);
  grid-template-rows: auto 1fr auto;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur) var(--ease);
}
.nav-card:hover { transform: translateY(calc(var(--s1) / -2)); box-shadow: var(--shadow-md); }
.nav-chip {
  align-items: center;
  border-radius: var(--r-lg);
  color: var(--paper-fixed);
  display: inline-flex;
  font-size: var(--text-xl);
  height: var(--s12);
  justify-content: center;
  width: var(--s12);
}
.nav-chip.glow { background: var(--glow-gradient-strong); }
.nav-chip.green { background: var(--froyo); color: var(--app-on-brand); }
.nav-chip.coral { background: var(--coral); color: var(--ink-fixed); }
.nav-chip.ink { background: var(--ink); color: var(--paper); }
.nav-card-body { display: grid; gap: var(--s2); align-content: start; }
.nav-go { color: var(--froyo); font-weight: 700; }

.portal-foot, .report-foot { text-align: center; font-size: var(--text-sm); }

/* Reporting */
.report-head { display: grid; gap: var(--s3); }
.back-link { align-items: center; color: var(--froyo); display: inline-flex; font-weight: 700; min-height: var(--tap-min); }
.stat-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-tile { background: var(--surface); border: calc(var(--s1) / 4) solid var(--line); border-radius: var(--r-lg); padding: var(--s4); display: grid; gap: var(--s1); box-shadow: var(--shadow-sm); }
.stat-tile strong { font-family: var(--font-display); font-size: var(--text-2xl); }
/* Coral-tinted surface, so its secondary text takes the coral ink too — --muted
   is tuned for --paper/--surface and only reaches 4.43:1 on this one. */
.stat-tile.moat { background: var(--coral-100); }
.stat-tile.moat strong, .stat-tile.moat .eyebrow, .stat-tile.moat .muted { color: var(--app-coral-ink); }
.report-section { display: grid; gap: var(--s4); }
.report-section > h2 { font-size: var(--text-xl); }

.bench-wrap { overflow-x: auto; border-radius: var(--r-lg); border: calc(var(--s1) / 4) solid var(--line); }
.bench-table { border-collapse: collapse; width: 100%; min-width: 660px; }
.bench-table th, .bench-table td { text-align: left; padding: var(--s3) var(--s4); border-bottom: calc(var(--s1) / 4) solid var(--line); vertical-align: top; font-size: var(--text-sm); }
.bench-table thead th { background: var(--green-100); color: var(--froyo); }
.bench-table tbody tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; border-radius: var(--r-pill); padding: 2px var(--s2); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.tag.moat { background: var(--coral-100); color: var(--app-coral-ink); }
.tag.std { background: var(--green-100); color: var(--froyo); }

.overlap-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.report-list { display: grid; gap: var(--s2); padding-left: var(--s5); }
.report-list li { color: var(--muted); }
