@scope (.pfx-colors-root) {
:scope {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pfx-bg: #09090a;
  --pfx-panel: #101012;
  --pfx-line: #2a2a2e;
  --pfx-line-strong: #4a4a50;
  --pfx-text: #f5f5f2;
  --pfx-muted: #94949d;
  --pfx-red: #0753ff;
  --pfx-hue: 0;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
  background: var(--pfx-bg);
  color: var(--pfx-text);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--pfx-red);
  outline-offset: 2px;
}

.pfx-l-app {
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 72px;
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--pfx-bg);
  background-size: 32px 32px;
}

.pfx-c-header,
.pfx-c-dock {
  position: relative;
  z-index: 10;
  display: grid;
  align-items: stretch;
  border-color: var(--pfx-line);
  background: rgba(9, 9, 10, 0.96);
  backdrop-filter: blur(12px);
}

.pfx-c-header {
  grid-template-columns: minmax(220px, 1fr) auto minmax(180px, 1fr);
  border-bottom: 1px solid var(--pfx-line);
}

.pfx-c-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 18px;
  gap: 10px;
}

.pfx-c-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.pfx-c-brand strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.pfx-c-brand > span,
.pfx-c-engine-label {
  color: var(--pfx-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.pfx-c-brand > span {
  margin-left: 4px;
}

.pfx-c-brand__beta {
  padding: 4px 7px;
  border: 1px solid #7a7a84;
  background: #202025;
  color: #ffffff;
  font: 10px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.pfx-c-engine-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 18px;
}

.pfx-c-tabs {
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--pfx-line);
  border-right: 1px solid var(--pfx-line);
}

.pfx-c-tabs button {
  display: flex;
  min-width: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--pfx-line);
  background: transparent;
  color: #bcbcc2;
  cursor: pointer;
}

.pfx-c-tabs button:last-child {
  border-right: 0;
}

.pfx-c-tabs button:hover,
.pfx-c-tabs button.pfx-is-current {
  background: #151518;
  color: var(--pfx-text);
}

.pfx-c-tabs button.pfx-is-current {
  box-shadow: inset 0 -2px 0 var(--pfx-red);
}

.pfx-c-tabs kbd {
  color: #676770;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-l-stage {
  min-height: 0;
  overflow: hidden;
}

.pfx-c-workbench {
  width: 100%;
  height: 100%;
}

.pfx-c-workbench--picker,
.pfx-c-workbench--harmony,
.pfx-c-workbench--gradient {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.pfx-c-picker-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) 92px;
  border-right: 1px solid var(--pfx-line);
  background: #0b0b0d;
}

.pfx-c-color-field {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  background:
    linear-gradient(to top, #000 0%, transparent 72%),
    linear-gradient(to right, #fff 0%, hsl(var(--pfx-hue) 100% 50%) 100%);
  border-bottom: 1px solid var(--pfx-line);
}

.pfx-c-color-field::before,
.pfx-c-color-field::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.pfx-c-color-field::before {
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.16), transparent 38%);
  mix-blend-mode: soft-light;
}

.pfx-c-color-field::after {
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.pfx-c-color-field:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(255,0,20,0.72);
}

.pfx-c-color-cursor {
  position: absolute;
  z-index: 4;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition:
    width 110ms ease,
    height 110ms ease,
    filter 110ms ease;
}

.pfx-c-color-field.pfx-is-active .pfx-c-color-cursor {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.34));
}

.pfx-c-color-cursor::before,
.pfx-c-color-cursor::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  content: "";
}

.pfx-c-color-cursor::before {
  border: 3px solid #fff;
  box-shadow:
    0 0 0 2px #08080a,
    0 5px 18px rgba(0,0,0,0.42);
}

.pfx-c-color-cursor::after {
  inset: 5px;
  border: 1px solid rgba(0,0,0,0.72);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.55);
}

.pfx-c-color-cursor__swatch {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--pfx-picked-color);
}

.pfx-c-color-cursor__crosshair {
  position: absolute;
  inset: 50%;
  z-index: 2;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #000;
}

.pfx-c-color-cursor__crosshair::before,
.pfx-c-color-cursor__crosshair::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.45);
  content: "";
}

.pfx-c-color-cursor__crosshair::before {
  width: 16px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.pfx-c-color-cursor__crosshair::after {
  width: 1px;
  height: 16px;
  transform: translate(-50%, -50%);
}

.pfx-c-color-cursor__readout {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  display: grid;
  min-width: 118px;
  transform: translateY(-50%) translateX(-4px);
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(8,8,10,0.88);
  color: #f4f4f1;
  opacity: 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.26);
  transition:
    opacity 100ms ease,
    transform 100ms ease;
  white-space: nowrap;
}

.pfx-c-color-field.pfx-is-active .pfx-c-color-cursor__readout {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.pfx-c-color-cursor__readout > strong {
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pfx-c-color-cursor__readout > small {
  color: #a4a4ad;
  font: 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
}

.pfx-c-color-cursor.pfx-is-right-edge .pfx-c-color-cursor__readout {
  right: calc(100% + 12px);
  left: auto;
}

.pfx-c-color-cursor.pfx-is-top-edge .pfx-c-color-cursor__readout {
  top: calc(100% + 12px);
  transform: translateX(-50%) translateY(-4px);
}

.pfx-c-color-field.pfx-is-active
  .pfx-c-color-cursor.pfx-is-top-edge
  .pfx-c-color-cursor__readout {
  transform: translateX(-50%) translateY(0);
}

.pfx-c-color-cursor.pfx-is-top-edge.pfx-is-left-edge .pfx-c-color-cursor__readout {
  left: 0;
  right: auto;
  transform: translateY(-4px);
}

.pfx-c-color-field.pfx-is-active
  .pfx-c-color-cursor.pfx-is-top-edge.pfx-is-left-edge
  .pfx-c-color-cursor__readout {
  transform: translateY(0);
}

.pfx-c-color-cursor.pfx-is-top-edge.pfx-is-right-edge .pfx-c-color-cursor__readout {
  right: 0;
  left: auto;
  transform: translateY(-4px);
}

.pfx-c-color-field.pfx-is-active
  .pfx-c-color-cursor.pfx-is-top-edge.pfx-is-right-edge
  .pfx-c-color-cursor__readout {
  transform: translateY(0);
}

.pfx-c-color-field > span {
  position: absolute;
  z-index: 2;
  left: 26px;
  bottom: 24px;
  color: rgba(255, 255, 255, 0.72);
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
}

.pfx-c-picker-controls {
  display: grid;
  min-width: 0;
  align-items: center;
  padding: 24px 26px 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), transparent 70%),
    #0c0c0e;
}

.pfx-c-picker-hue {
  position: relative;
  width: 100%;
  height: 18px;
  border: 1px solid #393940;
  background: linear-gradient(
    90deg,
    #ff0000 0%,
    #ffff00 16.666%,
    #00ff00 33.333%,
    #00ffff 50%,
    #0000ff 66.666%,
    #ff00ff 83.333%,
    #ff0000 100%
  );
  box-shadow:
    0 0 0 1px #08080a,
    inset 0 1px 0 rgba(255,255,255,0.12);
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.pfx-c-picker-hue::before {
  position: absolute;
  inset: -12px 0;
  content: "";
}

.pfx-c-picker-hue__handle {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 18px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 3px solid #f5f5f2;
  border-radius: 4px;
  box-shadow:
    0 0 0 2px #08080a,
    0 8px 24px rgba(0,0,0,0.42);
  pointer-events: none;
}

.pfx-c-picker-hue output {
  position: absolute;
  right: 0;
  bottom: -22px;
  color: #a4a4ad;
  font: 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.pfx-c-picker-hue:focus-visible {
  outline: 2px solid var(--pfx-red);
  outline-offset: 5px;
}

.pfx-c-console,
.pfx-c-harmony-deck,
.pfx-c-gradient-deck {
  min-width: 0;
  overflow-y: auto;
  background: rgba(13, 13, 15, 0.95);
}

.pfx-c-console {
  display: flex;
  flex-direction: column;
}

.pfx-c-color-block {
  position: relative;
  min-height: 190px;
  border-bottom: 1px solid var(--pfx-line);
}

.pfx-c-color-block strong {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 5px 7px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-slider {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 72px;
  align-items: center;
  min-height: 66px;
  padding: 0 18px;
  border-bottom: 1px solid var(--pfx-line);
  gap: 12px;
}

.pfx-c-slider > span,
.pfx-c-select > span {
  color: #c8c8cd;
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.pfx-c-slider output {
  color: #d6d6dc;
  text-align: right;
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-slider input[type="range"],
.pfx-c-stop input[type="range"] {
  width: 100%;
  height: 3px;
  margin: 0;
  appearance: none;
  background: #38383e;
  cursor: ew-resize;
}

.pfx-c-slider input[type="range"]::-webkit-slider-thumb,
.pfx-c-stop input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  appearance: none;
  border: 2px solid #09090a;
  border-radius: 50%;
  background: #f5f5f2;
  box-shadow: 0 0 0 1px #cfcfd5;
}

.pfx-c-slider input.pfx-is-hue {
  height: 8px;
  background: linear-gradient(
    90deg,
    #ff0000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
}

.pfx-c-readouts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: auto;
}

.pfx-c-readouts > div {
  min-height: 78px;
  padding: 14px 18px;
  border-top: 1px solid var(--pfx-line);
  border-right: 1px solid var(--pfx-line);
}

.pfx-c-readouts > div:nth-child(2n) {
  border-right: 0;
}

.pfx-c-readouts small,
.pfx-c-panel small {
  display: block;
  margin-bottom: 8px;
  color: var(--pfx-muted);
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.pfx-c-readouts strong {
  font: 14px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-workbench--palette {
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto;
}

.pfx-c-palette-ribbon {
  display: flex;
  min-height: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--pfx-line);
}

.pfx-c-palette-ribbon button {
  position: relative;
  flex: 1 1 0;
  min-width: 74px;
  min-height: 220px;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: flex 180ms ease;
}

.pfx-c-palette-ribbon button:hover {
  flex-grow: 1.35;
}

.pfx-c-palette-ribbon span,
.pfx-c-palette-ribbon small {
  position: absolute;
  bottom: 16px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-palette-ribbon span {
  left: 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.pfx-c-palette-ribbon small {
  right: 10px;
}

.pfx-c-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(4, minmax(150px, 0.7fr));
  min-height: 190px;
  background: #0d0d0f;
}

.pfx-c-panel__heading {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-right: 1px solid var(--pfx-line);
}

.pfx-c-panel h1 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 54px);
  font-weight: 500;
  letter-spacing: -0.05em;
  text-transform: lowercase;
}

.pfx-c-panel > .pfx-c-slider {
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  min-height: 190px;
  padding: 18px;
  border-right: 1px solid var(--pfx-line);
  border-bottom: 0;
}

.pfx-c-panel > .pfx-c-slider input {
  grid-column: 1 / -1;
}

.pfx-c-panel > .pfx-c-slider output {
  grid-column: 1 / -1;
  text-align: left;
}

.pfx-c-action {
  width: max-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pfx-line-strong);
  background: transparent;
  color: #dedee3;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.pfx-c-action:hover {
  border-color: var(--pfx-red);
  background: var(--pfx-red);
  color: #fff;
}

.pfx-c-wheel-zone,
.pfx-c-gradient-zone {
  display: grid;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--pfx-line);
}

.pfx-c-wheel-zone {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 42%),
    #0b0b0d;
}

.pfx-c-wheel {
  position: relative;
  width: min(68vh, 68vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    #ff0000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
  box-shadow: 0 0 0 1px #000, 0 0 0 18px #111114, 0 0 0 19px var(--pfx-line);
}

.pfx-c-wheel::after {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: #0c0c0e;
  content: "";
}

.pfx-c-harmony-arm {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 40%;
  height: 1px;
  transform: rotate(calc(var(--pfx-angle) - 90deg));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.7));
  pointer-events: none;
}

.pfx-c-wheel__center {
  position: absolute;
  z-index: 4;
  inset: 38%;
  display: grid;
  place-items: center;
  border: 1px solid var(--pfx-line);
  border-radius: 50%;
  background: #0b0b0d;
}

.pfx-c-wheel__center img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.pfx-c-node {
  position: absolute;
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  text-shadow: 0 1px 3px #000;
  box-shadow: 0 0 0 2px #000;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pfx-c-node:active {
  cursor: grabbing;
}

.pfx-c-harmony-deck {
  display: grid;
  grid-template-rows: 46px 164px minmax(230px, 1fr) 50px 58px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), transparent 22%),
    #0d0d0f;
}

.pfx-c-harmony-deck__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-bottom: 1px solid var(--pfx-line);
  color: #6f6f78;
  font: 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.pfx-c-harmony-deck__head > i {
  height: 1px;
  background: #2e2e34;
}

.pfx-c-harmony-deck__head > strong {
  overflow: hidden;
  color: #d9d9de;
  font: 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pfx-c-harmony-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1px;
  padding: 1px;
  border-bottom: 1px solid var(--pfx-line);
  background: #222227;
}

.pfx-c-harmony-preset {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 0;
  border: 0;
  background: #101012;
  cursor: pointer;
}

.pfx-c-harmony-preset:hover {
  background: #17171b;
}

.pfx-c-harmony-preset.pfx-is-current {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,0,20,0.08), transparent 58%),
    #17171a;
  box-shadow: inset 0 -2px 0 var(--pfx-red);
}

.pfx-c-harmony-preset__glyph {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid #45454d;
  border-radius: 50%;
}

.pfx-c-harmony-preset__glyph > i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #505058;
}

.pfx-c-harmony-preset__glyph > b {
  position: absolute;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border: 1px solid #0b0b0d;
  border-radius: 50%;
  background: #d8d8dc;
  box-shadow: 0 0 0 1px #7f7f87;
}

.pfx-c-harmony-preset.pfx-is-current .pfx-c-harmony-preset__glyph {
  border-color: #74747d;
}

.pfx-c-harmony-preset.pfx-is-current .pfx-c-harmony-preset__glyph > b {
  background: #fff;
  box-shadow: 0 0 0 1px var(--pfx-red);
}

.pfx-c-harmony-control-stage {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(142px, 1fr) 60px 46px;
  place-items: center;
  gap: 8px;
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--pfx-line);
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.035), transparent 42%),
    #0b0b0d;
}

