/*
Theme Name: Datastory
Theme URI: https://example.com/datastory
Author: Datastory
Author URI: https://example.com
Description: A distraction-free data storytelling theme. Features an animated chart hero, a scrollable carousel of animated chart cards, animated stat counters, and a raw-HTML friendly single post template designed to pair with the "HTML Story Importer" plugin (imports .html / .zip files as native posts, unaltered).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: datastory
Tags: blog, one-column, two-columns, custom-menu, custom-logo, editor-style, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
        --ds-bg: #faf9f6;
        --ds-surface: #ffffff;
        --ds-ink: #191813;
        --ds-ink-2: #4f4d44;
        --ds-muted: #8b887c;
        --ds-line: #e6e3da;
        --ds-line-soft: #eeebe3;
        --ds-accent: #d4552a;
        --ds-accent-2: #2a6f77;
        --ds-accent-3: #3d5a80;
        --ds-accent-4: #7a8450;
        --ds-accent-5: #c9a227;

        --ds-max: 1200px;
        --ds-content: 760px;
        --ds-wide: 1160px;
        --ds-radius: 16px;
        --ds-radius-sm: 10px;

        --ds-font-head: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
        --ds-font-body: "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;

        --ds-shadow: 0 10px 30px rgba(25, 24, 19, 0.07);
        --ds-shadow-lift: 0 16px 40px rgba(25, 24, 19, 0.12);
        --ds-header-h: 64px;
}

/* =========================================================
   2. BASE / RESET
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
        margin: 0;
        background: var(--ds-bg);
        color: var(--ds-ink);
        font-family: var(--ds-font-body);
        font-size: 17px;
        line-height: 1.65;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
}

img, svg, video, canvas, iframe { max-width: 100%; height: auto; }
iframe { border: 0; }

h1, h2, h3, h4, h5, h6 {
        font-family: var(--ds-font-head);
        font-weight: 600;
        line-height: 1.12;
        letter-spacing: -0.015em;
        color: var(--ds-ink);
        margin: 0 0 0.6em;
}

p { margin: 0 0 1.1em; }

a {
        color: var(--ds-ink);
        text-decoration: underline;
        text-decoration-color: rgba(25, 24, 19, 0.35);
        text-underline-offset: 3px;
        transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover { color: var(--ds-accent); text-decoration-color: var(--ds-accent); }

blockquote {
        margin: 1.6em 0;
        padding: 0.2em 0 0.2em 1.4em;
        border-left: 3px solid var(--ds-accent);
        color: var(--ds-ink-2);
        font-size: 1.08em;
}

code, kbd {
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        font-size: 0.88em;
        background: #f0eee6;
        padding: 0.15em 0.4em;
        border-radius: 6px;
}
pre {
        background: #f2f0e9;
        border: 1px solid var(--ds-line);
        border-radius: var(--ds-radius-sm);
        padding: 18px 20px;
        overflow: auto;
        line-height: 1.5;
        font-size: 0.9em;
}
pre code { background: transparent; padding: 0; }

table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.4em 0;
        font-size: 0.95em;
}
th, td { border: 1px solid var(--ds-line); padding: 10px 12px; text-align: left; }
th { font-family: var(--ds-font-head); font-weight: 600; background: #f4f2ea; }

hr { border: 0; border-top: 1px solid var(--ds-line); margin: 2.4em 0; }

::selection { background: rgba(212, 85, 42, 0.22); }

:focus-visible {
        outline: 2px solid var(--ds-accent);
        outline-offset: 2px;
        border-radius: 4px;
}

.skip-link {
        position: absolute;
        left: -9999px;
        top: 0;
        background: var(--ds-ink);
        color: #fff;
        padding: 10px 18px;
        z-index: 999;
        border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

.screen-reader-text {
        border: 0;
        clip: rect(1px, 1px, 1px, 1px);
        clip-path: inset(50%);
        height: 1px;
        width: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute !important;
        word-wrap: normal !important;
}

.ds-container {
        max-width: var(--ds-max);
        margin-inline: auto;
        padding-inline: clamp(20px, 4vw, 44px);
}

.ds-kicker {
        font-family: var(--ds-font-head);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--ds-accent);
        margin-bottom: 14px;
}

.ds-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        font-family: var(--ds-font-head);
        font-weight: 600;
        font-size: 15px;
        letter-spacing: 0.02em;
        padding: 13px 26px;
        border-radius: 999px;
        background: var(--ds-ink);
        color: #fff;
        text-decoration: none;
        border: 1px solid var(--ds-ink);
        transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
        cursor: pointer;
}
.ds-btn:hover {
        background: var(--ds-accent);
        border-color: var(--ds-accent);
        color: #fff;
        transform: translateY(-1px);
}
.ds-btn--ghost {
        background: transparent;
        color: var(--ds-ink);
        border-color: var(--ds-ink);
}
.ds-btn--ghost:hover { background: var(--ds-ink); color: #fff; }
.ds-btn--text {
        background: transparent;
        border-color: transparent;
        color: var(--ds-accent);
        padding: 8px 0;
        gap: 6px;
}
.ds-btn--text:hover { background: transparent; color: var(--ds-ink); transform: none; }

/* =========================================================
   3. HEADER / NAVIGATION
   ========================================================= */
