/*
 Theme Name:   Sociology Daily Pro
 Theme URI:    https://sociologydaily.com
 Description:  Sociology Daily — an editorial magazine child theme for Astra. Warm, intellectual, content-first: ink-navy + terracotta on warm cream, Newsreader & Source Sans 3 typography, built for comfortable long-form reading.
 Author:       Sociology Daily
 Author URI:   https://sociologydaily.com
 Template:     astra
 Version:      4.1.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  sociology-daily
 Requires at least: 6.0
 Tested up to: 6.7
*/

/*--------------------------------------------------------------
 TABLE OF CONTENTS
 ----------------------------------------------------------------
  0.  Design Tokens (Sociology Daily system + legacy aliases)
  1.  Reset & Base
  2.  Accessibility & Focus
  3.  Layout Utilities
  4.  Typography
  5.  Top Bar (masthead strip)
  6.  Site Header & Navigation
  7.  Reading Progress Bar
  8.  Hero Section
  9.  Topic Rail
 10.  Section Headers (shared)
 11.  Featured Grid
 12.  Categories Showcase
 13.  Sociology Hub Spotlight
 14.  Trending Section
 15.  Editor's Picks
 16.  Quote Banner
 17.  Latest Articles Stream
 18.  Sidebar & Widgets
 19.  Newsletter Section
 20.  Footer & Article Tools
 21.  Responsive — ≤ 1200 px
 22.  Responsive — ≤ 992 px
 23.  Responsive — ≤ 768 px
 24.  Responsive — ≤ 480 px
 25.  Reduced Motion
 26.  Print
 27.  Astra Parent Overrides
--------------------------------------------------------------*/


/* ==========================================================================
   0. DESIGN TOKENS — Sociology Daily editorial system
   Source of truth mirrored from colors_and_type.css. The legacy --sd-*
   aliases are kept so existing inline styles & selectors stay on-brand.
   ========================================================================== */

:root {

    /* — Warm paper & cream neutrals — */
    --cream-50:   #FBF7EF;   /* page background          */
    --cream-100:  #F5EDE0;   /* sunken panels, alt rows  */
    --cream-200:  #EDE2D1;   /* hairline fills           */
    --paper:      #FFFDF8;   /* cards / raised surfaces  */
    --paper-pure: #FFFFFF;

    /* — Ink: deep navy-indigo (primary / intellect) — */
    --ink-950: #0F1228;
    --ink-900: #171B33;      /* PRIMARY brand ink        */
    --ink-800: #20264A;
    --ink-700: #2E3560;
    --ink-600: #404873;

    /* — Charcoal text — */
    --charcoal:      #2A2925; /* long-form body text     */
    --charcoal-soft: #57534C; /* secondary / captions    */
    --charcoal-mute: #857F76; /* meta, disabled          */

    /* — Terracotta + amber accents (the human side) — */
    --terracotta:      #C2593A; /* PRIMARY accent         */
    --terracotta-deep: #A4452B; /* hover / pressed        */
    --terracotta-tint: #F7E6DD; /* soft fill              */
    --amber:           #D5942B; /* secondary accent       */
    --amber-tint:      #F8ECCF;

    /* — Hairlines & borders — */
    --line:        #E7DCCB;
    --line-strong: #D8CAB4;
    --line-ink:    rgba(23, 27, 51, 0.10);

    /* — Category / topic tag colours (muted editorial) — */
    --cat-theory:        #4B4A86;  --cat-theory-tint:   #E7E6F2;
    --cat-research:      #2F6F5E;  --cat-research-tint: #DEEDE6;
    --cat-culture:       #B6553A;  --cat-culture-tint:  #F6E4DC;
    --cat-quiz:          #A9791F;  --cat-quiz-tint:     #F3E8CC;
    --cat-society:       #7A4A6B;  --cat-society-tint:  #EFE3EC;
    --cat-methods:       #3F6075;  --cat-methods-tint:  #E0E8ED;

    /* — Semantic surface roles — */
    --bg:           var(--cream-50);
    --bg-alt:       var(--cream-100);
    --surface:      var(--paper);
    --surface-sunk: var(--cream-100);
    --text:         var(--charcoal);
    --text-soft:    var(--charcoal-soft);
    --text-mute:    var(--charcoal-mute);
    --heading:      var(--ink-900);
    --accent:       var(--terracotta);
    --accent-hover: var(--terracotta-deep);
    --border:       var(--line);
    --focus-ring:   var(--terracotta);

    /* — Elevation (warm-ink-tinted, soft) — */
    --shadow-sm:  0 1px 2px  rgba(23, 27, 51, 0.06), 0 1px 1px rgba(23, 27, 51, 0.04);
    --shadow-md:  0 4px 16px rgba(23, 27, 51, 0.08), 0 1px 3px rgba(23, 27, 51, 0.05);
    --shadow-lg:  0 18px 48px rgba(23, 27, 51, 0.12), 0 4px 12px rgba(23, 27, 51, 0.06);
    --shadow-pop: 0 24px 64px rgba(15, 18, 40, 0.20);

    /* — Radii — */
    --r-xs: 5px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-pill: 999px;

    /* — Spacing scale (4 px base) — */
    --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
    --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;
    --s-9: 96px;  --s-10: 128px;

    /* — Layout — */
    --measure:        68ch;
    --container:      1200px;
    --container-wide: 1320px;
    --nav-h:          68px;

    /* — Motion — */
    --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur:      180ms;
    --dur-lg:   320ms;

    /* — Type families — */
    --font-display: "Newsreader", Georgia, "Times New Roman", serif;
    --font-body:    "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-mono:    "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;

    /* ----------------------------------------------------------------------
       LEGACY ALIASES — map the old --sd-* names onto the new palette so the
       theme's PHP inline styles and any third-party CSS stay on-brand.
       ---------------------------------------------------------------------- */
    --sd-primary:    var(--ink-900);
    --sd-secondary:  var(--terracotta);
    --sd-accent:     var(--terracotta);
    --sd-gold:       var(--amber);

    --sd-white:      var(--paper);
    --sd-ivory:      var(--cream-50);
    --sd-cream:      var(--cream-100);
    --sd-pearl:      var(--cream-200);
    --sd-sand:       var(--line);
    --sd-stone:      var(--line-strong);
    --sd-warm-gray:  var(--charcoal-mute);
    --sd-charcoal:   var(--charcoal-soft);
    --sd-ink:        var(--ink-900);
    --sd-black:      var(--ink-900);

    --sd-cat-theory:   var(--cat-theory);
    --sd-cat-research: var(--cat-research);
    --sd-cat-culture:  var(--cat-culture);
    --sd-cat-opinion:  var(--cat-methods);
    --sd-cat-review:   var(--cat-quiz);

    --sd-font-display: var(--font-display);
    --sd-font-body:    var(--font-body);
    --sd-font-sans:    var(--font-body);
    --sd-font-mono:    var(--font-mono);

    --sd-space-2xs: var(--s-1);
    --sd-space-xs:  var(--s-1);
    --sd-space-sm:  var(--s-2);
    --sd-space-md:  var(--s-4);
    --sd-space-lg:  var(--s-5);
    --sd-space-xl:  var(--s-6);
    --sd-space-2xl: var(--s-7);
    --sd-space-3xl: var(--s-8);
    --sd-space-4xl: var(--s-9);
    --sd-space-5xl: var(--s-10);

    --sd-max-width:     var(--container-wide);
    --sd-content-width: var(--measure);
    --sd-sidebar-width: 360px;

    --sd-shadow-sm: var(--shadow-sm);
    --sd-shadow-md: var(--shadow-md);
    --sd-shadow-lg: var(--shadow-lg);
    --sd-shadow-xl: var(--shadow-pop);

    --sd-ease:          var(--ease-out);
    --sd-duration-fast: var(--dur);
    --sd-duration:      var(--dur);
    --sd-duration-slow: var(--dur-lg);

    /* Decorative gradients are avoided in this system — kept as flat fills
       so any legacy reference resolves to an on-brand surface. */
    --sd-gradient-gold:  var(--terracotta);
    --sd-gradient-dark:  var(--ink-900);
    --sd-gradient-brown: var(--ink-900);
}

