/* Random Color Picker (/web-design/random-color-picker/). Loads after fx-tool-parts (the card, the Copy button, focus
   rings and tokens come from there). The colour fills the screen; the site header and footer stay hidden as before.
   Text and borders on the colour use currentColor: white, or black on a colour where black has the higher contrast
   (.rc-on-light on the page area, set by the script), so they never fall under 4.5 to 1.
   No motion. No green, red or yellow marks: the only colours are the ones the tool makes. */

/* site chrome: hidden, as before */
#page-header,
.action-container,
.fx-footer-v2{display:none!important}
body{display:block!important;flex-direction:unset!important;min-height:100vh}
.page-content{padding:0!important;margin:0!important}
/* the theme script parks the skip link at 10,10 as a white 10 px box after any Space or Enter key; Space is this tool's
   key, so the link stays off screen until it has keyboard focus (the theme's :focus rule then shows it in full) */
.skip-link-for-screen-reader:not(:focus){left:-10000px!important}

/* the colour (the script sets body background-color; this is the start colour) */
body.page-template-page-random-color-picker{margin:0;background-color:#00316a}
.rc-page{--rc-ink:#fff;--rc-wash:rgba(0,0,0,.18);position:relative;display:grid;grid-template-rows:auto 1fr auto auto;justify-items:center;min-height:100vh;min-height:100svh;margin:0;padding:12px 20px 28px;color:var(--rc-ink);font-family:var(--font-inter),system-ui,sans-serif;box-sizing:border-box}
.rc-page.is-start{background:radial-gradient(900px 420px at 50% -80px,rgba(33,129,233,.38),rgba(33,129,233,0) 70%)}
.rc-page.rc-on-light{--rc-ink:#000;--rc-wash:rgba(255,255,255,.3)}
body.touch .rc-page:not(.is-start){cursor:pointer}
.rc-page *,.rc-page *:before,.rc-page *:after{box-sizing:border-box}
.rc-page ::selection{background:rgba(12,26,43,.2)}

/* brand */
.rc-page .rc-brand{justify-self:start;display:inline-flex;align-items:center;min-height:44px;margin:0 0 0 -6px;padding:0 6px;border-radius:6px;color:var(--rc-ink);font:700 15px/1 var(--font-inter),sans-serif;letter-spacing:.14em;text-decoration:none;text-transform:uppercase}
.rc-page .rc-brand:hover{text-decoration:underline;text-underline-offset:4px;color:var(--rc-ink)}

/* the card: three rows with fixed minimum heights, so the start words, a colour and Copied! never move anything; the
   rows grow only when the reader's own text size makes a line taller. The status line (Copied to clipboard!) takes the
   place of the instruction line for the two seconds it shows */
.rc-page .rc-tool{align-self:center;width:100%;max-width:520px;margin:24px 0}
.rc-page .rc-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(72px,auto) minmax(44px,auto) minmax(20px,auto);row-gap:10px;justify-items:center;align-items:center;padding:28px 24px 34px;text-align:center}
.rc-page .rc-card>*{grid-column:1}
.rc-page h1.rc-code{grid-row:1;display:flex;align-items:center;justify-content:center;width:100%;min-height:72px;margin:0;padding:0;color:var(--cx-navy);font:800 56px/1 var(--font-inter),sans-serif;letter-spacing:.01em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-transform:uppercase}
.rc-page .rc-hex{cursor:text}
.rc-page .rc-hex:empty{display:none}
.rc-page.is-start h1.rc-code{grid-row:1/-1;min-height:72px;padding-top:6px;text-transform:none}
.rc-page .rc-start{display:none;font:700 34px/1.2 var(--font-inter),sans-serif;letter-spacing:-.01em}
.rc-page.is-start .rc-start--key{display:block}
.rc-page a.rc-start--tap{align-items:center;min-height:44px;color:var(--cx-blue-d);text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:6px}
.rc-page a.rc-start--tap:hover{color:var(--cx-navy)}
/* the first tap: the whole card is the target, not only the two words */
.rc-page.is-start a.rc-start--tap:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}
@media (hover:none) and (pointer:coarse){
.rc-page.is-start .rc-start--key{display:none}
.rc-page.is-start .rc-start--tap{display:inline-flex}
}
body.no-touch .rc-page.is-start .rc-start--key{display:block}
body.no-touch .rc-page.is-start .rc-start--tap{display:none}
body.touch .rc-page.is-start .rc-start--key{display:none}
body.touch .rc-page.is-start .rc-start--tap{display:inline-flex}
.rc-page:not(.is-start) .rc-start{display:none}

.rc-page .rc-actions{grid-row:2;display:flex;justify-content:center;width:100%}
.rc-page .rc-copy{min-width:min(136px,100%)}
.rc-page .rc-copy svg{flex:none}
.rc-page .rc-copy__done,.rc-page .rc-copy.is-copied .rc-copy__icon{display:none}
.rc-page .rc-copy.is-copied .rc-copy__done{display:block}
.rc-page .rc-instruction{grid-row:3;margin:0;color:var(--cx-mute);font:600 13px/20px var(--font-inter),sans-serif;letter-spacing:.08em;text-transform:uppercase}
.rc-page .rc-ins--tap,body.touch .rc-page .rc-ins--key{display:none}
body.touch .rc-page .rc-ins--tap{display:inline}
@media (hover:none) and (pointer:coarse){
body:not(.no-touch) .rc-page .rc-ins--key{display:none}
body:not(.no-touch) .rc-page .rc-ins--tap{display:inline}
}
.rc-page p.rc-status{grid-row:3;min-height:20px;margin:0;color:var(--cx-navy);font:600 14px/20px var(--font-inter),sans-serif}
.rc-page.has-copied .rc-instruction{visibility:hidden}
.rc-page.is-start .rc-actions,.rc-page.is-start .rc-instruction,.rc-page.is-start .rc-status{visibility:hidden}
/* a touch screen keeps :hover on the last thing tapped: Copy keeps its resting colours there */
@media (hover:none){
.rc-page .rc-copy:hover{background:var(--cx-pale);color:var(--cx-blue-d)}
}

/* more links and Tweet, on the colour */
.rc-page ul.rc-more{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:1200px;margin:0;padding:0;list-style:none}
.rc-page ul.rc-more>li{margin:0;padding:0}
.rc-page ul.rc-more>li:before{content:none;display:none}
.rc-page .rc-more__btn,.rc-page .rc-share__btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin:0;padding:0 18px;border:1px solid currentColor;border-radius:999px;background:transparent;color:var(--rc-ink);font:600 15px/1.2 var(--font-inter),sans-serif;text-decoration:none;cursor:pointer}
/* hover: a wash that moves the colour away from the text (darker under white, lighter under black), so contrast only rises */
.rc-page .rc-more__btn:hover,.rc-page .rc-share__btn:hover{background:var(--rc-wash);color:var(--rc-ink)}
.rc-page .rc-share{display:flex;justify-content:center;margin-top:14px}
.rc-page .rc-share__btn svg{flex:none}

