/* v15 tips page (replaces /news/). From the approved mockup tips.html. */
  /* featured: the newest tip, picture and opening side by side */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature .ph { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1; background: var(--stage); cursor: pointer; }
.feature .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.feature .ph:hover img { transform: scale(1.03); }
.feature h2 { font-size: clamp(24px, 3vw, 34px); margin-top: 10px; }
.feature p { margin-top: 16px; font-size: 16px; }
.kind { font-size: 12px; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }

/* grid: square covers; the second picture of the post fades in on hover */
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 20px; margin-top: 28px; }
.tip { border: 0; padding: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tip .ph { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--stage); }
.tip .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.tip .ph .second { opacity: 0; }
.tip:hover .ph .second, .tip:focus-visible .ph .second { opacity: 1; }
.tip:hover .ph img { transform: scale(1.03); }
.tip h3 { margin-top: 12px; font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tip .kind { display: block; margin-top: 4px; }
.more-wrap { margin-top: 40px; text-align: center; }

/* reader: pictures left, the whole post right */
.reader { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.reader::backdrop { background: rgba(23,23,26,.55); backdrop-filter: blur(6px); }
.reader[open] { display: grid; place-items: center; animation: fadeIn .25s ease; }
.sheet { width: min(1120px, 100% - 32px); max-height: calc(100dvh - 32px); background: #fff; border-radius: var(--r-lg); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; }
.sheet .pics { position: relative; background: var(--stage); aspect-ratio: 1; max-height: calc(100dvh - 32px); }
.sheet .pics img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sheet .dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.sheet .dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.15); cursor: pointer; }
.sheet .dots button[aria-current="true"] { background: #fff; transform: scale(1.3); }
.sheet .body { display: flex; flex-direction: column; min-height: 0; padding: clamp(20px, 3vw, 36px); }
.sheet .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet h2 { font-size: clamp(20px, 2.2vw, 26px); margin-top: 12px; }
.sheet .text { margin-top: 16px; overflow-y: auto; white-space: pre-line; font-size: 15px; line-height: 1.85; color: var(--ink-2); padding-right: 6px; }
.sheet .tags { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.sheet .pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sheet .pager button { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; max-width: 48%; text-align: left; }
.sheet .pager button:last-child { text-align: right; }
.sheet .pager button:hover { color: var(--ink); }
.sheet .pager button:disabled { visibility: hidden; }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .tips { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .sheet { grid-template-columns: 1fr; overflow-y: auto; }
  .sheet .pics { max-height: none; }
  .sheet .text { overflow: visible; }
}