.pfx-c-harmony-dial {
  position: relative;
  width: min(148px, 100%);
  aspect-ratio: 1;
  border: 1px solid #303037;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #151518 0 42%, transparent 43%),
    repeating-conic-gradient(from 0deg, #38383f 0 1deg, transparent 1deg 15deg),
    #0d0d0f;
  box-shadow:
    inset 0 0 0 10px #0b0b0d,
    inset 0 0 0 11px #24242a,
    0 16px 34px rgba(0,0,0,0.28);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pfx-c-harmony-dial:active {
  cursor: grabbing;
}

.pfx-c-harmony-dial__track {
  position: absolute;
  inset: 13px;
  border: 1px solid #3a3a42;
  border-radius: 50%;
  pointer-events: none;
}

.pfx-c-harmony-dial__needle {
  position: absolute;
  inset: 13px;
  transform: rotate(var(--pfx-dial-angle));
  border-radius: 50%;
  pointer-events: none;
}

.pfx-c-harmony-dial__needle::before {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border: 2px solid #09090a;
  border-radius: 50%;
  background: #f4f4f1;
  box-shadow: 0 0 0 1px #8d8d95;
  content: "";
}

.pfx-c-harmony-dial__needle::after {
  position: absolute;
  top: 7px;
  bottom: 50%;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, #74747d, #323238);
  content: "";
}

.pfx-c-harmony-dial__handle {
  display: none;
}

.pfx-c-harmony-dial__readout {
  position: absolute;
  inset: 34%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid #303037;
  border-radius: 50%;
  background: #0a0a0c;
  pointer-events: none;
}

.pfx-c-harmony-dial__readout > span {
  color: #73737b;
  font-size: 15px;
  line-height: 1;
}

.pfx-c-harmony-dial__readout > strong {
  color: #f0f0ed;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pfx-c-harmony-geometry {
  display: grid;
  width: min(238px, 100%);
  height: 54px;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  border: 1px solid #303037;
  background: #111114;
}

.pfx-c-harmony-geometry > button,
.pfx-c-harmony-nudges > button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #151518;
  color: #d5d5da;
  cursor: pointer;
}

.pfx-c-harmony-geometry > button:first-child {
  border-right: 1px solid #303037;
}

.pfx-c-harmony-geometry > button:last-child {
  border-left: 1px solid #303037;
}

.pfx-c-harmony-geometry > button:hover:not(:disabled),
.pfx-c-harmony-nudges > button:hover:not(:disabled) {
  background: #f0f0ed;
  color: #09090a;
}

.pfx-c-harmony-geometry > button:disabled,
.pfx-c-harmony-nudges > button:disabled {
  color: #3d3d44;
  cursor: default;
}

.pfx-c-harmony-geometry > div {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-content: center;
  column-gap: 9px;
}

.pfx-c-harmony-geometry__icon {
  color: #6c6c74;
  font: 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-harmony-geometry output {
  color: #f0f0ed;
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-harmony-geometry small {
  grid-column: 1 / -1;
  align-self: start;
  color: #57575f;
  text-align: center;
  font: 7px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.pfx-c-harmony-nudges {
  display: grid;
  width: min(238px, 100%);
  height: 40px;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.pfx-c-harmony-nudges > button {
  border: 1px solid #303037;
  font-size: 17px;
}

.pfx-c-harmony-nudges > .pfx-c-harmony-link {
  display: grid;
  place-items: center;
  border: 1px solid #303037;
  background: #19191d;
  color: #f0f0ed;
  font-size: 15px;
  cursor: default;
}

.pfx-c-harmony-swatches {
  display: flex;
  min-width: 0;
  border-bottom: 1px solid var(--pfx-line);
  background: #0b0b0d;
}

.pfx-c-harmony-swatches > button {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(0,0,0,0.4);
  cursor: pointer;
}

.pfx-c-harmony-swatches > button:last-child {
  border-right: 0;
}

.pfx-c-harmony-swatches > button:hover {
  box-shadow: inset 0 0 0 2px #fff;
}

.pfx-c-harmony-gradient-action {
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  padding: 0 12px 0 14px;
  border: 0;
  background: #101012;
  cursor: pointer;
}

.pfx-c-harmony-gradient-action > span {
  height: 12px;
  border: 1px solid #393940;
  background:
    linear-gradient(90deg, #ff0014, #ffb800, #efff00, #00e87f, #00b6ff, #6945ff, #ff00b8);
}

.pfx-c-harmony-gradient-action > i {
  color: #cfcfd4;
  text-align: right;
  font: 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
}

.pfx-c-harmony-gradient-action:hover {
  background: #17171b;
}

.pfx-c-harmony-gradient-action:hover > i {
  color: #fff;
  transform: translateX(3px);
}

.pfx-c-workbench--gradient {
  display: block;
  overflow: hidden;
  padding: clamp(24px, 3vh, 34px) clamp(28px, 3vw, 44px);
  background:
    radial-gradient(circle at 42% 34%, rgba(255,255,255,0.025), transparent 38%),
    #09090a;
}

.pfx-c-gradient-shell {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 22px;
  margin: 0 auto;
}

.pfx-c-gradient-canvas-card,
.pfx-c-gradient-inspector {
  border: 1px solid var(--pfx-line);
  background: #0d0d0f;
  box-shadow: 0 16px 44px rgba(0,0,0,0.16);
}

.pfx-c-gradient-canvas-card {
  min-width: 0;
  padding: 14px 14px 0;
}

.pfx-c-gradient-preview {
  position: relative;
  width: 100%;
  height: clamp(300px, 42vh, 390px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #34343a;
  background-clip: padding-box;
  cursor: crosshair;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.025),
    0 14px 34px rgba(0,0,0,0.18);
}

.pfx-c-gradient-preview::after {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  content: "";
  pointer-events: none;
}

.pfx-c-gradient-preview__angle {
  position: absolute;
  z-index: 8;
  top: 14px;
  right: 14px;
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(8,8,10,0.68);
  color: #e8e8eb;
  font: 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.pfx-c-gradient-geometry {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
}

.pfx-c-gradient-geometry__axis {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62%, 460px);
  height: 1px;
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--pfx-gradient-angle) - 90deg));
  transform-origin: 50% 50%;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.26);
}

.pfx-c-gradient-geometry__axis > span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border: 1px solid #09090a;
  border-radius: 50%;
  background: #fff;
}

.pfx-c-gradient-geometry__endpoint,
.pfx-c-gradient-geometry__center,
.pfx-c-gradient-geometry__conic-arm > button {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #111114;
  box-shadow:
    0 0 0 2px #08080a,
    0 6px 16px rgba(0,0,0,0.34);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.pfx-c-gradient-geometry__endpoint:active,
.pfx-c-gradient-geometry__center:active,
.pfx-c-gradient-geometry__conic-arm > button:active {
  cursor: grabbing;
}

.pfx-c-gradient-geometry__endpoint.pfx-is-start {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
}

.pfx-c-gradient-geometry__endpoint.pfx-is-end {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  background: #f3f3ef;
}

.pfx-c-gradient-geometry__center {
  transform: translate(-50%, -50%);
}

.pfx-c-gradient-geometry__center::after {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--pfx-red);
  content: "";
}

.pfx-c-gradient-geometry__radial-ring {
  position: absolute;
  width: min(42%, 220px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,0.52);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.pfx-c-gradient-geometry__conic-arm {
  position: absolute;
  width: min(30%, 170px);
  height: 1px;
  transform: rotate(calc(var(--pfx-gradient-angle) - 90deg));
  transform-origin: 0 50%;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.pfx-c-gradient-geometry__conic-arm > button {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  background: #f3f3ef;
}

.pfx-c-gradient-stop-strip {
  height: 82px;
  padding: 0 18px;
}

.pfx-c-gradient-rail {
  position: relative;
  width: 100%;
  height: 82px;
  cursor: copy;
  touch-action: none;
}

.pfx-c-gradient-rail__line {
  position: absolute;
  top: 30px;
  right: 0;
  left: 0;
  height: 14px;
  border: 1px solid #3a3a41;
  background: var(--pfx-gradient);
  box-shadow:
    0 0 0 1px #08080a,
    0 6px 16px rgba(0,0,0,0.2);
  pointer-events: none;
}

.pfx-c-gradient-stop-handle {
  position: absolute;
  z-index: 3;
  top: 13px;
  width: 30px;
  height: 54px;
  transform: translateX(-50%);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pfx-c-gradient-stop-handle:active {
  cursor: grabbing;
}

.pfx-c-gradient-stop-handle > span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 23px;
  height: 23px;
  transform: translateX(-50%) rotate(45deg);
  border: 3px solid #f4f4f1;
  border-radius: 4px 4px 4px 11px;
  background: var(--pfx-stop-color);
  box-shadow:
    0 0 0 2px #09090a,
    0 6px 16px rgba(0,0,0,0.32);
}

.pfx-c-gradient-stop-handle.pfx-is-selected > span {
  box-shadow:
    0 0 0 2px var(--pfx-red),
    0 0 0 4px #09090a,
    0 8px 20px rgba(0,0,0,0.42);
}

.pfx-c-gradient-inspector {
  display: grid;
  grid-template-rows: 62px auto 46px 44px 40px;
  min-width: 0;
  overflow: hidden;
}

.pfx-c-gradient-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  border-bottom: 1px solid var(--pfx-line);
  background: #222227;
}

.pfx-c-gradient-types > button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #101012;
  cursor: pointer;
}

.pfx-c-gradient-types > button:hover,
.pfx-c-gradient-types > button.pfx-is-current {
  background: #17171b;
}

.pfx-c-gradient-types > button.pfx-is-current {
  box-shadow: inset 0 -2px 0 var(--pfx-red);
}

.pfx-c-gradient-type-glyph {
  position: relative;
  width: 44px;
  height: 30px;
  overflow: hidden;
  border: 1px solid #414149;
  background: #0c0c0e;
}

.pfx-c-gradient-type-glyph::before {
  position: absolute;
  content: "";
}

.pfx-c-gradient-type-glyph.pfx-is-linear::before {
  inset: 6px;
  background: linear-gradient(135deg, #f4f4f1, #7a7a82 48%, #202025);
}

.pfx-c-gradient-type-glyph.pfx-is-radial::before {
  inset: 5px 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #f4f4f1, #6d6d75 48%, #161619 72%);
}

.pfx-c-gradient-type-glyph.pfx-is-conic::before {
  inset: 5px 10px;
  border-radius: 50%;
  background: conic-gradient(#f4f4f1, #56565e, #17171a, #f4f4f1);
}

.pfx-c-gradient-color-editor {
  display: grid;
  grid-template-rows: 148px 14px 36px 14px;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid var(--pfx-line);
  background: #0b0b0d;
}

.pfx-c-gradient-color-editor__field {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #34343a;
  cursor: crosshair;
  touch-action: none;
  background:
    linear-gradient(to top, #000 0%, transparent 72%),
    linear-gradient(to right, #fff 0%, hsl(var(--pfx-hue) 100% 50%) 100%);
}

.pfx-c-gradient-color-editor__field > i {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #000, 0 4px 14px rgba(0,0,0,0.38);
  pointer-events: none;
}

.pfx-c-gradient-color-editor__hue,
.pfx-c-gradient-color-editor__alpha {
  position: relative;
  min-width: 0;
  border: 1px solid #34343a;
  touch-action: none;
}

.pfx-c-gradient-color-editor__hue {
  background: linear-gradient(
    90deg,
    #ff0000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
}

.pfx-c-gradient-color-editor__alpha {
  background:
    linear-gradient(90deg, transparent, var(--pfx-alpha-color)),
    repeating-conic-gradient(#222 0 25%, #3a3a3f 0 50%) 0 / 10px 10px;
}

.pfx-c-gradient-color-editor__hue > button,
.pfx-c-gradient-color-editor__alpha > button {
  position: absolute;
  top: 50%;
  width: 12px;
  height: calc(100% + 8px);
  transform: translate(-50%, -50%);
  padding: 0;
  border: 2px solid #fff;
  border-radius: 2px;
  background: transparent;
  box-shadow: 0 0 0 1px #09090a;
  cursor: ew-resize;
  touch-action: none;
}

.pfx-c-gradient-color-editor__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 7px;
}

.pfx-c-gradient-color-editor__hex,
.pfx-c-gradient-color-editor__meta > output {
  min-width: 0;
  border: 1px solid #34343a;
  background: #111114;
  color: #ededf0;
  font: 9px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-gradient-color-editor__hex {
  padding: 0 9px;
  outline: 0;
}

.pfx-c-gradient-color-editor__hex:focus {
  border-color: #74747d;
}

.pfx-c-gradient-color-editor__meta > output {
  display: grid;
  place-items: center;
  color: #a8a8b0;
}

.pfx-c-gradient-position {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  border-bottom: 1px solid var(--pfx-line);
  background: #101012;
}

.pfx-c-gradient-position > button,
.pfx-c-gradient-actions > button,
.pfx-c-gradient-space-grid > button {
  padding: 0;
  border: 0;
  background: #101012;
  color: #bfbfc6;
  cursor: pointer;
}

.pfx-c-gradient-position > button:hover,
.pfx-c-gradient-actions > button:hover:not(:disabled),
.pfx-c-gradient-space-grid > button:hover {
  background: #f0f0ed;
  color: #09090a;
}

.pfx-c-gradient-position > output {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--pfx-line);
  border-left: 1px solid var(--pfx-line);
  color: #f0f0ed;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-gradient-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  border-bottom: 1px solid var(--pfx-line);
  background: #24242a;
}

.pfx-c-gradient-actions > button {
  font-size: 17px;
}

.pfx-c-gradient-actions > button:disabled {
  color: #3a3a41;
  cursor: default;
}

.pfx-c-gradient-space-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  background: #24242a;
}

.pfx-c-gradient-space-grid > button {
  color: #73737b;
  font: 7px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

.pfx-c-gradient-space-grid > button.pfx-is-current {
  background: #17171b;
  color: #f0f0ed;
  box-shadow: inset 0 -2px 0 var(--pfx-red);
}

.pfx-c-dock {
  grid-template-columns: minmax(220px, 1fr) auto auto;
  border-top: 1px solid var(--pfx-line);
}

.pfx-c-current,
.pfx-c-gamut,
.pfx-c-history {
  display: flex;
  align-items: center;
}

.pfx-c-current {
  gap: 12px;
  padding: 0 18px;
}

.pfx-c-current > span {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.pfx-c-current small {
  display: block;
  color: var(--pfx-muted);
  font: 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
}

.pfx-c-current strong {
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-gamut {
  gap: 18px;
  padding: 0 24px;
  border-left: 1px solid var(--pfx-line);
  border-right: 1px solid var(--pfx-line);
  color: #8e8e96;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-history button {
  height: 100%;
  min-width: 92px;
  border: 0;
  border-left: 1px solid var(--pfx-line);
  background: transparent;
  color: #c9c9cf;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
}

.pfx-c-history button:disabled {
  color: #45454c;
  cursor: default;
}

.pfx-c-history button:not(:disabled):hover {
  background: #151518;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .pfx-l-app {
    min-height: 100vh;
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .pfx-c-header {
    grid-template-columns: 1fr;
  }

  .pfx-c-brand,
  .pfx-c-engine-label {
    min-height: 54px;
  }

  .pfx-c-engine-label {
    display: none;
  }

  .pfx-c-tabs {
    overflow-x: auto;
    border: 0;
    border-top: 1px solid var(--pfx-line);
  }

  .pfx-c-tabs button {
    flex: 1 0 110px;
    min-height: 52px;
  }

  .pfx-l-stage {
    min-height: 720px;
    overflow: visible;
  }

  .pfx-c-workbench--picker,
  .pfx-c-workbench--harmony,
  .pfx-c-workbench--gradient {
    grid-template-columns: 1fr;
  }

  .pfx-c-picker-main {
    grid-template-rows: minmax(0, 56vh) 84px;
    border-right: 0;
    border-bottom: 1px solid var(--pfx-line);
  }

  .pfx-c-color-field {
    min-height: 0;
  }

  .pfx-c-picker-controls {
    padding: 22px 20px 18px;
  }

  .pfx-c-console,
  .pfx-c-gradient-deck {
    overflow: visible;
  }

  .pfx-c-harmony-deck {
    grid-template-rows: 46px 164px minmax(280px, auto) 52px 58px;
    min-height: 600px;
    overflow: hidden;
  }

  .pfx-c-panel {
    grid-template-columns: 1fr 1fr;
  }

  .pfx-c-panel__heading {
    grid-column: 1 / -1;
    min-height: 160px;
    border-right: 0;
    border-bottom: 1px solid var(--pfx-line);
  }

  .pfx-c-panel > .pfx-c-slider {
    border-bottom: 1px solid var(--pfx-line);
  }

  .pfx-c-wheel-zone {
    min-height: 70vh;
    border-right: 0;
    border-bottom: 1px solid var(--pfx-line);
  }

  .pfx-c-wheel {
    width: min(70vw, 520px);
  }

  .pfx-c-workbench--gradient {
    overflow: visible;
    padding: 22px 18px 34px;
  }

  .pfx-c-gradient-shell {
    width: min(760px, 100%);
    grid-template-columns: 1fr;
  }

  .pfx-c-gradient-preview {
    height: min(50vh, 360px);
  }

  .pfx-c-gradient-inspector {
    width: min(420px, 100%);
  }

  .pfx-c-dock {
    grid-template-columns: 1fr auto;
    min-height: 72px;
  }

  .pfx-c-gamut {
    display: none;
  }
}

@media (max-width: 620px) {
  .pfx-c-brand {
    padding: 0 12px;
  }

  .pfx-c-brand > span {
    display: none;
  }

  .pfx-c-tabs button {
    min-width: 92px;
    padding: 0 10px;
  }

  .pfx-c-tabs kbd {
    display: none;
  }

  .pfx-c-picker-main {
    grid-template-rows: minmax(0, 48vh) 78px;
  }

  .pfx-c-picker-controls {
    padding: 20px 14px 16px;
  }

  .pfx-c-picker-hue__handle {
    height: 38px;
  }

  .pfx-c-color-cursor__readout {
    min-width: 104px;
    padding: 7px 8px;
  }

  .pfx-c-panel {
    grid-template-columns: 1fr;
  }

  .pfx-c-palette-ribbon button {
    min-width: 64px;
  }

  .pfx-c-wheel-zone {
    min-height: 56vh;
  }

  .pfx-c-wheel {
    width: min(82vw, 430px);
  }

  .pfx-c-node {
    width: 38px;
    height: 38px;
  }

  .pfx-c-harmony-deck {
    grid-template-rows: 44px 144px minmax(260px, auto) 48px 54px;
    min-height: 550px;
  }

  .pfx-c-harmony-preset__glyph {
    width: 42px;
    height: 42px;
  }

  .pfx-c-harmony-control-stage {
    padding-left: 14px;
    padding-right: 14px;
  }

  .pfx-c-harmony-dial {
    width: 138px;
  }

  .pfx-c-workbench--gradient {
    padding: 14px 10px 28px;
  }

  .pfx-c-gradient-canvas-card {
    padding: 10px 10px 0;
  }

  .pfx-c-gradient-preview {
    height: 300px;
  }

  .pfx-c-gradient-stop-strip {
    height: 72px;
    padding: 0 12px;
  }

  .pfx-c-gradient-rail {
    height: 72px;
  }

  .pfx-c-gradient-inspector {
    width: 100%;
  }

  .pfx-c-gradient-color-editor {
    grid-template-rows: 170px 14px 36px 14px;
  }

  .pfx-c-current {
    min-width: 0;
    padding: 0 12px;
  }

  .pfx-c-history button {
    min-width: 66px;
    padding: 0 8px;
  }
}

.pfx-c-current__input {
  width: 104px;
  padding: 1px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--pfx-text);
  text-transform: uppercase;
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-current__input:hover,
.pfx-c-current__input:focus {
  border-bottom-color: var(--pfx-line-strong);
}

.pfx-c-stop__remove {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 50%;
  background: #0b0b0d;
  color: #b9b9c0;
  font: 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
}

.pfx-c-stop__remove:hover {
  border-color: var(--pfx-red);
  background: var(--pfx-red);
  color: #fff;
}

/* PFx Colors — Home / 10 Color Generator */
.pfx-c-home {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #09090a;
}

.pfx-c-home__canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    #0a0a0c;
  background-size: 28px 28px;
}

.pfx-c-home__study-zone {
  position: absolute;
  top: 34px;
  left: 34px;
  right: 34px;
  height: min(520px, calc(100% - 68px));
  min-height: 420px;
}

.pfx-c-study {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 82px minmax(0, 1fr);
  border: 1px solid var(--pfx-line);
  background: #0d0d0f;
  box-shadow: 0 18px 60px rgba(0,0,0,0.22);
}

.pfx-c-study__head,
.pfx-c-study__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 104px;
  min-width: 0;
}

.pfx-c-study__head {
  border-bottom: 1px solid var(--pfx-line);
}

.pfx-c-study__future-area {
  grid-column: 1 / 2;
  min-width: 0;
  border-right: 1px solid var(--pfx-line);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.012), transparent 36%),
    #0b0b0d;
}

.pfx-c-study__generate {
  position: relative;
  grid-column: 2 / 4;
  display: flex;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #242429;
  background:
    linear-gradient(180deg, #18181b 0%, #0b0b0d 100%);
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.055),
    inset 0 -1px 0 rgba(0,0,0,0.9);
}

.pfx-c-study__generate::before {
  position: absolute;
  z-index: -1;
  inset: 9px;
  border: 1px solid #ff5b67;
  background:
    linear-gradient(180deg, #ff2638 0%, #ff0014 42%, #da0011 72%, #b8000f 100%);
  box-shadow:
    0 0 0 1px #650009,
    0 4px 0 #690009,
    0 8px 18px rgba(255,0,20,0.18),
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -8px 14px rgba(77,0,6,0.26);
  content: "";
  transition:
    transform 110ms ease,
    box-shadow 110ms ease,
    filter 110ms ease;
}

.pfx-c-study__generate:hover::before {
  filter: brightness(1.08) saturate(1.04);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px #720009,
    0 5px 0 #690009,
    0 10px 22px rgba(255,0,20,0.24),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -8px 14px rgba(77,0,6,0.22);
}

.pfx-c-study__generate:active::before {
  filter: brightness(0.96);
  transform: translateY(3px);
  box-shadow:
    0 0 0 1px #5d0008,
    0 1px 0 #560007,
    0 4px 9px rgba(255,0,20,0.13),
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -5px 10px rgba(77,0,6,0.32);
}

.pfx-c-study__generate span,
.pfx-c-study__generate small {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(80,0,6,0.6);
  pointer-events: none;
}

.pfx-c-study__generate span {
  font: 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-align: center;
  white-space: nowrap;
}

.pfx-c-study__generate small {
  opacity: 0.72;
  font: 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
  text-align: center;
}

.pfx-c-study__body {
  min-height: 0;
}

.pfx-c-study__colors {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #111114;
  border-right: 1px solid var(--pfx-line);
}

.pfx-c-study__swatch {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(0,0,0,0.26);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
}

.pfx-c-study__swatch:last-child {
  border-right: 0;
}

.pfx-c-study__swatch::after {
  position: absolute;
  inset: 0;
  border: 0 solid rgba(255,255,255,0);
  content: "";
  pointer-events: none;
  transition:
    border-width 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.pfx-c-study__swatch:hover::after {
  border-width: 1px;
  border-color: rgba(255,255,255,0.58);
}

.pfx-c-study__swatch.pfx-is-active::after {
  border-width: 2px;
  border-color: #fff;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.36);
}

.pfx-c-study__swatch > span,
.pfx-c-study__swatch > strong {
  position: absolute;
  z-index: 1;
  left: 10px;
  padding: 4px 5px;
  overflow: hidden;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pfx-c-study__swatch > span {
  top: 11px;
  font-size: 8px;
}

.pfx-c-study__swatch > strong {
  right: 8px;
  bottom: 10px;
  width: max-content;
  max-width: calc(100% - 18px);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.pfx-c-tensor {
  position: relative;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr) 52px;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--pfx-line);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.024), transparent 35%),
    #0b0b0d;
}

.pfx-c-tensor__head {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--pfx-line);
}

.pfx-c-tensor__head span,
.pfx-c-tensor__state span {
  color: #8e8e96;
  font: 7px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.13em;
}

.pfx-c-tensor__head strong {
  color: #f1f1ee;
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pfx-c-tensor__rail {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
}

.pfx-c-tensor__rail::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 50%;
  width: 1px;
  background:
    repeating-linear-gradient(
      to bottom,
      #34343a 0 1px,
      transparent 1px 9px
    );
  content: "";
  transform: translateX(-50%);
}

.pfx-c-tensor__rail input {
  /* Reserve vertical touch gestures for the native slider, not page panning. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 3;
  width: 28px;
  height: calc(100% - 44px);
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  background: transparent;
  cursor: ns-resize;
}

.pfx-c-tensor__rail input::-webkit-slider-runnable-track {
  width: 3px;
  border: 0;
  background: #323238;
}

.pfx-c-tensor__rail input::-webkit-slider-thumb {
  width: 30px;
  height: 58px;
  margin-left: -13.5px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #ecece8;
  border-radius: 0;
  background:
    linear-gradient(to bottom, transparent 48%, #0a0a0c 48% 52%, transparent 52%),
    #f0f0ec;
  box-shadow:
    0 0 0 1px #000,
    0 8px 28px rgba(0,0,0,0.35);
}

.pfx-c-tensor__rail input::-moz-range-track {
  width: 3px;
  border: 0;
  background: #323238;
}

.pfx-c-tensor__rail input::-moz-range-thumb {
  width: 30px;
  height: 58px;
  border: 1px solid #ecece8;
  border-radius: 0;
  background:
    linear-gradient(to bottom, transparent 48%, #0a0a0c 48% 52%, transparent 52%),
    #f0f0ec;
}

.pfx-c-tensor__meter {
  position: absolute;
  z-index: 1;
  left: calc(50% - 1px);
  bottom: 22px;
  width: 3px;
  max-height: calc(100% - 44px);
  background: linear-gradient(to top, #35353a, var(--pfx-red));
  pointer-events: none;
}

.pfx-c-tensor__high,
.pfx-c-tensor__low {
  position: absolute;
  z-index: 2;
  left: 7px;
  color: #505058;
  font: 7px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.pfx-c-tensor__high {
  top: 7px;
}

.pfx-c-tensor__low {
  bottom: 7px;
}

.pfx-c-tensor__state {
  display: grid;
  place-items: center;
  border-top: 1px solid var(--pfx-line);
}

.pfx-c-tensor__state span {
  color: #d9d9d5;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.pfx-c-study__controls {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  min-width: 0;
  min-height: 0;
  background: #0b0b0d;
}

.pfx-c-study__control-slot {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: 10px 9px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--pfx-line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.014), transparent 46%),
    #0d0d0f;
  color: #777780;
  text-align: left;
  cursor: pointer;
}

.pfx-c-study__control-slot:last-child {
  border-bottom: 0;
}

.pfx-c-study__control-slot::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: transparent;
  content: "";
}

.pfx-c-study__control-slot:hover {
  background: #131316;
  color: #c6c6cc;
}

.pfx-c-study__control-slot.pfx-is-active {
  background:
    linear-gradient(90deg, rgba(255,0,20,0.075), transparent 72%),
    #151518;
  color: #f1f1ee;
}

.pfx-c-study__control-slot.pfx-is-active::before {
  background: var(--pfx-red);
  box-shadow: 0 0 8px rgba(255,0,20,0.48);
}

.pfx-c-study__control-slot small {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  color: #4e4e56;
  font: 7px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.pfx-c-study__control-slot span {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  overflow-wrap: anywhere;
  font: 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.045em;
}

.pfx-c-study__control-slot strong {
  grid-column: 2;
  grid-row: 2;
  color: #5f5f68;
  font: 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
}

.pfx-c-study__control-slot.pfx-is-active strong {
  color: #bdbdc4;
}

@media (max-width: 980px) {
  .pfx-c-home__canvas {
    min-height: 720px;
    overflow: visible;
  }

  .pfx-c-home__study-zone {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: calc(100% - 32px);
    height: 560px;
    min-height: 0;
    margin: 16px;
  }

  .pfx-c-study__head,
  .pfx-c-study__body {
    grid-template-columns: minmax(0, 1fr) 72px 94px;
  }
}

@media (max-width: 720px) {
  .pfx-c-home__canvas {
    min-height: 780px;
  }

  .pfx-c-home__study-zone {
    height: 700px;
  }

  .pfx-c-study {
    grid-template-rows: 72px minmax(0, 1fr);
  }

  .pfx-c-study__head,
  .pfx-c-study__body {
    grid-template-columns: minmax(0, 1fr) 68px 86px;
  }

  .pfx-c-study__colors {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

  .pfx-c-study__swatch:nth-child(5n) {
    border-right: 0;
  }

  .pfx-c-study__swatch:nth-child(-n + 5) {
    border-bottom: 1px solid rgba(0,0,0,0.26);
  }

  .pfx-c-study__generate {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }

  .pfx-c-study__generate span {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .pfx-c-home__canvas {
    min-height: 820px;
  }

  .pfx-c-home__study-zone {
    width: calc(100% - 20px);
    height: 760px;
    margin: 10px;
  }

  .pfx-c-study {
    grid-template-rows: 66px minmax(0, 1fr);
  }

  .pfx-c-study__head {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .pfx-c-study__future-area {
    grid-column: 1;
  }

  .pfx-c-study__generate {
    grid-column: 2;
    width: 100%;
    min-width: 0;
  }

  .pfx-c-study__body {
    grid-template-columns: minmax(0, 1fr) 62px;
    grid-template-rows: minmax(0, 1fr) 76px;
  }

  .pfx-c-study__colors {
    grid-column: 1;
    grid-row: 1;
  }

  .pfx-c-tensor {
    grid-column: 2;
    grid-row: 1;
  }

  .pfx-c-study__controls {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    border-top: 1px solid var(--pfx-line);
  }

  .pfx-c-study__control-slot {
    border-right: 1px solid var(--pfx-line);
    border-bottom: 0;
  }

  .pfx-c-study__control-slot:last-child {
    border-right: 0;
  }
}

/* PFx Colors workspace design tokens. This layer is loaded after the
   original tool styles so the verified computational instruments stay intact. */
.pfx-v2 {
  --pfx-bg: #f3f6fc;
  --pfx-panel: #ffffff;
  --pfx-line: #dce4f3;
  --pfx-line-strong: #b5c6df;
  --pfx-text: #101d38;
  --pfx-muted: #59657b;
  --pfx-accent: #0753ff;
  --pfx-accent-soft: #e8efff;
  --pfx-v2-elevated: #ffffff;
  --pfx-v2-field: #f8f9fb;
  --pfx-v2-shadow: 0 8px 28px rgba(28, 35, 51, 0.055);
  display: grid;
  grid-template-rows: auto minmax(calc(100dvh - 76px), 1fr) auto;
  width: 100%;
  height: auto;
  min-height: 500px;
  background: var(--pfx-bg);
  color: var(--pfx-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
body:has(.pfx-v2) { overflow-y: auto; }
.pfx-v2[data-theme="dark"] {
  --pfx-bg: #0d1729;
  --pfx-panel: #17233b;
  --pfx-line: #34425e;
  --pfx-line-strong: #505662;
  --pfx-text: #f4f7ff;
  --pfx-muted: #b5c1d8;
  --pfx-accent: #7da8ff;
  --pfx-accent-soft: #1b315e;
  --pfx-v2-elevated: #292d35;
  --pfx-v2-field: #292c33;
  --pfx-v2-shadow: 0 8px 28px rgba(0,0,0,.17);
}
.pfx-v2 button, .pfx-v2 input { font: inherit; }
.pfx-v2 button { cursor: pointer; }
.pfx-v2 button:disabled { opacity: .38; cursor: not-allowed; }
.pfx-v2 button:focus-visible, .pfx-v2 input:focus-visible {
  outline: 2px solid var(--pfx-accent); outline-offset: 3px;
}
.pfx-v2 .pfx-c-header {
  position: sticky;
  top: 0;
  z-index: 50;
  align-self: start;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  padding: 10px clamp(12px, 2vw, 26px);
  min-height: 76px;
  background: var(--pfx-panel);
  border-bottom: 1px solid var(--pfx-line);
  backdrop-filter: none;
}
.pfx-v2 .pfx-c-brand { padding: 0; white-space: nowrap; gap: 9px; }
.pfx-v2 .pfx-c-brand img { width: 31px; height: 31px; }
.pfx-v2 .pfx-c-brand strong { font-size: 16px; letter-spacing: -.045em; }
/* Version badge — distinct in both workspace themes, present on narrow screens. */
.pfx-v2 .pfx-c-brand .pfx-v2__alpha-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 6px 10px;
  border: 1px solid #bd761c;
  border-radius: 7px;
  background: #ffdfaa;
  color: #743e05;
  font: normal 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.pfx-v2[data-theme="dark"] .pfx-c-brand .pfx-v2__alpha-badge {
  border-color: #d89841;
  background: #4d3118;
  color: #ffd48b;
  box-shadow: 0 1px 0 rgba(255,219,147,.07) inset;
}

.pfx-v2 .pfx-c-brand > span { font: 10px/1.4 ui-monospace,monospace; color: var(--pfx-muted); letter-spacing:.04em; }
.pfx-v2 .pfx-c-tabs {
  min-width: 0;
  display: flex;
  gap: 2px;
  justify-content: flex-start;
  overflow-x: auto;
  border: 0;
  scrollbar-width: none;
}
.pfx-v2 .pfx-c-tabs::-webkit-scrollbar { display: none; }
.pfx-v2 .pfx-c-tabs button {
  flex: 0 0 auto;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--pfx-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 580;
  white-space: nowrap;
}
.pfx-v2 .pfx-c-tabs button:hover { background: var(--pfx-v2-field); color: var(--pfx-text); }
.pfx-v2 .pfx-c-tabs button.pfx-is-current {
  background: var(--pfx-accent-soft);
  color: var(--pfx-accent);
  box-shadow: none;
}
.pfx-v2__header-actions { display: flex; align-items: center; gap: 12px; }
.pfx-v2 .pfx-v2__theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 9px;
  background: var(--pfx-v2-field);
  color: var(--pfx-text);
  cursor: pointer;
}
.pfx-v2 .pfx-v2__theme-toggle:hover {
  border-color: var(--pfx-accent);
  background: var(--pfx-panel);
}
.pfx-v2 .pfx-v2__theme-toggle:focus-visible {
  outline: 2px solid var(--pfx-accent);
  outline-offset: 3px;
}
.pfx-v2__theme-toggle svg { display: block; }
.pfx-v2 .pfx-c-engine-label { padding: 0; justify-content: flex-start; white-space: nowrap; font: 9px ui-monospace,monospace; color: var(--pfx-muted); }
.pfx-v2 .pfx-l-stage { min-width: 0; min-height: 0; overflow: hidden; }
.pfx-v2 .pfx-c-dock {
  min-width: 0; display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center; padding: 0 clamp(12px,2vw,26px); gap: 24px;
  border-top: 1px solid var(--pfx-line); background: var(--pfx-panel);
  backdrop-filter: none;
}
.pfx-v2 .pfx-c-current { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pfx-v2__current-chip { display: block; width: 35px; height: 35px; flex: 0 0 35px; border-radius: 9px; border: 1px solid rgba(0,0,0,.14); }
.pfx-v2__current-value { display: grid; gap: 3px; min-width: 0; }
.pfx-v2__current-value small { font: 9px ui-monospace,monospace; color: var(--pfx-muted); letter-spacing: .09em; }
.pfx-v2 .pfx-c-current__input {
  display: block; min-width: 0; width: 110px; border: 0; padding: 0; background: transparent; color: var(--pfx-text);
  font: 600 15px ui-monospace,monospace; outline-offset: 4px;
}
.pfx-v2__copy, .pfx-v2 .pfx-c-history button {
  padding: 9px 12px; border: 1px solid var(--pfx-line-strong); border-radius: 8px; background: transparent; color: var(--pfx-text); font-size: 11px; font-weight: 600;
}
.pfx-v2__copy:hover, .pfx-v2 .pfx-c-history button:hover:not(:disabled) { background: var(--pfx-v2-field); }
/* The old .pfx-c-current > span selector must not draw a phantom swatch. */
.pfx-v2 .pfx-c-current > .pfx-v2__copy-feedback {
  width: auto;
  height: auto;
  border: 0;
  font-size: 11px;
  color: var(--pfx-muted);
}
.pfx-v2 .pfx-c-gamut { display: flex; align-items: center; gap: 10px; font: 11px ui-monospace,monospace; color: var(--pfx-muted); }
.pfx-v2 .pfx-c-history { display: flex; align-items: center; gap: 6px; }

/* New tool pages use neutral surfaces so the colors themselves dominate. */
.pfx-v2__page {
  width: 100%; height: 100%; overflow: auto;
  padding: clamp(18px,3vw,42px);
  background: var(--pfx-bg); color: var(--pfx-text);
  scrollbar-gutter: stable;
}
.pfx-v2__page-heading {
  display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 27px;
}
.pfx-v2__eyebrow { font: 10px ui-monospace,monospace; letter-spacing: .12em; color: var(--pfx-accent); font-weight: 700; }
.pfx-v2__page-heading h1 {
  margin: 8px 0; font: 650 clamp(29px,3.8vw,51px)/1.1 Inter,ui-sans-serif,system-ui,sans-serif; letter-spacing: -.055em;
}
.pfx-v2__page-heading p { max-width: 620px; margin: 0; font-size: 13px; line-height: 1.6; color: var(--pfx-muted); }
.pfx-v2__mode, .pfx-v2__collection-tabs { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pfx-v2__mode button, .pfx-v2__collection-tabs button {
  padding: 10px 14px; border: 1px solid var(--pfx-line); border-radius: 9px; background: var(--pfx-panel); color: var(--pfx-muted); font-size: 12px;
}
.pfx-v2__mode button.pfx-is-active, .pfx-v2__collection-tabs button[aria-pressed="true"] {
  color: var(--pfx-accent); border-color: var(--pfx-accent); background: var(--pfx-accent-soft);
}
.pfx-v2__collection-tabs { margin-bottom: 22px; }
.pfx-v2__collection-tabs span { margin-left: 6px; opacity: .6; }
.pfx-v2__toolbar {
  display: grid; grid-template-columns: minmax(250px, 360px) minmax(0,1fr); align-items: end;
  gap: 18px; margin-bottom: 19px;
}
.pfx-v2__search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.pfx-v2__search label { grid-column: 1/-1; font-size: 11px; font-weight: 650; }
.pfx-v2__search input, .pfx-v2__pager input {
  min-width: 0; border: 1px solid var(--pfx-line-strong); border-radius: 8px; padding: 10px 12px;
  background: var(--pfx-panel); color: var(--pfx-text); font-size: 12px;
}
.pfx-v2__search button, .pfx-v2__pager button, .pfx-v2__selection button, .pfx-v2__primary {
  padding: 10px 14px; border: 1px solid var(--pfx-line-strong); border-radius: 8px;
  background: var(--pfx-panel); color: var(--pfx-text); font-weight: 600; font-size: 12px;
}
.pfx-v2__selection button:last-of-type, .pfx-v2__primary { background: var(--pfx-accent); color: var(--pfx-bg); border-color: var(--pfx-accent); }
.pfx-v2__quick-ranges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pfx-v2__quick-ranges button {
  display: flex; align-items: center; gap: 6px; border: 1px solid var(--pfx-line); border-radius: 9px;
  padding: 9px; background: var(--pfx-panel); color: var(--pfx-text); font-size: 11px;
}
.pfx-v2__quick-ranges span { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.pfx-v2__pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 17px; font-size: 11px; color: var(--pfx-muted); }
.pfx-v2__pager > div { display: flex; align-items: center; gap: 8px; }
.pfx-v2__pager label { display: flex; align-items: center; gap: 6px; }
.pfx-v2__pager input { width: 94px; padding: 8px; }
.pfx-v2__swatches { display: grid; grid-template-columns: repeat(auto-fill,minmax(154px,1fr)); gap: 12px; }
.pfx-v2__swatch {
  display: grid; grid-template-rows: minmax(100px,1fr) auto auto; overflow: hidden;
  min-width: 0; background: var(--pfx-panel); border: 1px solid var(--pfx-line);
  border-radius: 14px; box-shadow: var(--pfx-v2-shadow);
}
.pfx-v2__swatch.pfx-is-selected { outline: 2px solid var(--pfx-accent); outline-offset: 1px; }
.pfx-v2__swatch-color { display: grid; place-items: center; min-height: 116px; border: 0; width: 100%; }
.pfx-v2__swatch-marker { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.32); color: #fff; font-size: 12px; }
.pfx-v2__swatch-marker:empty { display: none; }
.pfx-v2__swatch-info { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px 6px; min-height: 44px; }
.pfx-v2__swatch-info strong { font-size: 11px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfx-v2__swatch-info > span { font: 11px ui-monospace,monospace; color: var(--pfx-muted); }
.pfx-v2__swatch-actions { display: flex; align-items: center; gap: 5px; padding: 0 7px 8px; }
.pfx-v2__swatch-actions button { min-height: 32px; flex: 1; border: 1px solid var(--pfx-line); border-radius: 7px; padding: 5px; background: transparent; color: var(--pfx-text); font-size: 11px; }
.pfx-v2__swatch-actions button:hover { background: var(--pfx-v2-field); }
.pfx-v2__swatch-actions button[aria-pressed="true"] { color: var(--pfx-accent); }
.pfx-v2__selection { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 14px; margin-top: 19px; border: 1px solid var(--pfx-line); border-radius: 13px; background: var(--pfx-panel); }
.pfx-v2__selection-swatch { width: 44px; height: 44px; border-radius: 9px; border: 1px solid rgba(0,0,0,.15); }
.pfx-v2__selection > div:nth-child(2) { display: flex; flex-direction: column; gap: 3px; margin-right: auto; }
.pfx-v2__selection small { color: var(--pfx-muted); font: 10px ui-monospace,monospace; }
.pfx-v2__selection strong { font: 15px ui-monospace,monospace; }
.pfx-v2__selection > span { flex-basis: 100%; font-size: 11px; color: var(--pfx-muted); }
.pfx-v2__selection > span:empty, .pfx-v2__status:empty { display: none; }
.pfx-v2__empty { margin: 24px 0; padding: 40px 18px; text-align: center; border: 1px dashed var(--pfx-line-strong); border-radius: 12px; color: var(--pfx-muted); font-size: 13px; line-height: 1.6; }
.pfx-v2__status { font-size: 12px; color: var(--pfx-muted); }

/* Each redesigned tool now inherits its readable foreground from the active theme. */
@media (max-width: 1370px) {
  .pfx-v2 .pfx-c-brand > span, .pfx-v2 .pfx-c-engine-label { display: none; }
  .pfx-v2 .pfx-c-tabs button { padding-inline: 10px; }
}
@media (max-width: 850px) {
  .pfx-v2 .pfx-c-header {
    grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto auto; padding: 10px 12px 0; gap: 8px;
  }
  .pfx-v2 .pfx-c-tabs {
    grid-column: 1/-1; grid-row: 2; justify-content: flex-start; padding-bottom: 8px;
  }
  .pfx-v2 .pfx-c-tabs button { padding: 10px 12px; }
  .pfx-v2 .pfx-c-dock { gap: 10px; }
  .pfx-v2__toolbar { grid-template-columns: 1fr; }
  .pfx-v2__quick-ranges { justify-content: flex-start; }
}
@media (max-width: 580px) {
  .pfx-v2 { grid-template-rows: auto minmax(0,1fr) auto; }
  .pfx-v2 .pfx-c-brand strong { font-size: 14px; }
  .pfx-v2 .pfx-c-brand img { width: 25px; height: 25px; }
  .pfx-v2 .pfx-c-brand { gap: 6px; }
  .pfx-v2 .pfx-c-brand .pfx-v2__alpha-badge { min-height: 24px; padding: 5px 7px; font-size: 10px; }

  .pfx-v2 .pfx-c-header { padding-top: 7px; }
  .pfx-v2 .pfx-c-dock { grid-template-columns: minmax(0,1fr) auto; padding: 0 9px; }
  .pfx-v2 .pfx-c-gamut { display: none; }
  .pfx-v2 .pfx-c-history button { padding: 10px 7px; font-size: 10px; }
  .pfx-v2__current-chip { width: 27px; height: 27px; flex-basis: 27px; }
  .pfx-v2 .pfx-c-current { gap: 7px; }
  .pfx-v2__current-value small { display: none; }
  .pfx-v2 .pfx-c-current__input { width: 79px; font-size: 12px; }
  .pfx-v2__copy { padding: 8px; font-size: 10px; }
  .pfx-v2__copy-feedback { display: none; }
  .pfx-v2__page-heading { display: grid; gap: 16px; }
  .pfx-v2__page { padding: 16px 12px; }
  .pfx-v2__swatches { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .pfx-v2__swatch-color { min-height: 94px; }
  .pfx-v2__pager { display: grid; gap: 10px; }
  .pfx-v2__pager > div { justify-content: space-between; }
}
@media (max-width: 370px) {
  .pfx-v2__header-actions { gap: 4px; }
  .pfx-v2 .pfx-c-brand { gap: 4px; }
  .pfx-v2 .pfx-c-brand strong { font-size: 13px; }
  .pfx-v2 .pfx-c-brand .pfx-v2__alpha-badge { padding-inline: 5px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .pfx-v2 *, .pfx-v2 *::before, .pfx-v2 *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* Shared navbar controls. The footer dock was removed to return workspace height. */
.pfx-v2 .pfx-c-header {
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: clamp(9px,1.1vw,16px);
  padding-inline: clamp(12px,1.5vw,23px);
}
.pfx-v2 .pfx-c-brand { gap: 7px; }
.pfx-v2 .pfx-c-tabs button { padding-inline: clamp(7px,.7vw,11px); font-size: 11px; }
.pfx-v2__header-actions { gap: 9px; min-width: 0; }
.pfx-v2 .pfx-c-engine-label { display: none; }
.pfx-v2__color-control {
  position: relative;
  display: flex; align-items: center;
  flex: 0 0 auto; gap: 5px;
  min-height: 42px; padding: 5px 6px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 11px;
  background: var(--pfx-v2-field);
}
.pfx-v2__color-chip {
  display: block;
  width: 30px; height: 30px;
  flex: 0 0 30px; border-radius: 7px;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13);
}
.pfx-v2__hex-wrap { position: relative; min-width: 0; }
.pfx-v2 .pfx-v2__hex-value {
  display: block;
  width: 83px; height: 30px;
  margin: 0; padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent; color: var(--pfx-text);
  font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -.015em; cursor: text;
  outline-offset: 2px;
}
.pfx-v2 .pfx-v2__hex-value[readonly] { cursor: pointer; }
.pfx-v2 .pfx-v2__color-control.pfx-is-editing .pfx-v2__hex-value {
  border-color: var(--pfx-accent);
  background: var(--pfx-panel);
  padding-inline: 5px;
}
.pfx-v2 .pfx-v2__hex-value[aria-invalid="true"] {
  border-color: #d65e52;
  color: #c04f43;
}
.pfx-v2 .pfx-v2__icon-btn {
  display: inline-grid; place-items: center;
  flex: 0 0 30px;
  width: 30px; height: 30px; padding: 0;
  color: var(--pfx-muted);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}
.pfx-v2 .pfx-v2__icon-btn:hover:not(:disabled) {
  color: var(--pfx-text);
  border-color: var(--pfx-line-strong);
  background: var(--pfx-panel);
}
.pfx-v2 .pfx-v2__icon-btn:disabled { opacity: .3; }
.pfx-v2__color-status {
  position: absolute; z-index: 12;
  top: calc(100% + 11px); left: 0;
  max-width: 210px; white-space: nowrap;
  padding: 7px 10px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 7px;
  background: var(--pfx-panel);
  color: var(--pfx-text);
  box-shadow: var(--pfx-v2-shadow);
  font: 600 11px/1.3 ui-sans-serif, system-ui, sans-serif;
}
.pfx-v2__color-status:empty { display: none; }
.pfx-v2__history {
  display: flex; gap: 1px;
  padding: 3px;
  border: 1px solid var(--pfx-line);
  border-radius: 10px;
  background: var(--pfx-v2-field);
}
.pfx-v2 .pfx-v2__history .pfx-v2__icon-btn { width: 34px; height: 34px; flex-basis: 34px; }
.pfx-v2 .pfx-v2__theme-toggle { flex-shrink: 0; }
@media (max-width: 1250px) {
  .pfx-v2 .pfx-c-header {
    grid-template-columns: auto minmax(0,1fr);
    grid-template-rows: auto auto;
    row-gap: 3px;
    padding-bottom: 4px;
  }
  .pfx-v2__header-actions { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .pfx-v2 .pfx-c-tabs {
    grid-column: 1/-1; grid-row: 2;
    justify-content: flex-start;
    padding-block: 3px;
  }
}
@media (max-width: 770px) {
  .pfx-v2 .pfx-c-header {
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    row-gap: 7px; column-gap: 8px;
    padding: 9px 12px 5px;
  }
  .pfx-v2 .pfx-c-brand { grid-column: 1; grid-row: 1; }
  .pfx-v2__header-actions { display: contents; }
  .pfx-v2__theme-toggle { grid-column: 2; grid-row: 1; justify-self: end; }
  .pfx-v2__color-control { grid-column: 1; grid-row: 2; justify-self: start; }
  .pfx-v2__history { grid-column: 2; grid-row: 2; justify-self: end; }
  .pfx-v2 .pfx-c-tabs {
    grid-column: 1/-1; grid-row: 3;
    padding: 1px 0 4px;
  }
}
@media (max-width: 390px) {
  .pfx-v2 .pfx-c-brand { gap: 5px; }
  .pfx-v2 .pfx-c-brand strong { font-size: 13px; }
  .pfx-v2 .pfx-c-brand .pfx-v2__alpha-badge {
    min-height: 23px; padding: 5px 6px; font-size: 9px;
  }
  .pfx-v2__color-chip { width: 27px; height: 27px; flex-basis: 27px; }
}

/* Center desktop navigation against the viewport, regardless of side controls. */
@media (min-width: 1251px) {
  .pfx-v2 .pfx-c-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .pfx-v2 .pfx-c-tabs {
    justify-content: center;
  }
  .pfx-v2__header-actions {
    justify-content: flex-end;
  }
}
@media (min-width: 771px) and (max-width: 1250px) {
  .pfx-v2 .pfx-c-tabs {
    justify-content: center;
  }
}

/* Compact attribution bar shared by all tools and both color themes. */
.pfx-v2__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 7px clamp(12px, 1.5vw, 23px);
  color: var(--pfx-muted);
  font-size: 11px;
  line-height: 1.4;
}
.pfx-v2__footer-product { justify-self: start; font-weight: 650; }
.pfx-v2__footer-credit { justify-self: center; white-space: nowrap; }
.pfx-v2__footer-credit a {
  color: var(--pfx-text);
  font-weight: 750;
  text-decoration: none;
  text-underline-offset: 3px;
}
.pfx-v2__footer-credit a:hover,
.pfx-v2__footer-credit a:focus-visible {
  color: var(--pfx-accent);
  text-decoration: underline;
}
.pfx-v2__footer small {
  justify-self: end;
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .pfx-v2__footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    padding: 8px 10px;
    text-align: center;
  }
  .pfx-v2__footer-product { display: none; }
  .pfx-v2__footer-credit,
  .pfx-v2__footer small { justify-self: center; }
}

/* Tones is a compact Picker instrument; no page-sized cards or stretch. */
.pfx-v2 .pfx-tones-embedded {
  --tone-card: var(--pfx-panel);
  --tone-soft: var(--pfx-v2-field);
  --tone-border: var(--pfx-line);
  position: relative;
  display: grid;
  align-content: start;
  gap: 9px;
  width: min(100%, 355px);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--tone-border);
  border-radius: 12px;
  background: var(--tone-card);
  color: var(--pfx-text);
  box-shadow: var(--pfx-v2-shadow);
}
.pfx-tones-embedded button { cursor: pointer; }
.pfx-tones-embedded button:disabled { cursor: not-allowed; opacity: .48; }
.pfx-tones-embedded button:focus-visible,
.pfx-tones-embedded summary:focus-visible,
.pfx-tones-embedded input:focus-visible {
  outline: 2px solid var(--pfx-accent);
  outline-offset: 2px;
}
.pfx-c-tones__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}
.pfx-c-tones__heading > strong { font-size: 14px; font-weight: 680; letter-spacing: -.02em; }
.pfx-c-tones__heading > span { color: var(--pfx-muted); font: 600 10px ui-monospace, monospace; }
.pfx-c-tones__header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__header-actions button,
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__export button,
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__tone-actions button,
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__reset,
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__manual-controls > button {
  border: 1px solid var(--pfx-line-strong);
  border-radius: 6px;
  padding: 6px 7px;
  color: var(--pfx-text);
  background: var(--tone-soft);
  font-size: 10px;
  font-weight: 630;
  white-space: nowrap;
}
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__primary {
  background: var(--pfx-accent-soft);
  color: var(--pfx-accent);
}
.pfx-tones-embedded .pfx-c-tones__export {
  position: absolute;
  right: 9px;
  top: 44px;
  z-index: 20;
  display: grid;
  gap: 5px;
  padding: 8px;
  background: var(--pfx-panel);
  border: 1px solid var(--tone-border);
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
}
.pfx-c-tones__seedbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  font-size: 10px;
  color: var(--pfx-muted);
}
.pfx-c-tones__seed-color {
  display: block;
  flex: 0 0 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,.15);
}
.pfx-c-tones__seedbar code { font: 700 11px ui-monospace, monospace; color: var(--pfx-text); }
.pfx-c-tones__seedbar small { margin-left: auto; font-size: 9px; }
/* The spectrum is a single continuous instrument, not a mini card collection. */
.pfx-picker__tone-strip .pfx-c-tones__spectrum {
  position: relative;
  padding: 0 0 9px;
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon {
  display: flex;
  width: 100%;
  height: 78px;
  gap: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  background: none;
  overflow: visible;
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon button {
  display: block;
  position: relative;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: none;
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon button:first-child {
  border-radius: 8px 0 0 8px;
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon button:last-child {
  border-radius: 0 8px 8px 0;
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon button:hover {
  z-index: 1;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.65);
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon button.pfx-is-selected {
  z-index: 2;
  box-shadow: inset 0 0 0 2px var(--pfx-panel), 0 0 0 2px var(--pfx-accent);
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon button.pfx-is-selected::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pfx-accent);
  transform: translateX(-50%);
}
.pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon button:focus-visible {
  z-index: 3;
  outline: 2px solid var(--pfx-accent);
  outline-offset: 3px;
}
.pfx-c-tones__settings,
.pfx-c-tones__inspector {
  min-width: 0;
  border-top: 1px solid var(--tone-border);
}
.pfx-c-tones__settings > summary,
.pfx-c-tones__manual > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 28px;
  list-style: none;
  font-size: 11px;
  font-weight: 690;
  cursor: pointer;
}
.pfx-c-tones__settings > summary::-webkit-details-marker,
.pfx-c-tones__manual > summary::-webkit-details-marker { display: none; }
.pfx-c-tones__settings > summary > span { font-size: 9px; font-weight: 500; color: var(--pfx-muted); margin-left: auto; }
.pfx-c-tones__settings > summary::after,
.pfx-c-tones__manual > summary::after { content: "+"; color: var(--pfx-muted); font: 500 16px ui-monospace, monospace; }
.pfx-c-tones__settings[open] > summary::after,
.pfx-c-tones__manual[open] > summary::after { content: "−"; }
.pfx-c-tones__fields,
.pfx-c-tones__manual-controls { display: grid; gap: 9px; padding: 4px 0 6px; }
.pfx-c-tones__field { display: grid; min-width: 0; gap: 4px; }
.pfx-c-tones__field > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  color: var(--pfx-muted);
  font-size: 10px;
}
.pfx-c-tones__field strong { font: 650 10px ui-monospace,monospace; color: var(--pfx-text); }
.pfx-c-tones__field-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__field input[type="range"] {
  display: block;
  width: 100%;
  height: 15px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__field input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: var(--tone-range, linear-gradient(to right, var(--pfx-accent),var(--pfx-accent)));
}
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__field input[type="range"]::-moz-range-track {
  box-sizing: border-box;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: var(--tone-range, linear-gradient(to right, var(--pfx-accent),var(--pfx-accent)));
}
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  height: 15px;
  width: 15px;
  margin-top: -5px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--tone-thumb, var(--pfx-accent));
  box-shadow: 0 0 0 1px #343846, 0 1px 3px #0003;
}
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__field input[type="range"]::-moz-range-thumb {
  height: 11px;
  width: 11px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--tone-thumb, var(--pfx-accent));
  box-shadow: 0 0 0 1px #343846, 0 1px 3px #0003;
}
.pfx-c-tones__field:has(input[aria-label="Minimum lightness"]),
.pfx-c-tones__field:has(input[aria-label="Maximum lightness"]),
.pfx-c-tones__field:has(input[aria-label="Selected tone lightness"]) {
  --tone-range: linear-gradient(to right, #08090c, var(--tone-preview-color, #777) 50%, #fff);
}
.pfx-c-tones__field:has(input[aria-label="Chroma intensity"]),
.pfx-c-tones__field:has(input[aria-label="Selected tone chroma"]) {
  --tone-range: linear-gradient(to right, #777, var(--tone-preview-color, #64b986));
}
.pfx-c-tones__options { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pfx-c-tones__distribution { display: flex; flex: 0 1 auto; gap: 2px; padding: 2px; border-radius: 7px; background: var(--tone-soft); }
.pfx-v2 .pfx-c-tones__distribution button {
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--pfx-muted);
  font-size: 10px;
  font-weight: 600;
}
.pfx-v2 .pfx-c-tones__distribution button[aria-pressed="true"] {
  background: var(--pfx-panel);
  color: var(--pfx-accent);
  box-shadow: 0 1px 3px #0001;
}
.pfx-c-tones__lock { display: inline-flex; align-items: center; gap: 5px; color: var(--pfx-muted); font-size: 10px; white-space: nowrap; }
.pfx-c-tones__lock input { width: 13px; height: 13px; margin: 0; accent-color: var(--pfx-accent); }
.pfx-v2 .pfx-tones-embedded .pfx-c-tones__reset {
  justify-self: start;
  background: transparent;
  color: var(--pfx-muted);
  padding: 4px 6px;
}
.pfx-c-tones__inspector { display: grid; align-content: start; gap: 6px; padding-top: 9px; }
.pfx-c-tones__selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 36px;
}
.pfx-c-tones__selected-swatch {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 5px;
}
.pfx-c-tones__selected > strong {
  color: var(--pfx-text);
  font: 700 12px ui-monospace, monospace;
}
.pfx-c-tones__contrast {
  color: var(--pfx-muted);
  font: 10px ui-monospace, monospace;
}
.pfx-c-tones__tone-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}
.pfx-c-tones__manual { border-top: 1px solid var(--tone-border); margin-top: 3px; }
.pfx-c-tones__manual-controls > button { justify-self: start; }
.pfx-c-tones__manual-controls > p { margin: 0; font-size: 10px; color: var(--pfx-muted); }
.pfx-c-tones__status { min-height: 0; margin: 0; font-size: 10px; color: var(--pfx-muted); }
.pfx-c-tones__status:empty { display: none; }
@media (max-width: 960px) {
  .pfx-v2 .pfx-tones-embedded { width: min(100%, 520px); }
}
@media (max-width: 440px) {
  .pfx-c-tones__heading { row-gap: 7px; }
  .pfx-c-tones__heading > span { margin-right: auto; }
  .pfx-c-tones__header-actions { margin-left: 0; }
  .pfx-v2 .pfx-tones-embedded { padding: 10px; }
  .pfx-v2 .pfx-c-palette-ribbon.pfx-c-tones__ribbon { height: 66px; }
}

/* Unified Picker: one compact instrument, never stretch controls into unused space. */
.pfx-v2 .pfx-picker.pfx-c-workbench--picker {
  --pfx-picker-gutter: clamp(14px, 2vw, 28px);
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: var(--pfx-picker-gutter);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: auto;
  background: var(--pfx-bg);
  color: var(--pfx-text);
}
/* The existing interactive ribbon alone spans the stage immediately below the navbar. */
.pfx-picker__tone-strip {
  min-width: 0;
  margin: calc(-1 * var(--pfx-picker-gutter)) calc(-1 * var(--pfx-picker-gutter)) 14px;
}
.pfx-picker__layout {
  display: grid;
  grid-template-columns: minmax(0,520px) minmax(0,355px);
  gap: 14px;
  align-items: start;
  width: min(100%,889px);
  min-height: 0;
}
.pfx-picker__canvas-card {
  width: min(100%, 520px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--pfx-line);
  border-radius: 12px;
  background: var(--pfx-panel);
  box-shadow: var(--pfx-v2-shadow);
}
.pfx-picker__card-caption {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;
  align-items: center;
  align-content: center;
  column-gap: 7px;
  row-gap: 7px;
  min-height: 56px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pfx-line);
}
.pfx-picker__swatch {
  display: block;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.pfx-v2 .pfx-picker__value-input {
  flex: 0 1 auto;
  box-sizing: border-box;
  min-width: 0;
  max-width: calc(100% - 44px);
  height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 7px;
  background: var(--pfx-v2-field);
  color: var(--pfx-text);
  font: 650 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pfx-v2 .pfx-picker__value-input[aria-invalid="true"] { border-color: #bc4b4b; }
.pfx-v2 .pfx-picker__format {
  flex: 0 0 auto;
  width: auto;
  max-width: 98px;
  height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 7px;
  background: var(--pfx-v2-field);
  color: var(--pfx-text);
  font-size: 11px;
  font-weight: 650;
}
.pfx-v2 .pfx-picker__copy {
  flex: 0 0 auto;
  height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 7px;
  background: var(--pfx-panel);
  color: var(--pfx-text);
  font-size: 11px;
  font-weight: 650;
}
.pfx-v2 .pfx-picker__copy:hover { border-color: var(--pfx-accent); }
.pfx-v2 .pfx-picker__save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 7px;
  background: var(--pfx-panel);
  color: var(--pfx-text);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.pfx-v2 .pfx-picker__save:hover { border-color: var(--pfx-accent); }
.pfx-v2 .pfx-picker__save.pfx-is-saved {
  border-color: var(--pfx-accent);
  color: var(--pfx-accent);
  background: var(--pfx-accent-soft);
}
.pfx-v2 .pfx-picker__save:focus-visible {
  outline: 2px solid var(--pfx-accent);
  outline-offset: 2px;
}
.pfx-picker__save > span:first-child { font-size: 14px; line-height: 1; }

.pfx-picker__error {
  margin: 0;
  padding: 7px 13px;
  border-bottom: 1px solid var(--pfx-line);
  color: #bc4b4b;
  font-size: 11px;
}
.pfx-v2 .pfx-c-picker-main.pfx-picker__surface {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  border: 0;
  background: var(--pfx-panel);
}
.pfx-v2 .pfx-c-color-field.pfx-picker__field {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 325px;
  aspect-ratio: 1.65;
  overflow: hidden;
  border: 0;
  background: #777;
  isolation: isolate;
  touch-action: none;
  user-select: none;
}
.pfx-v2 .pfx-c-color-field.pfx-picker__field::before,
.pfx-v2 .pfx-c-color-field.pfx-picker__field::after { display: none; }
.pfx-picker__plane {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pfx-v2 .pfx-c-color-field.pfx-picker__field:focus-visible {
  outline: 2px solid var(--pfx-accent);
  outline-offset: -2px;
}
/* Precision selector: the ring stays centered on the selected coordinates.
   The current HEX remains in the card header; nothing floats over the field. */
.pfx-picker__precision-cursor {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: var(--pfx-picked-color);
  box-shadow: 0 0 0 1.5px #1b2029, 0 1px 4px rgba(0,0,0,.22);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  pointer-events: none;
}
.pfx-picker__precision-cursor::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 0 1px #161b20;
  transform: translate(-50%, -50%);
  content: "";
}
.pfx-picker__field.pfx-is-active .pfx-picker__precision-cursor {
  transform: translate(-50%, -50%) scale(1.13);
}
@media (prefers-reduced-motion: no-preference) {
  .pfx-picker__precision-cursor {
    transition: transform 110ms ease-out;
  }
}
.pfx-picker__hue-panel {
  display: grid;
  gap: 15px;
  padding: 15px 16px 17px;
  border-top: 1px solid var(--pfx-line);
}
.pfx-picker__hue-row { display: grid; gap: 9px; }
.pfx-picker__hue-row > label,
.pfx-picker__rail > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--pfx-muted);
  font-size: 10px;
  font-weight: 650;
}
.pfx-picker__hue-row strong,
.pfx-picker__rail strong {
  color: var(--pfx-text);
  font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Hue keeps the shared drag/keyboard engine. Its thumb follows the other rails. */
.pfx-v2 .pfx-c-picker-hue.pfx-picker__hue {
  height: 14px;
  border: 1px solid rgba(0, 0, 0, .28);
  border-radius: 999px;
  background: linear-gradient(to right,
    #f00 0%, #ff0 16.6667%, #0f0 33.3333%, #0ff 50%,
    #00f 66.6667%, #f0f 83.3333%, #f00 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  cursor: ew-resize;
  touch-action: none;
  outline-offset: 7px;
}
.pfx-picker__hue .pfx-c-picker-hue__handle {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(23,28,37,.78), 0 2px 7px rgba(0,0,0,.24);
  pointer-events: none;
}
.pfx-v2 .pfx-c-picker-hue.pfx-picker__hue:focus-visible {
  outline: 2px solid var(--pfx-accent);
}

/* Native input semantics, custom track and color-accurate thumb artwork.
   The alpha track layers actual-color transparency over a checkerboard.
   Saturation and lightness tracks regenerate for the current HSL channels. */
.pfx-picker__rail { display: grid; gap: 7px; min-width: 0; }
.pfx-v2 .pfx-picker__rail input[type="range"] {
  display: block;
  width: 100%;
  height: 26px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline-offset: 4px;
  background: transparent;
  cursor: ew-resize;
  appearance: none;
  -webkit-appearance: none;
  touch-action: pan-y;
}
.pfx-v2 .pfx-picker__rail input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 999px;
  background-image: var(--pfx-rail-gradient), var(--pfx-rail-checker);
  background-size: 100% 100%, 12px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13);
}
.pfx-v2 .pfx-picker__rail input[type="range"]::-moz-range-track {
  height: 14px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 999px;
  background-image: var(--pfx-rail-gradient), var(--pfx-rail-checker);
  background-size: 100% 100%, 12px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13);
}
.pfx-v2 .pfx-picker__rail input[type="range"]::-moz-range-progress {
  background: transparent;
}
.pfx-v2 .pfx-picker__rail input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -5px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pfx-rail-thumb);
  box-shadow: 0 0 0 1.5px rgba(23,28,37,.78), 0 2px 7px rgba(0,0,0,.24);
}
.pfx-v2 .pfx-picker__rail input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pfx-rail-thumb);
  box-shadow: 0 0 0 1.5px rgba(23,28,37,.78), 0 2px 7px rgba(0,0,0,.24);
}
.pfx-v2 .pfx-picker__rail input[type="range"]:focus-visible {
  outline: 2px solid var(--pfx-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .pfx-v2 .pfx-picker__rail input[type="range"]::-webkit-slider-thumb {
    transition: box-shadow 120ms ease;
  }
  .pfx-v2 .pfx-picker__rail input[type="range"]::-moz-range-thumb {
    transition: box-shadow 120ms ease;
  }
}

.pfx-picker__advanced {
  border-top: 1px solid var(--pfx-line);
  padding: 0 16px;
}
.pfx-picker__advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  color: var(--pfx-text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.pfx-picker__advanced > summary::-webkit-details-marker { display: none; }
.pfx-picker__advanced > summary::after {
  content: "+";
  color: var(--pfx-muted);
  font: 500 19px/1 ui-monospace, monospace;
}
.pfx-picker__advanced[open] > summary::after { content: "−"; }
.pfx-picker__edit {
  display: grid;
  gap: 14px;
  padding: 2px 0 18px;
}
.pfx-picker__numerics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--pfx-line);
}
.pfx-picker__numeric { display: grid; min-width: 0; gap: 5px; }
.pfx-picker__numeric span { color: var(--pfx-muted); font-size: 10px; }
.pfx-v2 .pfx-picker__numeric input {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 6px;
  background: var(--pfx-v2-field);
  color: var(--pfx-text);
  font: 600 11px ui-monospace, monospace;
}
.pfx-picker__status {
  margin: 0;
  padding: 0 16px;
  font-size: 10px;
  color: var(--pfx-muted);
}
.pfx-picker__status:not(:empty) { padding-block: 8px; border-top: 1px solid var(--pfx-line); }

