/* ============================================================
   RiversTech — Oatmilk Editorial Design System
   Palette: Oatmilk · Terracotta · Cream · Charcoal
   Fonts: Unbounded (display) · Lora (editorial) · Manrope (UI) · JetBrains Mono (data)
   Inspired by: NYT · The Atlantic · TechCrunch · BBC
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;700;800;900&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --oat:          #FAF6F0;
  --oat-2:        #F4EDE2;
  --oat-3:        #EDE3D5;
  --oat-4:        #DDD0BE;
  --cream:        #FFFFFF;
  --cream-2:      #FDFAF6;
  --ink:          #1C1917;
  --ink-2:        #3D3530;
  --ink-3:        #6B5F55;
  --ink-4:        #9C8E82;
  --terra:        #C4603A;
  --terra-dim:    #A84F2F;
  --terra-light:  #F5EAE4;
  --terra-border: rgba(196,96,58,0.22);
  --terra-glow:   rgba(196,96,58,0.09);
  --amber:        #C4883A;
  --amber-dim:    #A8712E;
  --amber-light:  #F5EDD8;
  --amber-border: rgba(196,136,58,0.22);
  --red:          #D93546;
  --red-light:    #FDECEA;
  --green:        #1F7A4A;
  --green-light:  #E8F5EE;
  --blue:         #1D6FA4;
  --blue-light:   #E8F0F8;
  --font-display:   'Unbounded', sans-serif;
  --font-editorial: 'Lora', Georgia, serif;
  --font-ui:        'Manrope', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --gap-xs:  4px; --gap-sm: 8px; --gap-md: 16px; --gap-lg: 24px;
  --gap-xl:  40px; --gap-2xl: 64px; --gap-3xl: 96px;
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;
  --shadow-sm:    0 1px 4px rgba(28,25,23,0.07);
  --shadow-md:    0 4px 16px rgba(28,25,23,0.09);
  --shadow-lg:    0 12px 40px rgba(28,25,23,0.12);
  --shadow-terra: 0 4px 20px rgba(196,96,58,0.18);
  --t-fast: 0.15s ease; --t-mid: 0.28s ease;
  --t-slow: 0.45s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================================ RESET ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-ui); background: var(--oat); color: var(--ink); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--oat-2); }
::-webkit-scrollbar-thumb { background: var(--oat-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--terra); }
::selection { background: var(--terra); color: var(--cream); }

/* ============================================================ TICKER ============================================================ */
.ticker-bar { background: var(--ink); overflow: hidden; position: relative; z-index: 1001; height: 36px; display: flex; align-items: center; }
.ticker-inner { display: flex; align-items: center; height: 100%; width: 100%; }
.ticker-label { background: var(--terra); color: var(--cream); font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 0 16px; white-space: nowrap; flex-shrink: 0; height: 100%; display: flex; align-items: center; position: relative; z-index: 2; }
.ticker-label::after { content: ''; position: absolute; right: -10px; top: 0; border-left: 10px solid var(--terra); border-top: 36px solid transparent; }
.ticker-scroll { display: flex; animation: tickerMove 38s linear infinite; white-space: nowrap; padding-left: 20px; }
.ticker-scroll:hover { animation-play-state: paused; }
.ticker-item { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600; color: rgba(250,246,240,0.82); padding: 0 28px; display: flex; align-items: center; gap: 8px; }
.ticker-item::after { content: '·'; color: rgba(250,246,240,0.3); font-size: 1.4rem; }
@keyframes tickerMove { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ============================================================ TOPBAR ============================================================ */
.topbar { background: var(--cream); border-bottom: 1px solid var(--oat-3); padding: 6px 0; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--gap-xl); display: flex; align-items: center; justify-content: space-between; }
.topbar-date { font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-4); letter-spacing: 0.06em; text-transform: uppercase; }
.topbar-links { display: flex; gap: 16px; }
.topbar-links a { font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-4); transition: var(--t-fast); }
.topbar-links a:hover { color: var(--terra); }