/* — Optional dark theme (set <html data-theme="dark">) — */
:root[data-theme="dark"] {
    --cream-50:  #12152A;
    --cream-100: #191D38;
    --cream-200: #23284A;
    --paper:     #1B1F3B;
    --paper-pure:#1B1F3B;

    --charcoal:      #ECE6DA;
    --charcoal-soft: #B3AFC4;
    --charcoal-mute: #7E7B92;

    --terracotta:      #E0754F;
    --terracotta-deep: #C25B3C;
    --terracotta-tint: #2C2236;
    --amber:           #E6AC45;
    --amber-tint:      #2E2740;

    --line:        #2B3057;
    --line-strong: #3A4070;
    --line-ink:    rgba(255, 255, 255, 0.10);

    --heading: #F3EFE6;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.6);
}


/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern", "liga";
}

/* Flat warm cream — no decorative gradients. Optional faint paper grain. */
body.sd-luxury-theme {
    background: var(--bg);
}

body.sd-luxury-theme::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.018;
    pointer-events: none;
    z-index: 0;
}

::selection {
    background-color: var(--terracotta);
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur) var(--ease-out);
}


/* ==========================================================================
   2. ACCESSIBILITY & FOCUS
   ========================================================================== */

:focus-visible {
    outline: 2.5px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

:focus:not(:focus-visible) {
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ==========================================================================
   3. LAYOUT UTILITIES
   ========================================================================== */

.sd-container {
    width: 100%;
    max-width: var(--container-wide);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 32px);
}


/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.014em;
    color: var(--heading);
    text-wrap: balance;
}

h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0;
}


/* ==========================================================================
   5. TOP BAR (thin masthead strip — disabled by default in functions.php)
   ========================================================================== */

.sd-top-bar {
    background: var(--cream-100);
    color: var(--text-soft);
    border-bottom: 1px solid var(--line);
    padding-block: 9px;
    position: relative;
    z-index: 1001;
}

.sd-top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-4);
}

.sd-top-left {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.sd-date    { color: var(--terracotta); }
.sd-divider { color: var(--line-strong); }
.sd-edition { color: var(--text-mute); }

.sd-top-center {
    flex: 1;
    text-align: center;
}

.sd-motto {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.9375rem;
    color: var(--text-soft);
}

.sd-top-right {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.sd-top-hub {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-soft);
}

.sd-top-hub:hover { color: var(--terracotta); }

.sd-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    border: 0;
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--text-soft);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

.sd-theme-toggle-track {
    width: 32px;
    height: 18px;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface);
    transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.sd-theme-toggle-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--terracotta);
    transition: transform var(--dur-lg) var(--ease-out);
}

:root[data-theme="dark"] .sd-theme-toggle-track {
    background: var(--ink-700);
    border-color: var(--terracotta);
}

:root[data-theme="dark"] .sd-theme-toggle-thumb { transform: translateX(14px); }

.sd-theme-toggle:hover { color: var(--heading); }

.sd-theme-toggle:hover .sd-theme-toggle-track {
    border-color: var(--terracotta);
}

.sd-top-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--terracotta);
    color: #fff;
    padding: 0.45rem 1.05rem;
    border-radius: var(--r-pill);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-top-subscribe:hover {
    background: var(--terracotta-deep);
    transform: translateY(-1px);
}

.sd-top-subscribe svg { transition: transform var(--dur) var(--ease-out); }
.sd-top-subscribe:hover svg { transform: translateX(3px); }


/* ==========================================================================
   6. SITE HEADER & NAVIGATION (light editorial masthead)
   ========================================================================== */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: var(--s-5) 0;
    position: relative;
}

.site-header::after { display: none; }

/* Logo / Site Title — sentence-friendly Newsreader, no ornaments */
.site-title {
    text-align: center;
}

.site-title a {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    color: var(--heading);
    letter-spacing: -0.02em;
    text-transform: none;
    display: inline-block;
}

.site-title a::before,
.site-title a::after { content: none; }

.site-description {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-style: normal;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-mute);
    text-align: center;
    margin-top: var(--s-2);
}

/* Primary navigation — sentence case, Source Sans, terracotta indicator */
.main-header-menu {
    border-top: 1px solid var(--line);
    margin-top: var(--s-5);
    padding-top: var(--s-3);
}

.main-header-menu .menu-link {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-soft) !important;
    padding: 0.6rem 1rem;
    position: relative;
}

.main-header-menu .menu-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 1rem;
    right: 1rem;
    width: auto;
    height: 2px;
    background: var(--terracotta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease-out);
}

.main-header-menu .menu-link:hover {
    color: var(--heading) !important;
}

.main-header-menu .menu-link:hover::after,
.main-header-menu .current-menu-item > .menu-link::after {
    transform: scaleX(1);
}


/* ==========================================================================
   7. READING PROGRESS BAR
   ========================================================================== */

.sd-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--cream-200);
    z-index: 9999;
    contain: layout style;
}

.sd-progress-bar {
    height: 100%;
    width: 0;
    background: var(--terracotta);
    will-change: width;
    transition: width 80ms linear;
}


/* ==========================================================================
   8. HERO SECTION
   ========================================================================== */

.sd-hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--ink-900);
    contain: layout paint;
}

.sd-hero-background {
    position: absolute;
    inset: 0;
}

.sd-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transform: scale(1.04);
    transition: transform 8s var(--ease-out);
}

.sd-hero:hover .sd-hero-image {
    transform: scale(1);
}

