/* ============================================================
   The Technology Pulse — Redesign Overlay
   Loaded AFTER css/style.css. Provides:
   - Updated design tokens (slate ink + cyan pulse)
   - New site chrome (ribbon, header, footer)
   - Restyled buttons, forms, FAQ, headings
   - Homepage-only sections (hero, tools-ribbon, problem-router,
     latest, toolkits, news)
   - Inner-page support: page-prose, article hero, byline
   ============================================================ */

:root {
    --ink: #0a0e1a;
    --ink-2: #1e293b;
    --ink-3: #334155;
    --paper: #ffffff;
    --paper-2: #f8fafc;
    --paper-3: #f1f5f9;
    --rule: #e2e8f0;
    --rule-soft: #eef2f7;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --pulse: #06b6d4;
    --pulse-dark: #0e7490;
    --pulse-darker: #155e75;
    --pulse-soft: #ecfeff;
    --warn: #f59e0b;
    --warn-soft: #fef3c7;
    --rose: #f43f5e;
    --indigo: #6366f1;
    --emerald: #10b981;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 10px 15px -3px rgba(15, 23, 42, .08);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, .12), 0 20px 40px -10px rgba(15, 23, 42, .15);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --headline: "Archivo", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --container: 1240px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
    font-family: var(--headline);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink);
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ====== HIDE LEGACY NAVBAR (in case it's still around) ====== */
.navbar { display: none !important; }

/* ====== TOP RIBBON ====== */
.ribbon {
    background: var(--ink);
    color: var(--paper);
    font-size: 0.78rem;
    font-family: var(--body);
    letter-spacing: 0.02em;
}
.ribbon-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: rgba(255,255,255,0.78);
}
.ribbon-left { display: flex; gap: 20px; align-items: center; }
.ribbon-pulse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pulse);
    font-weight: 600;
}
.pulse-dot {
    width: 7px; height: 7px;
    background: var(--pulse);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.6);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}
.ribbon-right { display: flex; gap: 16px; }
.ribbon-right a { color: inherit; text-decoration: none; }
.ribbon-right a:hover { color: var(--pulse); }

/* ====== HEADER / NAV ====== */
.header {
    position: sticky; top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--rule);
    z-index: 100;
    transition: box-shadow 0.2s ease;
}
.header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 24px;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--headline);
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-decoration: none;
}
.brand-mark {
    width: 36px; height: 36px;
    background: var(--ink);
    color: var(--pulse);
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    position: relative;
}
.brand-mark::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 11px;
    border: 1px solid var(--pulse);
    opacity: 0.6;
}
.brand-pulse { color: var(--pulse); }
.nav-categories { display: flex; gap: 26px; align-items: center; list-style: none; padding: 0; margin: 0; }
.nav-categories a {
    font-family: var(--headline);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink-2);
    letter-spacing: 0.01em;
    position: relative;
    padding: 6px 0;
    transition: color 0.15s;
    text-decoration: none;
}
.nav-categories a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--pulse);
    transition: all 0.2s ease;
    transform: translateX(-50%);
}
.nav-categories a:hover { color: var(--pulse-dark); }
.nav-categories a:hover::after { width: 100%; }
.nav-cta {
    background: var(--ink);
    color: var(--paper);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--headline);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    transition: all 0.15s ease;
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
    text-decoration: none;
}
.nav-cta:hover { background: var(--pulse-dark); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: 0.2s; }

/* ====== HERO (homepage) ====== */
.hero {
    padding: 48px 0 64px;
    background:
        radial-gradient(1200px 600px at 70% -10%, rgba(6, 182, 212, 0.08), transparent 60%),
        radial-gradient(800px 400px at -10% 50%, rgba(99, 102, 241, 0.06), transparent 50%),
        var(--paper);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 36px;
    align-items: stretch;
}
.hero-primary {
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--ink);
    color: var(--paper);
    position: relative;
    min-height: 480px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hero-image {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0a0e1a 0%, #0e7490 60%, #06b6d4 110%);
    opacity: 0.95;
}
.hero-image::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(600px 300px at 80% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
        radial-gradient(400px 200px at 20% 80%, rgba(6, 182, 212, 0.5), transparent 60%);
}
.hero-image::after {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,0.025) 18px 19px);
}
.hero-content {
    position: relative; z-index: 2;
    padding: 36px;
    display: flex; flex-direction: column; justify-content: flex-end;
    flex: 1;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.85) 0%, rgba(10, 14, 26, 0.35) 60%, transparent 100%);
}
.hero-primary h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--paper);
    margin-bottom: 14px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-primary p {
    color: rgba(255,255,255,0.88);
    font-size: 1.05rem;
    margin-bottom: 18px;
    max-width: 550px;
}
.byline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
}
.byline strong { color: rgba(255,255,255,0.95); font-weight: 600; }
.byline-sep { width: 3px; height: 3px; background: currentColor; border-radius: 50%; opacity: 0.5; }

