.v2-preview-hero {
  padding-bottom: 48px;
}

.v2-preview-hero .note-question {
  font-size: 1.35rem;
}

.v2-example-section {
  padding-bottom: 48px;
}

.v2-example-disclosure > summary {
  min-height: 56px;
  padding: 18px 24px;
  cursor: pointer;
}

.v2-example-disclosure > summary strong {
  font-size: 1.08rem;
}

.v2-example-disclosure > summary span {
  display: block;
  margin: 3px 0 0 17px;
  color: var(--muted);
  font-size: 0.92rem;
}

.v2-example-disclosure > summary:focus-visible {
  outline: 3px solid var(--forest-dark);
  outline-offset: 4px;
}

.v2-example-disclosure[open] > summary {
  border-bottom: 2px solid var(--ink);
}

.v2-example-body {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 3vw, 32px);
}

.v2-example-body h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  letter-spacing: -0.035em;
}

.v2-example-caution,
.v2-example-interpretation {
  max-width: 760px;
  margin: 0;
  line-height: 1.55;
}

.v2-example-caution {
  color: var(--muted);
  font-size: 0.94rem;
}

.v2-example-deadline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 0;
}

.v2-example-deadline span {
  color: var(--muted);
}

.v2-example-legend {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.v2-example-timing {
  min-width: 0;
}

.v2-example-timing .v2-timeline-scale {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
}

.v2-example-deadline-line {
  left: 100%;
}

.v2-example-marker-a {
  left: 16.6667%;
}

.v2-example-marker-b {
  left: 58.3333%;
}

.v2-example-body > .button {
  justify-self: start;
}

.v2-example-section + .search-section {
  padding-top: 26px;
}

@media (max-width: 560px) {
  .v2-example-timing {
    order: 2;
  }

  .v2-example-disclosure > summary {
    padding: 16px 18px;
  }

  .v2-example-disclosure > summary span {
    margin-left: 0;
  }

  .v2-example-section {
    padding-bottom: 36px;
  }
}

.v2-inline-actions {
  display: flex;
  justify-content: flex-start;
  margin: 12px 0 28px;
}

.v2-candidate-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 12px;
}

.v2-candidate-heading strong {
  font-size: 1.05rem;
}

.v2-candidate-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

.v2-candidate-rows {
  display: grid;
  gap: 12px;
}

.v2-candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 2px solid var(--ink);
  background: var(--stone);
}

.v2-candidate-row .field {
  min-width: 0;
}

.v2-candidate-row input[type="text"] {
  min-height: 52px;
}

.v2-remove-button {
  min-width: 96px;
}

.v2-remove-button:disabled,
.v2-add-flight:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.v2-add-flight {
  margin-top: 14px;
}

.v2-date-overrides {
  margin-top: 24px;
}

#freeform-candidates {
  width: 100%;
  padding: 12px 14px;
  border: var(--border);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

#freeform-candidates:focus-visible {
  outline: 4px solid var(--forest-dark);
  outline-offset: 3px;
}

.v2-date-override-list {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.v2-date-override-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.65fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: var(--stone);
}

.v2-date-override-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.v2-date-override-row label {
  display: grid;
  gap: 6px;
  font-weight: 850;
}

.v2-date-override-row label span {
  color: var(--muted);
  font-size: 0.84rem;
}

.v2-review-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v2-review-grid strong {
  overflow-wrap: anywhere;
}

.v2-status {
  min-height: 26px;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 750;
}

.v2-errors:not(:empty) {
  display: block;
  margin-top: 12px;
}

.v2-errors:empty {
  display: none;
}

.v2-errors ul {
  margin: 0;
  padding-left: 22px;
}

#v2-search-card,
#candidate-review {
  scroll-margin-top: 88px;
  overflow-anchor: none;
}

.v2-review {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 36px);
}

.v2-review h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.v2-review-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.v2-review-list li {
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: var(--forest-soft);
  font-weight: 850;
}

@media (max-width: 760px) {
  .v2-candidate-row,
  .v2-date-override-row,
  .v2-review-grid {
    grid-template-columns: 1fr;
  }

  .v2-remove-button {
    justify-self: start;
  }

  .v2-candidate-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

@media (forced-colors: active) {
  .v2-candidate-row,
  .v2-date-override-row,
  .v2-review-list li {
    box-shadow: none;
  }
}


/* Keep the action row aligned for normal compact steps without creating a
   second scroll surface. The existing guided layout uses margin-top:auto on
   .step-actions, so a shared minimum height keeps the controls steady while
   still allowing Flights or expanded date overrides to grow naturally. */
#candidate-form {
  --guided-step-height: 340px;
}

