/* =============================================================================================
   Chrome and Settings: the shell's floating glass chrome (MainLayout's top discs and tab pill), the
   menu (phone drawer and desktop sidebar, AppNavMenu) and the Settings
   screens (home, Devices, Edit profile, Blocked members, the alert and running-stats sheets).
   Mocks: Sidebar_Mobile, Sidebar_MobileAdmin, Sidebar_Desktop, Settings_Home, Settings_Devices.
   Plain CSS, linked after css/activation.css by Supwell/wwwroot/index.html (app) and
   Supwell.Web/Components/App.razor (web); Tailwind doesn't compile it, so no app.min.css rebuild.
   Unlayered on purpose: these are component classes, and an unlayered class beats MAUI's
   css/mobile.css h1-h3 sizes and the old global "nav a.active" yellow.
   Small muted copy (10-13px) uses --sw-ink-2-aa, the darkened muted that passes AA on white and
   on the cream ground (Phil 10/3: everywhere but the feed and marketplace).
   ============================================================================================= */

/* 0. SHELL CHROME (MainLayout) ------------------------------------------------------------------ */
/* No bars (Phil, 2026-10-12: "dump the top and bottom navs in favor of this new glass like theme",
   as No Cover Charge and JHuBlades have it). On phones and tablets everything floats over the page,
   which scrolls under it: the top row is the member's avatar (opens the menu; a detail page's back
   disc in its place), the centred wordmark, search and the bell (a detail page's kebab before it);
   the app's bottom is one tab pill with the yellow
   create button and its fan-out. The rooms they take are --sw-top-room / --sw-tab-room (sw/sw.css),
   which every layer pads by (app.css, APP SHELL), so no page starts or ends under them.
   From 1024px on the web the top is one glass bar beside the desktop sidebar (title, Create, search,
   bell). The app keeps its floating discs and tab pill at every width (3.3.3, iPad): an iPad Pro 13 is
   1032 wide, and the desktop shell there had no Create, search or bell on tab pages and put the
   sidebar's wordmark under the clock. Its wide screens only centre the content ("0a. APP TABLETS" below). */

/* The glass, one recipe: a warm cream frost with an edge highlight and a soft shadow. The pill
   frosts a pseudo-element so the pill never becomes the containing block of anything inside it.
   The page controls that float under the chrome (.liquid-glass in app.css; .sw-glass-btn and
   .sw-pill in sw/sw.css: the feed's sort and filter, the market's pills, back and kebab discs) use
   the same tokens, so two different glasses never stack; they share the fallback below. */
.sw-chrome-btn,
.sw-chrome-logo,
.sw-chrome-slot,
.sw-tabbar::before {
  border: 1px solid var(--sw-glass-edge);
  background: var(--sw-glass);
  -webkit-backdrop-filter: var(--sw-glass-fx); backdrop-filter: var(--sw-glass-fx);
  box-shadow: var(--sw-shadow-glass), inset 0 1px 0 var(--sw-glass-sheen);
}
/* No blur (older Android WebViews) or "Reduce transparency": solid cream, same edge and shadow. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sw-chrome-btn, .sw-chrome-logo, .sw-chrome-slot, .sw-tabbar::before,
  .liquid-glass:not(.sw-glass-on):not(:active), .sw-glass-btn:not(.is-active):not([aria-expanded="true"]), .sw-pill {
    background: var(--sw-glass-solid);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .sw-chrome-btn, .sw-chrome-logo, .sw-chrome-slot, .sw-tabbar::before,
  .liquid-glass:not(.sw-glass-on):not(:active), .sw-glass-btn:not(.is-active):not([aria-expanded="true"]), .sw-pill {
    background: var(--sw-glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* Top. The header spans the width but only its controls take taps, so the page under the gaps
   still scrolls and taps. One above the pill (--sw-z-nav + 1): a page's own sticky row (z 40, later
   in the DOM) must never paint over it. */
.sw-chrome-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--sw-z-nav) + 1);
  padding-top: var(--sw-safe-t); color: var(--sw-olive); pointer-events: none;
}
/* The scroll edge: the ground colour behind the status bar, so the clock stays legible over a photo,
   easing out across the whole disc row (a 24px ramp read as a hard cream band over a dark photo).
   The discs carry their own glass. */
.sw-chrome-top::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--sw-safe-t) + var(--sw-topbar-h)); z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgb(239 234 230 / .94) 0, rgb(239 234 230 / .85) var(--sw-safe-t),
    rgb(239 234 230 / .45) calc(var(--sw-safe-t) + 24px), rgb(239 234 230 / .12) calc(var(--sw-safe-t) + 44px),
    rgb(239 234 230 / 0) 100%);
}
.sw-chrome-top__row {
  position: relative; display: flex; align-items: center; gap: 8px; height: var(--sw-topbar-h);
  padding: 0 calc(12px + var(--sw-safe-r)) 0 calc(12px + var(--sw-safe-l));
}
@media (min-width: 640px) { .sw-chrome-top__row { padding: 0 calc(16px + var(--sw-safe-r)) 0 calc(16px + var(--sw-safe-l)); } }
.sw-chrome-top__lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sw-chrome-top__trail { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sw-chrome-top__lead > *, .sw-chrome-top__trail > *, .sw-chrome-logo { pointer-events: auto; }
.sw-chrome-top__title { display: none; }
.sw-chrome-create { display: none; }

/* A round glass button: 44px, olive ink (7:1 over a black photo, 10:1 over the ground). */
.sw-chrome-btn {
  position: relative; flex: none; display: inline-grid; place-items: center; box-sizing: border-box;
  width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 50%;
  color: var(--sw-olive); cursor: pointer; text-decoration: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
  transition: transform var(--sw-dur-fast) ease, background-color var(--sw-dur) ease;
}
.sw-chrome-btn:hover, .sw-chrome-btn:visited { color: var(--sw-olive); }
.sw-chrome-btn:active { transform: scale(.92); }
.sw-chrome-btn:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
.sw-chrome-btn__icon { display: block; }

/* The member: their photo inside a 4px glass ring, else their initial on olive, else a person. */
.sw-chrome-me { overflow: hidden; }
.sw-chrome-me__img { display: block; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--sw-line); }
.sw-chrome-me__initial {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sw-olive); color: var(--sw-cream); font: 700 15px/1 var(--sw-font-ui);
}

