/* Homepage orientation module, kept separate from the shared site layout. */
.home-selection .home-work-grid,.discover-work-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:26px 16px;
}
.home-work-card {
  --home-work-overlay-text:#f7f6ef;
  --home-work-overlay-shade:rgba(8,16,12,.72);
  --home-work-title-shadow:rgba(0,0,0,.95);
  min-width:0;
}
.home-work-image {
  position:relative;display:block;aspect-ratio:1;overflow:hidden;
  border:1px solid var(--line);background:var(--panel);isolation:isolate;
}
.home-work-image .home-work-picture { display:block;width:100%;height:100%;object-fit:cover;transition:transform .4s ease; }
.home-work-image:focus-visible .home-work-picture { transform:scale(1.035); }
@media(hover:hover) { .home-work-image:hover .home-work-picture { transform:scale(1.035); } }
.home-work-title {
  position:absolute;inset:auto 0 0;padding:36px 12px 12px;
  color:var(--home-work-overlay-text);background:linear-gradient(transparent,var(--home-work-overlay-shade));
  text-shadow:0 1px 1px var(--home-work-title-shadow),0 0 2px var(--home-work-title-shadow);
  font-family:var(--serif);font-size:14px;line-height:1.6;overflow-wrap:anywhere;
  opacity:0;transition:opacity .16s ease;
}
.home-work-image:hover .home-work-title,.home-work-image:focus-visible .home-work-title { opacity:1; }
.home-work-image:focus-visible,.home-work-artist:focus-visible { outline:2px solid var(--green);outline-offset:4px; }
.home-work-artist {
  display:flex;align-items:center;gap:8px;min-width:0;margin-top:10px;
  color:var(--muted);font-size:12px;line-height:1.5;text-decoration:none;
}
.home-work-artist:hover { color:var(--green); }
.home-work-avatar { display:block;flex:0 0 25px;width:25px;height:25px;border-radius:50%;object-fit:cover;background:var(--panel); }
.home-work-avatar-placeholder { display:grid;place-items:center;color:var(--muted);font-family:var(--serif); }
.home-work-artist-name { min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
@media(min-width:700px) { .home-selection .home-work-grid,.discover-work-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 20px; } }
@media(min-width:1100px) { .home-selection .home-work-grid,.discover-work-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(min-width:1400px) { .home-selection .home-work-grid,.discover-work-grid { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media(max-width:699px),(hover:none),(pointer:coarse) { .home-work-title { opacity:1; } }
@media(prefers-reduced-motion:reduce) {
  .home-work-title,.home-work-image .home-work-picture { transition:none; }
}

/* Compact editorial tiles on the homepage, work archive, and work search. */
.home-selection .work-tile-grid,
.discover-work-grid.work-tile-grid {
  --work-tile-columns: 2;
  --work-tile-gap: 4px;
  container-type: inline-size;
  grid-template-columns: repeat(var(--work-tile-columns), minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--work-tile-gap);
}

@media (min-width: 641px) {
  .home-selection .work-tile-grid,
  .discover-work-grid.work-tile-grid { --work-tile-columns: 4; }
}

@media (min-width: 1101px) {
  .home-selection .work-tile-grid,
  .discover-work-grid.work-tile-grid { --work-tile-columns: 6; }
}

.work-tile-grid > .work-tile {
  --work-tile-edge: calc((100cqw - (var(--work-tile-columns) - 1) * var(--work-tile-gap)) / var(--work-tile-columns));
  position: relative;
  block-size: var(--work-tile-edge);
}

.work-tile-grid > .work-tile--wide,
.work-tile-grid > .work-tile--large { grid-column: span 2; }

.work-tile-grid > .work-tile--tall,
.work-tile-grid > .work-tile--large {
  grid-row: span 2;
  block-size: calc(2 * var(--work-tile-edge) + var(--work-tile-gap));
}

.work-tile .home-work-image {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
}

.work-tile--contained .home-work-image .home-work-picture {
  object-fit: var(--work-card-fit, contain);
}

/* Tiles inherit the shared image hover and motion preferences. */

.home-work-image .home-work-picture:not([data-fallback-applied]) {
  scale: var(--work-card-zoom, var(--work-tile-trim, none));
}

.work-tile .work-origin-chip--archive {
  color: #f7f6ef;
  background: rgba(8, 16, 12, .86);
  border-color: rgba(247, 246, 239, .35);
}

.work-tile .home-work-title {
  padding: 34px 48px 10px 10px;
  background: linear-gradient(transparent, rgba(8, 16, 12, .77) 34px, rgba(8, 16, 12, .88));
  font-family: -apple-system, system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
  font-weight: normal;
  font-synthesis: none;
  line-height: 1.45;
  opacity: 1;
}

.work-tile--wide .home-work-title,
.work-tile--tall .home-work-title,
.work-tile--large .home-work-title { font-size: 15px; }

.work-tile-author {
  position: absolute;
  z-index: 2;
  right: 4px;
  bottom: 2px;
}

.work-tile-author summary {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
  list-style: none;
}

.work-tile-author summary::-webkit-details-marker { display: none; }

.work-tile-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 50%;
}

.work-tile--tall .work-tile-avatar,
.work-tile--wide .work-tile-avatar,
.work-tile--large .work-tile-avatar {
  width: 32px;
  height: 32px;
}

.work-tile-avatar .home-work-avatar {
  width: 100%;
  height: 100%;
  transform: scale(var(--work-avatar-zoom, 1));
  transform-origin: var(--work-avatar-origin, center);
}

.work-tile-author-label {
  position: absolute;
  right: 4px;
  bottom: 100%;
  width: max-content;
  max-width: min(17rem, calc(var(--work-tile-edge) - 16px));
  padding: 6px 9px;
  border-radius: 3px;
  background: #0c1813;
  color: #f7f6ef;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.work-tile-author-label a { color: inherit; text-decoration: underline; }
.work-tile-author-preview { display: none; pointer-events: none; }
.work-tile-author:not([open]) > summary:focus-visible > .work-tile-author-preview { display: block; }
@media (hover: hover) {
  .work-tile-author:not([open]) > summary:hover > .work-tile-author-preview { display: block; }
}

.work-tile .home-work-image:focus-visible,
.work-tile-author summary:focus-visible,
.work-tile-author-label a:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }

@media (max-width: 640px) {
  .work-tile .home-work-title { font-size: 13.5px; line-height: 1.5; }
  .work-tile--wide .home-work-title,
  .work-tile--tall .home-work-title,
  .work-tile--large .home-work-title { font-size: 14px; }
  .work-tile--square .work-tile-avatar { width: 22px; height: 22px; }
}

.start-here {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 2fr);
  gap: 26px;
  margin: 0 auto;
  /* Match the spotlight frame; keep the desktop heading on the shared left edge. */
  padding: 23px 0 25px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Keep the first collection close to the orientation panel on the homepage. */
.home-selection {
  padding-top: 36px;
}

.start-here-intro {
  padding-right: 14px;
}

.start-here-intro .eyebrow {
  margin-bottom: 8px;
}

.start-here-intro h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .03em;
}

.start-here-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}

