/*
 * PromptForm premium React islands.
 * These styles intentionally inherit the Quiet Ledger token system and keep
 * all edge shadows, white halos, glow, and glass blur disabled.
 */

.premium-iridescence-root,
.premium-rive-hero-root,
.premium-flow-beam-root,
.premium-library-search-root,
.premium-route-loader-root,
.premium-prompt-processing-root,
.premium-profile-dropdown-root,
.premium-auth-letter-glitch-root,
.premium-profile-completion-root,
.premium-output-state-root,
.premium-result-tabs-root,
.premium-insights-root {
  isolation: isolate;
}

/* Exact-template integration: shared primitives */

.pf-mouse-effect-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--pf-rule-strong);
  border-radius: var(--pf-radius-panel);
  color: var(--pf-text);
  background: var(--pf-surface);
}

.pf-mouse-effect-content {
  position: relative;
  width: 100%;
  min-height: 230px;
  overflow: hidden;
  outline: 0;
}

.pf-mouse-effect-content:focus-visible {
  outline: 2px solid var(--pf-focus);
  outline-offset: -3px;
}

.pf-mouse-effect-dot {
  position: absolute;
  z-index: 0;
  display: block;
  border-radius: 999px;
  background: var(--pf-faint);
  will-change: transform;
}

.pf-mouse-effect-top,
.pf-mouse-effect-footer,
.pf-mouse-effect-center {
  position: absolute;
  z-index: 2;
}

.pf-mouse-effect-top {
  top: 18px;
  left: 18px;
  display: grid;
  gap: 2px;
}

.pf-mouse-effect-top strong {
  color: var(--pf-text);
  font-size: 12px;
}

.pf-mouse-effect-top span,
.pf-mouse-effect-footer {
  color: var(--pf-muted);
  font: 10px/1.4 var(--font-mono, ui-monospace, monospace);
}

.pf-mouse-effect-center {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 56px 18px 42px;
}

.pf-mouse-effect-center h3 {
  margin: 0;
  font-size: 1.5rem;
}

.pf-mouse-effect-footer {
  right: 18px;
  bottom: 14px;
  left: 18px;
  margin: 0;
  text-align: center;
}

.pf-profile-dropdown {
  position: relative;
  width: min(100%, 460px);
}

.pf-profile-dropdown-trigger-wrap {
  position: relative;
}

.pf-profile-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--pf-rule);
  border-radius: var(--pf-radius-panel);
  color: var(--pf-text);
  background: var(--pf-surface);
  cursor: pointer;
  transition:
    border-color var(--pf-motion),
    background var(--pf-motion);
}

.pf-profile-dropdown-trigger:hover {
  border-color: var(--pf-rule-strong);
  background: var(--pf-surface-raised);
}

.pf-profile-dropdown-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 3px;
  text-align: left;
}

.pf-profile-dropdown-copy strong,
.pf-profile-dropdown-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-profile-dropdown-copy strong {
  font-size: 0.9rem;
}

.pf-profile-dropdown-copy small {
  color: var(--pf-muted);
  font-size: 0.73rem;
}

.pf-profile-avatar {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--pf-rule-strong);
  border-radius: 999px;
  color: var(--pf-text);
  background: var(--pf-surface-sunken);
  font: 600 12px/1 var(--font-mono, ui-monospace, monospace);
}

.pf-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-profile-bend {
  position: absolute;
  top: 50%;
  right: -15px;
  width: 12px;
  height: 24px;
  color: var(--pf-muted);
  transform: translateY(-50%);
  transition:
    color var(--pf-motion),
    transform var(--pf-motion);
}

.pf-profile-bend[data-open="true"] {
  color: var(--pf-accent);
  transform: translateY(-50%) scale(1.1);
}

.pf-profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  width: min(300px, calc(100vw - 32px));
  padding: 7px;
  border: 1px solid var(--pf-rule-strong);
  border-radius: var(--pf-radius-panel);
  background: var(--pf-surface);
  box-shadow: none;
}

