/* ============================================================================
   KLARO PRODUCT FOUNDATION — SHAPE

   DR-02 · DECIDED 10 Aug 2026 · option C, explicitly ratified.
   Radius is assigned by ROLE, not by one scale.

     Rounding signals interactive or human.
     Sharpness signals record.

   Territory A's power comes from using rules instead of containers — so the
   radius of the few containers that remain is a minor question. The brand
   equity R1.6 protects is the ICON CIRCLE and the PILL; a circle is not a
   rounded rectangle, so both survive intact inside a near-zero system.

   Use the --k-r-on-* role tokens below. The raw --k-r-* scale is their
   implementation and should not be reached for directly in components.
   Brand radii (--radius-*) are UNCHANGED and still own marketing.
   ========================================================================= */
:root{
  --k-r-0:0; /* @kind radius */
  --k-r-xs:2px;
  --k-r-sm:4px;
  --k-r-md:6px;
  --k-r-lg:8px;        /* ceiling for product containers */
  --k-r-pill:999px;    /* actions and status tokens ONLY */
  --k-r-circle:50%;    /* avatars, category icon plates */

  /* ---- DR-02 role tokens. Components use THESE, not the raw scale. ---- */
  --k-r-on-record:var(--k-r-xs);      /* @kind radius */ /* data rows, panels, tables, bands, dividers */
  --k-r-on-surface:var(--k-r-0);      /* @kind radius */ /* full-bleed structural surfaces */
  --k-r-on-card:10px;                 /* @kind radius */ /* enclosed content cards, where one is justified */
  --k-r-on-card-tight:8px;            /* @kind radius */ /* nested or compact card */
  --k-r-on-input:var(--k-r-md);       /* @kind radius */ /* input, select, textarea — operable */
  --k-r-on-action:var(--k-r-pill);    /* @kind radius */ /* button, CTA — interactive */
  --k-r-on-token:var(--k-r-pill);     /* @kind radius */ /* chip, badge, status token — label */
  --k-r-on-icon:var(--k-r-circle);    /* @kind radius */ /* icon container — THE brand motif.
       CONSTRAINT: 50% resolves to a circle ONLY on a square box. On any other
       aspect it is an ellipse, silently. Always set equal width and height, or
       use .k-icon-slot below. Squareness is part of the role, not the caller's
       choice — an oval icon plate is not the Klaro motif. */
  --k-r-on-overlay:var(--k-r-lg);     /* @kind radius */ /* dialog, sheet, popover, toast */
  --k-r-on-track:var(--k-r-sm);       /* @kind radius */ /* range track, progress, meter */
  --k-r-on-mark:var(--k-r-xs);        /* @kind radius */ /* value mark on a track */

  /* Borders */
  --k-bw-hairline:1px; /* @kind other */
  --k-bw-default:1px; /* @kind other */
  --k-bw-strong:2px; /* @kind other */
  --k-bw-rule-heavy:2px; /* @kind other */
  --k-bw-accent:3px; /* @kind other */   /* status bar on a record row */
  --k-border:var(--k-bw-hairline) solid var(--k-border-hairline); /* @kind other */
  --k-border-strong-s:var(--k-bw-strong) solid var(--k-border-strong); /* @kind other */
  --k-rule:var(--k-bw-hairline) solid var(--k-border-hairline); /* @kind other */
  --k-rule-heavy:var(--k-bw-rule-heavy) solid var(--k-border-rule-heavy); /* @kind other */

  /* Elevation — four levels, and level 0 is the default.
     Territory A separates with rule and space; shadow is for true overlay only. */
  --k-e0:none; /* @kind shadow */
  --k-e1:0 1px 2px rgba(12,25,34,.06),0 0 0 1px rgba(12,25,34,.04); /* @kind shadow */
  --k-e2:0 4px 12px rgba(12,25,34,.08),0 0 0 1px rgba(12,25,34,.04); /* @kind shadow */
  --k-e3:0 12px 32px rgba(12,25,34,.12),0 0 0 1px rgba(12,25,34,.05); /* @kind shadow */
  --k-e4:0 24px 56px rgba(12,25,34,.18); /* @kind shadow */

  --k-z-base:0; /* @kind other */--k-z-sticky:100; /* @kind other */--k-z-header:200; /* @kind other */--k-z-dropdown:300; /* @kind other */
  --k-z-overlay:400; /* @kind other */--k-z-dialog:500; /* @kind other */--k-z-toast:600; /* @kind other */--k-z-tooltip:700; /* @kind other */
}

/* ---- Icon container. Enforces the square box --k-r-on-icon depends on, so the
   brand motif cannot silently degrade to an ellipse. Size with --size. ---- */
.k-icon-slot{--size:44px;width:var(--size);height:var(--size);flex:0 0 var(--size);
  border-radius:var(--k-r-on-icon);display:inline-flex;align-items:center;justify-content:center;
  aspect-ratio:1}
.k-icon-slot > img,.k-icon-slot > svg{width:calc(var(--size) * .56);height:calc(var(--size) * .56)}