/* ============================================================ NAV ============================================================ */
.nav { background: var(--cream); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 1000; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--gap-xl); display: flex; align-items: center; justify-content: space-between; height: 62px; }
.nav-logo { display: flex; align-items: center; }
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0;
}
/* "Rivers" — plain charcoal */
.nav-logo-text .logo-rivers {
  color: var(--ink);
}
/* "Tech" — terracotta with a dot-accent before it */
.nav-logo-text .logo-tech {
  color: var(--terra);
  position: relative;
}
/* The separator dot */
.nav-logo-text .logo-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--terra);
  border-radius: 50%;
  margin: 0 1px 3px 1px;
  flex-shrink: 0;
}
.nav-logo:hover .logo-tech { color: var(--terra-dim); }
.nav-logo:hover .logo-dot  { background: var(--terra-dim); }
.nav-links { display: flex; align-items: center; list-style: none; gap: 0; height: 62px; }
.nav-links a { font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700; color: var(--ink-3); padding: 0 13px; height: 62px; display: flex; align-items: center; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: var(--t-fast); letter-spacing: 0.04em; text-transform: uppercase; }
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--oat-4); }
.nav-links a.active { color: var(--terra); border-bottom-color: var(--terra); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-search-btn { width: 34px; height: 34px; background: var(--oat); border: 1px solid var(--oat-3); border-radius: var(--r-sm); color: var(--ink-3); font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--t-fast); }
.nav-search-btn:hover { background: var(--oat-2); color: var(--ink); }
.btn-nav { background: var(--terra); color: var(--cream); font-family: var(--font-ui); font-size: 0.72rem; font-weight: 800; padding: 8px 18px; border-radius: var(--r-pill); border: none; cursor: pointer; letter-spacing: 0.04em; transition: var(--t-fast); white-space: nowrap; text-transform: uppercase; }
.btn-nav:hover { background: var(--terra-dim); transform: translateY(-1px); box-shadow: var(--shadow-terra); }

/* ============================================================ CAT NAV ============================================================ */
.cat-nav { background: var(--cream); border-bottom: 1px solid var(--oat-3); }
.cat-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--gap-xl); display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; height: 42px; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-pill { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-4); padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid transparent; white-space: nowrap; transition: var(--t-fast); cursor: pointer; }
.cat-pill:hover { color: var(--ink); background: var(--oat-2); border-color: var(--oat-3); }
.cat-pill.active { color: var(--cream); background: var(--terra); border-color: var(--terra); }

/* ============================================================ LAYOUT ============================================================ */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gap-xl); }
.section { padding: var(--gap-2xl) 0; }
.section-sm { padding: var(--gap-xl) 0; }

