/*
Theme Name: CykloManiak
Theme URI: https://cyklomaniak.com.pl
Author: Riomega
Description: Editorial cycling magazine theme — warm paper background, asphalt + brass accents, chain texture backdrop, gear dividers. Bazowane na theme-twoja-przestrzen v1.0.0.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: cyklomaniak
*/

/* ==========================================================================
   DESIGN TOKENS — CYKLOMANIAK (gravel/MTB + szosa)
   ========================================================================== */

:root {
    /* Tła — beton/asfalt warm */
    --bg:            #f6f3ee;
    --bg-elev:       #ffffff;
    --bg-soft:       #ece7dc;
    --bg-asphalt:    #1d1d1c;
    --bg-chain:      #14130f;

    --border:        #e0dbcf;
    --border-strong: #c5bfb1;

    /* Typo */
    --text:          #1a1a17;
    --text-muted:    #5b5b56;
    --text-dim:      #8c8a82;
    --text-on-dark:  #f2efe7;

    /* Akcenty — pomarańcz outdoor + brass */
    --accent:        #d4571a;
    --accent-dark:   #a4421a;
    --accent-soft:   rgba(212, 87, 26, .09);
    --accent-line:   rgba(212, 87, 26, .28);
    --brass:         #c9a24a;
    --brass-soft:    rgba(201, 162, 74, .15);

    /* Layout */
    --container:     1140px;
    --reading:       720px;
    --radius:        3px;
    --radius-lg:     8px;

    --font-display:  'Lora', Georgia, 'Times New Roman', serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --shadow-sm:     0 1px 3px rgba(26, 26, 23, .07);
    --shadow:        0 6px 24px rgba(26, 26, 23, .10);
}

/* ==========================================================================
   RESET
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s ease;
}
a:hover {
    text-decoration-color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--text);
    margin: 0 0 .6em;
}
h1 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: .4em; }

strong { color: #1a1a18; }

blockquote {
    margin: 1.8rem 0;
    padding: 1rem 0 1rem 1.4rem;
    border-left: 3px solid var(--accent);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.15em;
    font-style: italic;
    line-height: 1.5;
}
blockquote p:last-child { margin-bottom: 0; }

code {
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: .9em;
    color: var(--accent-dark);
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8rem 0;
    background: var(--bg-elev);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
th, td {
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: .95rem;
}
th { background: var(--bg-soft); font-weight: 600; }

::selection { background: var(--accent-soft); color: var(--text); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.tp-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.tp-container--reading { max-width: var(--reading); }

.tp-skip-link {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: .6em 1em;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
}
.tp-skip-link:focus { left: 1rem; top: 1rem; }

/* ==========================================================================
   HEADER
   ========================================================================== */

.tp-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.tp-header__inner {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.tp-logo {
    text-decoration: none;
    flex-shrink: 0;
}
.tp-logo__mark {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
}
.tp-logo__sub {
    font-family: var(--font-body);
    font-size: .72rem;
    color: var(--text-dim);
    font-weight: 400;
    letter-spacing: .05em;
    text-transform: uppercase;
    display: block;
    margin-top: 3px;
}

.tp-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
}
.tp-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    flex-wrap: wrap;
}
.tp-nav li { margin: 0; }
.tp-nav a {
    display: inline-block;
    padding: .5rem 1rem;
    color: var(--text);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
}
.tp-nav a:hover,
.tp-nav .current-menu-item > a,
.tp-nav .current-cat > a {
    color: var(--accent);
}

.tp-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
}
.tp-menu-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
    .tp-menu-toggle { display: inline-flex; }
    .tp-header__inner { gap: 1rem; }
    .tp-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    .tp-nav.is-open ul { display: flex; }
    .tp-nav a { padding: .7rem 0; display: block; }
}

/* ==========================================================================
   HERO (homepage featured article — no slider, clean editorial)
   ========================================================================== */

.tp-hero {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
}
.tp-hero__label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .9rem;
}
.tp-hero__layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    align-items: center;
}
@media (max-width: 760px) {
    .tp-hero__layout { grid-template-columns: 1fr; }
}
.tp-hero__content {
    min-width: 0;
}
.tp-hero__cat {
    font-size: .8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
}
.tp-hero__title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.2;
    margin: .5rem 0 1rem;
}
.tp-hero__title a {
    color: var(--text);
    text-decoration: none;
}
.tp-hero__title a:hover { color: var(--accent); }
.tp-hero__excerpt {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}
.tp-hero__meta {
    font-size: .85rem;
    color: var(--text-dim);
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
}
.tp-hero__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
}
.tp-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.tp-section {
    padding: 3rem 0;
}
.tp-section__head {
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--border);
}
.tp-section__title {
    margin: 0;
    font-size: 1.35rem;
    color: var(--text);
}
.tp-section__more {
    font-size: .88rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}
