/*
Theme Name: downgraf
Theme URI: 
Author: downgraf
Author URI: 
Description: A clean, modern WordPress theme for showcasing open-source software alternatives.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: openalternative
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ================================================================ */
/* Design System — Tokens & Global Variables                        */
/* ================================================================ */

/* Google Fonts — Plus Jakarta Sans (headings) + Inter (body)       */
/* Google Fonts are loaded asynchronously via css-optimization.php oa_optimize_font_loading()
   using media="print" onload="this.media='all'" to prevent render-blocking.
   DO NOT add @import url() here as it causes render-blocking. */

:root {
    /* --- Font Families --- */
    --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* --- Brand Colors --- */
    --color-brand: #2563eb;
    /* blue-600 */
    --color-brand-dark: #1d4ed8;
    /* blue-700 */
    --color-brand-light: #bfdbfe;
    /* blue-200 */
    --color-brand-bg: #eff6ff;
    /* blue-50  */

    /* --- Neutral Scale (WCAG-safe) --- */
    --color-ink-900: #0f172a;
    /* Headings — 19:1 on white */
    --color-ink-800: #1e293b;
    /* Sub-headings */
    --color-ink-700: #334155;
    /* Body text — 10:1 on white */
    --color-ink-500: #64748b;
    /* Secondary text — 5.5:1 */
    --color-ink-400: #94a3b8;
    /* Placeholder / caption */

    /* --- Surface Colors --- */
    --color-surface-0: #ffffff;
    --color-surface-50: #f8fafc;
    --color-surface-100: #f1f5f9;
    --color-surface-200: #e2e8f0;
    --color-surface-300: #cbd5e1;

    /* --- Semantic --- */
    --color-success: #16a34a;
    --color-info: #2563eb;
    --color-warning: #d97706;
    --color-danger: #dc2626;

    /* --- Shadows --- */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.20);

    /* --- Border Radius --- */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.875rem;
    --radius-xl: 1.25rem;
    --radius-full: 9999px;

    /* --- Transitions --- */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================================ */
/* Global Base Styles                                               */
/* ================================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--color-ink-700);
    background-color: var(--color-surface-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Apply heading font globally to all heading elements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-ink-900);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Focus ring — accessible & styled */
:focus-visible {
    outline: 2.5px solid var(--color-brand);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Selection color */
::selection {
    background-color: #bfdbfe;
    color: #1e3a8a;
}

/* Smooth image rendering */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ================================================================ */
/* Scrollbar Styling (Webkit)                                       */
/* ================================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-surface-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-ink-400);
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

/* Pagination Styling */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 3rem;
    font-family: var(--font-body);
}

.pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-ink-700);
    background-color: var(--color-surface-0);
    border: 1px solid var(--color-surface-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.pagination .page-numbers:hover {
    background-color: var(--color-surface-50);
    border-color: var(--color-surface-300);
    color: var(--color-ink-900);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.pagination .page-numbers.current {
    background-color: var(--color-ink-900);
    border-color: var(--color-ink-900);
    color: var(--color-surface-0);
    pointer-events: none;
    box-shadow: var(--shadow-md);
}

.pagination .page-numbers.dots {
    border: none;
    background: none;
    box-shadow: none;
    pointer-events: none;
    color: var(--color-ink-400);
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
    gap: 0.25rem;
}

/* Screen Reader Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Alternative Post Content Styling */
.single-alternative .prose h1,
.single-alternative .prose h2,
.single-alternative .prose h3,
.single-alternative .prose h4,
.single-alternative .prose h5,
.single-alternative .prose h6 {
    font-weight: 700;
    color: #171717;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.single-alternative .prose h1 {
    font-size: 2.25rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.single-alternative .prose h2 {
    font-size: 1.875rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e5e5;
}

.single-alternative .prose h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.single-alternative .prose h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.single-alternative .prose p {
    color: #404040;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.single-alternative .prose a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.single-alternative .prose a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.single-alternative .prose strong {
    color: #171717;
    font-weight: 700;
}

.single-alternative .prose em {
    color: #262626;
    font-style: italic;
}

.single-alternative .prose ul,
.single-alternative .prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.single-alternative .prose ul {
    list-style-type: disc;
}

.single-alternative .prose ol {
    list-style-type: decimal;
}

.single-alternative .prose li {
    color: #404040;
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.single-alternative .prose li>p {
    margin-bottom: 0.5rem;
}

.single-alternative .prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    background-color: #eff6ff;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #525252;
    margin: 1.5rem 0;
}

.single-alternative .prose blockquote p {
    margin-bottom: 0;
}

.single-alternative .prose code {
    color: #db2777;
    background-color: #fdf2f8;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
}

.single-alternative .prose pre {
    background-color: #171717;
    color: #f5f5f5;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #404040;
}

.single-alternative .prose pre code {
    background-color: transparent;
    color: #f5f5f5;
    padding: 0;
    font-size: 0.875rem;
}

.single-alternative .prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.single-alternative .prose thead {
    background-color: #f5f5f5;
    border-bottom: 2px solid #d4d4d4;
}

.single-alternative .prose th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    color: #171717;
}

.single-alternative .prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.single-alternative .prose tr:hover {
    background-color: #fafafa;
}

.single-alternative .prose img {
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}

.single-alternative .prose hr {
    border: 0;
    border-top: 1px solid #d4d4d4;
    margin: 2rem 0;
}

.single-alternative .prose kbd {
    background-color: #f5f5f5;
    border: 1px solid #d4d4d4;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.single-alternative .prose mark {
    background-color: #fef08a;
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}

/* Software Post Content Styling */
.single-software .prose h1,
.single-software .prose h2,
.single-software .prose h3,
.single-software .prose h4,
.single-software .prose h5,
.single-software .prose h6 {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.single-software .prose h1 {
    font-size: 2.25rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.single-software .prose h2 {
    font-size: 1.875rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.single-software .prose h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.single-software .prose h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.single-software .prose p {
    color: #475569;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.single-software .prose a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.single-software .prose a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.single-software .prose strong {
    color: #0f172a;
    font-weight: 700;
}

.single-software .prose em {
    color: #1e293b;
    font-style: italic;
}

.single-software .prose ul,
.single-software .prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.single-software .prose ul {
    list-style-type: disc;
}

.single-software .prose ol {
    list-style-type: decimal;
}

.single-software .prose li {
    color: #475569;
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.single-software .prose li>p {
    margin-bottom: 0.5rem;
}

.single-software .prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    background-color: #eff6ff;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #64748b;
    margin: 1.5rem 0;
}

.single-software .prose blockquote p {
    margin-bottom: 0;
}

.single-software .prose code {
    color: #db2777;
    background-color: #fdf2f8;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
}

.single-software .prose pre {
    background-color: #0f172a;
    color: #f1f5f9;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #334155;
}

.single-software .prose pre code {
    background-color: transparent;
    color: #f1f5f9;
    padding: 0;
    font-size: 0.875rem;
}

.single-software .prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.single-software .prose thead {
    background-color: #f1f5f9;
    border-bottom: 2px solid #cbd5e1;
}

.single-software .prose th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    color: #0f172a;
}

.single-software .prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.single-software .prose tr:hover {
    background-color: #f8fafc;
}

.single-software .prose img {
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}

.single-software .prose hr {
    border: 0;
    border-top: 1px solid #cbd5e1;
    margin: 2rem 0;
}

.single-software .prose kbd {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.single-software .prose mark {
    background-color: #fef08a;
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}

/* ================================================================ */
/* Blog Post (single.php) — Premium Editorial Content Styling       */
/* ================================================================ */

/* --- Blog post: Playfair Display for article headings (editorial feel) --- */

/* Headings */
.single-post-content h1,
.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-ink-900);
    letter-spacing: -0.025em;
    line-height: 1.25;
    scroll-margin-top: 80px;
}

.single-post-content h1 {
    font-size: 2.25rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

.single-post-content h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-surface-200);
    position: relative;
}

.single-post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 3rem;
    height: 2px;
    background: #111111;
    border-radius: 2px;
}

.single-post-content h3 {
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.single-post-content h4 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Body text */
.single-post-content p {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    color: var(--color-ink-700);
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

/* First paragraph — lead style */
.single-post-content>p:first-of-type {
    font-size: 1.125rem;
    color: var(--color-ink-800);
    line-height: 1.8;
    font-weight: 450;
}

/* Links */
.single-post-content a {
    color: #111111;
    text-decoration: underline;
    text-decoration-color: rgba(17, 17, 17, 0.3);
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.single-post-content a:hover {
    color: #262523;
    text-decoration-color: #111111;
}

/* Strong / Bold */
.single-post-content strong {
    color: #111111;
    font-weight: 700;
}

/* Italic */
.single-post-content em {
    color: #3e3d38;
}

/* Lists */
.single-post-content ul,
.single-post-content ol {
    padding-left: 1.625rem;
    margin-bottom: 1.5rem;
}

.single-post-content ul {
    list-style: none;
}

.single-post-content ul li {
    position: relative;
    padding-left: 1rem;
}

.single-post-content ul li::before {
    content: '';
    position: absolute;
    left: -0.25rem;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: #111111;
    border-radius: 50%;
}

.single-post-content ol {
    list-style: decimal;
}

.single-post-content li {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    color: var(--color-ink-700);
    line-height: 1.75;
    margin-bottom: 0.625rem;
}

.single-post-content li>p {
    margin-bottom: 0.5rem;
}

/* Blockquote */
.single-post-content blockquote {
    position: relative;
    border-left: none;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    background: var(--color-surface-100);
    border-radius: 0.75rem;
    font-style: italic;
    color: #55534e;
    margin: 2rem 0;
    box-shadow: inset 0 0 0 1px var(--color-surface-200);
}

.single-post-content blockquote::before {
    content: '\201C';
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    font-family: Georgia, serif;
    font-size: 3rem;
    line-height: 1;
    color: #a8a49b;
    font-style: normal;
}

.single-post-content blockquote p {
    margin-bottom: 0;
    font-size: 1.0625rem;
    line-height: 1.75;
}

/* Inline code */
.single-post-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    color: #262523;
    background-color: var(--color-surface-100);
    border: 1px solid var(--color-surface-200);
    padding: 0.15em 0.4em;
    border-radius: 0.3rem;
    font-size: 0.875em;
}

/* Code block */
.single-post-content pre {
    background: #111111;
    color: #f1efe9;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid #262523;
    position: relative;
}

.single-post-content pre::before {
    content: none;
}

.single-post-content pre code {
    background: transparent;
    border: none;
    color: #f1efe9;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Tables */
.single-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.single-post-content thead {
    background: #111111;
}

.single-post-content thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.8125rem;
    color: #d6d3cb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.single-post-content tbody tr {
    border-bottom: 1px solid var(--color-surface-100);
}

.single-post-content tbody tr:nth-child(even) {
    background: var(--color-surface-50);
}

.single-post-content tbody tr:hover {
    background: var(--color-surface-100);
}

.single-post-content td {
    padding: 0.75rem 1rem;
    color: #3e3d38;
}

/* Images */
.single-post-content img {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    margin: 2rem auto;
    max-width: 100%;
    height: auto;
    display: block;
}

/* HR */
.single-post-content hr {
    border: none;
    height: 1px;
    background: var(--color-surface-200);
    margin: 2.5rem 0;
}

/* kbd */
.single-post-content kbd {
    display: inline-block;
    background: var(--color-surface-100);
    border: 1px solid var(--color-surface-200);
    border-bottom: 2px solid var(--color-surface-300);
    border-radius: 0.25rem;
    padding: 0.1em 0.4em;
    font-size: 0.8125em;
    font-family: 'Courier New', monospace;
    color: #3e3d38;
    box-shadow: 0 1px 0 rgba(17, 17, 17, 0.06);
}

/* Highlight */
.single-post-content mark {
    background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
    padding: 0.1em 0.3em;
    border-radius: 0.2rem;
    color: #713f12;
    font-weight: 500;
}

/* Article hero styling */
.article-hero .article-title {
    font-family: var(--font-heading);
}

/* Article hero responsive */
@media (max-width: 640px) {
    .single-post-content h2 {
        font-size: 1.4rem;
    }

    .single-post-content h3 {
        font-size: 1.2rem;
    }

    .single-post-content p {
        font-size: 1rem;
    }

    .single-post-content pre {
        padding: 1rem;
        border-radius: 0.5rem;
    }

    .single-post-content pre::before {
        display: none;
    }
}

/* Author bio card */
.author-bio-card {
    position: relative;
}

/* Floating share sidebar animation */
#floating-share {
    opacity: 0;
    animation: fadeInLeft 0.5s 0.8s ease forwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate(-8px, -50%);
    }

    to {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

/* WordPress Comments System - Clean Minimal Design */
.comments-area {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #f1f5f9;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}


.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 0;
    background-color: transparent;
}

/* Defensively hide any default WordPress pseudo-elements on .children that might conflict */
.comment-list .children::before,
.comment-list .children::after {
    display: none !important;
}

.comment-body {
    position: relative;
    transition: all 0.2s;
}

.comment-content {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}

/* Ensure avatar image is constrained and rounded */
.comment-author-avatar img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
}

/* Reddit Style Nested Comments Thread Line */
.comment-list,
.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .children>li {
    padding-left: 32px;
    position: relative;
}

/* 1. Vertical line from parent avatar down to bottom of parent comment-body */
.comment-list li:has(> .children)>.comment-body::before {
    content: "";
    position: absolute;
    left: 14px;
    /* Center of avatar (28/2) */
    top: 46px;
    /* 6px gap below the avatar (avatar bottom is at 40px) */
    bottom: 0;
    width: 2px;
    background-color: #cbd5e1;
    /* slightly lighter grey to match diagram */
    z-index: 0;
}

/* 2. Vertical line connecting siblings */
.comment-list .children>li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #cbd5e1;
    z-index: 0;
}

/* 3. Curve to child avatar */
.comment-list .children>li::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 0;
    height: 27px;
    /* Centers on the child avatar (26px + 1px for border thickness balance) */
    width: 14px;
    /* Leaves a 4px gap before the child avatar (which starts at 32px) */
    border-left: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    border-bottom-left-radius: 12px;
    z-index: 0;
}

/* Hover effects for thread lines */
.comment-list .children>li:hover::before,
.comment-list .children>li:hover::after,
.comment-list li:hover>.comment-body::before {
    border-color: #94a3b8;
    background-color: #94a3b8;
}

.comment-list .children>li::after {
    background-color: transparent !important;
}

/* Collapsed State */
.comment.collapsed>.children {
    display: none !important;
}

.comment.collapsed>.comment-body::before {
    display: none !important;
}