.pf-profile-menu-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: var(--pf-radius-control);
  color: var(--pf-text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.pf-profile-menu-item:hover,
.pf-profile-menu-item:focus-visible {
  border-color: var(--pf-rule);
  background: var(--pf-surface-raised);
}

.pf-profile-menu-item small {
  max-width: 118px;
  overflow: hidden;
  padding: 3px 5px;
  border: 1px solid var(--pf-rule);
  border-radius: 4px;
  color: var(--pf-accent);
  background: var(--pf-surface-sunken);
  font: 9px/1.2 var(--font-mono, ui-monospace, monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-profile-menu-separator {
  display: block;
  height: 1px;
  margin: 6px 4px;
  background: var(--pf-rule);
}

.pf-profile-signout {
  color: var(--pf-danger);
  background: color-mix(in srgb, var(--pf-danger) 7%, var(--pf-surface));
}

.pf-library-action-search {
  position: relative;
  z-index: 60;
  display: grid;
  gap: 8px;
}

.pf-library-action-search > label {
  color: var(--pf-text);
  font-size: 0.76rem;
  font-weight: 600;
}

.pf-library-search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--pf-rule-strong);
  border-radius: var(--pf-radius-control);
  background: var(--pf-surface);
}

.pf-library-search-field:focus-within {
  border-color: var(--pf-focus);
  outline: 2px solid color-mix(in srgb, var(--pf-focus) 24%, transparent);
  outline-offset: 1px;
}

.pf-library-search-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 82px 0 42px;
  border: 0;
  outline: 0;
  color: var(--pf-text);
  background: transparent;
  font-size: 0.82rem;
}

.pf-library-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--pf-muted);
  transform: translateY(-50%);
}

.pf-library-search-icon > span {
  position: absolute;
  display: grid;
  place-items: center;
}

.pf-library-search-field > button {
  position: absolute;
  right: 8px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--pf-rule);
  border-radius: 5px;
  color: var(--pf-muted);
  background: var(--pf-surface-raised);
  font-size: 0.68rem;
  cursor: pointer;
}

.pf-library-search-results {
  position: absolute;
  top: 76px;
  right: 0;
  left: 0;
  z-index: 64;
  overflow: hidden;
  border: 1px solid var(--pf-rule-strong);
  border-radius: var(--pf-radius-control);
  background: var(--pf-surface);
  box-shadow: none;
}

.pf-library-search-results ul {
  max-height: min(330px, 48vh);
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
}

.pf-library-search-results li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--pf-text);
  cursor: pointer;
}

.pf-library-search-results li:hover,
.pf-library-search-results li[data-active="true"] {
  background: var(--pf-surface-raised);
}

.pf-library-search-results li > span {
  display: grid;
  gap: 2px;
}

.pf-library-search-results li strong {
  font-size: 0.78rem;
}

.pf-library-search-results li small {
  color: var(--pf-muted);
  font-size: 0.68rem;
}

.pf-library-search-results .pf-library-search-empty {
  color: var(--pf-muted);
  cursor: default;
}

.pf-library-search-help,
.pf-library-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pf-library-search-help {
  padding: 8px 12px;
  border-top: 1px solid var(--pf-rule);
  color: var(--pf-muted);
  font: 9px/1.4 var(--font-mono, ui-monospace, monospace);
}

.pf-library-search-meta p {
  flex: 1;
  margin: 0;
  font-size: 0.7rem;
}

.pf-library-search-meta button,
.pf-library-search-meta > span {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--pf-rule);
  border-radius: 5px;
  color: var(--pf-accent);
  background: var(--pf-surface-raised);
  font-size: 0.65rem;
}

.pf-profile-setup {
  display: grid;
  gap: 14px;
}

.pf-profile-setup-heading {
  display: grid;
  gap: 2px;
  text-align: center;
}

.pf-profile-setup-heading h3,
.pf-profile-setup-heading p {
  margin: 0;
}

.pf-profile-setup-heading h3 {
  color: var(--pf-text);
  font-size: 0.94rem;
}

