/* Compare-only City composition. Sky and coral identify the two sides; they
   never encode winner, quality, or recommendation status. */

:root[data-style="city"] .compare-page {
  --city-compare-coral: #ef765f;
  --city-compare-sky: #62bce8;
  --city-compare-accent-ink: #20263a;
  --city-compare-field: color-mix(in srgb, var(--color-secondary) 12%, var(--color-surface));
  --city-compare-side-a: color-mix(in srgb, var(--city-compare-sky) 24%, var(--color-surface));
  --city-compare-side-b: color-mix(in srgb, var(--city-compare-coral) 20%, var(--color-surface));
  background: var(--color-surface);
  min-width: 0;
}

:root[data-style="city"] .compare-page .compare-picker-stage {
  background: var(--city-compare-field);
  overflow: clip;
  padding-block: clamp(2.5rem, 5vw, 5rem);
  position: relative;
}

:root[data-style="city"] .compare-page .compare-picker-shell {
  min-width: 0;
  position: relative;
  z-index: 1;
}

:root[data-style="city"] .compare-page .compare-picker-hero,
:root[data-style="city"] .compare-page .compare-hero-intro {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  box-shadow: var(--fp-hard-shadow);
  box-sizing: border-box;
  padding: clamp(1.25rem, 4vw, 2rem);
}

:root[data-style="city"] .compare-page .compare-picker-hero h1,
:root[data-style="city"] .compare-page .compare-hero-intro h1 {
  letter-spacing: -.025em;
}

:root[data-style="city"] .compare-page .compare-picker-grid,
:root[data-style="city"] .compare-page .compare-hero-grid {
  min-width: 0;
}

:root[data-style="city"] .compare-page .compare-slot {
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--fp-ink) 18%, transparent);
  box-sizing: border-box;
  min-width: 0;
  padding-top: 1.25rem;
  position: relative;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

:root[data-style="city"] .compare-page .compare-slot::before {
  background: var(--city-compare-sky);
  border: var(--fp-outline-width) solid var(--fp-ink);
  box-sizing: border-box;
  content: "";
  height: 16px;
  left: 14px;
  position: absolute;
  top: 14px;
  width: 16px;
}

:root[data-style="city"] .compare-page .compare-slot[data-compare-side="b"]::before {
  background: var(--city-compare-coral);
}

:root[data-style="city"] .compare-page .compare-slot[data-compare-side="a"][data-slot-state="empty"] {
  background: var(--city-compare-side-a);
}

:root[data-style="city"] .compare-page .compare-slot[data-compare-side="b"][data-slot-state="empty"] {
  background: var(--city-compare-side-b);
}

:root[data-style="city"] .compare-page .compare-slot[data-slot-state="filled"] {
  background: var(--color-surface-container-lowest);
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--fp-ink) 24%, transparent);
}

:root[data-style="city"] .compare-page .compare-slot[data-emphasized="true"] {
  box-shadow: 6px 7px 0 color-mix(in srgb, var(--city-compare-coral) 46%, var(--fp-ink));
}

:root[data-style="city"] .compare-page .compare-slot-label {
  color: var(--color-on-surface);
  font-weight: 700;
  padding-left: 1.5rem;
}

:root[data-style="city"] .compare-page .compare-slot-pick {
  color: var(--color-on-surface);
}

:root[data-style="city"] .compare-page .compare-slot-add {
  background: var(--color-tertiary);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  box-shadow: 2px 3px 0 color-mix(in srgb, var(--fp-ink) 22%, transparent);
  color: var(--city-compare-accent-ink);
}

:root[data-style="city"] .compare-page .compare-slot-media {
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  box-shadow: 2px 3px 0 color-mix(in srgb, var(--fp-ink) 16%, transparent);
}

:root[data-style="city"] .compare-page .compare-slot-change,
:root[data-style="city"] .compare-page .compare-slot-remove {
  color: var(--color-on-surface);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

:root[data-style="city"] .compare-page .compare-vs-token {
  background: var(--color-tertiary);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--fp-ink) 25%, transparent);
  color: var(--city-compare-accent-ink);
  font-weight: 800;
  rotate: -3deg;
}

:root[data-style="city"] .compare-page .compare-picker-submit {
  position: relative;
  z-index: 2;
}

:root[data-style="city"] .compare-page .compare-suggestions-heading span {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  color: var(--color-on-surface);
  display: inline-block;
  font-weight: 700;
  padding: .375rem .75rem;
}