.comment.collapsed>.comment-body .comment-text,
.comment.collapsed>.comment-body .comment-awaiting-moderation,
.comment.collapsed>.comment-body .comment-actions .reply,
.comment.collapsed>.comment-body .comment-actions .btn-share {
    display: none !important;
}

.comment.collapsed>.comment-body .comment-content {
    opacity: 0.7;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-author .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
}

.comment-author .fn {
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    font-style: normal;
    line-height: 1.4;
}

.comment-author .fn a {
    color: #0f172a;
    text-decoration: none;
}

.comment-author .fn a:hover {
    color: #475569;
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #64748b;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.comment-metadata a {
    color: #64748b;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: #0f172a;
}

.comment-content {
    color: #334155;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 0;
}

.comment-content p {
    margin-bottom: 0.75rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Comment Actions - Like, Dislike, Reply */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
}

.comment-like,
.comment-dislike,
.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.comment-like:hover,
.comment-dislike:hover,
.comment-reply-link:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #f1f5f9;
}



.reply {
    display: inline;
    margin: 0;
}

/* Author Highlight - Minimal */
.bypostauthor .comment-author .fn::after {
    content: "Author";
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #0f172a;
    background-color: #e2e8f0;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Comment Form - Clean */
.comment-respond {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--color-surface-50);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-surface-200);
    box-shadow: none;
}

.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-ink-900);
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.comment-reply-title small {
    font-size: 0.875rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

.comment-reply-title small a {
    color: var(--color-danger);
    text-decoration: none;
}

.comment-reply-title small a:hover {
    text-decoration: underline;
}

.comment-form {
    display: grid;
    gap: 1.5rem;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin: 0;
}

.comment-form label {
    display: block;
    font-weight: 600;
    color: var(--color-ink-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--color-ink-900);
    background-color: var(--color-surface-0);
    border: 1px solid var(--color-surface-200);
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-ink-900);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    margin: 0;
}

.form-submit .submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-surface-0);
    background-color: var(--color-ink-900);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-xs);
}

.form-submit .submit:hover {
    background-color: var(--color-ink-800);
    box-shadow: var(--shadow-md);
}

.form-submit .submit:active {
    transform: translateY(1px);
}

/* Comment Form Notes */
.comment-notes,
.logged-in-as {
    font-size: 0.875rem;
    color: var(--color-ink-500);
    margin-bottom: 1rem;
}

.comment-notes a,
.logged-in-as a {
    color: var(--color-ink-900);
    text-decoration: none;
    font-weight: 500;
}

.comment-notes a:hover,
.logged-in-as a:hover {
    text-decoration: underline;
}

.required {
    color: var(--color-danger);
}

/* No Comments Message */
.no-comments {
    padding: 2rem;
    text-align: center;
    color: #64748b;
    background-color: #f8fafc;
    border-radius: 0.75rem;
    border: 1px dashed #e2e8f0;
}

/* Comment Navigation */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.comment-navigation a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.comment-navigation a:hover {
    text-decoration: underline;
    color: #334155;
}

/* Pingback/Trackback */
.pingback,
.trackback {
    padding: 1rem;
    background-color: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.pingback .comment-body,
.trackback .comment-body {
    padding: 0;
}

.pingback .edit-link,
.trackback .edit-link {
    font-size: 0.875rem;
}

/* ================================================================ */
/* Global Header Polish                                             */
/* ================================================================ */

/* Site header — use CSS variable fonts */
.site-header {
    font-family: var(--font-body);
}

/* Logo text fallback styling */
.site-header .site-branding a {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: var(--color-ink-900);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.site-header .site-branding a:hover {
    color: var(--color-brand);
}

/* Header custom logo (Site Logo upload)
   Always fits the header: max-height = header height (h-16 = 4rem),
   width 100% + object-fit:contain so any image size/aspect stays inside. */
.site-header .site-branding {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(55vw, 260px);
}
.site-header .site-branding .custom-logo-link {
    display: block;
    max-width: 100%;
    padding: 0.5rem 0;              /* breathing room top/bottom */
    line-height: 0;
    text-decoration: none;
}
.site-header .site-branding .custom-logo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 3rem;               /* header height (4rem) minus the padding */
    object-fit: contain;
    object-position: left center;
}

/* Nav menu items */
.mega-menu-trigger,
#mega-menu a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--color-ink-700);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.mega-menu-trigger:hover,
#mega-menu a:hover {
    color: var(--color-ink-900);
}

/* Submit Content CTA button */
.site-header button[class*="bg-slate-900"],
.site-header button[class*="bg-slate--900"] {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ================================================================ */
/* Card Polish — Global                                             */
/* ================================================================ */

/* All article cards get smooth transitions */
article[class*="group"] {
    transition: box-shadow var(--transition-slow), border-color var(--transition-slow), transform var(--transition-slow);
}

/* Card heading typography */
article h2,
article h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Meta text in cards */
.text-slate-500,
.text-slate-600 {
    color: var(--color-ink-500);
}

.text-slate-700 {
    color: var(--color-ink-700);
}

.text-slate-900 {
    color: var(--color-ink-900);
}

/* ================================================================ */
/* Badge / Tag Component                                            */
/* ================================================================ */

/* Subtle badge base */
.badge-open-source {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.2em 0.6em;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    border: 1px solid currentColor;
    line-height: 1.5;
}

/* ================================================================ */
/* Section Heading Typography                                       */
/* ================================================================ */

/* All section headings using section tags */
section h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-ink-900);
}

section>div>div h2,
section>div h2 {
    font-family: var(--font-heading);
}

/* Section subtitle paragraphs */
section>div p.text-lg,
section>div>div p.text-lg {
    font-family: var(--font-body);
    color: var(--color-ink-500);
    font-weight: 400;
}

/* ================================================================ */
/* Hero Section Polish                                              */
/* ================================================================ */

/* Hero h1 */
.site-main section:first-of-type h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

/* Hero search input */
.search-field {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-ink-900);
}

.search-field::placeholder {
    color: var(--color-ink-400);
}

.search-field:focus {
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.10);
    border-color: var(--color-brand);
}

/* ================================================================ */
/* Footer Polish (dark band — follows Bottom CTA pattern)            */
/* ================================================================ */

.site-footer {
    font-family: var(--font-body);
    background: var(--color-ink-900);
    border-top: 1px solid var(--color-ink-800);
    color: var(--color-ink-400);
}

.site-footer h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--color-surface-0);
}

.site-footer h2 a {
    color: var(--color-surface-0);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-footer h2 a:hover {
    color: var(--color-surface-100);
}

.site-footer h3 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-ink-400);
}