.pf-profile-setup-heading p {
  color: var(--pf-muted);
  font-size: 0.68rem;
}

.pf-avatar-stage {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto;
}

.pf-avatar-stage-ring,
.pf-avatar-stage-image {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.pf-avatar-stage-image {
  overflow: hidden;
}

.pf-avatar-stage-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pf-avatar-name {
  color: var(--pf-muted);
  font: 9px/1.3 var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.pf-avatar-options {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pf-avatar-options > button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--pf-rule);
  border-radius: 10px;
  background: var(--pf-surface-sunken);
  cursor: pointer;
  opacity: 0.56;
}

.pf-avatar-options > button:hover,
.pf-avatar-options > button[data-selected="true"] {
  opacity: 1;
}

.pf-avatar-options > button[data-selected="true"] {
  border-color: var(--pf-accent);
  outline: 2px solid color-mix(in srgb, var(--pf-accent) 42%, transparent);
  outline-offset: 2px;
}

.pf-avatar-options img {
  width: 100%;
  height: 100%;
}

.pf-avatar-check {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--pf-accent);
}

.pf-profile-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pf-profile-name-grid label {
  display: grid;
  gap: 5px;
}

.pf-profile-name-grid label > span {
  color: var(--pf-text);
  font-size: 0.68rem;
  font-weight: 600;
}

.pf-profile-name-grid input {
  width: 100%;
  min-height: 40px;
}

.pf-profile-complete-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.pf-loader {
  --pf-loader-ink: rgb(0, 0, 0);
  --pf-loader-ink-soft: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 18px;
  color: var(--pf-text);
}

.app-shell[data-theme="dark"] .pf-loader {
  --pf-loader-ink: rgb(255, 255, 255);
  --pf-loader-ink-soft: rgba(255, 255, 255, 0.58);
}

.pf-loader-ring {
  position: relative;
}

.pf-loader-ring-sm {
  width: 80px;
  height: 80px;
}

.pf-loader-ring-md {
  width: 128px;
  height: 128px;
}

.pf-loader-ring-lg {
  width: 160px;
  height: 160px;
}

.pf-loader-layer {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.pf-loader-copy {
  display: grid;
  max-width: 260px;
  gap: 7px;
  text-align: center;
}

.pf-loader-copy strong {
  color: var(--pf-text);
  letter-spacing: -0.015em;
}

.pf-loader-copy > span {
  color: var(--pf-muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

.pf-loader-title-sm {
  font-size: 0.82rem;
}

.pf-loader-title-md {
  font-size: 0.96rem;
}

.pf-loader-title-lg {
  font-size: 1.08rem;
}

.pf-ai-text-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 10px;
}

.pf-ai-text-loading-inner {
  position: relative;
  width: 100%;
  padding: 8px;
}

.pf-ai-text {
  min-width: max-content;
  background: linear-gradient(
    90deg,
    var(--pf-text),
    var(--pf-muted),
    var(--pf-text)
  );
  background-clip: text;
  background-position: 200% center;
  background-size: 200% 100%;
  color: transparent;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-align: center;
  -webkit-background-clip: text;
}

#view-studio .prompt-transformation-loader {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#premium-prompt-processing-root,
#premium-library-search-root,
#premium-profile-dropdown-root {
  width: 100%;
}

#view-settings .settings-profile-card {
  display: block;
  overflow: visible;
  position: relative;
  z-index: 5;
}

#view-settings .settings-profile-card > #premium-profile-dropdown-root {
  max-width: 460px;
}

.route-loader-card:has(#premium-route-loader-root) {
  padding: 12px;
}

.profile-name-dialog form {
  width: min(540px, calc(100vw - 24px));
}

@media (max-width: 720px) {
  .pf-profile-name-grid {
    grid-template-columns: 1fr;
  }

  .pf-profile-bend {
    display: none;
  }

  .pf-library-search-field input {
    padding-right: 70px;
  }

  .pf-library-search-results {
    position: fixed;
    top: max(70px, env(safe-area-inset-top));
    right: 12px;
    left: 12px;
  }

  .pf-mouse-effect-content {
    min-height: 210px;
  }
}

