.upscale-page-root {
  margin-top: calc(20px - var(--page-shell-top-padding));
}

.upscale-page {
  --upscale-panel: #1b1d1e;
  --upscale-field: #242523;
  --upscale-line: rgb(255 255 255 / 7%);
  --upscale-text: var(--brand-text-primary);
  --upscale-muted: #9fa2a1;
  --upscale-accent: var(--brand-primary);
  display: grid;
  grid-template-columns: 350px minmax(0, 1000px);
  column-gap: 300px;
  width: min(1650px, calc(100vw - 324px));
  margin: 0 0 84px;
  margin-left: calc(50% - 50vw + 200px);
  color: var(--upscale-text);
  font-family: inherit;
  font-weight: 400;
}

.upscale-page *,
.upscale-page *::before,
.upscale-page *::after { box-sizing: border-box; }

.upscale-page button,
.upscale-page input,
.upscale-page textarea,
.upscale-page strong,
.upscale-page b { font: inherit; font-weight: 400; }

.upscale-composer-panel {
  position: sticky;
  top: 12px;
  align-self: start;
  width: 350px;
  height: calc(100svh - 24px);
  min-height: 640px;
  max-height: 1010px;
  overflow: hidden;
  border: 1px solid var(--upscale-line);
  border-radius: 18px;
  background: var(--upscale-panel);
  box-shadow: 0 24px 58px rgb(0 0 0 / 30%);
}

.upscale-composer {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.upscale-composer-header,
.upscale-advanced-trigger,
.upscale-toggle-control,
.upscale-range-control > span,
.upscale-select-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upscale-composer-header { min-height: 30px; }

.upscale-composer-header h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.upscale-composer-header button {
  border: 0;
  background: transparent;
  color: var(--upscale-text);
  cursor: pointer;
  font-size: 13px;
}

.upscale-control-group { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; }
.upscale-label,
.upscale-select-control > span,
.upscale-prompt-control > span,
.upscale-toggle-control > span { display: block; color: var(--upscale-muted); font-size: 12px; line-height: 1.35; }
.upscale-range-control > span { color: var(--upscale-muted); font-size: 12px; line-height: 1.35; }

.upscale-upload-control,
.upscale-model-trigger,
.upscale-advanced-trigger,
.upscale-parameter-trigger,
.upscale-prompt-control textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--upscale-field);
  color: var(--upscale-text);
}

