/* proto[typd] brand radii, loaded last on every page of every option.
   brand-guidelines.md section 3: control 2px, panel 3px, surface 4px. Site UI is square;
   pictures, logos, icons, avatars, status dots and diagram glyphs keep their own shapes. */

/* the kit's one radius scale (system.css), whatever data-radius and data-buttons say */
html, html[data-radius], html[data-buttons] {
  --r-sm: 2px; --r-md: 3px; --r-lg: 4px; --r-btn: 2px; --ui-radius: 3px;
}
html .card { --c-r: 4px; }
html .panel { --p-r: 3px; }
html :is(.ui, [class*="ui-"]) { --u-r: 3px; --u-r2: 2px; --u-r3: 2px; }
html .dg { --dg-r: 2px; }

/* controls the kit draws as pills or soft boxes */
html :is(.btn, .pill, .badge, .step-num, .socials a, .drawing__dim,
  .ui-btn, .ui-chip, .ui-kbd, .ui-pointer__name, .plan__btn, .plan__badge, .panel__status,
  .m-switch, .m-check, .sc__skip, .ic-chip, .ic-stack__more,
  input, select, textarea, button) { border-radius: 2px; }
html .ui-panel { border-radius: 3px; }
/* pseudo-elements can't sit inside :is(), so they get their own rules */
html .m-switch::before, html .ly-mark::before, html .ly-mark::after, html .map__handle::after { border-radius: 2px; }

/* diagram boxes (discs stay round) */
html :is(.dg-node:not(.dg-node--disc), .dg-node--card, .dg-node--core, .dg-node--core-pill, .dg-node--chip, .dg-node--system,
  .dg-node--group, .dg-row, .dg-fallback li) { border-radius: 3px; }
html .dg .dg-node:is(.dg-node--tile, .dg-node--gtile, .dg-node--core):has(> .dg-ic--wide) { border-radius: 3px; }
html .dg-node:is(.dg-node--core, .dg-node--core-pill)::before,
html .dg-node:is(.dg-node--core, .dg-node--core-pill)::after { border-radius: 4px; }

/* the options' own pills */
html :is(.chips button, .pair__arrow, .pc-stages li, .lane-tag) { border-radius: 2px; }
/* the kit sizes diagram nodes per tier (.dg[data-tier] ...), which outranks the rules above */
html .dg .dg-node:not(.dg-node--disc), html .dg[data-tier] .dg-node:not(.dg-node--disc) { border-radius: 3px; }
html .dg[data-tier] .dg-node:is(.dg-node--core, .dg-node--core-pill)::before,
html .dg[data-tier] .dg-node:is(.dg-node--core, .dg-node--core-pill)::after { border-radius: 4px; }