.start-here-item {
  display: flex;
  gap: 13px;
  min-width: 0;
  padding: 4px 18px 5px;
  border-right: 1px solid var(--line);
  color: var(--text);
}

.start-here-item:first-child {
  padding-left: 18px;
}

.start-here-item:last-child {
  border-right: 0;
}

.start-here-item:hover strong,
.start-here-item:focus-visible strong {
  color: var(--green);
}

.start-here-number {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .12em;
}

.start-here-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.start-here-copy strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
}

.start-here-copy > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.start-here-copy em {
  margin-top: auto;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .start-here {
    grid-template-columns: 1fr;
    gap: 18px;
    /* Keep its text edge aligned with the following .wrap.content-section. */
    padding-inline: 0;
  }

  .start-here-intro {
    padding-right: 0;
  }

  .start-here-grid {
    border-left: 0;
  }

  .start-here-item {
    padding-inline: 14px;
  }

  .start-here-item:first-child {
    padding-left: 0;
  }

  .start-here-item:last-child {
    padding-right: 0;
  }
}

@media (max-width: 600px) {
  .start-here {
    display: block;
    margin-bottom: 0;
    /* Align the intro with the spotlight copy while preserving the outer wrap. */
    padding: 19px 0 20px;
  }

  .home-selection {
    padding-top: 26px;
  }

  .start-here-intro {
    margin-bottom: 12px;
  }

  .start-here-intro h2 {
    font-size: 26px;
  }

  .start-here-grid {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
  }

  .start-here-item,
  .start-here-item:first-child,
  .start-here-item:last-child {
    min-height: 72px;
    padding: 13px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .start-here-item:last-child {
    padding-bottom: 3px;
    border-bottom: 0;
  }

  .start-here-copy strong {
    font-size: 18px;
  }

  .start-here-copy > span {
    font-size: 12px;
  }
}

/* The shared card keeps the saved image position and the original source badge. */
.discover-main .discover-work-grid,.search-main .discover-work-grid { margin-top:24px }
.discover-sort-tabs { display:flex; gap:28px; margin:0 0 18px; padding:0; border-bottom:1px solid var(--line) }
.discover-sort-tabs button { min-height:48px; padding:10px 2px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:var(--muted); cursor:pointer }
.discover-sort-tabs button[aria-pressed="true"] { color:var(--green); border-bottom-color:var(--green); font-weight:600 }
.discover-sort-tabs button:focus-visible { outline:2px solid var(--green); outline-offset:3px }
.discover-filter-person { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 16px; color:var(--muted); font-size:12px }
.discover-filter-person a { color:var(--green); text-underline-offset:4px }
.discover-sort-description { color:var(--muted); font-size:11px; line-height:1.6 }
