.palette-home {
  color-scheme: var(--hero-scheme, dark);
  background: var(--hero-bg);
  color: var(--hero-ink);
  --line: var(--hero-line);
}

[data-theme="lime"] {
  --hero-bg: #0f1318;
  --hero-ink: #f9f8f5;
  --hero-muted: #bfc7d1;
  --hero-line: #303945;
  --control-line: #626f80;
  --accent: #d4fa42;
  --on-accent: #1b2116;
  --accent-hover: #e1ff75;
  --accent-soft: #252e39;
  --icon-bg: #e6eaf0;
  --icon-line: #aeb8c6;
}

[data-theme="cobalt"] {
  --hero-scheme: light;
  --hero-bg: #edefff;
  --hero-ink: #151a34;
  --hero-muted: #424b70;
  --hero-line: #cbd2ed;
  --control-line: #8996c1;
  --accent: #2a48dc;
  --on-accent: #fff;
  --accent-hover: #2039bb;
  --accent-soft: #dce3ff;
  --icon-bg: #e4eaff;
  --icon-line: #bac7ff;
}

[data-theme="violet"] {
  --hero-bg: #211a30;
  --hero-ink: #faf7ff;
  --hero-muted: #c9bfdb;
  --hero-line: #443954;
  --control-line: #76648d;
  --accent: #bca8ff;
  --on-accent: #211a30;
  --accent-hover: #d3c5ff;
  --accent-soft: #37294d;
  --icon-bg: #ebe3fa;
  --icon-line: #cbbce6;
}

[data-theme="warm-white"] {
  --hero-bg: #141414;
  --hero-ink: #f8f7f3;
  --hero-muted: #c5c1b6;
  --hero-line: #3a3834;
  --control-line: #78756b;
  --accent: #f8f7f3;
  --on-accent: #141414;
  --accent-hover: #e6e3d8;
  --accent-soft: #302e2a;
  --icon-bg: #ebe8de;
  --icon-line: #c9c4b6;
}

[data-theme="ink-black"] {
  --hero-scheme: light;
  --hero-bg: #f2f1ec;
  --hero-ink: #25241f;
  --hero-muted: #55544e;
  --hero-line: #cecbc1;
  --control-line: #87837a;
  --accent: #171717;
  --on-accent: #f8f7f3;
  --accent-hover: #35332f;
  --accent-soft: #e1ded5;
  --icon-bg: #e5e1d8;
  --icon-line: #c7c2b6;
}

[data-theme="coral"] {
  --hero-scheme: light;
  --hero-bg: #fcefe9;
  --hero-ink: #331f1c;
  --hero-muted: #704b45;
  --hero-line: #e5cfc6;
  --control-line: #ad847b;
  --accent: #c64338;
  --accent-text: #a4372e;
  --on-accent: #fff;
  --accent-hover: #a4372e;
  --accent-soft: #f9e0d9;
  --icon-bg: #f7e1da;
  --icon-line: #d8aea4;
}

.palette-home :is(.brand span, .site-nav, .language, .eyebrow, .intro, .secondary, .compare-hint, .steps p) {
  color: var(--hero-muted);
}
.palette-home :is(.highlight, .site-nav a[aria-current="page"], .site-nav a:hover, .secondary:hover, .steps li > span) {
  color: var(--accent-text, var(--accent));
}
.palette-home :is(.eyebrow i, .split-rule) { background: var(--accent); }
.palette-home :is(.primary, .split-rule span) {
  background: var(--accent);
  color: var(--on-accent);
}
.palette-home .primary:hover { background: var(--accent-hover); }
.palette-home :is(.outline, .compare, .case-picker button) { border-color: var(--control-line); }
.palette-home .outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.palette-home .split-rule span { border-color: var(--accent); }
.palette-home .compare:focus-within { outline-color: var(--accent); }
.palette-home .case-picker button { color: var(--hero-muted); }
.palette-home .case-picker button:hover { border-color: var(--accent); }
.palette-home .case-picker button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-text, var(--accent));
  border-color: var(--accent);
}
.palette-home .tool-icon {
  background: var(--icon-bg);
  border-color: var(--icon-line);
}

