/* ═══════════════════════════════════════════════════════════
   Cycling Tech Insights — shared article stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ── Fonts ────────────────────────────────────────────────── */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@700,500&display=swap');
@import url('https://fonts.bunny.net/css?family=inter:400,500&display=swap');

/* ── Reset & tokens ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg:           #F7F6F2;
  --surface:      #FDFCFA;
  --border:       #D4D1CA;
  --text:         #28251D;
  --text-muted:   #7A7974;
  --text-faint:   #BAB9B4;
  --accent:       #01696F;
  --accent-dark:  #0C4E54;
  --tag-bg:       #D6EFEF;
  --tag-text:     #0C4E54;
  --header-bg:    #28283b;
  --buy-bg:       #F0FAF5;
  --buy-border:   #A8DABC;
  --buy-label:    #146639;
  --buy-btn:      #16803C;
  --buy-btn-h:    #0E5F2C;
  --font-head:    'Satoshi', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ── Site header on article pages ───────────────────────── */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.75rem 1.5rem;
}
.site-header .header-inner {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header .site-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header .site-logo img {
  height: 72px;
  width: 72px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.site-header .header-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.site-header .header-text .logo-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #F5F3EE;
  line-height: 1.2;
}
.site-header .header-text .logo-tagline {
  font-size: 0.72rem;
  color: #6B6965;
  letter-spacing: 0.02em;
  line-height: 1;
}
.site-header .back-nav {
  font-size: 0.8rem;
  font-weight: 500;
  color: #6B6965;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-header .back-nav:hover { color: #C8C5BF; text-decoration: none; }
@media (max-width: 420px) {
  .site-header .header-text .logo-tagline { display: none; }
  .site-header .site-logo img { height: 56px; width: 56px; }
}


/* ── Article layout ───────────────────────────────────────── */
.article-wrap {
  max-width: 720px;
  margin: 2.5rem auto 0;
  padding: 0 1.25rem 5rem;
}

article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem 2.75rem 3rem;
}

/* ── Article meta ─────────────────────────────────────────── */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-bottom: 1.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.article-meta span:not(.tag) {
  position: relative;
}
/* Separator dots between non-tag meta items */
.article-meta span:not(.tag) + span:not(.tag)::before {
  content: '·';
  margin-right: 0.85rem;
  color: var(--text-faint);
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 1.25rem;
}

h2 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  margin: 2.25rem 0 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 1.75rem 0 0.45rem;
}

p {
  margin: 0 0 1rem;
  font-size: 0.97rem;
}

ul, ol {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}
li {
  margin-bottom: 0.4rem;
  font-size: 0.97rem;
}

strong { font-weight: 500; }

em { font-style: italic; color: var(--text-muted); }

/* ── Buy / affiliate box ──────────────────────────────────── */
.buy-box {
  background: var(--buy-bg);
  border: 1px solid var(--buy-border);
  border-radius: 0.75rem;
  padding: 1.1rem 1.4rem 1.25rem;
  margin: 2rem 0;
}
.buy-box strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--buy-label);
}
.buy-box .buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.buy-box a {
  display: inline-block;
  background: var(--buy-btn);
  color: #fff;
  padding: 0.42rem 1.1rem;
  border-radius: 0.45rem;
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s;
}
.buy-box a:hover {
  background: var(--buy-btn-h);
  text-decoration: none;
  color: #fff;
}

/* ── Comparison table ─────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 480px;
}
.comparison-table thead th {
  background: var(--header-bg);
  color: #D4D1CA;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: none;
}
.comparison-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:nth-child(even) td { background: rgba(0,0,0,0.018); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  padding: 1.75rem 1.25rem 2.5rem;
  line-height: 1.7;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  article {
    padding: 1.5rem 1.25rem 2rem;
    border-radius: 0.75rem;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.1rem; }
  .article-meta { gap: 0.35rem 0.65rem; }
  .buy-box { padding: 0.9rem 1rem 1rem; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .buy-box a { transition: none; }
}
