/* PHXDriven Deals — uses the portal's colour tokens (--phx-*) */
.phxd-intro { margin: -6px 0 14px; }
.phx-portal .phx-chips { margin-bottom: 18px; }

.phxd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.phxd-card { background: var(--phx-panel); border: 1px solid var(--phx-line); border-radius: var(--phx-r); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 120px; }
.phxd-card:target { border-color: var(--phx-accent); box-shadow: 0 0 0 2px rgba(250, 137, 50, .35); }
.phxd-card__img { aspect-ratio: 16 / 9; background: var(--phx-panel-2); }
.phx-portal .phxd-card__img img { width: 100%; height: 100%; object-fit: cover; }
.phxd-card__body { padding: 16px; display: grid; gap: 10px; align-content: start; flex: 1; }
.phxd-card__partner { display: flex; align-items: center; gap: 10px; }
.phxd-card__partner > span:last-child { display: grid; line-height: 1.25; }
.phxd-card__partner strong { color: #fff; font-size: 15px; }
.phxd-card__logo { width: 44px; height: 44px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 4px; flex: none; }
.phx-portal .phxd-card__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.phxd-card__tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.phxd-tag { color: var(--phx-accent); border-color: rgba(250, 137, 50, .45); }
.phxd-exp { font-size: 13px; color: var(--phx-muted); }
.phxd-exp--soon { color: var(--phx-warn); font-weight: 700; }
.phx-portal .phxd-card h3 { margin: 0; font-size: 20px; }
.phxd-price { margin: 0; color: var(--phx-accent); font-weight: 700; font-size: 17px; }
.phxd-details { margin: 0; color: var(--phx-text); font-size: 15px; }
.phxd-terms { margin: 0; font-size: 12px; color: var(--phx-muted); border-top: 1px solid var(--phx-line); padding-top: 10px; }
.phxd-mention { margin: 0; color: var(--phx-muted); }

.phxd-code { margin: 0; }
.phxd-code summary { list-style: none; width: 100%; cursor: pointer; }
.phxd-code summary::-webkit-details-marker { display: none; }
.phxd-code[open] summary { display: none; }
.phxd-code__val { display: grid; justify-items: center; gap: 2px; border: 2px dashed var(--phx-accent); border-radius: 10px; padding: 10px; }
.phxd-code__val span { font-size: 12px; color: var(--phx-muted); text-transform: uppercase; letter-spacing: 1px; }
.phxd-code__val strong { font-family: "Righteous", "Raleway", sans-serif; font-size: 24px; letter-spacing: 2px; color: #fff; }

.phxd-mine { margin-top: 36px; }
.phx-portal .phxd-mine h2 { font-size: 22px; margin-bottom: 12px; }
.phxd-rows { display: grid; gap: 8px; }
.phxd-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--phx-panel); border: 1px solid var(--phx-line); border-radius: var(--phx-r); padding: 12px 14px; }
.phxd-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.phxd-row strong { color: #fff; }

.phxd-form__photo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.phx-portal .phxd-form__photo img { width: 140px; height: 90px; object-fit: cover; border-radius: 8px; }

/* Feed: sponsor logo as the avatar */
.phx-portal .phxf-item__avatar img.phxd-logo-avatar { background: #fff; object-fit: contain !important; padding: 3px; }

@media (max-width: 640px) {
	.phxd-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.phxd-card__body { padding: 14px; }
	.phxd-row .phx-actions { width: 100%; }
}

/* Partner sections (v1.1) */
.phxd-jump { margin-bottom: 8px; }
.phxd-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--phx-accent); color: #0b090a; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.phxd-back { margin: 0 0 10px; }
.phxd-partner { margin-top: 26px; scroll-margin-top: 120px; }
.phxd-partner--full { margin-top: 0; }
.phxd-partner__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.phxd-partner__name { display: grid; line-height: 1.2; min-width: 0; flex: 1; }
.phx-portal .phxd-partner__name h2, .phx-portal .phxd-partner__name h1 { margin: 0; font-size: 22px; }
.phx-portal .phxd-partner--full .phxd-partner__name h1 { font-size: 28px; }
.phx-portal .phxd-partner__name h2 a { color: #fff; }
.phx-portal .phxd-partner__name h2 a:hover { color: var(--phx-accent); text-decoration: none; }
.phxd-partner__logo { width: 52px; height: 52px; }
.phxd-partner--full .phxd-partner__logo { width: 72px; height: 72px; border-radius: 12px; }
.phxd-partner__actions { margin: 0; }
.phxd-partner__about { margin: -4px 0 16px; color: var(--phx-text); max-width: 70ch; }
.phxd-quiet { margin-top: 34px; }
.phx-portal .phxd-quiet h2 { font-size: 20px; margin: 0 0 4px; }
.phxd-quiet__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.phx-portal a.phxd-quiet__item { display: flex; align-items: center; gap: 10px; background: var(--phx-panel); border: 1px solid var(--phx-line); border-radius: var(--phx-r); padding: 10px 12px; color: #fff; }
.phx-portal a.phxd-quiet__item:hover { border-color: var(--phx-accent); text-decoration: none; }
.phxd-quiet__item > span:last-child { display: grid; line-height: 1.25; min-width: 0; }
@media (max-width: 640px) {
	.phxd-jump { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
	.phxd-jump::-webkit-scrollbar { display: none; }
	.phxd-jump a { flex: none; }
	.phxd-grid--row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
	.phxd-grid--row::-webkit-scrollbar { display: none; }
	.phxd-grid--row > .phxd-card { flex: 0 0 86%; scroll-snap-align: start; }
	.phxd-grid--row > .phxd-card:only-child { flex-basis: 100%; }
	.phxd-partner__actions { width: 100%; }
	.phxd-quiet__grid { grid-template-columns: minmax(0, 1fr); }
}
