/* The filters of Home (23 October 2026; views/feed-filters.js draws them, index.html holds the markup). Under a one-line
   greeting (the owner, the same day: the filters must take the least room and stay clean): the toolbar with the order and
   Filters; the row Filters opens, 28 px pills (Specialty with the gear of Edit interests on its side, Condition, Topic,
   "Related" as a small switch) with the format and More filters as quiet text at the end, sliding sideways on a phone; then
   the line that says what the feed shows (.fc-scope, 28 October 2026; its base .fc-tuned is in views/feed.css, the card's
   tags too). The two tabs of Home are gone since 28 October. Tokens only (family.css), so light and dark follow the theme. */

/* the greeting is one line */
[data-viewpanel="feed"] > header { align-items: center; margin-bottom: 6px; }
[data-viewpanel="feed"] > header .t-h1 { font-size: 22px; letter-spacing: -.012em; }
#feedMode { padding-bottom: 4px; }

.ff { margin: 0 0 8px; }
.ff-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ff-group { display: inline-flex; flex: none; align-items: stretch; }
.ff-pick { position: relative; max-width: 100%; }
.ff-btn { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; height: 28px; padding: 0 8px 0 9px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--frost-strong); box-shadow: var(--frost-rim); font-size: 12.5px; font-weight: 500; line-height: 1; color: var(--oryn-text-2); cursor: pointer; transition: background-color .16s var(--ease-out), border-color .16s var(--ease-out), color .16s var(--ease-out); }
.ff-btn > i:first-child { font-size: 14px; color: var(--color-brand); }
.ff-btn__v { max-width: 150px; overflow: hidden; font-weight: 600; color: var(--color-foreground); text-overflow: ellipsis; white-space: nowrap; }
.ff-btn__c { font-size: 11px; color: var(--color-muted-foreground); transition: rotate .2s var(--ease-out); }
.ff-btn:hover { border-color: var(--oryn-border-hover); color: var(--color-foreground); }
.ff-pick.is-open .ff-btn { border-color: color-mix(in srgb, var(--color-brand) 45%, transparent); background: var(--brand-soft); }
.ff-pick.is-open .ff-btn__c { rotate: 180deg; }
.ff-group .ff-btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
/* the gear of Edit interests, on the specialty's side */
.ff-gear { display: grid; flex: none; width: 30px; height: 28px; place-items: center; border: 1px solid var(--frost-line); border-left: 0; border-radius: 0 999px 999px 0; background: var(--frost-strong); box-shadow: var(--frost-rim); font-size: 14px; color: var(--color-brand-ink); cursor: pointer; transition: background-color .16s var(--ease-out); }
.ff-gear:hover { background: var(--brand-soft); }
.ff-btn:focus-visible, .ff-gear:focus-visible, .ff-switch:focus-visible, .ff-text:focus-visible, .ff-opt:focus-visible, .feed-format button:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }

/* the menu under its pill */
.ff-menu { position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; min-width: 264px; max-width: min(380px, calc(100vw - 32px)); max-height: 380px; overflow-y: auto; padding: 6px; border: 1px solid var(--frost-line); border-radius: 16px; background: var(--color-card); box-shadow: var(--frost-rim), var(--frost-shadow-up); overscroll-behavior: contain; }
.ff-menu[hidden] { display: none; }
.ff-opt { display: flex; width: 100%; align-items: center; gap: 9px; min-height: 38px; padding: 5px 10px; border-radius: 10px; text-align: left; font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--color-foreground); cursor: pointer; transition: background-color .14s var(--ease-out); }
.ff-opt:hover { background: var(--oryn-surface-hover); }
.ff-opt > i { flex: none; font-size: 15px; color: var(--color-muted-foreground); }
.ff-opt.is-on { color: var(--color-brand-ink); font-weight: 600; }
.ff-opt.is-on > i { color: var(--color-brand); }
.ff-opt__w { flex: 1; min-width: 0; }
.ff-opt__you { display: block; font-size: 11.5px; font-weight: 500; color: var(--color-muted-foreground); }
.ff-opt__n { flex: none; font-size: 12.5px; font-weight: 500; color: var(--color-muted-foreground); }
.ff-menu__h, .ff-menu__note { padding: 8px 10px 6px; font-size: 12.5px; line-height: 1.4; color: var(--color-muted-foreground); }
.ff-menu__note { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--color-border); }