.sd-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 18, 40, 0.55) 0%,
        rgba(15, 18, 40, 0.62) 55%,
        rgba(15, 18, 40, 0.82) 100%
    );
}

.sd-hero .sd-container {
    position: relative;
    z-index: 2;
}

.sd-hero-content {
    max-width: 820px;
    padding-block: var(--s-9);
}

.sd-hero-meta {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
}

.sd-hero-category {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fff;
    background: var(--terracotta);
    padding: 0.32rem 0.85rem;
    border-radius: var(--r-pill);
    transition: background var(--dur) var(--ease-out);
}

.sd-hero-category:hover { background: var(--terracotta-deep); }

.sd-hero-label {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: rgba(251, 247, 239, 0.78);
}

.sd-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.4vw, 4.2rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.022em;
    color: #FBF7EF;
    margin-bottom: var(--s-5);
    text-wrap: balance;
}

.sd-hero-title a {
    color: inherit;
    background-image: linear-gradient(var(--terracotta), var(--terracotta));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left 100%;
    transition: background-size var(--dur-lg) var(--ease-out);
    padding-bottom: 2px;
}

.sd-hero-title a:hover { background-size: 100% 2px; }

.sd-hero-excerpt {
    font-family: var(--font-body);
    font-size: 1.3rem;
    line-height: 1.55;
    color: rgba(251, 247, 239, 0.82);
    margin-bottom: var(--s-6);
    max-width: 620px;
}

.sd-hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
    flex-wrap: wrap;
}

.sd-hero-author {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.sd-hero-author img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--terracotta);
}

.sd-hero-author-info {
    display: flex;
    flex-direction: column;
}

.sd-hero-author-name {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FBF7EF;
}

.sd-hero-date {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: rgba(251, 247, 239, 0.6);
}

/* Primary CTA — terracotta pill */
.sd-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--terracotta);
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: var(--r-pill);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-hero-btn:hover {
    background: var(--terracotta-deep);
    transform: translateY(-1px);
}

.sd-hero-btn svg { transition: transform var(--dur) var(--ease-out); }
.sd-hero-btn:hover svg { transform: translateX(4px); }

/* Scroll indicator */
.sd-hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    translate: -50% 0;
    text-align: center;
    z-index: 2;
}

.sd-hero-scroll span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(251, 247, 239, 0.6);
    margin-bottom: var(--s-3);
}

.sd-scroll-indicator {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(251, 247, 239, 0.5);
    border-radius: 12px;
    margin-inline: auto;
    position: relative;
}

.sd-scroll-indicator::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--terracotta);
    border-radius: 2px;
    translate: -50% 0;
    animation: sd-scroll-bounce 2s infinite;
}

@keyframes sd-scroll-bounce {
    0%, 100% { translate: -50% 0;    opacity: 1;   }
    50%      { translate: -50% 12px; opacity: 0.4; }
}


/* ==========================================================================
   9. SECTION HEADERS (shared)
   ========================================================================== */

.sd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--s-4);
    flex-wrap: wrap;
    margin-bottom: var(--s-6);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--line);
}

.sd-section-header-center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: none;
}

.sd-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terracotta);
    margin-bottom: var(--s-2);
}

/* terracotta dot motif before kickers */
.sd-section-label::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--terracotta);
    flex: none;
}

.sd-section-header-center .sd-section-label { justify-content: center; }

.sd-section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.014em;
    color: var(--heading);
    margin: 0;
}

.sd-section-desc {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--text-soft);
    margin-top: var(--s-3);
    max-width: 520px;
}

.sd-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--terracotta);
    padding-block: 0.4rem;
}

.sd-view-all:hover { color: var(--terracotta-deep); }
.sd-view-all svg { transition: transform var(--dur) var(--ease-out); }
.sd-view-all:hover svg { transform: translateX(4px); }


/* ==========================================================================
   10. FEATURED GRID
   ========================================================================== */

.sd-featured-grid {
    padding-block: var(--s-9);
    background: var(--bg);
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.sd-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: var(--s-5);
}

.sd-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-lg) var(--ease-out), box-shadow var(--dur-lg) var(--ease-out);
}

.sd-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.sd-grid-large {
    grid-column: span 2;
    grid-row: span 2;
}

.sd-grid-link {
    display: block;
    height: 100%;
}

.sd-grid-image {
    position: relative;
    height: 100%;
    min-height: 210px;
    overflow: hidden;
}

.sd-grid-large .sd-grid-image {
    min-height: 520px;
}

.sd-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-lg) var(--ease-out);
}

.sd-grid-item:hover .sd-grid-image img {
    transform: scale(1.03);
}

.sd-grid-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(15, 18, 40, 0.9) 0%,
        rgba(15, 18, 40, 0.45) 42%,
        rgba(15, 18, 40, 0.05) 100%
    );
}

.sd-no-image {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--terracotta) 24%, transparent) 1px, transparent 0) 0 0 / 14px 14px,
        linear-gradient(135deg, var(--cream-100), var(--cream-200));
}

.sd-grid-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--s-6);
    color: #FBF7EF;
}

.sd-grid-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fff;
    background: var(--terracotta);
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-pill);
    margin-bottom: var(--s-3);
}

.sd-grid-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.01em;
    color: #FBF7EF;
    margin: 0 0 var(--s-2);
}

.sd-grid-large .sd-grid-title {
    font-size: 1.85rem;
}

.sd-grid-excerpt {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(251, 247, 239, 0.82);
    margin-bottom: var(--s-3);
    display: none;
}

.sd-grid-large .sd-grid-excerpt {
    display: block;
}

.sd-grid-meta {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: rgba(251, 247, 239, 0.7);
}

.sd-grid-author {
    font-weight: 600;
    color: rgba(251, 247, 239, 0.92);
}

.sd-grid-date::before {
    content: '·';
    margin-inline: 0.4rem;
}


/* ==========================================================================
   11. CATEGORIES SHOWCASE
   ========================================================================== */

.sd-categories-section {
    padding-block: var(--s-10);
    background: var(--cream-100);
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}

.sd-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-5);
    margin-top: var(--s-6);
}

.sd-category-card {
    position: relative;
    height: 210px;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--ink-900);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-lg) var(--ease-out), box-shadow var(--dur-lg) var(--ease-out);
}

.sd-category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.sd-category-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.32;
    transition: opacity var(--dur-lg) var(--ease-out), transform var(--dur-lg) var(--ease-out);
}

.sd-category-card:hover .sd-category-bg {
    opacity: 0.45;
    transform: scale(1.05);
}

.sd-category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 18, 40, 0.7) 0%, rgba(15, 18, 40, 0.5) 100%);
}

.sd-category-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--s-6);
    color: #FBF7EF;
}

.sd-category-icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--s-3);
    color: var(--terracotta);
}

.sd-category-icon svg { width: 100%; height: 100%; }

