/*
  Screen 07 — Home: Platform Shell.
  No frozen visual concept exists for this screen (SCREEN_07_HOME_PLATFORM_SHELL.md
  is behaviour-only, by its own explicit statement) — this layout is a
  narrow, minimal extension of the visual grammar already established
  across Screens 01–06, not a new register. No charts, no coloured KPI
  tiles, no icon grid, no customisable layout.

  A second, explicitly-flagged deviation from SCREEN_07_HOME_PLATFORM_SHELL.md
  (the first being the Home → Screen 06 pathway, recorded in prototype/README.md).
  The frozen specification orders Home's Information Hierarchy attention-
  first ("does anything need my attention today" as the very first thing
  answered) and explicitly forbids per-market cards on Home ("never
  expanded into per-market cards... reachable only by continuing to
  Screen 05"). A direct, explicit human instruction for this refinement
  sprint reordered the page to establish the monitored universe first —
  Hero, then Universe Summary, then Material Changes, then per-market
  cards — and required exactly the per-market card treatment the frozen
  document names and forbids. That instruction is treated the same way
  the Screen 06 deviation was: implemented as directed, and recorded here
  rather than silently reconciled with the frozen document.

  Accent: still reserved for the single active continuation in the
  Attention state only (the "present moment" the customer needs) —
  absent from the Hero, Universe Summary, and Monitored Markets cards,
  which stay in the same accent-free register Screen 05 already uses for
  its own portfolio-wide content.
*/

.page-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-9);
}

/* Wider than the shared --content-max (40rem) reading-column token used
   elsewhere in this series, deliberately: Home carries a Universe Summary
   row and Monitored Markets cards, not prose, so it reads as a workspace
   rather than a document at typical 14-16" laptop widths. 64rem centred
   is ~71% of a 1440px window and ~80% of a 1280px one — still clearly
   margined and centred, never full-width. Scoped to Screen 07 only (the
   shared token and every other screen's own .page-shell are untouched)
   and gated above the existing 900px tablet breakpoint below, so tablet
   and mobile keep exactly their prior width and behaviour. */
@media (min-width: 901px) {
  .page-shell { max-width: 64rem; }
}

/* ---------- 1. Hero — the universe, not the interruption ---------- */

.uh-hero { padding-bottom: var(--space-6); }

.uh-hero__title {
  font-family: var(--font-serif);
  font-size: var(--size-hero);
  font-weight: 500;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.uh-hero__text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: var(--leading-loose);
  color: var(--colour-text-muted);
  max-width: 36rem;
}

/* ---------- 2. Universe Summary — restrained orientation metrics ---------- */
/* Same recipe as Screen 01's confirmation stats: plain mono numerals and
   labels, one hairline top and bottom, no border box, no colour, no
   icon — deliberately not a KPI tile, a dashboard widget, or a chart. */

.uh-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-7);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--colour-hairline);
  border-bottom: 1px solid var(--colour-hairline);
  margin-bottom: var(--space-7);
}

.uh-stat__figure {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--colour-text);
  font-variant-numeric: tabular-nums;
}

.uh-stat__label {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--colour-text-faint);
  margin-top: var(--space-2);
}

/* ---------- 3. Material Changes ---------- */

.orientation-text {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  font-weight: 500;
  line-height: var(--leading-tight);
  max-width: 34rem;
  margin-bottom: var(--space-5);
}

.attention-block {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--colour-hairline);
  border-bottom: 1px solid var(--colour-hairline);
  margin-bottom: var(--space-5);
}

.attention-text {
  font-family: var(--font-serif);
  font-size: var(--size-body);
  line-height: var(--leading-loose);
  max-width: 38rem;
  margin-bottom: var(--space-4);
}

/* The one deliberate accent moment on this screen — the single active
   continuation, never a generic button, never repeated elsewhere. */
.attention-cta {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--colour-accent-strong);
  text-decoration: none;
  border-bottom: 1px solid var(--colour-accent-low-border);
  padding-bottom: 1px;
}
.attention-cta:hover { color: var(--colour-accent); border-bottom-color: var(--colour-accent); }

/* Monitoring confirmation — closes out Material Changes */

.confirmation-block { margin-bottom: 0; }

.confirmation-text {
  font-family: var(--font-serif);
  font-size: var(--size-body);
  line-height: var(--leading-loose);
  color: var(--colour-text-muted);
  max-width: 38rem;
}

/* ---------- 4. Monitored Markets — concise portfolio cards ---------- */
/* Same recipe as Screen 05's Active Saved Markets list: name and status
   in a flex head row, a small square marker for the one market carrying
   an active change, hairline-separated rows — deliberately a lighter,
   more compressed sibling of Screen 05's own cards, never their equal in
   depth. A market's own numbers stay a small mono line, not repeated as
   large figures, so the large numerals stay unique to Universe Summary. */

.market-cards { margin-top: var(--space-2); }

.market-card {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--colour-hairline);
  padding: var(--space-5) 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.market-card:last-child { border-bottom: none; }

.market-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}

.market-card__name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
}
.market-card:hover .market-card__name { color: var(--colour-accent-strong); }

.market-card__status {
  font-family: var(--font-mono);
  font-size: var(--size-small);
  color: var(--colour-text-muted);
  white-space: nowrap;
}

.market-card__status--elevated {
  color: var(--colour-text);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.market-card__status--elevated::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: var(--space-2);
  border: 1px solid var(--colour-text);
}

.market-card__figures {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--colour-text-faint);
}

/* ---------- 5. Management Pathways ---------- */

.pathways-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.pathway { font-family: var(--font-serif); font-size: var(--size-body); }

/* ---------- Completion ---------- */

.completion-text {
  font-family: var(--font-serif);
  font-size: var(--size-small);
  color: var(--colour-text-faint);
  line-height: var(--leading-normal);
  max-width: 34rem;
}

/* ---------- Prototype-only demo state switcher (shared pattern) ---------- */

body { padding-bottom: 3.75rem; }

.demo-controls {
  position: fixed;
  left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--colour-base-raised);
  border-top: 1px dashed var(--colour-hairline-strong);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
  opacity: 0.7;
  transition: opacity var(--duration-quick) ease;
}
.demo-controls:hover, .demo-controls:focus-within { opacity: 1; }

.demo-controls__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: #d98a4f;
  white-space: nowrap;
}
.demo-controls__row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.demo-controls button {
  appearance: none;
  background: transparent;
  border: 1px solid var(--colour-hairline-strong);
  color: var(--colour-text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
}
.demo-controls button[aria-pressed="true"] {
  background: var(--colour-text);
  color: var(--colour-base);
  border-color: var(--colour-text);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .page-shell { padding: var(--space-7) var(--space-5) var(--space-8); }
}

@media (max-width: 720px) {
  .page-shell { padding: var(--space-6) var(--space-4) var(--space-8); }
  .uh-hero__text, .orientation-text, .attention-text, .confirmation-text { max-width: 100%; }
  .uh-summary { gap: var(--space-5); }
  .market-card__head { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .demo-controls { justify-content: center; }
  body { padding-bottom: 4.75rem; }
}