@media (max-width: 430px) {
  .pf-avatar-stage {
    width: 92px;
    height: 92px;
  }

  .pf-avatar-options {
    gap: 7px;
  }

  .pf-avatar-options > button {
    width: 42px;
    height: 42px;
  }

  .pf-profile-dropdown-trigger {
    gap: 14px;
  }

  .pf-ai-text {
    min-width: 0;
    font-size: 1.18rem;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-profile-dropdown-trigger,
  .pf-profile-bend {
    transition: none;
  }
}

input,
textarea,
select,
.status-badge,
.usage-estimate,
.score-meter,
.prompt-transformation-loader,
.prompt-generation-error,
.pf-rive-canvas,
.pf-insight-chart {
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.landing-hero {
  position: relative;
  overflow: hidden;
}

.premium-iridescence-root {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.12;
  background:
    radial-gradient(circle at 76% 32%, rgba(22, 139, 135, 0.12), transparent 32%),
    radial-gradient(circle at 90% 65%, rgba(98, 84, 199, 0.1), transparent 34%);
}

.premium-react-ready .landing-hero > :not(.premium-iridescence-root) {
  position: relative;
  z-index: 1;
}

.pf-iridescence,
.pf-iridescence canvas {
  width: 100%;
  height: 100%;
}

.pf-iridescence canvas {
  display: block;
  pointer-events: none;
}

.pf-iridescence[data-fallback="true"] {
  background: linear-gradient(135deg, rgba(22, 139, 135, 0.1), rgba(98, 84, 199, 0.08));
}

.premium-rive-hero-root {
  width: 92px;
  margin: 0 0 var(--space-4) auto;
}

.pf-rive-hero,
.pf-rive-state {
  margin: 0;
}

.pf-rive-canvas {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--pf-rule);
  border-radius: 3px;
  background: var(--pf-raised);
  box-shadow: none;
}

.pf-rive-canvas canvas,
.pf-rive-state-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pf-rive-hero figcaption,
.pf-rive-state figcaption a {
  color: var(--pf-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
}

.pf-rive-hero figcaption {
  margin-top: 5px;
  text-align: right;
}

.pf-rive-hero figcaption a,
.pf-rive-state figcaption a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.pf-rive-fallback {
  display: grid;
  grid-template-columns: repeat(3, 12px);
  place-content: center;
  gap: 7px;
  width: 100%;
  height: 100%;
}

.pf-rive-fallback > span {
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--pf-accent);
  border-radius: 50%;
}

.pf-rive-fallback > span:nth-child(2) {
  border-radius: 1px;
  border-color: #6254c7;
}

.pf-rive-fallback small {
  grid-column: 1 / -1;
  color: var(--pf-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: center;
}

.premium-flow-beam-root {
  margin: var(--space-6) 0;
}

.premium-react-ready .landing-steps > ol {
  border-top: 1px solid var(--pf-rule);
}

.pf-flow-beam {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
  min-height: 155px;
  padding: var(--space-5) 0 var(--space-4);
  border-top: 1px solid var(--pf-rule);
  border-bottom: 1px solid var(--pf-rule);
}

.pf-flow-node {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  color: var(--pf-text);
  text-align: center;
}

.pf-flow-node > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--pf-rule-strong);
  border-radius: 50%;
  background: var(--pf-canvas);
  color: var(--pf-accent);
}

.pf-flow-node strong {
  max-width: 130px;
  font-size: 13px;
  font-weight: 600;
}

