/* Design systems: the gallery of the laboratory (lab/design-systems.html) and
   the "Design system" field of #start on the main page. Colours are the ones
   of the page: text #202024, secondary #62626a, action #0756d9, on white. */

/* Light/dark selector, shared by the gallery cards and the chosen card. Each
   radio covers its whole label, so the target is the 44 px pill. */
.ds-mode{display:inline-flex;min-inline-size:0;margin:0;padding:0;border:1.5px solid #6b6b74;border-radius:999px;background:#fff}
.ds-mode[hidden],.ds-use[hidden],.ds-tools[hidden],.ds-card[hidden],.ds-panel[hidden],.ds-chosen[hidden],.ds-empty[hidden]{display:none}
.ds-mode label{position:relative;display:inline-flex;min-width:64px;min-height:44px;margin:0;cursor:pointer}
.ds-mode input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.ds-mode span{display:inline-flex;flex:1;align-items:center;justify-content:center;padding:0 14px;border-radius:999px;color:#202024;font:600 12px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.ds-mode input:checked+span{background:#202024;color:#fff}
.ds-mode input:focus-visible+span{outline:3px solid #0756d9;outline-offset:3px}
.ds-mode-only{display:inline-flex;align-items:center;min-height:44px;font-size:12px;line-height:1.4;color:#62626a}

/* Gallery. The page is a tool for choosing, so the top is compact: the first row of cards starts inside the first fold. */
.ds-bar{padding-block:14px}
.ds-intro{padding:34px 0 22px}
.ds-intro h1{font-size:clamp(1.9rem,3.2vw,2.75rem);line-height:1.1;letter-spacing:-.04em}
.ds-intro__row{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:10px 40px;margin-top:12px}
.ds-intro .lead{flex:1 1 420px;max-width:64ch;margin:0;font-size:16px;line-height:1.55}
/* Five numbers: a fixed basis keeps them beside the sentence from 1024 px up, in two short rows. */
.ds-intro .catalogue-facts{flex:0 1 400px;gap:8px 24px;margin:0}
.ds-intro .catalogue-facts b{font-size:20px}
/* Search and chips share one band when they fit; the result line takes the row below. */
.ds-tools{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 12px;padding-block:16px;border-block:1px solid #20202420}
.ds-search{flex:0 0 220px;min-width:0}
.ds-search label{margin:0}
.ds-search input{width:100%;min-height:44px;padding:0 14px;border:1.5px solid #6b6b74;border-radius:12px;background:#fff;color:#202024;font-size:14px;line-height:1.4}
.ds-search input::placeholder{color:#62626a}
/* The collection filter sits above the family chips, in the column beside the search. */
.ds-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;flex:1 1 560px;min-width:0}
/* The collection filter is a segmented control: one rounded track with the three segments inside and the chosen one filled.
   The family chips below it stay as separate pills. */
.ds-collections{display:inline-flex;justify-self:start;border-radius:12px;background:#fff;box-shadow:inset 0 0 0 1.5px #6b6b74}
.ds-segment{display:inline-flex;flex:1 0 auto;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 18px;border:0;border-radius:12px;background:transparent;color:#202024;font:600 13px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;cursor:pointer}
.ds-segment__n{font:11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;color:#62626a}
.ds-segment[aria-pressed="true"]{background:#202024;color:#fff}
.ds-segment[aria-pressed="true"] .ds-segment__n{color:#e4e4ea}
.ds-segment:hover{box-shadow:inset 0 0 0 2px #202024}
.ds-chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.ds-chip[hidden]{display:none}
.ds-chip{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 11px;border:1.5px solid #6b6b74;border-radius:999px;background:#fff;color:#202024;font:600 12px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;cursor:pointer}
.ds-chip__n{font:11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;color:#62626a}
.ds-chip[aria-pressed="true"]{border-color:#202024;background:#202024;color:#fff}
.ds-chip[aria-pressed="true"] .ds-chip__n{color:#e4e4ea}
.ds-chip:hover{box-shadow:0 0 0 2px #202024}
.ds-result{flex:0 0 100%;margin:0;font-size:13px;line-height:1.5;color:#62626a}
.ds-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:52px 32px;padding:28px 0 20px}
.ds-card{display:flex;flex-direction:column;gap:12px;min-width:0}
.ds-card__preview{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border-radius:14px;box-shadow:0 0 0 1px rgb(32 32 36 / .12)}
.ds-card__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:6px;min-width:0}
.ds-card h2{font-size:22px;line-height:1.2;letter-spacing:-.03em;min-width:0;overflow-wrap:anywhere}
.ds-card__family{flex:none;font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;color:#0756d9}
/* A system of the brand collection: a flat tag beside the family, in the gallery and on the card of #start. Small text on a
   discreet tint, no outline, so it does not read as a control. #3a3a42 on #edeff4 is 9.79:1. */
.ds-card[data-collection="brand"] .ds-card__head{flex-wrap:wrap;row-gap:6px}
.ds-card__tags{display:inline-flex;flex:none;align-items:center;gap:8px}
.ds-card__brand,.ds-chosen__brand,.ds-live__brand{padding:2px 6px;border-radius:4px;background:#edeff4;color:#3a3a42;font:600 10px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap}
.ds-chosen__brand{justify-self:start}
.ds-card__pitch{font-size:13px;line-height:1.65;color:#62626a}
.ds-card__fonts{font-size:12px;line-height:1.5;color:#62626a}
.ds-swatches{display:flex;gap:6px}
.ds-swatches i{width:26px;height:26px;border-radius:50%;box-shadow:inset 0 0 0 1px rgb(32 32 36 / .2)}
.ds-card__actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:auto;padding-top:6px}
.ds-use{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;padding:0 16px;border:1.5px solid #202024;border-radius:999px;background:#fff;color:#202024;font:600 .8125rem/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;cursor:pointer}
.ds-use__check{display:none;flex:none;width:14px;height:14px}
.ds-use[aria-pressed="true"]{border-color:#0f7b5f;background:#0f7b5f;color:#fff}
.ds-use[aria-pressed="true"] .ds-use__check{display:block}
.ds-use:hover{box-shadow:0 0 0 2px currentColor}
@media(max-width:1023px){.ds-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:639px){.ds-grid{grid-template-columns:1fr;gap:40px;padding-top:20px}.ds-intro{padding:24px 0 16px}.ds-tools{padding-block:14px}.ds-search{flex-basis:100%}}
/* Under 768 px the search takes the whole width and the chips sit in one strip with its own horizontal scroll: no scrollbar,
   a fade on the right edge that shows there is more, and room on every side for the focus ring. The page never scrolls sideways. */
@media(max-width:767px){.ds-search{flex-basis:100%}.ds-filters{flex-basis:100%}.ds-collections{display:flex;justify-self:stretch}.ds-segment{flex:1 1 0;padding:0 8px}.ds-chips{flex-wrap:nowrap;margin:-8px;padding:8px 48px 8px 8px;overflow-x:auto;overscroll-behavior-x:contain;scroll-padding-inline:8px 56px;scrollbar-width:none;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 48px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 48px),transparent)}.ds-chips::-webkit-scrollbar{display:none}.ds-chip{flex:none}}
/* The squad summary closes the gallery: the same room before the footer as the call above it. */
.ds-grid~.squad-summary{padding-bottom:100px}

/* Squad summary at the end of the gallery: the button and the link to the laboratory side by side. */
.squad-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px;margin-top:34px}
.squad-actions .button,.squad-actions .text-link{margin-top:0}

/* #library on the main page: the design-systems card spans the grid, text on the left and a mosaic of four previews on the right. */
.category-feature{display:grid;grid-column:1 / -1;align-items:center;gap:24px}
.category-mosaic{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.category-mosaic img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border-radius:14px;box-shadow:0 0 0 1px rgb(32 32 36 / .12)}
@media(min-width:1024px){.category-feature{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:44px}}

/* #start: the "Design system" field. */
.ds-field{min-inline-size:0;margin:0 0 22px;padding:0;border:0}
.ds-field legend{margin-bottom:4px;padding:0;font-size:12px;font-weight:600}
.ds-sources{display:grid}
.ds-source{position:relative;display:flex;align-items:center;gap:10px;min-height:44px;margin:0;font-size:14px;font-weight:500;line-height:1.4;cursor:pointer}
.ds-source input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.ds-source span{display:inline-flex;align-items:center;gap:10px}
.ds-source span::before{content:"";flex:none;width:18px;height:18px;border:1.5px solid #6b6b74;border-radius:50%;background:#fff}
.ds-source input:checked+span::before{border-color:#0756d9;background:radial-gradient(circle,#0756d9 0 5px,#fff 5.5px)}
.ds-source input:focus-visible+span{outline:3px solid #0756d9;outline-offset:4px;border-radius:6px}
.ds-panel{margin-top:10px}
.ds-panel label{margin-bottom:8px}
.ds-panel textarea{margin-bottom:0}
.ds-empty{margin:0;font-size:13px;line-height:1.6;color:var(--muted,#62626a)}
.ds-empty a{display:inline-flex;align-items:center;min-height:44px;color:var(--accent,#0756d9);font-weight:600}
.ds-chosen{display:grid;gap:6px;padding:10px;border:1.5px solid #6b6b74;border-radius:18px}
.ds-chosen:focus{outline:3px solid var(--accent,#0756d9);outline-offset:3px}
.ds-chosen__card{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px;min-width:0}
.ds-chosen__preview{flex:none;width:128px;height:auto;aspect-ratio:16/10;object-fit:cover;border-radius:10px;box-shadow:0 0 0 1px rgb(32 32 36 / .12)}
.ds-chosen__body{display:grid;flex:1 1 150px;gap:4px;min-width:0}
.ds-chosen__name{font-size:15px;line-height:1.3;font-weight:650;color:var(--text,#202024)}
.ds-chosen__pitch{font-size:12px;line-height:1.55;color:var(--muted,#62626a)}
.ds-chosen__body .ds-mode{justify-self:start;margin-top:6px}
.ds-chosen__actions{display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px}
.ds-chosen__actions .text-link{min-width:44px;justify-content:center;font-size:13px}
/* "Ver ao vivo": a quiet text button beside the choice, and the modal dialog with the reference page of the system. */
.ds-card__buttons{display:flex;flex:1 0 100%;flex-wrap:wrap;align-items:center;gap:6px 10px}
/* A narrow card (three columns near 1024 px) keeps both buttons on one line: the text button drops its icon and side padding. */
.ds-card__actions{container-type:inline-size}
@container (max-width:311px){.ds-card__buttons{column-gap:6px}.ds-live-open{padding:0 6px}.ds-live-open__icon{display:none}}
.ds-live-open{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 12px;border:0;border-radius:999px;background:transparent;color:#0756d9;font:600 .8125rem/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;cursor:pointer}
.ds-live-open[hidden],.ds-live__loading[hidden]{display:none}
.ds-live-open__icon{flex:none;width:14px;height:14px}
.ds-live-open:hover{background:#e8effc}
.ds-live-open:focus-visible,.ds-live__close:focus-visible{outline:3px solid #0756d9;outline-offset:3px}
.ds-grid--live .ds-card__preview{cursor:zoom-in}
html.ds-live-lock{overflow:hidden}
.ds-live{box-sizing:border-box;width:min(1480px,calc(100vw - 48px));max-width:none;height:calc(100dvh - 48px);max-height:none;margin:auto;padding:0;border:0;border-radius:16px;background:#fff;color:#202024;overflow:hidden;box-shadow:0 24px 80px rgb(0 0 0 / .35)}
.ds-live[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
.ds-live::backdrop{background:rgb(16 16 20 / .62)}
.ds-live__bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 12px 10px 20px;border-bottom:1px solid #d9d9e0}
.ds-live__name{display:flex;flex:1 1 160px;align-items:center;gap:10px;min-width:0}
.ds-live__name h2{font-size:18px;line-height:1.2;letter-spacing:-.02em;min-width:0;overflow-wrap:anywhere}
.ds-live__close{min-width:44px;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:#edeff4;color:#202024;font:600 .8125rem/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer}
.ds-live__close:hover{background:#dfe2ea}
.ds-live__stage{position:relative;min-height:0;background:#f4f4f6}
.ds-live__loading{position:absolute;inset:0;display:grid;place-items:center;margin:0;font-size:13px;color:#62626a}
.ds-live__frame{position:absolute;inset:0;width:100%;height:100%;border:0;opacity:0}
.ds-live__frame.is-loaded{opacity:1}
@media(max-width:767px){.ds-live{width:100vw;height:100dvh;border-radius:0}.ds-live__bar{padding:8px 10px 8px 14px}}
