/* ============================================================
   tennisyard.com — Design System
   Fraunces (serif, variable) + JetBrains Mono
   Court green / cream / clay accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* === Colors === ESPN-inspired palette: red / black / white / cool grey === */
  --ink: #000000;          /* pure black — header bars, footer, dark feature blocks */
  --ink-soft: #1a1a1a;     /* slightly softer black */
  --paper: #ffffff;        /* pure white background */
  --paper-2: #f4f4f5;      /* very light cool grey */
  --paper-3: #e5e5e5;      /* light cool grey — dividers, subtle surfaces */
  --court: #cc0000;        /* ESPN red — primary brand color (kept the variable name) */
  --court-dark: #990000;   /* darker red — hovers, deeper accents */
  --court-soft: #e62020;   /* lighter red — secondary state */
  --clay: #d4001a;         /* slightly brighter accent red — live / breaking / top-pick */
  --clay-soft: #ff1a33;    /* light vivid red — emphasis on dark backgrounds */
  --line: #d4d4d4;         /* cool grey divider */
  --line-soft: #e5e5e5;
  --muted: #595959;        /* cool grey body-secondary text */
  --muted-2: #8a8a8a;

  /* === Type === */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* === Layout === */
  --container: 1280px;
  --container-wide: 1440px;
  --container-narrow: 720px;
  --container-medium: 960px;

  /* === Other === */
  --radius-sm: 2px;
  --radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--clay); }

::selection { background: var(--court); color: var(--paper); }

/* ============================================================
   Containers
   ============================================================ */

.container { max-width: var(--container); margin: 0 auto; padding: 0 2rem; }
.container--wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 2rem; }
.container--narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.5rem; }
.container--medium { max-width: var(--container-medium); margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   Labels (mono, uppercase, tracked)
   ============================================================ */

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
}
.label--clay  { color: var(--clay); }
.label--court { color: var(--court); }
.label--ink   { color: var(--ink); }
.label--lg    { font-size: 0.8rem; }
.label--sm    { font-size: 0.62rem; letter-spacing: 0.22em; }

/* ============================================================
   Court line decorations (the brand motif)
   ============================================================ */

.court-line { display: block; height: 1px; background: var(--line); width: 100%; }
.court-line--ink { background: var(--ink); }
.court-line--double {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  height: 5px;
}
.court-line--double-ink {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  height: 5px;
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2rem;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "opsz" 144;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1;
}
.nav__logo .dot {
  color: var(--clay);
  font-style: normal;
  font-weight: 700;
}

.nav__links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s;
}
.nav__links a:hover { color: var(--clay); }
.nav__links a.active { color: var(--clay); }

.nav__right { display: flex; align-items: center; gap: 1.5rem; }
.nav__search {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: none;
  border: 1px solid var(--ink);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.18s;
}
.nav__search:hover { background: var(--ink); color: var(--paper); }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0.85rem 1.4rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
  font-weight: 500;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.btn--clay { background: var(--clay); color: var(--paper); border-color: var(--clay); }
.btn--clay:hover { background: var(--ink); border-color: var(--ink); }

.btn--court { background: var(--court); color: var(--paper); border-color: var(--court); }
.btn--court:hover { background: var(--court-dark); border-color: var(--court-dark); }

.btn--ghost { background: transparent; }

/* ============================================================
   Typography utilities
   ============================================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--clay);
  font-weight: 500;
  margin-bottom: 1rem;
}

.h1, h1.display {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.h2, h2.display {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.h3, h3.display {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 60;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
}

.italic { font-style: italic; font-variation-settings: "SOFT" 80, "opsz" 144; }
.serif-italic { font-style: italic; font-variation-settings: "SOFT" 100; }

.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
}

.byline {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ============================================================
   Article cards
   ============================================================ */

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  transition: opacity 0.18s;
}
.card:hover { opacity: 0.85; }
.card:hover .card__title { color: var(--clay); }

