/* ==========================================================================
   File: /assets/css/newstyle.css
   SPORT GUIDES

   The second stylesheet: homepage, category listings and article pages.

   Loaded from includes/head-common.php immediately AFTER style.css, so it
   inherits every custom property declared on :root there (--primary,
   --accent, --gold, --hairline, --display, --sans and the rest) and
   overrides the base rules wherever a page needs a different shape.

   Add the link directly under the existing one:

     <link rel="stylesheet" href="/assets/css/style.css">
     <link rel="stylesheet" href="/assets/css/newstyle.css">

   Everything here is additive. Remove that line and every page still
   renders correctly off style.css alone - just flatter, with the stock
   article grid instead of the magazine layout.

   WHERE THE COLOURS LIVE. The palette itself is in style.css and is not
   repeated here. Section 0 below holds only the things CSS cannot derive
   from a hex custom property on its own: channel triplets for alpha
   compositing, and the handful of composite values built from them. If
   you recolour the site, edit style.css's :root first and then bring the
   six triplets in section 0 back into step with it - they are commented
   with the hex they mirror so the pairing is obvious.

   No rule below section 0 contains a hex code or a bare rgba() literal.

   Contents
     0.  Theme                 :root - triplets and composites
     1.  Hero band             .home-hero-*
     2.  Sport cards           .home-topics, .topic-*
     3.  Section rhythm        .home-block, .home-section-note
     4.  Magazine cards        .guide-grid, .home-card-*
     5.  Sidebar column        .home-sidebar-col, .home-side-*
     6.  Network strip         .network-*
     7.  Category pages        (category.php)
     8.  Article pages         (article.php)
     9.  Responsive
     10. Reduced motion
     11. Touch targets
     12. Header overflow       (a style.css shortcoming - note in place)
   ========================================================================== */


/* ==========================================================================
   0. THEME

   The triplets are "107,15,27" rather than "#6B0F1B" because rgba() needs
   the channels separately in order to take an alpha. Each one mirrors a
   variable in style.css and must be changed with it.
   ========================================================================== */

:root{
  /* -- channel triplets, kept in step with style.css --------------------- */
  --home-primary-rgb:107,15,27;        /* --primary        #6B0F1B */
  --home-accent-rgb:245,130,31;        /* --accent         #F5821F */
  --home-gold-rgb:242,183,5;           /* --gold           #F2B705 */
  --home-light-rgb:255,255,255;        /* --card           #FFFFFF */
  --home-scrim-rgb:46,6,12;            /* darker than --footer, for photos */

  /* -- bands and washes -------------------------------------------------- */
  --home-band-top:#FFFFFF;             /* top of the hero fade, into --bg   */
  --home-hero-glow:rgba(var(--home-accent-rgb),.10);
  --home-topic-wash:rgba(var(--home-accent-rgb),.07);
  --home-icon-wash:rgba(var(--home-accent-rgb),.13);
  --home-scrim:linear-gradient(180deg,
      rgba(var(--home-scrim-rgb),0) 38%,
      rgba(var(--home-scrim-rgb),.78) 100%);

  /* -- elevation and focus ----------------------------------------------- */
  --home-shadow-rest:0 1px 2px rgba(var(--home-primary-rgb),.06);
  --home-shadow-lift:0 12px 28px rgba(var(--home-primary-rgb),.14);
  --home-shadow-btn:0 6px 16px rgba(var(--home-accent-rgb),.34);
  --home-focus-ring:rgba(var(--home-accent-rgb),.42);

  /* -- the jersey trim, reused wherever a card needs an edge ------------- */
  --home-trim:linear-gradient(180deg,
      var(--accent) 0 2px,
      var(--gold)   2px 3px,
      var(--accent) 3px 5px);
}


/* ==========================================================================
   1. HERO BAND

   Full-width band between the breadcrumb and the sport cards, split 42/58 -
   editorial copy left, image right. To change the ratio, edit .home-hero's
   grid-template-columns; the two numbers only need to add up to 100.
   ========================================================================== */

.home-hero-band{
  position:relative;
  background:
    radial-gradient(ellipse at 86% 0%, var(--home-hero-glow), transparent 58%),
    linear-gradient(180deg, var(--home-band-top) 0%, var(--bg) 100%);
  border-bottom:1px solid var(--hairline);
  padding:56px 0 60px;
}