.site-footer p {
    color: var(--color-ink-400);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.site-footer p.text-xs {
    color: var(--color-ink-500);
    font-size: 0.75rem;
}

.site-footer a {
    color: var(--color-ink-400);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.site-footer a:hover {
    color: var(--color-surface-100);
}

.site-footer .footer-cta {
    color: var(--color-ink-900);
    font-weight: 700;
}

.site-footer .footer-cta:hover {
    color: var(--color-surface-0);
}

/* ---------------------------------------------------------------- */
/* Footer widget areas                                              */
/* ---------------------------------------------------------------- */

/* Every column starts at the same top edge and the grid keeps a consistent
   gutter, regardless of how tall each widget turns out to be. */
.site-footer .footer-widget-grid {
    align-items: start;
}

.site-footer .oa-footer-col {
    min-width: 0;
}

/*
 * The compiled Tailwind subset ships md:col-span-1 but no bare .col-span-2, so
 * the brand column could not span both tracks on small screens. Restore the
 * intended behaviour here, ahead of the md breakpoint, and let the last column
 * span as well so the stacked layout always ends on a full row.
 */
@media (max-width: 767px) {
    .site-footer .oa-footer-col-1,
    .site-footer .oa-footer-col-4 {
        grid-column: span 2 / span 2;
    }
}

/* Widget titles render through before_title as <h3>, so they inherit the
   uppercase label style above. A widget with an empty title gets no heading at
   all, so the brand column never shows one. */
.site-footer .oa-footer-widget-title {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-ink-400);
    margin: 0 0 1rem;
}

.site-footer .oa-footer-widget-title:empty {
    display: none;
}

/* The widget body WordPress prints around a text widget's content. It carries
   no styling of its own, so collapse its margin to keep the column rhythm. */
.site-footer .oa-footer-widget .textwidget {
    margin: 0;
}

/* Text widgets print a bare <p> around single-block content; that extra
   paragraph should not add its own bottom margin. */
.site-footer .oa-footer-widget .textwidget > p:last-child {
    margin-bottom: 0;
}

.site-footer .oa-footer-widget .textwidget > *:first-child {
    margin-top: 0;
}

/* Spacing between stacked widgets inside one column. */
.site-footer .oa-footer-widget + .oa-footer-widget {
    margin-top: 2rem;
}

/* Column 1 stacks brand heading, description and CTA with breathing room.
   Targets the pieces directly (rather than wrapper elements) so the spacing
   holds whether the column renders as a widget or as the fallback markup. */
.site-footer .oa-footer-col-1 h2 {
    margin: 0 0 1rem;
}

.site-footer .oa-footer-col-1 p {
    margin: 0 0 1.25rem;
}

.site-footer .oa-footer-col-1 .footer-cta {
    margin: 0;
}

/*
 * The CTA never wraps: on a narrow column the label and its arrow must stay on
 * one line, so the button keeps its intrinsic width and simply overflows the
 * track rather than breaking "Submit your project" across two lines.
 */
.site-footer .oa-footer-col-1 .footer-cta {
    flex-wrap: nowrap;
    white-space: nowrap;
    max-width: 100%;
}

/* Reclaim horizontal room so the CTA fits on one line in the tightest column. */
@media (min-width: 768px) and (max-width: 1023px) {
    .site-footer .footer-widget-grid {
        column-gap: 1.25rem;
    }

    .site-footer .oa-footer-col-1 .footer-cta {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 767px) {
    /* Full-width brand column has plenty of room — restore the roomy padding. */
    .site-footer .oa-footer-col-1 .footer-cta {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* The brand heading sits where the other columns' widget titles sit, so align
   its baseline with theirs rather than letting it ride higher. */
.site-footer .oa-footer-widget-title + .textwidget > h2:first-child {
    margin-top: -0.125rem;
}

/* Default WordPress widget lists (Pages, Categories, Custom Menu, …). */
.site-footer .oa-footer-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .oa-footer-widget ul li {
    margin: 0 0 0.75rem;
}

.site-footer .oa-footer-widget ul li:last-child {
    margin-bottom: 0;
}

.site-footer .oa-footer-widget ul li a {
    color: var(--color-ink-400);
    font-weight: 500;
    font-size: 0.875rem;
}

.site-footer .oa-footer-widget ul li a:hover {
    color: var(--color-surface-100);
}

/* Nested lists (Categories with children, Pages with sub-pages). */
.site-footer .oa-footer-widget ul ul {
    margin: 0.5rem 0 0 0.75rem;
}

.site-footer .oa-footer-widget ul ul li {
    margin-bottom: 0.5rem;
}

/* Search + text widgets. */
.site-footer .oa-footer-widget .search-form,
.site-footer .oa-footer-widget .wp-block-search {
    display: flex;
    gap: 0.5rem;
    max-width: 20rem;
}

.site-footer .oa-footer-widget input[type="search"],
.site-footer .oa-footer-widget input[type="text"],
.site-footer .oa-footer-widget input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-ink-800);
    background: var(--color-ink-900);
    color: var(--color-surface-0);
    font-size: 0.875rem;
}

.site-footer .oa-footer-widget input[type="search"]::placeholder,
.site-footer .oa-footer-widget input[type="text"]::placeholder,
.site-footer .oa-footer-widget input[type="email"]::placeholder {
    color: var(--color-ink-500);
}

.site-footer .oa-footer-widget input[type="submit"],
.site-footer .oa-footer-widget .wp-block-search__button {
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--color-surface-0);
    color: var(--color-ink-900);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
}

.site-footer .oa-footer-widget input[type="submit"]:hover,
.site-footer .oa-footer-widget .wp-block-search__button:hover {
    background: var(--color-surface-100);
}

/* Text / paragraph widgets. */
.site-footer .oa-footer-widget p {
    color: var(--color-ink-400);
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0 0 0.75rem;
}

.site-footer .oa-footer-widget p:last-child {
    margin-bottom: 0;
}

.site-footer .oa-footer-widget img {
    max-width: 100%;
    height: auto;
}

/* Block widgets (Gutenberg) should not inherit the default block gap. */
.site-footer .oa-footer-widget .wp-block-group,
.site-footer .oa-footer-widget .wp-block-columns {
    max-width: 100%;
}

/* ================================================================ */
/* Micro-Animations                                                 */
/* ================================================================ */

/* Entrance animation for cards */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered article cards on page load */
.grid article:nth-child(1) {
    animation: fadeSlideUp 0.4s 0.05s both;
}

.grid article:nth-child(2) {
    animation: fadeSlideUp 0.4s 0.10s both;
}

.grid article:nth-child(3) {
    animation: fadeSlideUp 0.4s 0.15s both;
}

.grid article:nth-child(4) {
    animation: fadeSlideUp 0.4s 0.20s both;
}

.grid article:nth-child(5) {
    animation: fadeSlideUp 0.4s 0.25s both;
}

.grid article:nth-child(6) {
    animation: fadeSlideUp 0.4s 0.30s both;
}

.grid article:nth-child(7) {
    animation: fadeSlideUp 0.4s 0.35s both;
}

.grid article:nth-child(8) {
    animation: fadeSlideUp 0.4s 0.40s both;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .grid article {
        animation: none !important;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ================================================================ */
/* Comment Form & Utility Polish                                    */
/* ================================================================ */

/* Comment form inputs use CSS font variables */
.comment-form input,
.comment-form textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-ink-900);
    border-color: var(--color-surface-200);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-ink-900);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
    outline: none;
}

.comment-author .fn {
    font-family: var(--font-heading);
    font-weight: 700;
}

.comments-title {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--color-ink-900);
}

/* ================================================================ */
/* Link Hover Underline Utility                                     */
/* ================================================================ */

.link-hover-underline {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.link-hover-underline:hover {
    border-color: currentColor;
}

/* ================================================================ */
/* Archive Page Section Headings                                    */
/* ================================================================ */

.archive-hero h1,
.archive-title,
.page-header .page-title {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--color-ink-900);
}

.archive-hero p,
.archive-description,
.page-header .archive-description {
    font-family: var(--font-body);
    color: var(--color-ink-500);
    font-size: 1.0625rem;
}

/* ================================================================ */
/* Responsive Typography Scale                                      */
/* ================================================================ */

@media (max-width: 768px) {
    section h2 {
        font-size: 1.75rem !important;
        letter-spacing: -0.025em;
    }

    .site-main section:first-of-type h1 {
        letter-spacing: -0.03em;
    }
}

