/* Homepage layout. The original theme continues to style the search and navigation. */
.pg-finds {
  --pg-ink: var(--imq-ink);
  --pg-muted: var(--imq-muted);
  --pg-card: var(--imq-paper);
  --pg-tint: var(--imq-wash);
  --pg-line: var(--imq-line);
  --pg-accent: var(--imq-act);
  --pg-radius: 12px;
}
.pg-sheet {
  --pg-ink: var(--sbx-ink);
  --pg-muted: var(--sbx-ink2);
  --pg-card: var(--sbx-card);
  --pg-tint: var(--sbx-kraft);
  --pg-line: var(--sbx-line);
  --pg-accent: var(--sbx-link);
  --pg-radius: 8px;
}
.pg-home h2 { margin: 0 0 .45em; font-size: clamp(1.4rem, 3vw, 2.15rem); }
.pg-home h3 { margin: 0 0 .35em; font-size: 1.05rem; }
.pg-home p { margin: 0 0 .85rem; }
.pg-home a:focus-visible, .pg-home summary:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 3px; }
.pg-home [id] { scroll-margin-top: 80px; }
.pg-hero { padding: 30px 0 22px; }
.pg-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .52fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(20px, 4vw, 52px);
  background: var(--pg-tint);
  border: 1px solid var(--pg-line);
  border-radius: var(--pg-radius);
}
.pg-sheet .pg-hero-grid { border-style: dashed; }
.pg-hero h1 { margin: 0 0 .25em; font-size: clamp(2.25rem, 5.8vw, 4.5rem); line-height: 1.02; letter-spacing: -.045em; }
.pg-hero p { max-width: 48ch; color: var(--pg-muted); font-size: 1.06rem; }
.pg-hero form { margin: 18px 0 10px; max-width: 36rem; }
.pg-hero figure { margin: 0; }
.pg-hero figure img { display: block; width: 100%; height: clamp(190px, 23vw, 310px); object-fit: cover; object-position: center 47%; border-radius: var(--pg-radius); }
.pg-hero figcaption, .pg-photo figcaption { color: var(--pg-muted); font-size: .86rem; margin-top: 6px; }
.pg-hero nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 650; }
.pg-home .pg-section { padding: 31px 0; border-top: 1px solid var(--pg-line); }
.pg-sheet .pg-section { border-top-style: dashed; }
.pg-home .pg-categories { border-top: 0; padding-top: 4px; }
.pg-categories ul { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin: 12px 0; padding: 0; list-style: none; }
.pg-categories li { margin: 0; }
.pg-categories a.pg-category { display: flex; height: 100%; flex-direction: column; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); overflow: hidden; background: var(--pg-card); color: var(--pg-ink); font-weight: 650; line-height: 1.2; text-decoration: none; }
.pg-categories .pg-category:hover { border-color: var(--pg-accent); color: var(--pg-accent); }
.pg-category img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; }
.pg-category span { padding: 9px 8px; }
.pg-categories details { margin: 14px 0 0; }
.pg-categories summary { width: fit-content; color: var(--pg-accent); font-weight: 650; cursor: pointer; }
.pg-categories .pg-directory { margin: .5em 0 0; }
.pg-reasons, .pg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; padding: 0; list-style: none; }
.pg-reasons li, .pg-steps li { margin: 0; padding: 15px; }
.pg-finds .pg-reasons li, .pg-sheet .pg-steps li { border-radius: var(--pg-radius); background: var(--pg-tint); }
.pg-sheet .pg-reasons li { padding-inline-start: 12px; border-inline-start: 3px solid var(--pg-accent); }
.pg-finds .pg-steps li { border-top: 2px solid var(--pg-accent); }
.pg-reasons p, .pg-steps p { margin: 0; color: var(--pg-muted); }
.pg-steps { counter-reset: pg-step; }
.pg-steps li { counter-increment: pg-step; }
.pg-steps li::before { content: "0" counter(pg-step); display: block; margin-bottom: 8px; color: var(--pg-accent); font-variant-numeric: tabular-nums; font-weight: 750; }
.pg-help-grid, .pg-feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 22px; }
.pg-help-grid dl { margin: 0; }
.pg-help-grid dt { margin-top: .8rem; font-weight: 700; }
.pg-help-grid dt:first-child { margin-top: 0; }
.pg-help-grid dd { margin: 3px 0 0; color: var(--pg-muted); }
.pg-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pg-photo { margin: 0; min-width: 0; }
.pg-photo a { display: block; }
.pg-photo img, .pg-feature-grid img { width: 100%; height: auto; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); }
.pg-photo img { aspect-ratio: 1; object-fit: contain; background: var(--pg-tint); }
.pg-feature-grid { align-items: center; padding: clamp(16px, 3vw, 30px); background: var(--pg-tint); border-radius: var(--pg-radius); }
.pg-feature-grid a.pg-cta { display: inline-block; padding: 8px 15px; border: 1px solid currentColor; border-radius: var(--pg-radius); font-weight: 700; text-decoration: none; }
.pg-feature-grid .pg-topic-link { display: block; margin-top: 10px; }
@media(max-width: 850px) {
  .pg-categories ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media(max-width: 680px) {
  .pg-hero { padding: 16px 0 16px; }
  .pg-hero-grid, .pg-help-grid, .pg-feature-grid { grid-template-columns: 1fr; }
  .pg-hero-grid { gap: 0; padding: 19px 14px; }
  .pg-hero figure { display: none; }
  .pg-hero h1 { font-size: clamp(1.9rem, 8vw, 2.65rem); }
  .pg-hero p { font-size: 1rem; }
  .pg-hero nav { gap: 6px 12px; font-size: .92rem; }
  .pg-categories ul { gap: 7px; }
  .pg-category span { padding: 7px 4px; font-size: .82rem; }
  .pg-reasons, .pg-steps { grid-template-columns: 1fr; gap: 6px; }
  .pg-reasons li, .pg-steps li { padding: 10px 12px; }
  .pg-steps li::before { float: left; margin: 0 .65em 0 0; }
  .pg-steps p { clear: left; }
}
.pg-finds .pg-hero-grid { position: relative; }
.pg-finds .pg-hero-grid::before, .pg-finds .pg-hero-grid::after { content: ""; position: absolute; width: 19px; height: 19px; border: 2px solid var(--pg-accent); pointer-events: none; }
.pg-finds .pg-hero-grid::before { inset: 8px auto auto 8px; border-right: 0; border-bottom: 0; }
.pg-finds .pg-hero-grid::after { inset: auto 8px 8px auto; border-left: 0; border-top: 0; }
.pg-hero figure img { object-fit: contain; background: var(--pg-card); }
.pg-feature-grid img { max-width: 340px; justify-self: center; }
@media(max-width: 680px) {
  .pg-hero figure { display: flex; align-items: center; gap: 9px; margin-top: 13px; }
  .pg-hero figure img { width: 42px; height: 56px; flex: 0 0 42px; }
  .pg-hero figcaption { margin: 0; }
}
.pg-hero-grid { padding-block: clamp(20px, 3.3vw, 42px); }
.pg-hero figure { width: min(100%, 222px); justify-self: center; }
.pg-hero figure img { height: auto; aspect-ratio: 2 / 2.85; object-fit: cover; }
@media(max-width: 680px) {
  .pg-hero-grid, .pg-help-grid, .pg-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-hero figure { width: auto; justify-self: start; }
  .pg-hero figure img { height: 56px; }
  .pg-hero .imq-seek button { padding-inline: 10px; }
}
.pg-category span { overflow-wrap: anywhere; }
@media(min-width: 681px) {
  .pg-sheet .pg-hero-grid { grid-template-columns: minmax(200px, .52fr) minmax(0, 1fr); }
  .pg-sheet .pg-hero figure { grid-area: 1 / 1; }
}
@media(max-width: 680px) {
  .pg-hero input[name="q"] { font-size: 16px; padding-inline: 7px; }
}