.home-hero{
  display:grid;
  grid-template-columns:42fr 58fr;
  gap:52px;
  align-items:center;
}

/* ---- Left: copy ---- */

.home-hero-copy{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:18px;
}

/* Barlow Condensed is narrow enough to take a larger size than a normal
   grotesque at the same optical weight, which is what gives the hero its
   scoreboard feel. text-wrap:balance stops a one-word last line. */
.home-hero-copy h1{
  font-family:var(--display);
  font-size:clamp(2.5rem, 4.2vw, 3.9rem);
  line-height:1.02;
  font-weight:700;
  letter-spacing:.004em;
  color:var(--primary);
  margin:0;
  text-wrap:balance;
}

.home-hero-copy > p{
  font-family:var(--sans);
  font-size:1.04rem;
  line-height:1.65;
  color:var(--secondary);
  max-width:46ch;
  margin:0;
}

.home-hero-meta{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.02em;
  color:var(--secondary);
}

.home-hero-dot{
  width:4px;height:4px;
  border-radius:50%;
  background:var(--accent);
  flex:0 0 auto;
}

.home-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:6px;
}

/* The base .btn is flat by design. At hero scale the primary action needs
   more presence, so it alone gets a shadow and a lift. */
.home-hero-actions .btn-accent{
  box-shadow:var(--home-shadow-btn);
  transition:transform .18s ease, box-shadow .18s ease;
}
.home-hero-actions .btn-accent:hover{
  transform:translateY(-2px);
}

/* A small pill above the heading - "51 sports covered" or similar. */
.home-hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 14px 6px 10px;
  border-radius:999px;
  background:var(--card);
  border:1px solid var(--hairline-strong);
  font-family:var(--sans);
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--accent-dark);
  transition:border-color .18s ease, transform .18s ease;
}
.home-hero-badge:hover{
  border-color:var(--accent);
  transform:translateY(-1px);
}
.home-hero-badge i{color:var(--accent-dark);}

/* ---- Right: image ---- */

.home-hero-figure{
  position:relative;
  margin:0;
  aspect-ratio:4/3;
  border-radius:10px;
  overflow:hidden;
  background:var(--cream);
  box-shadow:var(--home-shadow-lift);
}
.home-hero-figure img{
  width:100%;height:100%;
  object-fit:cover;
}

/* The jersey trim again, down the leading edge of the photograph. This is
   what ties the hero back to the header without repeating the header. */
.home-hero-figure::before{
  content:"";
  position:absolute;left:0;top:0;bottom:0;
  width:5px;
  background:linear-gradient(90deg,
    var(--accent) 0 2px,
    var(--gold)   2px 3px,
    var(--accent) 3px 5px);
  z-index:2;
}

.home-hero-figure figcaption{
  position:absolute;
  left:0;right:0;bottom:0;
  padding:34px 20px 14px;
  background:var(--home-scrim);
  color:var(--card);
  font-family:var(--sans);
  font-size:.78rem;
  line-height:1.45;
}


/* ==========================================================================
   2. SPORT CARDS

   The grid of top-level categories under the hero. The column count is set
   by PHP as a custom property (index.php emits style="--topic-cols:5"), so
   this file never needs to know how many categories exist. The fallback of
   3 applies if that attribute is missing.
   ========================================================================== */

.home-topics{padding:44px 0 8px;}

.topic-grid{
  display:grid;
  grid-template-columns:repeat(var(--topic-cols, 3), minmax(0,1fr));
  gap:16px;
}

.topic-card{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:24px 20px 20px;
  background:var(--card);
  border:1px solid var(--hairline);
  border-radius:10px;
  overflow:hidden;
  box-shadow:var(--home-shadow-rest);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* The trim sits along the top edge and is invisible until hover, so a row
   of five cards reads as calm until you point at one. */
.topic-card::before{
  content:"";
  position:absolute;left:0;right:0;top:0;
  height:5px;
  background:var(--home-trim);
  opacity:0;
  transition:opacity .18s ease;
}
.topic-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--home-shadow-lift);
  border-color:var(--hairline-strong);
}
.topic-card:hover::before{opacity:1;}

.topic-icon{
  display:grid;
  place-items:center;
  width:52px;height:52px;
  border-radius:10px;
  background:var(--home-icon-wash);
  color:var(--accent-dark);
  font-size:1.25rem;
}

.topic-card h3{
  font-family:var(--display);
  font-size:1.34rem;
  font-weight:700;
  line-height:1.1;
  letter-spacing:.006em;
  color:var(--primary);
  margin:0;
}