/* ============================================================ HERO ============================================================ */
.hero { background: var(--cream); padding: var(--gap-xl) 0 var(--gap-2xl); border-bottom: 1px solid var(--oat-3); }
.hero-inner { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.hero-main { border-top: 4px solid var(--ink); padding-top: 20px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.live-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; animation: livePulse 1.5s ease-in-out infinite; flex-shrink: 0; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.65); } }
.hero-cat-tag { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terra); background: var(--terra-light); border: 1px solid var(--terra-border); padding: 3px 10px; border-radius: var(--r-pill); }
.hero-title { font-family: var(--font-editorial); font-size: clamp(1.8rem, 3.2vw, 2.8rem); font-weight: 600; color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 14px; }
.hero-title a:hover { color: var(--terra); }
.hero-excerpt { font-family: var(--font-editorial); font-size: 1.05rem; color: var(--ink-3); line-height: 1.78; margin-bottom: 20px; max-width: 580px; }
.hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--oat-3); }
.hero-author { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }
.avatar-sm { width: 26px; height: 26px; background: var(--terra-light); border: 1px solid var(--terra-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; color: var(--terra); flex-shrink: 0; overflow: hidden; }
.hero-time { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-4); }
.hero-image { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/9; background: var(--oat-2); position: relative; border: 1px solid var(--oat-3); margin-top: 20px; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.hero-image:hover img { transform: scale(1.03); }
.hero-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 4rem; background: var(--oat-2); }
.hero-sidebar { border-top: 4px solid var(--ink); padding-top: 20px; }
.sidebar-label { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); padding-bottom: 12px; border-bottom: 1px solid var(--oat-3); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.sidebar-label::before { content: ''; display: inline-block; width: 16px; height: 2px; background: var(--terra); border-radius: 1px; }
.sidebar-post { padding: 14px 0; border-bottom: 1px solid var(--oat-2); display: grid; grid-template-columns: 1fr 62px; gap: 10px; align-items: start; transition: var(--t-fast); cursor: pointer; }
.sidebar-post:hover .sidebar-post-title { color: var(--terra); }
.sidebar-post:last-child { border-bottom: none; }
.sidebar-post-num { font-family: var(--font-mono); font-size: 0.6rem; color: var(--terra); font-weight: 700; margin-bottom: 3px; }
.sidebar-post-title { font-family: var(--font-editorial); font-size: 0.88rem; font-weight: 600; color: var(--ink); line-height: 1.4; transition: var(--t-fast); margin-bottom: 5px; }
.sidebar-post-meta { font-family: var(--font-mono); font-size: 0.63rem; color: var(--ink-4); }
.sidebar-post-thumb { width: 62px; height: 46px; border-radius: var(--r-sm); background: var(--oat-2); overflow: hidden; border: 1px solid var(--oat-3); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.sidebar-post-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================ SECTION HEADINGS ============================================================ */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--gap-lg); padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.section-title { font-family: var(--font-display); font-size: 0.82rem; font-weight: 800; color: var(--ink); letter-spacing: 0.04em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.section-title .accent-rule { display: inline-block; width: 20px; height: 3px; background: var(--terra); border-radius: 1px; }
.section-link { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--terra); display: flex; align-items: center; gap: 5px; transition: var(--t-fast); }
.section-link:hover { gap: 9px; color: var(--terra-dim); }

/* ============================================================ POST CARDS ============================================================ */
.posts-grid   { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.posts-grid-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid-4 { grid-template-columns: repeat(4, 1fr); }
.post-card { background: var(--cream); border-radius: var(--r-md); border: 1px solid var(--oat-3); overflow: hidden; transition: var(--t-mid); display: flex; flex-direction: column; cursor: pointer; }
.post-card:hover { border-color: var(--terra-border); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card-stripe { height: 3px; background: var(--terra); width: 100%; }
.post-card-thumb { aspect-ratio: 16/9; background: var(--oat-2); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.post-card-tags { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tag-pill { font-family: var(--font-mono); font-size: 0.59rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.tag-pill-cat { color: var(--terra); background: var(--terra-light); border: 1px solid var(--terra-border); }
.post-card-title { font-family: var(--font-editorial); font-size: 0.98rem; font-weight: 600; color: var(--ink); line-height: 1.42; margin-bottom: 10px; transition: var(--t-fast); flex: 1; }
.post-card:hover .post-card-title { color: var(--terra); }
.post-card-excerpt { font-family: var(--font-editorial); font-size: 0.83rem; color: var(--ink-3); line-height: 1.65; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--oat-2); padding-top: 12px; margin-top: auto; }
.post-card-author { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--ink-4); font-weight: 600; }
.post-card-time { font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-4); }

/* ============================================================ HEAT BADGES ============================================================ */
.heat-badge { font-family: var(--font-mono); font-size: 0.59rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.heat-3 { background: var(--red-light);   color: var(--red);   border: 1px solid rgba(217,53,70,0.2); }
.heat-2 { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.heat-1 { background: var(--terra-light); color: var(--terra); border: 1px solid var(--terra-border); }

/* ============================================================ TOOLS ============================================================ */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-md); }
.tool-card { background: var(--cream); border: 1px solid var(--oat-3); border-radius: var(--r-md); padding: 20px; transition: var(--t-mid); position: relative; overflow: hidden; cursor: pointer; }
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--terra), var(--amber)); opacity: 0; transition: var(--t-mid); }
.tool-card:hover { border-color: var(--terra-border); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tool-card:hover::before { opacity: 1; }
.tool-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.tool-logo { width: 42px; height: 42px; background: var(--oat-2); border-radius: var(--r-sm); border: 1px solid var(--oat-3); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; overflow: hidden; }
.tool-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.tool-name { font-family: var(--font-ui); font-size: 0.95rem; font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.tool-tagline { font-size: 0.75rem; color: var(--ink-3); line-height: 1.4; }
.tool-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.tool-badge { font-family: var(--font-mono); font-size: 0.59rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); }
.badge-free       { background: var(--green-light); color: var(--green); border: 1px solid rgba(31,122,74,0.2); }
.badge-freemium   { background: var(--terra-light);  color: var(--terra);  border: 1px solid var(--terra-border); }
.badge-paid       { background: var(--amber-light);  color: var(--amber);  border: 1px solid var(--amber-border); }
.badge-enterprise { background: var(--blue-light);   color: var(--blue);   border: 1px solid rgba(29,111,164,0.2); }
.badge-new        { background: var(--red-light);    color: var(--red);    border: 1px solid rgba(217,53,70,0.2); }
.badge-verified   { background: var(--green-light);  color: var(--green); }
.neural-score-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.neural-score-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--ink-4); letter-spacing: 0.07em; text-transform: uppercase; }
.neural-score-value { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; color: var(--terra); }
.neural-bar { height: 4px; background: var(--oat-3); border-radius: var(--r-pill); overflow: hidden; }
.neural-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--terra), var(--amber)); transition: width 1s cubic-bezier(0.4,0,0.2,1); position: relative; overflow: hidden; }
.neural-fill::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg,transparent,rgba(255,255,255,0.5),transparent); animation: shimmer 2.5s infinite; }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }
.tool-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--oat-2); }
.tool-votes { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-4); }
.tool-visit-btn { font-family: var(--font-ui); font-size: 0.72rem; font-weight: 800; color: var(--cream); background: var(--terra); padding: 5px 14px; border-radius: var(--r-pill); border: none; cursor: pointer; transition: var(--t-fast); text-transform: uppercase; letter-spacing: 0.04em; }
.tool-visit-btn:hover { background: var(--terra-dim); }