/* The wordmark, centred on the screen in its own glass capsule (between the side insets, so on the
   iPhone Duo it centres on the content, not under the status strip; 0 everywhere else). */
.sw-chrome-logo {
  position: absolute; top: calc((var(--sw-topbar-h) - 44px) / 2); left: var(--sw-safe-l); right: var(--sw-safe-r); width: max-content; margin-inline: auto;
  display: flex; align-items: center; box-sizing: border-box; height: 44px; padding: 0 14px; border-radius: var(--sw-r-pill);
  -webkit-tap-highlight-color: transparent;
}
.sw-chrome-logo img { display: block; height: 30px; width: auto; }
.sw-chrome-logo:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }

/* A page's own top actions (NavbarActions: the Forums filter, admin imports) sit in the desktop web
   bar only. Below 1024px they would crowd the centred wordmark, which always stays (Phil: "keep the
   logo at the top"), so there the pages draw them in their own row (.sw-page-actions). */
.sw-chrome-slot { display: none; align-items: center; gap: 2px; box-sizing: border-box; min-height: 44px; padding: 0 2px; border-radius: var(--sw-r-pill); color: var(--sw-olive); }

/* Floating-back detail pages (post, run, listing, profile, shoe, plan): one row, as in JHuBlades.
   The page's back disc takes the avatar's place (lead) and its kebab sits before the bell (trail),
   sized as a chrome disc; on phones search gives way so the trail clears the wordmark. */
.sw-chrome-top__trail .liquid-glass,
.sw-chrome-top__trail .sw-glass-btn { width: 44px !important; height: 44px !important; }
@media (max-width: 1023.98px) {
  .sw-chrome-top--detail .sw-chrome-search { display: none; }
}

/* A page's action row under the chrome (StandardFilters below 1024px): sticky, right-aligned glass
   discs; only the discs take taps. The desktop web shows these actions in its bar instead. */
.sw-page-actions {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 6px 0 8px; pointer-events: none;
}
.sw-page-actions > * { pointer-events: auto; }
.sw-page-actions .sw-chrome-btn.is-on { background: linear-gradient(var(--sw-olive-wash), var(--sw-olive-wash)), var(--sw-glass-solid); }
@media (min-width: 1024px) {
  body:has(.sw-chrome-top--web) .sw-page-actions { display: none; }
}

/* The bell (NotificationBell) is a disc too; its unread dot sits on the icon's shoulder. */
.sw-bell { position: relative; display: inline-flex; }
.sw-chrome-btn .sw-nb__bell-dot { top: 10px; right: 10px; box-shadow: 0 0 0 2px var(--sw-glass-solid); }

/* Desktop web: one glass bar beside the sidebar, with the page title and the Create menu. The bar
   frosts its ::before (in place of the phone's scroll-edge fade), never the header itself, so the
   Create menu's full-screen tap catcher stays fixed to the screen. Web only (--web): the app's row
   (--app) is the same floating row at every width, so nothing here touches it. */