/* Short laptop viewports: keep both tools visible without needless page scrolling. */
@media (min-width: 961px) and (max-height: 820px) {
  .pfx-v2 .pfx-picker.pfx-c-workbench--picker { --pfx-picker-gutter: 16px; padding: 12px 16px; }
  .pfx-picker__tone-strip { margin: -12px -16px 14px; }
  .pfx-v2 .pfx-c-color-field.pfx-picker__field { aspect-ratio: 2.18; }
  .pfx-picker__hue-panel { padding: 10px 13px 12px; gap: 9px; }
  .pfx-picker__edit { gap: 8px; padding-bottom: 10px; }
  .pfx-picker__advanced > summary { min-height: 35px; }
}
@media (max-width: 960px) {
  .pfx-picker__layout {
    grid-template-columns: minmax(0,520px);
    width: min(100%,520px);
    gap: 14px;
  }
}
@media (max-width: 580px) {
  .pfx-v2 .pfx-picker.pfx-c-workbench--picker { --pfx-picker-gutter: 12px; }
  .pfx-picker__card-caption { padding: 9px 10px; }
  .pfx-v2 .pfx-picker__value-input { max-width: calc(100% - 44px); }
  .pfx-v2 .pfx-c-color-field.pfx-picker__field { aspect-ratio: 1.45; max-height: 300px; }
  .pfx-picker__hue-panel { padding: 13px 13px 17px; }
  .pfx-picker__advanced { padding-inline: 13px; }
  .pfx-picker__numerics { gap: 6px; }
}
@media (max-height: 550px) and (min-width: 581px) {
  .pfx-v2 .pfx-c-color-field.pfx-picker__field { aspect-ratio: 2.2; }
}

