/* Punch UI Kit — a CSS rendition of the portal's components, on the system's tokens.
   The portal itself is Tailwind + shadcn; these classes exist for the previews and for
   applications without Tailwind. Load tokens.css and fonts.css first. Every colour is a token. */

:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

html, body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
svg { display: inline-block; vertical-align: middle; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--ring) 50%, transparent); outline-offset: 1px; }

.pk-stage { padding: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-start; }
.pk-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.pk-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

/* Type utilities */
.pk-eyebrow { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.pk-eyebrow--sm { font-size: 11px; }
.pk-eyebrow--primary { color: var(--primary); }
.pk-numeral { font-size: 36px; line-height: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pk-muted { color: var(--muted-foreground); }
.pk-small { font-size: 12px; line-height: 16px; }
.pk-ref { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.pk-code { font-family: var(--font-mono); font-size: 12px; line-height: 20px; background: var(--background); color: var(--muted-foreground); border-radius: var(--radius-md); padding: 12px; box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent); overflow: auto; margin: 0; }

/* Shell */
.pk-shell { display: flex; min-height: 320px; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.pk-sidebar { width: 208px; flex: none; background: var(--sidebar); color: var(--sidebar-foreground); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; padding: 8px; gap: 4px; }
.pk-sidebar__brand { display: flex; align-items: center; gap: 8px; padding: 6px 8px 10px; }
.pk-mark { width: 32px; height: 32px; border-radius: var(--radius-sm); background: #000; box-shadow: 0 0 0 1px var(--sidebar-mark-ring); display: grid; place-items: center; flex: none; overflow: hidden; }
.pk-mark img, .pk-mark svg { width: 100%; height: 100%; display: block; }
.pk-sidebar__brand b { display: block; font-weight: 600; font-size: 14px; line-height: 16px; }
.pk-sidebar__brand span { display: block; font-size: 12px; line-height: 16px; color: var(--sidebar-muted-foreground); }
.pk-nav-group { padding: 10px 8px 4px; font-size: 12px; color: var(--sidebar-muted-foreground); }
.pk-nav-item { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; color: var(--sidebar-foreground); text-decoration: none; }
.pk-nav-item:hover { background: var(--sidebar-accent); }
.pk-nav-item[aria-current] { background: var(--sidebar-accent); box-shadow: inset 0 0 0 1px var(--sidebar-active-ring); }
.pk-nav-item svg { width: 16px; height: 16px; flex: none; }
.pk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-header { height: 56px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--background) 80%, transparent); backdrop-filter: blur(8px); font-size: 14px; font-weight: 500; }
.pk-header__sep { width: 1px; height: 16px; background: var(--border); margin: 0 8px; }
.pk-header__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pk-page { position: relative; flex: 1; padding: 32px 24px; display: flex; flex-direction: column; gap: 32px; }
.pk-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 80% 70% at 50% -20%, var(--wash), transparent 70%); }
.pk-page > * { position: relative; z-index: 1; }