@media (min-width: 1024px) {
  .sw-chrome-top--web { left: 18rem; pointer-events: auto; border-bottom: 1px solid var(--sw-line); }
  .sw-chrome-top--web::before {
    height: auto; inset: 0; background: var(--sw-glass);
    -webkit-backdrop-filter: var(--sw-glass-fx); backdrop-filter: var(--sw-glass-fx);
  }
  .sw-chrome-top--web .sw-chrome-top__row { gap: 16px; padding: 0 32px; }
  .sw-chrome-top--web .sw-chrome-top__trail { gap: 12px; }
  .sw-chrome-top--web .sw-chrome-me,
  .sw-chrome-top--web .sw-chrome-logo { display: none; }
  .sw-chrome-top--web .sw-chrome-top__title,
  .sw-chrome-top--web .sw-chrome-create { display: block; }
  .sw-chrome-top--web .sw-chrome-slot { display: flex; }
  .sw-chrome-top--web .sw-chrome-slot:empty { display: none; }
  .sw-chrome-top--web .sw-chrome-btn,
  .sw-chrome-top--web .sw-chrome-slot,
  .sw-chrome-top--web .sw-chrome-top__trail .liquid-glass,
  .sw-chrome-top--web .sw-chrome-top__trail .sw-glass-btn {
    border-color: transparent; background: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .sw-chrome-top--web .sw-chrome-btn:hover { background: var(--sw-olive-wash); }
}
@media (min-width: 1024px) and (prefers-reduced-transparency: reduce) {
  .sw-chrome-top--web::before { background: var(--sw-glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (min-width: 1024px) { .sw-chrome-top--web::before { background: var(--sw-glass-solid); } }
}

/* Bottom (the app): the tab pill. 14px from the screen edges plus the side insets, --sw-tab-bottom
   above the bottom edge (clear of the home indicator), at most 440px wide, at every width (an iPad
   too, where it centres under the content column). Slides away while the software keyboard is up
   (html.kbd-open, from the native bridge) and while a comment composer has it hidden
   (.sw-tabbar--hidden, js/commentBar.js). */
.sw-tabbar {
  position: fixed; z-index: var(--sw-z-nav);
  left: calc(14px + var(--sw-safe-l)); right: calc(14px + var(--sw-safe-r)); bottom: var(--sw-tab-bottom);
  max-width: 440px; height: var(--sw-tabbar-h); margin-inline: auto; padding: 6px; box-sizing: border-box;
  border-radius: var(--sw-r-pill);
  transition: transform var(--sw-dur) var(--sw-glide), opacity var(--sw-dur) ease;
}
.sw-tabbar::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; }
.sw-tabbar--hidden,
html.kbd-open .sw-tabbar { transform: translateY(calc(100% + var(--sw-tab-bottom) + 24px)); opacity: 0; pointer-events: none; }

/* Five cells; the puck (olive wash, olive hairline) slides under the active one (--i) and fades out
   on a page no tab owns ([data-none]). */
.sw-tabbar__row { --i: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 100%; isolation: isolate; }
.sw-tabbar__puck {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 20%; border-radius: var(--sw-r-pill);
  background: var(--sw-olive-wash); box-shadow: inset 0 0 0 1px var(--sw-olive-line);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform calc(320ms / var(--sw-tempo)) var(--sw-pop), opacity var(--sw-dur) ease;
}
.sw-tabbar__row[data-none] .sw-tabbar__puck { opacity: 0; }

/* A tab: 44px+ target, icon over an 11px label. Resting ink #4d4a3c (5.5:1 on the glass over black);
   the active tab is olive with a heavier stroke and a bold label, on the puck. */
.sw-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: var(--sw-r-pill);
  background: none; color: #4d4a3c; cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
  transition: color var(--sw-dur) ease;
}
.sw-tab.is-active { color: var(--sw-olive); }
@media (hover: hover) { .sw-tab:not(.is-active):not(.sw-tab--fab):hover { color: var(--sw-olive); } }
.sw-tab:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
.sw-tab__icon { display: block; transition: transform .1s ease; }
.sw-tab:active .sw-tab__icon { transform: scale(.9); }
.sw-tab__label { font: 500 11px/1.1 var(--sw-font-ui); letter-spacing: -.01em; white-space: nowrap; }
.sw-tab.is-active .sw-tab__label { font-weight: 700; }
.sw-tab__icon-wrap { position: relative; display: grid; place-items: center; }
.sw-tab__badge {
  position: absolute; top: -5px; left: calc(100% - 9px); box-sizing: border-box; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--sw-r-pill); background: #dc2626; color: #fff; font: 700 9px/16px var(--sw-font-ui); text-align: center;
  box-shadow: 0 0 0 2px var(--sw-glass-solid);
}
.sw-tab--fab { cursor: default; }