/* Harmony — a compact chromatic atelier, not a dashboard.
   Intentionally leaves the right-hand workspace unoccupied. Every instrument
   is its natural size: do not expand it simply because the window is larger. */
.pfx-v2 .pfx-harmony.pfx-c-workbench--harmony {
  display:block;
  width:100%; height:100%; min-height:0;
  padding:clamp(19px,3.1vh,32px) clamp(18px,5.3vw,80px) 16px;
  overflow:hidden;
  background:var(--pfx-bg); color:var(--pfx-text);
  --hm-ink:var(--pfx-text);
  --hm-muted:var(--pfx-muted);
  --hm-rule:var(--pfx-line);
  --hm-accent:var(--pfx-accent);
  --hm-paper:var(--pfx-bg);
  --hm-field:var(--pfx-v2-field);
}
.pfx-v2 .pfx-harmony *,
.pfx-v2 .pfx-harmony *::before,
.pfx-v2 .pfx-harmony *::after {box-sizing:border-box;}
.pfx-v2 .pfx-harmony button {font-family:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent;}
.pfx-v2 .pfx-harmony button:focus-visible,
.pfx-v2 .pfx-harmony [role=slider]:focus-visible,
.pfx-v2 .pfx-harmony input:focus-visible {outline:2px solid var(--hm-accent);outline-offset:3px;}
.pfx-harmony__heading,
.pfx-harmony__presets,
.pfx-harmony__stage,
.pfx-harmony__result,
.pfx-harmony__status {width:712px;max-width:100%;}
.pfx-v2 .pfx-harmony__heading {
  display:flex;align-items:end;justify-content:space-between;gap:18px;
  margin:0 0 29px;min-height:43px;
}
.pfx-harmony__heading > div:first-child {min-width:0;}
.pfx-harmony__heading .pfx-v2__eyebrow {
  display:block;margin:0 0 4px;
  color:var(--hm-muted);
  font:650 9px/1.2 ui-monospace,SFMono-Regular,monospace;
  letter-spacing:.14em;
}
.pfx-harmony__heading h1 {
  margin:0;color:var(--hm-ink);
  font:650 29px/1.04 Inter,ui-sans-serif,system-ui,sans-serif;
  letter-spacing:-.062em;
}
.pfx-harmony__actions {
  display:flex;align-items:center;justify-content:flex-start;
  gap:5px;flex-wrap:nowrap;flex-shrink:0;padding:0 0 1px;
}
.pfx-v2 .pfx-harmony__actions button {
  min-height:31px;border:1px solid transparent;border-radius:4px;
  padding:5px 10px;background:transparent;color:var(--hm-muted);
  font:620 10px/1.3 ui-sans-serif,system-ui,sans-serif;
  white-space:nowrap;box-shadow:none;
}
.pfx-v2 .pfx-harmony__actions button:hover {background:var(--hm-field);color:var(--hm-ink);}
.pfx-v2 .pfx-harmony__actions .pfx-harmony__primary {
  margin-left:4px;padding:7px 12px;
  background:var(--hm-ink);color:var(--hm-paper);border-color:var(--hm-ink);
}
.pfx-v2 .pfx-harmony__actions .pfx-harmony__primary:hover {
  background:var(--hm-ink);color:var(--hm-paper);filter:brightness(.9);border-color:var(--hm-ink);
}
.pfx-harmony__section-line {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-width:0;color:var(--hm-muted);font:500 10px/1.3 ui-sans-serif,system-ui,sans-serif;
}
.pfx-harmony__section-line strong {
  color:var(--hm-muted);
  font:650 9px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.095em;
}
.pfx-harmony__presets {margin:0 0 29px;}
.pfx-harmony__presets > .pfx-harmony__section-line {width:692px;max-width:100%;margin-bottom:9px;}
.pfx-v2 .pfx-c-harmony-presets {
  display:grid;grid-template-columns:repeat(6,107px);grid-template-rows:auto;
  align-items:start;gap:7px;width:max-content;max-width:100%;
  padding:0;margin:0;background:transparent;border:0;
}
.pfx-v2 .pfx-c-harmony-preset {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-width:0;min-height:61px;gap:5px;
  padding:6px 4px;border:1px solid transparent;border-radius:5px;
  background:transparent;color:var(--hm-muted);
  box-shadow:none;
  transition:background .16s ease,border-color .16s ease;
}
.pfx-v2 .pfx-c-harmony-preset:hover {background:var(--hm-field);border-color:var(--hm-rule);}
.pfx-v2 .pfx-c-harmony-preset.pfx-is-current {
  background:var(--hm-field);border-color:var(--pfx-line-strong);
  box-shadow:inset 0 -2px 0 var(--hm-ink);color:var(--hm-ink);
}
.pfx-v2 .pfx-c-harmony-preset__glyph {
  position:relative;flex:0 0 29px;width:29px;height:29px;
  border:1px solid var(--pfx-line-strong);border-radius:50%;
}
.pfx-v2 .pfx-c-harmony-preset__glyph > i {
  width:3px;height:3px;background:var(--hm-muted);
}
.pfx-v2 .pfx-c-harmony-preset__glyph > b {
  width:5px;height:5px;border:1px solid var(--hm-paper);
  box-shadow:none;background:var(--hm-muted);
}
.pfx-v2 .pfx-c-harmony-preset.pfx-is-current .pfx-c-harmony-preset__glyph {
  border-color:var(--hm-ink);box-shadow:none;
}
.pfx-v2 .pfx-c-harmony-preset.pfx-is-current .pfx-c-harmony-preset__glyph > b {
  border-color:var(--hm-field);background:var(--hm-ink);box-shadow:none;
}
.pfx-v2 .pfx-c-harmony-preset > strong {
  min-width:0;text-align:center;overflow-wrap:normal;white-space:nowrap;
  font:610 10px/1.15 ui-sans-serif,system-ui,sans-serif;
}
.pfx-harmony__stage {
  display:grid;grid-template-columns:312px 238px;
  gap:43px;align-items:start;
  margin:0;min-height:0;
}
.pfx-harmony__wheel-card,
.pfx-harmony__inspector {
  position:relative;display:flex;flex-direction:column;
  min-width:0;border:0;border-radius:0;
  background:transparent;box-shadow:none;overflow:visible;
}
.pfx-harmony__wheel-card > .pfx-harmony__section-line,
.pfx-harmony__inspector > .pfx-harmony__section-line {
  min-height:22px;padding:0;margin:0 0 8px;border:0;
}
.pfx-v2 .pfx-c-wheel-zone.pfx-harmony__wheel-zone {
  display:grid;place-items:center;
  width:308px;height:281px;min-height:0;
  padding:10px 0 12px;
  border:0;overflow:visible;background:transparent;
}
.pfx-v2 .pfx-c-wheel.pfx-harmony__wheel {
  display:block;
  width:249px;min-width:0;height:249px;aspect-ratio:1;
  border:0;border-radius:50%;
  background:conic-gradient(#fc5151 0deg,#f3c84b 57deg,#61d98c 125deg,#55bfd9 185deg,#688eea 247deg,#c17cde 304deg,#fc5151 360deg);
  box-shadow:0 0 0 1px var(--pfx-line-strong),0 0 0 9px var(--hm-paper),0 0 0 10px var(--hm-rule);
}
.pfx-v2 .pfx-c-wheel.pfx-harmony__wheel::after {
  inset:17%;border-radius:50%;background:var(--hm-paper);
  box-shadow:inset 0 0 0 1px var(--hm-rule);
}
.pfx-v2 .pfx-harmony__wheel .pfx-c-harmony-arm {
  height:1px;background:linear-gradient(90deg,transparent,var(--pfx-line-strong));
}
.pfx-v2 .pfx-c-wheel__center.pfx-harmony__wheel-center {
  inset:36%;display:flex;align-items:center;justify-content:center;gap:3px;
  flex-direction:column;
  background:var(--hm-paper);border:1px solid var(--hm-rule);
}
.pfx-harmony__wheel-center span {
  font:630 8px ui-monospace,monospace;letter-spacing:.06em;color:var(--hm-muted);
}
.pfx-harmony__wheel-center strong {
  font:640 17px/1.1 ui-monospace,monospace;color:var(--hm-ink);letter-spacing:-.035em;
}
.pfx-v2 .pfx-c-node.pfx-harmony__node {
  display:grid;place-items:center;
  width:34px;height:34px;
  border:3px solid var(--hm-paper);border-radius:50%;
  box-shadow:0 0 0 1px var(--pfx-line-strong),0 3px 9px rgba(0,0,0,.13);
  font:700 11px ui-monospace,monospace;text-shadow:none;
  touch-action:none;
}
.pfx-harmony__seed {
  display:flex;align-items:center;gap:9px;
  width:308px;min-height:34px;
  padding:0;margin:2px 0 0;background:transparent;border:0;
}
.pfx-harmony__seed-chip {
  display:block;flex:0 0 25px;width:25px;height:25px;
  border-radius:4px;border:1px solid var(--pfx-line-strong);
}
.pfx-harmony__seed > div {display:flex;flex-direction:column;gap:2px;margin:0 auto 0 0;}
.pfx-harmony__seed small,.pfx-harmony__picked small {
  color:var(--hm-muted);font:600 8px/1.2 ui-monospace,monospace;letter-spacing:.08em;
}
.pfx-harmony__seed strong {font:650 11px ui-monospace,monospace;color:var(--hm-ink);}
.pfx-v2 .pfx-harmony__seed button {
  min-height:27px;padding:4px 6px;
  border:0;border-radius:3px;background:transparent;color:var(--hm-muted);
  font:600 10px ui-sans-serif,system-ui,sans-serif;
}
.pfx-v2 .pfx-harmony__seed button:hover {background:var(--hm-field);color:var(--hm-ink);}
.pfx-harmony__inspector {width:238px;max-width:100%;}
.pfx-harmony__inspector > .pfx-harmony__section-line > button {
  padding:0;border:0;border-radius:0;background:transparent;
  color:var(--hm-muted);font:600 10px/1.2 ui-sans-serif,system-ui,sans-serif;
}
.pfx-harmony__inspector > .pfx-harmony__section-line > button:hover {color:var(--hm-ink);}
.pfx-harmony__rotation {
  display:flex;align-items:center;flex-direction:column;gap:8px;
  padding:4px 0 0;margin:0;border:0;
}
.pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial {
  width:116px;min-width:0;height:116px;aspect-ratio:1;
  border:1px solid var(--hm-rule);
  background:radial-gradient(circle at center,var(--hm-paper) 0 42%,transparent 43%),repeating-conic-gradient(from 0deg,var(--pfx-line-strong) 0 1deg,transparent 1deg 15deg),var(--hm-paper);
  box-shadow:inset 0 0 0 8px var(--hm-paper),inset 0 0 0 9px var(--hm-rule);
}
.pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__track {
  inset:11px;border-color:var(--hm-rule);
}
.pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__needle {inset:11px;}
.pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__needle::before {
  width:11px;height:11px;background:var(--hm-ink);border:2px solid var(--hm-paper);
  box-shadow:0 0 0 1px var(--hm-rule);
}
.pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__needle::after {
  background:var(--hm-muted);
}
.pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__readout {
  background:var(--hm-paper);border:0;
}
.pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__readout > strong {
  color:var(--hm-ink);font-size:15px;
}
.pfx-harmony__rotation-steps {
  display:grid;grid-template-columns:1fr auto 1fr;
  align-items:center;gap:7px;width:238px;max-width:100%;
}
.pfx-harmony__rotation-steps output {
  color:var(--hm-muted);font:600 9px ui-monospace,monospace;
}
.pfx-v2 .pfx-harmony__rotation-steps button {
  min-height:27px;padding:3px 7px;
  border:1px solid var(--hm-rule);border-radius:4px;
  background:transparent;color:var(--hm-ink);
  font:600 11px ui-monospace,monospace;
}
.pfx-v2 .pfx-harmony__rotation-steps button:hover {background:var(--hm-field);}
.pfx-harmony__spread {
  display:grid;gap:4px;margin:13px 0 0;padding:11px 0 0;
  border:0;border-top:1px solid var(--hm-rule);
}
.pfx-harmony__spread > div {
  display:flex;align-items:center;justify-content:space-between;
  gap:9px;font-size:11px;
}
.pfx-harmony__spread > div > strong {font-size:11px;font-weight:620;}
.pfx-harmony__spread output {font:650 11px ui-monospace,monospace;}
.pfx-v2 .pfx-harmony__spread input[type=range] {
  width:100%;height:22px;margin:0;padding:0;border:0;
  background:transparent;accent-color:var(--hm-accent);touch-action:pan-y;
}
.pfx-harmony__spread p {
  min-height:22px;margin:0;
  color:var(--hm-muted);font:500 10px/1.3 ui-sans-serif,system-ui,sans-serif;
}
.pfx-harmony__picked {
  display:flex;align-items:center;gap:9px;
  padding:12px 0 0;margin:11px 0 0;
  border:0;border-top:1px solid var(--hm-rule);
}
.pfx-harmony__picked > div {display:grid;gap:3px;min-width:0;margin-right:auto;}
.pfx-harmony__picked strong {color:var(--hm-ink);font:650 12px ui-monospace,monospace;}
.pfx-harmony__picked > span {
  width:29px;height:29px;flex:0 0 29px;
  border:1px solid var(--pfx-line-strong);border-radius:4px;order:-1;
}
.pfx-v2 .pfx-harmony__picked button {
  padding:4px 6px;min-height:27px;
  border:0;border-radius:3px;
  background:transparent;color:var(--hm-muted);
  font:610 10px ui-sans-serif,system-ui,sans-serif;
}
.pfx-v2 .pfx-harmony__picked button:hover {background:var(--hm-field);color:var(--hm-ink);}
.pfx-harmony__export {position:relative;display:block;margin:12px 0 0;padding:0;}
.pfx-v2 .pfx-harmony__export > button {
  min-height:27px;padding:5px 0;border:0;border-radius:0;
  background:transparent;color:var(--hm-muted);
  font:620 10px ui-sans-serif,system-ui,sans-serif;
}
.pfx-v2 .pfx-harmony__export > button:hover {color:var(--hm-ink);}
.pfx-harmony__export > div {
  position:absolute;top:calc(100% + 4px);left:0;z-index:12;
  display:grid;grid-template-columns:repeat(2,auto);
  gap:5px;padding:6px;
  border:1px solid var(--hm-rule);border-radius:6px;
  background:var(--pfx-panel);box-shadow:0 10px 22px rgba(0,0,0,.14);
}
.pfx-v2 .pfx-harmony__export > div button {
  padding:8px 9px;border:0;border-radius:4px;
  background:transparent;color:var(--hm-ink);
  white-space:nowrap;font-size:10px;
}
.pfx-v2 .pfx-harmony__export > div button:hover {background:var(--hm-field);}
.pfx-harmony__result {margin:23px 0 0;padding:0;}
.pfx-harmony__result > .pfx-harmony__section-line {
  width:510px;max-width:100%;margin:0 0 9px;
}
.pfx-v2 .pfx-c-harmony-swatches.pfx-harmony__swatches {
  display:grid;grid-template-columns:repeat(4,110px);
  gap:8px;align-items:start;justify-content:start;
  width:max-content;max-width:100%;padding:0;
  background:transparent;border:0;
}
.pfx-harmony__swatch {
  width:110px;min-width:0;
  overflow:visible;border:0;border-radius:0;
  background:transparent;box-shadow:none;
}
.pfx-v2 .pfx-harmony__swatch-surface {
  display:flex;flex-direction:column;justify-content:space-between;
  align-items:flex-start;gap:6px;
  width:110px;min-height:74px;height:74px;
  padding:9px 10px;
  border:0;border-radius:4px;text-align:left;
}
.pfx-harmony__swatch-surface span {font:700 9px ui-monospace,monospace;opacity:.8;}
.pfx-harmony__swatch-surface strong {font:700 11px ui-monospace,monospace;}
.pfx-harmony__swatch > div {
  display:flex;align-items:center;justify-content:space-between;
  gap:3px;margin:0;padding:0;
}
.pfx-v2 .pfx-harmony__swatch > div button {
  min-height:26px;padding:5px 4px;
  border:0;border-radius:0;
  background:transparent;color:var(--hm-muted);
  font:620 10px ui-sans-serif,system-ui,sans-serif;
}
.pfx-harmony__swatch > div button[aria-pressed=true] {color:var(--hm-accent);}
.pfx-v2 .pfx-harmony__swatch > div button:hover {color:var(--hm-ink);}
.pfx-harmony__status {
  min-height:16px;margin:8px 0 0;
  color:var(--hm-muted);
  font:500 10px/1.4 ui-monospace,monospace;
}

/* Smaller laptops retain a composed cluster and unused right-hand space. */
@media(max-width:950px) {
  .pfx-v2 .pfx-harmony.pfx-c-workbench--harmony {
    padding:16px 20px 14px;
  }
  .pfx-harmony__heading {margin-bottom:19px;}
  .pfx-harmony__presets {margin-bottom:18px;}
}

/* Narrow workspaces use the same instruments in a tight two-column atelier. */
@media(max-width:720px) {
  .pfx-v2 .pfx-harmony.pfx-c-workbench--harmony {
    padding:10px 13px 7px;
    overflow:hidden;
  }
  .pfx-harmony__heading,
  .pfx-harmony__presets,
  .pfx-harmony__stage,
  .pfx-harmony__result,
  .pfx-harmony__status {width:100%;max-width:354px;}
  .pfx-v2 .pfx-harmony__heading {
    flex-wrap:wrap;align-items:center;gap:8px;
    min-height:0;margin:0 0 13px;
  }
  .pfx-harmony__heading .pfx-v2__eyebrow {font-size:8px;margin:0 0 2px;}
  .pfx-harmony__heading h1 {font-size:23px;}
  .pfx-harmony__actions {flex-wrap:nowrap;gap:2px;padding:0;}
  .pfx-v2 .pfx-harmony__actions button {
    min-height:26px;padding:4px 6px;font-size:9px;
  }
  .pfx-v2 .pfx-harmony__actions .pfx-harmony__primary {
    margin-left:1px;padding:5px 8px;
  }
  .pfx-harmony__presets {margin:0 0 13px;}
  .pfx-harmony__presets > .pfx-harmony__section-line {margin:0 0 5px;}
  .pfx-harmony__section-line {font-size:9px;gap:6px;}
  .pfx-harmony__section-line strong {font-size:8px;}
  .pfx-v2 .pfx-c-harmony-presets {
    width:100%;grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
  }
  .pfx-v2 .pfx-c-harmony-preset {
    min-height:47px;padding:5px 3px;gap:3px;
  }
  .pfx-v2 .pfx-c-harmony-preset__glyph {flex-basis:22px;width:22px;height:22px;}
  .pfx-v2 .pfx-c-harmony-preset__glyph > b {width:4px;height:4px;}
  .pfx-v2 .pfx-c-harmony-preset > strong {font-size:9px;white-space:nowrap;}
  .pfx-harmony__stage {
    grid-template-columns:minmax(0,1.36fr) minmax(0,.92fr);
    gap:11px;
  }
  .pfx-harmony__wheel-card > .pfx-harmony__section-line,
  .pfx-harmony__inspector > .pfx-harmony__section-line {
    height:17px;min-height:17px;margin:0 0 4px;
  }
  .pfx-harmony__wheel-card > .pfx-harmony__section-line span {display:none;}
  .pfx-harmony__inspector > .pfx-harmony__section-line button {font-size:9px;}
  .pfx-v2 .pfx-c-wheel-zone.pfx-harmony__wheel-zone {
    width:100%;height:195px;min-height:0;
    padding:7px 0 6px;
  }
  .pfx-v2 .pfx-c-wheel.pfx-harmony__wheel {
    width:min(183px,100%);min-width:0;height:auto;aspect-ratio:1;
    box-shadow:0 0 0 1px var(--pfx-line-strong),0 0 0 5px var(--hm-paper),0 0 0 6px var(--hm-rule);
  }
  .pfx-v2 .pfx-c-node.pfx-harmony__node {
    width:26px;height:26px;border-width:2px;
    font-size:9px;
  }
  .pfx-v2 .pfx-c-wheel__center.pfx-harmony__wheel-center {inset:32%;}
  .pfx-harmony__wheel-center span {font-size:6px;}
  .pfx-harmony__wheel-center strong {font-size:13px;}
  .pfx-harmony__seed {width:100%;min-height:26px;margin:0;gap:6px;}
  .pfx-harmony__seed-chip {flex-basis:20px;width:20px;height:20px;}
  .pfx-harmony__seed small {font-size:7px;}
  .pfx-harmony__seed strong {font-size:9px;}
  .pfx-v2 .pfx-harmony__seed button {font-size:8px;padding:3px 4px;min-height:23px;}
  .pfx-harmony__inspector {width:100%;max-width:100%;}
  .pfx-harmony__rotation {gap:3px;padding:0;}
  .pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial {width:84px;height:84px;}
  .pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__track,
  .pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__needle {inset:8px;}
  .pfx-v2 .pfx-harmony__rotation .pfx-c-harmony-dial__readout > strong {font-size:12px;}
  .pfx-harmony__rotation-steps {gap:3px;width:100%;}
  .pfx-harmony__rotation-steps output {font-size:7px;white-space:nowrap;}
  .pfx-v2 .pfx-harmony__rotation-steps button {font-size:9px;padding:3px 2px;min-height:23px;}
  .pfx-harmony__spread {gap:2px;margin:6px 0 0;padding:6px 0 0;}
  .pfx-harmony__spread > div,.pfx-harmony__spread output {font-size:9px;}
  .pfx-v2 .pfx-harmony__spread input[type=range] {height:18px;}
  .pfx-harmony__spread p {font-size:9px;min-height:15px;}
  .pfx-harmony__picked {gap:5px;padding:6px 0 0;margin:6px 0 0;}
  .pfx-harmony__picked small {font-size:7px;}
  .pfx-harmony__picked strong {font-size:10px;}
  .pfx-harmony__picked > span {width:19px;height:19px;flex-basis:19px;}
  .pfx-v2 .pfx-harmony__picked button {font-size:9px;padding:3px 2px;min-height:22px;}
  .pfx-harmony__export {margin:5px 0 0;}
  .pfx-v2 .pfx-harmony__export > button {font-size:9px;min-height:22px;padding:2px 0;}
  .pfx-harmony__result {margin:12px 0 0;}
  .pfx-harmony__result > .pfx-harmony__section-line {margin:0 0 5px;}
  .pfx-v2 .pfx-c-harmony-swatches.pfx-harmony__swatches {
    grid-template-columns:repeat(4,minmax(0,1fr));width:100%;max-width:354px;
    gap:5px;
  }
  .pfx-harmony__swatch {width:auto;}
  .pfx-v2 .pfx-harmony__swatch-surface {
    width:100%;height:61px;min-height:61px;
    padding:6px 7px;border-radius:3px;
  }
  .pfx-harmony__swatch-surface span {font-size:8px;}
  .pfx-harmony__swatch-surface strong {font-size:9px;}
  .pfx-harmony__swatch > div {gap:0;}
  .pfx-v2 .pfx-harmony__swatch > div button {font-size:9px;min-height:22px;padding:3px 1px;}
  .pfx-harmony__status {min-height:12px;margin:5px 0 0;font-size:9px;}
}
@media(max-width:370px) {
  .pfx-v2 .pfx-harmony.pfx-c-workbench--harmony {padding:7px 9px;}
  .pfx-harmony__heading {gap:4px;}
  .pfx-v2 .pfx-harmony__actions button {padding:4px 4px;font-size:8px;}
  .pfx-harmony__presets {margin-bottom:8px;}
  .pfx-v2 .pfx-c-harmony-preset {padding:4px 4px;}
  .pfx-v2 .pfx-c-harmony-preset > strong {font-size:8px;white-space:nowrap;}
  .pfx-harmony__stage {gap:7px;}
  .pfx-v2 .pfx-c-wheel-zone.pfx-harmony__wheel-zone {height:174px;}
  .pfx-v2 .pfx-c-wheel.pfx-harmony__wheel {width:min(165px,100%);}
  .pfx-harmony__result {margin-top:8px;}
}
@media(max-height:760px) and (min-width:721px) {
  .pfx-v2 .pfx-harmony.pfx-c-workbench--harmony {padding-top:12px;}
  .pfx-v2 .pfx-harmony__heading {margin-bottom:12px;}
  .pfx-harmony__presets {margin-bottom:13px;}
  .pfx-v2 .pfx-c-wheel-zone.pfx-harmony__wheel-zone {height:241px;}
  .pfx-v2 .pfx-c-wheel.pfx-harmony__wheel {width:218px;height:218px;}
  .pfx-harmony__result {margin-top:13px;}
}
@media(prefers-reduced-motion:reduce) {
  .pfx-harmony__node,.pfx-c-harmony-preset {transition:none!important;}
}

.pfx-c-collections__sets { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; }
.pfx-c-collections__set {
  overflow:hidden; min-width:0; border-radius:14px; border:1px solid var(--pfx-line);
  background:var(--pfx-panel); box-shadow:var(--pfx-v2-shadow);
}
.pfx-c-collections__set-head {
  display:flex; align-items:start; justify-content:space-between; gap:12px; padding:15px;
}
.pfx-c-collections__set-head > div { display:grid; gap:5px; min-width:0; }
.pfx-c-collections__set-head strong { font-size:13px; }
.pfx-c-collections__set-head small { color:var(--pfx-muted); font-size:11px; }
.pfx-v2 .pfx-c-collections__set-head button,
.pfx-v2 .pfx-c-collections__set-actions button {
  border:1px solid var(--pfx-line); border-radius:8px; background:var(--pfx-panel);
  color:var(--pfx-text); font-size:11px; padding:8px 10px;
}
.pfx-v2 .pfx-c-collections__set-head button:hover,
.pfx-v2 .pfx-c-collections__set-actions button:hover { border-color:var(--pfx-accent); }
.pfx-c-collections__set-colors { display:flex; width:100%; height:115px; padding:0 10px; gap:2px; }
.pfx-v2 .pfx-c-collections__set-colors button { flex:1 1 0; min-width:0; border:0; }
.pfx-c-collections__set-colors button:first-child { border-radius:8px 0 0 8px; }
.pfx-c-collections__set-colors button:last-child { border-radius:0 8px 8px 0; }
.pfx-c-collections__set-actions {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:12px; color:var(--pfx-muted); font:10px ui-monospace,monospace;
}
@media (max-width:580px) { .pfx-c-collections__sets { grid-template-columns:minmax(0,1fr); } }

.pfx-collections__header-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.pfx-v2 .pfx-collections__header-actions > button,
.pfx-v2 .pfx-collections__restore {
  display:inline-flex; align-items:center; justify-content:center; position:relative;
  min-height:38px; padding:9px 12px; font-size:11px; font-weight:600;
  border:1px solid var(--pfx-line-strong); border-radius:9px;
  background:var(--pfx-panel); color:var(--pfx-text); cursor:pointer;
}
.pfx-v2 .pfx-collections__header-actions > button:hover,
.pfx-v2 .pfx-collections__restore:hover { border-color:var(--pfx-accent); }
.pfx-collections__restore input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.pfx-collections__restore:focus-within { outline:2px solid var(--pfx-accent); outline-offset:3px; }
.pfx-c-collections__gradient-preview { min-height:130px; margin:0 12px; border-radius:9px; border:1px solid var(--pfx-line); }

/* Gradient Atelier
   Small instruments, a fixed square study, deliberate unoccupied space.
   This is a presentation layer only: the existing gradient editor, renderer
   and persistence logic live in gradient.tsx and the color core. */

.pfx-v2 .pfx-gstudio.pfx-c-workbench--gradient {
  --ga-ink: var(--pfx-text);
  --ga-muted: var(--pfx-muted);
  --ga-hairline: var(--pfx-line);
  --ga-surface: var(--pfx-panel);
  --ga-field: var(--pfx-v2-field);
  --ga-focus: var(--pfx-accent);
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: clamp(24px, 4.1vh, 46px) clamp(20px, 5.5vw, 86px) 52px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--pfx-bg);
  color: var(--ga-ink);
  scrollbar-gutter: stable;
}
.pfx-v2 .pfx-gstudio *,
.pfx-v2 .pfx-gstudio *::before,
.pfx-v2 .pfx-gstudio *::after { box-sizing: border-box; }
.pfx-v2 .pfx-gstudio button { font-family: inherit; cursor: pointer; }
.pfx-v2 .pfx-gstudio button:disabled { opacity: .32; cursor: not-allowed; }
.pfx-v2 .pfx-gstudio button:focus-visible,
.pfx-v2 .pfx-gstudio input:focus-visible,
.pfx-v2 .pfx-gstudio summary:focus-visible {
  outline: 2px solid var(--ga-focus); outline-offset: 3px;
}