/* Page header */
.pk-page-header { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .pk-page-header { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.pk-page-header__text { display: flex; flex-direction: column; gap: 4px; }
.pk-back { display: inline-flex; align-items: center; gap: 4px; width: fit-content; margin-bottom: 4px; font-size: 14px; color: var(--muted-foreground); text-decoration: none; }
.pk-back:hover { color: var(--foreground); }
.pk-title { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.025em; }
.pk-desc { margin: 0; max-width: 672px; font-size: 14px; color: var(--muted-foreground); }
.pk-page-header__actions { display: flex; flex: none; flex-wrap: wrap; gap: 8px; }

/* Card */
.pk-card { display: flex; flex-direction: column; gap: 20px; padding: 24px 0; border-radius: var(--radius-xl); background: transparent; box-shadow: 0 0 0 1px var(--border), var(--shadow-xs); color: var(--foreground); }
.pk-card--highlight { background: var(--card); border-left: 4px solid var(--primary); }
.pk-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 24px 20px; border-bottom: 1px solid var(--border); }
.pk-card__title { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 24px; font-weight: 500; }
.pk-card__title svg { width: 16px; height: 16px; }
.pk-card__desc { font-size: 14px; color: var(--muted-foreground); margin-top: 4px; }
.pk-card__action { font-size: 12px; font-weight: 500; color: var(--primary); text-decoration: none; white-space: nowrap; }
.pk-card__action:hover { text-decoration: underline; }
.pk-card__body { display: flex; flex-direction: column; gap: 16px; padding: 0 24px; }
.pk-list { display: flex; flex-direction: column; }
.pk-list > * + * { border-top: 1px solid var(--border); }
.pk-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.pk-list-row:first-child { padding-top: 0; } .pk-list-row:last-child { padding-bottom: 0; }
.pk-list-row__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pk-list-row__text b { font-weight: 500; }
.pk-list-row__text span { font-size: 12px; color: var(--muted-foreground); }

/* Pill */
.pk-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-full); font-size: 12px; font-weight: 500; white-space: nowrap; width: fit-content; flex: none; }
.pk-pill--muted { background: var(--muted); color: var(--muted-foreground); }
.pk-pill--primary { background: var(--brand-dim); color: var(--primary); }
[data-theme="dark"] .pk-pill--primary { background: color-mix(in oklab, var(--primary) 25%, transparent); color: var(--primary-foreground); }
.pk-pill--green { background: var(--success-dim); color: var(--success); }
.pk-pill--amber { background: var(--warning-dim); color: var(--warning); }
.pk-pill--red { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); }
[data-theme="dark"] .pk-pill--red { background: color-mix(in oklab, var(--destructive) 20%, transparent); }
.pk-pill--blue { background: var(--info-dim); color: var(--info); }
.pk-pill--outline { box-shadow: inset 0 0 0 1px var(--border); color: var(--foreground); }
.pk-pill--ink { background: var(--foreground); color: var(--background); }

/* Tile */
.pk-tile { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius-xl); box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent); color: inherit; text-decoration: none; }
.pk-tile--alert { background: color-mix(in oklab, var(--destructive) 5%, transparent); box-shadow: 0 0 0 1px color-mix(in oklab, var(--destructive) 30%, transparent); }
.pk-tile--alert .pk-numeral, .pk-tile--alert .pk-eyebrow { color: var(--primary); }
.pk-tile__text { display: flex; flex-direction: column; }
.pk-tile__text span:last-child { font-size: 14px; color: var(--muted-foreground); }

/* Section card */
.pk-section-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--radius-xl); box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-xs); font-size: 14px; color: inherit; text-decoration: none; }
.pk-section-card--attention { background: var(--card); border-left: 4px solid var(--primary); }
.pk-section-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pk-section-card__top b { font-size: 16px; line-height: 24px; font-weight: 500; }
.pk-section-card__top svg { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; transition: color .2s; }
.pk-section-card:hover .pk-section-card__top svg { color: var(--foreground); }
.pk-section-card__stat { display: flex; align-items: baseline; gap: 8px; }
.pk-section-card--attention .pk-numeral, .pk-section-card--attention .pk-eyebrow { color: var(--primary); }
.pk-section-card p { margin: 0; color: var(--muted-foreground); }