.pf-animated-beam {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.pf-animated-beam-track,
.pf-animated-beam-line {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.pf-animated-beam-track {
  stroke: var(--pf-rule);
  stroke-width: 1;
}

.pf-animated-beam-line {
  stroke-width: 1.5;
  stroke-linecap: round;
}

.pf-flow-beam > p {
  grid-column: 1 / -1;
  margin: var(--space-3) auto 0;
  max-width: 700px;
  color: var(--pf-muted);
  font-size: 13px;
  text-align: center;
}

.landing-steps .pf-flow-beam {
  border-color: var(--pf-rule-dark);
}

.landing-steps .pf-flow-node {
  color: var(--pf-text-dark);
}

.landing-steps .pf-flow-node > span {
  border-color: var(--pf-rule-dark);
  background: var(--pf-raised);
}

.landing-steps .pf-flow-beam > p,
.landing-steps .pf-rive-hero figcaption,
.landing-steps .pf-rive-hero figcaption a {
  color: var(--pf-muted-dark);
}

.landing-steps .pf-animated-beam-track {
  stroke: var(--pf-rule-dark);
}

.pf-chart-state {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px dashed var(--pf-rule);
  color: var(--pf-muted);
  text-align: center;
}

.pf-chart-state strong {
  color: var(--pf-text);
}


.output-card {
  position: relative;
}

.pf-border-beam {
  position: absolute;
  inset: -1px;
  z-index: 4;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 3px;
  pointer-events: none;
  mask:
    linear-gradient(transparent, transparent) padding-box,
    linear-gradient(#000, #000) border-box;
  mask-composite: intersect;
}

.pf-border-beam > span {
  position: absolute;
  width: 70px;
  aspect-ratio: 1;
  background: linear-gradient(90deg, var(--pf-beam-from), var(--pf-beam-to), transparent);
}

.premium-output-state-root {
  position: relative;
  min-height: 0;
}

.pf-output-state {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 0;
  margin: 0 0 var(--space-3);
}

.pf-silk {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border: 1px solid var(--pf-rule);
  border-radius: 2px;
  opacity: 0.12;
  pointer-events: none;
}

.pf-silk canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.pf-rive-state {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 46px;
  padding: 5px 0;
}

.pf-rive-state-canvas {
  width: 64px;
  height: 36px;
  overflow: hidden;
}

.pf-rive-state figcaption {
  display: grid;
  gap: 1px;
  text-align: right;
}

.pf-rive-state figcaption > span {
  color: var(--pf-text);
  font-size: 11px;
  font-weight: 600;
}

.pf-rive-state figcaption a {
  font-size: 8px;
}

.pf-completion-mark {
  width: 34px;
  height: 34px;
  margin-left: var(--space-3);
}

.pf-completion-mark path {
  fill: none;
  stroke: var(--pf-success);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.premium-result-tabs-root {
  margin-top: var(--space-5);
}

.premium-react-ready .prompt-format-control {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.pf-smooth-tabs {
  display: grid;
  gap: var(--space-2);
}

.pf-smooth-tabs-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--pf-rule);
  border-bottom: 1px solid var(--pf-rule);
}

.pf-smooth-tabs-list button {
  position: relative;
  min-height: 42px;
  padding: 0 var(--space-3);
  border: 0;
  border-right: 1px solid var(--pf-rule);
  background: transparent;
  color: var(--pf-muted);
  font-size: 12px;
  cursor: pointer;
}

.pf-smooth-tabs-list button:last-child {
  border-right: 0;
}

.pf-smooth-tabs-list button[aria-selected="true"] {
  color: var(--pf-text);
  font-weight: 600;
}

.pf-smooth-tabs-indicator {
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: 2px;
  background: var(--pf-surface-selected);
}

.pf-smooth-tabs-description {
  min-height: 18px;
  margin: 0;
  color: var(--pf-muted);
  font-size: 11px;
}

.premium-insights-root {
  margin-top: var(--space-5);
}

.pf-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--pf-rule);
}

.pf-insight-chart {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--pf-rule);
  border-radius: 3px;
  background: color-mix(in srgb, var(--pf-raised) 76%, transparent);
}

.pf-insight-chart-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.pf-insight-chart-heading > div {
  display: grid;
  gap: 2px;
}

