/* ───────────── every form factor: phones from 320 px, foldables (cover, open, book posture), tablets, desktops ─────────────
   rules_design_review, 28-Oct-2026. The viewport meta carries viewport-fit=cover; see directory-blueprint/design/FOLD-LAYER.md. */

/* nothing wider than the screen: the "checked" stamp stays inside between 921 and 1279 px (it widened the home 10 px on a Fold main
   screen and an iPad held sideways, and on 932–1180 px laptops); a long name breaks inside its heading */
@media (max-width: 1279px) { .st-stamp { right: -6px; } }
.hx { overflow-x: clip; }
h1, h2, h3 { overflow-wrap: anywhere; }

/* the masthead never sticks (the owner's standing rule: no sticky header on any site); the filter bar gives way on short screens */
.mast { position: relative; }
@media (max-height: 520px) { .sift { position: static; } }

/* safe areas: notches, rounded corners and the home bar */
.page { width: min(var(--max), 100% - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))); }
.foot { padding-bottom: max(42px, env(safe-area-inset-bottom)); }

/* touch: every target at least 44 px (links inside sentences excepted) */
@media (pointer: coarse) {
  .lookup input, .lookup button { height: 44px; }
  .shade { width: 44px; height: 44px; }
  .name { min-height: 44px; }
  .links a, .list-yours { display: inline-flex; align-items: center; min-height: 44px; }
  .act, .btn-ink, .btn-line, .sift button { min-height: 44px; }
  .foot ul { gap: 0; }
  .foot ul a, .foot .legal a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .foot .legal { gap: 0 18px; }
  .sec-h > a, .st-foot a { display: inline-block; padding-block: 13px; margin-block: -13px; }
  a.fig { padding: 9px; margin: -9px; }
}

/* book posture (a foldable half-open like a book): nothing across the fold */
@media (horizontal-viewport-segments: 2) {
  :root { --seg0: env(viewport-segment-width 0 0, 50vw); --fold-gap: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px) + 32px); --fold-page: calc(var(--seg0) - 32px); }
  .page { width: calc(100% - 32px); }
  .hx .page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--fold-gap); }
  .foot .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--fold-gap); }
}

/* ── v2 (28-Oct-2026 evening; helper 34 for lead 68): what the full 45-viewport run left — small touch targets, and text across the
   fold in book posture (bin/hinge.mjs --leaf at 954×859 and 626×890). Ad slots, the sidebar column and the sponsor box (.tl-sponsor)
   are left exactly as they are; so are the estate's search (.ymhs*) and newsletter (.ymel*). ── */
@media (pointer: coarse) {
  .top-card header a { display: inline-block; min-width: 44px; padding-block: 13px; margin-block: -13px; }
  .st-foot a { padding-block: 14px; margin-block: -14px; }        /* v1's 13 px left 43 px */
  a.tl-skip, .tl-menu li > a { min-height: 44px; }
  :where(body:not(.single-post)) .comment-form .form-submit .submit { min-height: 44px; }   /* v4: off single posts (the owner's earners rule: it moved a post 9 px) */
  .tl-menu li > a { display: inline-flex; align-items: center; }
  .tl-pages .page-numbers { min-width: 44px; }
  .tl-path a, .footer-link-wrapper a, .footer-text a, main > .page > p.path > a { display: inline-block; min-width: 44px; padding-block: 13px; margin-block: -13px; }
  .wp-block-categories-list li > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .ym-policy-links a { display: inline-block; min-width: 44px; padding-block: 14px; margin-block: -14px; }
}
@media (horizontal-viewport-segments: 2) {
  /* grids and lists: one column on each page */
  .page > section.sec > ul.accounts, main > .page > ul.accounts, .page > section.part > ul.cards, .tl-column > ul.tl-grid, main > .page > ol.ledger
    { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--fold-gap); }
  /* two-part blocks: the words on the left page, the list / summary on the right */
  .page > section.sec > .rates, main > section.lx > .page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--fold-gap); }
  /* single text blocks, forms and openings: the left page */
  .page > section.sec > .sec-h, main > .page > section.opening, main > .page > p.path, main > .page > section.part > :is(p, h2), main > .page > nav.pager,
    .tl-main .page > header.tl-head, .tl-body > .tl-column, .tl-rail :is(.ym-latest-posts-widget, .widget_block), .foot .page > p.small-print
    { max-width: var(--fold-page); margin-left: 0; margin-right: auto; }
  footer.foot > p.ym-policy-links { max-width: var(--fold-page); margin-left: max(16px, env(safe-area-inset-left)); margin-right: auto; }
  /* the masthead: its search takes a row of its own on the RIGHT page (its outer box = the full row, so it always wraps; a capped
     flex-basis alone did not), and "List yours" goes to the right end of the first row */
  .mast > .page { flex-wrap: wrap; }
  .mast > .page > form.lookup { order: 9; flex: 0 0 calc(var(--fold-page) - 20px); max-width: none; margin-left: calc(100% - var(--fold-page) + 20px); }   /* 20 px: the WordPress mast pulls its input 16 px left */
  /* a list's filter bar wraps on the left page */
  main > .page > #tfb-sift { max-width: var(--fold-page); margin-left: 0; margin-right: auto; flex-wrap: wrap; }
  .mast > .page > a.list-yours { margin-left: auto; }
  /* the home's and a topic's top cards: one card on each page */
  .page .tops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--fold-gap); }
  /* a list's reading section, the plans page's fine print, the footer's legal links: the left page */
  main > .page > section.part.read, main > .page > p, .foot .page > nav.legal { max-width: var(--fold-page); margin-left: 0; margin-right: auto; }
  /* the estate's network box carries its size and centring in a style attribute */
  aside.ym-net { max-width: var(--fold-page) !important; margin-left: max(16px, env(safe-area-inset-left)) !important; margin-right: auto !important; }
}