/* The create button: the yellow disc in the middle cell. Open, it turns ink and its plus turns to an x. */
.sw-tabbar__fab {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: #fcf454; color: #1c1b1f; cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 14px rgba(252, 244, 84, .45), 0 2px 6px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: background-color 350ms cubic-bezier(.34, 1.56, .64, 1), transform 350ms cubic-bezier(.34, 1.56, .64, 1),
              color 350ms ease, box-shadow 350ms ease;
}
@media (hover: hover) { .sw-tabbar__fab:not(.is-open):hover { background: #ebd608; } }
.sw-tabbar__fab:active { transform: scale(.95); }
.sw-tabbar__fab:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
.sw-tabbar__fab.is-open { background: #1c1b1f; color: #fff; transform: rotate(45deg); box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .15); }

/* The fan-out: its items sit on an arc above the pill's top centre (MainLayout sets each one's
   offset); the scrim behind them darkens the lower screen and closes the menu on a tap. */
.sw-fan { position: absolute; bottom: 100%; left: 50%; z-index: 1; width: 0; height: 0; }
.sw-fan-scrim {
  position: fixed; inset: 0; z-index: calc(var(--sw-z-nav) - 1);
  background: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .45) 35%, rgba(0, 0, 0, .2) 60%, transparent 80%);
}
/* Each label is its own ink chip, so it reads over whatever card text the arc lands on. */
.fab-label {
  margin-top: 3px; padding: 2px 8px; border-radius: var(--sw-r-pill);
  background: rgba(28, 27, 31, .82); color: #fff; line-height: 16px; text-shadow: none;
}

/* 0a. APP TABLETS (3.3.3: the app on an iPad; an Android tablet alike). One rule for "tablet" across the
   shared CSS: the app host (html.sw-app, set by Supwell/wwwroot/index.html only, so the web never
   matches) with a viewport at least 700 wide AND 700 tall. Every iPad in portrait qualifies (mini 744
   x 1133, Air 11 820, Pro 13 1032), and so does a resizable iPadOS 27 window down to 700 x 700; no
   iPhone does (440 wide at most, portrait-locked), nor the iPhone Duo's inner display either way
   (669 x 951 upright, 951 x 669 sideways), so phones and the Duo keep exactly what they had. The
   Tailwind side is the tablet: variant (app.css). The shell is the phone's at every width (section 0);
   tablets only centre and size what would otherwise stretch.
   On a floating-back detail page phones give search up so the trail clears the wordmark; a tablet's
   row has the room, so search stays as on every tab page. */
@media (min-width: 700px) and (min-height: 700px) {
  html.sw-app .sw-chrome-top--detail .sw-chrome-search { display: inline-grid; }
}

/* 0b. THE FOLD AND THE VERTICAL BAR (iPhone Duo) --------------------------------------------- */
/* sw-native.js swNative.fold (from the app's FoldBridge, iOS 27.1) sets these on <html>, only on the Duo:
   vbar while the system's bar strip runs down the right edge beside the status bar (folded, or open and
   held sideways), and fold-active with fold-v (a book: the fold runs top to bottom) or fold-h (a tent)
   while it is partly open, with --sw-fold-end-x / -y where the second pane starts. Every other device
   gets none of them, so nothing below applies there. The tokens are in sw/sw.css (html.vbar); the
   sheets, toasts and page controls follow in sw/sw.css and app.css ("the fold"). */

/* The vertical bar. The tab pill becomes a rail at the bottom of the strip, and the top row's discs
   (the avatar, then search and the bell, or a detail page's kebab) stack above it, so the clock, the
   camera and the status icons at the top of the strip keep their room. Each disc keeps its own glass.
   Never put a transform, filter or backdrop-filter on .sw-chrome-top itself: it would become the
   containing block of these fixed discs. */
html.vbar .sw-tabbar {
  left: auto; right: 4px; bottom: var(--sw-rail-b); width: var(--sw-rail-w); max-width: none; height: var(--sw-rail-tabs);
  margin: 0; padding: 6px 4px;
}
html.vbar .sw-tabbar__row { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(5, minmax(0, 1fr)); }
html.vbar .sw-tabbar__puck { top: 0; bottom: auto; left: 0; right: 0; width: auto; height: 20%; transform: translateY(calc(var(--i) * 100%)); }
html.vbar .sw-tab__label { font-size: 9.5px; letter-spacing: .02em; }
html.vbar .sw-tabbar__fab { width: 46px; height: 46px; }

/* Where the stack starts: just above the rail, or at the bottom of the strip on a page without it (a
   detail page, a thread). The avatar (tab pages) sits nearest the rail and the trail above it. */
html.vbar .sw-chrome-top { --sw-strip-base: calc(var(--sw-rail-b) + var(--sw-rail-tabs) + 10px); }
html.vbar body:not(:has(.sw-tabbar)) .sw-chrome-top { --sw-strip-base: var(--sw-rail-b); }
html.vbar .sw-chrome-top--app .sw-chrome-me {
  position: fixed; right: calc(4px + (var(--sw-rail-w) - 44px) / 2); bottom: var(--sw-strip-base);
}
html.vbar .sw-chrome-top--app .sw-chrome-top__trail {
  position: fixed; right: 4px; bottom: var(--sw-strip-base); width: var(--sw-rail-w); margin: 0;
  flex-direction: column; align-items: center; gap: 8px;
}
html.vbar .sw-chrome-top--app:has(.sw-chrome-me) .sw-chrome-top__trail { bottom: calc(var(--sw-strip-base) + 52px); }
html.vbar .sw-chrome-top--app :is(.sw-chrome-me, .sw-chrome-top__trail) {
  transition: translate var(--sw-dur) var(--sw-glide), opacity var(--sw-dur) ease;
}
/* An anchored menu from a strip disc (a listing's kebab, .sw-pop-menu) opens upward from the disc and to
   the left of the strip, 8px clear of it: below the disc is the bottom of the screen, around it the strip.
   The 44px disc is centred on the rail, 4px in from the strip's edge. */
html.vbar .sw-chrome-top--app .sw-chrome-top__trail .sw-pop-menu {
  top: auto; bottom: 0; left: auto; right: calc(100% + (var(--sw-rail-w) - 44px) / 2 + 12px); transform-origin: bottom right;
}
/* While the keyboard is up they step down off the screen, as the rail does. */
html.vbar.kbd-open .sw-chrome-top--app :is(.sw-chrome-me, .sw-chrome-top__trail) {
  translate: 0 calc(var(--sw-strip-base) + 100% + 76px); opacity: 0; pointer-events: none;
}

/* The create fan opens to the left of the rail's + cell: a gentle arc, top to bottom Event, Run, Post,
   Sell, Chat, each label to the left of its disc so no label lands on the next disc. MainLayout sets
   the phone arc inline, so these override it. */
html.vbar .sw-fan { top: 50%; bottom: auto; left: 0; }
html.vbar .sw-fan > .create-menu-item { flex-direction: row-reverse; gap: 8px; left: auto !important; transform-origin: right center; }
html.vbar .sw-fan > .create-menu-item .fab-label { margin-top: 0; }
html.vbar .sw-fan > :nth-child(1) { right: 40px !important; bottom: 98px !important; }   /* Event */
html.vbar .sw-fan > :nth-child(2) { right: 98px !important; bottom: 36px !important; }   /* Run */
html.vbar .sw-fan > :nth-child(3) { right: 114px !important; bottom: -26px !important; } /* Post */
html.vbar .sw-fan > :nth-child(4) { right: 98px !important; bottom: -88px !important; }  /* Sell */
html.vbar .sw-fan > :nth-child(5) { right: 40px !important; bottom: -150px !important; } /* Chat */
html.vbar .sw-fan > .create-menu-item { animation-name: sw-fan-in-side; }
html.vbar .sw-fan > .create-menu-item.closing { animation-name: sw-fan-out-side; }
html.vbar .sw-fan-scrim {
  background: linear-gradient(to left, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .45) 35%, rgba(0, 0, 0, .2) 60%, transparent 80%);
}
@keyframes sw-fan-in-side { 0% { opacity: 0; transform: scale(0) translateX(40px); } 100% { opacity: 1; transform: scale(1) translateX(0); } }
@keyframes sw-fan-out-side { 0% { opacity: 1; transform: scale(1) translateX(0); } 100% { opacity: 0; transform: scale(0) translateX(40px); } }

/* A book (partly open, held sideways): the wordmark centres in the first pane, and without the strip
   the pill moves into the second pane, keeping its width cap and centring there. */
html.fold-active.fold-v .sw-chrome-logo { right: calc(100vw - var(--sw-fold-x)); }
html.fold-active.fold-v:not(.vbar) .sw-tabbar { left: calc(var(--sw-fold-end-x) + 14px); }

/* Moving between panes is a move, not a jump: on a device that folds the pill glides when it folds or
   opens. On the rail it is placed, not moved. */
html.has-hinge .sw-tabbar {
  transition: transform var(--sw-dur) var(--sw-glide), opacity var(--sw-dur) ease, left var(--sw-dur) var(--sw-glide), right var(--sw-dur) var(--sw-glide);
}
html.has-hinge.vbar .sw-tabbar { transition: transform var(--sw-dur) var(--sw-glide), opacity var(--sw-dur) ease; }