.ds-header {
        position: sticky;
        top: 0;
        z-index: 90;
        background: rgba(250, 249, 246, 0.92);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--ds-line);
        transition: box-shadow 0.3s ease;
}
.ds-header.is-scrolled { box-shadow: 0 6px 24px rgba(25, 24, 19, 0.06); }
body.ds-header-static .ds-header { position: relative; }

.ds-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        min-height: var(--ds-header-h);
}

.ds-brand {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
}
.ds-brand:hover { color: var(--ds-ink); }
.ds-brand img.custom-logo { max-height: 40px; width: auto; }
.ds-brand__title {
        font-family: var(--ds-font-head);
        font-weight: 700;
        font-size: 19px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--ds-ink);
}
.ds-brand__title em { font-style: normal; color: var(--ds-accent); }

.ds-nav { display: flex; align-items: center; }
.ds-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 4px;
}
.ds-nav li { position: relative; }
.ds-nav a {
        display: inline-block;
        font-family: var(--ds-font-head);
        font-size: 15px;
        font-weight: 500;
        letter-spacing: 0.03em;
        text-decoration: none;
        color: var(--ds-ink-2);
        padding: 8px 12px;
        border-radius: 8px;
}
.ds-nav a:hover,
.ds-nav .current-menu-item > a,
.ds-nav .current_page_item > a {
        color: var(--ds-ink);
        background: rgba(25, 24, 19, 0.05);
}
.ds-nav .sub-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        min-width: 210px;
        display: block;
        background: var(--ds-surface);
        border: 1px solid var(--ds-line);
        border-radius: var(--ds-radius-sm);
        box-shadow: var(--ds-shadow);
        padding: 8px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.ds-nav li:hover > .sub-menu,
.ds-nav li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
}
.ds-nav .sub-menu a {
        display: block;
        padding: 9px 12px;
        font-size: 14.5px;
        border-radius: 8px;
}