:root[data-style="city"] .compare-page .compare-matchup-card,
:root[data-style="city"] .compare-page .compare-quick-pick {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--fp-ink) 17%, transparent);
  color: var(--color-on-surface);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

:root[data-style="city"] .compare-page .compare-matchup-card:nth-child(odd),
:root[data-style="city"] .compare-page .compare-quick-pick:nth-child(odd) {
  background: var(--city-compare-side-a);
}

:root[data-style="city"] .compare-page .compare-matchup-card:nth-child(even),
:root[data-style="city"] .compare-page .compare-quick-pick:nth-child(even) {
  background: var(--city-compare-side-b);
}

:root[data-style="city"] .compare-page .compare-finder-cta {
  background: var(--city-compare-coral);
  color: var(--city-compare-accent-ink);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

:root[data-style="city"] .compare-page .compare-finder-cta-panel {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  box-shadow: 6px 7px 0 color-mix(in srgb, var(--fp-ink) 25%, transparent);
  color: var(--color-on-surface);
  max-width: 34rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  rotate: -1deg;
}

:root[data-style="city"] .compare-page .compare-hero {
  background: linear-gradient(
    90deg,
    var(--city-compare-sky) 0 50%,
    var(--city-compare-coral) 50% 100%
  );
  overflow: clip;
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

:root[data-style="city"] .compare-page .compare-hero-shell,
:root[data-style="city"] .compare-page .compare-hero-board,
:root[data-style="city"] .compare-page .compare-hero-card {
  min-width: 0;
}

:root[data-style="city"] .compare-page .compare-hero-card {
  --phone-card-rest-shadow: 4px 5px 0 color-mix(in srgb, var(--fp-ink) 22%, transparent);
  --phone-card-hover-shadow: 6px 7px 0 color-mix(in srgb, var(--fp-ink) 28%, transparent);
}

:root[data-style="city"] .compare-page .compare-hero-card-surface {
  background: var(--color-surface-container-lowest);
  border-radius: 0;
  min-width: 0;
}

:root[data-style="city"] .compare-page .compare-hero-card[data-compare-side="a"] .compare-hero-card-media {
  background: var(--city-compare-side-a);
}

:root[data-style="city"] .compare-page .compare-hero-card[data-compare-side="b"] .compare-hero-card-media {
  background: var(--city-compare-side-b);
}

:root[data-style="city"] .compare-page .compare-hero-card-action {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  box-shadow: 2px 3px 0 color-mix(in srgb, var(--fp-ink) 20%, transparent);
  padding-inline: .5rem;
}

:root[data-style="city"] .compare-page .compare-change-phone {
  color: var(--color-on-surface);
  font-weight: 700;
  white-space: nowrap;
}

:root[data-style="city"] .compare-page .compare-camera-note {
  background: color-mix(in srgb, var(--color-tertiary) 45%, var(--color-surface));
  border-block: var(--fp-outline-width) solid var(--fp-ink);
}

:root[data-style="city"] .compare-page .compare-camera-note-panel {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--fp-ink) 18%, transparent);
  max-width: 54rem;
  padding: 1rem 1.25rem;
}

:root[data-style="city"] .compare-page .compare-differences {
  background: var(--city-compare-field);
  border-bottom: var(--fp-outline-width) solid var(--fp-ink);
}

:root[data-style="city"] .compare-page .compare-section-heading h2 {
  letter-spacing: -.02em;
}

:root[data-style="city"] .compare-page .compare-difference-card {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--fp-ink) 17%, transparent);
  min-width: 0;
  position: relative;
}

:root[data-style="city"] .compare-page .compare-difference-winner {
  background: var(--color-secondary);
  border: 1px solid var(--fp-ink);
  color: var(--color-on-secondary);
  padding: .1875rem .4375rem;
}

:root[data-style="city"] .compare-page .compare-specs {
  background: var(--color-surface);
}

:root[data-style="city"] .compare-page .compare-specs > div {
  max-width: 70rem;
}

:root[data-style="city"] .compare-page .compare-spec-scroll {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--fp-ink) 20%, transparent);
  box-sizing: border-box;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--color-secondary) var(--color-surface-container-low);
  scrollbar-width: thin;
}

:root[data-style="city"] .compare-page .compare-spec-columns,
:root[data-style="city"] .compare-page .compare-spec-ledger {
  min-width: 42rem;
}

:root[data-style="city"] .compare-page .compare-spec-column-head {
  border-left: var(--fp-outline-width) solid var(--fp-ink);
  box-shadow: none;
  padding: 1rem .75rem;
}

