/* fix 19, the 15 checks (docs/fix19/pristine-audit-2026-11-03.md): what the switch `pristine` adds to every page. app/pristine.php links
   it last in the head, after every other stylesheet; off, no page links it. The hero, header and footer keep their look at rest:
   their controls gain only the pressed state (Vilius, 3 Nov). Sizes in rem, spacing from the scale in tokens.css. */

/* 12: one light look, whatever the system is set to (form controls, scrollbars and autofill follow this). 11: iOS keeps the size the
   reader set when the phone turns */
:root{color-scheme:light;-webkit-text-size-adjust:100%;text-size-adjust:100%;--f8-stage-after:48px}   /* the stage gap, at every width: item 2 below */

/* 1: a link with no colour of its own takes its text's colour, before and after a visit (never the browser's blue or purple); :where
   weighs nothing, so every colour a stylesheet sets still wins. Autofill keeps the field's own look: no yellow or blue fill */
:where(a:link,a:visited){color:inherit}
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,select:-webkit-autofill{
  -webkit-text-fill-color:currentColor;caret-color:currentColor;transition:background-color 86400s step-end 86400s}

/* 14: every tap answers at once. No grey flash, no double-tap wait; pressed, a control shrinks a little (the `scale` property, so it
   adds to any transform the control already has), a link dims. Under reduced motion, both dim. A press lasts a moment, so it wins. */
a[href],button,summary,label,select,input,textarea,[role="button"],[role="tab"],[role="radio"],[role="switch"],[role="checkbox"],[role="menuitem"]{
  -webkit-tap-highlight-color:transparent;touch-action:manipulation}
:is(button,summary,[role="button"],[role="tab"],[role="radio"],[role="switch"],[role="checkbox"],[role="menuitem"],input[type="submit"],input[type="button"]):not(:disabled,[aria-disabled="true"]):active{
  scale:.97;transition:scale 80ms cubic-bezier(.2,0,0,1)}
a[href]:active{opacity:.5!important;transition:opacity 80ms linear}   /* !important: a hover that dims (.64 on the auth pages) must not hide the press */
@media (prefers-reduced-motion:reduce){
  :is(button,summary,[role="button"],[role="tab"],[role="radio"],[role="switch"],[role="checkbox"],[role="menuitem"],input[type="submit"],input[type="button"]):not(:disabled,[aria-disabled="true"]):active{scale:none;opacity:.5!important}
}

/* 8: the typed arrows and ticks, drawn (app/pristine.php pristine_symbols()) */
.bf-sym{display:inline-block;width:.9em;height:.9em;vertical-align:-.1em;flex:none}

/* 13: what the script says when something didn't work (assets/src/pristine.ts): words in the colour of the surface they sit on (a
   form's glass, the bell's glass), never a card of their own; "Try again" is a text button */
.bf-say{display:block;margin:var(--bd-space-3,12px) 0 0;color:inherit;font-size:1rem;line-height:1.45;font-weight:600;text-align:inherit}
.bf-say button{display:inline-flex;align-items:center;min-height:44px;margin:0 0 0 var(--bd-space-1,4px);padding:0 var(--bd-space-1,4px);border:0;background:none;
  color:inherit;font:inherit;text-decoration:underline;text-underline-offset:.2em;cursor:pointer}

/* 10: an empty Notifications page says where to go next (app/notifications.php) */
.f16n-go{margin:var(--bd-space-4,16px) 0 0}
.f16n-go .textlink{display:inline-flex;align-items:center;min-height:44px}

/* 2: room to breathe, not more (phones: gutters 16 to 20 px, a card's padding 20 px at most, a gap between sections 96 px at most;
   desktop: 168 px). The page's own gutters are 20 px on a phone; the header and the footer keep theirs (they are outside <main>). A
   stage meets its page a little sooner at every width. These are the last word over a page's own rules (the home's html.f14 …), so
   they carry !important; the variables don't need it. */