/* Fixed-size composition: never expand the artwork or instruments to fill a monitor. */
.pfx-gstudio__header {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 730px);
  margin: 0 0 39px;
}
.pfx-gstudio__identity { display: flex; align-items: center; gap: 13px; }
.pfx-gstudio__symbol {
  display: block; flex: 0 0 31px; width: 31px; height: 31px;
  border-radius: 50%; box-shadow: 0 0 0 4px var(--pfx-bg), 0 0 0 5px var(--ga-hairline);
}
.pfx-gstudio__identity > div { display: flex; align-items: baseline; gap: 11px; }
.pfx-gstudio__identity strong {
  font-size: 21px; line-height: 1.1; font-weight: 650;
  letter-spacing: -.06em;
}
.pfx-gstudio__identity > div > span {
  font: 600 10px ui-monospace, SFMono-Regular, monospace;
  color: var(--ga-muted);
  letter-spacing: .06em; text-transform: uppercase;
}
.pfx-gstudio__commands { display: flex; align-items: center; gap: 5px; }
.pfx-v2 .pfx-gstudio__commands > button,
.pfx-v2 .pfx-gstudio__command-menu > button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; border: 1px solid transparent;
  border-radius: 5px; background: transparent; color: var(--ga-muted);
  padding: 6px 9px; white-space: nowrap;
  font-size: 11px; font-weight: 650;
}
.pfx-v2 .pfx-gstudio__commands button:hover:not(:disabled) {
  color: var(--ga-ink); background: var(--ga-field);
}
.pfx-v2 .pfx-gstudio__commands .pfx-gstudio__main-command {
  margin: 0 4px;
  background: var(--ga-ink); color: var(--pfx-bg);
  border-color: var(--ga-ink); padding-inline: 13px;
}
.pfx-v2 .pfx-gstudio__commands .pfx-gstudio__main-command:hover {
  color: var(--pfx-bg); filter: brightness(.92);
}
.pfx-gstudio__new > span { margin-right: 5px; font-size: 16px; }
.pfx-gstudio__command-menu { position: relative; }
.pfx-gstudio__command-menu > button > span { margin-left: 5px; opacity: .55; }
.pfx-gstudio__menu {
  display: grid; gap: 2px;
  position: absolute; top: calc(100% + 7px); right: 0;
  width: max-content; min-width: 165px;
  padding: 6px; background: var(--ga-surface);
  border: 1px solid var(--ga-hairline);
  border-radius: 7px; box-shadow: 0 14px 30px rgba(0,0,0,.21);
  z-index: 31;
}
.pfx-v2 .pfx-gstudio__menu button {
  border: 0; background: transparent; color: var(--ga-ink);
  min-height: 33px; padding: 8px 10px;
  border-radius: 4px; text-align: left; font-size: 11px;
}
.pfx-v2 .pfx-gstudio__menu button:hover { background: var(--ga-field); }

