/*
Theme Name: ToolToolia - Neobrutalist
Description: Flat-color, thick-border, hard-shadow UI
Version: 4.0
*/

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --blue: #2447f9;
    --coral: #ff6558;
    --yellow: #ffd84d;
    --cream: #f7f1e6;
    --ink: #141414;

    --blue-tint: #dfe4ff;
    --coral-tint: #ffe1dd;
    --yellow-tint: #fff3bd;

    --primary: var(--blue);
    --secondary: var(--coral);
    --accent: var(--yellow);
    --bg: var(--cream);
    --white: #FFFFFF;

    /* Brand color-cycle stops (flat, no gradients) */
    --brand-1: var(--blue);
    --brand-2: var(--coral);
    --brand-3: var(--yellow);
    --brand-4: var(--blue);
    --brand-5: var(--coral);
    --brand-6: var(--yellow);

    /* Kept as names for compatibility with older markup; all flat now */
    --gradient-brand: var(--blue);
    --gradient-warm: var(--coral);
    --gradient-text: var(--blue);
    --gradient-teal: var(--blue);
    --gradient-rose: var(--coral);

    /* Fonts */
    --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Neutrals */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Shadows — hard offset, no blur (signature neobrutalist look) */
    --shadow-sm: 3px 3px 0 var(--ink);
    --shadow-md: 5px 5px 0 var(--ink);
    --shadow-lg: 7px 7px 0 var(--ink);
    --shadow-xl: 9px 9px 0 var(--ink);
    --shadow-2xl: 12px 12px 0 var(--ink);
    --shadow-glow: 9px 13px 0 var(--ink);

    /* Border Radius — chunkier */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 29px;
    --radius-full: 9999px;

    /* Borders */
    --border-width: 2px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 180ms ease;
    --transition-slow: 300ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER - Startup Gradient
   ============================================ */
.site-header {
    background: var(--bg);
    border-bottom: var(--border-width) solid var(--ink);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: grid;
    grid-template-columns: auto 1fr minmax(220px, 340px);
    align-items: center;
    gap: 24px;
}

.header-search {
    height: 48px;
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-full);
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    box-shadow: 3px 3px 0 rgba(20, 20, 20, 0.08);
}

.header-search i {
    font-size: 17px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.header-search input {
    min-width: 0;
    flex: 1;
    background: none;
    border: 0;
    outline: 0;
    font-size: 14px;
    font-weight: 550;
    font-family: var(--font-body);
    color: var(--ink);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--ink);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--ink);
    transition: var(--transition-base);
}

.menu-toggle:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--ink);
    letter-spacing: -1px;
    transition: var(--transition-fast);
}

.logo .logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo .logo-mark svg,
.logo .logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-base);
}

.logo:hover .logo-mark svg,
.logo:hover .logo-mark img {
    transform: rotate(-8deg) scale(1.05);
}

.logo span {
    color: var(--blue);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    list-style: none;
}

.nav-menu a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 660;
    font-size: 15px;
    padding: 9px 14px;
    transition: var(--transition-fast);
    position: relative;
    display: inline-block;
}

.nav-menu a:not(.nav-icon-btn)::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 3px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.nav-menu a:not(.nav-icon-btn):hover::after {
    transform: scaleX(1);
}

.nav-menu .nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: 8px;
    border-radius: 50%;
    border: var(--border-width) solid var(--ink);
    background: var(--white);
    color: var(--ink);
    font-size: 16px;
    box-shadow: 3px 3px 0 var(--ink);
    transition: var(--transition-base);
}

.nav-menu .nav-icon-btn:hover {
    background: var(--blue);
    color: #fff;
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding: 32px 0 48px;
    min-height: 60vh;
}

/* ============================================
   BUTTONS - Airbnb Style
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    text-decoration: none;
    letter-spacing: 0.1px;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}

.btn-secondary {
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    border: var(--border-width) solid var(--ink);
}

.btn-secondary:hover {
    background: var(--yellow-tint);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: var(--border-width) solid var(--ink);
}

.btn-outline:hover {
    background: var(--blue);
    color: var(--white);
    transform: translate(-2px, -2px);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--gray-700);
}

.btn-ghost:hover {
    background: var(--gray-100);
}

/* ============================================
   TOOL ELEMENT LIBRARY
   Shared building blocks for app/Tools/*.php files.
   New tools should reuse these classes instead of
   writing their own inline <style> for basic inputs,
   textareas, buttons, and result boxes.
   ============================================ */
