/* Reddit orange is the selected theme; other color studies use preview URLs. */
html[data-palette="blue"] {
  --paper: #f7f8f4;
  --ink: #182827;
  --muted: #64716c;
  --accent: #326df0;
  --accent-hover: #2356c9;
  --line: #dce2dc;
}
html[data-palette] {
  --prompt-wash: #eff3fb;
  --prompt-line: #dbe3ef;
  --prompt-ink: #596778;
  --prompt-link: #285dcc;
  --accent-shadow: #326df016;
  --accent-selection: #dce7ff;
  --accent-selection-ink: #203b71;
}
html[data-palette="purple"] {
  --paper: #f8f5fc;
  --ink: #2c203c;
  --muted: #6c6175;
  --accent: #7445c7;
  --accent-hover: #5c31aa;
  --line: #e6dfec;
  --prompt-wash: #f0e9fb;
  --prompt-line: #dcd0ef;
  --prompt-ink: #6c6175;
  --prompt-link: #6336b0;
  --accent-shadow: #7445c716;
  --accent-selection: #e6d9fa;
  --accent-selection-ink: #36204f;
}
html[data-palette="orange"] {
  --paper: #fff8f5;
  --ink: #2b211e;
  --muted: #75615a;
  --accent: #ff4500;
  --accent-hover: #f03f00;
  --line: #eddfd9;
  --prompt-wash: #fff0e8;
  --prompt-line: #ffd8c8;
  --prompt-ink: #75615a;
  --prompt-link: var(--ink);
  --accent-shadow: #ff45001c;
  --accent-selection: #ffd9c8;
  --accent-selection-ink: #502013;
}
html[data-palette="rose"] {
  --paper: #fcf5f6;
  --ink: #3b242e;
  --muted: #765f68;
  --accent: #b83c69;
  --accent-hover: #963052;
  --line: #ebdce2;
  --prompt-wash: #f9e8ee;
  --prompt-line: #eacbd7;
  --prompt-ink: #765f68;
  --prompt-link: #a02e57;
  --accent-shadow: #b83c6916;
  --accent-selection: #f4d5e1;
  --accent-selection-ink: #542537;
}
html[data-palette="green"] {
  --paper: #f5f8f2;
  --ink: #20362b;
  --muted: #5b6d63;
  --accent: #2f7452;
  --accent-hover: #245b3f;
  --line: #dce5d7;
  --prompt-wash: #eaf1e5;
  --prompt-line: #cfddc7;
  --prompt-ink: #5b6d63;
  --prompt-link: #286446;
  --accent-shadow: #2f745216;
  --accent-selection: #d9e9d2;
  --accent-selection-ink: #254a34;
}
html[data-palette] .prompt-url {
  color: var(--prompt-link);
}
html[data-palette] .setup-prompt::selection,
html[data-palette] .setup-prompt *::selection {
  background: var(--accent-selection);
  color: var(--accent-selection-ink);
}
/* Keep the chosen orange consistent across primary actions. */
html[data-palette="orange"] {
  --orange-button: #ff4500;
  --orange-button-hover: #f03f00;
}
html[data-palette="orange"][data-orange-tone="current"] {
  --orange-button: #da3900;
  --orange-button-hover: #c93400;
}
html[data-palette="orange"][data-orange-tone="brighter"] {
  --orange-button: #e84000;
  --orange-button-hover: #da3900;
}
html[data-palette="orange"][data-orange-tone="vivid"] {
  --orange-button: #f34200;
  --orange-button-hover: #e43d00;
}
html[data-palette="orange"][data-orange-tone="reddit"] {
  --orange-button: #ff4500;
  --orange-button-hover: #f03f00;
}
html[data-palette="orange"] .button:is([data-copy-prompt], [data-open-setup]) {
  background: var(--orange-button);
  color: #fff;
}
html[data-palette="orange"]
  .button:is([data-copy-prompt], [data-open-setup]):is(:hover, [data-copy-state="copied"]) {
  background: var(--orange-button-hover);
}
html[data-palette] .scenario-tabs button {
  border-color: var(--line);
}
html[data-palette] .scenario-tabs button[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
}
html[data-palette] .scenario-tabs button:hover:not([aria-selected="true"]) {
  background: var(--prompt-wash);
}
html[data-palette] .brand {
  position: relative;
  --brand-mark-size: 35px;
}
html[data-palette] .brand img {
  visibility: hidden;
}
html[data-palette] .brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--brand-mark-size);
  height: var(--brand-mark-size);
  background: var(--accent);
  mask: url("/assets/site/assets/logo.svg") center / contain no-repeat;
  -webkit-mask: url("/assets/site/assets/logo.svg") center / contain no-repeat;
}
html[data-palette] .site-footer .brand {
  --brand-mark-size: 29px;
}
html[data-palette-preview] body {
  padding-bottom: 105px;
}
.palette-preview[hidden] {
  display: none;
}
.palette-preview {
  position: fixed;
  z-index: 60;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0 16px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px 12px 10px 20px;
  border: 1px solid #dedee5;
  border-radius: 24px;
  background: #fffffff5;
  box-shadow:
    0 12px 50px #23213018,
    0 2px 5px #23213008;
  backdrop-filter: blur(16px);
  color: #34323c;
  font-family: Arial, Helvetica, sans-serif;
}
.palette-preview-title {
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  color: #706c78;
}
.palette-preview-choices {
  display: flex;
  gap: 4px;
}
.palette-preview-choices button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #56515e;
  font-size: 14px;
  line-height: 1.2;
}
.palette-preview-choices button:hover {
  background: #f5f4f7;
}
.palette-preview-choices button[aria-pressed="true"] {
  background: #f0eef4;
  border-color: #d5d0de;
  color: #24202c;
}
.palette-swatch {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px #0000000b;
}
[data-palette-choice="blue"] {
  --swatch: #326df0;
}
[data-palette-choice="purple"] {
  --swatch: #7445c7;
}
[data-palette-choice="orange"] {
  --swatch: #ff4500;
}
[data-palette-choice="rose"] {
  --swatch: #b83c69;
}
[data-palette-choice="green"] {
  --swatch: #2f7452;
}
.palette-preview-close {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #7b7583;
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
}
.palette-preview-close:hover {
  background: #f0eef4;
  color: #34323c;
}
.palette-preview button:focus-visible {
  outline: 2px solid #625571;
  outline-offset: 2px;
}
.palette-orange-tones[hidden] {
  display: none;
}
.palette-orange-tones {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-top: 1px solid #e9e6ed;
  margin-top: 8px;
  padding-top: 8px;
}
[data-orange-choice="current"] {
  --swatch: #da3900;
}
[data-orange-choice="brighter"] {
  --swatch: #e84000;
}
[data-orange-choice="vivid"] {
  --swatch: #f34200;
}
[data-orange-choice="reddit"] {
  --swatch: #ff4500;
}
html[data-palette="orange"][data-palette-preview] body {
  padding-bottom: 175px;
}
@media (max-width: 700px) {
  html[data-palette-preview] body {
    padding-bottom: 140px;
  }
  .palette-preview {
    display: grid;
    grid-template-columns: 1fr 32px;
    gap: 2px 8px;
    padding: 7px 9px 10px;
    border-radius: 20px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .palette-preview-title {
    padding-left: 8px;
  }
  .palette-preview-close {
    grid-column: 2;
    grid-row: 1;
    min-width: 32px;
    min-height: 28px;
    font-size: 22px;
  }
  .palette-preview-choices {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 3px;
  }
  .palette-preview-choices button {
    flex-direction: column;
    gap: 6px;
    min-width: 55px;
    min-height: 54px;
    padding: 7px 9px;
    font-size: 12px;
    border-radius: 13px;
  }
  .palette-swatch {
    width: 17px;
    height: 17px;
  }
  .palette-orange-tones {
    grid-row: 3;
    display: block;
    margin-top: 7px;
    padding-top: 10px;
  }
  .palette-orange-tones > .palette-preview-title {
    display: block;
    padding-left: 8px;
    margin-bottom: 4px;
    font-size: 12px;
  }
  .orange-tone-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
  .orange-tone-choices button {
    min-width: 0;
    min-height: 49px;
    padding: 6px 7px;
  }
  html[data-palette="orange"][data-palette-preview] body {
    padding-bottom: 230px;
  }
}
@media (max-width: 390px) {
  html[data-palette] .brand {
    --brand-mark-size: 30px;
  }
  .palette-preview-choices button {
    min-width: 49px;
    padding-inline: 6px;
  }
}