.ds-burger {
        display: none;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        background: transparent;
        border: 1px solid var(--ds-line);
        border-radius: 10px;
        cursor: pointer;
}
.ds-burger span {
        display: block;
        height: 2px;
        width: 100%;
        background: var(--ds-ink);
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
}
.ds-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ds-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ds-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ds-offcanvas {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(86vw, 360px);
        background: var(--ds-bg);
        border-left: 1px solid var(--ds-line);
        z-index: 120;
        transform: translateX(105%);
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        display: flex;
        flex-direction: column;
        padding: 18px 22px;
        overflow-y: auto;
}
.ds-offcanvas.is-open { transform: translateX(0); }
.ds-offcanvas__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
}
.ds-offcanvas__close {
        width: 40px;
        height: 40px;
        border: 1px solid var(--ds-line);
        background: var(--ds-surface);
        border-radius: 10px;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        color: var(--ds-ink);
}
.ds-offcanvas .ds-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
.ds-offcanvas .ds-nav a {
        display: block;
        padding: 12px 10px;
        font-size: 17px;
        border-radius: 10px;
}
.ds-offcanvas .ds-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0 0 0 14px;
}
.ds-offcanvas .ds-nav .sub-menu a { font-size: 15.5px; color: var(--ds-ink-2); }

.ds-overlay {
        position: fixed;
        inset: 0;
        background: rgba(25, 24, 19, 0.35);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s;
        z-index: 110;
}
.ds-overlay.is-visible { opacity: 1; visibility: visible; }

/* =========================================================
   4. HERO — ANIMATED CHART
   ========================================================= */
.ds-hero {
        position: relative;
        min-height: clamp(540px, 84vh, 840px);
        display: flex;
        align-items: flex-end;
        border-bottom: 1px solid var(--ds-line);
        overflow: hidden;
}
.ds-hero__chart {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0.9;
}
.ds-hero__inner {
        position: relative;
        z-index: 2;
        width: 100%;
        padding-block: clamp(48px, 8vh, 90px);
}
.ds-hero__inner .ds-kicker { margin-bottom: 18px; }
.ds-hero__title {
        font-size: clamp(2.6rem, 6.4vw, 4.8rem);
        max-width: 15ch;
        margin-bottom: 20px;
}
.ds-hero__sub {
        font-size: clamp(1.02rem, 1.6vw, 1.22rem);
        color: var(--ds-ink-2);
        max-width: 58ch;
        margin-bottom: 30px;
}
.ds-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ds-hero__tag {
        position: absolute;
        right: clamp(20px, 4vw, 44px);
        top: 26px;
        z-index: 2;
        font-family: var(--ds-font-head);
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--ds-muted);
        display: inline-flex;
        align-items: center;
        gap: 8px;
}
.ds-hero__tag::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--ds-accent);
        animation: ds-pulse 2.4s ease-in-out infinite;
}
@keyframes ds-pulse {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.35; transform: scale(0.8); }
}

/* =========================================================
   5. STATS BAND — ANIMATED COUNTERS
   ========================================================= */
.ds-stats {
        border-bottom: 1px solid var(--ds-line);
        background: var(--ds-surface);
}
.ds-stats__grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
}
.ds-stat {
        padding: 34px clamp(14px, 2.6vw, 30px);
        border-left: 1px solid var(--ds-line);
}
.ds-stat:first-child { border-left: 0; }
.ds-stat__num {
        font-family: var(--ds-font-head);
        font-size: clamp(2rem, 3.4vw, 2.9rem);
        font-weight: 700;
        line-height: 1;
        color: var(--ds-ink);
        font-variant-numeric: tabular-nums;
}
.ds-stat__label {
        margin-top: 10px;
        font-family: var(--ds-font-head);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--ds-muted);
}

/* =========================================================
   6. CHART CARD CAROUSEL
   ========================================================= */
