/* The Signal page since 4.97 (public/js/features/signal-feed.js): a window of time, four ways to read it, and a signal
   that opens over the page. Built from the design canvas MC approved on 27 October ("good....let's deploy this"):
   reception bars beside every headline, sentence-case labels, the site's own ink, paper and strength colours. */

.page-signal .sx { margin-top: 4px; }
.sf { display: grid; gap: 14px; }
.sf-pane { margin-top: 0; }

/* ------------------------------------------------------------------ the hero, short, so signals start on the first screen */
.page-signal .signal-hero { padding-top: 18px; padding-bottom: 6px; }
.page-signal .signal-hero h1 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.06; letter-spacing: -.022em; }
.page-signal .signal-hero .sanctum-hero-intro { margin-top: 10px; max-width: 72ch; }
.page-signal .signal-hero .sanctum-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }

/* the People's Forecast's way in, beside the headline: the forecast's own indigo and gold */
.sf-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid #4b47d6;
  background: #2c2a8c linear-gradient(150deg, #3b37c4 0%, #2c2a8c 60%, #1f1d63 100%); color: #edeae3; font-size: 13.5px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 18px -10px #1f1d63b3; transition: transform .2s, border-color .2s; }
.sf-cta:hover, .sf-cta:focus-visible { border-color: #7b77f0; transform: translateY(-1px); outline: none; }
.sf-cta i { width: 7px; height: 7px; border-radius: 50%; background: #f2c46d; box-shadow: 0 0 0 3px #f2c46d33; }
.sf-cta-k { color: #f2c46d; font-weight: 600; }
.sf-cta-q { font-weight: 500; }
.sf-cta b { font-weight: 500; color: #f2c46d; }

/* ------------------------------------------------------------------ the windows, and the four ways to read them */
.sf-wins { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding: 2px; }
.sf-wins::-webkit-scrollbar { display: none; }
.sf-win { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid #e3e3df; border-radius: 999px;
  background: #fff; font: inherit; font-size: 14px; color: #4b4f4a; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.sf-win:hover:not(:disabled) { border-color: #16171a; color: #16171a; }
.sf-win[aria-pressed="true"] { background: #16171a; border-color: #16171a; color: #fff; }
.sf-win:disabled { opacity: .4; cursor: default; }
.sf-lock { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sf-bar { position: sticky; top: var(--belt-top, 70px); z-index: 6; margin-inline: -4px; padding: 8px 4px; background: #ffffffeb;
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
.sf-bar[hidden], .sf-body[hidden] { display: none; }
.sf-views { display: flex; max-width: 520px; padding: 2px; border: 1px solid #e3e3df; border-radius: 999px; background: #fff; }
.sf-view { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 6px; border: 0; border-radius: 999px;
  background: transparent; font: inherit; font-size: 14px; color: #4b4f4a; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.sf-view svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sf-view:hover { color: #16171a; }
.sf-view[aria-pressed="true"] { background: #16171a; color: #fff; }
@media (max-width: 420px) { .sf-view { font-size: 13px; gap: 5px; } }

/* ------------------------------------------------------------------ reception bars: more bars, a stronger signal */
.sf-bars { --dc: #3fae6a; display: inline-flex; align-items: flex-end; gap: 3px; height: 24px; flex: none; }
.sf-bars i { display: block; width: 4px; border-radius: 1.5px; background: #e4e4df; }
.sf-bars i:nth-child(1) { height: 6px; } .sf-bars i:nth-child(2) { height: 10.5px; } .sf-bars i:nth-child(3) { height: 15px; }
.sf-bars i:nth-child(4) { height: 19.5px; } .sf-bars i:nth-child(5) { height: 24px; }
.sf-bars i.on { background: var(--dc); }
.sf-bars-big { gap: 4px; height: 32px; }
.sf-bars-big i { width: 6px; border-radius: 2px; }
.sf-bars-big i:nth-child(1) { height: 8px; } .sf-bars-big i:nth-child(2) { height: 14px; } .sf-bars-big i:nth-child(3) { height: 20px; }
.sf-bars-big i:nth-child(4) { height: 26px; } .sf-bars-big i:nth-child(5) { height: 32px; }
.sf-rep { flex: none; padding: 1px 8px; border-radius: 999px; border: 1px solid #d9d9d2; font-size: 11.5px; color: #6a6e67; }

/* ------------------------------------------------------------------ list and grid, by day */
.sf-body { display: grid; gap: 26px; padding-bottom: 8px; }
.sf-day { display: grid; }
.sf-day-h { margin: 0 0 6px; font-size: 14px; font-weight: 600; letter-spacing: 0; color: #16171a; }
.sf-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; gap: 12px; align-items: start; width: 100%; padding: 14px 8px 14px 6px;
  border: 0; border-top: 1px solid #ecece8; border-radius: 0; background: transparent; font: inherit; color: #16171a; text-align: left; cursor: pointer; transition: background .15s; }
.sf-row:hover { background: #f6f6f3; }
.sf-row .sf-bars { margin-top: 1px; }
.sf-txt { display: grid; gap: 6px; min-width: 0; }
.sf-hook { font-size: 16px; font-weight: 500; line-height: 1.35; text-wrap: pretty; }
.sf-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: #6a6e67; }
.sf-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-chev { width: 16px; height: 16px; margin-top: 4px; fill: none; stroke: #a3a6a0; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sf-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 160px; padding: 14px; border: 1px solid #e6e6e1; border-radius: 14px;
  background: #fff; font: inherit; color: #16171a; text-align: left; cursor: pointer; box-shadow: 0 1px 1px #16171a08; transition: transform .2s, box-shadow .2s, border-color .2s; }
.sf-tile:hover { transform: translateY(-2px); border-color: #d6d6d0; box-shadow: 0 14px 26px -18px #0b1a3366; }
.sf-tile .sf-hook { font-size: 15px; line-height: 1.32; }
.sf-tile .sf-rep { margin-top: auto; }
@media (max-width: 700px) { .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .sf-tile .sf-hook { font-size: 14.5px; } }

/* ------------------------------------------------------------------ one by one */
.sf-one { display: grid; gap: 14px; max-width: 680px; width: 100%; margin-inline: auto; }
.sf-stack { position: relative; padding-bottom: 10px; }
.sf-under { position: absolute; left: 14px; right: 14px; bottom: 0; height: 40px; border-radius: 18px; background: #f1f1ed; border: 1px solid #e6e6e1; }
.sf-single { position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 400px; padding: 22px 20px; border: 1px solid #e6e6e1; border-radius: 18px;
  background: #fff; box-shadow: 0 22px 40px -30px #0b1a338c; touch-action: pan-y; user-select: none; }
.sf-single-top { display: flex; align-items: flex-end; justify-content: space-between; }
.sf-single-day { font-size: 13px; color: #6a6e67; }
.sf-single-hook { margin: 0; font-size: 24px; line-height: 1.22; font-weight: 500; letter-spacing: -.01em; text-wrap: pretty; }
.sf-single-plain { margin: 0; font-size: 15.5px; line-height: 1.55; color: #4b4f4a; }
.sf-read { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid #16171a; border-radius: 999px;
  background: #fff; font: inherit; font-size: 14.5px; color: #16171a; cursor: pointer; }
.sf-read svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sf-read:hover { background: #16171a; color: #fff; }
.sf-ctl { display: flex; align-items: center; gap: 12px; }
.sf-step { flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid #e3e3df; border-radius: 50%; background: #fff; color: #16171a; cursor: pointer; }
.sf-step-next { border: 0; background: #16171a; color: #fff; }
.sf-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sf-step:disabled { opacity: .35; cursor: default; }
.sf-track { flex: 1; height: 3px; border-radius: 3px; background: #e6e6e1; overflow: hidden; }
.sf-track i { display: block; height: 100%; background: #16171a; border-radius: 3px; transition: width .3s cubic-bezier(.16, 1, .3, 1); }

/* ------------------------------------------------------------------ the radar */
.sf-radar { position: relative; max-width: 100%; margin-inline: auto; }
.sf-radar-bg { position: absolute; inset: 0; display: block; }
.sf-radar-ring { fill: none; stroke: #16171a; stroke-opacity: .13; stroke-width: 1; }
.sf-radar-spoke { fill: none; stroke: #16171a; stroke-opacity: .08; stroke-width: 1; }
.sf-radar-lit { fill: #eef1fb; }
.sf-radar-day { position: absolute; transform: translate(-50%, -50%); padding: 0 4px; border-radius: 4px; background: #fcfcfc; font-size: 11px; font-weight: 500; color: #8e928d; white-space: nowrap; pointer-events: none; }
.sf-radar-topic { position: absolute; padding: 5px 3px; border: 0; background: transparent; font: inherit; font-weight: 500; color: #16171a; white-space: nowrap; cursor: pointer; }
.sf-radar-topic[aria-pressed="true"] { font-weight: 700; }
.sf-radar-topic.dim { color: #a3a6a0; }
.sf-dot { --dc: #3fae6a; --s: 12px; position: absolute; display: grid; place-items: center; width: 24px; height: 24px; margin: -12px 0 0 -12px; padding: 0; border: 0;
  background: transparent; cursor: pointer; transition: opacity .2s; }
.sf-dot i { display: block; width: var(--s); height: var(--s); border-radius: 50%; background: var(--dc); box-shadow: 0 0 0 2px #fcfcfc; transition: transform .15s; }
.sf-dot.rep i { box-sizing: border-box; background: #fff; border: 2px solid var(--dc); }
.sf-dot:hover i, .sf-dot:focus-visible i { transform: scale(1.25); }
.sf-dot.dim { opacity: .18; }

/* ------------------------------------------------------------------ the last month, for members */
.sf-empty { margin: 8px 2px 0; font-size: 15px; color: #6a6e67; }
.sf-gate { max-width: 560px; margin: 4px auto 0; padding: 24px 20px 22px; border: 1px solid #e6e6e1; border-radius: 16px; background: #fff; text-align: center; }
.sf-gate[hidden] { display: none; }
.sf-gate-h { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.sf-gate-p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.5; color: #4b4f4a; }
.sf-gate-go { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 0; }
.sf-gate-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #16171a; color: #fff; font-size: 14px; text-decoration: none; }
.sf-gate-in { color: #2368c2; font-size: 14px; }

/* ------------------------------------------------------------------ at the foot: the forecast, what is further back, the week in words */
.sf-forecast .deck-forecast-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; padding: 14px 16px; border-radius: 14px; text-decoration: none;
  color: var(--pf-paper); background: #2c2a8c linear-gradient(150deg, #3b37c4 0%, #2c2a8c 55%, #1f1d63 100%); border: 1px solid #4b47d6; border-top: 3px solid var(--pf-gold);
  box-shadow: 0 1px 0 #24227a, 0 22px 34px -22px #1f1d638c; }
.sf-forecast .deck-forecast-tile:hover { border-color: #7b77f0; border-top-color: var(--pf-gold); }
.sf-forecast .dft-k { grid-column: 1 / -1; }
.sf-forecast .deck-hook { display: block; -webkit-line-clamp: unset; color: var(--pf-paper); font-size: 15px; line-height: 1.4; }
.sf-forecast .dft-foot { margin: 0; flex-direction: column; align-items: flex-end; gap: 4px; }
.sf-forecast .dft-meta { color: #cfcdf5; }
.sf-earlier { margin: 0; padding: 4px 2px 0; font-size: 13.5px; line-height: 1.55; color: #4b4f4a; text-wrap: pretty; }
.sf-earlier b { font-weight: 500; color: #16171a; }
.sf-earlier a { color: #16171a; text-decoration: underline; text-decoration-color: #16171a59; text-underline-offset: 3px; }
.sf-earlier a:hover { text-decoration-color: #16171a; }
.sf-text { border-top: 1px solid #e3e3df; padding-top: 12px; }
.sf-text summary { cursor: pointer; font-size: 13.5px; color: #246ac5; list-style: none; }
.sf-text summary::-webkit-details-marker { display: none; }
.sf-text summary::after { content: " +"; }
.sf-text[open] summary::after { content: " \2212"; }
.sf-text-list { margin-top: 14px !important; }
.sf-text-list h3 a { color: #16171a; text-decoration: none; }
.sf-text-list h3 a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .page-signal .signal-hero { padding-top: 6px; }
  .page-signal .signal-hero h1 { font-size: 28px; line-height: 1.08; margin-top: 0; text-wrap: balance; }
  .page-signal .signal-hero .sanctum-hero-intro { display: none; }
  .page-signal .signal-hero .sanctum-hero-actions { margin-top: 12px; }
  .sf-forecast .deck-forecast-tile { grid-template-columns: 1fr; }
  .sf-forecast .dft-foot { flex-direction: row; align-items: center; }
  .sf-single { min-height: 380px; }
}

/* ------------------------------------------------------------------ a signal, opened

   The overlay /signal already has, with the cards of the set beside each other inside it, now with a frosted header:
   close on the left, the previous and the next signal on the right, and no count. */
.sx-sheet { position: relative; background: #f2f2ef; }
.sx-head { position: absolute; z-index: 4; top: 0; left: 0; right: 0; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 0;
  background: #f2f2efcc; backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid #16171a1f; }
.sx-head .sx-grab { position: absolute; top: 0; left: 50%; width: 120px; height: 18px; margin-left: -60px; }
.sx-head .sx-grab::before { content: ""; display: block; width: 36px; height: 5px; margin: 6px auto 0; border-radius: 3px; background: #3c3c434d; }
.sx-steps { display: flex; }
.sx-round { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #3c3c43; cursor: pointer; }
.sx-round svg { box-sizing: border-box; width: 30px; height: 30px; padding: 8.5px; border-radius: 50%; background: #7676801f; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; transition: background .15s; }
.sx-round:hover svg { background: #76768033; }
.sx-round:disabled { opacity: .35; cursor: default; }
.sx-sheet .sx-sheet-reader .sx-bar { display: none; }
.sx-sheet-reader .sx-slide { padding-top: 58px; background: #f2f2ef; }
.sx-sheet .sgr-head { padding-right: 0; }

/* a tablet: a sheet in the middle, the page dimmed behind it */
@media (min-width: 701px) {
  .sx-veil { padding: 48px 24px; background: #16171a6b; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .sx-sheet { width: min(720px, 100%); height: min(92vh, 1200px); border-radius: 24px; box-shadow: 0 0 0 .5px #16171a1f, 0 40px 100px -30px #000000a6; }
}
/* a laptop: a panel beside the list, which stays where it is and can still be used */
@media (min-width: 1100px) {
  .sx-veil { inset: var(--belt-top, 70px) 0 0 auto; width: min(640px, 46vw); padding: 16px 24px 24px 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; place-items: stretch; pointer-events: none; }
  .sx-sheet { pointer-events: auto; width: 100%; height: 100%; max-height: none; border-radius: 22px; animation: sx-slide .32s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 0 0 .5px #16171a1a, 0 2px 6px #16171a0f, 0 40px 80px -36px #0b1a3373; }
  body.deck-open { overflow: auto; }
  body.page-signal.deck-open .layout { padding-right: calc(min(640px, 46vw) + 8px) !important; transition: padding .32s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes sx-slide { from { transform: translateX(40px); opacity: 0; } }
/* a phone: the sheet rises and the page steps back behind it, from where the reader was */
@media (max-width: 700px) {
  .sx-veil { background: #00000038; }
  .sx-sheet { height: calc(100svh - 44px - env(safe-area-inset-top, 0px)); border-radius: 16px 16px 0 0; }
  body.page-signal.deck-open { background: #0b0b0c; }
  body.page-signal main.layout, body.page-signal .site-header { transition: transform .4s cubic-bezier(.2, .8, .2, 1), border-radius .4s; }
  body.page-signal.deck-open main.layout { transform: scale(.92) translateY(14px); transform-origin: 50% var(--sx-oy, 0px); border-radius: 14px; background: #fcfcfc; overflow: hidden; }
  body.page-signal.deck-open .site-header { transform: scale(.92) translateY(14px); transform-origin: 50% 0; border-radius: 14px 14px 0 0; background: #fcfcfc; }
}

/* ------------------------------------------------------------------ the side panel, a drawer at the right edge (rail-drawer.js)
   The page takes the full width; the panel waits off the edge behind a thin tab and slides over the page when the
   pointer reaches the edge or the tab is tapped. */
.rail-edge { display: none; }
@media (min-width: 701px) {
  body.rail-drawer .layout { grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; padding-right: calc(3vw + 18px) !important; }
  body.rail-drawer .feed { max-width: 1360px; }
  body.rail-drawer .right-rail {
    position: fixed !important; z-index: 70; top: var(--belt-top, 76px); right: 0; bottom: 0; width: min(330px, 86vw);
    display: block !important; max-height: none !important; margin: 0 !important; padding: 26px 26px 170px !important;
    background: #fcfcfb; border: 0; border-left: 1px solid #e3e3df; border-radius: 0;
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); visibility: hidden;
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), box-shadow .32s, visibility 0s linear .32s; }
  body.rail-drawer.rail-open .right-rail { transform: none; visibility: visible; box-shadow: -28px 0 60px -12px #10111333; transition: transform .32s cubic-bezier(.2, .8, .2, 1), box-shadow .32s, visibility 0s; }
  body.rail-drawer .rail-toggle { display: none !important; }
  /* the edge: a strip the pointer finds, and a tab that says something is there */
  body.rail-drawer .rail-edge { display: block; position: fixed; z-index: 69; top: var(--belt-top, 76px); right: 0; bottom: 0; width: 18px; padding: 0; border: 0; background: none; cursor: w-resize; }
  .rail-edge-tab { position: absolute; right: 0; top: 34%; display: grid; justify-items: center; gap: 8px; width: 26px; padding: 12px 0; border: 1px solid #e3e3df; border-right: 0; border-radius: 12px 0 0 12px;
    background: #fff; color: #4b4f4a; box-shadow: -6px 0 18px -10px #10111340; transition: width .2s, color .2s; }
  .rail-edge-tab svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .rail-edge-tab span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; letter-spacing: .01em; text-transform: none; white-space: nowrap; }
  body.rail-drawer .rail-edge:hover .rail-edge-tab, body.rail-drawer .rail-edge:focus-visible .rail-edge-tab { width: 32px; color: #16171a; }
  body.rail-drawer.rail-open .rail-edge { opacity: 0; pointer-events: none; }
  body.page-signal.deck-open .rail-edge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.rail-drawer .right-rail, .rail-edge-tab { transition: none !important; }
  .sf-tile, .sf-dot, .sf-dot i, .sf-track i, .sf-cta { transition: none; }
  .sx-sheet { animation: none !important; }
  body.page-signal main.layout, body.page-signal .site-header, body.page-signal.deck-open .layout { transition: none !important; }
}
