/* ==========================================================================
   FUNDER — Phone surface: bubbles on a branded canvas
   ==========================================================================
   Everything in this file is behind `@media (max-width: 767px)`. Desktop and
   tablet are not touched by a single declaration here, by construction.

   THE IDEA
   --------
   On a phone the homepage stops being a page with blocks drawn on it and
   becomes a stream of self-contained tiles sliding over a canvas — the thing
   that makes a messaging app feel orderly. Three rules carry it:

     1. One shape.  Every block of content — article card, fund table,
        "נצפו לאחרונה", the boards, the hero — is the same bubble: one
        radius, one hairline, one padding scale, from fn/01-tokens.css.
     2. One canvas.  The background is a different material from the bubbles
        and never holds body text. In ירקרק and כהה it carries the FUNDER
        wallpaper; it is FIXED, so scrolling moves the cards across it.
     3. One unit per card.  A card's photo and its headline share the
        bubble, never two floating objects that happen to be adjacent.

   WHAT THIS FILE DOES NOT DO
   --------------------------
   It does not restyle the header, the drawer, the ticker or anything above
   the content column — those have their own files and their own behaviour.
   It adds no new class to the server-rendered markup: every selector below
   already exists in index.aspx / index.aspx.cs output.

   Load order: last, after 00–20, so it can settle the phone presentation of
   components whose desktop rules live in their own file.
   ========================================================================== */