.upscale-upload-control,
.upscale-model-trigger { min-height: 62px; padding: 8px; text-align: left; cursor: pointer; }
.upscale-upload-control { display: flex; align-items: center; gap: 10px; }
.upscale-upload-control img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #0e0f0f; }
.upscale-upload-control span,
.upscale-model-trigger-copy { display: grid; min-width: 0; gap: 3px; }
.upscale-model-trigger { display: grid; grid-template-columns: 40px minmax(0, 1fr) 13px; align-items: center; gap: 10px; }
.upscale-model-icon-tile { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, 0.055); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); }
.upscale-model-icon-tile .generation-brand-mark { width: 22px; height: 22px; color: var(--upscale-muted); }
.upscale-model-icon-tile .generation-brand-mark--openai { width: 19px; height: 19px; }
.upscale-model-trigger .generation-brand-mark,
.upscale-model-option.is-selected .generation-brand-mark { color: var(--upscale-accent); }
.upscale-upload-control strong { overflow: hidden; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.upscale-upload-control small,
.upscale-model-trigger small,
.upscale-model-option-meta { overflow: hidden; color: var(--upscale-muted); font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.upscale-model-trigger > img,
.upscale-advanced-trigger img,
.upscale-parameter-trigger img { width: 13px; height: 13px; flex: 0 0 13px; filter: brightness(0) invert(1); opacity: .86; transform: rotate(90deg); transition: transform 150ms ease; }
.upscale-model-trigger[aria-expanded="true"] > img { transform: rotate(-90deg); }

.upscale-model-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: 100%;
  max-height: min(460px, calc(100dvh - 24px));
  gap: 4px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--upscale-line);
  border-radius: 12px;
  background: rgb(24 25 25 / 99%);
  box-shadow: 0 18px 48px rgb(0 0 0 / 50%);
  scrollbar-color: #4b4d4d transparent;
  scrollbar-width: thin;
}
.upscale-model-menu[hidden],
.upscale-advanced[hidden],
.upscale-status[hidden] { display: none; }
.upscale-model-option { display: grid; width: 100%; min-height: 52px; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: center; gap: 9px; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--upscale-text); cursor: pointer; text-align: left; }
.upscale-model-option-main { min-width: 0; }
.upscale-dropdown-primary-text { min-width: 0; overflow: hidden; color: var(--upscale-text); font-family: inherit; font-size: 13px; font-weight: 400; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.upscale-model-trigger .upscale-dropdown-primary-text,
.upscale-model-option .upscale-dropdown-primary-text,
.upscale-parameter-trigger .upscale-dropdown-primary-text,
.upscale-parameter-option .upscale-dropdown-primary-text { font-size: 13px; font-weight: 400; line-height: 16px; }
.upscale-model-option-name { display: block; }
.upscale-model-option-meta { display: block; margin-top: 2px; overflow: hidden; color: var(--upscale-muted); font-size: 10px; font-weight: 400; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.upscale-model-option em { margin-left: 4px; padding: 2px 5px; border-radius: 4px; background: color-mix(in srgb, var(--upscale-accent) 15%, transparent); color: var(--upscale-accent); font-size: 9px; font-style: normal; white-space: nowrap; }
.upscale-model-option-check { display: grid; width: 16px; height: 16px; place-items: center; color: #d9dcd7; opacity: 0; }
.upscale-model-option-check svg { width: 15px; height: 15px; }
.upscale-model-option.is-selected .upscale-model-option-check { color: var(--upscale-accent); opacity: 1; }
.upscale-model-option:hover { background: rgba(255, 255, 255, 0.045); }
.upscale-model-option.is-selected { background: rgba(255, 255, 255, 0.082); }

.upscale-scale-control { display: grid; gap: 7px; }
.upscale-scale-control > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 11px; background: var(--upscale-field); }
.upscale-scale-control button { min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #bfc2c1; cursor: pointer; font-size: 12px; }
.upscale-scale-control button[aria-pressed="true"] { background: #fbfbf9; color: #1c1d1c; }

.upscale-advanced-trigger { min-height: 39px; padding: 0 10px; cursor: pointer; font-size: 13px; text-align: left; }
.upscale-advanced-trigger > span { font-size: 13px !important; font-weight: 400; line-height: 16px; }
.upscale-advanced-trigger[aria-expanded="true"] img { transform: rotate(-90deg); }
.upscale-advanced { display: grid; gap: 12px; overflow: auto; padding-right: 3px; scrollbar-color: #4b4d4d transparent; scrollbar-width: thin; }
.upscale-select-control,
.upscale-prompt-control,
.upscale-range-control { display: grid; gap: 7px; }
.upscale-select-control { position: relative; }
.upscale-parameter-trigger { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; cursor: pointer; text-align: left; }
.upscale-parameter-trigger[aria-expanded="true"] img { transform: rotate(-90deg); }
.upscale-parameter-menu { position: fixed; z-index: 30; display: grid; max-height: 300px; gap: 4px; overflow: auto; padding: 10px; border: 1px solid var(--upscale-line); border-radius: 12px; background: rgb(24 25 25 / 99%); box-shadow: 0 18px 48px rgb(0 0 0 / 50%); scrollbar-color: #4b4d4d transparent; scrollbar-width: thin; }
.upscale-parameter-popover-title { margin: 0 0 3px; color: var(--upscale-muted); font-family: inherit; font-size: 10px; font-weight: 400; line-height: 14px; }
.upscale-parameter-option { display: grid; width: 100%; min-height: 36px; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--upscale-text); cursor: pointer; text-align: left; }
.upscale-parameter-option:hover,
.upscale-parameter-option.is-selected { background: rgb(255 255 255 / 6%); }
.upscale-parameter-check { display: grid; width: 16px; height: 16px; place-items: center; color: var(--upscale-accent); opacity: 0; }
.upscale-parameter-check svg { width: 15px; height: 15px; }
.upscale-parameter-option.is-selected .upscale-parameter-check { opacity: 1; }
.upscale-prompt-control textarea { min-height: 78px; resize: vertical; padding: 10px; font-size: 13px; line-height: 1.35; }
.upscale-prompt-control textarea::placeholder { color: #797d7c; }
.upscale-range-control output { color: var(--upscale-text); font-family: inherit; font-size: 12px; font-weight: 400; }
.upscale-range-control input[type="range"] { width: 100%; margin: 0; accent-color: var(--upscale-accent); cursor: ew-resize; touch-action: pan-y; }
.upscale-toggle-control { min-height: 33px; cursor: pointer; }
.upscale-toggle-control input { width: 34px; height: 18px; margin: 0; accent-color: var(--upscale-accent); }
.upscale-status { margin: 0; color: var(--upscale-muted); font-size: 12px; line-height: 1.4; }

.upscale-submit { display: inline-flex; width: 100%; min-height: 54px; align-items: center; justify-content: center; gap: 6px; margin-top: auto; padding: 0 16px; border: 0.5px solid var(--upscale-accent); border-radius: 13px; background: transparent; color: var(--upscale-text); cursor: pointer; font-size: 13px; font-weight: 400; line-height: 1; white-space: nowrap; box-shadow: none; transition: transform 0.16s ease, filter 0.16s ease; }
.upscale-submit b { min-width: 0; padding: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; }
.upscale-submit:disabled { cursor: not-allowed; opacity: .46; }
.upscale-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.035); }
.upscale-submit:active:not(:disabled) { transform: translateY(0) scale(.99); }
.upscale-model-trigger:focus-visible,
.upscale-model-option:focus-visible,
.upscale-parameter-trigger:focus-visible,
.upscale-parameter-option:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

.upscale-content { min-width: 0; }
.upscale-hero-copy { width: min(760px, 100%); margin: 0 auto 34px; text-align: center; }
.upscale-hero-copy h1 { margin: 0; font-size: clamp(40px, 4.3vw, 64px); font-weight: 400; letter-spacing: -.05em; line-height: .98; }
.upscale-hero-copy p { max-width: 650px; margin: 18px auto 0; color: #a8abab; font-size: 16px; line-height: 1.55; }
.upscale-compare-card { position: relative; height: 750px; overflow: hidden; border: 1px solid var(--upscale-line); border-radius: 22px; background: #0b0c0c; cursor: ew-resize; isolation: isolate; touch-action: none; }
.upscale-compare-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; pointer-events: none; user-select: none; }
.upscale-compare-before { filter: blur(1.25px) saturate(.7) contrast(.86) brightness(.86); transform: scale(1.005); }
.upscale-compare-after { clip-path: inset(0 0 0 var(--upscale-split)); }
.upscale-compare-divider { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--upscale-split); width: 1px; background: rgb(255 255 255 / 82%); }
.upscale-compare-handle { position: absolute; top: 50%; left: 50%; display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; gap: 5px; border: 1px solid rgb(255 255 255 / 24%); border-radius: 50%; background: rgb(35 36 36 / 94%); box-shadow: 0 4px 14px rgb(0 0 0 / 32%); color: transparent; cursor: ew-resize; font-size: 0; transform: translate(-50%, -50%); }
.upscale-compare-handle::before,
.upscale-compare-handle::after { width: 9px; height: 9px; background: url("/static/account-menu/chevron-right.svg") center / contain no-repeat; content: ""; filter: brightness(0) invert(1); }
.upscale-compare-handle::before { transform: rotate(180deg); }
.upscale-compare-label { position: absolute; z-index: 3; top: 22px; padding: 7px 12px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 999px; background: rgb(12 13 13 / 72%); color: #fff; font-size: 12px; }
.upscale-compare-label.is-before { left: 22px; }
.upscale-compare-label.is-after { right: 22px; }
.upscale-compare-handle:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }

.upscale-section { margin-top: 104px; }
.upscale-section-heading { margin-bottom: 26px; }
.upscale-eyebrow { margin: 0 0 10px; color: var(--upscale-accent); font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.upscale-section-heading h2 { margin: 0; font-size: clamp(30px, 3.2vw, 46px); font-weight: 400; letter-spacing: -.045em; line-height: 1.04; }
.upscale-scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.upscale-scenario-card { overflow: hidden; padding: 0; border: 1px solid var(--upscale-line); border-radius: 16px; background: var(--upscale-field); color: var(--upscale-text); cursor: pointer; text-align: left; }
.upscale-scenario-card:hover, .upscale-scenario-card[aria-pressed="true"] { border-color: var(--upscale-accent); }
.upscale-scenario-media { display: block; height: 180px; overflow: hidden; background: #0d0e0e; }
.upscale-scenario-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
.upscale-scenario-card:hover img { transform: scale(1.025); }
.upscale-scenario-copy { display: block; padding: 15px; }
.upscale-scenario-title { display: block; font-size: 15px; }
.upscale-scenario-description { display: block; margin-top: 6px; color: var(--upscale-muted); font-size: 12px; line-height: 1.45; }
.upscale-step-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--upscale-line); border-radius: 16px; background: var(--upscale-line); list-style: none; }
.upscale-step-list li { min-height: 218px; padding: 24px; background: var(--upscale-field); }
.upscale-step-number { color: var(--upscale-accent); font-size: 12px; letter-spacing: .12em; }
.upscale-step-list h3 { margin: 49px 0 9px; font-size: 19px; font-weight: 400; }
.upscale-step-list p { margin: 0; color: var(--upscale-muted); font-size: 13px; line-height: 1.55; }
.upscale-faq { display: grid; grid-template-columns: minmax(200px, .75fr) minmax(0, 1.25fr); gap: 56px; padding-bottom: 28px; }
.upscale-faq-list { border-top: 1px solid var(--upscale-line); }
.upscale-faq details { border-bottom: 1px solid var(--upscale-line); }
.upscale-faq summary { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; font-size: 15px; list-style: none; }
.upscale-faq summary::-webkit-details-marker { display: none; }
.upscale-faq-icon { width: 16px; height: 16px; background: var(--upscale-accent); -webkit-mask: url("/static/account-menu/chevron-right.svg") center / contain no-repeat; mask: url("/static/account-menu/chevron-right.svg") center / contain no-repeat; transform: rotate(90deg); transition: transform 160ms ease; }
.upscale-faq details[open] .upscale-faq-icon { transform: rotate(-90deg); }
.upscale-faq details p { margin: -3px 0 22px; color: var(--upscale-muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 1220px) {
  .upscale-page { grid-template-columns: 350px minmax(0, 1fr); column-gap: 48px; }
  .upscale-compare-card { height: min(750px, 65vw); }
}

@media (max-width: 820px) {
  .upscale-page { display: flex; width: min(100% - 20px, 560px); flex-direction: column; gap: 24px; margin: 0 auto; }
  .upscale-composer-panel { position: relative; top: auto; width: 100%; height: auto; min-height: 0; max-height: none; }
  .upscale-composer { min-height: 620px; }
  .upscale-content { display: contents; }
  .upscale-hero-copy { order: -1; margin: 0 auto; }
  .upscale-compare-card { height: auto; aspect-ratio: 12 / 9; }
  .upscale-section { margin-top: 72px; }
  .upscale-scenario-grid, .upscale-step-list { grid-template-columns: 1fr; }
  .upscale-scenario-media { height: 220px; }
  .upscale-faq { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .upscale-hero-copy h1 { font-size: 38px; }
  .upscale-hero-copy p { font-size: 14px; }
  .upscale-composer { padding: 12px; }
  .upscale-compare-label { top: 12px; }
  .upscale-compare-label.is-before { left: 12px; }
  .upscale-compare-label.is-after { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .upscale-page *, .upscale-page *::before, .upscale-page *::after { scroll-behavior: auto !important; transition: none !important; }
}
