/* CSS examples from real websites (/css-examples/, scripts/css-examples-page.mjs). The layout is
   the Resources page's (public/resources.css, rs-*); these are the pages' own parts: the stage that
   shows a shadow or a button on the measured site's own background, the code under it, the facts,
   the syntax card, the hub's two cards and the "Get any site's styles" field. --ui-* tokens only,
   light and dark; the only raw colors are the measured ones, set inline on each stage. */
.cx .rs-head{align-items:center}
.cx .rs-lead{max-width:720px}
.cx .rs-lead a{color:var(--ui-link);text-underline-offset:3px}
.cx-make{grid-column:2;grid-row:1/span 2;align-self:end}
.cx-make svg,.cx-form .ui-btn svg,.cx-hub-go svg{flex:none}
.cx-note{margin:-6px 0 18px;font-size:15px;line-height:1.5;letter-spacing:-.01em;color:var(--ui-dim)}

/* Cards: the example on the site's own page color in a framed inset (8px around it, 10px corners,
   a hairline so light and dark stages both keep an edge), then the site, the CSS and the actions.
   Far-off cards skip rendering until they come near. */
.cx-card{gap:0;padding:8px;content-visibility:auto;contain-intrinsic-size:auto 372px}
.cx-card-btn{contain-intrinsic-size:auto 470px}
/* Box shadows sit four to a row on wide screens: their cards are small. */
@media (min-width:1101px){.cx-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.cx-grid-4 .cx-stage{height:150px}}
.cx-stage{position:relative;display:flex;align-items:center;justify-content:center;height:168px;border-radius:10px;overflow:hidden}
.cx-stage::after,.cx-mini::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 .8px var(--ui-line);pointer-events:none}
.cx-box{display:block;width:112px;height:72px;border-radius:10px}
.cx-btn{display:inline-block;max-width:calc(100% - 32px);box-sizing:border-box;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:center;text-decoration:none;cursor:default;transition:background .15s,color .15s}
/* The site's own hover colors, when it has them (set as --hb and --hf beside the measured styles). */
.cx-btn.cx-h:hover{background:var(--hb)!important;color:var(--hf)!important}
.cx-body{flex:1;display:flex;flex-direction:column;gap:12px;min-width:0;padding:14px 10px 10px}
.cx-code{margin:0;padding:10px 12px;max-height:97px;box-sizing:border-box;overflow:auto;border-radius:10px;background:var(--ui-well);color:var(--ui-text);font:400 12px/1.6 var(--ui-mono);white-space:pre-wrap;overflow-wrap:anywhere;tab-size:2}
.cx-code-tall{height:154px;white-space:pre}
/* Each group opens with its first rows; this shows the rest (css-examples.js). */
.cx-more{display:flex;height:38px;margin:20px auto 0;padding:0 18px;cursor:pointer}
.cx-more[hidden]{display:none}
.cx-code code{font:inherit}
.cx .rs-tags{display:flex;flex-wrap:wrap;gap:6px;margin:-2px 0 0}
.cx button.rs-btn{margin:0;cursor:pointer}
.cx .rs-btn.cx-done{border-color:var(--ui-accent);color:var(--ui-link)}
/* Copy needs scripting; the CSS is on the card either way. */
@media (scripting:none){.cx-copy{display:none}}

/* What real sites do: six plain cards with one number each. */
.cx-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0;padding:0;list-style:none}
.cx-facts li{display:flex;flex-direction:column;gap:8px;padding:22px}
.cx-facts b{font:500 30px/1.1 var(--ui-mono);letter-spacing:-.02em;color:var(--ui-text)}
.cx-facts span{font-size:15px;line-height:1.5;letter-spacing:-.01em;color:var(--ui-dim)}