/* ============================================================ PROGRAMMATIC SEO ============================================================ */
.prog-hero { background: var(--cream); border: 1px solid var(--oat-3); border-top: 4px solid var(--terra); border-radius: var(--r-lg); padding: var(--gap-2xl) var(--gap-xl); text-align: center; margin-bottom: var(--gap-xl); }
.prog-title { font-family: var(--font-editorial); font-size: clamp(1.6rem,3vw,2.6rem); font-weight: 600; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 12px; }
.prog-title .accent { color: var(--terra); }
.prog-subtitle { font-family: var(--font-editorial); font-size: 1rem; color: var(--ink-3); max-width: 560px; margin: 0 auto 24px; }

/* ============================================================ NEWSLETTER ============================================================ */
.newsletter-section { background: var(--ink); border-radius: var(--r-lg); padding: var(--gap-2xl) var(--gap-xl); text-align: center; position: relative; overflow: hidden; }
.newsletter-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--terra), var(--amber)); }
.newsletter-label { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terra); margin-bottom: 10px; }
.newsletter-title { font-family: var(--font-editorial); font-size: clamp(1.5rem,2.5vw,2.2rem); font-weight: 600; color: var(--cream); letter-spacing: -0.02em; margin-bottom: 10px; }
.newsletter-sub { font-family: var(--font-editorial); font-size: 0.95rem; color: rgba(250,246,240,0.5); margin-bottom: 28px; font-style: italic; }
.newsletter-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.newsletter-input { flex: 1; background: rgba(250,246,240,0.07); border: 1px solid rgba(250,246,240,0.15); border-radius: var(--r-pill); padding: 12px 20px; font-size: 0.88rem; color: var(--cream); outline: none; transition: var(--t-fast); }
.newsletter-input:focus { border-color: var(--terra); }
.newsletter-input::placeholder { color: rgba(250,246,240,0.3); }
.newsletter-btn { background: var(--terra); color: var(--cream); font-family: var(--font-ui); font-size: 0.78rem; font-weight: 800; padding: 12px 24px; border-radius: var(--r-pill); border: none; cursor: pointer; white-space: nowrap; transition: var(--t-fast); text-transform: uppercase; letter-spacing: 0.04em; }
.newsletter-btn:hover { background: var(--terra-dim); transform: translateY(-1px); }