.pf-insight-chart-heading span {
  color: var(--pf-accent);
  font: 9px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-insight-chart-heading h3 {
  margin: 0;
  font: 22px/1.1 var(--font-serif);
}

.pf-insight-chart-heading > strong {
  color: var(--pf-accent);
  font: 20px/1 var(--font-mono);
}

.pf-line-chart-frame {
  width: 100%;
  height: 220px;
}

.pf-chart-grid,
.pf-radar-grid,
.pf-radar-axis {
  stroke: var(--pf-rule);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.pf-line-chart-path {
  fill: none;
  stroke: var(--pf-accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.pf-line-chart-point {
  fill: var(--pf-raised);
  stroke: var(--pf-accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.pf-chart-axis-label,
.pf-radar-label {
  fill: var(--pf-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.pf-chart-hover-line {
  stroke: var(--pf-rule-strong);
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}

.pf-chart-tooltip rect {
  fill: var(--pf-raised);
  stroke: var(--pf-rule-strong);
}

.pf-chart-tooltip text {
  fill: var(--pf-text);
  font: 9px var(--font-mono);
}

.pf-chart-summary {
  margin: var(--space-3) 0 0;
  color: var(--pf-muted);
  font-size: 11px;
}

.pf-radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--pf-muted);
  font-size: 10px;
}

.pf-radar-legend span::before {
  display: inline-block;
  width: 13px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  content: "";
}

.pf-radar-legend [data-series="original"]::before {
  background: #6254c7;
}

.pf-radar-legend [data-series="optimised"]::before {
  background: var(--pf-accent);
}

.pf-radar-frame {
  width: 100%;
  height: 260px;
}

.pf-radar-area {
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.pf-radar-area-original {
  fill: rgba(98, 84, 199, 0.08);
  stroke: #6254c7;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.pf-radar-area-optimised {
  fill: rgba(8, 127, 114, 0.11);
  stroke: var(--pf-accent);
  stroke-width: 2;
}

.pf-radar-table {
  margin-top: var(--space-3);
  color: var(--pf-muted);
  font-size: 11px;
}

.pf-radar-table summary {
  color: var(--pf-text);
  cursor: pointer;
}

.pf-radar-table table {
  width: 100%;
  margin-top: var(--space-3);
  border-collapse: collapse;
}

.pf-radar-table th,
.pf-radar-table td {
  padding: 6px;
  border-bottom: 1px solid var(--pf-rule);
  text-align: left;
}

.pf-radar-table td {
  font-family: var(--font-mono);
  text-align: right;
}

.pf-visual-fallback {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: var(--pf-muted);
  font-size: 10px;
}

@media (max-width: 1120px) {
  .pf-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .premium-rive-hero-root {
    display: none;
  }

  .pf-flow-beam {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: var(--space-3);
  }

  .pf-flow-node {
    grid-template-columns: 42px 1fr;
    justify-items: start;
    text-align: left;
  }

  .pf-flow-node strong {
    align-self: center;
    max-width: none;
  }

  .pf-animated-beam {
    display: none;
  }

  .pf-flow-beam > p {
    text-align: left;
  }

}

@media (max-width: 560px) {
  .premium-flow-beam-root {
    margin-block: var(--space-4);
  }

  .pf-flow-beam {
    padding-block: var(--space-4);
  }

  .pf-smooth-tabs-list button {
    padding-inline: 6px;
    font-size: 11px;
  }

  .pf-insight-chart {
    padding: var(--space-3);
  }

  .pf-radar-frame {
    height: 230px;
  }

  .pf-line-chart-frame {
    height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-iridescence-root {
    opacity: 0.09;
  }

  .pf-animated-beam-line {
    display: none;
  }

  .pf-silk {
    opacity: 0.07;
  }

  .pf-smooth-tabs-indicator {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .premium-iridescence-root,
  .pf-silk,
  .pf-border-beam {
    display: none;
  }

  .pf-flow-node > span,
  .pf-insight-chart {
    border-color: CanvasText;
  }
}