/* The feed's "N new" pill and pull-to-refresh disc centre on the content between the side insets (the
   Duo's strip; 50% everywhere else), and in a book on the second pane. */
html :is(.sw-newpill, .sw-ptr) { left: calc(50% + (var(--sw-safe-l) - var(--sw-safe-r)) / 2); }
html.fold-active.fold-v :is(.sw-newpill, .sw-ptr) {
  left: calc(var(--sw-fold-end-x) + (100vw - var(--sw-fold-end-x) - var(--sw-safe-r)) / 2);
}

/* 0c. AUTO-HIDING BARS (features.navAutoHide, a staging trial; sw/sw-bars.js) ------------------- */
/* html[data-sw-bars] while the flag is on; html.sw-bars-hidden while the member reads down a page that
   opts in (<AutoHideBars />, the app's phone layout only: sw-bars.js has the rules). Flag off, neither is
   ever set and nothing below applies.
   What goes (Phil 11/5, after trying 3.3.6): the top row (logo, bell, avatar, a detail page's back disc)
   STAYS where it is. The page's own floating controls, marked [data-sw-autohide] (the Feed's sort and
   filter pills), slide up under the top row and fade. Transforms and opacity only, so the layers keep
   their padding and the page simply scrolls under where they were; hidden, they take no taps. 320ms on
   an iOS-like curve: the first trial's 220ms on a fast-start curve read as a jump, not a slide.
   The tab pill (Phil 11/15, "like Apple News"): iOS 26's minimize-on-scroll. It no longer leaves; it
   collapses to the left into one round glass button (--sw-tabmini, bottom-left, the pill's own glass:
   its ::before frost shrinks to the circle) holding the selected tab's icon, which glides there from
   its cell; on a page no tab owns (the row's [data-none]) it is Home. The other tabs, the create button
   and the puck fade. That one tab takes taps (its 52px+ cell, more than 44pt), and sw-bars.js turns
   the tap into "open the bar", never a tab switch. Opening springs back over the same path with a
   slight overshoot. The pill itself never moves, so the keyboard's and the comment composer's slide
   (.sw-tabbar--hidden, html.kbd-open) still own its transform; while those have it, nothing here
   takes a tap. Where the icon lands: the cell is 52 tall (64 - 6 - 6), its icon (23) + gap (3) + label
   line (11 x 1.1) centre 18.45px down it, so the cell moves 38 - 6 - 18.45 = 13.55px down to put the
   icon on the circle's centre (26px in, 26px up from the pill's bottom); across, 26 - 6 - (i + .5)
   cells (a cell is the tab's own width, so 100% in its translate). */
html[data-sw-bars] {
  --sw-bars-dur: calc(320ms / var(--sw-tempo)); --sw-bars-ease: cubic-bezier(.32, .72, 0, 1);
  --sw-bars-spring: cubic-bezier(.34, 1.22, .64, 1); --sw-tabmini: 52px;
}
html[data-sw-bars] [data-sw-autohide] {
  transition: transform var(--sw-bars-dur) var(--sw-bars-ease), opacity var(--sw-bars-dur) ease;
}
html.sw-bars-hidden [data-sw-autohide] { transform: translateY(calc(-100% - 8px)); opacity: 0; }
html.sw-bars-hidden [data-sw-autohide],
html.sw-bars-hidden [data-sw-autohide] * { pointer-events: none !important; }

/* Opening (the state the transitions land in when the class goes): the spring. */
html[data-sw-bars] .sw-tabbar::before {
  transition: top var(--sw-bars-dur) var(--sw-bars-spring), right var(--sw-bars-dur) var(--sw-bars-spring);
}
html[data-sw-bars] .sw-tabbar__row > .sw-tab {
  transition: transform var(--sw-bars-dur) var(--sw-bars-spring), opacity calc(200ms / var(--sw-tempo)) ease calc(60ms / var(--sw-tempo)),
              color var(--sw-dur) ease;
}
html[data-sw-bars] .sw-tab__label { transition: opacity calc(200ms / var(--sw-tempo)) ease calc(80ms / var(--sw-tempo)); }

/* Collapsing: the glass draws in to the circle at the bottom-left, the rest fades quickly. */
html.sw-bars-hidden .sw-tabbar::before {
  top: calc(100% - var(--sw-tabmini)); right: calc(100% - var(--sw-tabmini));
  transition: top var(--sw-bars-dur) var(--sw-bars-ease), right var(--sw-bars-dur) var(--sw-bars-ease);
}
html.sw-bars-hidden .sw-tabbar__row > .sw-tab {
  opacity: 0; transform: scale(.85);
  transition: transform var(--sw-bars-dur) var(--sw-bars-ease), opacity calc(140ms / var(--sw-tempo)) ease, color var(--sw-dur) ease;
}
html.sw-bars-hidden .sw-tabbar__puck { opacity: 0; }
html.sw-bars-hidden .sw-tab__label { opacity: 0; transition: opacity calc(120ms / var(--sw-tempo)) ease; }
/* The tab that stays: the selected one, or Home where no tab is. */
html.sw-bars-hidden .sw-tabbar__row:not([data-none]) > .sw-tab.is-active,
html.sw-bars-hidden .sw-tabbar__row[data-none] > .sw-tab:nth-child(2) {
  opacity: 1; transform: translate(calc(20px - (var(--i) + .5) * 100%), 13.55px);
  transition: transform var(--sw-bars-dur) var(--sw-bars-ease), color var(--sw-dur) ease;
}
html.sw-bars-hidden .sw-tabbar,
html.sw-bars-hidden .sw-tabbar * { pointer-events: none !important; }
html.sw-bars-hidden .sw-tabbar:not(.sw-tabbar--hidden) .sw-tabbar__row:not([data-none]) > .sw-tab.is-active,
html.sw-bars-hidden .sw-tabbar:not(.sw-tabbar--hidden) .sw-tabbar__row[data-none] > .sw-tab:nth-child(2) { pointer-events: auto !important; }