.sd-category-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #FBF7EF;
    margin: 0 0 var(--s-1);
}

.sd-category-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(251, 247, 239, 0.65);
}

.sd-category-arrow {
    position: absolute;
    bottom: var(--s-4);
    right: var(--s-4);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--terracotta);
    color: #fff;
    opacity: 0;
    translate: -8px 0;
    transition: opacity var(--dur) var(--ease-out), translate var(--dur) var(--ease-out);
}

.sd-category-card:hover .sd-category-arrow {
    opacity: 1;
    translate: 0 0;
}


/* ==========================================================================
   12. TRENDING SECTION (dark editorial band)
   ========================================================================== */

.sd-trending-section {
    position: relative;
    padding-block: var(--s-9);
    background: var(--ink-900);
    color: #FBF7EF;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

.sd-trending-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(251, 247, 239, 0.08) 1px, transparent 0);
    background-size: 18px 18px;
    opacity: 0.5;
    pointer-events: none;
}

.sd-trending-wrapper {
    position: relative;
    max-width: 920px;
    margin-inline: auto;
}

.sd-trending-header {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    margin-bottom: var(--s-6);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid rgba(251, 247, 239, 0.12);
}

.sd-trending-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: var(--terracotta);
    color: #fff;
    flex-shrink: 0;
}

.sd-trending-icon svg { width: 22px; height: 22px; }

.sd-trending-header-text .sd-section-label { color: var(--terracotta); }
.sd-trending-header-text .sd-section-title { color: #FBF7EF; }

.sd-trending-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
}

.sd-trending-item {
    display: flex;
    align-items: flex-start;
    gap: var(--s-5);
    padding-bottom: var(--s-5);
    border-bottom: 1px solid rgba(251, 247, 239, 0.1);
}

.sd-trending-item:last-child { border-bottom: none; }

.sd-trending-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--terracotta);
    line-height: 1;
    min-width: 58px;
}

.sd-trending-content { flex: 1; }

.sd-trending-category {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--terracotta);
    margin-bottom: var(--s-1);
    display: inline-block;
}

.sd-trending-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.01em;
    margin: 0 0 var(--s-2);
}

.sd-trending-title a {
    color: #FBF7EF;
    transition: color var(--dur) var(--ease-out);
}

.sd-trending-title a:hover { color: var(--terracotta); }

.sd-trending-meta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(251, 247, 239, 0.6);
}

.sd-meta-sep { margin-inline: 6px; }

.sd-trending-thumb {
    width: 104px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--r-sm);
}

.sd-trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur) var(--ease-out);
}

.sd-trending-item:hover .sd-trending-thumb img { transform: scale(1.05); }


/* ==========================================================================
   13. EDITOR'S PICKS
   ========================================================================== */

.sd-editors-section {
    padding-block: var(--s-10);
    background: var(--bg);
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}

.sd-editors-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    background: var(--terracotta-tint);
    color: var(--terracotta-deep);
    border: 1px solid color-mix(in oklab, var(--terracotta) 28%, transparent);
    padding: 0.4rem 0.95rem;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--s-4);
}

.sd-editors-badge svg { width: 15px; height: 15px; }

.sd-editors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-6);
    margin-top: var(--s-6);
}

.sd-editor-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-lg) var(--ease-out), box-shadow var(--dur-lg) var(--ease-out);
}

.sd-editor-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.sd-editor-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.sd-editor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-lg) var(--ease-out);
}

.sd-editor-card:hover .sd-editor-image img { transform: scale(1.03); }

.sd-editor-badge {
    position: absolute;
    top: var(--s-3);
    left: var(--s-3);
    background: var(--terracotta);
    color: #fff;
    padding: 0.28rem 0.7rem;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sd-editor-content {
    padding: var(--s-6);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sd-editor-category {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--terracotta);
    margin-bottom: var(--s-2);
    display: inline-block;
}

.sd-editor-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 var(--s-3);
}

.sd-editor-title a {
    color: var(--heading);
    transition: color var(--dur) var(--ease-out);
}

.sd-editor-title a:hover { color: var(--terracotta); }

.sd-editor-excerpt {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: var(--s-4);
    flex: 1;
}

.sd-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--s-3);
    border-top: 1px solid var(--line);
}

.sd-editor-author {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-soft);
}

.sd-editor-author img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.sd-editor-read-time {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--text-mute);
}


/* ==========================================================================
   14. QUOTE BANNER (dark editorial band)
   ========================================================================== */

.sd-quote-section {
    padding-block: var(--s-10);
    background: var(--ink-950);
    position: relative;
    overflow: hidden;
}

.sd-quote-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(251, 247, 239, 0.07) 1px, transparent 0);
    background-size: 18px 18px;
    opacity: 0.5;
}

.sd-quote-wrapper {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-inline: auto;
    text-align: center;
}

.sd-quote-mark {
    font-family: var(--font-display);
    font-size: 8rem;
    line-height: 0.5;
    color: var(--terracotta);
    opacity: 0.6;
    margin-bottom: var(--s-4);
    user-select: none;
}

.sd-quote-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.32;
    letter-spacing: -0.01em;
    color: #FBF7EF;
    margin: 0 0 var(--s-6);
    border: none;
    padding: 0;
    background: transparent;
}

.sd-quote-footer {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.sd-quote-author {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terracotta);
    font-style: normal;
}

.sd-quote-work {
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
    color: rgba(251, 247, 239, 0.65);
}


/* ==========================================================================
   15. LATEST ARTICLES STREAM
   ========================================================================== */

.sd-latest-section {
    padding-block: var(--s-10);
    background: var(--bg);
    content-visibility: auto;
    contain-intrinsic-size: auto 1200px;
}

.sd-latest-wrapper {
    display: grid;
    grid-template-columns: 1fr var(--sd-sidebar-width);
    gap: var(--s-8);
}

.sd-latest-list {
    display: flex;
    flex-direction: column;
}

.sd-latest-item {
    display: flex;
    gap: var(--s-5);
    padding: var(--s-5);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--s-5);
    transition: transform var(--dur-lg) var(--ease-out), box-shadow var(--dur-lg) var(--ease-out);
}

.sd-latest-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.sd-latest-thumb {
    width: 260px;
    height: 170px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--r-md);
}

.sd-latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-lg) var(--ease-out);
}

.sd-latest-item:hover .sd-latest-thumb img { transform: scale(1.03); }

.sd-latest-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sd-latest-category {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--terracotta);
    margin-bottom: var(--s-2);
    display: inline-block;
}

.sd-latest-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.012em;
    margin: 0 0 var(--s-3);
}

.sd-latest-title a {
    color: var(--heading);
    transition: color var(--dur) var(--ease-out);
}

.sd-latest-title a:hover { color: var(--terracotta); }

.sd-latest-excerpt {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: var(--s-3);
    flex: 1;
}