/* Lift and rise */
.pk-lift { transition: transform .3s ease-out, box-shadow .3s ease-out; }
.pk-lift:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-lift); }
@media (prefers-reduced-motion: no-preference) {
  .pk-rise > * { animation: pk-rise .5s ease-out both; }
  .pk-rise > :nth-child(2) { animation-delay: 70ms; } .pk-rise > :nth-child(3) { animation-delay: 140ms; }
  .pk-rise > :nth-child(4) { animation-delay: 210ms; } .pk-rise > :nth-child(5) { animation-delay: 280ms; } .pk-rise > :nth-child(6) { animation-delay: 350ms; }
}
@keyframes pk-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Button — shadcn radix-nova sizes and variants */
.pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--radius-lg); border: 0; background: var(--primary); color: var(--primary-foreground); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background-color .15s, color .15s; }
.pk-btn svg { width: 16px; height: 16px; flex: none; }
.pk-btn:hover { background: var(--brand-strong); }
.pk-btn:disabled { opacity: .5; pointer-events: none; }
.pk-btn--outline { background: var(--background); color: var(--foreground); box-shadow: inset 0 0 0 1px var(--border); }
.pk-btn--outline:hover { background: var(--accent); color: var(--accent-foreground); }
.pk-btn--secondary { background: var(--secondary); color: var(--secondary-foreground); }
.pk-btn--secondary:hover { background: color-mix(in oklab, var(--secondary) 80%, var(--foreground) 5%); }
.pk-btn--ghost { background: transparent; color: var(--foreground); }
.pk-btn--ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.pk-btn--ghost.pk-muted { color: var(--muted-foreground); }
.pk-btn--destructive { background: var(--destructive); color: #ffffff; }
.pk-btn--destructive:hover { background: color-mix(in oklab, var(--destructive) 90%, #000); }
.pk-btn--xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: var(--radius-md); gap: 4px; } .pk-btn--xs svg { width: 12px; height: 12px; }
.pk-btn--sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: var(--radius-md); gap: 4px; } .pk-btn--sm svg { width: 14px; height: 14px; }
.pk-btn--lg { height: 36px; }
.pk-btn--icon { width: 32px; padding: 0; } .pk-btn--icon-sm { width: 28px; height: 28px; padding: 0; border-radius: var(--radius-md); } .pk-btn--icon-lg { width: 36px; height: 36px; padding: 0; }
.pk-btn--round { border-radius: var(--radius-full); }

/* Composer (beam) */
.pk-composer { position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 8px; border-radius: var(--radius-2xl); background: var(--card); box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent); text-align: left; }
.pk-composer:focus-within { box-shadow: 0 0 0 1px color-mix(in oklab, var(--ring) 60%, transparent); }
.pk-composer--dragging { box-shadow: 0 0 0 1px var(--primary); background: color-mix(in oklab, var(--primary) 5%, transparent); }
.pk-composer__field { width: 100%; resize: none; border: 0; background: transparent; padding: 8px 12px; font-size: 16px; line-height: 24px; outline: none; }
.pk-composer__field::placeholder { color: var(--muted-foreground); }
.pk-composer--compact .pk-composer__field { font-size: 14px; line-height: 20px; }
.pk-composer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px 4px; }
.pk-composer__note { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted-foreground); }
.pk-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12px; }
.pk-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-full); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted-foreground); background: transparent; cursor: pointer; }
.pk-chip:hover { background: var(--muted); color: var(--foreground); }
@property --pk-beam-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pk-beam { position: relative; isolation: isolate; }
.pk-beam::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--pk-beam-angle), transparent 0 62%, var(--primary) 78%, var(--beam-2) 88%, var(--beam-3) 95%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: pk-beam 5s linear infinite; }
.pk-beam::after { content: ""; position: absolute; inset: -18px; padding: 18px; z-index: -2; border-radius: calc(var(--radius-2xl) + 18px); pointer-events: none; filter: blur(14px); opacity: .35;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  background: conic-gradient(from var(--pk-beam-angle), transparent 0 66%, var(--primary) 80%, var(--beam-2) 90%, transparent 100%); animation: pk-beam 5s linear infinite; }
[data-theme="dark"] .pk-beam::after { opacity: .55; }
@keyframes pk-beam { to { --pk-beam-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .pk-beam::before, .pk-beam::after { animation: none; } .pk-rise > * { animation: none; } }

/* Tabs */
.pk-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.pk-tab { position: relative; display: inline-flex; align-items: center; padding: 12px 16px; border: 0; background: transparent; font-size: 14px; color: var(--muted-foreground); cursor: pointer; white-space: nowrap; }
.pk-tab::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); transform: scaleY(0); transform-origin: bottom; transition: transform .15s; }
.pk-tab:hover { color: var(--foreground); }
.pk-tab[aria-selected="true"] { color: var(--foreground); font-weight: 500; } .pk-tab[aria-selected="true"]::before { transform: scaleY(1); }
.pk-tab:disabled { cursor: not-allowed; opacity: .5; }
.pk-tab__badge { display: inline-block; min-width: 16px; margin-left: 6px; padding: 0 6px; border-radius: var(--radius-full); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; background: var(--muted); color: var(--muted-foreground); text-align: center; }
.pk-tab__badge--live { background: var(--primary); color: var(--primary-foreground); }
.pk-tab__soon { margin-left: 6px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }

/* Form field */
.pk-field { display: flex; flex-direction: column; gap: 8px; }
.pk-label { font-size: 14px; font-weight: 500; line-height: 20px; }
.pk-label em { font-style: normal; color: var(--primary); }
.pk-input { height: 32px; padding: 0 10px; border-radius: var(--radius-md); border: 1px solid var(--input); background: transparent; font-size: 14px; outline: none; width: 100%; }
textarea.pk-input { height: auto; padding: 8px 10px; resize: vertical; }
.pk-input::placeholder { color: var(--muted-foreground); }
.pk-input:focus-visible { border-color: var(--ring); outline: 3px solid color-mix(in oklab, var(--ring) 50%, transparent); }
.pk-input[aria-invalid="true"] { border-color: var(--destructive); }
.pk-help { margin: 0; font-size: 12px; color: var(--muted-foreground); }
.pk-error { margin: 0; font-size: 12px; color: var(--destructive); }

/* Avatar */
.pk-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--muted); overflow: hidden; flex: none; }
.pk-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pk-avatar--fallback { background: var(--brand-dim); color: var(--primary); font-size: 12px; font-weight: 600; }
.pk-avatar--sm { width: 32px; height: 32px; } .pk-avatar--lg { width: 44px; height: 44px; border-radius: var(--radius-md); }
.pk-assistant-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--brand-dim); color: var(--primary); flex: none; }
.pk-assistant-mark svg { width: 55%; height: 55%; }

/* Empty state */
.pk-empty { border: 1px dashed var(--border); border-radius: var(--radius-xl); padding: 40px; text-align: center; }
.pk-empty b { display: block; font-size: 14px; font-weight: 500; }
.pk-empty p { margin: 8px auto 0; max-width: 384px; font-size: 14px; color: var(--muted-foreground); }

/* Action card (assistant) */
.pk-action-card { overflow: hidden; border-radius: var(--radius-xl); background: var(--card); font-size: 14px; box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-xs); }
.pk-action-card__header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pk-action-card__dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--primary); }
.pk-action-card--success .pk-action-card__dot { background: var(--success); } .pk-action-card--warning .pk-action-card__dot { background: var(--warning); }
.pk-action-card__label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.pk-action-card--success .pk-action-card__label, .pk-action-card--warning .pk-action-card__label { color: var(--muted-foreground); }
.pk-action-card__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pk-action-card__footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.pk-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; font-size: 12px; margin: 0; }
@media (min-width: 480px) { .pk-kv { grid-template-columns: repeat(4, 1fr); } }
.pk-kv dt { color: var(--muted-foreground); } .pk-kv dd { margin: 0; font-size: 14px; font-weight: 500; }
.pk-risk { display: flex; gap: 8px; align-items: flex-start; padding: 12px; border-radius: var(--radius-md); background: var(--warning-dim); font-size: 12px; }
.pk-risk svg { width: 14px; height: 14px; color: var(--warning); flex: none; margin-top: 1px; }

/* Message turns */
.pk-turn { display: flex; gap: 10px; }
.pk-turn--client { justify-content: flex-end; }
.pk-bubble { max-width: 80%; padding: 10px 16px; border-radius: var(--radius-2xl); border-bottom-right-radius: 4px; background: var(--muted); font-size: 14px; white-space: pre-wrap; }
.pk-turn__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 4px; font-size: 14px; line-height: 22px; }
.pk-thinking { display: flex; gap: 4px; align-items: center; padding-top: 12px; }
.pk-thinking span { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--muted-foreground); animation: pk-pulse 1.4s ease-in-out infinite; }
.pk-thinking span:nth-child(2) { animation-delay: 150ms; } .pk-thinking span:nth-child(3) { animation-delay: 300ms; }
@keyframes pk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Added with the second batch of components ─────────────────────────── */

/* Notice */
.pk-notice { display: flex; gap: 10px; padding: 12px; border-radius: var(--radius-md); font-size: 14px; }
.pk-notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pk-notice b { display: block; font-weight: 500; }
.pk-notice b + span { color: var(--muted-foreground); }
.pk-notice--info { background: var(--info-dim); } .pk-notice--info svg { color: var(--info); }
.pk-notice--warning { background: var(--warning-dim); } .pk-notice--warning svg { color: var(--warning); }
.pk-notice--success { background: var(--success-dim); } .pk-notice--success svg { color: var(--success); }
.pk-notice--destructive { background: color-mix(in oklab, var(--destructive) 10%, transparent); } .pk-notice--destructive svg { color: var(--destructive); }
.pk-notice--muted { background: var(--muted); } .pk-notice--muted svg { color: var(--muted-foreground); }