/* ============================================================ ADS ============================================================ */
.ad-slot { background: var(--oat-2); border: 1px dashed var(--oat-4); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.6rem; color: var(--ink-4); letter-spacing: 0.1em; text-transform: uppercase; }
.ad-slot-banner { height: 90px; width: 100%; margin: var(--gap-lg) 0; }
.ad-slot-rect   { height: 250px; width: 300px; }
.ad-slot-inline { height: 110px; width: 100%; margin: var(--gap-xl) 0; }

/* ============================================================ ARTICLE ============================================================ */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--terra); z-index: 9999; transition: width 0.1s linear; }
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }
.article-main { min-width: 0; max-width: 720px; }
.article-header { margin-bottom: var(--gap-xl); }
.article-title { font-family: var(--font-editorial); font-size: clamp(1.8rem,3vw,2.8rem); font-weight: 600; color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 20px; }
.article-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--oat-3); border-bottom: 1px solid var(--oat-3); margin-bottom: var(--gap-lg); }
.article-author { display: flex; align-items: center; gap: 10px; }
.avatar-md { width: 38px; height: 38px; background: var(--terra-light); border: 1px solid var(--terra-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; color: var(--terra); overflow: hidden; flex-shrink: 0; }
.article-author-name { font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.article-author-role { font-size: 0.7rem; color: var(--ink-4); }
.article-stats { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.article-stat { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-4); display: flex; align-items: center; gap: 4px; }
.article-body { font-family: var(--font-editorial); font-size: 1.05rem; line-height: 1.85; color: var(--ink-2); }
.article-body h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 2em 0 0.8em; padding-bottom: 8px; border-bottom: 2px solid var(--oat-3); }
.article-body h3 { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 1.6em 0 0.6em; }
.article-body p { margin-bottom: 1.5em; }
.article-body a { color: var(--terra); border-bottom: 1px solid var(--terra-border); transition: var(--t-fast); }
.article-body a:hover { border-bottom-color: var(--terra); }
.article-body ul, .article-body ol { padding-left: 1.5em; margin-bottom: 1.5em; }
.article-body li { margin-bottom: 0.5em; }
.article-body blockquote { border-left: 4px solid var(--terra); padding: 16px 24px; background: var(--terra-light); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 2em 0; font-style: italic; color: var(--ink-2); }
.article-body code { font-family: var(--font-mono); font-size: 0.87em; background: var(--oat-2); color: var(--terra); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--oat-3); }
.article-body pre { background: var(--ink); border-radius: var(--r-md); padding: 20px; overflow-x: auto; margin: 1.5em 0; }
.article-body pre code { background: none; padding: 0; border: none; color: var(--oat); font-size: 0.88rem; }
.article-body img { border-radius: var(--r-md); margin: 1.5em 0; border: 1px solid var(--oat-3); }
.share-bar { display: flex; align-items: center; gap: 8px; padding: 16px 0; border-top: 1px solid var(--oat-3); margin-top: var(--gap-xl); flex-wrap: wrap; }
.share-label { font-family: var(--font-mono); font-size: 0.63rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em; }
.share-btn { font-size: 0.75rem; font-weight: 700; padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--oat-3); background: var(--cream); color: var(--ink-3); cursor: pointer; transition: var(--t-fast); display: flex; align-items: center; gap: 5px; }
.share-btn:hover { background: var(--oat-2); color: var(--ink); }

/* ============================================================ SIDEBAR / WIDGETS ============================================================ */
.article-sidebar { position: sticky; top: 80px; }
.sidebar-widget { background: var(--cream); border: 1px solid var(--oat-3); border-radius: var(--r-md); padding: 20px; margin-bottom: var(--gap-md); }
.widget-title { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--oat-3); display: flex; align-items: center; gap: 6px; }
.widget-title::before { content: ''; width: 14px; height: 2px; background: var(--terra); border-radius: 1px; display: inline-block; }