#candidate-form .form-step.is-active {
  height: auto;
  overflow: visible;
}

#candidate-form .form-step .step-actions {
  position: static;
  margin-top: auto;
  padding-top: 22px;
  padding-bottom: 0;
  background: transparent;
}

.v2-date-override-list {
  max-height: none;
  overflow: visible;
}

.v2-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

@media (max-width: 640px) {
  #candidate-form {
    --guided-step-height: 320px;
  }
}


/* Keep the normal Flights state close to the other three wizard steps. */
.v2-paste-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.v2-paste-row .button {
  min-height: 52px;
}

#freeform-candidates {
  min-height: 72px;
}

.v2-candidate-row {
  padding: 9px 10px;
  gap: 10px;
}

.v2-candidate-row input[type="text"] {
  min-height: 44px;
}

.v2-candidate-rows {
  gap: 8px;
}

.v2-add-flight {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .v2-paste-row {
    grid-template-columns: 1fr;
  }

  .v2-paste-row .button {
    justify-self: start;
  }
}


/* Step 1 has one optional helper and one authoritative editable list. */
.v2-quick-add,
.v2-flight-list-block {
  border: 2px solid var(--ink);
}

.v2-quick-add {
  margin-top: 16px;
  padding: 13px;
  background: var(--stone);
}

.v2-flight-list-block {
  margin-top: 16px;
  padding: 13px;
  background: var(--paper);
}

.v2-block-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.v2-block-heading > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-block-heading strong {
  font-size: 1rem;
}

.v2-block-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.v2-block-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.v2-flight-field-wrap {
  min-width: 0;
}

.v2-row-title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v2-candidate-row .visually-hidden,
.v2-quick-add .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Keep disclosure affordances attached to the text they control. */
.v2-date-overrides summary {
  justify-content: flex-start;
  width: fit-content;
}

.v2-date-overrides summary::after {
  margin-left: 8px;
}

@media (max-width: 640px) {
  .v2-quick-add,
  .v2-flight-list-block {
    padding: 11px;
  }
}


.v2-nonstop-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--forest);
  background: var(--forest-soft);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.v2-nonstop-note strong {
  color: var(--ink);
}

.notice-box > p {
  margin: 0;
}

.notice-box > p + p {
  margin-top: 12px;
}

.v2-review-limit {
  padding: 10px 12px;
  border-left: 4px solid var(--forest);
  background: var(--forest-soft);
}

/* Integrated V2 comparison result. */
.v2-result-issues {
  margin: 20px 0 0;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  background: var(--stone);
}

.v2-result-issues strong {
  display: block;
  margin-bottom: 7px;
}

.v2-result-issues ul {
  margin: 0;
  padding-left: 20px;
}

.v2-comparison-panel {
  display: grid;
  gap: 34px;
  margin-top: 26px;
}

.v2-timeline-section,
.v2-detail-section {
  display: grid;
  gap: 18px;
}