/* ================================================================ */
/* Gutenberg Button Block Styles                                    */
/* ================================================================ */

/* Base Button Link Styles */
.wp-block-button__link {
    text-decoration: none !important;
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 0.5rem !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05) !important;
}

/* Remove underline on hover/focus */
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.wp-block-button__link:active {
    text-decoration: none !important;
}

/* Default Button Style (Filled) */
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background-color: var(--color-ink-900) !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    background-color: var(--color-ink-800) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* Outline Button Style (Second Button) */
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: var(--color-ink-900) !important;
    border: 1.5px solid var(--color-surface-200) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--color-surface-50) !important;
    color: var(--color-ink-900) !important;
    border-color: var(--color-ink-900) !important;
}

/* ================================================================ */
/* Blog Single: Comments — warm design-system colors                  */
/* ================================================================ */
.comment-content {
    background-color: var(--color-surface-50);
    color: var(--color-ink-700);
    border-radius: 0.5rem;
}

.comment-list li:has(> .children)>.comment-body::before,
.comment-list .children>li:not(:last-child)::before {
    background-color: var(--color-surface-300);
}

.comment-list .children>li::after {
    border-left-color: var(--color-surface-300);
    border-bottom-color: var(--color-surface-300);
}

.comment-list .children>li:hover::before,
.comment-list .children>li:hover::after,
.comment-list li:hover>.comment-body::before {
    border-color: var(--color-ink-400);
    background-color: var(--color-ink-400);
}

.comment-author .avatar {
    border-color: var(--color-surface-200);
}

.comment-author .fn,
.comment-author .fn a {
    color: var(--color-ink-900);
}

.comment-author .fn a:hover {
    color: var(--color-ink-600);
}

.comment-metadata,
.comment-metadata a {
    color: var(--color-ink-500);
}

.comment-metadata a:hover {
    color: var(--color-ink-900);
}

.comment-like,
.comment-dislike,
.comment-reply-link {
    color: var(--color-ink-500);
}

.comment-like:hover,
.comment-dislike:hover,
.comment-reply-link:hover {
    background-color: var(--color-surface-100);
    color: var(--color-ink-900);
    border-color: var(--color-surface-200);
}

.bypostauthor .comment-author .fn::after {
    color: var(--color-ink-900);
    background-color: var(--color-surface-200);
}

.no-comments {
    color: var(--color-ink-500);
    background-color: var(--color-surface-50);
    border-color: var(--color-surface-300);
}

.comment-navigation {
    border-top-color: var(--color-surface-200);
    border-bottom-color: var(--color-surface-200);
}

.comment-navigation a {
    color: var(--color-ink-900);
}

.comment-navigation a:hover {
    color: var(--color-ink-700);
}

.pingback,
.trackback {
    background-color: var(--color-surface-50);
    border-left-color: var(--color-surface-300);
}

/* =========================================================
   Long Description rich content (software + AI tool singles)
   Scoped to .oa-long-desc so pasted Quill formatting keeps
   rendering on the published page (alignment, indents,
   lists, checklists, code blocks, tables). Mirrors the
   rules Quill only ships for the editor.
   ========================================================= */

.oa-long-desc .ql-align-right {
    text-align: right;
}

.oa-long-desc .ql-align-center {
    text-align: center;
}

.oa-long-desc .ql-align-justify {
    text-align: justify;
}

.oa-long-desc .ql-indent-1 {
    padding-left: 3em;
}

.oa-long-desc .ql-indent-2 {
    padding-left: 6em;
}

.oa-long-desc .ql-indent-3 {
    padding-left: 9em;
}

.oa-long-desc .ql-indent-4 {
    padding-left: 12em;
}

.oa-long-desc .ql-indent-5 {
    padding-left: 15em;
}

.oa-long-desc .ql-indent-6 {
    padding-left: 18em;
}

.oa-long-desc .ql-indent-7 {
    padding-left: 21em;
}

.oa-long-desc .ql-indent-8 {
    padding-left: 24em;
}

.oa-long-desc li.ql-indent-1 { padding-left: 4.5em; }
.oa-long-desc li.ql-indent-2 { padding-left: 7.5em; }
.oa-long-desc li.ql-indent-3 { padding-left: 10.5em; }
.oa-long-desc li.ql-indent-4 { padding-left: 13.5em; }
.oa-long-desc li.ql-indent-5 { padding-left: 16.5em; }
.oa-long-desc li.ql-indent-6 { padding-left: 19.5em; }
.oa-long-desc li.ql-indent-7 { padding-left: 22.5em; }
.oa-long-desc li.ql-indent-8 { padding-left: 25.5em; }

.oa-long-desc ol {
    padding-left: 1.5em;
}

.oa-long-desc li[data-list] {
    list-style-type: none;
    position: relative;
    counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}

.oa-long-desc li > .ql-ui {
    position: absolute;
}

.oa-long-desc li > .ql-ui::before {
    display: inline-block;
    margin-left: -1.5em;
    margin-right: .3em;
    text-align: right;
    white-space: nowrap;
    width: 1.2em;
}

.oa-long-desc li[data-list="bullet"] > .ql-ui::before {
    content: '\2022';
}

.oa-long-desc li[data-list="checked"] > .ql-ui::before {
    content: '\2611';
    color: #6b6b66;
}

.oa-long-desc li[data-list="unchecked"] > .ql-ui::before {
    content: '\2610';
    color: #6b6b66;
}

.oa-long-desc li[data-list="ordered"] {
    counter-increment: list-0;
}

.oa-long-desc li[data-list="ordered"] > .ql-ui::before {
    content: counter(list-0, decimal) '. ';
}

.oa-long-desc li[data-list="ordered"].ql-indent-1 {
    counter-increment: list-1;
}

.oa-long-desc li[data-list="ordered"].ql-indent-1 > .ql-ui::before {
    content: counter(list-1, lower-alpha) '. ';
}

.oa-long-desc li[data-list="ordered"].ql-indent-2 {
    counter-increment: list-2;
}

.oa-long-desc li[data-list="ordered"].ql-indent-2 > .ql-ui::before {
    content: counter(list-2, lower-roman) '. ';
}

.oa-long-desc li[data-list="ordered"].ql-indent-3 {
    counter-increment: list-3;
}

.oa-long-desc li[data-list="ordered"].ql-indent-3 > .ql-ui::before {
    content: counter(list-3, decimal) '. ';
}

/* Restart list counters after every block, so separate lists never continue */
.oa-long-desc p,
.oa-long-desc h1,
.oa-long-desc h2,
.oa-long-desc h3,
.oa-long-desc h4,
.oa-long-desc h5,
.oa-long-desc h6 {
    counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}

.oa-long-desc .ql-code-block-container {
    position: relative;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    background-color: #23241f;
    color: #f8f8f2;
    padding: 14px 18px;
    margin: 18px 0;
    border-radius: 10px;
    overflow-x: auto;
}

.oa-long-desc .ql-code-block {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: .9em;
    line-height: 1.6;
}

.oa-long-desc table {
    display: table;
    border-collapse: collapse;
    table-layout: auto;
    width: 100%;
    margin: 18px 0;
    font-size: .95em;
}