.sd-latest-meta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-mute);
}

.sd-latest-author {
    font-weight: 600;
    color: var(--text-soft);
}

.sd-latest-more {
    padding-top: var(--s-6);
    text-align: center;
}

/* Load-more — ink pill button */
.sd-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--ink-900);
    color: #FBF7EF;
    padding: 0.85rem 2rem;
    border-radius: var(--r-pill);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-load-more-btn:hover {
    background: var(--ink-800);
    transform: translateY(-1px);
}


/* ==========================================================================
   16. SIDEBAR & WIDGETS
   ========================================================================== */

.sd-sidebar {
    position: sticky;
    top: var(--s-5);
}

.sd-sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: var(--s-6);
    margin-bottom: var(--s-5);
    box-shadow: var(--shadow-sm);
}

.sd-widget-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terracotta);
    margin: 0 0 var(--s-4);
    padding-bottom: var(--s-3);
    border-bottom: 1px solid var(--line);
}

.sd-widget-title span { padding-right: var(--s-3); }

/* --- Newsletter widget (dark) --- */

.sd-newsletter-widget {
    background: var(--ink-900);
    border: none;
    text-align: center;
}

.sd-newsletter-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--s-4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--terracotta);
    border-radius: 50%;
}

.sd-newsletter-icon svg { width: 26px; height: 26px; color: #fff; }

.sd-newsletter-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
    color: #FBF7EF;
    margin-bottom: var(--s-2);
}

.sd-newsletter-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(251, 247, 239, 0.72);
    margin-bottom: var(--s-4);
}

.sd-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.sd-newsletter-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #FBF7EF;
    border: 1px solid rgba(251, 247, 239, 0.2);
    border-radius: var(--r-pill);
    background: rgba(251, 247, 239, 0.07);
    transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.sd-newsletter-form input::placeholder { color: rgba(251, 247, 239, 0.5); }

.sd-newsletter-form input:focus {
    outline: none;
    border-color: var(--terracotta);
    background: rgba(251, 247, 239, 0.12);
}

.sd-newsletter-form button {
    padding: 0.8rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--r-pill);
    background: var(--terracotta);
    color: #fff;
    cursor: pointer;
    transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-newsletter-form button:hover {
    background: var(--terracotta-deep);
    transform: translateY(-1px);
}

.sd-newsletter-note {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(251, 247, 239, 0.5);
    margin-top: var(--s-3);
}

/* --- Categories widget --- */

.sd-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sd-category-list li { border-bottom: 1px solid var(--line); }
.sd-category-list li:last-child { border-bottom: none; }

.sd-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 0.7rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-soft);
    transition: color var(--dur) var(--ease-out), padding-left var(--dur) var(--ease-out);
}

.sd-category-list a:hover {
    color: var(--terracotta);
    padding-left: 0.4rem;
}

.sd-cat-count {
    background: var(--cream-100);
    border-radius: var(--r-pill);
    padding: 0.1rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-mute);
    transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.sd-category-list a:hover .sd-cat-count {
    background: var(--terracotta);
    color: #fff;
}

/* --- Popular posts widget --- */

.sd-popular-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.sd-popular-item {
    display: flex;
    gap: var(--s-4);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--line);
}

.sd-popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sd-popular-num {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--line-strong);
    line-height: 1;
    min-width: 32px;
}

.sd-popular-content h4 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--s-1);
}

.sd-popular-content h4 a {
    color: var(--heading);
    transition: color var(--dur) var(--ease-out);
}

.sd-popular-content h4 a:hover { color: var(--terracotta); }

.sd-popular-meta {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-mute);
}

/* --- Tags cloud --- */

.sd-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sd-tag {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-soft);
    padding: 0.35rem 0.85rem;
    background: var(--cream-50);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.sd-tag:hover {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: #fff;
}

/* --- About widget --- */

.sd-about-widget {
    text-align: center;
    background: var(--surface);
}

.sd-about-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--s-3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: var(--ink-900);
    color: var(--terracotta);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
}

.sd-about-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--s-2);
}

.sd-about-desc {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: var(--s-4);
}

.sd-social-links {
    display: flex;
    justify-content: center;
    gap: var(--s-2);
}

.sd-social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cream-100);
    border: 1px solid var(--line);
    color: var(--text-soft);
    transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-social-links a:hover {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: #fff;
    transform: translateY(-2px);
}

.sd-social-links svg { width: 18px; height: 18px; }


/* ==========================================================================
   17. NEWSLETTER SECTION (before footer)
   ========================================================================== */

.sd-newsletter-section {
    padding-block: var(--s-10);
    background: var(--ink-900);
    position: relative;
    overflow: hidden;
}

.sd-newsletter-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(251, 247, 239, 0.08) 1px, transparent 0);
    background-size: 18px 18px;
    opacity: 0.5;
    pointer-events: none;
}

.sd-newsletter-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-8);
    align-items: center;
    position: relative;
    z-index: 1;
}

.sd-newsletter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terracotta);
    margin-bottom: var(--s-3);
}

.sd-newsletter-label::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--terracotta);
}

.sd-newsletter-heading {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.018em;
    color: #FBF7EF;
    margin-bottom: var(--s-3);
}

.sd-newsletter-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(251, 247, 239, 0.72);
}

.sd-newsletter-form-large .sd-form-group {
    display: flex;
    gap: var(--s-2);
    flex-wrap: wrap;
}

.sd-newsletter-form-large input {
    flex: 1 1 240px;
    padding: 0.9rem 1.4rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #FBF7EF;
    border: 1px solid rgba(251, 247, 239, 0.18);
    border-radius: var(--r-pill);
    background: rgba(251, 247, 239, 0.07);
}

.sd-newsletter-form-large input::placeholder { color: rgba(251, 247, 239, 0.5); }

.sd-newsletter-form-large input:focus {
    outline: none;
    border-color: var(--terracotta);
    background: rgba(251, 247, 239, 0.12);
}

.sd-newsletter-form-large button {
    padding: 0.9rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--terracotta);
    color: #fff;
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-newsletter-form-large button:hover {
    background: var(--terracotta-deep);
    transform: translateY(-1px);
}

.sd-form-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--s-3);
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(251, 247, 239, 0.55);
}


/* ==========================================================================
   18. FOOTER
   ========================================================================== */

.sd-luxury-footer {
    background: var(--ink-950);
    color: rgba(251, 247, 239, 0.82);
    padding-top: var(--s-9);
}

.sd-footer-top {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: var(--s-9);
    padding-bottom: var(--s-8);
    border-bottom: 1px solid rgba(251, 247, 239, 0.12);
}

