/* ═══════════════════════════════════════════════════════════════════════════
   THE CALM PASS ON THE OTHER SCREENS (founder 2026-10-31, "calm": apply the
   approved Today example, today-calm.css, to the main screens, then phone fit).
   Loaded after today-calm.css. Every rule is scoped to a screen whose <main>
   carries the class word vw--calm (arete-app.html): removing that word from a
   screen restores it exactly. The shell rules (header, rail, tab bar, pieces)
   apply only while a calm screen is open.

   The same five principles as Today (constitution §4, §6, §9, §11; her rule:
   no divider lines anywhere; her ruling "nothing hidden"):
   1. Cards carry the one calm glass, the approved values in tokens.css
      (--calm-glass-*). No heavier glass, no second light, no violet.
   2. Space separates, never a line.
   3. One bright primary action per screen; the rest goes quiet.
   4. Each fact said once (the duplicate lines are dropped in the JS that
      paints them, on the calm screens only: js/23, js/28, js/29, js/45).
   5. Nothing removed or hidden: every action and link stays where it was.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 0 · THE SHELL while a calm screen is open: no hairline under the header, beside the rail,
   or over the tab bar. The planes already differ in tone; the line said it twice. ── */
body:has(.view.vw--calm:not(.hidden)) #content-wrap > header::after,
body:has(#view-brief:not(.hidden) .td--calm) #content-wrap > header::after,
body:has(.view.vw--calm:not(.hidden)) #ui-rail::after,
body:has(#view-brief:not(.hidden) .td--calm) #ui-rail::after,
body:has(.view.vw--calm:not(.hidden)) #ui-tabbar::before,
body:has(#view-brief:not(.hidden) .td--calm) #ui-tabbar::before{ display:none !important; }

/* ── 1 · ONE PRIMARY ACTION. On every screen that has its own bright pill, the header's
   "Check a decision" stands quiet, exactly as on Today (today-calm.css §4). Radar, Accuracy
   and The Practice have no pill of their own, so there the header door stays the one. ── */
body:has(:is(#view-simulator,#view-uncertainty,#view-record,#view-archive,#view-blindspots,#view-signature).vw--calm:not(.hidden)) #content-wrap > header #intercept-btn:not(#_){
  background:transparent !important; border-color:rgba(160,225,255,.14) !important; box-shadow:none !important; color:rgb(var(--ink2)); }
body:has(:is(#view-simulator,#view-uncertainty,#view-record,#view-archive,#view-blindspots,#view-signature).vw--calm:not(.hidden)) #content-wrap > header #intercept-btn:hover:not(#_){ color:rgb(var(--ink)); }

/* ── 2 · YOU. The three cards take the calm glass (they carried the old heavier recipe and a
   violet second light); "Before you commit" stands on the card's own glass, not a box in the
   card; The external view is a quiet row like the two rows under it. ── */
#view-signature.vw--calm .yo-words:not(#_),
#view-signature.vw--calm .yo-bs-card:not(#_){
  border:1px solid var(--calm-glass-edge) !important;
  background:var(--calm-glass-bg) !important;
  -webkit-backdrop-filter:var(--calm-glass-blur) !important; backdrop-filter:var(--calm-glass-blur) !important;
  box-shadow:var(--calm-glass-shadow) !important;
  border-radius:var(--calm-glass-radius) !important;
  transition:border-color .3s ease, scale .18s ease; }
#view-signature.vw--calm .yo-words::before{ display:none !important; }
@media (hover:hover){
  #view-signature.vw--calm .yo-words:hover:not(#_), #view-signature.vw--calm .yo-bs-card:hover:not(#_){ border-color:var(--calm-glass-edge-hover) !important; }
}
#view-signature.vw--calm .yo-card-lifted:not(#_){ border-color:rgba(160,225,255,.30) !important; }
#view-signature.vw--calm .yo-check:not(#_){ background:none; padding:0; border-radius:0; margin-top:18px; }
#view-signature.vw--calm .yo-witness:not(#_){ border:0; background:none; border-radius:0; padding:12px 0; }
#view-signature.vw--calm .yo-witness:hover:not(#_){ background:none; }
#view-signature.vw--calm .yo-witness:hover .yo-dom__n{ color:var(--ice-hi,#dff4ff); }
/* the cards breathe further apart, the way Today's squares do */
@media (min-width:1024px){
  #view-signature.vw--calm .yo-top:not(#_){ column-gap:72px; }
  #view-signature.vw--calm .yo-left:not(#_){ gap:40px; }
}

/* ── 3 · THE PRACTICE: the top light drawn as a line along its card goes (space, not lines) ── */
#view-practice.vw--calm .card::after{ display:none !important; }

/* ── 4 · ACCURACY: the small lines under the number read at the page's tracking, not squeezed ── */
#view-calibration.vw--calm .cb-line:not(#_), #view-calibration.vw--calm .cb-sub:not(#_){ letter-spacing:0; }

/* ═══════════════════════════════════════════════════════════════════════════
   PART 2 · THE PHONE FIT (390px), on top of the calm pass.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width:1023px){
  /* the pieces under the title: the row ran off the right edge ("Show" and "Take" were cut).
     Every piece now shows, wrapping onto a second line when it must; no fade, no sideways scroll.
     Each keeps its 44px hit area (phone-fit.css: 30px pill inside a transparent border). */
  body:has(.view.vw--calm:not(.hidden)) #ui-pieces:not([hidden]),
  body:has(#view-brief:not(.hidden) .td--calm) #ui-pieces:not([hidden]){
    flex-wrap:wrap; overflow-x:visible; row-gap:0;
    -webkit-mask-image:none; mask-image:none; }
}
@media (max-width:480px){
  /* the pieces start on the page's 16px gutter (12px + the 4px transparent border) */
  body:has(.view.vw--calm:not(.hidden)) #ui-pieces:not([hidden]),
  body:has(#view-brief:not(.hidden) .td--calm) #ui-pieces:not([hidden]){ padding-right:12px; }

  /* the header: under a notch the title and the two discs sit below the status bar */
  body:has(.view.vw--calm:not(.hidden)) #content-wrap > header,
  body:has(#view-brief:not(.hidden) .td--calm) #content-wrap > header{
    height:calc(var(--hdr-h) + env(safe-area-inset-top,0px)) !important; padding-top:env(safe-area-inset-top,0px) !important;
    padding-left:max(16px, env(safe-area-inset-left,0px)) !important; padding-right:max(16px, env(safe-area-inset-right,0px)) !important; }
  /* the header's Check disc meets the 44px floor (it was 40px) */
  body:has(.view.vw--calm:not(.hidden)) #content-wrap > header #intercept-btn:not(#_),
  body:has(#view-brief:not(.hidden) .td--calm) #content-wrap > header #intercept-btn:not(#_){ width:44px; height:44px; min-width:44px; }

  /* one 16px side gutter on every calm screen, as on Today (phone-390.css §2) */
  :is(#view-simulator,#view-uncertainty,#view-record,#view-calibration,#view-archive,#view-radar,#view-blindspots,#view-signature,#view-practice).vw--calm{
    padding-left:max(16px, env(safe-area-inset-left,0px)) !important; padding-right:max(16px, env(safe-area-inset-right,0px)) !important; }

  /* Decide: the decision line was 41px tall; it meets 44px */
  #view-simulator.vw--calm .dc-input:not(#_){ min-height:44px; }

  /* You on the phone: the cards keep 20px inside (phone-390.css §3) */
  #view-signature.vw--calm .yo-words:not(#_), #view-signature.vw--calm .yo-bs-card:not(#_){ padding-left:20px !important; padding-right:20px !important; }
  /* "What it costs, and why Areté says this" was 33px tall: its tap area meets 44px */
  #view-signature.vw--calm .yo-bs-more > summary{ min-height:44px; display:flex; align-items:center; padding:0; }
}
@media (prefers-reduced-motion:reduce){ #view-signature.vw--calm [data-card]{ transition:none !important; } }
