/* Reusable product primitives. Shared brand settings are the only visual source. */
.pc-library,
.pc-native-dialog {
  --pc-error: #a82f32;
  --pc-warning: #775a0c;
  --pc-info: #25538b;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
.pc-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius, 14px) * 0.5);
  font: 600 16px/1.3 var(--font);
  text-align: center;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  cursor: pointer;
  text-decoration: none;
}
.pc-btn > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pc-btn--primary {
  background: var(--green);
  color: var(--on-primary);
  border-color: var(--green);
}
.pc-btn--primary:hover,
.pc-btn--primary.pc-demo-hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.pc-btn--secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}
.pc-btn--secondary:hover {
  background: var(--neutral);
  border-color: var(--ink);
}
.pc-btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.pc-btn--quiet:hover {
  background: var(--neutral);
}
.pc-btn--danger {
  background: #fff4f3;
  color: #a82f32;
  border-color: #efccca;
}
.pc-btn--danger:hover {
  background: #f9e2e0;
}
.pc-btn--ink {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}
.pc-btn--ink:hover {
  background: color-mix(in srgb, var(--ink) 85%, var(--white));
}
.pc-btn--sm {
  font-size: 14px;
  min-height: 44px;
  padding: 9px 12px;
}
.pc-btn--lg {
  font-size: 17px;
  min-height: 52px;
  padding: 14px 21px;
}
.pc-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}
.pc-btn[aria-busy="true"] {
  cursor: progress;
  opacity: 1;
}
.pc-btn:focus-visible,
.pc-demo-focus {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  box-shadow: 0 0 0 3px var(--white);
}
.pc-spinner {
  display: block;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pc-spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes pc-spin {
  to {
    transform: rotate(360deg);
  }
}
.pc-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.pc-field label {
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 600;
}
.pc-optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  margin-left: 5px;
}
.pc-field input,
.pc-field textarea,
.pc-field select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.5);
  font: 400 16px/1.45 var(--font);
  transition:
    border-color 160ms,
    box-shadow 160ms;
}
.pc-field textarea {
  min-height: 105px;
  resize: vertical;
}
.pc-field input::placeholder,
.pc-field textarea::placeholder {
  color: var(--muted);
}
.pc-field input:hover,
.pc-field select:hover,
.pc-field textarea:hover {
  border-color: color-mix(in srgb, var(--ink) 45%, var(--line));
}
.pc-field input:focus,
.pc-field select:focus,
.pc-field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green);
}
.pc-field input:disabled,
.pc-field textarea:disabled,
.pc-field select:disabled {
  color: var(--muted);
  background: var(--neutral);
  cursor: not-allowed;
}
.pc-field input[aria-invalid="true"],
.pc-field--error input {
  border-color: #a82f32;
}
.pc-field small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.pc-field .pc-field-error {
  color: #a82f32;
}
.pc-badge {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 5px 10px;
  color: var(--ink);
  background: var(--neutral);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.pc-badge i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  flex-shrink: 0;
}
.pc-badge--success {
  color: #085c3f;
  background: #e8f6ed;
  border-color: #c5e4d2;
}
.pc-badge--warning {
  color: #775a0c;
  background: #fff8de;
  border-color: #eadca7;
}
.pc-badge--danger {
  color: #a82f32;
  background: #fff0ef;
  border-color: #efccca;
}
.pc-badge--info {
  color: #25538b;
  background: #eff5ff;
  border-color: #d1e0f6;
}
.pc-badge--brand {
  color: var(--on-brand);
  background: var(--brand-panel);
  border-color: var(--brand-panel);
}
.pc-question-card {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  color: var(--ink);
}
.pc-question-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pc-question-top > span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.pc-save {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--neutral);
  border-radius: 50%;
  color: var(--ink);
  font-size: 25px;
}
.pc-save:hover {
  background: color-mix(in srgb, var(--green) 15%, var(--white));
}
.pc-save[aria-pressed="true"] {
  color: var(--on-primary);
  background: var(--green);
}
.pc-question-card h3 {
  font: 600 24px/1.25 var(--heading-font);
  letter-spacing: -0.65px;
  margin: 17px 0 25px;
  max-width: 430px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pc-question-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.pc-question-value > strong {
  font: 550 43px/1 var(--heading-font);
  letter-spacing: -2px;
}
.pc-question-value > strong > span {
  font-size: 25px;
  letter-spacing: -0.6px;
  margin-left: 2px;
}
.pc-question-value > span {
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}
.pc-question-bar {
  height: 6px;
  margin: 17px 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--neutral);
}
.pc-question-bar > span {
  height: 100%;
  display: block;
  border-radius: 8px;
  background: var(--green);
}
.pc-question-footer {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.pc-question-footer > span {
  font-size: 12px;
  color: var(--muted);
}
.pc-feedback {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border-radius: calc(var(--radius) * 0.65);
  border: 1px solid var(--line);
  background: var(--neutral);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
.pc-feedback-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 1px;
}
.pc-feedback strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.pc-feedback p {
  color: inherit;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 3px;
}
.pc-feedback--success {
  background: #edf9f1;
  border-color: #c5e4d2;
  color: #085c3f;
}
.pc-feedback--warning {
  background: #fff9e6;
  border-color: #eadca7;
  color: #775a0c;
}
.pc-feedback--danger {
  background: #fff3f2;
  border-color: #efccca;
  color: #a82f32;
}
.pc-feedback--info {
  background: #f2f6fe;
  border-color: #d1e0f6;
  color: #25538b;
}
.pc-feedback-action {
  margin-top: 12px;
}
.pc-tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  max-width: 100%;
}
.pc-tab {
  padding: 12px 15px;
  min-height: 46px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
}
.pc-tab:hover {
  color: var(--ink);
  background: var(--neutral);
}
.pc-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--green);
}
.pc-tab-content {
  font-size: 16px;
  line-height: 1.75;
  padding: 22px 0;
  color: var(--ink);
}
.pc-menu {
  position: relative;
  display: inline-block;
}
.pc-menu > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.5);
  font-size: 15px;
}
.pc-menu > summary::-webkit-details-marker {
  display: none;
}
.pc-menu > div {
  margin-top: 8px;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.5);
  box-shadow: 0 8px 25px #0000000d;
  display: grid;
  background: var(--white);
}
.pc-menu .pc-btn {
  justify-content: flex-start;
  text-align: left;
}
.pc-accordion {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.65);
  overflow: hidden;
}
.pc-accordion details + details {
  border-top: 1px solid var(--line);
}
.pc-accordion summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 17px 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.pc-accordion summary::-webkit-details-marker {
  display: none;
}
.pc-accordion summary > span {
  font-size: 24px;
  line-height: 1;
  transition: transform 160ms;
}
.pc-accordion details[open] summary > span {
  transform: rotate(45deg);
}
.pc-accordion p {
  padding: 0 18px 19px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}