:root[data-style="city"] .compare-page .compare-spec-columns {
  background: var(--color-surface-container-low);
  border-bottom: var(--fp-outline-width) solid var(--fp-ink);
  gap: 0;
  padding: 0;
}

:root[data-style="city"] .compare-page .compare-spec-column-head[data-compare-side="a"] {
  background: var(--city-compare-side-a);
}

:root[data-style="city"] .compare-page .compare-spec-column-head[data-compare-side="b"] {
  background: var(--city-compare-side-b);
}

:root[data-style="city"] .compare-page .compare-spec-ledger {
  background: var(--color-surface-container-lowest);
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  box-shadow: none;
  padding: 0;
}

:root[data-style="city"] .compare-page .compare-spec-category {
  background: var(--color-primary);
  border-top: var(--fp-outline-width) solid var(--fp-ink);
  color: var(--color-on-primary);
  margin-top: 0;
  padding: .5rem .75rem;
}

:root[data-style="city"] .compare-page .compare-spec-category:first-child {
  border-top: 0;
}

:root[data-style="city"] .compare-page .compare-spec-row {
  align-items: stretch;
  border-bottom: 1px solid color-mix(in srgb, var(--fp-ink) 20%, transparent);
  border-radius: 0;
  font-variant-numeric: tabular-nums;
  gap: 0;
  min-width: 0;
  padding: 0;
}

:root[data-style="city"] .compare-page .compare-spec-row:last-child {
  border-bottom: 0;
}

:root[data-style="city"] .compare-page .compare-spec-row:nth-of-type(odd) {
  background: var(--color-surface-container-low);
}

:root[data-style="city"] .compare-page .compare-spec-label,
:root[data-style="city"] .compare-page .compare-spec-value {
  align-items: center;
  display: flex;
  overflow-wrap: anywhere;
  padding: .6875rem .75rem;
}

:root[data-style="city"] .compare-page .compare-spec-value {
  border-left: 1px solid color-mix(in srgb, var(--fp-ink) 18%, transparent);
  justify-content: center;
}

:root[data-style="city"] .compare-page .compare-spec-source {
  max-width: 72ch;
}

:root[data-style="city"] .compare-page .compare-alternatives {
  background: var(--city-compare-field);
  border-top: var(--fp-outline-width) solid var(--fp-ink);
}

:root[data-style="city"] .compare-page .compare-results-state {
  background: var(--city-compare-field);
  display: grid;
  min-height: 28rem;
  place-items: center;
}

:root[data-style="city"] .compare-page .compare-results-state-panel {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  box-shadow: var(--fp-hard-shadow);
  box-sizing: border-box;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  width: 100%;
}

:root[data-style="city"] .compare-page .compare-results-error .compare-results-state-panel {
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--color-error) 35%, var(--fp-ink));
}

:root[data-style="city"] .compare-page .compare-results-retry {
  background: var(--color-secondary);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--fp-ink) 22%, transparent);
  color: var(--color-on-secondary);
}

@media (hover: hover) and (pointer: fine) {
  :root[data-style="city"] .compare-page .compare-slot[data-slot-state="empty"]:has(.compare-slot-pick:hover),
  :root[data-style="city"] .compare-page .compare-slot[data-slot-state="empty"]:has(.compare-slot-pick:focus-visible),
  :root[data-style="city"] .compare-page .compare-matchup-card:hover,
  :root[data-style="city"] .compare-page .compare-matchup-card:focus-visible,
  :root[data-style="city"] .compare-page .compare-quick-pick:hover,
  :root[data-style="city"] .compare-page .compare-quick-pick:focus-visible {
    box-shadow: 6px 7px 0 color-mix(in srgb, var(--fp-ink) 25%, transparent);
    transform: translate(-1px, -2px);
  }

  :root[data-style="city"] .compare-page .compare-results-retry:hover,
  :root[data-style="city"] .compare-page .compare-results-retry:focus-visible {
    box-shadow: 5px 6px 0 color-mix(in srgb, var(--fp-ink) 27%, transparent);
    transform: translate(-1px, -1px);
  }
}