.topic-card p{
  font-family:var(--sans);
  font-size:.86rem;
  line-height:1.55;
  color:var(--secondary);
  margin:0;
}

.topic-more{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:auto;
  padding-top:8px;
  font-family:var(--sans);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--accent-dark);
}
.topic-more i{transition:transform .18s ease;}
.topic-card:hover .topic-more i{transform:translateX(3px);}

/* Past five across the cards get too narrow for a paragraph, so a second
   class squares them up and centres them. index.php adds it. */
.topic-grid-compact{gap:12px;}

.topic-grid-compact .topic-card{
  align-items:center;
  text-align:center;
  gap:8px;
  padding:20px 10px 16px;
}
.topic-grid-compact .topic-icon{
  width:46px;height:46px;
  border-radius:50%;
  font-size:1.1rem;
}
.topic-grid-compact .topic-card h3{
  font-size:1.06rem;
  line-height:1.2;
  overflow-wrap:anywhere;   /* long names wrap rather than widen the column */
}
.topic-grid-compact .topic-card p{display:none;}
.topic-grid-compact .topic-more{padding-top:2px;}


/* ==========================================================================
   3. SECTION RHYTHM

   Vertical spacing between homepage blocks, plus the small note that can
   sit under a section heading.
   ========================================================================== */

.home-block{padding:44px 0;}
.home-block + .home-block{padding-top:20px;}

.home-section-note{
  font-family:var(--sans);
  font-size:.88rem;
  line-height:1.6;
  color:var(--secondary);
  max-width:70ch;
  margin:-8px 0 22px;
}


/* ==========================================================================
   4. MAGAZINE CARDS

   The latest-guides block. The first card runs full width with the image
   beside the text; the rest fall into a normal grid beneath it.
   ========================================================================== */

.guide-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(268px, 1fr));
  gap:20px;
}

.home-card-lead{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:44fr 56fr;
  gap:0;
  overflow:hidden;
}

.home-card-thumb{
  position:relative;
  min-height:240px;
  background:var(--cream);
  overflow:hidden;
}
.home-card-thumb img{
  width:100%;height:100%;
  object-fit:cover;
  transition:transform .3s ease;
}
.home-card-lead:hover .home-card-thumb img{transform:scale(1.03);}

/* The tag sits on the photograph, so it needs a solid ground rather than
   a wash - type over an unknown image is the one place a translucent
   background cannot be contrast-checked. */
.home-card-thumb .card-tag{
  position:absolute;
  left:14px;top:14px;
  padding:5px 11px;
  border-radius:4px;
  background:var(--accent);
  color:var(--primary);
  font-family:var(--sans);
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.home-card-lead .article-body{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:28px 30px 30px;
}
.home-card-lead h3{
  font-family:var(--display);
  font-size:1.78rem;
  font-weight:700;
  line-height:1.08;
  letter-spacing:.005em;
  color:var(--primary);
  margin:0;
}
.home-card-lead p{
  font-family:var(--sans);
  font-size:.95rem;
  line-height:1.65;
  color:var(--secondary);
  margin:0;
}

.home-card-more{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-top:auto;
  font-family:var(--sans);
  font-size:.82rem;
  font-weight:700;
  color:var(--accent-dark);
}
.home-card-more i{transition:transform .18s ease;}
.home-card-more:hover i{transform:translateX(3px);}


/* ==========================================================================
   5. SIDEBAR COLUMN

   The homepage runs the standard .layout, so this only handles the extra
   widgets the homepage adds below the shared sidebar.
   ========================================================================== */

.home-sidebar-col{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.home-side-extra{
  display:flex;
  flex-direction:column;
  gap:20px;
}

/* A numbered list of the most-read guides. The numerals are the condensed
   face at a large size, which is the one place the jersey-numeral shape
   is used literally. */
.home-side-extra .rank-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.home-side-extra .rank-item{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.home-side-extra .rank-num{
  flex:0 0 auto;
  font-family:var(--display);
  font-size:1.6rem;
  font-weight:700;
  line-height:1;
  color:var(--accent);
  min-width:1.4em;
  text-align:right;
}
.home-side-extra .rank-item h4{
  font-family:var(--sans);
  font-size:.9rem;
  font-weight:600;
  line-height:1.4;
  color:var(--primary);
  margin:0;
}
.home-side-extra .rank-item h4:hover{color:var(--accent-dark);}


/* ==========================================================================
   6. NETWORK STRIP

   Full-width band at the foot of the homepage linking the sister sites.
   The grid is auto-fit, so it reflows to however many are listed rather
   than being fixed at a count.
   ========================================================================== */

.network-band{
  background:var(--primary);
  padding:34px 0 38px;
  margin-top:48px;
}

.network-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:20px;
}
.network-head h2{
  font-family:var(--display);
  font-size:1.5rem;
  font-weight:700;
  color:var(--card);
  margin:0;
}
.network-head p{
  font-family:var(--sans);
  font-size:.86rem;
  color:var(--muted-on-dark);
  margin:0;
}

.network-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
  gap:12px;
}

/* On the oxblood ground these use a white wash rather than a card, which
   keeps the band reading as one surface instead of a tray of tiles. */
.network-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-radius:8px;
  background:rgba(var(--home-light-rgb),.07);
  border:1px solid rgba(var(--home-light-rgb),.14);
  transition:background .18s ease, transform .18s ease, border-color .18s ease;
}
.network-item:hover{
  background:rgba(var(--home-light-rgb),.12);
  border-color:rgba(var(--home-accent-rgb),.55);
  transform:translateY(-2px);
}