.tool-field {
    margin-bottom: 20px;
}

.tool-field:last-child {
    margin-bottom: 0;
}

.tool-label {
    font-size: 12px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
}

.tool-hint {
    font-size: 12px;
    color: var(--blue);
    font-weight: 600;
    margin-top: 6px;
    display: block;
}

.tool-input,
.tool-textarea,
.tool-select {
    width: 100%;
    padding: 12px 14px;
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
    background: var(--bg);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.tool-input:focus,
.tool-textarea:focus,
.tool-select:focus {
    outline: none;
    box-shadow: var(--shadow-sm);
    transform: translate(-1px, -1px);
}

.tool-textarea {
    font-family: monospace;
    resize: vertical;
    min-height: 110px;
}

.tool-select {
    cursor: pointer;
    background: var(--white);
}

.tool-file-label {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
    font-weight: 700;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.tool-file-label:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-md);
    background: var(--yellow-tint);
}

.tool-file-input {
    display: none;
}

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tool-actions .btn {
    flex: 1;
}

.tool-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tool-subpanel {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg);
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
}

.tool-result {
    display: none;
    margin-top: 25px;
    padding: 20px;
    background: var(--blue-tint);
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.tool-result.is-visible {
    display: block;
}

.tool-result-title {
    margin: 0 0 12px 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tool-output {
    width: 100%;
    padding: 14px;
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 13px;
    background: var(--white);
    color: var(--ink);
}

.tool-btn-sm {
    padding: 8px 16px !important;
    font-size: 12px !important;
}

.tool-badge-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.tool-badge-item {
    background: var(--white);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--ink);
}

.tool-note {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--ink);
    display: none;
}

.tool-note.is-visible {
    display: block;
}

.tool-note-success {
    background: var(--blue-tint);
    color: var(--ink);
}

.tool-note-error {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

@media (max-width: 640px) {
    .tool-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FOOTER - Startup Gradient
   ============================================ */
.site-footer {
    background: var(--bg);
    border-top: var(--border-width) solid var(--ink);
    margin-top: 64px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding: 56px 0 40px;
    border-bottom: var(--border-width) solid var(--ink);
}

.footer-brand .logo {
    color: var(--ink);
}

.footer-brand p {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.7;
    margin-top: 14px;
    max-width: 320px;
}

.footer-col h4 {
    font-family: var(--font-display);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li + li {
    margin-top: 10px;
}

.footer-col a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 550;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--blue);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 22px 0;
}

.footer-bottom span {
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--blue);
}

/* ============================================
   CARDS - Airbnb Style
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: var(--border-width) solid var(--ink);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translate(-3px, -3px);
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--ink);
    margin: 48px 0 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    letter-spacing: -0.04em;
}

.section-title .count {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-500);
    margin-left: auto;
}

/* ============================================
   TOOL GRID - Airbnb Style
   ============================================ */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 12px;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: var(--border-width) solid var(--ink);
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    position: relative;
}

.tool-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-lg);
}

.tool-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--blue-tint);
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-md);
    font-size: 28px;
    color: var(--ink);
    margin-bottom: 16px;
    transition: var(--transition-base);
}

.tool-card-icon svg {
    width: 28px;
    height: 28px;
}

.tool-card:hover .tool-card-icon {
    transform: rotate(-4deg);
}

.tool-card h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.tool-card p {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
    flex: 1;
}