.oa-long-desc th,
.oa-long-desc td {
    border: 1px solid var(--color-surface-300, #d6d3cb);
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}

.oa-long-desc th {
    background-color: var(--color-surface-100, #f1efe9);
    font-weight: 600;
    color: var(--color-ink-900, #111111);
}

/* ================================================================ */
/* Homepage Hero — soft warm decor, gradient title, entrance motion  */
/* ================================================================ */

.oa-hero-title {
    background: linear-gradient(135deg, #111111 10%, #55534e 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.oa-hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(17, 17, 17, 0.055) 1px, transparent 1.5px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 80%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 80%);
}

.oa-hero-decor::before,
.oa-hero-decor::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.75;
}

.oa-hero-decor::before {
    width: 42rem;
    height: 24rem;
    left: -10rem;
    top: -12rem;
    background: #f4f1ea;
    animation: oa-float 16s ease-in-out infinite alternate;
}

.oa-hero-decor::after {
    width: 38rem;
    height: 22rem;
    right: -10rem;
    top: -10rem;
    background: #ece9e1;
    animation: oa-float 20s ease-in-out infinite alternate-reverse;
}

@keyframes oa-float {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(14px, 18px, 0); }
}

/* Staggered entrance */
.oa-fade-up {
    opacity: 0;
    animation: oa-hero-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.oa-fade-up-1 { animation-delay: 0.05s; }
.oa-fade-up-2 { animation-delay: 0.15s; }
.oa-fade-up-3 { animation-delay: 0.25s; }
.oa-fade-up-4 { animation-delay: 0.35s; }
.oa-fade-up-5 { animation-delay: 0.45s; }
.oa-fade-up-6 { animation-delay: 0.55s; }

@keyframes oa-hero-rise {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Live badge dot */
.oa-dot-pulse {
    animation: oa-dot 2s ease-in-out infinite;
}

@keyframes oa-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
    60%      { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .oa-fade-up {
        opacity: 1;
        animation: none;
    }
    .oa-hero-decor::before,
    .oa-hero-decor::after,
    .oa-dot-pulse {
        animation: none;
    }
}

/* ================================================================ */
/* Homepage Trending Listings (rank list)                            */
/* ================================================================ */

.oa-listings .oa-l-row { padding: 14px; }
@media (min-width: 640px) {
    .oa-listings .oa-l-row { padding: 18px 20px; }
}

.oa-listings[data-view="list"] .oa-l-row + .oa-l-row {
    border-top: 1px solid var(--color-surface-100);
}

.oa-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}
.oa-rank svg { width: 16px; height: 16px; }
.oa-rank-1 { background: #111111; color: #ffffff; border: 1px solid #262523; }
.oa-rank-2 { background: #262523; color: #ffffff; border: 1px solid #3e3d38; }
.oa-rank-3 { background: #3e3d38; color: #ffffff; border: 1px solid #55534e; }
.oa-rank-n {
    background: none;
    box-shadow: none;
    border: 0;
    color: var(--color-ink-500);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 12px;
    width: 28px;
}

.oa-filter-btn,
.oa-view-btn,
.oa-sort,
.oa-upvote {
    user-select: none;
}

.oa-filter-btn,
.oa-view-btn {
    cursor: pointer;
    border: 0;
    background: none;
    transition: all 0.15s ease;
    color: var(--color-ink-500);
    font-weight: 700;
}
.oa-filter-btn { padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.oa-view-btn { padding: 8px; border-radius: 6px; display: flex; }
.oa-filter-btn:hover,
.oa-view-btn:hover { color: var(--color-ink-900); }
.oa-filter-btn.is-active,
.oa-view-btn.is-active {
    background: var(--color-surface-0);
    color: var(--color-ink-900);
    box-shadow: var(--shadow-xs);
}

.oa-upvote.is-voted {
    background: var(--color-ink-900);
    color: #ffffff;
    border-color: var(--color-ink-900);
}

/* Standalone upvote button (single listing pages) */
.oa-upvote-inline {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 3.5rem;
    padding: 0.75rem 0;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08);
}
.oa-upvote-inline:hover {
    border-color: #0f172a;
    background: #f8fafc;
    color: #0f172a;
}
.oa-upvote-inline .oa-vote-icon {
    width: 1rem;
    height: 1rem;
}
.oa-upvote-inline .oa-upvote-count {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    line-height: 1;
}
.oa-upvote-inline.is-voted {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}
.oa-upvote-inline.is-voted:hover {
    background: #262523;
    border-color: #262523;
    color: #ffffff;
}
.oa-upvote-inline.oa-upvote-block {
    width: 100%;
    flex-direction: column;
}

/* Row variant: icon + count side by side (single software hero) */
.oa-upvote-inline.oa-upvote-row {
    flex-direction: row;
    width: auto;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
}

/* Single Alternative hero — software screenshot background (right side) */
.oa-hero-shot {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    overflow: hidden;
    pointer-events: none;
}
.oa-hero-shot > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    opacity: 0.4;
}
.oa-hero-shot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #111111 0%, rgba(17, 17, 17, 0.88) 45%, rgba(17, 17, 17, 0) 100%);
}
@media (min-width: 768px) {
    .oa-hero-shot {
        display: block;
        width: 50%;
    }
}
@media (min-width: 1024px) {
    .oa-hero-shot {
        width: 40%;
    }
}

.oa-listings[data-view="grid"] {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    padding: 0.75rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
@media (min-width: 640px) {
    .oa-listings[data-view="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .oa-listings[data-view="grid"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.oa-listings[data-view="grid"] .oa-l-row {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #fff;
    border: 1px solid #e7e5df;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s;
}
.oa-listings[data-view="grid"] .oa-l-row:hover {
    background-color: #fff;
    border-color: #c6c1b2;
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.1);
}

/*
 * Card layout (reference: p-4/5/6, header, desc, footer stats):
 *   row1: [rank] [icon] [title + badges]
 *   row2: [description ...................]
 *   row3: [meta stats ....................]   <- vote moved INTO meta by JS
 * Unwraps the list-only nesting via display:contents (DOM untouched).
 */
.oa-listings[data-view="grid"] .oa-l-row > div:first-child {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas:
        "rank  icon  title"
        "desc  desc  desc"
        "meta  meta  meta";
    grid-template-rows: auto auto 1fr;
    align-items: center;
    column-gap: 16px;
    row-gap: 24px;
    padding: 16px;
}
@media (min-width: 640px) {
    .oa-listings[data-view="grid"] .oa-l-row > div:first-child { padding: 20px; }
}
@media (min-width: 1024px) {
    .oa-listings[data-view="grid"] .oa-l-row > div:first-child { padding: 24px; }
}
.oa-listings[data-view="grid"] .oa-l-row > div:first-child > div:first-child,
.oa-listings[data-view="grid"] .oa-l-row > div:first-child > div:first-child > div.flex-1 {
    display: contents;
}

/* Component positions */
.oa-listings[data-view="grid"] .oa-l-row .oa-rank { grid-area: rank; }
.oa-listings[data-view="grid"] .oa-l-row > div:first-child > div:first-child > div.shrink-0 { grid-area: icon; }

/* Icon: size-12 rounded-xl bg-slate-50 border-slate-100 shadow-sm (reference) */
.oa-listings[data-view="grid"] .oa-l-row > div:first-child > div:first-child > div.shrink-0 > div {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #fafaf7;
    border: 1px solid #f1efe9;
    box-shadow: 0 1px 2px 0 rgba(17, 17, 17, 0.05);
    padding: 0;
}
.oa-listings[data-view="grid"] .oa-l-row > div:first-child > div:first-child > div.shrink-0 img {
    object-fit: cover;
    border-radius: 0;
}

/* Title block: h3 over badges (reference mb-1 + flex-wrap gap-2) */
.oa-listings[data-view="grid"] .oa-l-row > div:first-child > div:first-child > div.flex-1 > div:first-child {
    grid-area: title;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Description: text-sm leading-relaxed text-slate-600, 2-line clamp */
.oa-listings[data-view="grid"] .oa-l-desc {
    grid-area: desc;
    margin-top: 0;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.625;
    color: #55534e;
}

/* Footer stats: border-t pt-4, 12px medium slate-500, values slate-700 */
.oa-listings[data-view="grid"] .oa-l-meta {
    grid-area: meta;
    align-self: end;
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 16px;
    padding-top: 16px;
    border-top: 1px solid #fafaf7;
    font-size: 12px;
    font-weight: 500;
    color: #6b6b66;
}
.oa-listings[data-view="grid"] .oa-l-meta > *:not(.hidden) {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 0;
}
.oa-listings[data-view="grid"] .oa-l-meta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.oa-listings[data-view="grid"] .oa-l-meta svg:has(polygon) {
    fill: #fbbf24;
    stroke: none;
    color: #fbbf24;
}
.oa-listings[data-view="grid"] .oa-l-meta > span:first-child svg {
    color: #a8a49b;
}
.oa-listings[data-view="grid"] .oa-l-meta .font-semibold {
    font-weight: 500;
    color: #3e3d38;
}

/* Vote hover — transparent bg stays (no flash), subtle border/text deepen */
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote,
.oa-listings[data-view="list"] .oa-upvote,
.oa-listings:not([data-view="grid"]) .oa-upvote {
    background: none;
    box-shadow: none;
    border-color: #0f172a;
    color: #0f172a;
}
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote svg,
.oa-listings[data-view="list"] .oa-upvote svg,
.oa-listings:not([data-view="grid"]) .oa-upvote svg {
    color: #0f172a;
}
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote:hover,
.oa-listings[data-view="list"] .oa-upvote:hover,
.oa-listings:not([data-view="grid"]) .oa-upvote:hover {
    background: none;
    border-color: #0f172a;
    color: #0f172a;
}
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote:hover svg,
.oa-listings[data-view="list"] .oa-upvote:hover svg,
.oa-listings:not([data-view="grid"]) .oa-upvote:hover svg {
    color: #0f172a;
}
/* Voted: dark background, white icon/count */
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote.is-voted,
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote.is-voted svg,
.oa-listings[data-view="list"] .oa-upvote.is-voted,
.oa-listings[data-view="list"] .oa-upvote.is-voted svg,
.oa-listings:not([data-view="grid"]) .oa-upvote.is-voted,
.oa-listings:not([data-view="grid"]) .oa-upvote.is-voted svg {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}
/* Voted hover: slightly darker for feedback */
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote.is-voted:hover,
.oa-listings[data-view="grid"] .oa-l-meta .oa-upvote.is-voted:hover svg,
.oa-listings[data-view="list"] .oa-upvote.is-voted:hover,
.oa-listings[data-view="list"] .oa-upvote.is-voted:hover svg,
.oa-listings:not([data-view="grid"]) .oa-upvote.is-voted:hover,
.oa-listings:not([data-view="grid"]) .oa-upvote.is-voted:hover svg {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}
/* List (non-grid) view hover */
.oa-listings:not([data-view="grid"]) .oa-upvote:hover {
    border-color: #0f172a;
    background: none;
}
.oa-listings:not([data-view="grid"]) .oa-upvote.is-voted {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

/* Title: font-bold text-lg line-clamp-2 (reference) */
.oa-listings[data-view="grid"] .oa-l-row h3 {
    flex: none;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
}

/* Toolbar sort select — native arrow hata ke theme chevron */
.oa-sort {
    -webkit-appearance: none;
    appearance: none;
    min-height: 32px;
    padding-right: 1.75rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b66' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 12px;
}

/* Header morphing search — icon expands to full-width input */
.site-header .site-branding,
.site-header #mega-menu,
.site-header .header-actions {
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.site-header.search-open .site-branding,
.site-header.search-open #mega-menu,
.site-header.search-open .header-actions {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.site-header.search-open .header-actions {
    display: none;
}
/* In-flow trigger button (sits with the other action buttons) */
.header-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    color: var(--color-ink-600);
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.header-search-trigger:hover {
    color: var(--color-ink-900);
    background: var(--color-surface-100);
}

/* Expanding overlay panel — fades in over the header */
.header-search {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    height: 2.75rem;
    padding: 0 0.5rem;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-50%);
    border: 1px solid transparent;
    border-radius: 9999px;
    background: var(--color-surface-0);
    transition: opacity 0.28s ease, visibility 0.28s ease,
        border-color 0.3s ease, box-shadow 0.3s ease;
}
.header-search.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    border-color: var(--color-surface-200);
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08);
}
.header-search .search-form {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
}
.header-search .search-input {
    width: 100%;
    min-width: 0;
    height: 2.5rem;
    padding: 0 0.35rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-ink-900);
    font: inherit;
    font-size: 0.9375rem;
}
.header-search .search-input::placeholder {
    color: var(--color-ink-400);
}
.header-search .search-submit,
.header-search .search-close {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.header-search .search-submit {
    color: #fff;
    background: var(--color-ink-900);
}
.header-search .search-submit:hover {
    background: #262523;
}
.header-search .search-close {
    margin-left: 0.25rem;
    color: var(--color-ink-500);
    background: transparent;
}
.header-search .search-close:hover {
    color: var(--color-ink-900);
    background: var(--color-surface-100);
}

/* ================================================================
 * Legacy tools
 * ----------------------------------------------------------------
 * Styles for the code carried over from the previous site:
 * post CTA block, pricing badge, internal links, MD5 tool.
 * ================================================================ */

/* Post CTA block ------------------------------------------------ */
.oa-legacy-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e5e5e3;
    border-radius: 0.875rem;
    background: #fafaf9;
}
.oa-legacy-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 9999px;
    background: var(--color-ink-900);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.oa-legacy-cta-btn:hover {
    background: #262523;
    color: #fff;
}
.oa-legacy-cta-pricing {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e5e5e3;
    color: #57534e;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Tag list under the CTA ---------------------------------------- */
.oa-legacy-post-tags {
    margin-bottom: 2rem;
}
.oa-legacy-post-tags p {
    margin: 0;
    color: #a8a29e;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.oa-legacy-post-tags a {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: #f5f5f4;
    color: #57534e;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
}
.oa-legacy-post-tags a:hover {
    background: #e7e5e4;
}

/* Pricing badge over post thumbnails ---------------------------- */
.oa-legacy-pricing-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1c1917;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}

/* Auto internal links ------------------------------------------- */
/* Scoped to the article body so it outranks the compiled `prose` link styles. */
.single-post-content .oa-internal-link,
.oa-internal-link {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* MD5 tool ------------------------------------------------------ */
.oa-md5-tool {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid #e5e5e3;
    border-radius: 1rem;
    background: #fff;
}
.oa-md5-modes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.oa-md5-mode {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    border: 1px solid #e5e5e3;
    border-radius: 9999px;
    background: #fff;
    color: #57534e;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.oa-md5-mode:hover {
    border-color: #a8a29e;
}
.oa-md5-mode.is-active {
    background: var(--color-ink-900);
    border-color: var(--color-ink-900);
    color: #fff;
}
.oa-md5-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .oa-md5-panels {
        grid-template-columns: 1fr 1fr;
    }
}
.oa-md5-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.oa-md5-label {
    color: #a8a29e;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.oa-md5-textarea {
    width: 100%;
    min-height: 150px;
    padding: 0.85rem;
    border: 1px solid #e5e5e3;
    border-radius: 0.75rem;
    background: #fafaf9;
    color: #1c1917;
    font-size: 0.9rem;
    line-height: 1.55;
    resize: vertical;
}
.oa-md5-textarea:focus {
    outline: none;
    border-color: var(--color-ink-900);
    background: #fff;
}
.oa-md5-output {
    min-height: 150px;
    padding: 0.85rem;
    border: 1px solid #e5e5e3;
    border-radius: 0.75rem;
    background: #fafaf9;
    color: #1c1917;
    font-size: 0.9rem;
    line-height: 1.55;
    word-break: break-all;
}
.oa-md5-output.is-placeholder {
    color: #a8a29e;
    font-style: italic;
}
.oa-md5-run {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
    padding: 0.75rem 1.6rem;
    border: 0;
    border-radius: 9999px;
    background: var(--color-ink-900);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}
.oa-md5-run:hover:not(:disabled) {
    background: #262523;
}
.oa-md5-run:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ==========================================================================
   Contact Form 7 — fields follow the theme's own input / textarea design
   ========================================================================== */

.wpcf7-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Text-like fields: padding 12/16, 1px warm-grey border, 12px radius */
.wpcf7-form input.wpcf7-text,
.wpcf7-form input.wpcf7-email,
.wpcf7-form input.wpcf7-url,
.wpcf7-form input.wpcf7-tel,
.wpcf7-form input.wpcf7-number,
.wpcf7-form input.wpcf7-date,
.wpcf7-form input.wpcf7-quiz,
.wpcf7-form select.wpcf7-select,
.wpcf7-form textarea.wpcf7-textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #262523;
    background-color: #ffffff;
    border: 1px solid #d6d3cb;
    border-radius: 0.75rem;
    box-shadow: none;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpcf7-form input.wpcf7-text:hover,
.wpcf7-form input.wpcf7-email:hover,
.wpcf7-form input.wpcf7-url:hover,
.wpcf7-form input.wpcf7-tel:hover,
.wpcf7-form input.wpcf7-number:hover,
.wpcf7-form input.wpcf7-date:hover,
.wpcf7-form input.wpcf7-quiz:hover,
.wpcf7-form select.wpcf7-select:hover,
.wpcf7-form textarea.wpcf7-textarea:hover {
    border-color: #c4c0b7;
}

.wpcf7-form input.wpcf7-text:focus,
.wpcf7-form input.wpcf7-email:focus,
.wpcf7-form input.wpcf7-url:focus,
.wpcf7-form input.wpcf7-tel:focus,
.wpcf7-form input.wpcf7-number:focus,
.wpcf7-form input.wpcf7-date:focus,
.wpcf7-form input.wpcf7-quiz:focus,
.wpcf7-form select.wpcf7-select:focus,
.wpcf7-form textarea.wpcf7-textarea:focus {
    border-color: #111111;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.1);
}

.wpcf7-form .wpcf7-form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.wpcf7-form textarea.wpcf7-textarea {
    min-height: 150px;
    resize: vertical;
}

.wpcf7-form select.wpcf7-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.15rem;
    padding-right: 2.75rem;
}

/* CF7 prints each label in its own paragraph, right above the field. */
.wpcf7-form p {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    color: #111111;
}

.wpcf7-form p:has(.wpcf7-form-control-wrap) {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: inherit;
}

.wpcf7-form p:has(.wpcf7-form-control-wrap):last-of-type {
    margin-bottom: 1.5rem;
}

.wpcf7-form p:has(.wpcf7-submit) {
    margin: 0;
}

.wpcf7-form .wpcf7-not-valid {
    border-color: #dc2626;
}

.wpcf7-form .wpcf7-not-valid-tip {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    color: #dc2626;
}

.wpcf7-form .wpcf7-response-output {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-width: 1px;
    border-style: solid;
    border-radius: 0.75rem;
}

/* Submit button matches the theme's primary form button */
.wpcf7-form input.wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    background-color: #111111;
    border: 0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.wpcf7-form input.wpcf7-submit:hover {
    background-color: #262523;
}

.wpcf7-form input.wpcf7-submit:active {
    transform: translateY(1px);
}

/* ==========================================================================
   Color Palette plugin (Main Color Palette) — theme-styled swatch cards
   ========================================================================== */

.cp-palette {
    width: 100%;
    margin: 2rem 0;
}

/* Grid: 1 / 2 / 3 / 4 columns with the theme's spacing */
.cp-palette .cp-colors {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin: 0;
}

@media (min-width: 560px) {
    .cp-palette .cp-colors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .cp-palette .cp-colors {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .cp-palette .cp-colors {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Card */
.cp-palette .cp-color {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e7e5df;
    border-radius: var(--radius-lg);
    color: #111111;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.cp-palette .cp-color:hover {
    border-color: #d6d3cb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    transform: translateY(-2px);
}

/* Swatch */
.cp-palette .cp-color .swatch {
    height: 112px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.06);
    border-radius: 0;
}

/* Text block */
.cp-palette .cp-color p {
    margin: 0;
    padding: 0 0.875rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #57534e;
}

.cp-palette .cp-color p:first-of-type {
    padding-top: 0.75rem;
}

.cp-palette .cp-color p:last-of-type {
    padding-bottom: 0.875rem;
}

/* Colour name */
.cp-palette .cp-color .cp-color-name {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #111111;
    word-break: break-word;
}

/* Hex code */
.cp-palette .cp-color .cp-color-hex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.125rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: #111111;
}

/* RGB / CMYK */
.cp-palette .cp-color .cp-color-rgb,
.cp-palette .cp-color .cp-color-cmyk {
    font-size: 0.6875rem;
    line-height: 1.7;
    color: #78716c;
}

/* Theme-injected "internal link" has no place inside a swatch card */
.cp-palette .cp-color .oa-internal-link {
    display: none;
}

/* Copy-hex icon (rendered only when the palette enables "show copy") */
.cp-palette .cp-copy-hex,
.cp-palette .cp-copy-complete {
    display: none;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    fill: currentColor;
    transition: color var(--transition-fast);
}

.cp-palette .cp-colors.show-copy .cp-copy-hex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a8a29e;
}

.cp-palette .cp-copy-hex:hover {
    color: #111111;
}

.cp-palette .cp-copy-complete {
    color: #16a34a;
}

.cp-palette .cp-copy-hex svg,
.cp-palette .cp-copy-complete svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Circle variant */
.cp-palette.is-style-circle .cp-colors {
    gap: 2rem;
}

.cp-palette.is-style-circle .cp-color {
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
}

.cp-palette.is-style-circle .cp-color .swatch {
    height: auto;
    padding: 50%;
    border: 0;
    border-radius: 50%;
}

.cp-palette.is-style-circle .cp-color p {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.cp-palette.is-style-circle .cp-color .cp-color-hex {
    justify-content: center;
}

/* Stylized-card variant keeps the same card shell */
.cp-palette.is-style-stylized-card .cp-color {
    border: 1px solid #e7e5df;
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.cp-palette.is-style-stylized-card .cp-color .swatch {
    height: 140px;
    padding: 0;
    border-radius: 0;
}