/* the founders page and the legal pages' own gaps (a stage's padding, a section's margin) */
html .jf-hello.f8-sec{margin-top:min(var(--f8-sec),64px)!important}
html .f7-stage:has(+ .f7p-read),html .f7-stage:has(+ .f7p-read) .f7-stage-in{min-height:0!important}
html .f7-stage:has(+ .f7p-read) .f7-stage-in{padding-bottom:48px!important}
html .f7-stage + .f7p-read{margin-top:var(--bd-space-5,24px)!important}
@media (max-width:759px){
  html .jf-hello.f8-sec{margin-top:var(--bd-space-6,32px)!important}
  html .jf-ex > .f7-stage-in{padding-bottom:48px!important}
}
@media (max-width:599px){
  main :is(.f7-wrap,.f8-col){padding-left:max(20px,calc((100% - var(--f8-col)) / 2))!important;padding-right:max(20px,calc((100% - var(--f8-col)) / 2))!important}
  main .f7-stage :is(.f7-wrap,.f8-col){padding-left:max(calc(20px - var(--f8-inset)),calc((100% - var(--f8-col)) / 2))!important;padding-right:max(calc(20px - var(--f8-inset)),calc((100% - var(--f8-col)) / 2))!important}
  html .f8st-row.is-now{padding-bottom:20px!important}
  html .f12h-tile.on-field{padding-top:20px!important}
  html .glass-pane.f12h-obj{padding-left:20px!important;padding-right:20px!important}
  html .f8tr-slip.glass-card{padding-top:20px!important}
  html .f8rw-band.glass-card{padding-top:20px!important;padding-bottom:20px!important}
  html :is(.f12h-talk-stage,.f12h-codecard,.f12h-cpanel,.f12h-pex){padding:20px!important}
  html .lc-stage .lc-wrap{padding-left:0!important;padding-right:0!important}
  html .lc-stage .lc-card{padding-left:var(--bd-space-2,8px)!important;padding-right:var(--bd-space-2,8px)!important}
  html body .auth-quote{padding:20px!important}
}

/* 6: no text too small (phones: labels 14 px, small print 13 px, running text 16 px with a line height of at least 1.45) */
@media (max-width:759px){
  :root{--f8-label:.875rem}
  html .f8st-w,html .f8-lbl,html .f7p-flab,html .f8m-k,html .f14h-hs,html .f14h-k,html .jf-find-l,html body .auth-quote cite,
  html .f12h-sh-h,html .f12h-sh-h *,html .f12h-k,html body .alt-or,html .f7p-ask-lab{font-size:.875rem!important}
  html .f8m-pd-s{font-size:1rem!important;line-height:1.5!important}
  html .f7p-plan-l li{line-height:1.5!important}
}

/* 4: every target 44 px. A small one keeps its look; an invisible frame around it takes the press (the auth pages' logo, the trade
   list's item names), and a link inside text gets the line height a finger needs */
html .f8tr-a::after,html .auth-forgot-m::after{content:""!important;position:absolute!important;inset:-12px -8px!important}
html .f8tr-a,html .auth-forgot-m{position:relative!important}
/* the auth pages' logo is placed on its own only on a phone (auth2.css): only there may its frame be drawn around it */
@media (max-width:599px){html body .auth-split-logo{position:absolute!important}html body .auth-split-logo::after{content:""!important;position:absolute!important;inset:-12px -8px!important}}
:is(p,li,dd,label):has(a.textlink,a.jfl-a,a[href]),:is(p,li,dd,label) a[href]{line-height:1.5!important}
@media (max-width:759px){
  html .f12h-cfirst,html .f12h-pro,html .f12h-inv{font-size:1rem!important;line-height:1.5!important}
}