.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-side-card {
    display: flex; gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--rule);
    transition: all 0.2s ease;
    text-decoration: none; color: inherit;
}
.hero-side-card:hover { border-color: var(--pulse); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hero-side-thumb {
    width: 88px; height: 88px;
    flex-shrink: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    display: grid; place-items: center;
    font-size: 2rem;
    position: relative; overflow: hidden;
}
.hero-side-thumb.cyan { background: linear-gradient(135deg, #155e75 0%, #06b6d4 100%); color: #fff; }
.hero-side-thumb.amber { background: linear-gradient(135deg, #b45309 0%, #fbbf24 100%); color: #fff; }
.hero-side-thumb.rose { background: linear-gradient(135deg, #9f1239 0%, #f43f5e 100%); color: #fff; }
.hero-side-thumb.indigo { background: linear-gradient(135deg, #3730a3 0%, #6366f1 100%); color: #fff; }
.hero-side-body { flex: 1; min-width: 0; }
.hero-side-body .tag { font-size: 0.62rem; margin-bottom: 6px; padding: 2px 7px; }
.hero-side-body h3 { font-size: 1rem; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.hero-side-body .meta { font-size: 0.75rem; color: var(--muted); }

/* ====== TAG SYSTEM ====== */
.tag {
    display: inline-block;
    font-family: var(--headline);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 5px 10px;
    border-radius: 4px;
    background: var(--pulse);
    color: var(--ink);
    align-self: flex-start;
    margin-bottom: 16px;
}
.tag.outline { background: transparent; border: 1px solid currentColor; color: var(--pulse); }
.tag.warn { background: var(--warn); color: var(--ink); }
.tag.rose { background: var(--rose); color: var(--paper); }
.tag.emerald { background: var(--emerald); color: var(--paper); }
.tag.indigo { background: var(--indigo); color: var(--paper); }
.tag.ink { background: var(--ink-2); color: var(--paper); }

/* ====== TOOLS RIBBON (homepage) ====== */
.tools-ribbon { background: var(--ink); padding: 18px 0; }
.tools-ribbon-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
}
.tools-ribbon-label {
    font-family: var(--headline);
    color: var(--paper);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex; align-items: center; gap: 10px;
    white-space: nowrap;
}
.tools-ribbon-label::before { content: '⚡'; color: var(--pulse); font-size: 1.4rem; }
.tools-ribbon-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tool-pill {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    color: var(--paper);
    text-decoration: none;
    transition: all 0.18s ease;
}
.tool-pill:hover { background: rgba(6, 182, 212, 0.12); border-color: var(--pulse); transform: translateY(-2px); }
.tool-pill-icon {
    width: 38px; height: 38px;
    background: var(--pulse);
    color: var(--ink);
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.tool-pill-body strong { display: block; font-family: var(--headline); font-weight: 700; font-size: 0.92rem; }
.tool-pill-body span { font-size: 0.76rem; color: rgba(255,255,255,0.65); }

/* ====== PROBLEM ROUTER (homepage) ====== */
.problem-router { padding: 56px 0 36px; background: var(--paper-2); }
.pr-inner { text-align: center; }
.eyebrow {
    font-family: var(--headline);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--pulse-dark);
    margin-bottom: 12px;
}
.section-h { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 12px; }
.section-sub { color: var(--muted); margin-bottom: 32px; font-size: 1.02rem; }
.problem-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 24px; }
.problem-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 22px 16px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    transition: all 0.18s ease;
    text-align: center;
}
.problem-card:hover { border-color: var(--pulse); background: var(--pulse-soft); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.problem-card-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    width: 48px; height: 48px;
    display: grid; place-items: center;
    background: var(--paper-3);
    border-radius: 50%;
    transition: all 0.18s;
}
.problem-card:hover .problem-card-icon { background: var(--pulse); transform: scale(1.05); }
.problem-card strong { font-family: var(--headline); font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.problem-card span { font-size: 0.78rem; color: var(--muted); }

/* ====== LATEST GUIDES / CARDS ====== */
.latest { padding: 64px 0; background: var(--paper); }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; gap: 24px; flex-wrap: wrap; }
.section-head-text { flex: 1; min-width: 260px; }
.section-head .eyebrow { margin-bottom: 8px; }
.section-head h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 6px; }
.section-head p { color: var(--muted); }
.section-head .more {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--headline);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--pulse-dark);
    padding: 8px 14px;
    border: 1px solid var(--pulse);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    text-decoration: none;
}
.section-head .more:hover { background: var(--pulse); color: var(--ink); }

.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    display: flex; flex-direction: column;
    background: var(--paper);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--rule);
    text-decoration: none;
    color: var(--ink);
    transition: all 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--rule-soft); }
.card-img {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1e293b 0%, #06b6d4 100%);
    position: relative;
    display: grid; place-items: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
    transition: transform 0.3s;
}
.card:hover .card-img { transform: scale(1.02); }
.card-img.amber { background: linear-gradient(135deg, #78350f 0%, #fbbf24 100%); }
.card-img.rose { background: linear-gradient(135deg, #881337 0%, #f43f5e 100%); }
.card-img.indigo { background: linear-gradient(135deg, #1e1b4b 0%, #6366f1 100%); }
.card-img.emerald { background: linear-gradient(135deg, #064e3b 0%, #10b981 100%); }
.card-img.slate { background: linear-gradient(135deg, #0f172a 0%, #475569 100%); }
.card-img.cyan { background: linear-gradient(135deg, #164e63 0%, #22d3ee 100%); }
.card-img.warm { background: linear-gradient(135deg, #7c2d12 0%, #f97316 100%); }
.card-img::after {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,0.03) 22px 23px);
}
.card-img > * { position: relative; z-index: 2; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card-body .tag { margin-bottom: 10px; }
.card-body h3 { font-size: 1.12rem; line-height: 1.3; margin-bottom: 10px; flex: 1; }
.card-body p { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.card-body .meta { font-size: 0.74rem; color: var(--muted-2); display: flex; align-items: center; gap: 8px; }

/* ====== PRO TOOLKITS (homepage) ====== */
.toolkits { padding: 64px 0; background: linear-gradient(180deg, var(--paper) 0%, var(--paper-3) 100%); border-top: 1px solid var(--rule); }
.toolkit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.toolkit {
    display: flex; flex-direction: column;
    padding: 28px;
    background: var(--paper);
    border-radius: var(--radius-lg);
    border: 1px solid var(--rule);
    text-decoration: none; color: var(--ink);
    transition: all 0.22s ease;
    position: relative; overflow: hidden;
}
.toolkit::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--pulse) 0%, var(--indigo) 100%);
    opacity: 0; transition: opacity 0.22s;
}
.toolkit:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--pulse-soft); }
.toolkit:hover::before { opacity: 1; }
.toolkit.featured { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.toolkit.featured::before { opacity: 1; }
.toolkit.featured h3, .toolkit.featured .price { color: var(--paper); }
.toolkit-badge {
    position: absolute; top: 18px; right: 18px;
    font-family: var(--headline);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pulse-dark);
    background: var(--pulse-soft);
    padding: 4px 9px;
    border-radius: 4px;
}
.toolkit.featured .toolkit-badge { background: var(--pulse); color: var(--ink); }
.toolkit h3 { font-size: 1.2rem; margin-bottom: 10px; padding-right: 80px; }
.toolkit p { font-size: 0.92rem; color: var(--muted); line-height: 1.55; margin-bottom: 20px; flex: 1; }
.toolkit.featured p { color: rgba(255,255,255,0.75); }
.toolkit-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolkit .price { font-family: var(--headline); font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.toolkit .cta { display: inline-flex; align-items: center; gap: 6px; font-family: var(--headline); font-weight: 700; font-size: 0.86rem; color: var(--pulse-dark); }
.toolkit.featured .cta { color: var(--pulse); }

/* ====== NEWSLETTER (homepage dark section) ====== */
.news {
    padding: 72px 0;
    background: var(--ink);
    color: var(--paper);
    position: relative; overflow: hidden;
}
.news::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(700px 300px at 80% 30%, rgba(6, 182, 212, 0.15), transparent 60%),
        radial-gradient(500px 200px at 20% 70%, rgba(99, 102, 241, 0.1), transparent 60%);
}
.news-inner { max-width: 720px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.news h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--paper); margin-bottom: 12px; }
.news p { color: rgba(255,255,255,0.75); font-size: 1.02rem; margin-bottom: 26px; }
.news-form {
    display: flex; gap: 8px;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 6px;
    border-radius: var(--radius);
}
.news-form input {
    flex: 1;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: var(--paper);
    font-family: var(--body);
    font-size: 0.95rem;
    outline: none;
}
.news-form input::placeholder { color: rgba(255,255,255,0.4); }
.news-form button {
    padding: 12px 22px;
    border: 0;
    background: var(--pulse);
    color: var(--ink);
    font-family: var(--headline);
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}
.news-form button:hover { background: var(--paper); transform: translateY(-1px); }
.news small { display: block; margin-top: 14px; font-size: 0.78rem; color: rgba(255,255,255,0.45); }

/* ====== FOOTER (overrides old .footer / .footer-grid) ====== */
.footer {
    background: var(--paper-3) !important;
    padding: 56px 0 28px !important;
    color: var(--ink-3) !important;
    border-top: 1px solid var(--rule);
    margin-top: 0;
}
.footer .footer-grid {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr 1fr !important;
    gap: 36px !important;
    margin-bottom: 36px !important;
    text-align: left !important;
}
.footer h3, .footer h4 {
    font-family: var(--headline);
    color: var(--ink);
    margin-bottom: 14px;
}
.footer h3 { font-size: 1.1rem; }
.footer h4 {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink) !important;
}
.footer p { font-size: 0.88rem; line-height: 1.6; color: var(--muted); margin-bottom: 14px; }
.footer ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.footer ul li { margin-bottom: 8px !important; }
.footer ul a, .footer-col a {
    font-size: 0.88rem;
    color: var(--ink-3);
    text-decoration: none;
    transition: color 0.15s;
}
.footer ul a:hover, .footer-col a:hover { color: var(--pulse-dark); }
.footer .footer-bot, .footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    font-size: 0.82rem;
    color: var(--muted);
    flex-wrap: wrap; gap: 10px;
    text-align: left;
}
.footer .footer-bottom p { margin: 0; }

/* ====== BUTTONS (override old) ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--headline);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
}
.btn-primary { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
.btn-primary:hover { background: var(--pulse-dark); border-color: var(--pulse-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper) !important; transform: translateY(-1px); }
.btn-secondary { background: var(--paper); color: var(--ink) !important; border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--pulse-dark); color: var(--pulse-dark) !important; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; display: flex; }

/* ====== FORMS (newsletter, contact, etc.) ====== */
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label {
    display: block;
    font-family: var(--headline);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--ink);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font-family: var(--body);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--pulse);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
.form-note { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

/* ====== FAQ (override old) ====== */
.faq { padding: 64px 0; background: var(--paper); }
.faq .section-header h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 8px; }
.faq-list { max-width: 800px; margin: 32px auto 0; }
.faq-item {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.faq-item:hover { border-color: var(--pulse-soft); }
.faq-question {
    width: 100%;
    padding: 18px 22px;
    background: transparent;
    border: 0;
    text-align: left;
    font-family: var(--headline);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color 0.15s;
}
.faq-question:hover { color: var(--pulse-dark); }
.faq-question::after {
    content: '+';
    font-family: var(--headline);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--pulse-dark);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer {
    padding: 0 22px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-answer { padding: 0 22px 18px; max-height: 600px; }
.faq-answer p { color: var(--ink-3); line-height: 1.7; font-size: 0.95rem; }

/* ====== SECTION HEADER (used on inner pages) ====== */
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 12px; }
.section-header p { color: var(--muted); font-size: 1.02rem; max-width: 640px; margin: 0 auto; }

/* ====== PAGE PROSE (about, contact, privacy, author) ====== */
.page-hero {
    padding: 56px 0 24px;
    background:
        radial-gradient(800px 400px at 70% -10%, rgba(6, 182, 212, 0.06), transparent 60%),
        var(--paper);
}
.page-hero .container { max-width: 800px; }
.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 14px;
    line-height: 1.15;
}
.page-hero p {
    font-size: 1.08rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 640px;
}

/* ====== ARTICLE HERO (for blog posts) ====== */
.article-hero {
    padding: 40px 0 20px;
    background: var(--paper);
}
.article-hero .container { max-width: 880px; }
.article-hero .tag { margin-bottom: 18px; }
.article-hero h1 {
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 16px;
}
.article-hero .article-meta,
.article-hero .article-byline {
    font-size: 0.88rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ====== UTILITIES ====== */
.text-accent { color: var(--pulse-dark); }
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-primary { min-height: 380px; }
    .problem-grid { grid-template-columns: repeat(3, 1fr); }
    .latest-grid, .toolkit-grid { grid-template-columns: repeat(2, 1fr); }
    .footer .footer-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .tools-ribbon-inner { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 720px) {
    .nav-categories { display: none; }
    .nav-toggle { display: block; }
    .ribbon-right { display: none; }
    .tools-ribbon-items { grid-template-columns: 1fr; }
    .problem-grid { grid-template-columns: repeat(2, 1fr); }
    .latest-grid, .toolkit-grid { grid-template-columns: 1fr; }
    .footer .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .hero { padding: 28px 0 40px; }
    .hero-primary h2 { font-size: 1.7rem; }
}