/* "Related": the small switch for the adjacent tier */
.ff-switch { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 28px; padding: 0 9px 0 6px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--frost-strong); box-shadow: var(--frost-rim); font-size: 12.5px; font-weight: 500; line-height: 1; color: var(--color-muted-foreground); cursor: pointer; transition: color .16s var(--ease-out), border-color .16s var(--ease-out); }
.ff-switch[hidden] { display: none; }
.ff-switch:hover { border-color: var(--oryn-border-hover); color: var(--color-foreground); }
.ff-switch__sw { position: relative; flex: none; width: 24px; height: 14px; border-radius: 999px; background: var(--frost-line); transition: background-color .18s var(--ease-out); }
.ff-switch__sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-card); box-shadow: var(--frost-rim); transition: transform .2s var(--ease-out); }
.ff-switch[aria-pressed="true"] { color: var(--color-brand-ink); border-color: color-mix(in srgb, var(--color-brand) 35%, transparent); }
.ff-switch[aria-pressed="true"] .ff-switch__sw { background: var(--color-brand); }
.ff-switch[aria-pressed="true"] .ff-switch__sw::after { transform: translateX(10px); }

/* the end of the row: the order and More filters as quiet text */
.ff-row__end { display: inline-flex; flex: none; align-items: center; gap: 2px; margin-left: auto; }
/* the ids carry the page's own 44 px rule for these two buttons (index.html): here they are 28 px text, and a touch screen gets its 44 px from the unseen area below */
.ff-text, #sortBtn.ff-text, #feedFilterBtn.ff-text { display: inline-flex; align-items: center; gap: 5px; height: 28px; min-height: 0; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; box-shadow: none; font-size: 12.5px; font-weight: 500; line-height: 1; color: var(--color-muted-foreground); white-space: nowrap; cursor: pointer; transition: background-color .16s var(--ease-out), color .16s var(--ease-out); }
.ff-text i { font-size: 12px; }
.ff-text:hover, .ff-text[aria-expanded="true"], #sortBtn.ff-text:hover, #feedFilterBtn.ff-text:hover { background: var(--oryn-surface-hover); color: var(--color-foreground); box-shadow: none; }

/* a patient has no specialty: the pills that need one are not drawn */
.ff--patient .ff-group, .ff--patient .ff-pick[data-ff="cond"], .ff--patient .ff-switch { display: none; }

/* the toolbar: the order and Filters at the end of the row */
.feed-toolbar { padding: 3px; }
.feed-format { display: inline-flex; flex: none; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--frost-well); }
.feed-format button { display: grid; width: 34px; height: 26px; place-items: center; border-radius: 999px; color: var(--color-muted-foreground); cursor: pointer; transition: background-color .16s var(--ease-out), color .16s var(--ease-out); }
.feed-format button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.feed-format button i { font-size: 15px; }
.feed-format button:hover { color: var(--color-foreground); }
.feed-format button[aria-pressed="true"] { background: var(--color-card); color: var(--color-brand); box-shadow: var(--frost-rim); }
@media (min-width: 1024px) { .feed-toolbar { margin-bottom: 10px; } .feed-actions { padding-left: 6px; } }