/* Score ring */
.pk-score { --v: 0; --c: var(--success); position: relative; display: grid; place-items: center; border-radius: var(--radius-full); background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--muted) 0); flex: none; }
.pk-score__inner { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--background); }
.pk-score__inner b { font-size: 18px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.pk-score__inner span { margin-top: 2px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }

/* Activity feed */
.pk-feed { position: relative; display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0 0 0 20px; border-left: 1px solid var(--border); list-style: none; }
.pk-feed li { position: relative; font-size: 14px; }
.pk-feed li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: var(--radius-full); background: color-mix(in oklab, var(--muted-foreground) 50%, transparent); box-shadow: 0 0 0 2px var(--background); }
.pk-feed li.is-success::before { background: var(--success); } .pk-feed li.is-destructive::before { background: var(--destructive); } .pk-feed li.is-primary::before { background: var(--primary); } .pk-feed li.is-warning::before { background: var(--warning); }
.pk-feed b { font-weight: 500; }
.pk-feed small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted-foreground); }

/* Section title */
.pk-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pk-section-title h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.pk-section-title p { margin: 0; font-size: 14px; color: var(--muted-foreground); }

/* Top bar */
.pk-topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--background) 80%, transparent); backdrop-filter: blur(8px); }
.pk-topbar__inner { display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px; }
.pk-topbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: inherit; text-decoration: none; }
.pk-topbar__brand i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-md); background: var(--primary); color: var(--primary-foreground); }
.pk-topbar__brand i svg { width: 16px; height: 16px; }
.pk-topbar nav { display: flex; gap: 4px; }
.pk-topbar nav a { padding: 6px 12px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; }
.pk-topbar nav a:hover { color: var(--foreground); }
.pk-topbar nav a[aria-current] { background: var(--muted); color: var(--foreground); }
.pk-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Filter chips (on .pk-chip) */
.pk-chip[aria-pressed="true"] { background: var(--foreground); color: var(--background); box-shadow: inset 0 0 0 1px var(--foreground); }
.pk-chip small { font-variant-numeric: tabular-nums; opacity: .7; }

/* Data table */
.pk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pk-table th { height: 36px; padding: 0 12px; text-align: left; font-weight: 500; color: var(--muted-foreground); border-bottom: 1px solid var(--border); white-space: nowrap; }
.pk-table th:first-child, .pk-table td:first-child { padding-left: 24px; } .pk-table th:last-child, .pk-table td:last-child { padding-right: 24px; }
.pk-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pk-table tr:last-child td { border-bottom: 0; }
.pk-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.pk-table th button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.pk-table th button.is-sorted { color: var(--foreground); }
.pk-table th button svg { width: 14px; height: 14px; }
.pk-table tbody tr.is-link:hover { background: color-mix(in oklab, var(--muted) 60%, transparent); }

/* Overlays and forms (static renditions for the gallery) */
.pk-dialog { width: 100%; max-width: 448px; border-radius: var(--radius-xl); background: var(--popover); color: var(--popover-foreground); box-shadow: 0 0 0 1px var(--border), 0 10px 30px -12px rgba(0,0,0,.35); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.pk-dialog h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.pk-dialog p { margin: 4px 0 0; font-size: 14px; color: var(--muted-foreground); }
.pk-dialog__footer { display: flex; justify-content: flex-end; gap: 8px; }
.pk-sheet { width: 100%; max-width: 448px; height: 100%; display: flex; flex-direction: column; background: var(--popover); color: var(--popover-foreground); border-left: 1px solid var(--border); box-shadow: -10px 0 30px -12px rgba(0,0,0,.25); }
.pk-sheet__header { min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 48px 12px 24px; border-bottom: 1px solid var(--border); }
.pk-sheet__header b { font-size: 16px; font-weight: 600; } .pk-sheet__header span { font-size: 12px; color: var(--muted-foreground); }
.pk-sheet__body { flex: 1; min-height: 0; overflow: auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.pk-sheet__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); }
.pk-form-section { display: flex; flex-direction: column; gap: 20px; }
.pk-form-section h3 { margin: 0; font-size: 14px; font-weight: 500; } .pk-form-section h3 + p { margin: -16px 0 0; font-size: 14px; color: var(--muted-foreground); }
.pk-form-section__grid { display: grid; gap: 24px; } @media (min-width: 640px) { .pk-form-section__grid { grid-template-columns: 1fr 1fr; } .pk-form-section__grid .span-2 { grid-column: 1 / -1; } }
.pk-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); padding-top: 20px; }
.pk-form-actions small { margin-right: auto; font-size: 12px; color: var(--muted-foreground); }