/* Brand lockup: strata mark + wordmark */
.sd-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sd-footer-logo::before {
    content: '';
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='15' fill='%23171B33'/%3E%3Crect x='16' y='20' width='32' height='4.5' rx='2.25' fill='%23FBF7EF'/%3E%3Crect x='16' y='29.75' width='22' height='4.5' rx='2.25' fill='%23C2593A'/%3E%3Crect x='16' y='39.5' width='28' height='4.5' rx='2.25' fill='%23FBF7EF' fill-opacity='0.78'/%3E%3C/svg%3E");
    background-size: cover;
    box-shadow: var(--shadow-sm);
}

.sd-footer-logo .sd-logo-text {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #FBF7EF;
}

.sd-footer-tagline {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--terracotta);
    margin-top: var(--s-2);
    display: block;
}

.sd-footer-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(251, 247, 239, 0.6);
    margin-top: var(--s-4);
    max-width: 320px;
}

.sd-footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-6);
}

.sd-footer-column h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terracotta);
    margin-bottom: var(--s-4);
}

.sd-footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sd-footer-column li { margin-bottom: var(--s-2); }

.sd-footer-column a {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: rgba(251, 247, 239, 0.7);
    display: inline-block;
    transition: color var(--dur) var(--ease-out), translate var(--dur) var(--ease-out);
}

.sd-footer-column a:hover {
    color: #FBF7EF;
    translate: 4px 0;
}

.sd-footer-social {
    display: flex;
    gap: var(--s-2);
    margin-bottom: var(--s-4);
}

.sd-social-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(251, 247, 239, 0.07);
    border: 1px solid rgba(251, 247, 239, 0.12);
    color: rgba(251, 247, 239, 0.8);
    transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-social-link:hover {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: #fff;
    transform: translateY(-2px);
}

.sd-social-link svg { width: 18px; height: 18px; }

.sd-footer-contact {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: rgba(251, 247, 239, 0.7);
}

.sd-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-3);
    padding-block: var(--s-6);
}

.sd-footer-copyright {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(251, 247, 239, 0.5);
}

.sd-footer-credits {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(251, 247, 239, 0.5);
}

/* Suppress default Astra footer */
.ast-footer-copyright,
.site-footer .ast-footer-overlay {
    display: none;
}


/* ==========================================================================
   19. SHORTCODE COMPONENTS
   ========================================================================== */

/* Pull-quote */
.sd-pullquote {
    position: relative;
    margin: var(--s-7) 0;
    padding: var(--s-5) var(--s-7);
    border-left: 3px solid var(--terracotta);
    background: var(--cream-100);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.32;
    letter-spacing: -0.01em;
    color: var(--ink-800);
}

.sd-pullquote cite {
    display: block;
    margin-top: var(--s-3);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--terracotta);
}

/* Concept box */
.sd-concept-box {
    margin: var(--s-7) 0;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.sd-concept-header {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-6);
    background: var(--cream-100);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-800);
}

.sd-concept-icon { color: var(--terracotta); }

.sd-concept-author {
    margin-left: auto;
    font-weight: 400;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-mute);
}

.sd-concept-content {
    padding: var(--s-6);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
}

/* Book info card */
.sd-book-info {
    display: flex;
    gap: var(--s-6);
    margin: var(--s-7) 0;
    padding: var(--s-6);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.sd-book-cover {
    width: 140px;
    flex-shrink: 0;
}

.sd-book-cover img {
    width: 100%;
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-md);
}

.sd-book-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 0 0 var(--s-1);
}

.sd-book-author {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--text-mute);
    margin-bottom: var(--s-3);
}

.sd-book-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--s-1) var(--s-4);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.sd-book-meta dt { font-weight: 600; color: var(--text-soft); }
.sd-book-meta dd { margin: 0; color: var(--text-mute); }

/* Hub auto-link */
.sd-hub-link {
    color: var(--terracotta);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 4px;
}
.sd-hub-link:hover { color: var(--terracotta-deep) !important; }

/* Per-category accent tints for tags carrying data-category */
.sd-grid-category[data-category="theory"],
.sd-latest-category[data-category="theory"]   { background: var(--cat-theory); }
.sd-grid-category[data-category="research"],
.sd-latest-category[data-category="research"] { background: var(--cat-research); }
.sd-grid-category[data-category="culture"],
.sd-latest-category[data-category="culture"]  { background: var(--cat-culture); }
.sd-grid-category[data-category="society"],
.sd-latest-category[data-category="society"]  { background: var(--cat-society); }
.sd-grid-category[data-category="methods"],
.sd-latest-category[data-category="methods"]  { background: var(--cat-methods); }


/* ==========================================================================
   20. SCROLL-REVEAL ANIMATIONS
   ========================================================================== */

.sd-animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-lg) var(--ease-out), transform var(--dur-lg) var(--ease-out);
}

.sd-animate.sd-visible {
    opacity: 1;
    transform: translateY(0);
}

.sd-grid-container  .sd-animate:nth-child(2) { transition-delay:  60ms; }
.sd-grid-container  .sd-animate:nth-child(3) { transition-delay: 120ms; }
.sd-grid-container  .sd-animate:nth-child(4) { transition-delay: 180ms; }

.sd-editors-grid    .sd-animate:nth-child(2) { transition-delay:  60ms; }
.sd-editors-grid    .sd-animate:nth-child(3) { transition-delay: 120ms; }

.sd-categories-grid .sd-animate:nth-child(2) { transition-delay:  50ms; }
.sd-categories-grid .sd-animate:nth-child(3) { transition-delay: 100ms; }
.sd-categories-grid .sd-animate:nth-child(4) { transition-delay: 150ms; }
.sd-categories-grid .sd-animate:nth-child(5) { transition-delay: 200ms; }
.sd-categories-grid .sd-animate:nth-child(6) { transition-delay: 250ms; }


/* ==========================================================================
   20A. V4.1 EDITORIAL DISCOVERY & ARTICLE TOOLS
   ========================================================================== */

/* Fast, horizontally scrollable topic navigation below the lead story. */
.sd-topic-rail {
    position: relative;
    z-index: 5;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.sd-topic-rail-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.sd-topic-rail-label {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--terracotta);
}

.sd-topic-rail-links {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding-block: var(--s-3);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.sd-topic-rail-links::-webkit-scrollbar { display: none; }

.sd-topic-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.46rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--bg);
    color: var(--text-soft);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.sd-topic-chip small {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-mute);
}

.sd-topic-chip:hover {
    color: var(--heading);
    border-color: var(--terracotta);
    background: var(--terracotta-tint);
    transform: translateY(-1px);
}

.sd-topic-chip-hub {
    border-color: var(--ink-900);
    background: var(--ink-900);
    color: #FBF7EF;
}

.sd-topic-chip-hub:hover {
    border-color: var(--terracotta);
    background: var(--terracotta);
    color: #fff;
}

/* Branded fallback artwork keeps image-light archives visually intentional. */
.sd-post-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--ink-800);
    color: #FBF7EF;
}