/* the card that asks an account without a specialty to choose one */
.ff-ask { display: grid; justify-items: center; gap: 10px; padding: 36px 24px 30px; border: 1px solid var(--frost-line); border-radius: 26px; background: var(--frost); box-shadow: var(--frost-rim), var(--frost-shadow); text-align: center; }
.ff-ask__ic { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 18px; background: var(--brand-soft); color: var(--color-brand); font-size: 26px; }
.ff-ask__h { margin: 4px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.ff-ask__p { max-width: 46ch; margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--color-muted-foreground); text-wrap: pretty; }
.ff-ask__search { position: relative; display: flex; width: min(100%, 360px); align-items: center; margin-top: 6px; }
.ff-ask__search i { position: absolute; left: 14px; font-size: 16px; color: var(--color-muted-foreground); pointer-events: none; }
.ff-ask__search input { width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--color-card); font-size: 14px; color: var(--color-foreground); }
.ff-ask__search input:focus { outline: none; box-shadow: 0 0 0 4px var(--brand-soft); border-color: color-mix(in srgb, var(--color-brand) 45%, transparent); }
.ff-ask__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 680px; margin-top: 6px; }
.ff-ask__chips .chiptog { min-height: 40px; gap: 6px; }
.ff-ask__chips .chiptog i { font-size: 13px; color: var(--color-muted-foreground); }
.ff-ask__none { width: 100%; font-size: 13.5px; color: var(--color-muted-foreground); }

