/*
Theme Name: The New Economist
Theme URI: https://neweconomist.co.uk
Author: The New Economist
Description: A modern editorial block theme for an evidence-led economics publication. Warm vermilion palette, Space Grotesk headlines, Inter body, self-hosted fonts, tuned for fast long-form reading.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: new-economist
Tags: blog, news, editorial, block-patterns, full-site-editing, custom-colors, custom-logo, two-columns, wide-blocks, accessibility-ready
*/

/* ==========================================================================
   1. LINK DISCIPLINE  — headings and titles must never be underlined
   ========================================================================== */
.wp-block-post-title a,
.wp-block-site-title a,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.wp-block-heading a,
.ne-hero a,
.wp-block-navigation a,
.wp-block-post-terms a,
.wp-block-query-pagination a {
  text-decoration: none !important;
}

.wp-block-post-title a { color: #1c140f; transition: color .15s ease; }
.wp-block-post-title a:hover,
.wp-block-post-title a:focus { color: #c8431f; }

/* Hero headline stays cream, never link-coloured */
.ne-hero h1 a, .ne-hero h2 a, .ne-hero h3 a { color: #fffaf6 !important; }
.ne-hero h1 a:hover, .ne-hero h2 a:hover { opacity: .88; }

/* Body copy links keep an underline — that's correct for prose */
.entry-content a:not(.wp-element-button),
.wp-block-post-content a:not(.wp-element-button) {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(200,67,31,.4);
}
.entry-content a:not(.wp-element-button):hover,
.wp-block-post-content a:not(.wp-element-button):hover {
  text-decoration-color: #c8431f;
}

/* ==========================================================================
   2. HEADER / LOGO
   ========================================================================== */
.wp-block-site-logo img { height: auto; }
.ne-header { position: relative; z-index: 20; }
.ne-header .wp-block-navigation__responsive-container-open,
.ne-header .wp-block-navigation__responsive-container-close { color: #1c140f; }

/* ==========================================================================
   3. CATEGORY / TAG PILLS
   ========================================================================== */
.ne-tag{display:inline-block;font-family:Inter,sans-serif;font-size:.68rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.09em;padding:.3rem .75rem;border-radius:2rem;line-height:1.4;}
.ne-tag--explainer{color:#b3611a;background:#fbeed8;}
.ne-tag--evidence{color:#0f7a63;background:#e2f4ee;}
.ne-tag--data{color:#185f9a;background:#e3eef8;}
.ne-tag--lead{color:#c8431f;background:#f5d8a8;}

/* Post terms as small caps, not shouty links */
.wp-block-post-terms a { color:#c8431f; font-weight:700; }
.wp-block-post-terms a:hover { color:#1c140f; }

.ne-eyebrow{font-family:Inter,sans-serif;font-size:.72rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.15em;color:#c8431f;}

/* ==========================================================================
   4. READING COMFORT
   ========================================================================== */
.wp-block-post-content p,
.entry-content p { max-width: 68ch; }
.wp-block-post-content { font-size: 1.15rem; line-height: 1.72; }
.wp-block-post-content h2 { margin-top: 2.6rem; margin-bottom: .8rem; }
.wp-block-post-content h3 { margin-top: 2rem; margin-bottom: .6rem; }
.wp-block-post-content blockquote {
  border-left: 3px solid #c8431f; padding-left: 1.4rem; margin-left: 0;
  font-style: normal; color: #4a4038;
}
.wp-block-post-content ul, .wp-block-post-content ol { max-width: 66ch; }
.wp-block-post-content figcaption { font-size:.85rem; color:#877c72; }

/* Drop-cap-free, but give the first paragraph presence */
.ne-standfirst { font-size:1.28rem; line-height:1.55; color:#4a4038; max-width:64ch; }

/* ==========================================================================
   5. CARDS
   ========================================================================== */
.ne-card{border:1px solid #f0e9e1;border-radius:12px;padding:1.6rem 1.7rem;background:#fff;
  transition:border-color .15s ease, transform .15s ease;height:100%;}
.ne-card:hover{border-color:#e2d3c4;}
.ne-card h3{margin-top:.7rem;margin-bottom:.5rem;}

/* Query loop items get a divider rhythm */
.ne-loop .wp-block-post{border-bottom:1px solid #f2ede8;padding-bottom:2.2rem;}
.ne-loop .wp-block-post:last-child{border-bottom:none;}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.ne-footer a{color:#fffaf6;text-decoration:none;}
.ne-footer a:hover{color:#e8a33d;}

/* ==========================================================================
   7. PAGINATION
   ========================================================================== */
.wp-block-query-pagination-numbers .page-numbers{
  padding:.35rem .7rem;border-radius:6px;text-decoration:none;}
.wp-block-query-pagination-numbers .current{background:#c8431f;color:#fffaf6;}

/* ==========================================================================
   8. ACCESSIBILITY
   ========================================================================== */
:where(a:focus-visible), :where(button:focus-visible), :where(input:focus-visible){
  outline:2px solid #c8431f; outline-offset:2px;
}
.skip-link{position:absolute;left:-9999px;top:0;background:#1c140f;color:#fffaf6;
  padding:.7rem 1.2rem;z-index:9999;border-radius:0 0 6px 0;}
.skip-link:focus{left:0;}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */
@media (max-width: 781px){
  .ne-hero{padding:2rem 1.4rem !important;}
  .wp-block-post-content{font-size:1.08rem;}
}

/* ========================================================================== 
   10. PRINT — economics readers print explainers
   ========================================================================== */
@media print{
  .ne-header, .ne-footer, .wp-block-navigation, .ne-newsletter{display:none !important;}
  body{font-size:11pt;color:#000;}
  a{text-decoration:none;color:#000;}
}