@media (max-width: 767px) {

  /* ======================================================== 1. THE CANVAS */

  /* The colour moves to <html> and <body> goes transparent so the fixed
     wallpaper layer (body::before, z-index -1) can paint between them.
     00-page.css already points html at --fn-bg-canvas; this narrows it to
     the phone-specific canvas without disturbing the desktop value. */
  html {
    background-color: var(--fn-canvas-color, var(--fn-bubble-canvas, var(--fn-bg-canvas)));
  }

  body.fn-ui {
    background-color: transparent;
  }

  /* The wallpaper: Udi's illustration per theme (--fn-canvas-image),
     tiled small on a fixed layer so scrolling moves the cards across it.
     Repeat + a CSS tile size (not `cover`) keeps the marks WhatsApp-small. */
  body.fn-ui::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--fn-canvas-color);
    background-image: var(--fn-canvas-image);
    background-size: var(--fn-canvas-tile-size) auto;
    background-position: 0 0;
    background-repeat: repeat;
    background-blend-mode: var(--fn-canvas-blend, normal);
  }

  /* The accessibility high-contrast modes own the surface completely. */
  body.fn-ui.darkCont::before,
  body.fn-ui.brightCont::before {
    display: none;
  }


  /* ====================================================== 2. THE GUTTER */

  /* One inset from the viewport edge for every bubble on the page. The
     content column already carries Bootstrap's 15px, so components stop
     adding a second gutter of their own — that double inset was costing
     ~32px of headline width on a 320px screen. */
  .fn-ui .fn-feed {
    --fn-feed-gutter: 0px;
    padding-inline: 0;
    margin-bottom: var(--fn-bubble-group-gap);
  }

  .fn-ui .fn-board {
    padding-inline: 0;
  }


  /* ======================================================== 3. THE BUBBLE */

  /* The shell. Applied to the PRESSABLE element where there is one (the card
     link), so :active can answer the touch on the same box that draws the
     card — no :has(), no wrapper div, no extra DOM. */
  .fn-ui .fn-feed__link,
  .fn-ui .fn-chrono__link,
  .fn-ui .fn-data-module--compact,
  .fn-ui .fn-board,
  .fn-ui .fn-magazine,
  .fn-ui .fn-hero__frame {
    position: relative;
    border: 1px solid var(--fn-bubble-border);
    border-radius: var(--fn-bubble-radius);
    background: var(--fn-bubble-bg);
    box-shadow: var(--fn-bubble-shadow);
    overflow: hidden;
  }

  /* Data blocks and boards get their padding here; article cards pad their
     body only, because their photo is full-bleed to the bubble edge. */
  .fn-ui .fn-data-module--compact,
  .fn-ui .fn-board,
  .fn-ui .fn-magazine {
    padding: var(--fn-bubble-pad);
  }


  /* ============================================ 4. ARTICLE CARD — stacked */

  /* Editorial feed (ראשי). Bands collapse to a single column of bubbles and
     the gap between them is the bubble rhythm, not an editorial air gap. */
  .fn-ui .fn-feed__band,
  .fn-ui .fn-feed__band--lead,
  .fn-ui .fn-feed__band--split,
  .fn-ui .fn-feed__band--duo,
  .fn-ui .fn-feed__band--trio,
  .fn-ui .fn-feed__band--briefs {
    gap: var(--fn-bubble-gap);
  }

  .fn-ui .fn-feed__band + .fn-feed__band,
  .fn-ui .fn-feed__band:first-of-type + .fn-feed__band {
    margin-top: var(--fn-bubble-gap);
  }

  /* The photo seals onto the top edge of the bubble: it is the card's own
     roof, not a picture resting on top of a panel. Inner radius is one pixel
     tighter than the shell so the border reads as a continuous edge. */
  .fn-ui .fn-feed__link,
  .fn-ui .fn-feed__band--duo .fn-feed__link,
  .fn-ui .fn-feed__band--trio .fn-feed__link,
  .fn-ui .fn-feed__band--briefs .fn-feed__link {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
  }

  .fn-ui .fn-feed__item .fn-feed__media,
  .fn-ui .fn-feed__item--lead .fn-feed__media,
  .fn-ui .fn-feed__item--split .fn-feed__media,
  .fn-ui .fn-feed__item--duo .fn-feed__media,
  .fn-ui .fn-feed__item--trio .fn-feed__media,
  .fn-ui .fn-feed__item--briefs .fn-feed__media,
  .fn-ui .fn-feed__band:first-of-type .fn-feed__item:first-child .fn-feed__media {
    aspect-ratio: 3 / 2;
    max-height: none;
    border-radius: calc(var(--fn-bubble-radius) - 1px) calc(var(--fn-bubble-radius) - 1px) 0 0;
    background: var(--fn-bubble-media-bg);
    box-shadow: none;
    margin: 0;
  }

  .fn-ui .fn-feed__body {
    gap: var(--fn-bubble-line-gap);
    padding: var(--fn-bubble-pad-tight) var(--fn-bubble-pad) var(--fn-bubble-pad);
  }

  /* A section header introduces the group under it, so it sits closer to its
     own first card than the gap that separated it from the group above. */
  /* A section header introduces the group under it, so it sits CLOSER to its
     own first card than two cards sit to each other. One asymmetry, and the
     group reads as a group without a box or a rule around it. */
  .fn-ui .fn-feed .fn-section-header {
    margin-bottom: var(--fn-bubble-label-gap);
  }

  /* No photo: the bubble keeps its shape and the headline takes the room.
     The brand rule that used to stand in for the missing picture becomes a
     thin accent on the reading edge, inside the bubble. */
  .fn-ui .fn-feed__item--noimg .fn-feed__link {
    grid-template-columns: minmax(0, 1fr);
  }

  .fn-ui .fn-feed__item--noimg .fn-feed__body {
    padding-top: var(--fn-bubble-pad);
    border-top: 0;
    border-inline-start: 3px solid var(--fn-brand);
  }


  /* ========================================= 5. ARTICLE CARD — horizontal */

  /* Chronological stream (פיד). Thumb beside the headline, both inset by the
     bubble padding so the TOP OF THE PHOTO AND THE TOP OF THE HEADLINE sit
     on one line — the alignment Udi asked for. A fixed thumb width plus a
     fixed ratio means the row height is known before the image loads, so a
     slow photo cannot shift the list. */
  .fn-ui .fn-chrono {
    margin-bottom: var(--fn-bubble-group-gap);
  }

  .fn-ui .fn-chrono__list {
    gap: var(--fn-bubble-gap);
  }

  .fn-ui .fn-chrono__item,
  .fn-ui .fn-chrono__item:last-child {
    border-bottom: 0;
  }

  /* COMPACTION.
     The card was taller than it needed to be, and the reason was arithmetic
     rather than taste: a 108px thumb left 219px for the headline, which is
     about 24 Hebrew characters a line, which turned most titles into three
     lines of 22.4px — a text block half again as tall as the picture beside
     it. Four small moves, no loss of legibility:

       thumb 108 → 100   +12px of measure, so a slice of titles that used to
                         wrap to three lines now fit in two
       leading 1.32 → 1.26   −3px per line, and at 17px the lines were never
                         close enough to touch
       padding 11 → 10, title→date 6 → 4

     A three-line card goes from ~109px to ~96px and a one-line card from
     ~75px to ~68px — roughly 12% off the column — while the type size is
     untouched. Nothing is clamped to a fixed height: the card still grows
     with its own content, it just stops carrying slack. */
  .fn-ui .fn-chrono__link {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: var(--fn-bubble-pad-tight);
    /* The thumb fills the row rather than sitting at the top of it. */
    align-items: stretch;
    padding: var(--fn-bubble-pad-tight);
  }

  .fn-ui .fn-chrono__title {
    line-height: 1.26;
  }

  /* THE PROPORTION.
     The thumb stays the 3:2 crop the CDN sent. Stretching it to the
     headline's height re-cropped every row by a different amount. A short
     headline may sit a little taller than the picture; the picture does
     not grow to meet it. */
  .fn-ui .fn-chrono__media,
  .fn-ui .fn-chrono__media--empty {
    aspect-ratio: 3 / 2;
    align-self: center;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .fn-ui .fn-chrono__body {
    align-content: start;
  }

  .fn-ui .fn-chrono__media {
    border-radius: var(--fn-bubble-media-radius);
    background: var(--fn-bubble-media-bg);
  }

  .fn-ui .fn-chrono__body {
    gap: 4px;
    padding-top: 0;
  }

  /* Date only. No brand tick in front of it: a 2px green mark on every card
     put eight of them on a screen, which is how an accent stops being one.
     Green is now spent where it means something — the selected view, an
     active chip, a focus ring — and a timestamp is just a timestamp. */
  .fn-ui .fn-chrono__meta,
  .fn-ui .fn-feed__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
  }

  .fn-ui .fn-chrono__meta::before,
  .fn-ui .fn-feed__meta::before {
    content: none;
  }

  /* Headline first, date under it — the markup emits meta first because the
     desktop stream reads better that way. */
  .fn-ui .fn-chrono__meta { order: 2; }
  .fn-ui .fn-chrono__title { order: 1; }

  /* An article with no photo keeps the two-column grid rather than letting
     the headline jump to full width — a list where some rows are indented
     and some are not reads as broken, not as variety. */
  /* An article with no photograph. This is the only grey allowed inside a
     card: a real absence, which should look like one rather than like a
     white hole. Everything else in the card is the card's own surface. */
  .fn-ui .fn-chrono__media--empty {
    background: var(--fn-bubble-skeleton);
  }

  .fn-ui .fn-chrono__foot {
    min-height: 44px;
    margin: var(--fn-bubble-gap) 0 0;
  }

  /* Small phones: one step down, declared once so the editorial feed and
     the chronological stream move together instead of drifting apart. */
  @media (max-width: 359px) {
    :root {
      --fn-type-card-phone: 16px;
      --fn-bubble-pad: 10px;
      --fn-bubble-pad-tight: 9px;
      --fn-bubble-radius: 12px;
    }

    .fn-ui .fn-chrono__link {
      grid-template-columns: 92px minmax(0, 1fr);
    }
  }


  /* ================================================== 6. HERO — same shell */

  .fn-ui .fn-hero-slot {
    margin-bottom: var(--fn-bubble-group-gap);
  }

  .fn-ui .fn-hero__frame {
    border-color: var(--fn-bubble-border);
  }

  .fn-ui .fn-hero__content {
    padding: var(--fn-bubble-pad-tight) var(--fn-bubble-pad) var(--fn-bubble-pad);
  }

  /* The hero's type band is the bubble's own surface, so the hairline that
     used to separate "photo" from "paper" inside a bordered card is noise. */
  .fn-ui .fn-hero__zone {
    background: transparent;
  }

  .fn-ui .fn-hero__zone::after {
    content: none;
  }


  /* ====================================== 7. DATA, BOARDS, SIDE MODULES */

  /* --compact is the phone module. It used to be deliberately frameless and
     "open on the canvas"; it now takes the shared bubble, which is what lets
     a fund table, a news card and the daily board read as the same family. */
  .fn-ui .fn-data-module--compact {
    margin-bottom: var(--fn-bubble-gap);
  }

  /* The table runs edge to edge inside the bubble: padding belongs to the
     shell, and a second inset on the rows would waste a phone's width. */
  .fn-ui .fn-data-module--compact .fn-data-body {
    margin-inline: calc(var(--fn-bubble-pad) * -1);
  }

  .fn-ui .fn-data-module--compact .fn-data-table > thead > tr > th:first-child,
  .fn-ui .fn-data-module--compact .fn-data-table > tbody > tr > td:first-child {
    padding-inline-start: var(--fn-bubble-pad);
  }

  .fn-ui .fn-data-module--compact .fn-data-table > thead > tr > th:last-child,
  .fn-ui .fn-data-module--compact .fn-data-table > tbody > tr > td:last-child {
    padding-inline-end: var(--fn-bubble-pad);
  }

  .fn-ui .fn-data-module--compact .fn-data-footer {
    margin-bottom: 0;
    padding-top: var(--fn-bubble-pad-tight);
  }

  /* ---------------------------------------------- the table that scrolls
     These modules carry FIFTY rows each (wsFundaa_GetTopFunds returns 50),
     so the pane caps itself and scrolls. Printing them all would add ~2,400px
     per module — three of them on this page — which is not a trade worth
     making to avoid a scroller.

     So the scroller stays, and the three things that made it feel broken get
     fixed instead:

       1. THE CUT ROW. Names clamp to two lines, so rows are 48px or 72px and
          a cap of "six rows" lands mid-row about half the time. It reads as
          a rendering fault. A fade over the last few pixels turns the same
          cut into the oldest "there is more below" signal there is.
       2. THE SCROLL TRAP. `overscroll-behavior: contain` is right on desktop
          and wrong here: it means a thumb that lands inside a 288px box in
          the middle of a 6,000px page cannot scroll the page at all until it
          leaves the box. On a phone that is the single most frustrating
          thing a nested scroller can do.
       3. THE MOUSE RAIL. fn-data-scroll.js paints a drag thumb. There is
          nothing to drag with on a touch screen, so it is a green stripe
          that does nothing.
     -------------------------------------------------------------------- */

  .fn-ui .fn-data-module--compact .fn-data-body > .tab-pane.fn-data-scroll.active {
    /* Half a row of deliberate peek at the bottom — the same language the
       indices strip uses sideways, so "there is more this way" looks the
       same everywhere on the page. */
    --fn-data-scroll-rows: 6.5;
    padding-right: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent 100%);
  }

  .fn-ui .fn-data-scroll__view {
    /* Let the page take over once the inner list is at its end. */
    overscroll-behavior-y: auto;
  }

  /* Touch has no drag affordance to offer; the fade says it all. */
  @media (hover: none) {
    .fn-ui .fn-data-module--compact .fn-data-scroll__rail {
      display: none;
    }
  }

  /* A 48px row with a two-line name is tight. The row keeps its height and
     the name gets the leading back. */
  .fn-ui .fn-data-module--compact .fn-data-table .index_cnt1 a {
    line-height: 1.4;
  }

  .fn-ui .fn-data-module--compact .fn-data-table > tbody > tr > td {
    padding-block: 7px;
  }

  /* --fn-data-cell-x is 0 on phones to buy width, which left a long fund
     name ending flush against the figure beside it — two unrelated pieces
     of information with nothing between them, which reads as a collision
     rather than as two columns. The gutter goes on the name cell only, so
     the metric track keeps every pixel it was given. */
  .fn-ui .fn-data-module--compact .fn-data-table > tbody > tr > .index_cnt1,
  .fn-ui .fn-data-module--compact .fn-data-table > thead > tr > .index_hd1 {
    padding-inline-end: 10px;
  }

  /* ------------------------------------------- returns tiles, compacted
     Udi's reference is Yahoo Finance: less height, tighter spacing, a
     readable hierarchy between the name, the return and the change.

     Two of those are the same problem. The figure was 15px/700 and the name
     14px/400, so the NUMBER outranked the thing it was a number for — the
     eye landed on "+0.41%" before it knew which fund. Levelling the figure
     to 14px and giving the name weight 600 puts the name first and the
     figure immediately after it, which is the order a reader actually
     wants, and it buys a pixel of row height as a side effect.

     No data is removed and no figure loses a digit: the columns, the
     precision and the tooltipped "#" for a missing value are untouched.

     The result is MORE rows in LESS height:

                      before     after
       row              48px      40px
       rows in view     6.5       7.5
       pane            312px     300px
       whole module    504px     ~430px

     --fn-bubble-pad is overridden rather than the padding declaration,
     because the body's negative margin and the row insets are all written
     against that token — changing the token moves all four together, and
     changing the declaration would have left the table hanging 3px off
     centre inside its own bubble. */
  .fn-ui .fn-data-module--compact {
    --fn-bubble-pad: var(--fn-bubble-pad-tight);
    --fn-data-name-size: 14px;
    --fn-data-num-size: 14px;
    /* THE lever. 09-data.css pins the row with `height: var(--fn-data-row-h)`,
       so cell padding and leading do not move it — they only decide whether
       the content fits inside it. Tuning them without this does nothing at
       all, which is what the first attempt here proved.

       44px is the floor, not a preference: a fund name is two lines of 14px
       Hebrew at 1.25 leading = 35px, plus 4px of padding top and bottom = 43.
       42 would clip the second line of every long name on the page. */
    --fn-data-row-h: 44px;
  }

  .fn-ui .fn-data-module--compact .fn-data-table > tbody > tr > td {
    padding-block: 4px;
  }

  /* The name is the subject of the row, so it carries the weight — and the
     leading is where the row height actually lives. A fund name here is
     usually two lines of Hebrew, so the pair of line boxes, not the cell
     padding, is what set 48px. 1.25 is as tight as 14px Hebrew goes before
     the descenders of ק/ן start touching the line below. */
  .fn-ui .fn-data-module--compact .fn-data-table .index_cnt1 a {
    font-weight: var(--fn-fw-medium);
    line-height: 1.25;
  }

  /* The pane keeps its six-and-a-half rows — the half row is the "there is
     more below" signal and buying a seventh row would cost the affordance —
     so the shorter row is taken as height rather than as more rows:
     6.5 x 48 = 312px becomes 6.5 x 44 = 286px. */
  .fn-ui .fn-data-module--compact .fn-data-body > .tab-pane.fn-data-scroll.active {
    --fn-data-scroll-rows: 6.5;
  }

  /* The footer already has a rule above it; the 11px of padding on top of
     that rule was separating a separator. The link keeps its 40px, which
     is the tap target and is not negotiable. */
  .fn-ui .fn-data-module--compact .fn-data-footer {
    padding-top: 0;
  }

  /* The two "נצפו לאחרונה" widgets used to be handled here: the body was
     pulled out to the bubble edge and the ROW put the inset back.

     That works for the quotes widget, which renders <li> rows. It does
     nothing at all for the funds widget, which renders a <table> — and
     padding on a <tr> is ignored by the table box model. So the funds
     table sat flush against the bubble on a phone, dividers and all, while
     its twin directly above it was inset.

     Both widgets are now handled together, at both sizes, in 09-data.css.
     Nothing width-specific is left to say about them here. */

  /* ============================================ 7a. THE FIVE TYPE ROLES ==

     A phone screen carries five kinds of text and they have to be told apart
     without reintroducing the size lottery this design removed:

       1. page headline (hero)       21–27px / 700   the only large type
       2. article card title         17px    / 600   ONE size, every card
       3. section label              14px    / 700   tracked, muted
       4. financial module title     15px    / 700
       5. date and meta              12px    / 400   muted

     Roles 2 and 3 were the problem: a section heading was --fn-fs-lg, which
     is also 17px, so "חדשות" and the headline under it differed by weight
     alone and the eye read them as the same rank. A section label is chrome,
     not content, so it steps DOWN and changes kind — smaller, tracked, in
     the secondary ink, with the brand tick that already marks it. The 17px
     slot now belongs to article titles and nothing else. */
  .fn-ui .fn-section-header__title,
  .fn-ui .fn-section-header--dense .fn-section-header__title {
    font-size: 14px;
    font-weight: var(--fn-fw-bold);
    letter-spacing: 0.01em;
    color: var(--fn-text-2);
  }

  /* A section header that introduces a bubble is a label for it, not another
     box: it loses its own frame and sits on the canvas above the group, the
     way a date divider sits above a run of messages. */
  .fn-ui .fn-section-header {
    margin-bottom: var(--fn-bubble-label-gap);
    padding-inline: 2px;
  }

  /* Role 4 — a financial module's own title, inside its bubble. One step
     above a section label because it names the data you are looking at
     rather than the group it belongs to. */
  .fn-ui .fn-data-module__title {
    font-size: var(--fn-fs-md);
    font-weight: var(--fn-fw-bold);
    color: var(--fn-text-1);
  }

  /* ---- Hebrew line breaking -------------------------------------------
     Headlines here mix Hebrew with tickers, percentages and Latin names —
     'ת"א-125 ננעל בירידה של 0.8%', 'פסגות מחקה S&P 500'. Two rules carry it:

       overflow-wrap: break-word   a single unbreakable Latin token longer
          than the measure ('PHLX SEMICONDUCTOR') used to overflow its box
          and get sliced by the clamp with no ellipsis to explain it. This
          only ever fires on a word that cannot fit a line by itself, so no
          Hebrew word is ever broken by it.
       word-break: normal          `keep-all` was doing nothing useful
          outside CJK and is the kind of rule that surprises someone later.

     Hyphenation stays off: Hebrew does not hyphenate, and a hyphen inserted
     into a ticker would change what it says. */
  .fn-ui .fn-feed__headline,
  .fn-ui .fn-chrono__title,
  .fn-ui .fn-hero__title {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  .fn-ui .fn-board {
    margin-bottom: var(--fn-bubble-group-gap);
  }

  /* Full bleed is the pane's: it is the box that clips now, and a table
     wider than it would be cut at the padding line instead of the edge. */
  .fn-ui .fn-board__pane {
    margin-inline: calc(var(--fn-bubble-pad) * -1);
  }

  .fn-ui .fn-board__table th.fn-board__name,
  .fn-ui .fn-board__table td.fn-board__name {
    padding-inline-start: var(--fn-bubble-pad);
    background: var(--fn-bubble-bg);
  }

  .fn-ui .fn-board__table td.fn-board__numcol,
  .fn-ui .fn-board__table th.fn-board__numcol {
    padding-inline-end: var(--fn-bubble-pad);
  }

  /* Header cells inherited the page canvas; inside a bubble that reads as a
     grey band floating on white. */
  .fn-ui .fn-board__table th {
    background: var(--fn-bubble-bg);
  }

  .fn-ui .fn-board__table tbody tr:last-child td {
    border-bottom: 0;
  }

  .fn-ui .fn-board__table td.is-focus,
  .fn-ui .fn-board__table th.is-focus {
    background: color-mix(in srgb, var(--fn-brand, #67cb35) 7%, var(--fn-bubble-bg));
  }

  .fn-ui .fn-magazine-slot {
    margin-bottom: var(--fn-bubble-group-gap);
  }

  /* The newsletter CTA is a full-width action, so it takes the bubble radius
     rather than the small control radius — one shape on the canvas. */
  .fn-ui a.newsletterBtn.btn,
  .fn-ui a.newsletterBtn.btn-primary {
    border-radius: var(--fn-bubble-radius);
    margin-bottom: var(--fn-bubble-group-gap);
  }


  /* ========================== 7b. VIEW SWITCH — ראשי / פיד / מבט מהיר */

  /* This was a segmented pill: a bordered, shadowed, pill-radiused shell
     with a filled chip for the selected mode. Udi's note is that the row
     should read flat, thin and compact — the same language as desktop —
     and that navigation chrome does not get bubbles. So the phone now uses
     the SAME underline-tab form as desktop, with the travelling green
     underline as the active state.

     It is also shorter than what it replaces, not taller:
       old   3px pad + 1px border, twice, around a 32px option  = 40px
       new   a 36px option sitting on a 1px rule                = 37px
     and 36px is still well past the 24px minimum target size, so the height
     came out of decoration rather than out of the thing you aim at.

     Behaviour is untouched: same buttons, same aria-pressed, same instant
     client-side switch, same sliding indicator. */
  /* The ROW, not just the buttons. Measured from the bottom of the indices
     strip to the top of the first card, the switch was costing 56px:

       option      36px   (min-height)
       rule         1px
       row margin  14px   (--fn-bubble-gap)
       switch      ~5px   (its own bottom margin)

     Every one of those came down. The option keeps a 30px target, which is
     still well past the 24px minimum and is three times the gap that used
     to sit under it, so nothing about hitting it got worse — the height was
     in the SPACING, which is what Udi was pointing at. */
  .fn-ui .fn-view-switch-row {
    margin-top: 0;
    margin-bottom: 8px;
  }

  .fn-ui .fn-view-switch {
    display: flex;
    align-items: stretch;
    width: auto;
    gap: 0;
    /* The row's negative Bootstrap margin cancels the column padding, so
       this inset is what lines the control up with the bubbles below it. */
    /* The switch carries no bottom margin of its own; the row owns the
       distance to whatever comes next, so there is one number to tune
       instead of two that add up. */
    margin: 0 15px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--fn-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    /* All four labels fit from 320px up; this stays as a safety valve in
       case a label is ever renamed to something longer. */
    overflow-x: auto;
  }

  .fn-ui .fn-view-switch__opt {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 30px;
    margin: 0;
    padding: 0 6px;
    border-radius: 0;
    font-size: 13px;
    transition: color var(--fn-dur-fast) var(--fn-ease);
  }

  /* Four equal tabs under one rule do not also need pipes between them;
     that pattern is for the desktop row, where the options are only as
     wide as their labels. */
  .fn-ui .fn-view-switch__opt + .fn-view-switch__opt::before {
    display: none;
  }

  /* The selected mode: the approved green on the label, bold, plus the
     travelling underline from 22-motion.css. Three signals, so the
     selection survives greyscale — never colour alone. */
  html:not([data-fn-home-view]) .fn-ui .fn-view-switch__opt[data-fn-view="editorial"],
  html[data-fn-home-view="editorial"] .fn-ui .fn-view-switch__opt[data-fn-view="editorial"],
  html[data-fn-home-view="feed"] .fn-ui .fn-view-switch__opt[data-fn-view="feed"],
  html[data-fn-home-view="quick"] .fn-ui .fn-view-switch__opt[data-fn-view="quick"],
  html[data-fn-home-view="gallery"] .fn-ui .fn-view-switch__opt[data-fn-view="gallery"],
  html[data-fn-home-view="banner"] .fn-ui .fn-view-switch__opt[data-fn-view="banner"] {
    background: transparent;
    color: var(--fn-interactive-ink);
    font-weight: 700;
  }

  .fn-ui .fn-view-switch__opt:active {
    background: transparent;
    color: var(--fn-interactive-press);
  }

  /* Category jump has nine labels — keep them as a scrolling strip, not
     equal-width tabs like ראשי/פיד. */
  .fn-ui .fn-view-switch.fn-cat-jump {
    display: flex;
    width: auto;
    margin: 8px 15px 18px;
  }

  .fn-ui .fn-cat-jump .fn-view-switch__opt {
    flex: 0 0 auto;
    justify-content: center;
    padding: 0 11px;
  }


  /* ================================================ 8. TOUCH & MOTION */

  /* The press. One short, small transform on the card the finger is on —
     enough to feel answered, far below the threshold where it reads as an
     animation. Colour moves with it so the feedback survives on a device
     where the scale is hard to see. */
  .fn-ui .fn-feed__link,
  .fn-ui .fn-chrono__link,
  .fn-ui .fn-hero__frame {
    transition:
      transform var(--fn-dur-fast) var(--fn-ease),
      background-color var(--fn-dur-fast) var(--fn-ease),
      border-color var(--fn-dur-fast) var(--fn-ease);
    -webkit-tap-highlight-color: transparent;
  }

  .fn-ui .fn-hero__link {
    -webkit-tap-highlight-color: transparent;
  }

  .fn-ui a.fn-feed__link:active,
  .fn-ui a.fn-chrono__link:active,
  .fn-ui .fn-hero__frame:has(.fn-hero__link:active) {
    transform: scale(0.985);
    background-color: var(--fn-bubble-bg-press);
    border-color: var(--fn-border-strong);
  }

  /* Same green the feed headline takes on press (07-feed.css). The hero
     title colour was gated to a fine pointer, so a finger never turned it. */
  .fn-ui .fn-hero__link:active .fn-hero__title {
    color: var(--fn-brand);
  }

  .fn-ui .fn-hero__link:active .fn-hero__img {
    transform: none;
  }

  /* The photo no longer moves on its own — the whole bubble answers now. */
  .fn-ui .fn-feed__link:active .fn-feed__media {
    transform: none;
  }

  .fn-ui a.fn-feed__link:focus-visible,
  .fn-ui a.fn-chrono__link:focus-visible {
    outline: var(--fn-focus-width) solid var(--fn-focus);
    outline-offset: 2px;
    border-radius: var(--fn-bubble-radius);
  }

  /* Cards appended by infinite scroll arrive instead of appearing. Short,
     once, and never on a card that is already on screen. */
  .fn-ui .fn-chrono__item {
    animation: fn-bubble-in 240ms var(--fn-ease) both;
  }

  @keyframes fn-bubble-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
  }

  /* Loading state: a quiet pulse on the foot line, not a spinner that
     implies the page is stuck. */
  .fn-ui .fn-chrono__loading,
  .fn-ui .fn-chrono__status {
    animation: fn-bubble-pulse 1.4s ease-in-out infinite;
  }

  @keyframes fn-bubble-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .fn-ui .fn-chrono__item,
  .fn-ui .fn-chrono__loading,
  .fn-ui .fn-chrono__status {
    animation: none;
  }

  .fn-ui a.fn-feed__link:active,
  .fn-ui a.fn-chrono__link:active {
    transform: none;
  }
}