@media (max-width: 767.98px) {
  :root[data-style="city"] .compare-page .compare-picker-stage,
  :root[data-style="city"] .compare-page .compare-hero,
  :root[data-style="city"] .compare-page .compare-camera-note,
  :root[data-style="city"] .compare-page .compare-differences,
  :root[data-style="city"] .compare-page .compare-specs,
  :root[data-style="city"] .compare-page .compare-alternatives,
  :root[data-style="city"] .compare-page .compare-results-state {
    padding-inline: 1rem;
  }

  :root[data-style="city"] .compare-page .compare-picker-hero,
  :root[data-style="city"] .compare-page .compare-hero-intro {
    box-shadow: 3px 4px 0 color-mix(in srgb, var(--fp-ink) 20%, transparent);
    padding: 1.25rem;
  }

  :root[data-style="city"] .compare-page .compare-slot {
    min-height: 12rem;
  }

  :root[data-style="city"] .compare-page .compare-finder-cta-panel {
    rotate: none;
  }

  :root[data-style="city"] .compare-page .compare-hero-grid {
    gap: .5rem;
  }

  :root[data-style="city"] .compare-page .compare-hero-card-body {
    padding: .75rem;
  }

  :root[data-style="city"] .compare-page .compare-hero-card-body h2 {
    font-size: 1.125rem;
    overflow-wrap: anywhere;
  }

  :root[data-style="city"] .compare-page .compare-hero-card-body p {
    font-size: .8125rem;
    overflow-wrap: anywhere;
  }

  :root[data-style="city"] .compare-page .compare-hero-card-action {
    max-width: calc(100% - 1rem);
    padding-inline: .375rem;
  }

  :root[data-style="city"] .compare-page .compare-change-phone {
    font-size: .75rem;
  }

  :root[data-style="city"] .compare-page .compare-camera-note-panel {
    align-items: flex-start;
    text-align: left;
  }

  :root[data-style="city"] .compare-page .compare-difference-card {
    padding: 1.25rem;
  }

  :root[data-style="city"] .compare-page .compare-spec-scroll {
    margin-right: -1rem;
  }

  :root[data-style="city"] .compare-page .compare-spec-columns,
  :root[data-style="city"] .compare-page .compare-spec-row {
    grid-template-columns: 7rem 11rem 11rem;
  }

  :root[data-style="city"] .compare-page .compare-spec-columns,
  :root[data-style="city"] .compare-page .compare-spec-ledger {
    min-width: 30.5rem;
  }

  :root[data-style="city"] .compare-page .compare-spec-corner,
  :root[data-style="city"] .compare-page .compare-spec-label {
    background: var(--color-surface-container-lowest);
    left: 0;
    position: sticky;
    z-index: 2;
  }

  :root[data-style="city"] .compare-page .compare-spec-row:nth-of-type(odd) .compare-spec-label {
    background: var(--color-surface-container-low);
  }
}

@media (min-width: 768px) {
  :root[data-style="city"] .compare-page .compare-spec-columns,
  :root[data-style="city"] .compare-page .compare-spec-ledger {
    min-width: 0;
  }
}

@media (prefers-color-scheme: dark) {
  :root[data-style="city"] .compare-page {
    --city-compare-coral: #ff8a78;
    --city-compare-sky: #69c7ef;
    --city-compare-accent-ink: #10182a;
    --city-compare-field: color-mix(in srgb, var(--color-secondary) 20%, var(--color-surface));
    --city-compare-side-a: color-mix(in srgb, var(--city-compare-sky) 18%, var(--color-surface));
    --city-compare-side-b: color-mix(in srgb, var(--city-compare-coral) 16%, var(--color-surface));
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-style="city"] .compare-page .compare-slot,
  :root[data-style="city"] .compare-page .compare-matchup-card,
  :root[data-style="city"] .compare-page .compare-quick-pick,
  :root[data-style="city"] .compare-page .compare-results-retry {
    transition: none;
  }

  :root[data-style="city"] .compare-page .compare-vs-token,
  :root[data-style="city"] .compare-page .compare-finder-cta-panel {
    rotate: none;
  }

  :root[data-style="city"] .compare-page .compare-slot[data-slot-state="empty"]:has(.compare-slot-pick:hover),
  :root[data-style="city"] .compare-page .compare-slot[data-slot-state="empty"]:has(.compare-slot-pick:focus-visible),
  :root[data-style="city"] .compare-page .compare-matchup-card:hover,
  :root[data-style="city"] .compare-page .compare-matchup-card:focus-visible,
  :root[data-style="city"] .compare-page .compare-quick-pick:hover,
  :root[data-style="city"] .compare-page .compare-quick-pick:focus-visible,
  :root[data-style="city"] .compare-page .compare-results-retry:hover,
  :root[data-style="city"] .compare-page .compare-results-retry:focus-visible {
    transform: none;
  }
}