/* ============================================================ FOOTER ============================================================ */
.footer { background: var(--ink); padding: var(--gap-2xl) 0 var(--gap-xl); margin-top: var(--gap-3xl); }
.footer-top-rule { height: 4px; background: linear-gradient(90deg, var(--terra), var(--amber), var(--terra)); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gap-xl); margin-bottom: var(--gap-2xl); }
.footer-brand-text { font-family: var(--font-editorial); font-size: 0.88rem; color: rgba(250,246,240,0.38); line-height: 1.7; margin-top: 12px; max-width: 280px; font-style: italic; }
.footer-col-title { font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terra); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(250,246,240,0.07); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.83rem; color: rgba(250,246,240,0.42); transition: var(--t-fast); font-weight: 500; }
.footer-links a:hover { color: var(--terra); }
.footer-bottom { border-top: 1px solid rgba(250,246,240,0.07); padding-top: var(--gap-lg); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-family: var(--font-mono); font-size: 0.66rem; color: rgba(250,246,240,0.2); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-family: var(--font-mono); font-size: 0.66rem; color: rgba(250,246,240,0.2); transition: var(--t-fast); }
.footer-legal a:hover { color: var(--terra); }

/* ============================================================ ADMIN ============================================================ */
.admin-body { background: var(--oat); min-height: 100vh; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: var(--cream); border-right: 1px solid var(--oat-3); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.admin-logo { padding: 18px 20px; border-bottom: 2px solid var(--ink); font-family: var(--font-display); font-size: 0.88rem; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.admin-logo span { color: var(--terra); }
.admin-nav { padding: 14px 10px; flex: 1; }
.admin-nav-section { font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); padding: 10px 10px 4px; margin-top: 6px; }
.admin-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); font-size: 0.82rem; font-weight: 600; color: var(--ink-3); transition: var(--t-fast); cursor: pointer; margin-bottom: 1px; }
.admin-link:hover { background: var(--oat-2); color: var(--ink); }
.admin-link.active { color: var(--terra); background: var(--terra-light); }
.admin-main { flex: 1; overflow-y: auto; }
.admin-topbar { background: var(--cream); border-bottom: 1px solid var(--oat-3); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.admin-page-title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 800; color: var(--ink); }
.admin-content { padding: 28px; }
.admin-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--gap-md); margin-bottom: var(--gap-xl); }
.admin-stat { background: var(--cream); border: 1px solid var(--oat-3); border-top: 3px solid var(--terra); border-radius: var(--r-md); padding: 20px; }
.admin-stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--ink); margin-bottom: 4px; }
.admin-stat-label { font-size: 0.72rem; color: var(--ink-4); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.admin-stat-change { font-size: 0.7rem; color: var(--terra); font-family: var(--font-mono); margin-top: 4px; }
.admin-card { background: var(--cream); border: 1px solid var(--oat-3); border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--gap-md); }
.admin-card-head { padding: 14px 20px; border-bottom: 1px solid var(--oat-3); display: flex; align-items: center; justify-content: space-between; background: var(--oat); }
.admin-card-title { font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); padding: 10px 16px; text-align: left; background: var(--oat-2); border-bottom: 1px solid var(--oat-3); }
.admin-table td { padding: 11px 16px; font-size: 0.83rem; color: var(--ink-2); border-bottom: 1px solid var(--oat-2); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--oat); }