.pc-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--ink);
}
.pc-progress-track {
  height: 8px;
  background: var(--neutral);
  border-radius: 8px;
  overflow: hidden;
}
.pc-progress-track > i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 240ms ease;
}
.pc-stat {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: calc(var(--radius) * 0.65);
  display: grid;
  gap: 12px;
  color: var(--ink);
}
.pc-stat > span {
  font-size: 14px;
  color: var(--muted);
}
.pc-stat > strong {
  font: 550 37px/1.1 var(--heading-font);
  letter-spacing: -1.4px;
}
.pc-stat > small {
  font-size: 13px;
  color: var(--muted);
}
.pc-skeleton {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px;
  overflow: hidden;
  position: relative;
}
.pc-skeleton > i,
.pc-skeleton > b {
  display: block;
  background: var(--neutral);
  border-radius: 4px;
  height: 13px;
  margin-bottom: 13px;
}
.pc-skeleton > i:first-of-type {
  width: 35%;
}
.pc-skeleton > i:nth-of-type(2) {
  width: 85%;
  height: 22px;
  margin-top: 28px;
}
.pc-skeleton > i:nth-of-type(3) {
  width: 65%;
  height: 22px;
}
.pc-skeleton > b {
  width: 100%;
  margin: 31px 0 4px;
  height: 7px;
}
.pc-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    #ffffffb8 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: pc-shimmer 1.5s ease-in-out infinite;
}
@keyframes pc-shimmer {
  to {
    transform: translateX(100%);
  }
}
.pc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.pc-library-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin: 12px 0 27px;
}
.pc-library-intro h2 {
  font: 550 30px/1.15 var(--heading-font);
  letter-spacing: -1px;
  margin: 8px 0 12px;
}
.pc-library-intro p {
  max-width: 660px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
.pc-kicker {
  font-size: 12px;
  letter-spacing: 1.3px;
  font-weight: 600;
  color: var(--muted);
}
.pc-catalog-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.pc-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 23px;
}
.pc-filter-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.pc-filter-row > button {
  min-height: 44px;
  border: 1px solid transparent;
  padding: 9px 12px;
  font-size: 14px;
  border-radius: 30px;
  color: var(--muted);
}
.pc-filter-row > button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--on-ink);
}
.pc-filter-row > button:hover {
  border-color: var(--line);
}
.pc-search {
  max-width: 100%;
  min-width: 200px;
}
.pc-search input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.5);
  color: var(--ink);
  font: 400 16px/1.4 var(--font);
  background: var(--white);
}
.pc-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.pc-spec {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.pc-spec[hidden],
.pc-filter-empty[hidden],
.pc-tab-content[hidden],
.pc-context-note[hidden] {
  display: none !important;
}
.pc-spec-heading {
  padding: 23px 23px 21px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}
.pc-spec-heading h2 {
  font: 600 21px/1.3 var(--heading-font);
  letter-spacing: -0.5px;
  margin: 7px 0 10px;
}
.pc-spec-heading p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 420px;
}
.pc-ready {
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 4px 8px;
}
.pc-spec-body {
  padding: 23px;
  display: grid;
  gap: 20px;
}
.pc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pc-state-inspector {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: grid;
  gap: 12px;
}
.pc-state-inspector > label {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.pc-state-inspector > select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  font: 400 16px/1.4 var(--font);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.5);
  color: var(--ink);
  background: var(--white);
}
.pc-state-inspector > small,
.pc-component-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.pc-code {
  border-top: 1px solid var(--line);
  padding: 0 23px;
  background: var(--neutral);
}
.pc-code > summary {
  cursor: pointer;
  padding: 14px 0;
  font-size: 13px;
  color: var(--muted);
}
.pc-code pre {
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  overflow: auto;
  max-height: 240px;
  font:
    12px/1.7 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.pc-code > .pc-btn {
  margin-bottom: 15px;
}
.pc-form-demo {
  display: grid;
  gap: 16px;
}
.pc-check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 15px;
  line-height: 1.65;
  min-height: 44px;
  padding: 7px 0;
  cursor: pointer;
  color: var(--ink);
}
.pc-check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  margin: 3px 0 0;
  flex-shrink: 0;
}
.pc-muted {
  color: var(--muted);
  cursor: default;
}
.pc-field-pair {
  display: grid;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.pc-choice-set {
  border: none;
  padding: 0;
  margin: 0;
}
.pc-choice-set legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 9px;
}
.pc-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  cursor: pointer;
  min-height: 44px;
  font-size: 15px;
  color: var(--ink);
}
.pc-switch > input {
  position: absolute;
  width: 40px;
  height: 24px;
  margin: 0;
  opacity: 0;
}
.pc-switch-track {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
  background: var(--line);
  border-radius: 30px;
  transition: background-color 160ms;
}
.pc-switch-track::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px #00000020;
  transition: transform 160ms;
}
.pc-switch > input:checked + .pc-switch-track {
  background: var(--green);
}
.pc-switch > input:checked + .pc-switch-track::before {
  transform: translateX(16px);
}
.pc-switch > input:focus-visible + .pc-switch-track {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.pc-context-note {
  background: var(--neutral);
  padding: 14px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.pc-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.pc-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--ink);
}
.pc-table caption {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.pc-table th,
.pc-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.pc-table thead th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  background: var(--neutral);
}
.pc-table tbody th {
  font-weight: 500;
  min-width: 135px;
}
.pc-table thead button {
  font: inherit;
  min-height: 44px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.pc-table .pc-badge {
  font-size: 12px;
}
.pc-library-footnote {
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.pc-filter-empty {
  padding: 35px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
}
.pc-dialog-copy {
  font: 400 16px/1.8 var(--font);
  color: var(--muted);
  margin: 21px 0;
}
.pc-native-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  width: min(540px, calc(100vw - 32px));
  box-shadow: 0 20px 80px #00000022;
}
.pc-native-dialog::backdrop {
  background: #050d0a88;
}
.pc-native-dialog h2 {
  margin-bottom: 20px;
  font-size: 27px;
}
@media (max-width: 1100px) {
  .pc-spec-grid {
    grid-template-columns: 1fr;
  }
  .pc-library-intro {
    align-items: flex-start;
  }
}
@media (max-width: 600px) {
  .pc-library-intro {
    display: block;
  }
  .pc-library-intro h2 {
    font-size: 27px;
  }
  .pc-catalog-count {
    display: block;
    margin-top: 16px;
  }
  .pc-library-toolbar {
    align-items: stretch;
  }
  .pc-search {
    width: 100%;
  }
  .pc-spec-heading {
    padding: 19px;
  }
  .pc-spec-body {
    padding: 19px;
  }
  .pc-ready {
    display: none;
  }
  .pc-question-card {
    padding: 18px;
  }
  .pc-question-card h3 {
    font-size: 23px;
  }
  .pc-stat-grid {
    grid-template-columns: 1fr;
  }
  .pc-code {
    padding: 0 19px;
  }
  .pc-filter-row > button {
    padding: 9px 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pc-btn,
  .pc-switch-track,
  .pc-switch-track::before,
  .pc-accordion summary > span,
  .pc-progress-track > i {
    transition: none;
  }
  .pc-spinner,
  .pc-skeleton::after {
    animation: none;
  }
}