.ds-desk { padding-block: clamp(60px, 9vw, 96px); }
.ds-desk__head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 30px;
}
.ds-desk__head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0; }
.ds-desk__hint {
        font-family: var(--ds-font-head);
        font-size: 12.5px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--ds-muted);
        white-space: nowrap;
}
.ds-carousel {
        position: relative;
}
.ds-carousel__track {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: min(360px, 78vw);
        gap: 22px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        padding: 6px 6px 22px;
        margin: -6px -6px 0;
        scrollbar-width: thin;
        scrollbar-color: var(--ds-line) transparent;
        cursor: grab;
}
.ds-carousel__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.ds-carousel__track::-webkit-scrollbar { height: 6px; }
.ds-carousel__track::-webkit-scrollbar-thumb { background: var(--ds-line); border-radius: 999px; }
.ds-chart-card {
        scroll-snap-align: start;
        background: var(--ds-surface);
        border: 1px solid var(--ds-line);
        border-radius: var(--ds-radius);
        padding: 24px 24px 20px;
        display: flex;
        flex-direction: column;
        gap: 14px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        user-select: none;
}
.ds-chart-card:hover { transform: translateY(-4px); box-shadow: var(--ds-shadow); }
.ds-chart-card__canvas {
        height: 190px;
        position: relative;
}
.ds-chart-card__kicker {
        font-family: var(--ds-font-head);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--ds-muted);
}
.ds-chart-card h3 { font-size: 21px; margin: 0; }
.ds-chart-card p {
        margin: 0;
        color: var(--ds-ink-2);
        font-size: 15px;
        flex-grow: 1;
}

/* =========================================================
   7. SECTION HEADS (shared)
   ========================================================= */
.ds-section { padding-block: clamp(60px, 9vw, 96px); }
.ds-section--tight { padding-block: clamp(44px, 7vw, 72px); }
.ds-section__head { margin-bottom: 34px; }
.ds-section__head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 10px; }
.ds-section__head p { color: var(--ds-ink-2); max-width: 62ch; margin: 0; }

/* =========================================================
   8. POST CARDS / STORY GRID
   ========================================================= */
.ds-stories {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(24px, 3.4vw, 40px);
}
.ds-story-card {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: 22px;
        border-top: 2px solid var(--ds-ink);
        text-decoration: none;
        transition: border-color 0.25s ease;
}
.ds-story-card:hover { border-top-color: var(--ds-accent); }
.ds-story-card__thumb {
        margin: -4px 0 6px;
        border-radius: var(--ds-radius-sm);
        overflow: hidden;
        border: 1px solid var(--ds-line);
}
.ds-story-card__thumb img { display: block; width: 100%; height: 190px; object-fit: cover; }
.ds-story-card__date {
        font-family: var(--ds-font-head);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--ds-muted);
}
.ds-story-card h3 {
        font-size: clamp(1.3rem, 2vw, 1.55rem);
        margin: 0;
        transition: color 0.2s ease;
}
.ds-story-card:hover h3 { color: var(--ds-accent); }
.ds-story-card p {
        margin: 0;
        color: var(--ds-ink-2);
        font-size: 15.5px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
}
.ds-story-card__meta {
        margin-top: auto;
        padding-top: 8px;
        font-family: var(--ds-font-head);
        font-size: 14px;
        color: var(--ds-muted);
        display: inline-flex;
        align-items: center;
        gap: 8px;
}
.ds-story-card__meta img { width: 22px; height: 22px; border-radius: 50%; }

/* =========================================================
   9. SINGLE / PAGE CONTENT
   ========================================================= */
.ds-single {
        max-width: var(--ds-content);
        margin-inline: auto;
        padding-block: clamp(44px, 7vw, 72px) clamp(40px, 6vw, 64px);
}
.ds-single--raw { max-width: var(--ds-wide); }

.ds-single__title {
        font-size: clamp(2.1rem, 4.6vw, 3.4rem);
        margin-bottom: 18px;
}
.ds-byline {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        padding-bottom: 26px;
        margin-bottom: 34px;
        border-bottom: 1px solid var(--ds-line);
}
.ds-byline img.avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
}
.ds-byline__who {
        display: flex;
        flex-direction: column;
        line-height: 1.35;
}
.ds-byline__name {
        font-family: var(--ds-font-head);
        font-weight: 600;
        font-size: 15.5px;
        text-decoration: none;
        color: var(--ds-ink);
}
.ds-byline__name:hover { color: var(--ds-accent); }
.ds-byline__date { font-size: 14px; color: var(--ds-muted); }
.ds-byline__cats {
        margin-left: auto;
        display: inline-flex;
        gap: 8px;
        flex-wrap: wrap;
}
.ds-byline__cats a {
        font-family: var(--ds-font-head);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--ds-ink-2);
        background: #f1efe7;
        border: 1px solid var(--ds-line);
        padding: 5px 12px;
        border-radius: 999px;
}
.ds-byline__cats a:hover { color: var(--ds-accent); border-color: var(--ds-accent); }