/* ============================================================ BUTTONS ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border-radius: var(--r-pill); font-family: var(--font-ui); font-size: 0.8rem; font-weight: 800; cursor: pointer; border: none; transition: var(--t-fast); white-space: nowrap; text-decoration: none; text-transform: uppercase; letter-spacing: 0.03em; }
.btn-primary { background: var(--terra); color: var(--cream); }
.btn-primary:hover { background: var(--terra-dim); transform: translateY(-1px); box-shadow: var(--shadow-terra); }
.btn-amber   { background: var(--amber); color: var(--cream); }
.btn-amber:hover { background: var(--amber-dim); }
.btn-ghost   { background: var(--cream); color: var(--ink-2); border: 1px solid var(--oat-3); }
.btn-ghost:hover { background: var(--oat-2); color: var(--ink); border-color: var(--oat-4); }
.btn-dark    { background: var(--ink); color: var(--oat); }
.btn-dark:hover { background: var(--ink-2); }
.btn-danger  { background: var(--red-light); color: var(--red); border: 1px solid rgba(217,53,70,0.2); }
.btn-danger:hover { background: rgba(217,53,70,0.15); }
.btn-sm { padding: 6px 14px; font-size: 0.72rem; }
.btn-xs { padding: 3px 10px; font-size: 0.66rem; }

/* ============================================================ FORMS ============================================================ */
.form-group { margin-bottom: var(--gap-md); }
.form-label { display: block; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea { width: 100%; background: var(--cream); border: 1px solid var(--oat-3); border-radius: var(--r-sm); padding: 10px 14px; font-size: 0.9rem; color: var(--ink); font-family: var(--font-ui); outline: none; transition: var(--t-fast); box-sizing: border-box; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--terra); box-shadow: 0 0 0 3px var(--terra-glow); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-4); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-select option { background: var(--cream); }

/* ============================================================ STATUS BADGES ============================================================ */
.status-badge { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 9px; border-radius: var(--r-pill); text-transform: uppercase; }
.status-published { background: var(--green-light); color: var(--green); border: 1px solid rgba(31,122,74,0.2); }
.status-draft     { background: var(--oat-2); color: var(--ink-4); border: 1px solid var(--oat-3); }
.status-scheduled { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }

/* ============================================================ SEARCH ============================================================ */
.search-overlay { position: fixed; inset: 0; background: rgba(250,246,240,0.97); backdrop-filter: blur(8px); z-index: 9999; display: none; align-items: flex-start; justify-content: center; padding-top: 100px; }
.search-overlay.active { display: flex; }
.search-box { width: 100%; max-width: 640px; padding: 0 20px; }
.search-input-wrap { position: relative; }
.search-big-input { width: 100%; background: var(--cream); border: 2px solid var(--terra); border-radius: var(--r-lg); padding: 18px 56px 18px 22px; font-family: var(--font-editorial); font-size: 1.3rem; color: var(--ink); outline: none; box-shadow: var(--shadow-lg); }
.search-big-input::placeholder { color: var(--ink-4); font-style: italic; }
.search-close { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--ink-4); font-size: 1.1rem; cursor: pointer; }

/* ============================================================ RESPONSIVE ============================================================ */
/* Narrow content utility — keeps prose readable on wide screens */
.content-narrow { max-width: 720px; }
.content-mid    { max-width: 860px; }

@media (max-width: 1000px) {
  /* Static pages: collapse two-col grid to single col earlier */
  .about-grid, .contact-grid, .legal-grid, .advertise-grid { grid-template-columns: 1fr !important; }
  .about-grid aside, .contact-grid aside, .legal-grid aside, .advertise-grid aside { position: static !important; }
}
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-sidebar { display: none; }
  .posts-grid { grid-template-columns: repeat(2,1fr); }
  .tools-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .page-wrap { padding: 0 16px; }
  .nav-inner { padding: 0 16px; }
  .nav-links { display: none; }
  .topbar { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============================================================ UTILITIES ============================================================ */
.text-terra { color: var(--terra); } .text-amber { color: var(--amber); } .text-muted { color: var(--ink-4); } .text-center { text-align: center; }
.mt-sm { margin-top: var(--gap-sm); } .mt-md { margin-top: var(--gap-md); } .mt-lg { margin-top: var(--gap-lg); } .mt-xl { margin-top: var(--gap-xl); }
.mb-md { margin-bottom: var(--gap-md); } .mb-lg { margin-bottom: var(--gap-lg); } .mb-xl { margin-bottom: var(--gap-xl); }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--gap-sm); } .gap-md { gap: var(--gap-md); }
.bg-cream { background: var(--cream); } .bg-oat { background: var(--oat); } .bg-oat-2 { background: var(--oat-2); } .bg-ink { background: var(--ink); }
.rule { border: none; border-top: 1px solid var(--oat-3); margin: var(--gap-lg) 0; }
.rule-heavy { border-top: 2px solid var(--ink); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.5s ease forwards; }
.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