/* Job runner family */
.pk-progress { display: flex; flex-direction: column; gap: 6px; }
.pk-progress__line { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted-foreground); }
.pk-progress__line b { font-weight: 400; font-variant-numeric: tabular-nums; }
.pk-progress__track { width: 100%; height: 8px; border-radius: var(--radius-full); background: var(--muted); overflow: hidden; }
.pk-progress__track--sm { height: 6px; }
.pk-progress__fill { height: 100%; border-radius: var(--radius-full); background: var(--primary); }
.pk-progress__fill--info { background: var(--info); } .pk-progress__fill--success { background: var(--success); } .pk-progress__fill--destructive { background: var(--destructive); }
.pk-job { display: flex; align-items: flex-start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pk-job:first-child { padding-top: 0; } .pk-job:last-child { padding-bottom: 0; border-bottom: 0; }
.pk-job__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pk-job__label { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-job__when { font-size: 12px; color: var(--muted-foreground); } .pk-job__when i { font-style: normal; color: var(--destructive); }
.pk-job__side { display: flex; align-items: center; gap: 12px; flex: none; }
.pk-job__summary { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pk-steps li { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pk-steps li:first-child { padding-top: 0; } .pk-steps li:last-child { padding-bottom: 0; border-bottom: 0; }
.pk-step { display: flex; align-items: center; gap: 12px; }
.pk-step svg { width: 16px; height: 16px; flex: none; }
.pk-step__label { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-step--pending .pk-step__label, .pk-step--pending svg { color: color-mix(in oklab, var(--muted-foreground) 60%, transparent); }
.pk-step--working svg { color: var(--info); animation: pk-spin 1s linear infinite; } .pk-step--done svg { color: var(--success); } .pk-step--failed svg { color: var(--destructive); }
.pk-step__msg { font-size: 12px; color: var(--muted-foreground); }
.pk-step__log { margin: 0 0 0 28px; padding: 8px 12px; border-radius: var(--radius-md); background: var(--muted); color: var(--muted-foreground); font-family: var(--font-mono); font-size: 11px; line-height: 1.6; }
@keyframes pk-spin { to { transform: rotate(360deg); } }
.pk-stepper { display: flex; list-style: none; margin: 0; padding: 0; }
.pk-stepper li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 8px; }
.pk-stepper li::after { content: ""; position: absolute; top: 16px; left: 50%; width: 100%; height: 1px; background: var(--border); }
.pk-stepper li:last-child::after { display: none; } .pk-stepper li.is-done::after { background: var(--success); }
.pk-stepper i { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--muted); color: var(--muted-foreground); font-style: normal; font-size: 14px; font-weight: 600; box-shadow: 0 0 0 4px var(--background); }
.pk-stepper li.is-active i { background: var(--primary); color: var(--primary-foreground); } .pk-stepper li.is-done i { background: var(--success-dim); color: var(--success); }
.pk-stepper b { display: block; font-size: 14px; font-weight: 400; color: var(--muted-foreground); } .pk-stepper li.is-active b { font-weight: 500; color: var(--foreground); }
.pk-stepper small { font-size: 12px; color: var(--muted-foreground); }
.pk-watch { display: flex; flex-direction: column; gap: 24px; }
.pk-watch__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pk-watch__head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 8px; }
.pk-watch__head p { margin: 4px 0 0; font-size: 14px; color: var(--muted-foreground); }
.pk-watch__card { padding: 20px; border-radius: var(--radius-xl); box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent); }