.tool-card .categories {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.tool-card .categories .cat {
    background: var(--bg);
    color: var(--ink);
    padding: 3px 12px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tool-card .categories .cat i {
    font-size: 11px;
    color: var(--blue);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.tool-number {
    font-size: 12px;
    font-weight: 800;
    color: var(--gray-400);
}

.category-pill {
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-full);
    padding: 3px 11px;
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.icon-wrap {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 10px 0 8px;
}

/* icon-wrap reuses the cat-cN rotation for its tint color, but must NOT
   inherit their solid `background`/`color` (those are meant for full-fill
   tiles/badges elsewhere) — only the ::before circle should be colored. */
.icon-wrap.cat-c0, .icon-wrap.cat-c1, .icon-wrap.cat-c2,
.icon-wrap.cat-c3, .icon-wrap.cat-c4, .icon-wrap.cat-c5 {
    background: none;
    color: var(--ink);
}

.icon-wrap::before {
    content: '';
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    z-index: 0;
}

.icon-wrap.cat-c0::before, .icon-wrap.cat-c3::before { background: var(--blue-tint); }
.icon-wrap.cat-c1::before, .icon-wrap.cat-c4::before { background: var(--coral-tint); }
.icon-wrap.cat-c2::before, .icon-wrap.cat-c5::before { background: var(--yellow-tint); }

.icon-wrap svg {
    position: relative;
    z-index: 1;
    width: 60px;
    height: 60px;
}

.tool-card:hover .icon-wrap svg {
    transform: rotate(-4deg) scale(1.05);
}

.tool-card .card-link {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 750;
    font-size: 14px;
    color: var(--ink);
    text-decoration: none;
}

.tool-card .card-link span {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.tool-card:hover .card-link span {
    opacity: 1;
    transform: none;
}

.tool-card .card-link b {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: var(--coral);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-style: normal;
}

/* ============================================
   BLOG GRID - Airbnb Style
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 12px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: var(--border-width) solid var(--ink);
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: var(--gray-100);
    border-bottom: var(--border-width) solid var(--ink);
}

.blog-card-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--yellow-tint);
    color: var(--ink);
    opacity: 0.6;
    font-size: 48px;
    border-bottom: var(--border-width) solid var(--ink);
}

.blog-card-body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-body .blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.blog-card-body .blog-meta i {
    font-size: 13px;
    color: var(--accent);
}

.blog-card-body .blog-meta .divider {
    color: var(--gray-200);
}

.blog-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--gray-900);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-body p {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 14px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-body .read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.blog-card-body .read-more i {
    transition: var(--transition-fast);
}

.blog-card:hover .read-more i {
    transform: translateX(4px);
}

/* ============================================
   CATEGORY NAV - Airbnb Style
   ============================================ */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 12px;
}

.category-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    color: var(--ink);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: var(--border-width) solid var(--ink);
    transition: var(--transition-fast);
}

.category-nav a i {
    color: var(--coral);
    font-size: 14px;
}

.category-nav a:hover {
    background: var(--blue);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sm);
}

.category-nav a:hover i {
    color: var(--white);
}

.category-nav a .cnt {
    color: var(--gray-400);
    font-size: 11px;
}

.category-nav a:hover .cnt {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   NO POSTS MESSAGE
   ============================================ */
.no-posts-message {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: var(--border-width) solid var(--ink);
}

.no-posts-message .icon {
    font-size: 56px;
    color: var(--accent);
    margin-bottom: 15px;
}

.no-posts-message h2 {
    color: var(--gray-600);
    margin-bottom: 10px;
}

.no-posts-message p {
    color: var(--gray-400);
    margin-bottom: 20px;
}

/* ============================================
   ARCHIVE HERO
   ============================================ */
.archive-hero {
    background: var(--white);
    border: var(--border-width) solid var(--ink);
    border-radius: var(--radius-xl);
    padding: 56px 52px;
    margin-bottom: 36px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.archive-hero-content {
    position: relative;
    z-index: 1;
    max-width: 70%;
}

.archive-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--yellow);
    border: var(--border-width) solid var(--ink);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    margin-bottom: 18px;
}

.archive-hero-badge i {
    font-size: 14px;
}

.archive-hero h1 {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 10px 0;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.archive-hero h1 span {
    color: var(--blue);
}

.archive-hero p {
    font-size: 17px;
    color: var(--gray-600);
    max-width: 550px;
    line-height: 1.7;
    margin: 0 0 20px 0;
}

.archive-hero-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.archive-hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.archive-hero-stats .stat .number {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
}

.archive-hero-stats .stat .label {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 600;
}

.archive-hero-stats .stat i {
    font-size: 22px;
    color: var(--coral);
}

/* ============================================
   CATEGORY FILTER
   ============================================ */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.category-filter a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-fast);
    background: var(--white);
    color: var(--ink);
    border: var(--border-width) solid var(--ink);
}