.sd-post-placeholder::before,
.sd-post-placeholder::after {
    content: '';
    position: absolute;
    width: 42%;
    aspect-ratio: 1;
    border: 1px solid rgba(251, 247, 239, 0.15);
    border-radius: 50%;
}

.sd-post-placeholder::before { left: -14%; top: -30%; }
.sd-post-placeholder::after { right: -16%; bottom: -32%; border-color: rgba(194, 89, 58, 0.38); }

.sd-placeholder-lines {
    position: absolute;
    inset: 12% 10%;
    border-top: 1px solid rgba(251, 247, 239, 0.12);
    border-bottom: 1px solid rgba(251, 247, 239, 0.12);
}

.sd-placeholder-lines::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid rgba(251, 247, 239, 0.08);
}

.sd-placeholder-mark {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    color: #FBF7EF;
}

.sd-placeholder-caption {
    position: relative;
    z-index: 1;
    margin-top: var(--s-2);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(251, 247, 239, 0.58);
}

.sd-post-placeholder-hero .sd-placeholder-mark { font-size: clamp(5rem, 16vw, 13rem); opacity: 0.22; }
.sd-post-placeholder-hero .sd-placeholder-caption { display: none; }

/* A distinctive bridge between publication articles and the Sociology Hub. */
.sd-concept-spotlight {
    padding-block: var(--s-9);
    background: var(--bg-alt);
    border-block: 1px solid var(--line);
}

.sd-concept-spotlight-card {
    min-height: 420px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 150px;
    overflow: hidden;
    border-radius: var(--r-xl);
    background: var(--ink-900);
    color: rgba(251, 247, 239, 0.82);
    box-shadow: var(--shadow-lg);
}

.sd-concept-spotlight-rail {
    padding-block: var(--s-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-5);
    border-right: 1px solid rgba(251, 247, 239, 0.12);
    font-family: var(--font-mono);
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.17em;
    color: rgba(251, 247, 239, 0.4);
    writing-mode: vertical-rl;
}

.sd-concept-spotlight-rail span:first-child { color: var(--terracotta); }

.sd-concept-spotlight-content { padding: clamp(32px, 6vw, 72px); }

.sd-concept-spotlight-kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding-bottom: var(--s-5);
    margin-bottom: var(--s-7);
    border-bottom: 1px solid rgba(251, 247, 239, 0.13);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(251, 247, 239, 0.52);
}

.sd-concept-spotlight-kicker a,
.sd-concept-spotlight-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #FBF7EF;
}

.sd-concept-spotlight-kicker a:hover,
.sd-concept-spotlight-link:hover { color: var(--terracotta); }

.sd-concept-spotlight-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    align-items: end;
    gap: clamp(32px, 6vw, 80px);
}

.sd-concept-eyebrow {
    display: block;
    margin-bottom: var(--s-3);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--terracotta);
}

.sd-concept-spotlight-title {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4.75rem);
    line-height: 0.98;
    color: #FBF7EF;
}

.sd-concept-originator {
    margin-top: var(--s-4);
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
    color: rgba(251, 247, 239, 0.58);
}

.sd-concept-spotlight-summary p {
    margin-bottom: var(--s-5);
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.42rem);
    line-height: 1.55;
    color: rgba(251, 247, 239, 0.78);
}

.sd-concept-spotlight-link {
    font-size: 0.9rem;
    font-weight: 600;
}

.sd-concept-spotlight-mark {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid rgba(251, 247, 239, 0.1);
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 0.72;
    letter-spacing: -0.12em;
    color: rgba(251, 247, 239, 0.08);
}

.sd-concept-spotlight-mark span:last-child { color: rgba(194, 89, 58, 0.26); }

/* Honest inactive newsletter state until a provider endpoint is configured. */
.sd-newsletter-setup-note {
    margin: var(--s-4) 0 0;
    padding: var(--s-4);
    border: 1px solid rgba(251, 247, 239, 0.18);
    border-radius: var(--r-md);
    font-size: 0.84rem;
    line-height: 1.5;
    color: rgba(251, 247, 239, 0.66);
}

.sd-newsletter-coming-soon {
    padding: var(--s-5);
    border: 1px solid rgba(251, 247, 239, 0.18);
    border-radius: var(--r-lg);
    background: rgba(251, 247, 239, 0.06);
}

.sd-newsletter-coming-soon span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terracotta);
}

.sd-newsletter-coming-soon strong {
    display: block;
    margin-block: var(--s-2);
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 500;
    color: #FBF7EF;
}

.sd-newsletter-coming-soon p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: rgba(251, 247, 239, 0.58);
}

/* Citation tools use reusable classes rather than inline styles or scripts. */
.sd-citation-box {
    margin-block: var(--s-8) var(--s-7);
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line);
    border-left: 3px solid var(--terracotta);
    border-radius: var(--r-lg);
    background: var(--bg-alt);
    box-shadow: var(--shadow-sm);
}

.sd-citation-heading { margin-bottom: var(--s-5); }

.sd-citation-heading > span,
.sd-citation-style {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terracotta);
}

.sd-citation-heading h4 {
    margin: var(--s-1) 0 0;
    font-family: var(--font-display);
    font-size: 1.45rem;
    color: var(--heading);
}

.sd-citation-row + .sd-citation-row { margin-top: var(--s-5); }
.sd-citation-style { display: block; margin-bottom: var(--s-2); }

.sd-citation-copy-area {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-5);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text);
}

.sd-citation-copy-area > span { flex: 1; }

.sd-citation-copy {
    flex: 0 0 auto;
    padding: 0.46rem 0.95rem;
    border: 0;
    border-radius: var(--r-pill);
    background: var(--terracotta);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.sd-citation-copy:hover { background: var(--terracotta-deep); }
.sd-citation-copy.is-copied { background: var(--ink-900); }


/* ==========================================================================
   21. RESPONSIVE — ≤ 1200 px
   ========================================================================== */

@media (max-width: 1200px) {

    .sd-grid-container { grid-template-columns: repeat(2, 1fr); }
    .sd-grid-large { grid-column: span 2; grid-row: span 1; }
    .sd-categories-grid { grid-template-columns: repeat(2, 1fr); }
    .sd-editors-grid { grid-template-columns: repeat(2, 1fr); }
    .sd-editors-grid .sd-editor-card:last-child { grid-column: span 2; }
    .sd-latest-wrapper { grid-template-columns: 1fr 320px; }
    .sd-footer-top { grid-template-columns: 1fr; gap: var(--s-7); }
}


/* ==========================================================================
   22. RESPONSIVE — ≤ 992 px
   ========================================================================== */

@media (max-width: 992px) {

    .sd-top-center { display: none; }
    .sd-concept-spotlight-card { grid-template-columns: 56px minmax(0, 1fr); }
    .sd-concept-spotlight-mark { display: none; }
    .sd-grid-container { grid-template-columns: 1fr; }
    .sd-grid-large { grid-column: span 1; }
    .sd-latest-wrapper { grid-template-columns: 1fr; }
    .sd-latest-sidebar { order: -1; }

    .sd-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--s-5);
    }

    .sd-newsletter-widget { grid-column: span 2; }
    .sd-newsletter-wrapper { grid-template-columns: 1fr; text-align: center; }
    .sd-newsletter-label { justify-content: center; }
    .sd-footer-links { grid-template-columns: repeat(2, 1fr); }
}


