/* Homepage evolution: the existing paper / ink palette and Songti identity.
   Design variance 6, motion 6, density 4. Native CSS 3D, no runtime library. */
.home-page [hidden] { display: none !important; }
.home-gallery-ready .home-hero { display: block; min-height: 0; padding: 34px 0 60px; }
.home-gallery-ready .home-intro { position: static; padding: 0; display: grid; grid-template-columns: 1.12fr 1fr; grid-template-areas: "edition lead" "title actions"; align-items: end; column-gap: 64px; }
.home-gallery-ready .home-intro .edition { grid-area: edition; margin: 0 0 19px; }
.home-gallery-ready .home-intro h1 { grid-area: title; font-size: clamp(62px, 6.2vw, 88px); line-height: 1.12; letter-spacing: -.055em; }
.home-gallery-ready .home-lead { grid-area: lead; max-width: 26em; margin: 0 0 16px; font-size: 18px; line-height: 1.85; }
.home-gallery-ready .home-actions { grid-area: actions; padding-bottom: 5px; gap: 24px; }
.home-featured { margin-top: 32px; }
.home-featured-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.home-featured-heading h2 { font-family: var(--serif); font-size: 19px; font-weight: 500; margin: 0; }
.home-featured-heading > span { font-size: 12px; color: var(--muted); }
.home-featured-cards { display: grid; grid-template-columns: 1.2fr 1fr .85fr; gap: 26px; align-items: stretch; }
.home-featured-cards .article-card { box-shadow: none; display: flex; flex-direction: column; min-width: 0; }
.home-featured-cards .article-card-cover { aspect-ratio: 16 / 10 !important; height: clamp(168px, 18vw, 240px); flex-shrink: 0; }
.home-featured-cards .article-card-body { padding: 24px 25px 27px; flex: 1; }
.home-featured-cards .article-card-title { font-size: clamp(23px, 2.2vw, 31px); line-height: 1.35; letter-spacing: -.025em; }
.home-featured-cards .article-card:first-child .article-card-title { font-size: clamp(32px, 3vw, 43px); }
.home-featured-cards .article-category { font-size: 11px; margin-bottom: 12px; }
.home-featured-cards .byline { display: none; }
.home-featured-cards .article-preview { display: block; border: 0; padding: 0; margin-top: 15px; font-size: 14px; line-height: 1.8; }
.home-featured-cards .article-preview > span { display: none; }
.home-featured-cards .article-preview > span:first-child { display: block; }
.home-featured-cards .card-read { margin-top: 20px; padding-bottom: 5px; font-size: 12px; }
.home-gallery { width: var(--page); margin: 0 auto 90px; padding-top: 42px; border-top: 1px solid var(--line-strong); scroll-margin-top: 100px; }
.home-gallery-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.home-gallery-kicker { color: var(--muted); font-size: 13px; margin: 0 0 13px; }
.home-gallery-heading h2 { font-family: var(--serif); font-size: clamp(36px, 4vw, 52px); font-weight: 500; letter-spacing: -.04em; margin: 0; line-height: 1.2; }
.home-gallery-heading h2 > span { display: inline-block; vertical-align: middle; margin-left: 18px; font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.home-gallery-filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.home-gallery-filters label { display: grid; gap: 6px; font-size: 11px; color: var(--muted); }
.home-gallery-filters select { max-width: 180px; min-height: 44px; padding: 9px 28px 9px 12px; border: 1px solid var(--line-strong); border-radius: 2px; font: 14px var(--sans); color: var(--text); background: var(--surface); cursor: pointer; }
.gallery-view-toggle { min-height: 44px; padding: 10px 0; margin-left: 7px; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 13px var(--sans); cursor: pointer; }
.home-gallery-stage { --gallery-card-width: 340px; position: relative; height: 440px; perspective: 1200px; isolation: isolate; touch-action: pan-y; margin-top: 26px; overflow: clip; }
.home-gallery-stage:not(.is-list-view)::after { content: ""; position: absolute; bottom: 8px; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); pointer-events: none; }
.home-gallery-stage .gallery-card { position: absolute; top: 50%; left: 50%; width: var(--gallery-card-width); margin: 0; transform: translate(-50%, -50%) translateX(var(--gallery-x, 0px)) translateZ(var(--gallery-z, 0px)) rotateY(var(--gallery-turn, 0deg)); opacity: var(--gallery-opacity, 1); transform-origin: center; backface-visibility: hidden; transition: transform 640ms cubic-bezier(.2,.75,.2,1), opacity 440ms ease, border-color 250ms ease, box-shadow 440ms ease; box-shadow: 0 22px 44px var(--shadow); will-change: transform; cursor: pointer; }
.home-gallery-stage .gallery-card.is-active { border-color: var(--line-strong); box-shadow: 0 27px 56px var(--shadow); }
.home-gallery-stage .gallery-card .article-card-cover { aspect-ratio: 16 / 10 !important; }
.home-gallery-stage .gallery-card .article-card-cover img { object-fit: contain; user-select: none; -webkit-user-drag: none; }
.home-gallery-stage .gallery-card .article-card-body { padding: 21px 24px 25px; min-height: 111px; }
.home-gallery-stage .gallery-card .article-card-title { font-size: 23px; line-height: 1.4; font-weight: 500; letter-spacing: -.02em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.home-gallery-stage .gallery-card .article-category { margin-bottom: 10px; font-size: 11px; }
.home-gallery-stage .gallery-card .byline,
.home-gallery-stage .gallery-card .article-preview,
.home-gallery-stage .gallery-card .card-read { display: none; }
.home-gallery-stage .gallery-card:not(.is-active) .article-card-title { color: var(--muted); }
.home-gallery-controls { display: flex; align-items: center; justify-content: center; gap: 40px; margin-top: 18px; }
.gallery-step { display: inline-flex; align-items: center; gap: 17px; justify-content: center; min-height: 48px; padding: 12px 17px; font: 13px var(--sans); border: 1px solid var(--line-strong); border-radius: 2px; background: transparent; color: var(--text); cursor: pointer; transition: background 180ms ease, border-color 180ms ease; }
.gallery-step > span[aria-hidden] { font-size: 22px; line-height: 1; }
.gallery-step:disabled { opacity: .32; cursor: default; }
.gallery-step:not(:disabled):hover { border-color: var(--accent); background: var(--surface); }
.gallery-progress { width: min(27vw, 300px); display: grid; justify-items: stretch; gap: 5px; }
.gallery-progress output { text-align: center; color: var(--muted); font: 12px var(--mono); line-height: 1.6; }
.gallery-jump-label { display: block; }
.gallery-jump-label > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery-jump-label input { display: block; width: 100%; height: 28px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.home-gallery-summary { width: min(670px, 100%); margin: 30px auto 0; text-align: center; }
.gallery-summary-meta { margin: 0 0 12px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.gallery-summary-title { font: 500 clamp(22px, 2.35vw, 30px)/1.45 var(--serif); margin: 0; letter-spacing: -.02em; overflow-wrap: anywhere; }
.gallery-summary-copy { font: 15px/1.85 var(--serif); color: var(--muted); margin: 14px auto 0; max-width: 40em; }
.gallery-summary-link { display: inline-flex; gap: 14px; margin-top: 20px; padding: 7px 0; border-bottom: 1px solid var(--line-strong); color: var(--text); font-size: 13px; }
.gallery-summary-link:hover { color: var(--accent); }
.home-gallery-empty { text-align: center; padding: 90px 20px; font-size: 16px; color: var(--muted); }
.home-gallery :is(button,select,input,a):focus-visible,
.home-featured a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.home-gallery.is-list-view .home-gallery-controls,
.home-gallery.is-list-view .home-gallery-summary { display: none; }
.home-gallery-stage.is-list-view { height: auto; perspective: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 36px; }
.home-gallery-stage.is-list-view .article-card { min-width: 0; box-shadow: none; }
.home-gallery-stage.is-list-view .article-card-cover { aspect-ratio: 16 / 10 !important; }
.home-gallery-stage.is-list-view .article-card-body { padding: 24px; }
.home-gallery-stage.is-list-view .article-card-title { font-size: 24px; line-height: 1.4; }
.home-gallery-stage.is-list-view .article-category { font-size: 11px; }
.home-gallery-stage.is-list-view .byline { font-size: 11px; }
.home-gallery-stage.is-list-view .article-preview { grid-template-columns: 1fr; font-size: 14px; margin-top: 18px; padding-top: 18px; }
.home-gallery-stage.is-list-view .article-preview > span:not(:first-child) { display: none; }
.home-gallery-stage.is-list-view .card-read { margin-top: 18px; }
@media (max-width: 1050px) {
  .home-gallery-heading { display: block; }
  .home-gallery-filters { margin-top: 24px; }
  .home-gallery-ready .home-intro { column-gap: 30px; }
  .home-featured-cards { gap: 18px; grid-template-columns: 1.1fr 1fr 1fr; }
  .home-featured-cards .article-card-body { padding: 20px; }
  .home-featured-cards .article-card-title { font-size: 24px; }
  .home-gallery-stage { --gallery-card-width: 320px; }
}
@media (max-width: 760px) {
  .home-gallery-ready .home-intro { display: block; }
  .home-gallery-ready .home-intro h1 { font-size: clamp(62px, 13vw, 86px); }
  .home-gallery-ready .home-lead { margin: 20px 0 24px; }
  .home-gallery-ready .home-hero { padding: 34px 0 40px; }
  .home-featured { margin-top: 35px; }
  .home-featured-cards { grid-template-columns: 1fr 1fr; gap: 16px; }
  .home-featured-cards .article-card-cover { height: auto; }
  .home-featured-cards .article-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
  .home-featured-cards .article-card:first-child .article-card-cover { height: 100%; min-height: 190px; aspect-ratio: auto !important; }
  .home-featured-cards .article-card-title { font-size: 22px; }
  .home-gallery-stage { --gallery-card-width: 290px; height: 405px; perspective: 900px; }
  .home-gallery-stage.is-list-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .home-gallery-ready .home-hero { width: calc(100% - 32px); }
  .home-gallery-ready .home-intro h1 { font-size: 64px; }
  .home-gallery-ready .home-lead { font-size: 17px; line-height: 1.75; }
  .home-gallery-ready .home-actions { gap: 16px; }
  .home-gallery-ready .home-actions .text-link { font-size: 12px; }
  .home-featured-heading > span { display: none; }
  .home-featured-cards { gap: 12px; }
  .home-featured-cards .article-card:first-child { display: flex; }
  .home-featured-cards .article-card:first-child .article-card-cover { height: auto; min-height: 0; aspect-ratio: 16 / 9 !important; }
  .home-featured-cards .article-card:first-child .article-card-title { font-size: 32px; }
  .home-featured-cards .article-card-body { padding: 17px 15px 19px; }
  .home-featured-cards .article-card:not(:first-child) .article-card-title { font-size: 19px; line-height: 1.4; }
  .home-featured-cards .article-card:not(:first-child) .article-preview,
  .home-featured-cards .article-card:not(:first-child) .card-read { display: none; }
  .home-featured-cards .article-category { font-size: 10px; letter-spacing: 0; }
  .home-gallery { width: calc(100% - 32px); margin-bottom: 60px; padding-top: 30px; }
  .home-gallery-heading h2 { font-size: 38px; }
  .home-gallery-filters { gap: 10px; justify-content: space-between; }
  .home-gallery-filters select { padding-left: 9px; padding-right: 16px; max-width: 138px; font-size: 16px; }
  .gallery-view-toggle { font-size: 12px; margin-left: 0; }
  .home-gallery-stage { --gallery-card-width: 258px; height: 370px; perspective: 850px; margin-top: 14px; }
  .home-gallery-stage .gallery-card .article-card-body { padding: 18px 19px 21px; min-height: 102px; }
  .home-gallery-stage .gallery-card .article-card-title { font-size: 21px; }
  .home-gallery-controls { gap: 14px; margin-top: 6px; }
  .gallery-step { padding: 10px 12px; }
  .gallery-step > span:not([aria-hidden]) { display: none; }
  .gallery-progress { width: min(48vw, 240px); }
  .home-gallery-summary { margin-top: 25px; padding: 0 5px; }
  .gallery-summary-copy { font-size: 15px; }
  .home-gallery-stage.is-list-view { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .home-gallery-stage .gallery-card { transition: none; }
  .home-gallery-ready .home-intro { animation: none; }
}