/* How it is written: the property with its parts named. */
.cx-how-sec{padding-top:0}
.cx-how{display:flex;flex-direction:column;gap:14px;padding:32px}
.cx-how h2{margin:0;font-size:26px;line-height:1.2;font-weight:500;letter-spacing:-.03em}
.cx-how p{max-width:680px;margin:0;font-size:16px;line-height:1.55;letter-spacing:-.01em;color:var(--ui-dim)}
.cx-how code,.cx .ui-faq code{padding:1px 5px;border-radius:5px;background:var(--ui-well);font:400 .9em var(--ui-mono);color:var(--ui-text);overflow-wrap:anywhere}
.cx-syntax{margin:0;padding:16px 18px;overflow:auto;border-radius:12px;background:var(--ui-well);font:400 14.5px/1.7 var(--ui-mono);color:var(--ui-dim)}
.cx-syntax code{padding:0;background:none;font:inherit;color:inherit}
.cx-syntax b{font-weight:500;color:var(--ui-link)}
.cx-parts{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.cx-parts li{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 12px;border:.8px solid var(--ui-line);border-radius:999px;font-size:13.5px;color:var(--ui-dim)}
.cx-parts b{font:500 12.5px var(--ui-mono);color:var(--ui-link)}

/* The hub: one card per page with six of its examples drawn small. */
.cx-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0;padding:0;list-style:none}
.cx-hub-card{display:flex;flex-direction:column;gap:12px;padding:12px 12px 22px}
.cx-hub-card h2,.cx-hub-card>p,.cx-hub-go{margin-left:10px;margin-right:10px}
.cx-hub-card>.rs-tags{margin-top:2px}
.cx-hub-card h2{margin-top:10px;margin-bottom:0;font-size:24px;line-height:1.2;font-weight:500;letter-spacing:-.03em}
.cx-hub-card h2 a{color:inherit;text-decoration:none}
.cx-hub-card h2 a:hover{color:var(--ui-link)}
.cx-hub-card>p{margin-top:0;margin-bottom:0;font-size:15.5px;line-height:1.5;letter-spacing:-.01em;color:var(--ui-dim)}
.cx-hub-card a.rs-tag{text-decoration:none}
.cx-hub-card a.rs-tag:hover{color:var(--ui-link)}
.cx-hub-go{align-self:flex-start;margin-top:6px}
.cx-minis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cx-mini{position:relative;display:flex;align-items:center;justify-content:center;height:96px;border-radius:10px;overflow:hidden}
.cx-mini .cx-box{width:64px;height:42px;border-radius:8px}
.cx-mini .cx-btn{max-width:calc(100% - 12px);transform:scale(.8)}

/* Get any site's styles: a white card with the link field and the glossy Generate pill inside it. */
.cx-make-sec{padding-bottom:0}
.cx-make-card{display:flex;flex-direction:column;align-items:center;gap:12px;padding:40px 24px;text-align:center}
.cx-make-card h2{margin:0;font-size:32px;line-height:1.15;font-weight:500;letter-spacing:-.03em}
.cx-make-card p{max-width:520px;margin:0;font-size:16.5px;line-height:1.5;letter-spacing:-.02em;color:var(--ui-dim)}
.cx-form{width:min(560px,100%);margin-top:12px}
.cx-field{display:flex;align-items:center;gap:10px;height:52px;padding:0 6px 0 18px;border:.8px solid var(--ui-field-line);border-radius:999px;background:var(--ui-card);color:var(--ui-faint);box-sizing:border-box;transition:border-color .15s,box-shadow .15s}
.cx-field:focus-within{border-color:var(--ui-accent);box-shadow:0 0 0 4px var(--ui-accent-soft)}
.cx-field svg{flex:none}
.cx-field input[type=text]{flex:1;min-width:0;height:100%;margin:0;padding:0;border:0;background:none;outline:0;box-shadow:none;color:var(--ui-text);font:400 16px var(--ui-font);letter-spacing:-.02em}
.cx-field input::placeholder{color:var(--ui-faint)}
.cx-field .ui-btn{flex:none}
.cx :is(a,button,input):focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.cx-field input:focus-visible{outline:0}

@media (max-width:1100px){.cx-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){
  .cx-make{grid-column:1;grid-row:auto;justify-self:start;margin-top:6px}
  .cx-hub-grid{grid-template-columns:minmax(0,1fr)}
  .cx-how{padding:22px 18px}
  .cx-how h2{font-size:22px}
  .cx-syntax{font-size:13px}
  .cx-make-card{padding:28px 18px}
  .cx-make-card h2{font-size:26px}
  .cx-make-card p{font-size:15.5px}
  /* The field keeps one row: the pill shows only its arrow. */
  .cx-field .ui-btn{width:40px;padding:0;font-size:0;gap:0}
}
@media (max-width:640px){
  .cx-facts{grid-template-columns:minmax(0,1fr);gap:12px}
  .cx-facts li{padding:18px}
  .cx-facts b{font-size:26px}
  .cx-mini{height:76px}
}
@media (prefers-reduced-motion:reduce){.cx-btn{transition:none}}