.tp-section__more:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ==========================================================================
   CARDS (grid of posts)
   ========================================================================== */

.tp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.tp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.tp-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
    .tp-grid--2, .tp-grid--3 { grid-template-columns: 1fr; }
}

.tp-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}
.tp-card__thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    margin-bottom: 1rem;
}
.tp-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.tp-card:hover .tp-card__thumb img {
    transform: scale(1.03);
}
.tp-card__cat {
    font-size: .75rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
}
.tp-card__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.3;
    font-weight: 600;
    margin: .5rem 0 .5rem;
}
.tp-card__title a {
    color: var(--text);
    text-decoration: none;
}
.tp-card__title a:hover { color: var(--accent); }
.tp-card__excerpt {
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 .8rem;
}
.tp-card__meta {
    font-size: .8rem;
    color: var(--text-dim);
    margin-top: auto;
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */

.tp-breadcrumbs {
    font-size: .82rem;
    color: var(--text-dim);
    padding: 1.25rem 0 .5rem;
}
.tp-breadcrumbs ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.tp-breadcrumbs li + li::before {
    content: '/';
    margin: 0 .55rem;
    color: var(--border-strong);
}
.tp-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
}
.tp-breadcrumbs a:hover { color: var(--accent); }

.tp-single {
    padding-bottom: 4rem;
}
.tp-single__header {
    max-width: var(--reading);
    margin: 0 auto 2rem;
    padding-top: 1.5rem;
    text-align: center;
}
.tp-single__cat {
    display: inline-block;
    font-size: .78rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    text-decoration: none;
    margin-bottom: 1rem;
}
.tp-single__title {
    font-size: clamp(1.85rem, 4vw, 2.9rem);
    line-height: 1.15;
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
    color: var(--text);
}
.tp-single__meta {
    font-size: .85rem;
    color: var(--text-dim);
    display: flex;
    gap: .6rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.tp-single__meta a { color: var(--text-muted); text-decoration: none; }
.tp-single__meta a:hover { color: var(--accent); }
.tp-single__meta span.sep { color: var(--border-strong); }

.tp-single__hero {
    max-width: 960px;
    margin: 0 auto 2.5rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
}
.tp-single__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content — reading column, generous spacing */
.tp-content {
    max-width: var(--reading);
    margin: 0 auto;
    font-size: 1.12rem;
    line-height: 1.75;
    color: var(--text);
}
.tp-content p { margin-bottom: 1.35em; }
.tp-content h2 {
    margin-top: 2.5rem;
    margin-bottom: .8rem;
    font-size: 1.6rem;
}
.tp-content h3 {
    margin-top: 2rem;
    font-size: 1.3rem;
    color: var(--accent-dark);
}
.tp-content h4 {
    margin-top: 1.5rem;
    font-size: 1.1rem;
}
.tp-content ul, .tp-content ol {
    margin: 0 0 1.5em;
    padding-left: 1.6em;
}
.tp-content li {
    margin-bottom: .6em;
}
.tp-content img,
.tp-content figure {
    margin: 1.8rem auto;
    border-radius: var(--radius);
}
.tp-content figcaption {
    font-size: .86rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: .6rem;
    font-style: italic;
}
.tp-content .wp-block-image.alignwide {
    max-width: 900px;
    margin-left: -110px;
    margin-right: -110px;
}
@media (max-width: 960px) {
    .tp-content .wp-block-image.alignwide {
        margin-left: 0;
        margin-right: 0;
    }
}
.tp-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
}
.tp-content a:hover {
    text-decoration-color: var(--accent);
}

/* Pull quote / emphasis */
.tp-content .wp-block-pullquote {
    margin: 2.5rem -1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.3em;
    line-height: 1.4;
    color: var(--text);
}

/* RankMath FAQ — match editorial style */
.tp-content .wp-block-rank-math-faq-block,
.tp-content #rank-math-faq,
.tp-content .rank-math-block {
    margin: 2.5rem 0;
    padding: 1.8rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.tp-content .rank-math-list-item,
.tp-content .rank-math-faq-item {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
}
.tp-content .rank-math-list-item:last-child,
.tp-content .rank-math-faq-item:last-child {
    border-bottom: 0;
}
.tp-content .rank-math-question {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text);
    margin: 0 0 .6rem;
    font-weight: 600;
}
.tp-content .rank-math-answer {
    font-size: 1rem;
    color: var(--text-muted);
}
.tp-content .rank-math-answer p { margin-bottom: .7em; }
.tp-content .rank-math-answer p:last-child { margin-bottom: 0; }