/* A comment bar docked above the pill (a page that shows both) drops to the pill's row and sits beside
   the collapsed button, centred on it, as iOS 26 puts an accessory beside the minimized tab bar. */
html[data-sw-bars] body:has(.sw-tabbar) .comment-floating-bar {
  transition: translate var(--sw-bars-dur) var(--sw-bars-ease), padding-left var(--sw-bars-dur) var(--sw-bars-ease);
}
html.sw-bars-hidden body:has(.sw-tabbar) .comment-floating-bar {
  translate: 0 calc(var(--comment-bar-bottom) - var(--sw-tab-bottom) + (var(--comment-bar-height) - var(--sw-tabmini)) / 2);
  padding-left: calc(14px + var(--sw-tabmini) + 8px);
}

/* Reduced motion: nothing travels. The glass and the icon are simply in their places; the button
   fades in, the rest fades out. */
@media (prefers-reduced-motion: reduce) {
  html[data-sw-bars] [data-sw-autohide] { transition: opacity calc(150ms / var(--sw-tempo)) ease; }
  html[data-sw-bars] .sw-tabbar::before { transition: none; }
  html[data-sw-bars] .sw-tabbar__row > .sw-tab { transition: opacity calc(150ms / var(--sw-tempo)) ease, color var(--sw-dur) ease; }
  html[data-sw-bars] body:has(.sw-tabbar) .comment-floating-bar { transition: none; }
  html.sw-bars-hidden [data-sw-autohide] { transform: none; opacity: 0; }
  html.sw-bars-hidden .sw-tabbar::before,
  html.sw-bars-hidden .sw-tabbar__row > .sw-tab { transition: opacity calc(150ms / var(--sw-tempo)) ease, color var(--sw-dur) ease; }
  html.sw-bars-hidden .sw-tabbar__row > .sw-tab { transform: none; }
  html.sw-bars-hidden .sw-tabbar__row:not([data-none]) > .sw-tab.is-active,
  html.sw-bars-hidden .sw-tabbar__row[data-none] > .sw-tab:nth-child(2) { transform: translate(calc(20px - (var(--i) + .5) * 100%), 13.55px); }
  html.sw-bars-hidden .sw-tabbar::before,
  html.sw-bars-hidden .sw-tabbar__row:not([data-none]) > .sw-tab.is-active,
  html.sw-bars-hidden .sw-tabbar__row[data-none] > .sw-tab:nth-child(2) { animation: sw-tabmini-in calc(150ms / var(--sw-tempo)) ease both; }
}
@keyframes sw-tabmini-in { from { opacity: 0; } to { opacity: 1; } }

/* 1. MENU (AppNavMenu) ------------------------------------------------------------------------ */
.sw-drawer-scrim { background: var(--sw-scrim); }
.sw-drawer-panel {
  width: 288px; max-width: calc(100vw - 32px); height: 100%; box-sizing: border-box; padding-left: var(--sw-safe-l);
  border-radius: 0 25px 25px 0; background: var(--sw-card); overflow: hidden;
  box-shadow: var(--sw-shadow-pop);
}
.sw-sidebar { background: var(--sw-card); border-right: 1px solid var(--sw-line); }

.sw-nav { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; color: var(--sw-olive-2); font-family: var(--sw-font-inter); }
.sw-nav--drawer { padding-top: max(var(--sw-safe-t), 12px); }

.sw-nav__brand { flex: none; display: flex; align-items: center; height: 64px; padding: 0 20px; }
.sw-nav__logo { display: block; height: 40px; width: auto; }

.sw-nav__head { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px 6px 10px 20px; border-bottom: .5px solid var(--sw-line-2); }
.sw-nav__head--bare { justify-content: flex-end; }
.sw-nav--desk .sw-nav__head { padding: 8px 20px 12px; }
.sw-nav__me { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.sw-nav__me:hover, .sw-nav__me:visited { color: inherit; }
.sw-nav__me:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; border-radius: 12px; }
.sw-nav__avatar {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--sw-line); color: var(--sw-ink); font: 700 14px/1 var(--sw-font-inter);
}
.sw-nav__who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-nav__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/18px var(--sw-font-inter); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-nav__role { white-space: nowrap; font: 500 12px/15px var(--sw-font-inter); color: var(--sw-ink-2-aa); }
.sw-nav__close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none;
  color: #000; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sw-nav__close-disc { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sw-ground-2); }
.sw-nav__close:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -4px; border-radius: 50%; }

.sw-nav__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 8px; }
.sw-nav__label {
  margin: 16px 10px 6px; font: 700 12px/15px var(--sw-font-mono); letter-spacing: var(--sw-tracking);
  text-transform: uppercase; color: var(--sw-ink-2-aa);
}
.sw-nav__body > .sw-nav__label:first-child { margin-top: 12px; }
.sw-nav__label--toggle { margin: 6px 0 0; }
.sw-nav__toggle {
  width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
  border: 0; border-radius: 12px; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
}
.sw-nav__toggle:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
.sw-nav__chev { transition: rotate var(--sw-dur) var(--sw-glide); }
.sw-nav__toggle[aria-expanded="true"] .sw-nav__chev { rotate: 180deg; }