.palette-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--hero-bg);
}

.palette-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 14px;
  color: var(--hero-muted, var(--muted));
  font-size: 12px;
}
.palette-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 99px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.palette-switcher button:hover,
.palette-switcher button[aria-pressed="true"] {
  border-color: var(--control-line);
  color: var(--hero-ink);
  background: var(--accent-soft);
}
.palette-switcher button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #766d86;
  background: var(--swatch);
}
.palette-switcher .warm-white { --swatch: #f8f7f3; }
.palette-switcher .ink-black { --swatch: #171717; }
.palette-switcher .coral { --swatch: #c64338; }
.palette-switcher .cobalt { --swatch: #2a48dc; }
.palette-switcher .violet { --swatch: #bca8ff; }
.palette-switcher .lime { --swatch: #d4fa42; }
.palette-home .hero { padding-top: clamp(42px, 6vw, 78px); }
@media (max-width: 480px) {
  .palette-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .palette-switcher button { justify-content: center; gap: 5px; padding-inline: 4px; }
}

@media (max-width: 530px) {
  .palette-home .footer-inner { flex-wrap: wrap; padding-block: 14px; }
  .palette-home .footer-inner nav { flex-wrap: wrap; }
}

/* Workspace surfaces follow the same palette as the homepage. */
.palette-home {
  --studio-text: var(--hero-ink);
  --studio-muted: var(--hero-muted);
  --studio-emphasis: var(--accent-text, var(--accent));
  --studio-section: color-mix(in srgb, var(--hero-bg) 88%, black);
  --studio-shell: color-mix(in srgb, var(--hero-bg) 94%, white);
  --studio-surface: color-mix(in srgb, var(--hero-bg) 89%, white);
  --studio-tint: color-mix(in srgb, var(--hero-bg) 86%, var(--accent));
  --studio-drop: color-mix(in srgb, var(--hero-bg) 96%, var(--accent));
  --studio-selected: var(--accent-soft);
  --studio-line: color-mix(in srgb, var(--hero-line) 80%, var(--hero-muted));
  --studio-divider: color-mix(in srgb, var(--studio-line) 78%, var(--studio-surface));
  --studio-outline: var(--control-line);
  --studio-success: #a2dfb0;
  --studio-shadow: #0002;
}

:is([data-theme="cobalt"], [data-theme="ink-black"], [data-theme="coral"]) {
  --studio-surface: #fff;
  --studio-success: #17623d;
  --studio-shadow: #27376f09;
}

[data-theme="cobalt"] {
  --studio-section: #f2f1ec;
  --studio-text: #171d36;
  --studio-muted: #4f5876;
  --studio-shell: #fbfcff;
  --studio-drop: #f4f6ff;
  --studio-tint: #e6ebff;
  --studio-selected: #edf0ff;
  --studio-line: #d8def0;
  --studio-divider: #e8ebf4;
}

[data-theme="ink-black"] {
  --studio-section: #eae7df;
  --studio-shell: #fcfbf8;
  --studio-drop: #f3f1eb;
  --studio-tint: #e7e3d9;
  --studio-selected: #f0eee6;
  --studio-line: #d6d2c7;
  --studio-divider: #e9e7e1;
}

[data-theme="coral"] {
  --studio-section: #f6e5de;
  --studio-shell: #fff9f6;
  --studio-drop: #fdf2ed;
  --studio-tint: #fae5dc;
  --studio-selected: #fcece6;
  --studio-line: #e8cbc2;
  --studio-divider: #f0dfd9;
}

.redesign-hero .arrow { position: relative; width: 13px; height: 13px; flex: none; display: inline-block; }
.redesign-hero .arrow::before, .arrow::after { content: ""; position: absolute; }
.redesign-hero .arrow::before { width: 11px; height: 1px; left: 0; top: 6px; background: currentColor; }
.redesign-hero .arrow::after { width: 5px; height: 5px; right: 2px; top: 4px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }
.redesign-hero .arrow.up-right { transform: rotate(-45deg); }
.redesign-hero .arrow.down { transform: rotate(90deg); }
.redesign-hero .outline { padding: 10px 15px; border: 1px solid #50504a; gap: 9px; font-size: 13px; }
.redesign-hero .outline:hover { border-color: #b8b7b0; background: #262625; }
.redesign-hero .primary { padding: 15px 20px; background: var(--white); color: var(--night); font-size: 14px; }
.redesign-hero .primary:hover { background: #d8d7d0; }
.redesign-hero { display: grid; grid-template-columns: minmax(0,.93fr) minmax(0,1.07fr); align-items: center; gap: clamp(35px, 5vw, 82px); padding-block: 96px 104px; }
.redesign-hero .eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 25px; text-transform: uppercase; color: #cbc9c2; letter-spacing: .14em; font-size: 10px; font-weight: 600; }
.redesign-hero .eyebrow i { width: 6px; height: 6px; background: #eae7dc; border-radius: 50%; }
.redesign-hero :is(h1, p) { margin: 0; }
.redesign-hero h1 { max-width: 630px; font-size: clamp(48px, 5.65vw, 84px); font-weight: 570; letter-spacing: -.083em; line-height: .985; }
.redesign-hero .redesign-hero h1 .headline-line { display: block; }
.redesign-hero h1 .highlight { color: #c3c0b5; }
.intro { color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.63; max-width: 405px; margin-top: 25px; }
.redesign-hero .hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.redesign-hero .secondary { display: inline-flex; align-items: center; gap: 9px; color: #cfcdc6; font-size: 14px; }
.redesign-hero .showcase { margin: 0; min-width: 0; scroll-margin-top: 20px; }
.redesign-hero .compare { --split: 50%; position: relative; display: grid; grid-template-columns: minmax(0,var(--split)) minmax(0,1fr); overflow: hidden; isolation: isolate; height: auto; aspect-ratio: 1.39; border: 1px solid #383837; border-radius: 17px; }
.compare-pane { position: relative; min-width: 0; overflow: hidden; display: grid; place-items: center; }
.compare-pane img { width: 100%; height: 100%; display: block; object-fit: contain; }
.redesign-hero .before { background: #fff; }
.redesign-hero .after { background: #000; }
.redesign-hero .compare[data-case="blanket"] .after { background: #f4c6dc; }
.redesign-hero .compare[data-case="tablecloth"] .after { background: #777572; }
.compare-label { position: absolute; top: 13px; left: 13px; padding: 4px 10px; border-radius: 100px; color: #181818; background: #f6f5f1; border: 1px solid #d6d4ce; font-size: 11px; font-weight: 600; white-space: nowrap; }
.redesign-hero .after .compare-label { left: auto; right: 13px; color: #fff; background: #202020; border-color: #4a4a45; }
.redesign-hero .split-rule { position: absolute; inset-block: 0; left: var(--split); width: 1px; background: #e9e6dd; pointer-events: none; }
.redesign-hero .split-rule span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 35px; height: 35px; border-radius: 100%; border: 1px solid #d2d0ca; color: #151515; background: #faf9f5; font-size: 19px; letter-spacing: -2px; padding-right: 2px; box-shadow: 0 2px 10px #0003; }
.redesign-hero .split-input { position: absolute; inset: 0 19%; width: 62%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.redesign-hero .compare:focus-within { outline: 2px solid var(--white); outline-offset: 4px; }
.redesign-hero figcaption { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.redesign-hero .case-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.redesign-hero .case-picker button { border-radius: 99px; border: 1px solid #3c3b37; background: transparent; cursor: pointer; padding: 6px 11px; color: #c0beb5; font-size: 12px; }
.redesign-hero .case-picker button:hover { border-color: #aeaba1; }
.redesign-hero .case-picker button[aria-pressed="true"] { background: #e6e3d8; color: #171714; border-color: #e6e3d8; }
.redesign-hero .compare-hint { white-space: nowrap; color: #a6a49d; font-size: 11px; }

.redesign-hero.wrap, .palette-switcher.wrap {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}
.palette-home .redesign-hero {
  text-align: start;
  color: var(--hero-ink);
  padding-bottom: clamp(42px, 7vw, 96px);
}
.palette-home .redesign-hero h1 {
  margin: 0;
  font-size: clamp(40px, 5.65vw, 84px);
  line-height: 1;
  max-width: none;
}
.redesign-hero .title-flip-source, .redesign-hero .headline-line { display: block; }
.redesign-hero .title-flip-front, .redesign-hero .title-flip-top { background: var(--hero-bg); }
.redesign-hero .hero-actions { justify-content: flex-start; }
.redesign-hero .button.primary { border-radius: 999px; display: inline-flex; align-items: center; gap: 12px; }
.palette-home {
  --acid: var(--accent);
  --bg: var(--hero-bg);
  --ink: var(--hero-ink);
  --muted: var(--hero-muted);
}
:is(.palette-home, [data-themed-page]) .site-header {
  background: var(--hero-bg);
  color: var(--hero-ink);
  border-color: var(--hero-line);
}
:is(.palette-home, [data-themed-page]) .site-header :is(a, .site-tagline, select) { color: var(--hero-ink); }
.redesign-mark { width: 84px; height: auto; vertical-align: middle; margin-inline-end: 8px; }
.site-logo:has(.redesign-mark) { font-size: 0; }
.palette-home .palette-bar { position: relative; }
.palette-home .online-studio { background: var(--studio-section); color: var(--studio-text); scroll-margin-top: 100px; }
.palette-home .online-studio > .container {
  background: var(--studio-shell);
  border: 1px solid var(--studio-line);
  border-radius: 24px;
  padding: clamp(16px, 3vw, 32px);
}
.palette-home #studio-drop { background: var(--studio-drop); color: var(--studio-text); border-color: var(--studio-outline); }
.palette-home .quality-choice { color: var(--studio-text); border-color: var(--studio-line); }
.palette-home .quality-choice small { color: var(--studio-muted); }
.palette-home .quality-slider { background: var(--studio-selected); border-color: var(--accent); }
.palette-home :is(#pick-image, .workspace-add) { background: var(--accent); color: var(--on-accent); }
[data-release-ui] .quality-switch[hidden] { display: none !important; }
@media (max-width: 760px) {
  .palette-home .redesign-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .redesign-hero.wrap, .palette-switcher.wrap { width: calc(100% - 32px); }
}

.palette-switcher.wrap { margin-inline: auto; }
[data-themed-page] .palette-bar { background: var(--hero-bg); }
[data-themed-page] main {
  background: var(--studio-section);
  color: var(--studio-text);
}
[data-themed-page] :is(.plan, .pack, .support-panel, .api-docs section) {
  background: var(--studio-surface);
  color: var(--studio-text);
  border-color: var(--studio-line);
}
[data-themed-page] :is(.pack-bonus, .rate, .plan-output) { color: var(--studio-emphasis); }
[data-themed-page] :is(.purchase-button, .account-buy) {
  background: var(--accent);
  color: var(--on-accent);
}
.palette-home :is(.demo-section, .capabilities, .process, .contact, .footer) {
  background: var(--studio-section);
  color: var(--studio-text);
}
.palette-home :is(.sample, .service) { background: var(--studio-surface); color: var(--studio-text); }
.palette-home :is(.section-head, .tech-heading) p { color: var(--studio-muted); }
.palette-home .online-studio :is(.studio-bar, #studio-status, #studio-drop p, #studio-drop small) {
  color: var(--studio-muted);
}

.palette-home .redesign-hero .case-picker button {
  color: var(--hero-ink);
  border-color: var(--control-line);
}
.palette-home .redesign-hero .case-picker button[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
.redesign-hero figcaption { align-items: flex-start; }
@media (max-width: 530px) {
  .redesign-hero figcaption { flex-wrap: wrap; }
}

/* The homepage alternates theme surfaces with white working areas. */
[data-release-ui] {
  --studio-section: #fff;
  --studio-shell: #fff;
  --studio-surface: #fff;
  --studio-text: #151a34;
  --studio-muted: #4f5876;
  --studio-line: #d8def0;
  --studio-outline: #8996c1;
  --studio-drop: #f7f8fd;
  --home-blue: #2a48dc;
}
[data-release-ui] :is(#online-studio, #services, #process) {
  background: white;
  color: var(--studio-text);
  color-scheme: light;
}
[data-release-ui] #online-studio { background: #f2f1ec; }
[data-release-ui] :is(#services, #process) { border-color: var(--studio-line); }
[data-release-ui] #services .service {
  border-color: var(--studio-line);
  background: var(--studio-drop);
}
[data-release-ui] :is(#services, #process) :is(p, .tech-heading p) { color: var(--studio-muted); }
[data-release-ui] :is(#services, #process) :is(h2, h3) { color: var(--studio-text); }
[data-release-ui] #process :is(.step, .workflow-output) { border-color: var(--studio-line); }
[data-release-ui] #process .workflow-facts h4 { color: #111; font-weight: 700; }
[data-release-ui] #process .btn-ghost { color: var(--home-blue); }
[data-release-ui] #process .btn-ghost { border-color: var(--studio-outline); }
[data-release-ui] #process .btn-ghost:hover { background: var(--studio-drop); }
[data-release-ui] .tech-diagram {
  --diagram-stroke: #465575;
  --diagram-accent: color-mix(in srgb, var(--home-blue) 86%, #fff);
  color: var(--diagram-stroke);
}
[data-release-ui] .tech-diagram :is(.tech-accent, .tech-nodes) {
  stroke: var(--diagram-accent);
}
[data-release-ui] .tech-diagram .tech-ghost {
  stroke: color-mix(in srgb, var(--diagram-accent) 78%, #ebedfc);
  opacity: .68;
}
[data-release-ui] .tech-diagram .tech-cutout {
  fill: color-mix(in srgb, var(--diagram-accent) 20%, #fff);
}
[data-release-ui] #studio-drop { background: var(--studio-drop); }
[data-release-ui] #studio-drop .upload-paper :is(svg, b) { color: var(--home-blue); }
[data-release-ui] .upload-paper { border-color: var(--studio-line); box-shadow: 0 10px 24px #151a3414; }
[data-release-ui] .upload-paper i { background: linear-gradient(45deg, #e2e7f8 49%, #f7f8fd 51%); }
[data-release-ui] .online-studio :is(#pick-image, .workspace-add) { background: var(--home-blue); color: white; }
[data-release-ui] :is(.contact, .footer) { background: var(--hero-bg); color: var(--hero-ink); border-color: var(--hero-line); }
[data-release-ui] .contact :is(p, .contact-detail, .eyebrow) { color: var(--hero-muted) !important; }
[data-release-ui] .contact-email { color: var(--accent-text, var(--accent)); border-color: currentColor; }

/* Keep the cobalt homepage accents consistent across the hero and its controls. */
[data-release-ui][data-theme="cobalt"] {
  --hero-bg: #ebedfc;
  --hero-ink: #151a34;
  --hero-muted: #39466a;
  --hero-line: #d2d9ee;
  --accent: #2944db;
  --accent-soft: #dfe5ff;
  --home-blue: var(--accent);
  --studio-drop: #f5f7ff;
}
[data-release-ui][data-theme="cobalt"] .redesign-hero .intro {
  margin-top: 24px;
  max-width: 46ch;
}
[data-release-ui][data-theme="cobalt"] .redesign-hero .split-rule {
  background: var(--accent);
}
[data-release-ui][data-theme="cobalt"] .redesign-hero .split-rule span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 3px 8px #151a3426;
}
[data-release-ui][data-theme="cobalt"] .redesign-hero .case-picker button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
[data-release-ui][data-theme="cobalt"] .site-header .lang-toggle {
  background: var(--accent-soft);
  border-color: var(--hero-line);
  color: var(--hero-ink);
}
[data-release-ui][data-theme="cobalt"] .site-header .account-links > button {
  color: var(--hero-ink);
}

body .site-header .preview-page-links {
  gap: clamp(8px, 1.8vw, 26px);
  margin-inline-start: 0;
}
body .site-header .preview-page-links a {
  color: var(--hero-muted);
  white-space: nowrap;
}
body .site-header .preview-page-links a:is(:hover, [aria-current="page"]) {
  color: var(--accent);
}
body .site-header .preview-page-links a[aria-current="page"] { font-weight: 700; }
@media (max-width: 740px) {
  body .site-header .preview-page-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
}