.ds-entry { font-size: 1.04rem; }
.ds-entry > * { margin-bottom: 1.15em; }
.ds-entry h2 { font-size: 1.9em; margin-top: 1.4em; }
.ds-entry h3 { font-size: 1.5em; margin-top: 1.3em; }
.ds-entry h4 { font-size: 1.25em; margin-top: 1.2em; }
.ds-entry ul, .ds-entry ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.ds-entry li { margin-bottom: 0.45em; }
.ds-entry figure { margin: 2em 0; }
.ds-entry figcaption {
        font-size: 14px;
        color: var(--ds-muted);
        text-align: center;
        margin-top: 10px;
}
.ds-entry .alignwide { max-width: min(var(--ds-wide), 94vw); margin-inline: auto; }
.ds-entry .alignfull { width: 100%; }
.ds-entry .wp-block-image img { border-radius: var(--ds-radius-sm); }

.ds-tags {
        margin-top: 34px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
}
.ds-tags a {
        font-family: var(--ds-font-head);
        font-size: 13px;
        text-decoration: none;
        color: var(--ds-ink-2);
        border: 1px solid var(--ds-line);
        background: var(--ds-surface);
        padding: 6px 14px;
        border-radius: 999px;
}
.ds-tags a:hover { color: var(--ds-accent); border-color: var(--ds-accent); }

.ds-authorbox {
        display: flex;
        gap: 18px;
        align-items: flex-start;
        margin-top: 44px;
        padding: 24px;
        background: var(--ds-surface);
        border: 1px solid var(--ds-line);
        border-radius: var(--ds-radius);
}
.ds-authorbox img.avatar { width: 56px; height: 56px; border-radius: 50%; }
.ds-authorbox h4 { margin: 0 0 4px; font-size: 18px; }
.ds-authorbox p { margin: 0; font-size: 15px; color: var(--ds-ink-2); }

.ds-postnav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        margin-top: 44px;
}
.ds-postnav a {
        display: flex;
        flex-direction: column;
        gap: 6px;
        text-decoration: none;
        border: 1px solid var(--ds-line);
        background: var(--ds-surface);
        border-radius: var(--ds-radius-sm);
        padding: 18px 20px;
        font-family: var(--ds-font-head);
        font-size: 15.5px;
}
.ds-postnav a:hover { border-color: var(--ds-accent); color: var(--ds-accent); }
.ds-postnav__label {
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--ds-muted);
}

/* Raw imported HTML wrapper */
.ds-raw {
        overflow-x: auto;
        font-size: 1rem;
}
.ds-raw > *:first-child { margin-top: 0; }
.ds-raw img, .ds-raw table, .ds-raw iframe, .ds-raw canvas, .ds-raw svg { max-width: 100%; }
.ds-raw .ds-keep-styles { all: initial; }

/* =========================================================
   10. ARCHIVES / SEARCH / PAGINATION
   ========================================================= */
.ds-archive-head {
        padding: clamp(48px, 8vw, 84px) 0 8px;
        max-width: 760px;
}
.ds-archive-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 12px; }
.ds-archive-head p { color: var(--ds-ink-2); margin: 0; }

.ds-pagination {
        margin: 56px 0 10px;
        text-align: center;
}
.ds-pagination .nav-links {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
}
.ds-pagination .page-numbers {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        height: 44px;
        padding: 0 14px;
        border: 1px solid var(--ds-line);
        background: var(--ds-surface);
        border-radius: 999px;
        text-decoration: none;
        font-family: var(--ds-font-head);
        font-weight: 600;
        color: var(--ds-ink-2);
}
.ds-pagination .page-numbers.current,
.ds-pagination .page-numbers:hover {
        background: var(--ds-ink);
        border-color: var(--ds-ink);
        color: #fff;
}