.v2-result-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.v2-result-heading h4 {
  margin: 3px 0 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.v2-deadline-callout {
  display: grid;
  gap: 3px;
  text-align: right;
}

.v2-deadline-callout span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.v2-deadline-callout strong {
  font-size: 1rem;
}

.v2-arrival-timeline {
  --v2-timeline-columns: minmax(130px, 0.8fr) minmax(260px, 2fr) minmax(95px, 0.55fr);
  --v2-timeline-gap: 18px;
  padding: 20px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.v2-timeline-rows {
  display: grid;
  gap: 16px;
}

.v2-timeline-row {
  display: grid;
  grid-template-columns: var(--v2-timeline-columns);
  gap: var(--v2-timeline-gap);
  align-items: center;
}

.v2-timeline-identity {
  display: grid;
  gap: 3px;
  align-content: center;
}

.v2-timeline-identity strong {
  font-size: 1.05rem;
}

.v2-timeline-identity small {
  color: var(--muted);
  font-size: 0.86rem;
}

.v2-tradeoff-badge,
.v2-result-status-badge {
  display: inline-block;
  width: fit-content;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  padding: 5px 7px;
}

.v2-tradeoff-badge {
  margin-top: 2px;
}

.v2-tradeoff-badge.is-tradeoff,
.v2-result-status-badge.is-tradeoff {
  background: var(--forest-dark);
  color: var(--paper);
}

.v2-timeline-track {
  position: relative;
  height: 32px;
  background: var(--forest-soft);
}

.v2-timeline-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 15px;
  border-top: 2px solid var(--ink);
}

.v2-timeline-deadline-line {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 3px;
  background: var(--ink);
  transform: translateX(-50%);
  z-index: 1;
}

.v2-timeline-marker {
  position: absolute;
  top: 8px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  background: var(--paper);
  transform: translateX(-50%) rotate(45deg);
  z-index: 2;
}

.v2-timeline-marker.is-tradeoff {
  background: var(--forest);
}

.v2-timeline-reliability {
  display: grid;
  gap: 2px;
  text-align: right;
}

.v2-timeline-reliability strong {
  color: var(--forest-dark);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1;
}

.v2-timeline-reliability span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.v2-timeline-scale {
  display: grid;
  grid-template-columns: var(--v2-timeline-columns);
  column-gap: var(--v2-timeline-gap);
  justify-content: space-between;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.v2-timeline-scale > span {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
}

.v2-timeline-scale > span:last-child {
  justify-self: end;
}

.v2-timeline-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.v2-tradeoff-summary {
  padding: 18px 20px;
  background: var(--forest-soft);
}

.v2-tradeoff-summary h4 {
  margin: 3px 0 8px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -0.025em;
}

.v2-tradeoff-summary p:last-child {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

.v2-detail-table-wrap {
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.v2-detail-table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
}

.v2-detail-table th,
.v2-detail-table td {
  padding: 11px 14px;
  border-bottom: 2px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

.v2-detail-table thead th {
  background: var(--forest-dark);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
}

.v2-detail-table tbody tr:last-child th,
.v2-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.v2-detail-table tbody th {
  min-width: 150px;
}

.v2-detail-table tbody th strong,
.v2-detail-table td {
  font-size: 0.95rem;
}

.v2-detail-table tbody th small,
.v2-detail-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.v2-result-status-badge + small {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .v2-result-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .v2-deadline-callout {
    text-align: left;
  }

  .v2-arrival-timeline {
    --v2-timeline-columns: minmax(100px, 0.85fr) minmax(150px, 1.5fr) minmax(80px, 0.55fr);
    --v2-timeline-gap: 10px;
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .v2-detail-table-wrap {
    overflow-x: visible;
  }

  .v2-detail-table {
    min-width: 0;
  }

  .v2-detail-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .v2-detail-table,
  .v2-detail-table tbody,
  .v2-detail-table tr,
  .v2-detail-table th,
  .v2-detail-table td {
    display: block;
    width: 100%;
  }

  .v2-detail-table tbody tr {
    padding: 14px 16px;
    border-bottom: 2px solid var(--ink);
  }

  .v2-detail-table tbody tr:last-child {
    border-bottom: 0;
  }

  .v2-detail-table tbody th,
  .v2-detail-table tbody td {
    padding: 5px 0;
    border: 0;
  }

  .v2-detail-table tbody th {
    margin-bottom: 6px;
  }

  .v2-detail-table tbody td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .v2-timeline-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ink);
  }

  .v2-timeline-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .v2-timeline-track {
    order: 2;
  }

  .v2-timeline-reliability {
    order: 3;
    text-align: left;
  }

  .v2-timeline-scale {
    display: none;
  }
}


.v2-cirium-attribution {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.v2-cirium-attribution a {
  display: inline-block;
  margin-left: 4px;
  color: var(--ink);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}


/* Optional comparison-credit / checkout surface. Hidden unless monetization is enabled. */
.v2-credit-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 22px;
  align-items: center;
  margin: 0 0 20px;
  padding: 16px 18px;
  background: var(--forest-soft);
}

.v2-credit-panel[hidden] {
  display: none;
}

.v2-credit-panel h3 {
  margin: 2px 0 5px;
  font-size: 1.15rem;
}

.v2-credit-panel p {
  margin: 0;
}

.v2-credit-status {
  color: var(--muted);
}

.v2-pack-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.v2-pack-button {
  white-space: nowrap;
}

.v2-credit-note,
.v2-checkout-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.v2-credit-note {
  padding-top: 8px;
  border-top: 1px solid var(--ink);
}

.v2-checkout-status:empty {
  display: none;
}

.v2-account-panel {
  grid-column: 1 / -1;
  border-top: 1px solid var(--ink);
  padding-top: 12px;
}
.v2-account-panel [hidden] {
  display: none !important;
}
.v2-account-panel form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}
.v2-account-panel .field {
  flex: 1 1 230px;
}
.v2-account-panel #v2-account-message:not(:empty) {
  margin-top: 10px;
}
.v2-account-panel #v2-account-logout {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .v2-credit-panel {
    grid-template-columns: 1fr;
  }

  .v2-pack-options {
    justify-content: flex-start;
  }
}