.card__image {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.card__title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 60;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  transition: color 0.18s;
}

.card__excerpt {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.card--large .card__title { font-size: 2.2rem; line-height: 1.05; }
.card--large .card__image { aspect-ratio: 16 / 10; }
.card--large .card__excerpt { font-size: 1.05rem; color: var(--ink-soft); }

.card--horizontal {
  flex-direction: row;
  gap: 1.5rem;
  align-items: stretch;
}
.card--horizontal .card__image {
  width: 240px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  margin-bottom: 0;
}
.card--horizontal .card__body { flex: 1; padding-top: 0.5rem; }

/* ============================================================
   Visual placeholders (for product images)
   ============================================================ */

.viz {
  width: 100%;
  height: 100%;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.viz--court { background: var(--court); color: var(--paper); }
.viz--clay { background: var(--clay); color: var(--paper); }
.viz--dark { background: var(--ink); color: var(--paper); }
.viz--paper2 { background: var(--paper-2); }
.viz--paper3 { background: var(--paper-3); }

.viz__corner-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.7;
}

.viz__corner-label--br { top: auto; left: auto; bottom: 1rem; right: 1rem; }

/* ============================================================
   Rating badge (mono, scoreboard-style)
   ============================================================ */

.rating {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}
.rating__score { font-size: 2.4rem; line-height: 1; letter-spacing: -0.02em; }
.rating__max { font-size: 0.95rem; color: var(--muted); }

.rating--lg .rating__score { font-size: 4.5rem; }
.rating--sm .rating__score { font-size: 1.4rem; }

.rating-card {
  border: 1px solid var(--ink);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
}

/* ============================================================
   Spec box (scorecard look)
   ============================================================ */

.specs {
  border: 1px solid var(--ink);
  background: var(--paper);
}
.specs__header {
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
}
.specs__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.specs__row:last-child { border-bottom: none; }
.specs__row .key {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.specs__row .val {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}

/* ============================================================
   Score bars (Power / Spin / Control / Comfort / Durability)
   ============================================================ */

.scores { display: flex; flex-direction: column; gap: 1.1rem; }
.score {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  align-items: center;
  gap: 1.2rem;
}
.score__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink);
  font-weight: 500;
}
.score__bar {
  height: 8px;
  background: var(--paper-3);
  position: relative;
}
.score__bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--court);
}
.score__value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}

/* ============================================================
   Pull quote
   ============================================================ */

.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--ink);
  padding: 2rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin: 2.5rem 0;
  position: relative;
}
.pullquote::before {
  content: "“";
  font-size: 4rem;
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  color: var(--clay);
  line-height: 1;
}

/* ============================================================
   Prose (article body)
   ============================================================ */

.prose {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 12;
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 680px;
}
.prose p { margin-bottom: 1.4rem; }
.prose p:first-of-type::first-letter {
  font-size: 4.2em;
  float: left;
  line-height: 0.85;
  padding-right: 0.12em;
  padding-top: 0.1em;
  font-weight: 500;
  color: var(--court);
  font-variation-settings: "opsz" 144;
}
.prose h2 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 60;
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.prose h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}
.prose ul, .prose ol { margin: 0 0 1.4rem 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--court); text-decoration-thickness: 1px; }

/* ============================================================
   Comparison table
   ============================================================ */

.compare {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.compare th {
  background: var(--ink);
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  padding: 0.9rem 1rem;
  text-align: left;
  font-weight: 500;
  border-right: 1px solid var(--court-dark);
}
.compare th:last-child { border-right: none; }
.compare td {
  padding: 1rem;
  border-bottom: 1px dashed var(--line);
  border-right: 1px dashed var(--line);
  vertical-align: top;
}
.compare td:last-child { border-right: none; }
.compare tr:last-child td { border-bottom: none; }
.compare tr:nth-child(even) td { background: var(--paper-2); }
.compare .product {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}
.compare .tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--clay);
  color: var(--paper);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  margin-top: 0.4rem;
}
.compare .score-cell { font-weight: 600; color: var(--court); font-size: 1rem; }