.category-filter a:hover {
    background: var(--yellow-tint);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sm);
}

.category-filter a.active {
    background: var(--blue);
    color: white;
}

.category-filter a i {
    font-size: 14px;
}

.category-filter a .count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 2px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-fast);
    background: var(--white);
    color: var(--ink);
    border: var(--border-width) solid var(--ink);
}

.pagination .page-numbers:hover {
    background: var(--yellow-tint);
    transform: translate(-1px, -1px);
}

.pagination .page-numbers.current {
    background: var(--blue);
    color: white;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    background: transparent;
    border-color: transparent;
}

.pagination .page-numbers.prev:hover,
.pagination .page-numbers.next:hover {
    background: var(--yellow-tint);
    border-color: var(--ink);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .archive-hero-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .main-content {
        padding: 14px 0 32px;
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 22px;
    }

    /* ---- Minimal, compact tool cards for small screens ---- */
    .tool-card {
        padding: 14px 12px;
        border-radius: 14px;
        box-shadow: 2px 2px 0 var(--ink);
    }

    .tool-card:hover {
        transform: none;
        box-shadow: 2px 2px 0 var(--ink);
    }

    .card-top { margin-bottom: 0; }

    .tool-number { font-size: 10px; }

    .category-pill { display: none; }

    .icon-wrap {
        height: 64px;
        margin: 4px 0 2px;
    }

    .icon-wrap::before {
        width: 52px;
        height: 52px;
    }

    .icon-wrap svg {
        width: 32px;
        height: 32px;
    }

    .tool-card h3 {
        font-size: 14px;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tool-card p { display: none; }

    .tool-card .card-link {
        padding-top: 6px;
        justify-content: flex-end;
    }

    .tool-card .card-link span { display: none; }

    .tool-card .card-link b {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .site-header {
        padding: 14px 0;
    }

    .site-header .container {
        grid-template-columns: auto auto;
        justify-content: space-between;
        gap: 12px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu,
    .header-search {
        display: none;
    }

    .site-header.nav-open .nav-menu,
    .site-header.nav-open .header-search {
        display: flex;
        grid-column: 1 / -1;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 2px;
        padding-top: 14px;
        margin-top: 4px;
        border-top: 1.5px solid var(--gray-200);
    }

    .nav-menu a {
        padding: 12px 6px;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu a:hover {
        background: var(--yellow-tint);
        border-radius: var(--radius-sm);
    }

    .header-search {
        grid-column: 1 / -1;
        margin-top: 4px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0 32px;
    }

    .archive-hero {
        padding: 22px 20px;
        border-radius: var(--radius-lg);
    }

    .archive-hero-badge {
        padding: 5px 14px;
        font-size: 11px;
        margin-bottom: 10px;
    }

    .archive-hero h1 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    /* The long description eats too much vertical space on small screens */
    .archive-hero p {
        display: none;
    }

    .archive-hero-stats {
        gap: 14px 20px;
        flex-wrap: wrap;
    }

    .archive-hero-stats .stat {
        gap: 7px;
    }

    .archive-hero-stats .stat > div {
        display: flex;
        align-items: baseline;
        gap: 4px;
    }

    .archive-hero-stats .stat i {
        font-size: 16px;
    }

    .archive-hero-stats .stat .number {
        font-size: 15px;
    }

    .archive-hero-stats .stat .label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .archive-hero {
        padding: 18px 16px;
    }

    .category-filter a {
        font-size: 12px;
        padding: 6px 14px;
    }
}

/* ============================================
   COLOR-CYCLE UTILITIES (icon badges, tiles)
   ============================================ */
.cat-c0 { background: var(--blue); color: #fff; }
.cat-c1 { background: var(--coral); color: #fff; }
.cat-c2 { background: var(--yellow); color: var(--ink); }
.cat-c3 { background: var(--blue); color: #fff; }
.cat-c4 { background: var(--coral); color: #fff; }
.cat-c5 { background: var(--yellow); color: var(--ink); }

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--gray-500); }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.w-full { width: 100%; }
.max-w-full { max-width: 100%; }