.ds-no-results { padding-block: 40px 80px; }

/* =========================================================
   11. COMMENTS + FORMS
   ========================================================= */
.ds-comments {
        margin-top: 48px;
        padding-top: 36px;
        border-top: 1px solid var(--ds-line);
}
.ds-comments h2, .ds-comments h3 { font-size: 1.5rem; }
.ds-comment {
        display: flex;
        gap: 14px;
        padding: 20px 0;
        border-bottom: 1px solid var(--ds-line-soft);
}
.ds-comment img.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.ds-comment__meta { font-family: var(--ds-font-head); font-size: 14px; color: var(--ds-muted); }
.ds-comment__meta a { text-decoration: none; color: var(--ds-ink); font-weight: 600; }
.ds-comment .children { margin-left: 52px; list-style: none; }
.ds-comment-content { font-size: 15.5px; }

input[type="text"], input[type="email"], input[type="url"], input[type="search"],
textarea, select {
        width: 100%;
        font-family: var(--ds-font-body);
        font-size: 15.5px;
        color: var(--ds-ink);
        background: var(--ds-surface);
        border: 1px solid var(--ds-line);
        border-radius: var(--ds-radius-sm);
        padding: 12px 14px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ds-accent); outline-offset: 1px; }

/* =========================================================
   12. FOOTER
   ========================================================= */
.ds-footer {
        border-top: 1px solid var(--ds-line);
        background: var(--ds-surface);
        margin-top: 20px;
}
.ds-footer__grid {
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 40px;
        padding-block: 52px 40px;
}
.ds-footer h4 {
        font-size: 12.5px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--ds-muted);
        margin-bottom: 14px;
}
.ds-footer__brand .ds-brand__title { font-size: 20px; }
.ds-footer__brand p {
        color: var(--ds-ink-2);
        font-size: 15px;
        max-width: 40ch;
        margin: 12px 0 0;
}
.ds-footer__menu ul { list-style: none; margin: 0; padding: 0; }
.ds-footer__menu li { margin-bottom: 8px; }
.ds-footer__menu a {
        text-decoration: none;
        color: var(--ds-ink-2);
        font-family: var(--ds-font-head);
        font-size: 15px;
}
.ds-footer__menu a:hover { color: var(--ds-accent); }
.ds-footer__meta ul { list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--ds-ink-2); }
.ds-footer__meta li { margin-bottom: 8px; }
.ds-footer__colophon {
        border-top: 1px solid var(--ds-line);
        padding-block: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: space-between;
        font-family: var(--ds-font-head);
        font-size: 13.5px;
        color: var(--ds-muted);
}
.ds-footer__colophon a { color: inherit; }

/* =========================================================
   13. RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
        .ds-nav--desktop { display: none; }
        .ds-burger { display: flex; }
        .ds-stories { grid-template-columns: repeat(2, 1fr); }
        .ds-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
        body { font-size: 16px; }
        .ds-stories { grid-template-columns: 1fr; }
        .ds-stats__grid { grid-template-columns: repeat(2, 1fr); }
        .ds-stat:nth-child(odd) { border-left: 0; }
        .ds-stat:nth-child(n+3) { border-top: 1px solid var(--ds-line); }
        .ds-postnav { grid-template-columns: 1fr; }
        .ds-footer__grid { grid-template-columns: 1fr; gap: 28px; }
        .ds-byline__cats { margin-left: 0; }
}

/* =========================================================
   14. MOTION PREFERENCES
   ========================================================= */
@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;
        }
}

/* Animations disabled via Customizer */
body.ds-anim-off .ds-hero__tag::before { animation: none; }
