/* Static SEO pages: /shoes/<slug>, /shoes/ and the ranked lists in the
   best-*.html guides (markup from scripts/lib/seo-pages.mjs). DESIGN.md
   Surface 2: sage paper, ink, one terracotta accent, Archivo display +
   Source Sans 3, 4px radius, rules instead of boxes. Self-hosted fonts only. */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/right-for-me/fonts/archivo-latin.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('/right-for-me/fonts/archivo-italic-latin.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('/right-for-me/fonts/source-sans-3-latin.woff2') format('woff2'); }

:root {
  --paper: #f4f6f2; --surface: #ffffff; --ink: #172119; --muted: #526057;
  --line: #cbd1ca; --rule: #dde2dc;
  --primary: #d4401c; --primary-dark: #a53721; --primary-light: #ffe0d6;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Source Sans 3', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; }
a { color: var(--primary-dark); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }

.sp-wrap { max-width: 880px; margin: 0 auto; padding: 1.25rem 1.25rem 4rem; }

/* masthead: same wordmark as the app */
.sp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.25rem; }
.sp-mark { font-family: var(--display); font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.sp-mark-a { font-weight: 500; }
.sp-mark-b { font-weight: 800; font-style: italic; }
.sp-mark-c { font-weight: 800; color: var(--primary); }
.sp-top-link { font-size: 0.95rem; font-weight: 600; }

.sp-crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.sp-crumbs a { color: var(--muted); }

/* shoe hero */
.sp-hero { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.sp-media { aspect-ratio: 4 / 3; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sp-media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.sp-ph { font-family: var(--display); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--line); }
.sp-id h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.06; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.sp-brand { margin: 0.35rem 0 0; color: var(--muted); font-weight: 600; }
.sp-newer { margin: 0.6rem 0 0; font-size: 0.95rem; }
.sp-meta { display: flex; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.1rem; }
.sp-score { display: inline-grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 0.15rem; padding: 0.5rem 0.8rem 0.55rem; border: 1.5px solid color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 4px; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.sp-score-num { font-family: var(--display); font-weight: 800; font-size: 2.1rem; line-height: 0.9; color: var(--primary); font-variant-numeric: tabular-nums; }
.sp-score-max { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--primary-dark); }
.sp-score-cap { grid-column: 1 / -1; margin-top: 0.2rem; font-size: 0.75rem; font-weight: 700; color: var(--primary-dark); }
.sp-price { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.sp-price span { display: block; font-family: var(--body); font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.sp-best { margin: 1.1rem 0 0; font-size: 1.1rem; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.sp-cta, .sp-ghost { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.2rem; border-radius: 4px; font-weight: 700; text-decoration: none; }
.sp-cta { background: var(--primary); color: #fff; }
.sp-cta:hover { background: var(--primary-dark); color: #fff; }
.sp-ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.sp-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* body sections: ruled, not boxed */
.sp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; margin-top: 2.25rem; }
.sp-cols section, .sp-more, .sp-group { border-top: 1px solid var(--rule); padding-top: 1rem; margin-bottom: 1.5rem; }
h2 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; margin: 0 0 0.6rem; }
.sp-list { margin: 0; padding-left: 1.1rem; }
.sp-list li + li { margin-top: 0.25rem; }
.sp-specs { margin: 0; }
.sp-specs div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.sp-specs div:last-child { border-bottom: 0; }
.sp-specs dt { color: var(--muted); }
.sp-specs dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.sp-note { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--muted); }
.sp-stores { list-style: none; margin: 0; padding: 0; }
.sp-stores li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.sp-stores li:last-child { border-bottom: 0; }
.sp-stores a { font-weight: 600; }
.sp-stores span { color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-sources { font-size: 0.9rem; color: var(--muted); margin: 0 0 2rem; }

/* ranked rows: guide lists, A–Z index, "top-scoring" block */
.sp-rows { list-style: none; margin: 0 0 1rem; padding: 0; }
.sp-row { display: flex; align-items: flex-start; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.sp-row:last-child { border-bottom: 0; }
.sp-rank { flex: none; width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--ink); border-radius: 2px; font-family: var(--display); font-weight: 800; font-style: italic; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.sp-row:first-child .sp-rank { background: var(--primary); border-color: var(--primary); color: #fff; }
.sp-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.sp-row-name { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.sp-row-name:hover { color: var(--primary-dark); text-decoration: underline; }
.sp-row-best { color: var(--ink); font-size: 0.95rem; }
.sp-row-meta { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.sp-row-score { flex: none; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
.sp-row-score b { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--ink); }

.sp-pitch { margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.sp-pitch p { margin: 0 0 1rem; }

/* A–Z index */
.sp-page-h { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -0.025em; line-height: 1.06; margin: 0.5rem 0 0.75rem; }
.sp-lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; margin: 0 0 1.25rem; }
.sp-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.sp-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.9rem; border: 1.5px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.sp-jump a:hover { border-color: var(--ink); }
.sp-group h2 span { color: var(--muted); font-weight: 500; font-size: 0.95rem; margin-left: 0.25rem; }
.sp-group-link { margin: -0.3rem 0 0.5rem; font-size: 0.95rem; }
.sp-older-list { columns: 2 16rem; margin: 0; padding-left: 1.1rem; font-size: 0.95rem; }

/* injected into the guide pages */
.sp-guide-list { margin: 0 0 2.5rem; }
.sp-guide-list h2 { font-size: 1.35rem; }
.sp-guide-list .sp-note { margin: -0.2rem 0 0.75rem; }

.sp-foot { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--muted); }
.sp-foot p { margin: 0 0 0.4rem; }
.sp-foot nav { margin-top: 0.75rem; line-height: 1.9; }

@media (max-width: 720px) {
  .sp-hero { grid-template-columns: 1fr; gap: 1.25rem; }
  .sp-media { max-width: 320px; }
  .sp-cols { grid-template-columns: 1fr; }
}
