@layer carbon.foundation {
  :root {
    --brand1: #2253f4;
    --brand2: #5a78ff;
    --bad: #ff5c7a;
    --bad-tint: #ffe4eb;
    --good: #18d62b;
    --good-tint: #e8fbe9;
    --warn: #ffb020;
    --warn-tint: #fff4d8;
    --ink: #1f232c;
    --muted: #6f7480;
    --soft: #f3f5f2;
    --line: #e1e4ea;
    --panel: #ffffff;
    --ring: rgba(0, 0, 0, .05);
    --donut-ring: var(--ring);
    --scrim: rgba(246, 248, 252, .78);
    --shadow-modal: 0 30px 90px rgba(30, 38, 64, .18);
    --shadow-soft: 0 18px 50px rgba(30, 38, 64, .10);
    --radius-card: 18px;
    --radius-modal: 28px;
    --radius-pill: 999px;
    --font-ui: "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-title: "Onest", "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  :where(.carbon-heading, .carbon-modal-title, .carbon-card-title) {
    font-family: var(--font-title);
    font-weight: 380;
    letter-spacing: -.025em;
  }

  :where(.carbon-button) {
    appearance: none;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--soft);
    color: var(--brand1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    font: 650 15px/1 var(--font-ui);
    text-decoration: none;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
  }

  :where(.carbon-button:hover) {
    background: rgba(34, 83, 244, .10);
  }

  :where(.carbon-button:active) {
    transform: translateY(1px);
  }

  :where(.carbon-button.is-primary) {
    background: var(--brand1);
    color: #fff;
  }

  :where(.carbon-button.is-primary:hover) {
    background: #1646dc;
  }

  :where(.carbon-button.is-danger) {
    background: var(--bad-tint);
    color: var(--bad);
  }

  :where(.carbon-button.is-danger:hover) {
    background: var(--bad);
    color: #fff;
  }

  :where(.carbon-icon-button) {
    appearance: none;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--soft);
    color: var(--brand1);
    cursor: pointer;
    display: inline-grid;
    height: 52px;
    place-items: center;
    transition: background .16s ease, color .16s ease, transform .16s ease;
    width: 52px;
  }

  :where(.carbon-icon-button svg) {
    display: block;
    height: 24px;
    width: 24px;
    fill: currentColor;
  }

  :where(.carbon-icon-button:hover) {
    background: var(--brand1);
    color: #fff;
  }

  :where(.carbon-icon-button.is-danger) {
    background: var(--bad-tint);
    color: var(--bad);
  }

  :where(.carbon-icon-button.is-danger:hover) {
    background: var(--bad);
    color: #fff;
  }

  :where(.carbon-toggle) {
    align-items: center;
    display: inline-flex;
    gap: 12px;
  }

  :where(.carbon-toggle input) {
    block-size: 1px;
    clip-path: inset(50%);
    inline-size: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
  }

  :where(.carbon-toggle-track) {
    background: #d9dde6;
    border-radius: var(--radius-pill);
    display: inline-block;
    flex: 0 0 auto;
    height: 32px;
    position: relative;
    transition: background .16s ease;
    width: 58px;
  }

  :where(.carbon-toggle-track)::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(25, 31, 46, .16);
    content: "";
    height: 26px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform .16s ease;
    width: 26px;
  }

  :where(.carbon-toggle input:checked + .carbon-toggle-track) {
    background: var(--good);
  }

  :where(.carbon-toggle input:checked + .carbon-toggle-track)::after {
    transform: translateX(26px);
  }

  :where(.carbon-toast-stack) {
    bottom: 22px;
    display: grid;
    gap: 10px;
    left: 50%;
    pointer-events: none;
    position: fixed;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 32px));
    z-index: 12000;
  }

  :where(.carbon-toast) {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(34, 83, 244, .18);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    display: flex;
    gap: 14px;
    min-height: 64px;
    padding: 14px 18px;
    pointer-events: auto;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
  }

  :where(.carbon-toast.is-visible) {
    opacity: 1;
    transform: translateY(0);
  }

  :where(.carbon-toast-icon) {
    align-items: center;
    background: rgba(34, 83, 244, .10);
    border-radius: 14px;
    color: var(--brand1);
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
  }

  :where(.carbon-toast[data-kind="bad"], .carbon-toast[data-kind="error"]) {
    border-color: rgba(255, 92, 122, .30);
  }

  :where(.carbon-toast[data-kind="bad"] .carbon-toast-icon, .carbon-toast[data-kind="error"] .carbon-toast-icon) {
    background: var(--bad-tint);
    color: var(--bad);
  }

  :where(.carbon-toast[data-kind="warn"] .carbon-toast-icon) {
    background: var(--warn-tint);
    color: var(--warn);
  }

  :where(.carbon-toast-text) {
    font: 720 16px/1.35 var(--font-ui);
  }

  :where(.carbon-modal-backdrop) {
    align-items: center;
    background: var(--scrim);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 11000;
  }

  :where(.carbon-modal-backdrop.is-open) {
    display: flex;
  }

  :where(.carbon-modal-card) {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-modal);
    box-shadow: var(--shadow-modal);
    color: var(--ink);
    max-height: min(88vh, 920px);
    overflow: auto;
    width: min(980px, 100%);
  }

  :where(.carbon-modal-actions) {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 22px;
  }

  :where(.carbon-donut-layout) {
    align-items: center;
    background: var(--soft);
    border-radius: 16px;
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 16px;
    padding: 16px;
  }

  :where(.carbon-donut-layout.is-plain) {
    background: transparent;
    margin-top: 0;
    padding: 8px 0;
  }

  :where(.carbon-donut-svg-wrap) {
    display: grid;
    place-items: center;
  }

  :where(.carbon-donut) {
    display: block;
    height: auto;
    max-width: 100%;
    overflow: visible;
  }

  :where(.carbon-donut-bg) {
    stroke: var(--donut-ring);
  }

  :where(.carbon-donut-seg) {
    shape-rendering: geometricPrecision;
    stroke-linecap: butt;
    transition: stroke-dasharray .22s ease, stroke-dashoffset .22s ease;
  }

  :where(.carbon-donut-seg.is-rounded) {
    stroke-linecap: round;
  }

  :where(.carbon-donut-center) {
    fill: var(--ink);
    font-family: var(--font-title);
    font-weight: 380;
    letter-spacing: -.025em;
  }

  :where(.carbon-donut-sublabel) {
    fill: var(--muted);
    font-family: var(--font-ui);
    font-weight: 520;
    letter-spacing: 0;
  }

  :where(.carbon-donut-legend) {
    align-content: center;
    color: var(--ink);
    display: grid;
    font: 520 13px/1.35 var(--font-ui);
    gap: 6px;
    min-width: 0;
  }

  :where(.carbon-donut-legend-row) {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
  }

  :where(.carbon-donut-legend-dot) {
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    height: 10px;
    width: 10px;
  }

  :where(.carbon-donut-legend-label) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  @media (max-width: 680px) {
    :where(.carbon-donut-layout) {
      grid-template-columns: 1fr;
    }
  }
}