/* phones and narrow windows: row 1 slides sideways, one line; the menus rise from the foot */
@media (max-width: 1023.98px) {
  [data-viewpanel="feed"] > header { margin-bottom: 8px; }
  .ff-row { flex-wrap: nowrap; overflow-x: auto; padding: 2px 16px 4px 2px; margin: -2px -16px -4px -2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .ff-row::-webkit-scrollbar { display: none; }
  .ff-row > * { flex: none; }
  .ff-row__end { margin-left: 4px; padding-right: 12px; }
  .ff-btn__v { max-width: 132px; }
  .ff-menu, .ff-menu--sheet { position: fixed; z-index: 90; top: auto; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; max-width: none; max-height: min(60vh, 420px); }
  .ff-ask { padding: 28px 18px 24px; border-radius: 22px; }
}
@media (pointer: coarse) {
  .ff-btn, .ff-gear, .ff-switch, .ff-text, .feed-format button { position: relative; }
  .ff-btn::after, .ff-gear::after, .ff-switch::after, .ff-text::after, .feed-format button::after { content: ""; position: absolute; inset: -8px 0; }
  .ff-opt { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .ff-btn__c, .ff-switch__sw, .ff-switch__sw::after { transition: none; } }

/* ── the reading pass (27 October 2026): the two rows over the feed as quiet words ──
   The filters keep their menus and their switch but lose their frames; the format icons sit on nothing until one is
   pressed. The rows take less of the eye and the first card comes sooner. */
.ff-btn, .ff-gear, .ff-switch { border-color: transparent; background: transparent; }
.ff-group .ff-btn, .ff-gear { border-radius: 999px; }
.ff-btn:hover, .ff-gear:hover, .ff-switch:hover { border-color: transparent; background: var(--oryn-surface-hover); }
.ff-pick.is-open .ff-btn { border-color: transparent; }
.ff-btn > i:first-child { color: var(--color-muted-foreground); }
.ff-btn__v { font-weight: 500; }
.feed-format { padding: 0; background: transparent; }
.feed-format button[aria-pressed="true"] { background: var(--brand-soft); color: var(--color-brand-ink); box-shadow: none; }

/* the folded row sits under the toolbar; the format icons live at its end, before More filters */
.ff { margin: 2px 0 10px; }
.ff[hidden] { display: none; }
.ff-row__end .feed-format { margin-right: 4px; }
#feedMoreBtn[aria-expanded="true"] { background: var(--oryn-surface-hover); color: var(--color-foreground); }

/* ── 28 October 2026: the three filters each start at All, and one line says what the feed shows ── */
/* the first option of a menu, All specialties, All conditions or All topics, set apart from the choices under it */
.ff-opt--all { position: relative; margin-bottom: 5px; }
.ff-opt--all::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -3px; height: 1px; background: var(--color-border); }
/* the toolbar holds the order and Filters only: at rest they are quiet words at the end of the row, on nothing; the frame
   comes back once the page moves under it (stuck under the top bar, or risen as the one bar), so it is there when it has a job */
#feedToolbar .feed-actions { border-left: 0; padding-left: 0; }
@media (min-width: 1024px) {
  html:not(.is-scrolled) #feedToolbar { border-color: transparent; background: transparent; box-shadow: none; }
  #feedToolbar { margin-bottom: 4px; transition: transform .42s var(--ease-out), margin .42s var(--ease-out), box-shadow .3s var(--ease-out), padding .3s var(--ease-out), background-color .2s var(--ease-out), border-color .2s var(--ease-out); }
}
/* the line: one short sentence in muted text, then up to three text buttons in the brand colour; on a phone the buttons wrap
   under the sentence, never beside half a word */
.fc-scope { gap: 3px 14px; margin: 0 4px 14px; font-size: 12.5px; line-height: 1.45; }
.fc-scope .fc-tuned__words { display: inline; text-wrap: pretty; }
.fc-tuned__acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px 14px; }
.fc-tuned__act { font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--color-brand-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-brand) 35%, transparent); text-underline-offset: 3px; white-space: nowrap; cursor: pointer; }
.fc-tuned__act:hover { text-decoration-color: currentColor; }
.fc-tuned__act:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; border-radius: 4px; }
@media (pointer: coarse) { .fc-tuned__act { position: relative; } .fc-tuned__act::after { content: ""; position: absolute; inset: -13px -4px; } }
@media (prefers-reduced-motion: reduce) { #feedToolbar { transition: none; } }

/* The shortcuts (20 November 2026, views/feed-filters.js paintQuick): All and the four kinds the Board named, as the toolbar's
   second line, so the day, Filters and these read as one control. Quiet outlined pills with an icon and a word; the one in
   force takes the ink outline Filters takes when it is in use (never a filled slab). On a phone the row slides sideways and
   fades at its edge instead of wrapping. */
html .feed-toolbar { flex-wrap: wrap; }
html .feed-toolbar > .ff-quick { order: 10; flex: 1 1 100%; min-width: 0; }
.ff-quick { display: flex; align-items: center; gap: 8px; margin-top: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ff-quick::-webkit-scrollbar { display: none; }
.ff-quick__b { display: inline-flex; flex: none; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 12px; border: 1px solid var(--cl-line-2, var(--color-border)); border-radius: 999px; background: var(--cl-surface, var(--color-card)); font-size: 14px; line-height: 1; color: var(--cl-ink-2, var(--oryn-text-2)); white-space: nowrap; cursor: pointer; transition: border-color .18s var(--cl-out, ease), color .18s var(--cl-out, ease), background-color .18s var(--cl-out, ease); }
.ff-quick__b > i { font-size: 15px; color: var(--cl-ink-4, var(--color-muted-foreground)); transition: color .18s var(--cl-out, ease); }
.ff-quick__b:hover { border-color: var(--cl-line-3, var(--oryn-border-hover)); color: var(--cl-ink, var(--color-foreground)); }
.ff-quick__b[aria-pressed="true"] { border-color: var(--cl-ink, var(--color-foreground)); background: color-mix(in srgb, var(--cl-ink) 4%, var(--cl-surface)); color: var(--cl-ink, var(--color-foreground)); }
.ff-quick__b[aria-pressed="true"] > i { color: var(--cl-ink, var(--color-foreground)); }
.ff-quick__b:focus-visible { outline: 2px solid var(--cl-lilac, var(--color-ring)); outline-offset: 2px; }
@media (max-width: 767.98px) {
  .ff-quick { margin-right: -16px; padding-right: 16px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .ff-quick__b { height: 34px; padding: 0 12px 0 10px; font-size: 13.5px; }
}