.network-icon{
  display:grid;
  place-items:center;
  flex:0 0 auto;
  width:38px;height:38px;
  border-radius:8px;
  background:rgba(var(--home-accent-rgb),.20);
  color:var(--accent-light);
  font-size:1rem;
}

.network-text{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.network-text strong{
  font-family:var(--sans);
  font-size:.9rem;
  font-weight:700;
  color:var(--card);
  line-height:1.25;
}
.network-text span{
  font-family:var(--sans);
  font-size:.76rem;
  color:var(--muted-on-dark);
  line-height:1.35;
}

.network-arrow{
  margin-left:auto;
  flex:0 0 auto;
  color:var(--accent-light);
  font-size:.8rem;
  transition:transform .18s ease;
}
.network-item:hover .network-arrow{transform:translateX(3px);}


/* ==========================================================================
   7. CATEGORY PAGES  (category.php)

   Applies to both the five top-level pages and the fifty-one sport pages
   beneath them. The base sheet already styles these; what follows gives
   the sub-category pills more presence and sets the listing up as a
   readable index rather than a wall of cards.
   ========================================================================== */

.category-hero{
  position:relative;
  padding-left:18px;
  margin-bottom:28px;
}
/* Trim down the leading edge of the heading block - the same motif as the
   header and the hero photograph, at page scale. */
.category-hero::before{
  content:"";
  position:absolute;left:0;top:4px;bottom:4px;
  width:5px;
  border-radius:3px;
  background:linear-gradient(180deg,
    var(--accent) 0 40%,
    var(--gold)   40% 60%,
    var(--accent) 60% 100%);
}

.category-hero h1{
  font-size:clamp(2.2rem, 3.6vw, 3.1rem);
  line-height:1.04;
}

/* The row of sub-category links. On a top-level page this is the list of
   sports and is the main navigation of the site, so it is given more
   presence than style.css's plain tag treatment. The markup is
   nav.era-filter > a.era-pill (category.php, ~line 233) - no icon inside,
   so the shape has to do the work. */
.era-filter{gap:10px;margin-bottom:32px;}

.era-pill{
  padding:9px 17px;
  border-radius:999px;
  background:var(--card);
  border:1px solid var(--hairline-strong);
  font-family:var(--sans);
  font-size:.87rem;
  font-weight:600;
  color:var(--primary);
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}
.era-pill:hover{
  border-color:var(--accent);
  background:var(--home-topic-wash);
  transform:translateY(-1px);
}
/* style.css fills the active pill with --primary and white type, which is
   12.29:1 and correct - this only adds the trim underneath so the current
   sport is findable at a glance in a row of twelve. */
.era-pill.is-active{
  position:relative;
  box-shadow:0 2px 0 0 var(--accent);
}

/* Icons in the meta row take the readable orange, never the accent. */
.category-meta i{color:var(--accent-dark);}

/* ---- Pagination ---- */
/* style.css already fills .page-num.is-active with the accent and prints
   --primary on it. These add the hover affordance the base sheet leaves
   flat, and stop a disabled prev/next reacting to the pointer. */
.page-btn{
  font-family:var(--sans);
  font-weight:700;
  transition:border-color .18s ease, color .18s ease;
}
.page-btn:hover{color:var(--accent-dark);}
.page-btn.is-disabled:hover{color:inherit;}
.page-num{
  font-family:var(--display);
  font-size:.98rem;
  font-weight:700;
  transition:border-color .18s ease, color .18s ease;
}
.page-num:hover{border-color:var(--accent);color:var(--accent-dark);}


/* ==========================================================================
   8. ARTICLE PAGES  (article.php)

   style.css already lays these out. The overrides here exist for one
   reason: the display face is now condensed. Barlow Condensed sets around
   15% narrower than a normal grotesque at the same point size, so every
   heading the base sheet sizes needs the size putting back, and the two
   places style.css asks --serif to do something a condensed face cannot
   do well - italics, and long runs of large text - are moved to --sans.
   ========================================================================== */

.article-page-header{
  position:relative;
  padding-left:18px;
  margin-bottom:8px;
}
.article-page-header::before{
  content:"";
  position:absolute;left:0;top:6px;
  width:5px;height:2.4rem;
  border-radius:3px;
  background:linear-gradient(180deg,
    var(--accent) 0 40%,
    var(--gold)   40% 60%,
    var(--accent) 60% 100%);
}
.article-page-header h1{
  font-size:clamp(2.05rem, 3.3vw, 2.85rem);
  line-height:1.06;
  margin:4px 0 16px;
}

/* Headings inside the body copy. Sized up from the base sheet, and given
   a short accent rule at h2 so a long guide is scannable. */
.article-content h2{
  position:relative;
  font-size:1.78rem;
  line-height:1.14;
  margin:40px 0 14px;
  padding-top:14px;
}
.article-content h2::before{
  content:"";
  position:absolute;left:0;top:0;
  width:34px;height:3px;
  background:var(--accent);
}
.article-content h3{
  font-size:1.4rem;
  line-height:1.2;
  margin:30px 0 10px;
}

/* A condensed face has no true italic in the weights loaded, and a large
   run of condensed type is tiring to read, so the pull quote goes to the
   body face and earns its emphasis from the rule and the colour instead. */
.article-content blockquote{
  font-family:var(--sans);
  font-style:normal;
  font-size:1.06rem;
  line-height:1.65;
  font-weight:500;
  border-left:4px solid var(--accent);
  background:var(--home-topic-wash);
  border-radius:0 8px 8px 0;
  margin:26px 0;
  padding:16px 20px;
  color:var(--primary);
}
.article-content blockquote p:last-child{margin-bottom:0;}

/* Safety notes. Sport Guides carries a lot of "do not attempt this without
   a coach" copy, and a note that looks like body text will be skipped, so
   any <div class="note"> in an article body gets an amber edge and a
   deliberately weak fill - a strong fill behind a safety warning reads as
   alarmist rather than clear. */
.article-content .note{
  border-left:4px solid var(--gold);
  background:rgba(var(--home-gold-rgb),.10);
  border-radius:0 8px 8px 0;
  padding:14px 18px;
  margin:24px 0;
  font-size:.95rem;
  line-height:1.65;
}
.article-content .note strong{color:var(--primary);}
.article-content .note p:last-child{margin-bottom:0;}

/* Tables - rules explanations and event comparisons use a lot of these. */
.article-content table{
  width:100%;
  border-collapse:collapse;
  margin:24px 0;
  font-size:.94rem;
}
.article-content th{
  text-align:left;
  font-family:var(--sans);
  font-weight:700;
  color:var(--card);
  background:var(--primary);
  padding:10px 12px;
}
.article-content td{
  padding:10px 12px;
  border-bottom:1px solid var(--hairline);
  vertical-align:top;
}
.article-content tbody tr:nth-child(even){background:var(--cream);}

.article-tag{
  font-family:var(--sans);
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.related-articles{margin-top:52px;}


/* ==========================================================================
   9. RESPONSIVE

   Breakpoints match style.css (1080 / 900 / 560) so the two stylesheets
   reflow together rather than fighting each other.
   ========================================================================== */

@media (max-width:1080px){
  .home-hero{gap:40px;}
  .home-hero-band{padding:44px 0 48px;}

  /* Cap the run at 4 across on a tablet however many the desktop shows,
     then let the PHP's intent resume at the next breakpoint down. */
  .topic-grid{grid-template-columns:repeat(min(var(--topic-cols, 3), 4), minmax(0,1fr));}

  /* .layout collapses to one column here and aside.sidebar becomes a
     wrapping row (style.css), so the homepage extras match that shape. */
  .home-side-extra{flex-direction:row;flex-wrap:wrap;}
  .home-side-extra > .widget{flex:1 1 260px;}
}

@media (max-width:900px){
  .home-hero{grid-template-columns:1fr;gap:32px;}
  /* Image first on narrow screens - it establishes what the page is
     about faster than the heading does. */
  .home-hero-figure{order:-1;aspect-ratio:16/9;}
  .home-hero-copy{gap:14px;}

  .topic-grid{grid-template-columns:repeat(min(var(--topic-cols, 3), 3), minmax(0,1fr));}

  .guide-grid{grid-template-columns:1fr;}
  .home-card-lead{grid-template-columns:1fr;}
  .home-card-lead .home-card-thumb{min-height:0;aspect-ratio:16/9;}
  .home-card-lead .article-body{padding:20px 22px 22px;}
  .home-card-lead h3{font-size:1.45rem;}

  .article-content table{display:block;overflow-x:auto;}
}

@media (max-width:560px){
  .home-hero-band{padding:32px 0 36px;}
  .home-hero-actions{width:100%;}
  .home-hero-actions .btn{flex:1 1 100%;justify-content:center;}

  .topic-grid{grid-template-columns:repeat(2, minmax(0,1fr));}
  .topic-grid .topic-card p{display:none;}

  .network-grid{grid-template-columns:1fr;}
  .network-band{padding:26px 0 30px;}

  .category-hero,
  .article-page-header{padding-left:14px;}
}


/* ==========================================================================
   10. REDUCED MOTION
   style.css already kills transitions globally under this query; these
   reset the transforms those transitions were carrying.
   ========================================================================== */

@media (prefers-reduced-motion:reduce){
  .topic-card:hover,
  .network-item:hover,
  .era-pill:hover,
  .home-hero-badge:hover,
  .home-hero-actions .btn-accent:hover{transform:none;}

  .topic-card:hover .topic-more i,
  .network-item:hover .network-arrow,
  .home-card-more:hover i{transform:none;}

  .home-card-lead:hover .home-card-thumb img{transform:none;}
  .topic-card::before{transition:none;}
}


/* ==========================================================================
   11. TOUCH TARGETS
   Below 900px the layout is being driven by a finger rather than a cursor.
   The WCAG 2.5.8 minimum is 24x24 CSS px; the practical guideline most
   design systems use is 44x44, which is what these aim for.

   Scoped to the mobile breakpoint deliberately - applying it at every
   width would inflate the desktop layout, where a mouse makes it
   unnecessary.
   ========================================================================== */

@media (max-width:900px){
  .era-pill,
  .page-num,
  .page-btn,
  .home-hero-badge{min-height:44px;display:inline-flex;align-items:center;}

  .topic-more,
  .home-card-more{min-height:44px;align-items:center;}
}

/* The focus ring is defined in style.css and is deliberately not
   overridden here. This only adds one for the cards, which are anchors
   wrapping a whole block and would otherwise show the ring around a very
   large rectangle with no indication of which part is the link. */
.topic-card:focus-visible,
.network-item:focus-visible{
  outline:3px solid var(--primary);
  outline-offset:3px;
  box-shadow:0 0 0 6px var(--home-focus-ring);
}


/* ==========================================================================
   12. HEADER OVERFLOW

   Not a homepage rule, but it belongs with the file that is loaded last.
   style.css sets .logo-link img to a fixed 310px width and lays the header
   out with flex. Five category names in the nav plus the search box
   overflows that at anything under about 1200px and the whole page scrolls
   sideways. min-width:0 is the load-bearing line - without it a flex item
   will not shrink below its content whatever its basis says.
   ========================================================================== */

.logo-link{min-width:0;}
.logo-link img{max-width:100%;}
nav.primary-nav{min-width:0;}

.nav-list{flex-wrap:wrap;row-gap:4px;}

.header-actions{flex:0 1 auto;min-width:0;}

@media (max-width:1200px){
  .header-inner{gap:14px;}
  .header-search{min-width:0;flex:1 1 auto;}
  .logo-link img{width:auto;max-width:200px;height:40px;}
}
@media (max-width:560px){
  .logo-link img{max-width:170px;}
}