/* Compact, asymmetric composition, followed by actual EMPTY page space. */
.pfx-gstudio__workspace,
.pfx-gstudio__workspace--editing {
  display: grid;
  grid-template-columns: 354px 265px;
  align-items: start;
  column-gap: 61px;
  width: 680px;
  max-width: 100%;
  min-width: 0;
}
.pfx-gstudio__artboard {
  display: flex; flex-direction: column; gap: 0;
  width: 354px; max-width: 100%;
  min-width: 0;
  background: transparent; border: 0; box-shadow: none;
  overflow: visible;
}
.pfx-gstudio__toolstrip {
  display: grid; grid-template-columns: minmax(0,1fr);
  justify-items: start; align-items: center;
  row-gap: 4px;
  width: 100%; padding: 0; margin: 0 0 14px;
  background: transparent; border: none;
}
.pfx-gstudio__toolstrip .pfx-gstudio__geometry-tools {
  justify-self: end;
  min-height: 28px;
}
.pfx-gstudio__types { display: flex; gap: 3px; min-width: 0; }
.pfx-v2 .pfx-gstudio__types button {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 28px; padding: 4px 7px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--ga-muted);
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pfx-v2 .pfx-gstudio__types button.is-active {
  color: var(--ga-ink); border-color: var(--ga-hairline);
  background: var(--ga-field);
}
.pfx-gstudio .pfx-c-gradient-type-glyph {
  width: 17px; height: 17px; flex: 0 0 17px;
  border-radius: 2px; border-color: var(--pfx-line-strong);
  background: var(--ga-field);
}
.pfx-gstudio .pfx-c-gradient-type-glyph.pfx-is-linear::before { inset: 3px; }
.pfx-gstudio .pfx-c-gradient-type-glyph.pfx-is-conic::before,
.pfx-gstudio .pfx-c-gradient-type-glyph.pfx-is-radial::before { inset: 2px; }
.pfx-gstudio__geometry-tools { display: flex; align-items: center; gap: 3px; }
.pfx-gstudio__angle { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--ga-muted); }
.pfx-gstudio__angle > span { display: none; }
.pfx-gstudio__angle input { width: 46px; height: 22px; padding: 0; accent-color: var(--ga-focus); }
.pfx-gstudio__angle output {
  min-width: 27px; text-align: right;
  font: 600 10px ui-monospace, monospace;
  color: var(--ga-ink);
}
.pfx-v2 .pfx-gstudio__toolstrip .pfx-gstudio__guide-toggle,
.pfx-v2 .pfx-gstudio__toolstrip .pfx-gstudio__advanced-toggle {
  min-height: 27px; padding: 4px 6px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--ga-muted);
  font-size: 10px; white-space: nowrap;
}
.pfx-gstudio__advanced-toggle { font-size: 0 !important; }
.pfx-gstudio__advanced-toggle > span { font-size: 15px; line-height: 1; }
.pfx-gstudio__guide-toggle > span { font-size: 14px; }
.pfx-v2 .pfx-gstudio__toolstrip .is-active {
  background: var(--ga-field); color: var(--ga-ink); border-color: var(--ga-hairline);
}
/* A color study, not a banner: exact square, no fluid growth. */
.pfx-gstudio__canvas-wrap {
  width: 354px; height: 354px; max-width: 100%;
  flex: 0 0 auto;
  padding: 0; overflow: visible; background: transparent;
}
.pfx-v2 .pfx-gstudio .pfx-gstudio__canvas {
  position: relative; display: block;
  width: 100%; height: 100%; min-height: 0;
  margin: 0; border: 0; border-radius: 5px;
  overflow: hidden; isolation: isolate;
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.10);
}
.pfx-v2 .pfx-gstudio__canvas::after { display: none; }
.pfx-gstudio__canvas-caption {
  position: absolute; z-index: 8;
  bottom: 10px; left: 10px;
  color: white; background: rgba(0,0,0,.32);
  border-radius: 3px; padding: 5px 8px;
  pointer-events: none; backdrop-filter: blur(6px);
  font: 600 10px ui-monospace,monospace; text-transform: capitalize;
}
.pfx-gstudio__canvas-caption > span { opacity: .55; }
.pfx-gstudio__canvas .pfx-c-gradient-geometry { z-index: 6; }

/* Stop editing lives immediately below the artwork. */
.pfx-gstudio__colors {
  width: 100%; min-width: 0;
  padding: 17px 0 0; border: 0; background: transparent;
}
.pfx-gstudio__colors-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pfx-gstudio__colors-bar > div:first-child { display: flex; align-items: baseline; gap: 7px; }
.pfx-gstudio__colors-bar strong { font-size: 12px; font-weight: 680; }
.pfx-gstudio__colors-bar > div:first-child > span { font-size: 10px; color: var(--ga-muted); }
.pfx-gstudio__stop-actions { display: flex; align-items: center; gap: 6px; }
.pfx-v2 .pfx-gstudio__stop-actions button {
  padding: 4px 5px; min-height: 28px;
  border: 0; border-radius: 4px;
  background: transparent; color: var(--ga-muted);
  font-size: 10px; font-weight: 630;
}
.pfx-v2 .pfx-gstudio__stop-actions button:hover { color: var(--ga-ink); background: var(--ga-field); }
.pfx-v2 .pfx-gstudio__stop-strip { height: 59px; padding: 0 14px; margin-top: 7px; }
.pfx-v2 .pfx-gstudio__rail { height: 59px; }
.pfx-v2 .pfx-gstudio__rail .pfx-c-gradient-rail__line {
  top: 22px; height: 10px; border: 0; border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.pfx-v2 .pfx-gstudio__rail .pfx-c-gradient-stop-handle {
  top: 11px; width: 32px; height: 42px;
}
.pfx-v2 .pfx-gstudio__rail .pfx-c-gradient-stop-handle > span {
  left: 50%; top: 3px; width: 21px; height: 21px;
  transform: translateX(-50%);
  border: 3px solid var(--pfx-bg);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45);
}
.pfx-v2 .pfx-gstudio__rail .pfx-c-gradient-stop-handle.pfx-is-selected > span {
  box-shadow: 0 0 0 2px var(--ga-focus), 0 0 0 4px var(--pfx-bg);
}
.pfx-gstudio__swatches {
  display: flex; align-items: center; gap: 5px;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding: 3px 0 6px;
}
.pfx-v2 .pfx-gstudio__swatches button {
  display: flex; align-items: center; gap: 5px;
  flex: 0 0 auto; min-height: 31px;
  padding: 4px 7px 4px 5px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--ga-muted);
  font: 600 10px ui-monospace,monospace;
}
.pfx-v2 .pfx-gstudio__swatches button.is-selected {
  color: var(--ga-ink); border-color: var(--ga-hairline);
  background: var(--ga-field);
}
.pfx-v2 .pfx-gstudio__swatches button:hover { background: var(--ga-field); }
.pfx-gstudio__swatch {
  display: inline-block; flex: 0 0 17px; width: 17px; height: 17px;
  border-radius: 3px; border: 1px solid rgba(128,128,128,.3);
}