.sw-nav__list { margin: 0; padding: 0; list-style: none; }
.sw-nav__list[hidden] { display: none; }
.sw-nav__item, .sw-nav__item:visited, .sw-nav__item:hover {
  width: 100%; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px;
  border: 0; border-radius: 12px; background: none; color: var(--sw-olive-2); text-align: left; text-decoration: none;
  font: 500 14px/26px var(--sw-font-inter); letter-spacing: var(--sw-tracking);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--sw-dur-fast) ease;
}
.sw-nav--desk .sw-nav__item { height: 40px; }
.sw-nav__item .sw-cicon { flex: none; color: var(--sw-olive-2); }
.sw-nav__item.is-current { background: rgba(63, 69, 49, .08); font-weight: 600; }
.sw-nav__item.is-current .sw-cicon { stroke-width: 2; }
.sw-nav__item:active { background: rgba(63, 69, 49, .08); }
@media (hover: hover) { .sw-nav__item:hover { background: rgba(63, 69, 49, .05); } .sw-nav__item.is-current:hover { background: rgba(63, 69, 49, .08); } }
.sw-nav__item:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
.sw-nav__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-nav__badge, .sw-set__badge {
  flex: none; padding: 3px 8px; border-radius: 10px; background: var(--sw-olive); color: #fff;
  font: 600 11px/16px var(--sw-font-inter); letter-spacing: 0; white-space: nowrap;
}

.sw-nav__foot { flex: none; border-top: .5px solid var(--sw-line-2); padding: 6px 10px max(calc(var(--sw-safe-b) - 8px), 12px); }
.sw-nav--desk .sw-nav__foot { margin-top: auto; padding-bottom: 12px; }

/* 2. SETTINGS (shared by the home and its sub-pages) -------------------------------------------- */
.sw-set { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto; padding: 8px 0 24px; color: var(--sw-ink); font-family: var(--sw-font-inter); }
.sw-set__titlerow { display: flex; align-items: center; min-height: 40px; }
.sw-set__title { margin: 0; font: 700 20px/24px var(--sw-font-head); letter-spacing: 0; color: var(--sw-olive-2); }
/* Desktop web shows the title in the top bar. */
@media (min-width: 1024px) { .sw-set__titlerow--web { display: none; } }