/* Tags */
.tp-single__footer {
    max-width: var(--reading);
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.tp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    font-size: .85rem;
}
.tp-tags__label {
    color: var(--text-dim);
    margin-right: .4rem;
}
.tp-tag {
    display: inline-block;
    padding: .3rem .75rem;
    background: var(--bg-soft);
    color: var(--text-muted);
    font-size: .8rem;
    border-radius: 2rem;
    text-decoration: none;
}
.tp-tag:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

/* ==========================================================================
   AUTHOR BOX (inline)
   ========================================================================== */

.tp-author-box {
    max-width: var(--reading);
    margin: 3rem auto;
    padding: 2rem 2rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
}
@media (max-width: 560px) {
    .tp-author-box { grid-template-columns: 1fr; text-align: center; }
}
.tp-author-box__avatar img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-soft);
}
@media (max-width: 560px) {
    .tp-author-box__avatar { display: flex; justify-content: center; }
}
.tp-author-box__label {
    font-size: .75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 500;
    margin-bottom: .3rem;
}
.tp-author-box__name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text);
    margin: 0 0 .35rem;
    font-weight: 600;
}
.tp-author-box__title {
    font-size: .88rem;
    color: var(--accent);
    margin-bottom: .7rem;
    font-weight: 500;
}
.tp-author-box__bio {
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 .8rem;
}
.tp-author-box__badges {
    list-style: none;
    padding: 0;
    margin: 0 0 .8rem;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.tp-author-box__badges li {
    font-size: .75rem;
    padding: .25rem .7rem;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-radius: 2rem;
    margin: 0;
}

/* ==========================================================================
   SIDEBAR (minimal — only for archives)
   ========================================================================== */

.tp-sidebar {
    padding-top: 1rem;
}
.tp-widget {
    margin-bottom: 2.5rem;
}
.tp-widget__title {
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}
.tp-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tp-widget ul li {
    padding: .4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .92rem;
}
.tp-widget ul li:last-child { border-bottom: 0; }
.tp-widget a { color: var(--text); text-decoration: none; }
.tp-widget a:hover { color: var(--accent); }

.tp-searchform {
    display: flex;
    gap: .5rem;
}
.tp-searchform input[type="search"] {
    flex: 1;
    padding: .6rem .8rem;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    border-radius: var(--radius);
}
.tp-searchform input:focus { outline: none; border-color: var(--accent); }
.tp-searchform button {
    padding: .6rem 1rem;
    background: var(--accent);
    color: #fff;
    border: 0;
    font-family: inherit;
    font-weight: 600;
    font-size: .88rem;
    border-radius: var(--radius);
    cursor: pointer;
}
.tp-searchform button:hover { background: var(--accent-dark); }

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.tp-pagination {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin: 3rem 0 2rem;
    flex-wrap: wrap;
}
.tp-pagination a,
.tp-pagination span {
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    padding: 0 .9rem;
    align-items: center;
    justify-content: center;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    font-size: .9rem;
    border-radius: var(--radius);
    text-decoration: none;
}
.tp-pagination a:hover,
.tp-pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ==========================================================================
   ARCHIVE HEADER
   ========================================================================== */

.tp-archive-header {
    text-align: center;
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}
.tp-archive-header__title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin: 0 0 .8rem;
}
.tp-archive-header__desc {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.02rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.tp-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: .9rem;
}
.tp-footer__widgets {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 860px) {
    .tp-footer__widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .tp-footer__widgets { grid-template-columns: 1fr; }
}
.tp-footer__col h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text);
    margin: 0 0 1rem;
    font-weight: 600;
}
.tp-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tp-footer__col li {
    margin-bottom: .4rem;
    font-size: .88rem;
}
.tp-footer__col a {
    color: var(--text-muted);
    text-decoration: none;
}
.tp-footer__col a:hover { color: var(--accent); }

.tp-footer__about p {
    margin: 0 0 1rem;
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.tp-footer__bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--text-dim);
}
.tp-footer__bottom ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 1.25rem;
}
.tp-footer__bottom a { color: var(--text-muted); text-decoration: none; }
.tp-footer__bottom a:hover { color: var(--accent); }

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1rem auto; }

/* 404 */
.tp-404 {
    text-align: center;
    padding: 6rem 1rem;
}
.tp-404__code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 12vw, 9rem);
    font-weight: 400;
    color: var(--accent);
    line-height: 1;
    margin: 0;
}
.tp-404 h1 {
    font-size: 1.4rem;
    margin: 1rem 0;
}