/* A modest, permanently visible color instrument: no dashboard card. */
.pfx-gstudio__inspector {
  width: 265px; max-width: 100%; min-width: 0;
  display: block; background: transparent;
  border: 0; border-radius: 0;
  padding: 0; margin-top: 0; overflow: visible;
}
.pfx-gstudio__inspector-head {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 38px; padding: 0;
  margin: 0 0 13px; border: 0;
}
.pfx-gstudio__inspector-head > div { display: flex; flex-direction: column; gap: 4px; }
.pfx-gstudio__inspector-head > div > span {
  color: var(--ga-muted);
  font: 600 9px ui-monospace, monospace; letter-spacing: .12em;
}
.pfx-gstudio__inspector-head strong { font-size: 14px; font-weight: 640; letter-spacing: -.025em; }
.pfx-v2 .pfx-gstudio__inspector-head > button {
  width: 27px; height: 27px; min-height: 27px; padding: 0;
  border: 1px solid var(--ga-hairline); border-radius: 4px;
  background: var(--ga-field); color: var(--ga-ink); font-size: 16px;
}
.pfx-gstudio__inspector-body {
  display: flex; flex-direction: column; gap: 13px;
  min-height: 0; padding: 0; background: transparent; overflow: visible;
}
.pfx-gstudio__selected-swatch {
  display: flex; align-items: flex-end;
  height: 28px; min-height: 28px; border: 0; border-radius: 3px; padding: 5px;
}
.pfx-gstudio__selected-swatch span {
  padding: 3px 4px; background: rgba(0,0,0,.35); color: #fff;
  border-radius: 2px; font: 600 9px ui-monospace,monospace;
}
.pfx-v2 .pfx-gstudio .pfx-c-gradient-color-editor {
  display: grid;
  width: 100%;
  grid-template-rows: 143px 13px 31px 13px;
  gap: 8px; min-height: 0;
  padding: 0; background: transparent; border: none;
}
.pfx-v2 .pfx-gstudio .pfx-c-gradient-color-editor__field {
  border: 1px solid var(--ga-hairline); border-radius: 4px;
}
.pfx-v2 .pfx-gstudio .pfx-c-gradient-color-editor__hue,
.pfx-v2 .pfx-gstudio .pfx-c-gradient-color-editor__alpha {
  border: 0; border-radius: 3px;
}
.pfx-v2 .pfx-gstudio .pfx-c-gradient-color-editor__hex,
.pfx-v2 .pfx-gstudio .pfx-c-gradient-color-editor__meta > output {
  font: 620 11px ui-monospace,monospace;
  color: var(--ga-ink); background: var(--ga-field);
  border: 1px solid var(--ga-hairline); border-radius: 4px;
}
.pfx-gstudio__editor-buttons { display: flex; gap: 6px; }
.pfx-v2 .pfx-gstudio__editor-buttons button {
  min-height: 29px; flex: 1; padding: 6px 5px;
  border: 1px solid var(--ga-hairline); border-radius: 4px;
  background: transparent; color: var(--ga-muted);
  font-size: 10px; font-weight: 600; white-space: normal;
}
.pfx-v2 .pfx-gstudio__editor-buttons button:hover { color: var(--ga-ink); }
.pfx-gstudio__position { display: flex; align-items: center; gap: 12px; }
.pfx-gstudio__position > label {
  flex: 0 0 49px; font-size: 10px; font-weight: 600; color: var(--ga-muted);
}
.pfx-v2 .pfx-gstudio__position .pfx-c-gradient-position {
  display: grid; grid-template-columns: 31px minmax(0,1fr) 31px;
  flex: 1; min-width: 0; margin: 0;
  border: 1px solid var(--ga-hairline); border-radius: 4px;
  background: var(--ga-field); overflow: hidden;
}
.pfx-v2 .pfx-gstudio__position .pfx-c-gradient-position > button {
  min-height: 29px; padding: 0; border: 0; background: transparent;
  color: var(--ga-ink); font-size: 14px;
}
.pfx-v2 .pfx-gstudio__position .pfx-c-gradient-position > output {
  display: grid; place-items: center; min-width: 0;
  border: 0; color: var(--ga-ink); background: transparent;
  font: 600 11px ui-monospace,monospace;
}
.pfx-v2 .pfx-gstudio__inspector .pfx-gstudio__remove {
  align-self: flex-start; min-height: 28px; padding: 5px 7px;
  border: 0; border-radius: 3px;
  background: transparent; color: var(--ga-muted); font-size: 10px;
}
.pfx-v2 .pfx-gstudio__inspector .pfx-gstudio__remove:hover { background: var(--ga-field); }
.pfx-gstudio__settings-group {
  display: grid; gap: 8px; padding-bottom: 18px;
  border-bottom: 1px solid var(--ga-hairline);
}
.pfx-gstudio__settings-group strong { font-size: 12px; }
.pfx-gstudio__settings-group > span { color: var(--ga-muted); font-size: 10px; }
.pfx-gstudio__spaces { display: flex; gap: 4px; }
.pfx-v2 .pfx-gstudio__spaces button,
.pfx-v2 .pfx-gstudio__setting-action {
  min-height: 30px; border: 1px solid var(--ga-hairline);
  border-radius: 4px; background: transparent; color: var(--ga-muted);
  font-size: 10px; padding: 5px 8px;
}
.pfx-v2 .pfx-gstudio__spaces button.is-active {
  background: var(--pfx-accent-soft); border-color: var(--ga-focus);
  color: var(--pfx-accent);
}
.pfx-gstudio__footer {
  display: flex; align-items: baseline; justify-content: space-between;
  width: min(100%, 730px); max-width: 100%;
  gap: 15px; margin-top: 26px; min-height: 24px;
  color: var(--ga-muted);
}
.pfx-gstudio__source { position: relative; flex: 1; min-width: 0; }
.pfx-gstudio__source summary {
  display: inline-flex; align-items: center; gap: 6px;
  list-style: none; cursor: pointer;
  font-size: 10px; font-weight: 620; color: var(--ga-muted);
}
.pfx-gstudio__source summary::-webkit-details-marker { display: none; }
.pfx-gstudio__source[open] summary > span { transform: rotate(180deg); }
.pfx-gstudio__source .pfx-gradient__css {
  position: absolute; z-index: 12; bottom: calc(100% + 8px); left: 0;
  width: min(600px,calc(100vw - 48px)); max-height: 170px;
  padding: 12px; overflow: auto; background: var(--ga-surface);
  border: 1px solid var(--ga-hairline); border-radius: 5px;
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.pfx-gstudio__source code {
  overflow-wrap: anywhere; white-space: pre-wrap;
  color: var(--ga-ink); font: 10px/1.6 ui-monospace,monospace;
}
.pfx-gstudio__footer p { margin: 0; font-size: 10px; color: var(--ga-muted); text-align: right; }

/* Small screens rearrange instruments; nothing grows beyond its useful size. */
@media (max-width: 950px) {
  .pfx-v2 .pfx-gstudio.pfx-c-workbench--gradient {
    padding: 22px 22px 48px; overflow-y: auto;
  }
  .pfx-gstudio__header { width: min(100%, 730px); }
}
@media (max-width: 745px) {
  .pfx-gstudio__workspace,
  .pfx-gstudio__workspace--editing {
    grid-template-columns: minmax(0, 354px);
    row-gap: 31px; width: 100%;
  }
  .pfx-gstudio__inspector { width: min(100%, 265px); }
  .pfx-gstudio__footer { width: min(100%, 354px); }
  .pfx-gstudio__header { align-items: start; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
  .pfx-gstudio__canvas-wrap {
    width: min(100%, 354px);
    height: auto; aspect-ratio: 1;
  }
}
@media (max-width: 410px) {
  .pfx-v2 .pfx-gstudio.pfx-c-workbench--gradient { padding: 15px 14px 32px; }
  .pfx-gstudio__header { margin-bottom: 20px; }
  .pfx-gstudio__commands { gap: 2px; flex-wrap: wrap; }
  .pfx-v2 .pfx-gstudio__commands > button,
  .pfx-v2 .pfx-gstudio__command-menu > button { font-size: 10px; padding-inline: 6px; }
  .pfx-gstudio__identity strong { font-size: 19px; }
  .pfx-gstudio__identity > div > span { font-size: 9px; }
  .pfx-gstudio__artboard { width: 100%; }
  .pfx-gstudio__toolstrip { gap: 3px; }
  .pfx-v2 .pfx-gstudio__types button { padding-inline: 4px; font-size: 10px; }
  .pfx-gstudio__types .pfx-c-gradient-type-glyph { width: 13px; height: 13px; flex-basis: 13px; }
  .pfx-gstudio__angle input { width: 34px; }
  .pfx-v2 .pfx-gstudio__toolstrip .pfx-gstudio__guide-toggle { font-size: 0; }
  .pfx-gstudio__guide-toggle > span { font-size: 17px; }
  .pfx-gstudio__colors-bar > div:first-child > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pfx-gstudio *, .pfx-gstudio *::before, .pfx-gstudio *::after { transition: none !important; }
}

/* Explore color library */
.pfx-v2 .pfx-l-stage:has(.pfx-explore) { overflow: visible; }
.pfx-v2 .pfx-explore.pfx-v2__page { display:block; height:auto; min-height:calc(100dvh - 76px); overflow:visible; padding:0; background:var(--pfx-bg); }
.pfx-explore__scroll { overflow:visible; }
.pfx-explore__content { max-width:1500px; margin:auto; padding:clamp(24px,3vw,44px) clamp(18px,4vw,60px) 48px; }
.pfx-explore__intro { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:28px; }
.pfx-explore__eyebrow { color:var(--pfx-accent); font:700 10px/1.3 ui-monospace,monospace; letter-spacing:.12em; }
.pfx-explore__intro h2 { margin:8px 0 6px; color:var(--pfx-text); font-size:clamp(32px,4vw,54px); letter-spacing:-.06em; line-height:1; }
.pfx-explore__intro h2 span { color:var(--pfx-accent); }
.pfx-explore__intro p { margin:0; color:var(--pfx-muted); font-size:14px; }
.pfx-explore__toolbar { display:flex; align-items:center; gap:16px; padding:7px; border:1px solid var(--pfx-line); border-radius:14px; background:var(--pfx-panel); }
.pfx-explore__tabs { display:flex; flex-shrink:0; gap:4px; }
.pfx-v2 .pfx-explore__tabs button { min-height:40px; padding:0 20px; border:0; border-radius:9px; background:transparent; color:var(--pfx-muted); font-size:13px; font-weight:700; }
.pfx-v2 .pfx-explore__tabs button.is-active { background:var(--pfx-text); color:var(--pfx-panel); }
.pfx-explore__search { display:flex; align-items:center; flex:1; gap:10px; min-width:0; padding:0 12px; color:var(--pfx-muted); border-left:1px solid var(--pfx-line); }
.pfx-explore__search input { width:100%; min-width:0; height:40px; border:0; outline:0; background:transparent; color:var(--pfx-text); font-size:13px; }
.pfx-v2 .pfx-explore__search-clear { border:0; background:transparent; color:var(--pfx-muted); font-size:22px; }
.pfx-explore__family-panel { display:flex; align-items:center; gap:18px; padding:18px 0 20px; border-bottom:1px solid var(--pfx-line); }
.pfx-explore__family-head { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.pfx-explore__family-head h2 { margin:0; font:700 10px/1.3 ui-monospace,monospace; letter-spacing:.09em; color:var(--pfx-muted); }
.pfx-v2 .pfx-explore__family-head button { border:0; background:transparent; color:var(--pfx-accent); font-size:11px; }
.pfx-explore__families { display:flex; flex-wrap:wrap; gap:5px; }
.pfx-v2 .pfx-explore__family { display:flex; align-items:center; gap:6px; min-height:36px; padding:5px 9px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--pfx-muted); font-size:11px; font-weight:650; }
.pfx-v2 .pfx-explore__family:hover { background:var(--pfx-panel); color:var(--pfx-text); }
.pfx-v2 .pfx-explore__family.is-active { border-color:var(--pfx-line-strong); background:var(--pfx-panel); color:var(--pfx-text); }
.pfx-explore__family-swatch { width:19px; height:19px; flex:0 0 19px; border-radius:50%; box-shadow:0 0 0 1px #80808055; }
.pfx-explore__gallery-heading { display:flex; justify-content:space-between; align-items:end; gap:16px; margin:25px 0 16px; }
.pfx-explore__gallery-heading h2 { color:var(--pfx-text); margin:0; font-size:20px; letter-spacing:-.035em; }
.pfx-explore__gallery-heading p { color:var(--pfx-muted); margin:5px 0 0; font-size:12px; }
.pfx-explore__result-tools { display:flex; align-items:center; gap:14px; color:var(--pfx-muted); font-size:11px; }
.pfx-explore__result-tools label { display:flex; align-items:center; gap:6px; }
.pfx-explore__result-tools select { max-width:145px; padding:8px; border:1px solid var(--pfx-line); border-radius:8px; background:var(--pfx-panel); color:var(--pfx-text); font-size:11px; }
.pfx-explore__color-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.pfx-explore__color-card { min-width:0; padding:5px; border:1px solid var(--pfx-line); border-radius:12px; background:var(--pfx-panel); transition:transform .18s,border-color .18s; }
.pfx-explore__color-card:hover { transform:translateY(-3px); border-color:var(--pfx-line-strong); }
.pfx-explore__color-preview { position:relative; }
.pfx-v2 .pfx-explore__color-pick { display:block; width:100%; height:116px; border:0; border-radius:8px; }
.pfx-explore__color-check { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#111b; color:#fff; }
.pfx-v2 .pfx-explore__favorite { position:absolute; top:8px; right:8px; display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:50%; background:#fff; color:#383a40; box-shadow:0 2px 10px #0002; }
.pfx-v2 .pfx-explore__favorite.is-saved { color:#cf3156; }
.pfx-explore__color-info { display:flex; align-items:start; flex-direction:column; gap:3px; min-width:0; padding:9px 5px 6px; }
.pfx-explore__color-info > span { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--pfx-text); font-size:12px; font-weight:700; }
.pfx-v2 .pfx-explore__color-info button { padding:0; border:0; background:transparent; color:var(--pfx-muted); font:11px ui-monospace,monospace; }
.pfx-v2 .pfx-explore__color-info button:hover { color:var(--pfx-accent); }
.pfx-explore__moods { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 16px; }
.pfx-v2 .pfx-explore__moods button,.pfx-v2 .pfx-explore__shuffle { padding:8px 13px; border:1px solid var(--pfx-line); border-radius:9px; background:var(--pfx-panel); color:var(--pfx-muted); font-size:12px; }
.pfx-v2 .pfx-explore__moods button.is-active { background:var(--pfx-text); color:var(--pfx-panel); }
.pfx-explore__palette-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.pfx-explore__palette { min-width:0; padding:6px; border:1px solid var(--pfx-line); border-radius:13px; background:var(--pfx-panel); }
.pfx-explore__palette-strip { display:flex; height:130px; overflow:hidden; border-radius:8px; }
.pfx-v2 .pfx-explore__palette-swatch { flex:1; border:0; transition:flex .2s; }
.pfx-v2 .pfx-explore__palette-swatch:hover { flex:1.35; }
.pfx-explore__palette-footer { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:12px 7px 7px; }
.pfx-explore__palette-meta { display:flex; flex-direction:column; gap:4px; min-width:0; color:var(--pfx-text); font-size:13px; }
.pfx-explore__palette-meta span { color:var(--pfx-muted); font-size:11px; }
.pfx-explore__palette-actions { display:flex; gap:4px; }
.pfx-v2 .pfx-explore__palette-actions button { display:grid; place-items:center; width:34px; height:34px; border:0; border-radius:8px; background:var(--pfx-bg); color:var(--pfx-text); }
.pfx-explore__message { padding:36px; border:1px dashed var(--pfx-line-strong); border-radius:12px; color:var(--pfx-muted); text-align:center; }
.pfx-explore__message button,.pfx-v2 .pfx-explore__more { padding:10px 15px; border:1px solid var(--pfx-line-strong); border-radius:9px; background:var(--pfx-panel); color:var(--pfx-text); }
.pfx-v2 .pfx-explore__more { display:block; margin:24px auto 0; font-size:12px; font-weight:700; }
.pfx-explore__more span { color:var(--pfx-muted); font-weight:400; }
.pfx-explore__footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin-top:40px; padding-top:18px; border-top:1px solid var(--pfx-line); color:var(--pfx-muted); font-size:11px; }
.pfx-explore__footer a { color:inherit; }
.pfx-explore__feedback { position:fixed; z-index:100; right:20px; bottom:20px; max-width:calc(100vw - 40px); padding:10px 16px; border-radius:9px; background:var(--pfx-text); color:var(--pfx-panel); font-size:12px; box-shadow:0 6px 24px #0003; pointer-events:none; }
.pfx-explore__feedback:empty { display:none; }
@media(max-width:720px) {
 .pfx-explore__content { padding:24px 16px 36px; }
 .pfx-explore__intro { align-items:start; margin-bottom:20px; }
 .pfx-explore__intro p { max-width:240px; font-size:12px; }
 .pfx-explore__toolbar { flex-wrap:wrap; gap:5px; }
 .pfx-explore__tabs { width:100%; }
 .pfx-v2 .pfx-explore__tabs button { flex:1; }
 .pfx-explore__search { flex-basis:100%; border-left:0; border-top:1px solid var(--pfx-line); }
 .pfx-explore__family-panel { display:block; padding:17px 0; }
 .pfx-explore__family-head { margin-bottom:9px; }
 .pfx-explore__families { gap:3px; }
 .pfx-v2 .pfx-explore__family { padding:5px 7px; }
 .pfx-explore__gallery-heading { align-items:start; flex-wrap:wrap; }
 .pfx-explore__color-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
 .pfx-v2 .pfx-explore__color-pick { height:105px; }
 .pfx-explore__palette-grid { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { .pfx-explore__color-card,.pfx-v2 .pfx-explore__palette-swatch { transition:none; } }

/* Color tools: photo palette and accessible text contrast. */
.pfx-image__layout, .pfx-contrast__layout {
  display:grid; grid-template-columns:minmax(0, 1.05fr) minmax(0, 1fr);
  align-items:start; gap:18px; max-width:1550px;
}
.pfx-image__panel,.pfx-contrast__sidebar,.pfx-contrast__main {
  min-width:0; border:1px solid var(--pfx-line); border-radius:16px;
  background:var(--pfx-panel); box-shadow:var(--pfx-v2-shadow); overflow:hidden;
}
.pfx-image__head,.pfx-contrast__head {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap; min-height:54px; padding:15px 18px;
  border-bottom:1px solid var(--pfx-line);
}
.pfx-image__head strong,.pfx-contrast__head strong {
  color:var(--pfx-text); font:700 10px ui-monospace,monospace; letter-spacing:.08em;
}
.pfx-image__head span,.pfx-contrast__head span {
  color:var(--pfx-muted); font-size:11px;
}
.pfx-image__drop {
  display:grid; place-items:center; min-height:clamp(260px,46vh,500px);
  margin:16px; border:1px dashed var(--pfx-line-strong);
  border-radius:12px; background:var(--pfx-v2-field); overflow:hidden;
}
.pfx-image__drop.pfx-is-over { border:2px solid var(--pfx-accent); background:var(--pfx-accent-soft); }
.pfx-image__drop img { display:block; width:100%; height:clamp(260px,46vh,500px); object-fit:contain; }
.pfx-image__placeholder { display:grid; gap:10px; place-items:center; text-align:center; padding:30px; }
.pfx-image__placeholder strong { font-size:17px; color:var(--pfx-text); }
.pfx-image__placeholder span,.pfx-image__empty { color:var(--pfx-muted); font-size:12px; }
.pfx-image__empty { display:grid; place-items:center; min-height:310px; padding:30px; text-align:center; }
.pfx-image__source-actions,.pfx-image__actions {
  display:flex; align-items:center; flex-wrap:wrap; gap:9px; padding:0 16px 16px;
}
.pfx-image__upload { position:relative; overflow:hidden; display:grid; place-items:center;
  min-height:42px; padding:10px 15px; border-radius:9px;
  color:var(--pfx-bg); background:var(--pfx-accent);
  font-size:12px; font-weight:700; cursor:pointer;
}
.pfx-image__upload:focus-within { outline:2px solid var(--pfx-accent); outline-offset:3px; }
.pfx-image__upload input { position:absolute; inset:0; width:100%; height:100%;
  opacity:0; cursor:pointer; }
.pfx-image__count { display:flex; align-items:center; gap:10px; color:var(--pfx-muted);
  font-size:12px; }
.pfx-v2 .pfx-image__count select { padding:9px 12px; border-radius:8px;
  background:var(--pfx-v2-field); color:var(--pfx-text); border:1px solid var(--pfx-line-strong); }
.pfx-image__meta { display:flex; justify-content:space-between; align-items:center;
  gap:10px; padding:0 17px; font-size:11px; color:var(--pfx-muted); }
.pfx-image__meta strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pfx-image__status,.pfx-contrast__sidebar > p { min-height:20px; margin:8px 17px 17px; font-size:11px; color:var(--pfx-muted); }
.pfx-image__strip { display:flex; height:82px; margin:16px 16px 10px; overflow:hidden; border-radius:9px; }
.pfx-image__strip span { flex:1; }
.pfx-image__swatches { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; padding:6px 16px 19px; }
.pfx-image__swatches article { min-width:0; overflow:hidden; border:1px solid var(--pfx-line);
  border-radius:9px; background:var(--pfx-v2-field); }
.pfx-v2 .pfx-image__swatch { display:flex; align-items:start; justify-content:end; width:100%;
  min-height:104px; padding:9px; border:0; }
.pfx-image__swatch span { color:#fff; background:#1119; padding:4px 6px; border-radius:5px;
  font:600 10px ui-monospace,monospace; }
.pfx-image__swatches article > div { display:flex; align-items:center; justify-content:space-between;
  min-width:0; gap:4px; padding:7px; }
.pfx-image__swatches code { min-width:0; font:700 11px ui-monospace,monospace;
  overflow:hidden; text-overflow:ellipsis; }
.pfx-v2 .pfx-image__swatches article > div button,
.pfx-v2 .pfx-image__actions button {
  padding:9px 10px; border-radius:8px; border:1px solid var(--pfx-line-strong);
  background:var(--pfx-panel); color:var(--pfx-text); font-size:11px;
}
.pfx-v2 .pfx-image__actions button { min-height:41px; font-weight:650; }
.pfx-v2 .pfx-image__actions button:hover,
.pfx-v2 .pfx-image__swatches button:hover { border-color:var(--pfx-accent); }

.pfx-contrast__layout { grid-template-columns:minmax(310px,.65fr) minmax(0,1.35fr); }
.pfx-contrast__inputs { display:grid; gap:12px; padding:18px; }
.pfx-contrast__field { display:grid; gap:9px; }
.pfx-contrast__field > label { display:grid; gap:8px; color:var(--pfx-muted); font-size:12px; }
.pfx-contrast__field-row { display:flex; align-items:center; gap:9px; }
.pfx-v2 .pfx-contrast__field-row input[type=color] {
  width:49px; height:46px; padding:3px; flex:0 0 auto; border-radius:9px;
  border:1px solid var(--pfx-line-strong); background:var(--pfx-v2-field); cursor:pointer;
}
.pfx-v2 .pfx-contrast__field-row input:not([type=color]) {
  width:100%; min-width:0; height:46px; padding:11px 12px;
  border-radius:9px; border:1px solid var(--pfx-line-strong);
  background:var(--pfx-v2-field); color:var(--pfx-text); font:700 13px ui-monospace,monospace;
}
.pfx-v2 .pfx-contrast__field-row input[aria-invalid=true] { border-color:#bf4250; }
.pfx-contrast__field > button,.pfx-contrast__swap {
  justify-self:start; padding:8px 10px; border-radius:8px; border:1px solid var(--pfx-line);
  background:var(--pfx-v2-field); color:var(--pfx-text); font-size:11px;
}
.pfx-contrast__field small { font-size:11px; color:#e45c6c; }
.pfx-v2 .pfx-contrast__swap { justify-self:center; background:var(--pfx-accent-soft); color:var(--pfx-accent); }
.pfx-contrast__ratio { display:grid; justify-items:start; gap:8px; margin:0 18px;
  padding:20px; background:var(--pfx-v2-field); border:1px solid var(--pfx-line); border-radius:12px; }
.pfx-contrast__ratio > span:first-child { font:700 10px ui-monospace,monospace; color:var(--pfx-muted); }
.pfx-contrast__ratio strong { color:var(--pfx-text); font-size:clamp(34px,4vw,56px); line-height:1.12; letter-spacing:-.05em; }
.pfx-contrast__pass,.pfx-contrast__fail { font-size:11px; font-weight:700; }
.pfx-contrast__pass { color:#247146; }.pfx-contrast__fail { color:#ac303d; }
.pfx-v2[data-theme=dark] .pfx-contrast__pass { color:#9cddb4; }
.pfx-v2[data-theme=dark] .pfx-contrast__fail { color:#ffb5ad; }
.pfx-contrast__actions { display:flex; flex-wrap:wrap; gap:8px; padding:17px 18px 6px; }
.pfx-v2 .pfx-contrast__actions button { padding:10px 12px; border-radius:8px;
  border:1px solid var(--pfx-line-strong); color:var(--pfx-text); background:var(--pfx-panel);
  font-size:11px; font-weight:650; }
.pfx-contrast__preview { display:grid; align-content:center; justify-items:start; gap:18px;
  min-height:clamp(290px,41vh,470px); padding:clamp(24px,4vw,65px); }
.pfx-contrast__preview > span { font:700 10px ui-monospace,monospace; letter-spacing:.12em; }
.pfx-contrast__preview h2 { font-size:clamp(26px,4vw,52px); line-height:1.1; letter-spacing:-.04em; margin:0; }
.pfx-contrast__preview p { max-width:530px; margin:0; font-size:14px; line-height:1.65; }
.pfx-contrast__sample { border:1px solid currentColor; border-radius:9px; padding:12px 16px;
  font-size:12px; font-weight:700; }
.pfx-contrast__preview small { font:700 11px ui-monospace,monospace; }
.pfx-contrast__criteria { padding:8px 18px 12px; }
.pfx-contrast__criteria > div { display:flex; align-items:center; justify-content:space-between; gap:12px;
  border-bottom:1px solid var(--pfx-line); padding:14px 0; }
.pfx-contrast__criteria > div > div { display:grid; gap:6px; }
.pfx-contrast__criteria strong { font-size:12px; }
.pfx-contrast__criteria > div > div span { color:var(--pfx-muted); font-size:11px; }
.pfx-contrast__note { padding:0 18px 17px; color:var(--pfx-muted); font-size:11px; }
@media(max-width:1050px) {
 .pfx-image__layout,.pfx-contrast__layout { grid-template-columns:minmax(0,1fr); }
 .pfx-image__swatches { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:580px) {
 .pfx-image__drop { min-height:230px; }
 .pfx-image__drop img { height:260px; }
 .pfx-image__swatches { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .pfx-image__swatch { min-height:100px; }
 .pfx-contrast__preview { min-height:300px; }
}

/* Contrast / independent artwork
   An editorial color study, not a panel dashboard. The deliberate empty
   canvas around this composition is reserved for future instruments. */

.pfx-v2 .pfx-contrast.pfx-v2__page {
  width: 100%;
  height: 100%;
  padding: clamp(26px, 4vh, 42px) clamp(20px, 5.5vw, 88px);
  background: var(--pfx-bg);
  color: var(--pfx-text);
  overflow: hidden;
}
.pfx-v2 .pfx-contrast *,
.pfx-v2 .pfx-contrast *::before,
.pfx-v2 .pfx-contrast *::after { box-sizing: border-box; }
.pfx-v2 .pfx-contrast button {
  font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pfx-v2 .pfx-contrast button:focus-visible,
.pfx-v2 .pfx-contrast input:focus-visible {
  outline: 2px solid var(--pfx-accent);
  outline-offset: 3px;
}
.pfx-contrast__composition {
  width: 691px;
  max-width: 100%;
}
.pfx-contrast__heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%; margin: 0 0 30px;
}
.pfx-contrast__heading > div { display: grid; gap: 8px; }
.pfx-contrast__eyebrow,
.pfx-contrast__micro {
  font: 650 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  color: var(--pfx-muted);
}
.pfx-contrast__heading h1 {
  margin: 0;
  color: var(--pfx-text);
  font: 650 30px/1.05 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.065em;
}
.pfx-contrast__heading-note {
  color: var(--pfx-muted);
  font: 500 11px/1.2 ui-monospace, monospace;
  padding-bottom: 2px;
}
.pfx-contrast__work {
  display: grid;
  grid-template-columns: 350px 289px;
  column-gap: 52px;
  align-items: start;
  width: 691px; max-width: 100%;
  margin: 0;
}
.pfx-contrast__artwork { width: 350px; min-width: 0; }
.pfx-v2 .pfx-contrast__preview {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 350px;
  height: 350px;
  min-height: 0;
  padding: 22px 25px 23px;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 12px 31px rgba(0,0,0,.11), 0 1px 4px rgba(0,0,0,.08);
  overflow: hidden;
}
.pfx-contrast__preview-index,
.pfx-contrast__preview-bottom {
  font: 650 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .055em;
}
.pfx-contrast__preview-index { opacity: .75; }
.pfx-contrast__type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.pfx-contrast__type strong {
  display: block;
  margin-left: -7px;
  font: 630 116px/.9 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.095em;
}
.pfx-contrast__type > span {
  font: 590 21px/1.15 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.045em;
}
.pfx-contrast__type small {
  font: 520 11px/1.3 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .015em;
  opacity: .78;
}
.pfx-contrast__preview-bottom { display: flex; align-items: center; justify-content: space-between; opacity: .72; }
.pfx-contrast__preview-bottom > span:last-child { font-size: 18px; }
.pfx-contrast__artwork-caption {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 14px;
  color: var(--pfx-muted);
  font: 650 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .045em;
}
.pfx-contrast__caption-cross { padding: 0 5px; opacity: .4; }
.pfx-contrast__tools {
  display: flex;
  flex-direction: column;
  width: 289px; max-width: 100%; min-width: 0;
}
.pfx-v2 .pfx-contrast__pair {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.pfx-v2 .pfx-contrast__field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px; min-width: 0;
  padding: 0; background: transparent;
}
.pfx-contrast__field-head {
  display: flex;
  justify-content: space-between; align-items: center; gap: 8px;
  min-height: 15px;
}
.pfx-contrast__field-head label {
  color: var(--pfx-text);
  font-size: 11px; line-height: 1.2; font-weight: 620;
}
.pfx-v2 .pfx-contrast__field-head button {
  border: 0; padding: 0; background: transparent;
  color: var(--pfx-muted); font-size: 10px; line-height: 1.2;
  white-space: nowrap;
}
.pfx-contrast__field-head button span { padding-left: 3px; font-size: 12px; }
.pfx-v2 .pfx-contrast__field-head button:hover { color: var(--pfx-text); }
.pfx-v2 .pfx-contrast__field-row {
  display: flex; gap: 7px; align-items: center; min-width: 0;
}
.pfx-v2 .pfx-contrast__field-row input[type="color"] {
  width: 36px; height: 36px; min-width: 36px;
  flex: 0 0 36px; border: 1px solid var(--pfx-line-strong);
  border-radius: 5px; padding: 3px;
  background: var(--pfx-v2-field); cursor: pointer;
}
.pfx-v2 .pfx-contrast__field-row input:not([type="color"]) {
  width: 100%; min-width: 0; height: 36px;
  border: 1px solid var(--pfx-line);
  border-radius: 5px; padding: 7px 10px;
  background: var(--pfx-v2-field);
  color: var(--pfx-text);
  font: 650 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .02em;
}
.pfx-v2 .pfx-contrast__field-row input[aria-invalid="true"] {
  border-color: #c34b5b;
}
.pfx-contrast__field small {
  font: 10px/1.25 ui-sans-serif, system-ui, sans-serif;
  color: #c64c61;
}
.pfx-v2 .pfx-contrast__swap {
  align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  min-height: 27px; padding: 2px 7px;
  margin: 4px 0;
  border: 0; background: transparent;
  color: var(--pfx-muted);
  font: 600 10px/1.2 ui-monospace, monospace;
}
.pfx-v2 .pfx-contrast__swap:hover { color: var(--pfx-text); }
.pfx-contrast__swap > span:first-child { font-size: 16px; }

.pfx-v2 .pfx-contrast__evaluation {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  border: 0; border-top: 1px solid var(--pfx-line);
  margin-top: 22px; padding-top: 18px;
}
.pfx-contrast__ratio { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; padding: 0; background: transparent; border: 0; }
.pfx-contrast__ratio > div { display: flex; align-items: baseline; gap: 2px; }
.pfx-contrast__ratio strong {
  color: var(--pfx-text);
  font: 590 53px/.96 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.085em;
}
.pfx-contrast__ratio > div > span {
  color: var(--pfx-muted);
  font: 600 18px/1.2 ui-monospace, monospace;
}
.pfx-contrast__assessment { padding-bottom: 5px; white-space: nowrap; }
.pfx-contrast__assessment > span { display: inline-flex; align-items: center; gap: 5px; }
.pfx-contrast__mark { font-size: 11px; }
.pfx-contrast__pass,.pfx-contrast__fail { font-size: 11px; font-weight: 650; }
.pfx-contrast__pass { color: #247146; }
.pfx-contrast__fail { color: #ac303d; }
.pfx-v2[data-theme="dark"] .pfx-contrast__pass { color: #9cddb4; }
.pfx-v2[data-theme="dark"] .pfx-contrast__fail { color: #ffb5ad; }
.pfx-contrast__checks { margin-top: 23px; }
.pfx-contrast__checks-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 6px;
}
.pfx-contrast__checks-head > span:last-child {
  font: 550 9px ui-monospace, monospace; letter-spacing: .08em;
  color: var(--pfx-muted);
}
.pfx-v2 .pfx-contrast__criteria {
  display: grid; gap: 0; padding: 0; margin: 0;
}
.pfx-v2 .pfx-contrast__criterion {
  display: grid; grid-template-columns: minmax(0,1fr) 35px 32px;
  gap: 6px; align-items: center;
  border: 0; border-top: 1px solid var(--pfx-line);
  min-height: 27px; padding: 4px 0;
}
.pfx-contrast__criterion > span:first-child {
  color: var(--pfx-text); font-size: 10px; font-weight: 550;
}
.pfx-contrast__criterion > span:nth-child(2) {
  font: 600 9px ui-monospace,monospace; color: var(--pfx-muted);
}
.pfx-contrast__criterion > strong {
  justify-self: end; font-size: 10px; font-weight: 700;
}
.pfx-v2 .pfx-contrast__actions {
  display: flex; align-items: center; gap: 7px;
  margin: 14px 0 0; padding: 0;
}
.pfx-v2 .pfx-contrast__actions button {
  min-height: 33px; padding: 7px 9px;
  border: 1px solid var(--pfx-line);
  border-radius: 4px;
  background: transparent; color: var(--pfx-text);
  font: 620 10px/1.2 ui-sans-serif,system-ui,sans-serif;
  white-space: nowrap;
}
.pfx-v2 .pfx-contrast__actions button:last-child {
  background: var(--pfx-text); color: var(--pfx-bg);
  border-color: var(--pfx-text);
}
.pfx-v2 .pfx-contrast__actions button:last-child:hover { filter: brightness(.9); }
.pfx-v2 .pfx-contrast__actions button:first-child:hover { background: var(--pfx-v2-field); }
.pfx-contrast__actions button > span { padding-left: 7px; }
.pfx-v2 .pfx-contrast__status {
  margin: 5px 0 0; padding: 0;
  min-height: 14px;
  color: var(--pfx-muted);
  font: 500 10px/1.3 ui-monospace, monospace;
}
.pfx-v2 .pfx-contrast__footnote {
  margin: 21px 0 0; padding: 0;
  color: var(--pfx-muted);
  font: 500 10px/1.5 ui-sans-serif,system-ui,sans-serif;
}

/* Only the study and its instruments rearrange; they never expand to fill the viewport. */
@media (max-width: 950px) {
  .pfx-v2 .pfx-contrast.pfx-v2__page { padding: 25px 23px 30px; }
}
@media (max-width: 740px) {
  .pfx-v2 .pfx-contrast.pfx-v2__page { padding: 15px 14px 16px; }
  .pfx-contrast__composition { width: 100%; }
  .pfx-contrast__heading {
    width: min(100%, 420px);
    margin-bottom: 14px;
  }
  .pfx-contrast__heading > div { gap: 3px; }
  .pfx-contrast__heading h1 { font-size: 24px; }
  .pfx-contrast__heading-note { font-size: 10px; }
  .pfx-contrast__work {
    display: flex; flex-direction: column; gap: 16px;
    width: min(100%, 420px);
  }
  .pfx-contrast__artwork { width: 100%; }
  .pfx-v2 .pfx-contrast__preview {
    width: 100%; height: 185px;
    padding: 13px 17px 14px;
  }
  .pfx-contrast__preview-index, .pfx-contrast__preview-bottom { font-size: 9px; }
  .pfx-contrast__type { gap: 0; }
  .pfx-contrast__type strong { font-size: 70px; line-height: .85; margin-left: -4px; }
  .pfx-contrast__type > span { font-size: 15px; margin-top: 4px; }
  .pfx-contrast__type small { font-size: 9px; margin-top: 2px; }
  .pfx-contrast__preview-bottom > span:last-child { font-size: 14px; }
  .pfx-contrast__artwork-caption { display: none; }
  .pfx-contrast__tools { width: 100%; }
  .pfx-v2 .pfx-contrast__pair {
    display: grid;
    grid-template-columns: minmax(0,1fr) 23px minmax(0,1fr);
    align-items: end; gap: 6px;
  }
  .pfx-v2 .pfx-contrast__field { gap: 6px; }
  .pfx-contrast__field-head label { font-size: 10px; }
  .pfx-v2 .pfx-contrast__field-head button { font-size: 0; }
  .pfx-contrast__field-head button span { font-size: 14px; }
  .pfx-v2 .pfx-contrast__swap {
    padding: 0; margin: 0 0 6px; width: 23px; min-height: 36px;
  }
  .pfx-contrast__swap-label { display: none; }
  .pfx-contrast__swap > span:first-child { font-size: 20px; }
  .pfx-v2 .pfx-contrast__field-row input[type="color"] {
    width: 32px; min-width: 32px; flex-basis: 32px; height: 35px; padding: 2px;
  }
  .pfx-v2 .pfx-contrast__field-row input:not([type="color"]) {
    height: 35px; padding: 5px 6px; font-size: 10px;
  }
  .pfx-v2 .pfx-contrast__field-row { gap: 5px; }
  .pfx-v2 .pfx-contrast__evaluation {
    margin-top: 14px; padding-top: 12px;
  }
  .pfx-contrast__ratio { gap: 2px; }
  .pfx-contrast__ratio strong { font-size: 37px; }
  .pfx-contrast__ratio > div > span { font-size: 14px; }
  .pfx-contrast__checks { margin-top: 14px; }
  .pfx-v2 .pfx-contrast__criteria {
    grid-template-columns: repeat(2, minmax(0,1fr));
    column-gap: 12px;
  }
  .pfx-v2 .pfx-contrast__criterion {
    min-height: 31px;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 4px;
  }
  .pfx-contrast__criterion > span:nth-child(2) { display: none; }
  .pfx-v2 .pfx-contrast__actions { margin-top: 12px; }
  .pfx-v2 .pfx-contrast__actions button { min-height: 34px; }
  .pfx-v2 .pfx-contrast__footnote { margin-top: 11px; font-size: 9px; }
}
@media (max-width: 365px) {
  .pfx-v2 .pfx-contrast.pfx-v2__page { padding: 10px; }
  .pfx-v2 .pfx-contrast__preview { height: 155px; }
  .pfx-contrast__type strong { font-size: 56px; }
  .pfx-contrast__heading-note { display: none; }
  .pfx-v2 .pfx-contrast__actions button { padding-inline: 7px; }
}
@media (max-height: 720px) and (min-width: 741px) {
  .pfx-v2 .pfx-contrast.pfx-v2__page { padding-top: 15px; }
  .pfx-contrast__heading { margin-bottom: 14px; }
  .pfx-v2 .pfx-contrast__preview { height: 310px; }
  .pfx-contrast__type strong { font-size: 100px; }
  .pfx-v2 .pfx-contrast__footnote { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pfx-v2 .pfx-contrast * { transition: none !important; }
}

.pfx-v2{width:100%;min-height:600px;grid-template-rows:auto minmax(0,1fr)}
.pfx-v2 .pfx-c-header{position:relative;top:auto;grid-template-columns:auto minmax(0,1fr) auto}
.pfx-v2 .pfx-l-stage{overflow:visible}
.pfx-colors-title{font-size:16px;line-height:1.2;margin:0;white-space:nowrap}
@media(max-width:850px){.pfx-v2 .pfx-c-header{display:flex;flex-wrap:wrap}.pfx-v2 .pfx-c-tabs{order:2;flex-basis:100%;overflow-x:auto}.pfx-v2 .pfx-v2__header-actions{margin-left:auto}}
}


/* Quick Palette lives in the open library header space; Explore remains the single entry point. */
.pfx-explore__intro {
  display: grid;
  grid-template-columns: minmax(230px,.78fr) minmax(0,1.22fr);
  align-items: center;
  gap: clamp(18px,3vw,38px);
  margin-bottom: 22px;
}
.pfx-quick-palette {
  width: min(100%,610px);
  min-width: 0;
  justify-self: end;
  padding: 10px 12px 8px;
  border: 1px solid var(--pfx-line);
  border-radius: 13px;
  background: var(--pfx-panel);
  box-shadow: var(--pfx-v2-shadow);
}
.pfx-quick-palette__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.pfx-quick-palette__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.pfx-quick-palette__title h2 {
  margin: 0;
  color: var(--pfx-text);
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.pfx-quick-palette__title span {
  color: var(--pfx-muted);
  font: 9px/1.3 ui-monospace,monospace;
}
.pfx-v2 .pfx-quick-palette__generate {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--pfx-line-strong);
  border-radius: 8px;
  background: var(--pfx-v2-field);
  color: var(--pfx-text);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.pfx-quick-palette__generate span { font-size: 15px; line-height: .8; }
.pfx-v2 .pfx-quick-palette__generate:hover {
  border-color: var(--pfx-accent);
  color: var(--pfx-accent);
}
.pfx-quick-palette__colors {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 7px;
}
.pfx-quick-palette__item {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.pfx-v2 .pfx-quick-palette__swatch {
  display: grid;
  place-items: center;
  width: 100%;
  height: 34px;
  padding: 0;
  border: 1px solid #0002;
  border-radius: 6px;
  cursor: pointer;
  transition: filter .16s ease;
}
.pfx-v2 .pfx-quick-palette__swatch:hover { filter: brightness(1.08); }
.pfx-v2 .pfx-quick-palette__swatch[aria-pressed="true"] {
  outline: 2px solid var(--pfx-accent);
  outline-offset: 1px;
}
.pfx-quick-palette__selected {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--pfx-panel);
  color: var(--pfx-text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 7px #0003;
}
.pfx-v2 .pfx-quick-palette__code {
  width: 100%;
  min-height: 18px;
  padding: 2px 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--pfx-muted);
  font: 600 clamp(8px,.7vw,9px)/1.2 ui-monospace,monospace;
  text-align: center;
  cursor: copy;
}
.pfx-v2 .pfx-quick-palette__code:hover {
  color: var(--pfx-accent);
  background: var(--pfx-v2-field);
}
.pfx-quick-palette__notice {
  margin: 5px 0 0;
  color: var(--pfx-muted);
  font-size: 10px;
}
.pfx-quick-palette__notice:empty { display: none; }
.pfx-v2 .pfx-explore__tabs button small {
  margin-left: 3px;
  font-size: 10px;
  opacity: .78;
}
.pfx-explore__tabs button:focus-visible,
.pfx-quick-palette button:focus-visible {
  outline: 2px solid var(--pfx-accent);
  outline-offset: 2px;
}
@media(max-width:900px) and (min-width:721px) {
  .pfx-explore__intro {
    grid-template-columns: minmax(215px,.8fr) minmax(0,1.2fr);
    gap: 16px;
  }
  .pfx-quick-palette { padding-inline: 10px; }
  .pfx-quick-palette__colors { gap: 5px; }
  .pfx-quick-palette__title { gap: 6px; }
}
@media(max-width:720px) {
  .pfx-explore__intro {
    grid-template-columns: minmax(0,1fr);
    gap: 16px;
    margin-bottom: 18px;
  }
  .pfx-quick-palette {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    padding: 11px 12px 9px;
  }
  .pfx-quick-palette__heading { margin-bottom: 7px; }
  .pfx-quick-palette__title h2 { font-size: 15px; }
  .pfx-quick-palette__title span { font-size: 9px; }
  .pfx-v2 .pfx-quick-palette__generate { min-height: 36px; }
  .pfx-quick-palette__colors { gap: 6px; }
  .pfx-v2 .pfx-quick-palette__swatch {
    height: clamp(42px,12vw,54px);
    border-radius: 7px;
  }
  .pfx-v2 .pfx-quick-palette__code {
    min-height: 24px;
    font-size: clamp(8px,2.5vw,10px);
    letter-spacing: -.035em;
  }
  .pfx-v2 .pfx-explore__tabs button { padding-inline: 7px; }
}
@media(prefers-reduced-motion:reduce) {
  .pfx-v2 .pfx-quick-palette__swatch { transition: none; }
}
