.tbd-palette-generator,
.tbd-palette-generator *{box-sizing:border-box}

html body .wp-block-the-brand-deco-palette-generator.alignfull.tbd-palette-generator{
  --tbd-ink:var(--wp--preset--color--contrast,#171512);
  --tbd-muted:#6f6a61;
  --tbd-page:var(--wp--preset--color--base,#f7f3ea);
  --tbd-surface:rgba(255,255,255,.42);
  --tbd-surface-strong:rgba(255,255,255,.68);
  --tbd-border:rgba(23,21,18,.17);
  --tbd-border-strong:rgba(23,21,18,.28);
  --tbd-focus:#365cf5;
  --tbd-success:#3d6a50;
  --tbd-danger:#8b2e2e;
  --tbd-button:#151412;
  --tbd-button-text:#fffdf8;
  --tbd-display:var(--wp--preset--font-family--heading,Georgia,"Times New Roman",serif);
  --tbd-ui:var(--wp--preset--font-family--body,inherit);
  position:relative!important;
  left:50%!important;
  width:min(1440px,calc(100vw - 64px))!important;
  max-width:none!important;
  margin:clamp(1.75rem,3vw,3.5rem) 0 2.5rem!important;
  transform:translateX(-50%)!important;
  color:var(--tbd-ink);
  font-family:var(--tbd-ui);
  line-height:1.48
}

.tbd-tool-shell{
  background:transparent;
  border-top:1px solid var(--tbd-border-strong);
  border-bottom:1px solid var(--tbd-border-strong);
  border-radius:0;
  padding:18px 0 20px;
  box-shadow:none
}

.tbd-metrics{
  display:grid;
  grid-template-columns:minmax(180px,1.2fr) repeat(3,minmax(120px,.85fr)) minmax(280px,1.65fr);
  align-items:stretch;
  border-top:1px solid var(--tbd-border);
  border-bottom:1px solid var(--tbd-border);
  background:transparent;
  overflow:hidden;
  margin-bottom:18px
}
.tbd-metric{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  min-height:76px;
  padding:13px 17px;
  border-right:1px solid var(--tbd-border)
}
.tbd-metric small{
  font-size:10px;
  color:var(--tbd-muted);
  letter-spacing:.08em;
  text-transform:uppercase
}
.tbd-metric strong{
  font-size:15px;
  font-weight:650;
  font-variant-numeric:tabular-nums
}
.tbd-metric-color{flex-direction:row;align-items:center;justify-content:flex-start;gap:13px}
.tbd-current-dot{
  width:38px;height:38px;flex:0 0 38px;border-radius:50%;
  border:1px solid var(--tbd-border-strong);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.46)
}
.tbd-ramp{min-height:76px;position:relative}
.tbd-ramp:after{content:"";position:absolute;inset:0;border-left:1px solid var(--tbd-border);pointer-events:none}

.tbd-workspace{
  display:grid;
  grid-template-columns:minmax(250px,290px) minmax(0,1fr) minmax(225px,255px);
  gap:18px;
  align-items:stretch
}
.tbd-panel,.tbd-detail-card{
  border:1px solid var(--tbd-border);
  border-radius:3px;
  background:var(--tbd-surface)
}
.tbd-panel{padding:20px}
.tbd-panel-heading{margin-bottom:17px}
.tbd-panel-heading h2,.tbd-detail-card h2{
  font-family:var(--tbd-display);
  font-size:21px;
  line-height:1.13;
  margin:0;
  color:var(--tbd-ink);
  font-weight:500;
  letter-spacing:-.01em
}
.tbd-panel-heading p,.tbd-detail-card p{
  margin:6px 0 0;
  color:var(--tbd-muted);
  font-size:12px;
  line-height:1.55
}

.tbd-controls label{
  display:block;
  font-size:11px;
  font-weight:650;
  margin:15px 0 7px;
  letter-spacing:.025em
}
.tbd-color-input-row{display:grid;grid-template-columns:46px 1fr;gap:9px;align-items:center}
.tbd-color-input-row input[type=color]{
  width:46px;height:45px;padding:3px;border:1px solid var(--tbd-border-strong);border-radius:2px;background:transparent
}
.tbd-color-input-row input[type=text],.tbd-controls select{
  width:100%;height:45px;
  border:1px solid var(--tbd-border-strong);
  border-radius:2px;
  background:rgba(255,255,255,.34);
  color:var(--tbd-ink);
  padding:0 12px;
  font:inherit;
  font-size:13px
}
.tbd-color-input-row input[type=text]:hover,.tbd-controls select:hover{border-color:rgba(23,21,18,.42)}
.tbd-field-grid{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:10px}
.tbd-error{font-size:11px;color:var(--tbd-danger);min-height:16px;margin:4px 0 0}
.tbd-control-actions{display:grid;gap:9px;margin-top:18px}

.tbd-button,.tbd-harmony-buttons button,.tbd-icon-button{
  appearance:none;
  border:1px solid var(--tbd-border-strong);
  background:transparent;
  color:var(--tbd-ink);
  font:inherit;
  font-weight:600;
  cursor:pointer;
  transition:background-color .14s ease,color .14s ease,border-color .14s ease,transform .14s ease
}
.tbd-button{
  min-height:43px;
  border-radius:2px;
  padding:9px 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:12px
}
.tbd-button svg,.tbd-icon-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
.tbd-button-primary{background:var(--tbd-button);color:var(--tbd-button-text);border-color:var(--tbd-button)}
.tbd-button-secondary:hover,.tbd-harmony-buttons button:hover,.tbd-icon-button:hover{background:rgba(23,21,18,.055);border-color:rgba(23,21,18,.42)}
.tbd-button-primary:hover{background:#2a2824;border-color:#2a2824}
.tbd-button:active,.tbd-harmony-buttons button:active,.tbd-icon-button:active{transform:translateY(1px)}

.tbd-heading-line{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.tbd-mode-badge{
  display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;
  border:1px solid var(--tbd-border);
  border-radius:999px;
  background:transparent;
  color:var(--tbd-muted);
  font-size:10px;font-weight:700;letter-spacing:.03em
}

.tbd-results{display:flex;flex-direction:column;min-width:0}
.tbd-palette{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:9px;align-items:start}
.tbd-swatch-card{
  min-width:0;
  border:1px solid var(--tbd-border);
  border-radius:2px;
  overflow:hidden;
  background:var(--tbd-surface-strong)
}
.tbd-swatch{
  display:flex;width:100%;height:142px;border:0;padding:13px;
  align-items:flex-end;justify-content:space-between;text-align:left;cursor:pointer;background:#ddd
}
.tbd-swatch-hex{font-size:13px;font-weight:750}
.tbd-swatch-copy{font-size:10px;font-weight:600;opacity:.75}
.tbd-swatch-meta{display:grid;gap:3px;padding:10px 11px 7px;color:#5f5a53;font-size:10px;font-variant-numeric:tabular-nums}
.tbd-swatch-contrast{display:flex;gap:5px;flex-wrap:wrap;padding:0 11px 11px}
.tbd-swatch-contrast span{font-size:9px;border:1px solid var(--tbd-border);border-radius:999px;padding:3px 6px;background:transparent;color:#6f6a61}
.tbd-swatch-contrast .is-pass{background:rgba(61,106,80,.08);border-color:rgba(61,106,80,.18);color:#355c46}
.tbd-export-actions{display:flex;gap:9px;flex-wrap:wrap;border-top:1px solid var(--tbd-border);margin-top:auto;padding-top:16px}
.tbd-export-actions .tbd-button{flex:1 1 145px}

.tbd-preview-panel{display:flex;flex-direction:column}
.tbd-preview{
  display:grid;grid-template-rows:repeat(5,minmax(54px,1fr));min-height:344px;
  overflow:hidden;border-radius:2px;border:1px solid var(--tbd-border);background:transparent
}
.tbd-preview-band{position:relative;min-height:50px}
.tbd-preview-copy{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px}
.tbd-preview-copy strong{font-family:var(--tbd-display);font-size:16px;font-weight:500}
.tbd-preview-copy span{font-size:10px;margin-top:3px;opacity:.84}

.tbd-details-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:18px}
.tbd-detail-card{padding:18px;min-width:0}
.tbd-detail-icon{
  width:32px;height:32px;display:flex;align-items:center;justify-content:center;margin-bottom:13px;
  border:1px solid var(--tbd-border-strong);border-radius:50%;background:transparent;color:var(--tbd-ink);
  font-size:16px;font-weight:600
}
.tbd-detail-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.tbd-detail-card-header>div{display:flex;align-items:center;gap:10px}
.tbd-detail-card-header .tbd-detail-icon{margin:0}
.tbd-icon-button{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:2px;padding:0}

.tbd-harmony-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:15px}
.tbd-harmony-buttons button{min-height:37px;border-radius:2px;padding:6px 8px;font-size:10px}
.tbd-harmony-buttons button.is-active{background:var(--tbd-button);color:var(--tbd-button-text);border-color:var(--tbd-button)}
.tbd-tonal-scale{display:flex;height:56px;margin-top:15px;border-radius:2px;overflow:hidden;border:1px solid var(--tbd-border)}
.tbd-mini-swatch{flex:1;min-width:0}
.tbd-tonal-labels,.tbd-contrast-labels{display:flex;justify-content:space-between;margin-top:8px;color:var(--tbd-muted);font-size:10px}
.tbd-contrast-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px}
.tbd-contrast-sample{height:60px;border:1px solid var(--tbd-border);border-radius:2px;display:flex;align-items:center;justify-content:center;font-family:var(--tbd-display);font-size:27px;font-weight:500}
.tbd-contrast-sample.is-light{background:#fffdf8}.tbd-contrast-sample.is-dark{background:#151412;color:#fffdf8}
.tbd-code{
  height:116px;overflow:auto;margin:13px 0 0;border:1px solid var(--tbd-border);border-radius:2px;
  background:rgba(23,21,18,.035);padding:11px;
  font:10px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#3e3a35;white-space:pre
}
.tbd-status{min-height:22px;margin:14px 2px 0;color:#3d6a50;font-size:11px;font-weight:600}
.tbd-tool-note{margin:6px 2px 0;color:var(--tbd-muted);font-size:10px}
.tbd-notice{border-left:2px solid #8d6600;padding:10px 12px;background:rgba(255,248,223,.7)}

.tbd-palette-generator :focus-visible{outline:2px solid var(--tbd-focus);outline-offset:3px}
.tbd-palette-generator button:disabled,.tbd-palette-generator select:disabled{opacity:.55;cursor:not-allowed}

@media (max-width:1180px){
  .tbd-metrics{grid-template-columns:repeat(4,minmax(120px,1fr))}
  .tbd-ramp{grid-column:1/-1;min-height:38px}
  .tbd-ramp:after{border-left:0;border-top:1px solid var(--tbd-border)}
  .tbd-workspace{grid-template-columns:minmax(240px,280px) minmax(0,1fr)}
  .tbd-preview-panel{grid-column:1/-1}
  .tbd-preview{grid-template-columns:repeat(5,1fr);grid-template-rows:1fr;min-height:132px}
  .tbd-preview-band{min-height:132px}
  .tbd-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .tbd-palette-generator{width:calc(100vw - 20px)!important}
  .tbd-tool-shell{padding:12px 0 14px}
  .tbd-metrics{grid-template-columns:1fr 1fr}
  .tbd-metric{min-height:62px;padding:10px 12px}
  .tbd-metric:nth-child(2){border-right:0}
  .tbd-metric:nth-child(3){border-top:1px solid var(--tbd-border)}
  .tbd-metric:nth-child(4){border-top:1px solid var(--tbd-border);border-right:0}
  .tbd-ramp{grid-column:1/-1}
  .tbd-workspace{grid-template-columns:1fr;gap:12px}
  .tbd-preview-panel{grid-column:auto}
  .tbd-palette{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tbd-swatch{height:116px}
  .tbd-details-grid{grid-template-columns:1fr;gap:12px}
  .tbd-preview{grid-template-columns:1fr;grid-template-rows:repeat(5,58px);min-height:auto}
  .tbd-preview-band{min-height:58px}
  .tbd-export-actions{display:grid;grid-template-columns:1fr}
  .tbd-field-grid{grid-template-columns:1fr 90px}
}
@media (max-width:430px){
  .tbd-metrics{grid-template-columns:1fr}
  .tbd-metric,.tbd-metric:nth-child(n){border-right:0;border-top:1px solid var(--tbd-border)}
  .tbd-metric:first-child{border-top:0}
  .tbd-palette{grid-template-columns:1fr}
  .tbd-color-input-row{grid-template-columns:42px 1fr}
  .tbd-color-input-row input[type=color]{width:42px}
  .tbd-harmony-buttons{grid-template-columns:1fr}
  .tbd-swatch{height:122px}
}
@media (prefers-reduced-motion:reduce){.tbd-palette-generator *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