/* focus: on the colour a ring in the text colour; inside the card the tool-parts ring */
.rc-page .rc-brand:focus-visible,.rc-page .rc-more__btn:focus-visible,.rc-page .rc-share__btn:focus-visible{outline:3px solid var(--rc-ink);outline-offset:2px}

@media (max-width:599px){
.rc-page{padding:8px 16px 20px}
.rc-page .rc-tool{margin:16px 0 20px}
.rc-page .rc-card{grid-template-rows:minmax(64px,auto) minmax(44px,auto) minmax(20px,auto);padding:22px 16px 30px}
/* the code is 5.42 em wide at its widest (#AAAAAA): below 340 px of screen it shrinks to stay on one line inside the card */
.rc-page h1.rc-code{min-height:64px;font-size:min(46px,calc((100vw - 64px)/6))}
.rc-page.is-start h1.rc-code{min-height:64px;padding-top:8px}
.rc-page .rc-start{font-size:28px}
.rc-page ul.rc-more{gap:8px}
.rc-page .rc-more__btn,.rc-page .rc-share__btn{padding:0 14px;font-size:14px}
}
/* 360 px phones: the six links stay two to a row (they fell to five rows) */
@media (max-width:379px){
.rc-page ul.rc-more{gap:6px}
.rc-page .rc-more__btn,.rc-page .rc-share__btn{padding:0 12px;font-size:13px}
}