/* Sub-page header: MJ's 40px glass back disc and the 20px olive title (Settings_Devices). */
.sw-set__ph { min-height: 52px; padding: 0; }
.sw-set__ph .sw-icon-btn {
  width: 40px; height: 40px; border: 1px solid var(--sw-glass-edge); color: var(--sw-olive-2);
  background: var(--sw-glass);
  -webkit-backdrop-filter: var(--sw-glass-fx); backdrop-filter: var(--sw-glass-fx);
  box-shadow: var(--sw-shadow-glass), inset 0 1px 0 var(--sw-glass-sheen);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sw-set__ph .sw-icon-btn { background: var(--sw-glass-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .sw-set__ph .sw-icon-btn { background: var(--sw-glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.sw-set__ph .sw-ph__title { font: 700 20px/24px var(--sw-font-head); letter-spacing: 0; color: var(--sw-olive-2); }
.sw-set__intro { margin: 0; font: 500 12px/18px var(--sw-font-inter); color: var(--sw-olive-2); }

/* The box is the app's one card shell (.sw-surface on the element). */
.sw-set__card { padding: 14px 14px 2px; }
.sw-set__card--actions { padding: 2px 14px; }
.sw-set__card--pad { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sw-set__label {
  margin: 0; font: 700 12px/15px var(--sw-font-mono); letter-spacing: var(--sw-tracking);
  text-transform: uppercase; color: var(--sw-ink-2-aa);
}

/* Account card (the seller-card pattern) */
.sw-set__account, .sw-set__account:visited, .sw-set__account:hover {
  display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--sw-ink); text-decoration: none;   /* box: .sw-surface */
  -webkit-tap-highlight-color: transparent;
}
.sw-set__account:active { background: var(--sw-ground-2); }
.sw-set__account:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
.sw-set__avatar {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--sw-line); color: var(--sw-ink); font: 700 14px/1 var(--sw-font-inter);
}
.sw-set__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sw-set__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/18px var(--sw-font-inter); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-set__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/15px var(--sw-font-inter); color: var(--sw-ink-2-aa); }

/* Rows: 18px olive icon, 14px title (12px sub), trailing value / tag / badge, sage chevron */
.sw-set__row, .sw-set__row:visited, .sw-set__row:hover {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 0; margin: 0;
  border: 0; border-bottom: .5px solid var(--sw-line-3); background: none; color: var(--sw-ink);
  text-align: left; text-decoration: none; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sw-set__row:last-child { border-bottom: 0; }
div.sw-set__row { cursor: default; }
a.sw-set__row:active, button.sw-set__row:active { opacity: .6; }
.sw-set__row:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; border-radius: 4px; }
.sw-set__row:disabled { opacity: .45; cursor: default; }
.sw-set__icon { flex: none; color: var(--sw-olive-2); }
.sw-set__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sw-set__t { font: 500 14px/26px var(--sw-font-inter); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-set__main--two .sw-set__t { line-height: 20px; }
.sw-set__sub { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/15px var(--sw-font-inter); color: var(--sw-ink-2-aa); }
.sw-set__value { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/15px var(--sw-font-inter); color: var(--sw-ink-2-aa); }
.sw-set__chev { flex: none; color: var(--sw-line-3); }
.sw-set__tag {
  flex: none; padding: 4px 8px; border-radius: var(--sw-r-xs); background: var(--sw-ground-2); white-space: nowrap;
  font: 700 10px/15px var(--sw-font-mono); letter-spacing: var(--sw-tracking); text-transform: uppercase; color: var(--sw-ink);
}
.sw-set__tag--alert { background: var(--sw-line-3); color: #000; }
.sw-set__row--danger .sw-set__t, .sw-set__row--danger .sw-set__icon { color: #b84c41; }
.sw-set__skel { display: inline-block; width: 64px; height: 10px; border-radius: 5px; background: var(--sw-ground-2); }

/* Switch row (MJ's #F5F2EF well with the 40x26 switch) */
.sw-set__switch {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px;
  border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-ground-2);
}
.sw-set__switch-text { min-width: 0; display: flex; flex-direction: column; font: 14px/16px var(--sw-font-inter); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-set__switch-text strong { font-weight: 700; }
.sw-set__switch-text span { margin-top: 2px; font-weight: 400; }

/* Footer: version (long-press for diagnostics). Text on the cream ground is olive ink for contrast. */
.sw-set__foot { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.sw-set__version {
  margin: 0; padding: 8px 12px; border: 0; background: none; cursor: default;
  font: 500 12px/18px var(--sw-font-inter); color: var(--sw-olive-2);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.sw-set__diag { display: flex; flex-direction: column; align-items: center; }
.sw-set__diag-url { margin: 0; font: 500 11px/16px var(--sw-font-mono); color: var(--sw-ink-2-aa); word-break: break-all; text-align: center; }
.sw-set__links { display: flex; gap: 16px; }
.sw-set__link {
  border: 0; background: none; padding: 13px 4px; cursor: pointer;
  font: 500 12px/18px var(--sw-font-inter); color: var(--sw-olive-2); text-decoration: underline;
}

/* Inline notice (a save that failed, a load that failed) */
.sw-set__note { margin: 0; padding: 10px 12px; border-radius: var(--sw-r-md); background: var(--sw-ground-2); font: 500 13px/18px var(--sw-font-inter); color: var(--sw-ink); }
.sw-set__note--error { background: rgba(184, 76, 65, .10); color: #b84c41; }
.sw-set__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px 24px; text-align: center; }
.sw-set__empty-t { margin: 0; font: 600 16px/22px var(--sw-font-inter); color: var(--sw-ink); }
.sw-set__empty-b { margin: 0; max-width: 300px; font: 500 13px/18px var(--sw-font-inter); color: var(--sw-ink-2-aa); }
.sw-set__cta {
  border: 0; border-radius: 12px; background: var(--sw-olive); color: #fff; padding: 10px 18px; cursor: pointer;
  font: 600 14px/20px var(--sw-font-inter); text-decoration: none;
}
.sw-set__cta:hover, .sw-set__cta:visited { color: #fff; }
.sw-set__cta:active { opacity: .8; }

/* Person rows (Blocked members) */
.sw-set__person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--sw-line-3); }
.sw-set__person:last-child { border-bottom: 0; }
.sw-set__pill {
  flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--sw-line); border-radius: 25px; background: var(--sw-card);
  color: var(--sw-olive); cursor: pointer; font: 600 14px/1 var(--sw-font-inter);
}
.sw-set__pill:disabled { opacity: .45; cursor: default; }

/* 3. FORMS (Edit profile, Running stats) ------------------------------------------------------ */
.sw-set__form { display: flex; flex-direction: column; gap: 14px; }
.sw-set__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sw-set__field-label { font: 700 12px/16px var(--sw-font-inter); letter-spacing: -.025em; text-transform: uppercase; color: var(--sw-ink-2-aa); }
.sw-set__help { margin: 0; font: 500 12px/18px var(--sw-font-inter); color: var(--sw-ink-2-aa); }
.sw-set__err { margin: 0; font: 500 12px/16px var(--sw-font-inter); color: #b84c41; }
.sw-set__grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sw-set__readonly { padding: 9px 12px; border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-ground-2); font: 500 16px/1.4 var(--sw-font-inter); color: var(--sw-ink); overflow-wrap: anywhere; }
@media (min-width: 768px) { .sw-set__readonly { font-size: 14px; } }
.sw-set__photo { display: flex; align-items: center; gap: 14px; }
.sw-set__photo-img { width: 72px; height: 72px; background: var(--sw-line); }
.sw-set__photo-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--sw-line); border-radius: 25px; background: var(--sw-card); cursor: pointer;
  font: 600 14px/1 var(--sw-font-inter); color: var(--sw-olive);
}
.sw-set__photo-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sw-set__photo-btn:focus-within { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
.sw-set__savebar { display: flex; gap: 10px; }
.sw-set__savebar > * { flex: 1 1 0; }

/* Choice tiles (wizard: experience, foot strike) */
.sw-set__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sw-set__choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sw-set__choice {
  min-height: 44px; padding: 9px 4px; border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-card);
  color: var(--sw-ink); cursor: pointer; font: 500 14px/26px var(--sw-font-inter); letter-spacing: var(--sw-tracking);
  transition: background-color var(--sw-dur) ease, color var(--sw-dur) ease, border-color var(--sw-dur) ease;
}
.sw-set__choice[aria-pressed="true"] { border-color: var(--sw-olive); background: var(--sw-olive); color: #fff; }
.sw-set__choice:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
.sw-set__time { display: flex; align-items: center; gap: 6px; }
.sw-set__time .sw-input { width: 64px; text-align: center; padding-left: 6px; padding-right: 6px; }
.sw-set__time-sep { color: var(--sw-ink-2-aa); font-weight: 600; }
.sw-set__form select.sw-input {
  padding-right: 36px; background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ea796' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.sw-set__range { width: 100%; accent-color: var(--sw-olive); }
.sw-set__ticks { display: flex; justify-content: space-between; font: 500 11px/14px var(--sw-font-mono); color: var(--sw-ink-2-aa); }
.sw-set__steps { display: flex; justify-content: center; gap: 6px; padding: 2px 0 10px; }
.sw-set__dot { width: 6px; height: 6px; border-radius: 50%; background: #d9d4cc; transition: background-color var(--sw-dur) ease; }
.sw-set__dot.is-on { background: var(--sw-olive); }

/* Alert switches inside a sheet: the check-row rhythm with a switch */
.sw-set__toggle { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--sw-line-3); }
.sw-set__toggle:last-child { border-bottom: 0; }
.sw-set__toggle .sw-set__main .sw-set__sub { white-space: normal; }