/* ============================================================
   Pick cards (top pick / best value / etc)
   ============================================================ */

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.pick {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pick__badge {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 0.4rem 0.7rem;
  width: fit-content;
}
.pick__badge--clay { background: var(--clay); }
.pick__badge--court { background: var(--court); }
.pick__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.pick__excerpt { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--court-soft);
}
.footer__brand .nav__logo { color: var(--paper); font-size: 2rem; }
.footer__brand .nav__logo .dot { color: var(--clay); }
.footer__tagline { color: var(--paper-3); margin-top: 0.5rem; max-width: 320px; }
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--paper-3);
  margin-bottom: 1rem;
  font-weight: 500;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer__col a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.18s;
}
.footer__col a:hover { color: var(--clay-soft); }
.footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--paper-3);
}

/* ============================================================
   Newsletter strip
   ============================================================ */

.newsletter {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 2rem;
  text-align: center;
}
.newsletter h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.newsletter p { color: var(--paper-3); max-width: 480px; margin: 0 auto 2rem; }
.newsletter__form { display: flex; max-width: 460px; margin: 0 auto; gap: 0; }
.newsletter__form input {
  flex: 1;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--paper);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.newsletter__form input::placeholder { color: var(--paper-3); }
.newsletter__form button {
  background: var(--clay);
  color: var(--paper);
  border: 1px solid var(--clay);
  padding: 0 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background 0.18s;
  font-weight: 500;
}
.newsletter__form button:hover { background: var(--clay-soft); border-color: var(--clay-soft); }

/* ============================================================
   Tag chips
   ============================================================ */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
}
.chip:hover { background: var(--ink); color: var(--paper); }
.chip.active { background: var(--clay); color: var(--paper); border-color: var(--clay); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .nav__links { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .card--horizontal { flex-direction: column; }
  .card--horizontal .card__image { width: 100%; aspect-ratio: 4 / 3; }
  .score { grid-template-columns: 90px 1fr 50px; gap: 0.8rem; }
}

@media (max-width: 600px) {
  .container, .container--wide, .container--narrow, .container--medium { padding: 0 1.25rem; }
  .nav { padding: 1rem 1.25rem; }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form button { padding: 0.95rem; }
  .prose p:first-of-type::first-letter { font-size: 3.4em; }
}

/* ============================================================
   Pagination — used by every paginated hub (journal / topic /
   author / category listings). Markup lives in
   html/templates/_pagination.html: a wrapping <nav.pagination>,
   prev/next anchors, and an <ol.page-numbers> with one <li> per
   page. The <ol> needs explicit list-style: none or the browser
   renders its default 1. 2. 3. counter next to the page-number
   content, producing "1. 1 / 2. 2" tiles.
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  flex-wrap: wrap;
}
.pagination .page-prev,
.pagination .page-next {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.2rem;
}
.pagination .page-prev:hover,
.pagination .page-next:hover {
  color: var(--clay);
  border-color: var(--clay);
}
.pagination .page-prev.disabled,
.pagination .page-next.disabled {
  color: var(--muted);
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}
.pagination .page-numbers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.pagination .page-numbers li {
  display: block;
}
.pagination .page-numbers a,
.pagination .page-numbers span {
  display: inline-block;
  min-width: 2.2rem;
  text-align: center;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pagination .page-numbers a:hover {
  background: var(--paper-2);
  border-color: var(--ink);
}
.pagination .page-numbers li.current span {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  font-weight: 600;
}

@media (max-width: 600px) {
  .pagination { gap: 1rem; }
  .pagination .page-numbers { gap: 0.25rem; }
  .pagination .page-numbers a,
  .pagination .page-numbers span { min-width: 1.9rem; padding: 0.4rem 0.45rem; }
}

