/* Phone tiles on the Cell Devices page ([hay_devices]). Same look as the old hand-built tiles. */
.hd-grid { list-style: none; margin: 10px 2px 20px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hd-grid > li { margin: 0; padding: 0; }
.hd-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #deb408; border-top-width: 7px; padding: 18px 16px 16px; text-align: center; }
.hd-card:focus-within { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.hd-card-img { height: 260px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.hd-card-img img { max-height: 260px; width: auto; max-width: 100%; height: auto; object-fit: contain; }
/* Trimmed photos (includes/images.php): every phone the same height, flagships one step larger. */
.hd-grid .hd-card-img { --hd-box: 260px; }
.hd-grid .hd-card-img { min-width: 0; overflow: hidden; }
/* A wide photo (a foldable shown open) shrinks to the tile width instead of spilling out and being clipped. */
.hd-grid .hd-card-img img.hd-tile-photo { flex: 0 1 auto; min-width: 0; width: auto; max-width: 100%; max-height: none; object-fit: contain; height: calc(var(--hd-box) * .85); }
.hd-grid .hd-card-img img.hd-size-smaller { height: calc(var(--hd-box) * .76); }
.hd-grid .hd-card-img img.hd-size-larger { height: calc(var(--hd-box) * .935); }
.hd-grid .hd-card-img img.hd-size-largest { height: var(--hd-box); }
.hd-card-name { font-size: 24px; line-height: 1.25; margin: 4px 0 12px; padding-bottom: 12px; font-weight: 700; box-shadow: 0 6px 6px -6px rgba(0,0,0,.25); }
.hd-card-name a { color: #000; text-decoration: none; }
.hd-card-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole tile clickable, one link for screen readers */
.hd-card-name a:hover, .hd-card-name a:focus-visible { text-decoration: underline; outline: none; }
.hd-card-price { color: #00713d; font-size: 16px; margin: 0 0 10px; }
.hd-card-price strong { font-size: 32px; line-height: 1.1; }
.hd-card-bar { font-weight: 700; font-size: 32px; margin: 0 .25em; }
.hd-card-fine, .hd-card-retail { font-size: 13px; line-height: 1.45; color: #595959; margin: 0; }
.hd-card-fine { border-top: 1px solid #e6e6e6; padding-top: 10px; }
.hd-card-retail { border-bottom: 1px solid #e6e6e6; padding-bottom: 10px; margin-bottom: 12px; }
.hd-card-retail:last-child { border-bottom: 0; margin-bottom: 0; }
.hd-card-save { margin: auto 0 0; font-size: 13px; color: #595959; }
.hd-card-save strong { display: inline-block; font-size: 24px; color: #000; margin-right: .2em; }
.hd-card-save .hd-star { color: #a6083a; font-size: 22px; }
.hd-card-tag { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #595959; text-transform: uppercase; letter-spacing: .04em; }
.hd-grid-empty { text-align: center; padding: 20px; }
@media (max-width: 991px) { .hd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .hd-grid { grid-template-columns: 1fr; } .hd-card-img { height: 220px; } .hd-card-img img { max-height: 220px; } .hd-grid .hd-card-img { --hd-box: 220px; } }
@media (prefers-reduced-motion: no-preference) { .hd-card { transition: box-shadow .15s; } .hd-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); } }
/* Theme rules (.entry-content h2/p/a, li padding, a11y line-height) outrank the single-class rules above,
   which left the tiles with no inner padding, underlined extra-bold names and loose fine print.
   Same selectors with .hd-grid in front, so the tiles match the old hand-built ones. */
.hd-grid > li.hd-card { padding: 18px 14px 14px; }
.hd-grid .hd-card-name { margin: 6px 0 12px; padding-bottom: 12px; font-size: 24px; line-height: 1.25; font-weight: 700; }
.hd-grid .hd-card-name a { text-decoration: none; color: #000; font-weight: 700 !important; } /* theme has a{font-weight:300 !important}; the class on the link keeps its .entry-content a:not([class]) underline off */
.hd-grid .hd-card-name a:hover, .hd-grid .hd-card-name a:focus-visible { text-decoration: underline; }
.hd-grid .hd-card-price { line-height: 1.3; margin: 0 0 12px; }
.hd-grid .hd-card-fine, .hd-grid .hd-card-retail { line-height: 1.45; text-align: left; }
.hd-grid .hd-card-fine { padding-top: 10px; }
.hd-grid .hd-card-save { line-height: 1.4; padding-top: 10px; }
.hd-grid .hd-card-tag { line-height: 1.4; }