/* ==========================================================================
   23. RESPONSIVE — ≤ 768 px
   ========================================================================== */

@media (max-width: 768px) {

    .sd-theme-toggle-label { display: none; }
    .sd-hero { min-height: 70vh; }
    .sd-hero-footer { flex-direction: column; align-items: flex-start; }
    .sd-topic-rail-inner { gap: var(--s-3); }
    .sd-concept-spotlight { padding-block: var(--s-8); }
    .sd-concept-spotlight-grid { grid-template-columns: 1fr; align-items: start; }
    .sd-concept-spotlight-kicker { align-items: flex-start; flex-direction: column; }
    .sd-categories-grid { grid-template-columns: 1fr; }
    .sd-editors-grid { grid-template-columns: 1fr; }
    .sd-editors-grid .sd-editor-card:last-child { grid-column: span 1; }

    .sd-latest-item { flex-direction: column; }
    .sd-latest-thumb { width: 100%; height: 200px; }

    .sd-sidebar { grid-template-columns: 1fr; }
    .sd-newsletter-widget { grid-column: span 1; }
    .sd-newsletter-form-large .sd-form-group { flex-direction: column; }

    .sd-footer-links { grid-template-columns: 1fr; gap: var(--s-7); }
    .sd-footer-bottom { flex-direction: column; gap: var(--s-3); text-align: center; }

    .sd-book-info { flex-direction: column; }
    .sd-book-cover { width: 100%; max-width: 180px; }
}


/* ==========================================================================
   24. RESPONSIVE — ≤ 480 px
   ========================================================================== */

@media (max-width: 480px) {

    :root { --s-9: 48px; --s-10: 64px; }

    .sd-container { padding-inline: var(--s-4); }
    .sd-top-bar-inner { justify-content: space-between; gap: var(--s-2); }
    .sd-top-left { gap: var(--s-1); text-align: left; }
    .sd-divider,
    .sd-edition,
    .sd-top-hub { display: none; }
    .sd-date { font-size: 0.6rem; letter-spacing: 0.08em; }
    .sd-top-right { gap: var(--s-2); }
    .sd-top-subscribe { padding: 0.38rem 0.75rem; font-size: 0.75rem; }
    .sd-topic-rail-label { display: none; }
    .sd-topic-rail-inner { min-height: 62px; }
    .sd-concept-spotlight-card { grid-template-columns: 1fr; min-height: 0; }
    .sd-concept-spotlight-rail { display: none; }
    .sd-concept-spotlight-content { padding: var(--s-6) var(--s-5); }
    .sd-citation-copy-area { align-items: flex-start; flex-direction: column; padding: var(--s-4); }
    .sd-hero-scroll { display: none; }
}


/* ==========================================================================
   25. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .sd-hero-image { transform: none; }
    .sd-animate { opacity: 1; transform: none; }
}


/* ==========================================================================
   26. PRINT
   ========================================================================== */

@media print {

    body { background: #fff; color: #000; font-size: 12pt; }

    .sd-top-bar,
    .site-header,
    .sd-progress-container,
    .sd-hero,
    .sd-newsletter-section,
    .sd-newsletter-widget,
    .sd-luxury-footer,
    .sd-sidebar,
    .sd-hero-scroll,
    .sd-load-more-btn,
    .sd-social-links,
    .sd-footer-social,
    .sd-category-arrow {
        display: none !important;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: #555;
    }

    .sd-section-header,
    .sd-editor-card,
    .sd-latest-item { break-inside: avoid; }
}


/* ==========================================================================
   27. ASTRA PARENT OVERRIDES
   Neutralise Astra's default white/blue chrome so the editorial palette wins.
   ========================================================================== */

/* 1. Header rows → warm cream masthead */
.site-header,
.ast-main-header-wrap,
.ast-primary-header-bar,
.ast-above-header-bar,
.ast-below-header-bar,
.site-primary-header-wrap {
    background-color: var(--bg) !important;
    background-image: none !important;
}

.site-header { border-bottom: 1px solid var(--line) !important; }

/* 2. Kill stark white across the site body */
body,
html,
.site-content,
.ast-plain-container,
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single {
    background-color: var(--bg) !important;
}

/* Article surfaces become warm paper cards */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single {
    background-color: var(--surface) !important;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

/* 3. Site title & description */
.site-title a,
.ast-site-title-wrap .site-title a {
    color: var(--heading) !important;
}

.site-description,
.ast-site-identity .site-description,
.ast-site-tagline,
.ast-site-tagline-wrap {
    color: var(--text-mute) !important;
    opacity: 1 !important;
}

/* 4. Navigation links — charcoal → terracotta on hover */
.main-header-menu .menu-link,
.ast-builder-menu .menu-item > .menu-link,
.ast-builder-menu .menu-item > .ast-menu-toggle {
    color: var(--text-soft) !important;
}

.main-header-menu .menu-link:hover,
.ast-builder-menu .menu-item:hover > .menu-link,
.main-header-menu .current-menu-item > .menu-link {
    color: var(--terracotta) !important;
}

/* 5. Search icon & custom-HTML header elements */
.ast-header-search .ast-icon,
.ast-header-search .ast-icon svg,
.ast-builder-html-element,
.ast-builder-html-element a {
    color: var(--terracotta) !important;
    fill: var(--terracotta) !important;
}

/* 6. Astra primary buttons → terracotta pills */
.ast-button,
.wp-block-button__link,
button.menu-toggle,
.ast-custom-button {
    background-color: var(--terracotta) !important;
    border-color: var(--terracotta) !important;
    color: #fff !important;
    border-radius: var(--r-pill) !important;
}

.ast-button:hover,
.wp-block-button__link:hover {
    background-color: var(--terracotta-deep) !important;
    border-color: var(--terracotta-deep) !important;
}

/* 7. In-content links pick up the accent */
.ast-article-single .entry-content a:not(.sd-hub-link):not(.wp-block-button__link) {
    color: var(--terracotta);
    text-underline-offset: 2px;
}

/* Hide comments & post meta on articles */
body.single-post .comments-area,
body.single-post #comments,
body.single-post .comment-respond,
body.single-post .entry-meta .comments-link,
body.single-post .entry-meta .posted-by,
body.single-post .entry-meta .ast-terms-link,
body.single-post .entry-meta .cat-links {
    display: none !important;
}