/* ==========================================================================
   CYKLOMANIAK — overrides + cycling-specific
   ========================================================================== */

/* Logo — bitmapowe poziome */
.cm-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
}
.cm-logo img {
    height: 52px;
    width: auto;
    display: block;
}
@media (max-width: 640px) {
    .cm-logo img { height: 40px; }
}

/* Hero — asfaltowy ciemny pas z teksturą łańcucha */
.cm-hero-dark {
    position: relative;
    background: var(--bg-asphalt);
    color: var(--text-on-dark);
    padding: 4rem 0 3.5rem;
    margin-bottom: 0;
    border-bottom: 3px solid var(--accent);
    overflow: hidden;
}
.cm-hero-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('assets/img/chain-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: .35;
    z-index: 0;
    pointer-events: none;
}
.cm-hero-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(29,29,28,.55) 0%, rgba(29,29,28,.85) 100%);
    z-index: 1;
    pointer-events: none;
}
.cm-hero-dark > * { position: relative; z-index: 2; }
.cm-hero-dark .tp-hero__label { color: var(--brass); }
.cm-hero-dark .tp-hero__title a { color: var(--text-on-dark); }
.cm-hero-dark .tp-hero__title a:hover { color: var(--accent); }
.cm-hero-dark .tp-hero__excerpt { color: rgba(242, 239, 231, .82); }
.cm-hero-dark .tp-hero__meta { color: rgba(242, 239, 231, .55); }
.cm-hero-dark .tp-hero__cat { color: var(--brass); }

/* Gear divider — dekoracyjny separator z zębatkami SVG/PNG */
.cm-gear-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin: 3rem auto 2.5rem;
    max-width: 360px;
    color: var(--brass);
}
.cm-gear-divider::before,
.cm-gear-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong) 30%, var(--border-strong) 70%, transparent);
}
.cm-gear-divider__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    opacity: .8;
    animation: cm-gear-spin 18s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .cm-gear-divider__icon { animation: none; }
}
@keyframes cm-gear-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Section title — z akcentem zębatkowym po lewej */
.cm-section-title {
    position: relative;
    padding-left: 1.25rem;
}
.cm-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 1.1em;
    transform: translateY(-50%);
    background: var(--accent);
    border-radius: 2px;
}

/* Card hover — subtle gear glyph */
.tp-card { position: relative; }

/* Category pill — z motywem MTB/szosa */
.cm-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-radius: 2rem;
    text-decoration: none;
}
.cm-cat-pill::before {
    content: '◉';
    color: var(--brass);
    font-size: .9em;
}

/* Brass accent dla H3 podrzędnych w treści */
.tp-content h3 {
    color: var(--accent-dark);
    border-left: 3px solid var(--brass);
    padding-left: .9rem;
    margin-left: -.9rem;
}

/* Footer — asfaltowy */
.tp-footer.cm-footer-dark {
    background: var(--bg-asphalt);
    color: rgba(242, 239, 231, .65);
    border-top: 3px solid var(--accent);
}
.tp-footer.cm-footer-dark .tp-footer__col h4 { color: var(--text-on-dark); }
.tp-footer.cm-footer-dark .tp-footer__col a,
.tp-footer.cm-footer-dark .tp-footer__col li { color: rgba(242, 239, 231, .65); }
.tp-footer.cm-footer-dark .tp-footer__col a:hover { color: var(--brass); }
.tp-footer.cm-footer-dark .tp-footer__about p { color: rgba(242, 239, 231, .65); }
.tp-footer.cm-footer-dark .tp-footer__bottom { border-top-color: rgba(242, 239, 231, .12); color: rgba(242, 239, 231, .45); }
.tp-footer.cm-footer-dark .tp-footer__bottom a { color: rgba(242, 239, 231, .55); }
.tp-footer.cm-footer-dark .tp-footer__bottom a:hover { color: var(--brass); }

/* RAB plugin — dopasowanie palety */
.rab {
    --rab-accent: var(--accent);
    --rab-border: var(--border);
    --rab-bg: var(--bg-elev);
}

/* Mono dla danych technicznych: czas, dystans, prędkość, kalorie, BMR */
.cm-stat,
.tp-content code,
.tp-content kbd {
    font-family: var(--font-mono);
    font-size: .94em;
}

/* Tabele — bordery brass-soft */
.tp-content table {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.tp-content th {
    background: var(--bg-asphalt);
    color: var(--text-on-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--brass);
}