/* 1: no purple, pink or beige. The home's drawn listing photo "warm" was beige: it takes the stone grey */
html .v4h-ph.bd-warm{background:linear-gradient(160deg,#DDE1E2,#AAB2B6)!important}
@media (max-width:599px){html .v4-card.lc-card{padding-top:20px!important;padding-bottom:20px!important}}

/* 11: text scales without breaking. Under 300 px wide (a phone zoomed to 200 %, or very large text), the page's own rows wrap instead
   of pushing sideways: words may break anywhere except in an amount (.num keeps its no-break spaces), pictures fit their column,
   and a step row pads less */
@media (max-width:299px){
  :is(main,.bf-sheet) *{white-space:normal!important;min-width:0}
  :is(main,.bf-sheet) :not(.num,.num *){overflow-wrap:anywhere}
  :is(main,.bf-sheet) :is(img,video,picture,svg){max-width:100%}
  html .f8st-row{padding-left:var(--bd-space-4,16px)!important;padding-right:var(--bd-space-4,16px)!important}
  html .f7p-frow,html .f12-pair{flex-wrap:wrap!important}
}
/* a name or an address that ended in "…" wraps instead, so larger text never hides part of it (at the normal size both fit) */
main :is(.f4p-name,.f7a-urlt){white-space:normal!important;text-overflow:clip!important;overflow:visible!important;overflow-wrap:anywhere}

/* a heading for screen readers only (the profile page: the pass shows the name) */
.bf-vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
/* larger text at full width: an e-mail address and a price row's phrase wrap instead of pushing the page sideways */
:is(main,.bf-sheet) :is(a[href^="mailto:"],.f7p-ask-mail .textlink){white-space:normal!important;overflow-wrap:anywhere}
main .f7p-frow .num{white-space:normal!important}
/* larger text: inside a stage (a field that clips at its rounded edge) words wrap instead of being cut; an amount and a code keep
   their line. Under 300 px the founders page's side column takes the width there is */
main .f7-stage :not(.num,.num *,code,kbd,svg,svg *){white-space:normal!important}
@media (max-width:299px){main :is(.jf-top > *,.jf-side){width:auto!important;max-width:100%!important;flex-basis:auto!important}}

/* the last of the phone sizes and targets: the auth pages' line under the title and their small links, the password hint, Rewards'
   labels and notes, a cancelled trade's reason, the join page's founders section, the security page's compact main button */
@media (max-width:759px){
  html .auth-split-form p.sub{font-size:1rem!important;line-height:1.5!important}
  html .auth-hint,html .f8rw-k{font-size:.875rem!important}
  html :is(.f8rw-note,.f16r-rc-why){font-size:1rem!important;line-height:1.5!important}
  html .f7p-steplist li p{line-height:1.5!important}
  html .jfl-sec{margin-top:var(--bd-space-6,32px)!important}
  html .glass-btn.is-primary:not(header *,footer *,.hero-glass *){min-height:48px!important}
}
html .auth-split-form p.sub a{position:relative!important}
html .auth-split-form p.sub a::after{content:""!important;position:absolute!important;inset:-13px -8px!important}
main .f7-stage :is(.textlink,.glass-btn,button){flex-shrink:1;max-width:100%}
@media (max-width:299px){main .jf-top{grid-template-columns:minmax(0,1fr)!important}}
/* a text link (often an icon and words in a row) wraps and shrinks with larger text instead of pushing the page sideways; at the normal
   size every one fits on its line, so nothing changes there */
:is(main,.bf-sheet) :is(.textlink,.textlink *){white-space:normal!important}
:is(main,.bf-sheet) .textlink{flex-shrink:1;max-width:100%;overflow-wrap:anywhere}
:is(main,.bf-sheet) .textlink > span{min-width:0}
/* a sheet's rows (Account, Sign-in and security): a value or a button's words wrap with larger text instead of being cut */
.bf-sheet :is(.f7a-val,.f7a-shrow *):not(.num,.num *){white-space:normal!important;text-overflow:clip!important;overflow-wrap:anywhere}
.bf-sheet .f7a-shrow{flex-wrap:wrap}
/* a pressed checkbox or radio dims a little too */
input:is([type="checkbox"],[type="radio"]):not(:disabled):active{opacity:.6!important}
/* larger text, the last rows: an account value and a heading's long word wrap, a page head's row wraps, the founders page's
   statements take the width there is under 300 px */
:is(main,.bf-sheet) .f7a-v{white-space:normal!important;overflow-wrap:anywhere;min-width:0}
:is(main,.bf-sheet) :is(h1,h2,h3){overflow-wrap:anywhere}
main .f8pv-head{flex-wrap:wrap}
@media (max-width:299px){main :is(.jf-why-h,.jf-why-line){width:auto!important;max-width:100%!important}}
/* larger text, sideways: the founders page's statement grid (twelve columns and their gaps are wider than the page under 300 px), a
   trade's status rows (the "when" words may wrap), a trade's total (the figure goes under its label), a notification's date (it wraps
   and leaves the message at least half the row). At the normal size each still sits on one line */
@media (max-width:299px){main .jf-why{grid-template-columns:minmax(0,1fr)!important}}
main .f8st{grid-template-columns:minmax(0,1fr)}
main .f8st-w{white-space:normal!important}
main .f8r-rc-total{flex-wrap:wrap}
/* a notification: when the list is narrow for its text (larger text, under 15 rem; a phone at the normal size is 20 rem), the date goes
   under the message, which then keeps the row's width */
html.f16 .f16n-list{container-type:inline-size}
@container (max-width:15rem){
  html.f16 .f16n-row{grid-template-columns:10px minmax(0,1fr) 20px;row-gap:2px}
  html.f16 .f16n-row > .f16n-t{grid-column:2;grid-row:1}
  html.f16 .f16n-row > time{grid-column:2;grid-row:2;white-space:normal}
  html.f16 .f16n-row > svg{grid-column:3;grid-row:1 / span 2}
}
/* larger text: a badge page's switch and a join page's rows wrap instead of being cut (pristine.ts keeps a wrapped switch's knob on
   the chosen row); the badge tool's column never grows past the page */
main .seg{flex-wrap:wrap;height:auto;min-height:44px}
main .seg > :is(button,a,label){height:auto;min-height:36px}
/* the badge tool's switch: a segment is never narrower than its longest word, so with larger text the switch wraps instead of
   squeezing its words over each other (at the normal size every word fits its share) */
main .f7p-bseg button{min-width:min-content}
main .seg.bf-seg-wrap{border-radius:24px}
@media (max-width:759px){main .f7p-bdg{grid-template-columns:minmax(0,1fr)}}
main .f7j-row{flex-wrap:wrap}
