/* Server-rendered deal listing pages */

.listing-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.listing-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}

.listing-crumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.listing-crumbs a:hover {
  color: var(--accent-green, var(--green));
}

.listing-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 12px);
  padding: 1.35rem 1.35rem 1.5rem;
}

.listing-header {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.listing-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.listing-initials {
  display: none;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.listing-avatar.has-fallback .listing-initials {
  display: inline;
}

.listing-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0 0 0.35rem;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.listing-checked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.listing-checked-ok,
.listing-checked-warn,
.listing-checked-dead,
.listing-checked-muted {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.listing-checked-ok {
  color: var(--accent-green, var(--green));
}

.listing-checked-warn,
.listing-checked-dead,
.listing-checked-muted {
  color: var(--text-secondary);
}

.listing-intel-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.listing-payout {
  margin-bottom: 1.15rem;
}

.terms-history {
  margin: -0.35rem 0 1.15rem;
}

.terms-history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  list-style: none;
}

.terms-history-toggle::-webkit-details-marker {
  display: none;
}

.terms-history-toggle:hover,
.terms-history-toggle:focus-visible {
  color: var(--text-secondary);
}

.terms-history-lead {
  margin: 0.65rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.terms-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.terms-history-list li {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border-light);
}

.terms-history-list li:last-child {
  border-bottom: 0;
}

.terms-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.terms-history-event {
  font-weight: 700;
  color: var(--text-secondary);
}

.terms-history-payout {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.terms-history-specs {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.listing-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1.25rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.listing-specs div {
  margin: 0;
}

.listing-specs dt {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.listing-specs dt a,
.listing-spec-guide {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.listing-specs dt a:hover,
.listing-spec-guide:hover {
  color: var(--green, #059669);
  text-decoration: none;
}

.listing-specs dd {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.listing-verdict {
  margin: -0.35rem 0 0.75rem;
}

.listing-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
}

.listing-type-explainer {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin: 0 0 0.85rem;
  max-width: 42rem;
}

.listing-type-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: -0.15rem 0 0.85rem;
}

.listing-callout {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.15rem;
  line-height: 1.5;
}

.listing-callout p + p {
  margin-top: 0.45rem;
}

.listing-callout-green {
  border-left: 3px solid var(--accent-green, var(--green));
}

.listing-callout-amber {
  border-left: 3px solid var(--accent-amber, #f59e0b);
}

.listing-warn-title {
  color: var(--accent-amber, #f59e0b);
}

.listing-header-text {
  flex: 1;
  min-width: 0;
}

.listing-header-cta {
  flex-shrink: 0;
  align-self: center;
}

.listing-audience-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.listing-audience-switch a {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  text-decoration: none;
}

.listing-audience-switch a:hover {
  color: var(--text-primary);
}

.listing-audience-switch a[aria-current="page"] {
  color: var(--accent-green, var(--green));
  border-color: var(--green-border, rgba(16, 185, 129, 0.25));
}

.listing-footnote {
  margin: 1.15rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.listing-other-audience {
  margin: 1.25rem 0 0;
}

.listing-actions {
  padding-right: 0;
}

.listing-related {
  margin-top: 1.75rem;
}

.listing-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.listing-related li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.listing-program-list {
  margin-top: 1.25rem;
}

.listing-program-list .modal-section-title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.listing-program-count {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-muted);
}

.listing-program-list li {
  padding: 0.4rem 0.85rem;
}

.listing-program-more {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}

.listing-program-more a {
  color: var(--accent-green, var(--green));
  font-weight: 600;
  text-decoration: none;
}

.listing-program-more a:hover {
  text-decoration: underline;
}

.listing-related li:last-child {
  border-bottom: none;
}

.listing-related a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}

.listing-related a:hover {
  color: var(--accent-green, var(--green));
}

.listing-related span {
  color: var(--text-muted);
  white-space: nowrap;
}

.listing-same-brand-cta {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.listing-same-brand-cta a {
  color: var(--accent-green, var(--green));
  font-weight: 600;
  text-decoration: none;
}

.listing-same-brand-cta a:hover {
  text-decoration: underline;
}

.compare-scroll {
  overflow-x: auto;
  margin-top: 1.15rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 480px;
}

.compare-table th,
.compare-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.compare-table thead th {
  background: var(--bg-subtle);
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  width: 8.5rem;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table thead a {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
}

.compare-table thead a:hover {
  color: var(--accent-green, var(--green));
}

.compare-network {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.compare-table .listing-affiliate-note {
  margin-top: 0.45rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.listing-wrap-wide {
  max-width: 960px;
}

.listing-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-green, var(--green));
  margin: 0 0 0.4rem;
}

.listing-program-list span {
  white-space: normal;
  text-align: right;
}

.niche-tab {
  text-decoration: none;
}

@media (max-width: 600px) {
  .listing-specs {
    grid-template-columns: 1fr;
  }

  .listing-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .listing-header-cta {
    width: 100%;
  }

  .listing-header-cta .btn {
    width: 100%;
    text-align: center;
  }
}

.listing-affiliate-note {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Phase 7 — What's new / changelog */
.listing-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75rem 0 0.4rem;
  color: var(--text-primary);
}

.changelog-section-lead {
  margin-bottom: 0.75rem;
}

.changelog-empty {
  margin-top: 1rem;
}

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card, var(--bg-surface));
}

.changelog-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.changelog-row:last-child {
  border-bottom: none;
}

.changelog-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.changelog-brand {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.changelog-brand:hover {
  color: var(--accent-green, var(--green));
}

.changelog-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.changelog-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.changelog-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 0.18rem 0.55rem;
  font-size: 0.725rem;
  font-weight: 600;
}

.changelog-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .changelog-row {
    flex-direction: column;
    gap: 0.45rem;
  }

  .changelog-row-side {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
}

.digest-signup {
  position: relative;
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.digest-signup-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.digest-signup-lead {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.digest-signup-note {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.digest-signup-note a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.digest-signup-note a:hover {
  color: var(--accent-green);
}

.digest-signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
}

.digest-signup-topics {
  flex: 1 1 100%;
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.digest-signup-topics legend {
  padding: 0;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.digest-signup-check {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.digest-signup-check input {
  margin-top: 0.2rem;
  accent-color: var(--accent-green, #10b981);
}

.digest-signup-hint {
  flex: 1 1 100%;
  margin: 0 0 0 1.35rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
}

.digest-signup-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 12rem;
  flex: 1;
}

.digest-signup-field input,
.digest-signup-field select {
  font: inherit;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
}

.digest-signup-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.digest-signup-status {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.digest-signup-status.is-error {
  color: var(--accent-rose, #f43f5e);
}

.site-feedback {
  position: relative;
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.site-feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
}

.site-feedback-fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

.site-feedback-fieldset legend {
  padding: 0;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.site-feedback-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.site-feedback-option input {
  margin-top: 0.2rem;
  accent-color: var(--accent-green, #10b981);
}

.site-feedback-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.site-feedback-field textarea,
.site-feedback-field input[type="email"] {
  font: inherit;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
}

.site-feedback-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.site-feedback-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-feedback-status {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.site-feedback-status.is-error {
  color: var(--accent-rose, #f43f5e);
}

.digest-signup-modal-content {
  max-width: 32rem;
  padding: 1.5rem 1.4rem 1.35rem;
}

.modal-content .digest-signup {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.listing-preview-banner {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.45;
}