/* ── v3 (28-Oct-2026 night; helper 34 for lead 68): the finer book-posture check found an author page's crumb trail across the fold
   (192→332 at 626); it keeps to the left half now. ── */
@media (horizontal-viewport-segments: 2) {
  main#main nav.tl-path { max-width: var(--fold-page); }
}

/* ── v4 (29-Oct-2026; helper 34, from lead 68's CLS survey #1125): the home shifted when the web fonts swapped in (CLS 0.0855 at
   1024 touch, 0 with the fonts blocked). Metric-matched fallback faces (bin/font-fb.mjs on 4 page types, app + WordPress: size-adjust
   and ascent/descent overrides measured against Arial, each limited to its web font's own unicode-range) go right after each web font
   in the site's font variables, so text keeps its place when the font arrives. Nothing changes once the fonts are in. ── */
/* IBM Plex Sans 400 100% normal: 45194 chars, mostly at 12 px */
@font-face { font-family: "IBM Plex Sans fb"; font-weight: 400; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial"), local("ArialMT"); size-adjust: 99.38%; ascent-override: 100.62%; descent-override: 25.16%; line-gap-override: 0%; }
/* IBM Plex Sans 600 100% normal: 3649 chars, mostly at 15 px */
@font-face { font-family: "IBM Plex Sans fb"; font-weight: 600; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 96.88%; ascent-override: 103.22%; descent-override: 27.53%; line-gap-override: 0%; }
/* Instrument Serif 400 100% normal: 2302 chars, mostly at 22 px */
@font-face { font-family: "Instrument Serif fb"; font-weight: 400; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial"), local("ArialMT"); size-adjust: 74.09%; ascent-override: 134.96%; descent-override: 42.94%; line-gap-override: 0%; }
/* IBM Plex Mono 500 100% normal: 1380 chars, mostly at 12 px */
@font-face { font-family: "IBM Plex Mono fb"; font-weight: 500; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial"), local("ArialMT"); size-adjust: 123.89%; ascent-override: 80.72%; descent-override: 20.18%; line-gap-override: 0%; }
/* IBM Plex Sans 700 100% normal: 622 chars, mostly at 12 px */
@font-face { font-family: "IBM Plex Sans fb"; font-weight: 700; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 96.88%; ascent-override: 103.22%; descent-override: 25.81%; line-gap-override: 0%; }
/* IBM Plex Sans 800 100% normal: 519 chars, mostly at 14 px */
@font-face { font-family: "IBM Plex Sans fb"; font-weight: 800; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 96.88%; ascent-override: 103.22%; descent-override: 29.49%; line-gap-override: 0%; }
/* IBM Plex Mono 400 100% normal: 384 chars, mostly at 12 px */
@font-face { font-family: "IBM Plex Mono fb"; font-weight: 400; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial"), local("ArialMT"); size-adjust: 123.89%; ascent-override: 80.72%; descent-override: 20.18%; line-gap-override: 0%; }
/* Instrument Serif 700 100% normal: 220 chars, mostly at 16 px */
@font-face { font-family: "Instrument Serif fb"; font-weight: 700; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 70.06%; ascent-override: 142.73%; descent-override: 44.60%; line-gap-override: 0%; }
/* IBM Plex Mono 600 100% normal: 47 chars, mostly at 9 px */
@font-face { font-family: "IBM Plex Mono fb"; font-weight: 600; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 117.15%; ascent-override: 85.36%; descent-override: 18.97%; line-gap-override: 0%; }
/* Instrument Serif 800 100% normal: 32 chars, mostly at 22 px */
@font-face { font-family: "Instrument Serif fb"; font-weight: 800; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 70.06%; ascent-override: 142.73%; descent-override: 45.41%; line-gap-override: 0%; }
/* IBM Plex Sans 900 100% normal: 10 chars, mostly at 10 px */
@font-face { font-family: "IBM Plex Sans fb"; font-weight: 900; font-stretch: 100%; font-style: normal; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 96.88%; ascent-override: 103.22%; descent-override: 30.97%; line-gap-override: 0%; }
/* Instrument Serif 400 100% italic: 7 chars, mostly at 70 px */
@font-face { font-family: "Instrument Serif fb"; font-weight: 400; font-stretch: 100%; font-style: italic; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; src: local("Arial"), local("ArialMT"); size-adjust: 77.04%; ascent-override: 127.95%; descent-override: 40.79%; line-gap-override: 0%; }
:root { --serif: "Instrument Serif", "Instrument Serif fb", ui-serif, Georgia, serif; }
:root { --sans: "IBM Plex Sans", "IBM Plex Sans fb", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
:root { --mono: "IBM Plex Mono", "IBM Plex Mono fb", ui-monospace, "SF Mono", Menlo, monospace; }
