/* ========================================
   AIToolsAdda - Global Styles
   ======================================== */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
    --primary: #7C3AED;
    --primary-dark: #6D28D9;
    --indigo: #4F46E5;
    --primary-soft: #F5F3FF;
    --primary-line: #DDD6FE;
    --grad: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);

    --ink: #0B1220;
    --navy: #0F172A;
    --heading: #0F172A;
    --text: #475569;
    --muted: #64748B;

    --white: #FFFFFF;
    --background: #F8FAFC;
    --border: #E5E9F0;

    --success: #15803D;
    --success-bg: #F0FDF4;
    --danger: #B91C1C;
    --danger-bg: #FEF2F2;

    --container-width: 1200px;
    --radius: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .05);
    --shadow-hover: 0 4px 8px rgba(15, 23, 42, .05), 0 18px 40px rgba(76, 29, 149, .13);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, .08), 0 30px 60px rgba(76, 29, 149, .08);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-feature-settings: "cv11", "ss01";
    background: var(--white);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { list-style: none; }
h1, h2, h3 { color: var(--heading); letter-spacing: -.02em; }

:focus-visible { outline: 3px solid #A78BFA; outline-offset: 2px; border-radius: 6px; }
::selection { background: #DDD6FE; color: var(--ink); }

.sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 300;
    background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.container { width: min(100% - 48px, var(--container-width)); margin: 0 auto; }
.container-narrow { width: min(100% - 48px, 760px); }
.container-form { width: min(100% - 48px, 720px); }
.center { text-align: center; }

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border: 0; border-radius: 11px;
    background: var(--grad); color: var(--white);
    text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: -.005em;
    box-shadow: 0 1px 2px rgba(76, 29, 149, .3), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s ease;
}
.btn:hover { color: var(--white); filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(91, 33, 182, .32), inset 0 1px 0 rgba(255,255,255,.18); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn-block { display: flex; width: 100%; }
.btn-outline {
    background: var(--white); color: var(--heading); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-outline:hover { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); filter: none; box-shadow: var(--shadow-sm); }
.btn-light { background: var(--white); color: var(--primary-dark); box-shadow: 0 6px 20px rgba(15,23,42,.18); }
.btn-light:hover { background: #fff; color: var(--primary-dark); box-shadow: 0 10px 26px rgba(15,23,42,.24); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 11px;
    background: var(--white); color: var(--heading); box-shadow: var(--shadow-sm);
    transition: background .2s ease, border-color .2s ease;
}
.icon-btn:hover { background: var(--primary-soft); border-color: var(--primary-line); }
svg { flex-shrink: 0; }
.icon-btn svg, .bookmark-btn svg, .upvote-btn svg, .hero-search-icon, .feature-icon svg {
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ========================================
   Header
   ======================================== */

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.86);
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 24px rgba(15,23,42,.05); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.site-logo img { display: block; height: 52px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    color: #334155; text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 8px 14px; border-radius: 10px; white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.main-nav a.is-active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-count {
    min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.nav-count[hidden] { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-btn {
    display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px; border-radius: 11px;
    background: var(--grad); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
    box-shadow: 0 1px 2px rgba(76,29,149,.3), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.header-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(91,33,182,.3); }
.menu-toggle { display: none; }

/* Search overlay */
.search-overlay {
    position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .5);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center; padding: 90px 16px 16px;
}
.search-overlay[hidden] { display: none; }
.search-panel { width: min(100%, 680px); background: var(--white); border-radius: 18px; box-shadow: 0 30px 70px rgba(15,23,42,.35); overflow: hidden; }
.search-panel-form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.search-panel-form input { flex: 1; min-width: 0; border: 0; font-size: 17px; padding: 10px 6px; background: transparent; }
.search-panel-form input:focus { outline: none; }
.search-results { max-height: min(60vh, 440px); overflow-y: auto; }
.search-results:empty { display: none; }
.search-group { padding: 12px 16px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.search-item { display: block; padding: 10px 16px; text-decoration: none; color: var(--heading); }
.search-item:hover, .search-item:focus { background: var(--primary-soft); }
.search-item strong { display: block; font-size: 15px; font-weight: 600; }
.search-item span { display: block; font-size: 13.5px; color: var(--muted); }
.search-empty { padding: 18px 16px; color: var(--muted); }

/* ========================================
   Hero
   ======================================== */

.hero { position: relative; overflow: hidden; padding: 92px 0 128px; text-align: center; background: #fff; }
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 70% 60% at 50% -10%, rgba(124, 58, 237, .20), transparent 70%),
        radial-gradient(ellipse 38% 40% at 92% 30%, rgba(79, 70, 229, .12), transparent 70%),
        radial-gradient(ellipse 36% 40% at 6% 45%, rgba(236, 72, 153, .08), transparent 70%);
}
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(100, 116, 139, .25) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px; padding: 7px 16px 7px 12px;
    background: rgba(255,255,255,.85); border: 1px solid var(--primary-line); border-radius: 999px;
    color: var(--primary-dark); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }

.hero h1 {
    font-size: clamp(38px, 6vw, 68px); line-height: 1.05; letter-spacing: -.035em; font-weight: 800;
    max-width: 840px; margin: 0 auto 22px;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero p { max-width: 640px; margin: 0 auto 34px; font-size: 18.5px; line-height: 1.6; color: var(--text); }

.hero-search {
    position: relative; display: flex; align-items: center; gap: 10px; width: min(100%, 700px); margin: 0 auto;
    padding: 9px 9px 9px 18px; background: var(--white); border: 1px solid var(--border); border-radius: 18px;
    box-shadow: var(--shadow-lg); transition: border-color .2s ease, box-shadow .2s ease;
}
.hero-search-icon { color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 6px; font-size: 16.5px; }
.hero-search input:focus { outline: none; }
.hero-search .btn { padding: 14px 28px; border-radius: 12px; }
.hero-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124, 58, 237, .16), var(--shadow-lg); }

.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; }
.hero-chips span { color: var(--muted); margin-right: 2px; }
.hero-chips a {
    padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.9); border: 1px solid var(--border);
    color: #334155; text-decoration: none; font-weight: 500; transition: all .2s ease;
}
.hero-chips a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-1px); }

.stats-wrap { position: relative; z-index: 2; margin-top: -62px; }
.stats-card {
    display: grid; grid-template-columns: repeat(3, 1fr); text-align: center;
    background: var(--white); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.stats-card div { padding: 26px 12px; }
.stats-card div + div { border-left: 1px solid var(--border); }
.stats-card strong { display: block; font-size: 34px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.stats-card span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); font-weight: 500; }

/* ========================================
   Sections
   ======================================== */

.section { padding: 76px 0; }
.section-tight { padding: 64px 0 24px; }
.section-alt { background: var(--background); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.section-head h2 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; }
.section-head a {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap;
    padding: 8px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); transition: background .2s ease;
}
.section-head a::after { content: "\2192"; transition: transform .2s var(--ease); }
.section-head a:hover { background: #EDE9FE; }
.section-head a:hover::after { transform: translateX(3px); }

.page-header { position: relative; overflow: hidden; padding: 70px 0 54px; text-align: center; background: linear-gradient(180deg, #F5F3FF 0%, #FFFFFF 100%); border-bottom: 1px solid var(--border); }
.page-header::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(124, 58, 237, .22) 1px, transparent 1px); background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.page-header .container { position: relative; }
.page-header h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -.035em; margin-bottom: 14px; }
.page-header p { max-width: 640px; margin: 0 auto; font-size: 17.5px; }

.category-page-icon { font-size: 44px; line-height: 1; margin-bottom: 14px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumbs-center { justify-content: center; }

/* Feature cards */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { padding: 28px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 18px;
    border-radius: 13px; background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-line);
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; }
.feature-card p { font-size: 15px; }

/* ========================================
   Tool cards
   ======================================== */

.tools-section { padding: 44px 0 90px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.tool-card {
    position: relative; display: flex; flex-direction: column; gap: 14px;
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-line); }
.tool-card.is-featured { border-color: #CDBFFB; background: linear-gradient(180deg, #FBFAFF 0%, #FFFFFF 55%); }

.tool-card-head { display: flex; align-items: center; gap: 14px; }
.tool-card-logo { display: block; flex: 0 0 56px; width: 56px; height: 56px; line-height: 0; }
.tool-card-title { flex: 1 1 auto; min-width: 0; }
.tool-card-title h3 { font-size: 17.5px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
.tool-card-title h3 a { color: var(--heading); text-decoration: none; }
.tool-card-title h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* whole card is clickable */
.tool-card-title h3 a:hover { color: var(--primary); }
.tool-category { display: inline-block; margin-top: 3px; font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* Logos */
.tool-logo-sm, .tool-logo {
    position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: var(--white); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.tool-logo-sm { width: 56px; height: 56px; border-radius: 15px; }
.tool-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 8px 24px rgba(15,23,42,.1); }
.logo-img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 12px; object-fit: contain; background: #fff; }
.tool-logo .logo-img { padding: 20px; }
.logo-initial, .logo-fallback {
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px;
    color: hsl(var(--h), 55%, 34%);
}
.logo-fallback { background: hsl(var(--h), 80%, 94%); border-color: hsl(var(--h), 65%, 86%); }
.logo-wrap { background: hsl(var(--h), 80%, 94%); border-color: hsl(var(--h), 65%, 88%); }
.tool-logo.logo-fallback, .tool-logo .logo-initial { font-size: 40px; }

.bookmark-btn {
    position: relative; z-index: 2; flex: 0 0 38px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: #94A3B8;
    transition: background .2s ease, color .2s ease;
}
.bookmark-btn:hover { background: var(--primary-soft); color: var(--primary); }
.bookmark-btn[aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); }
.bookmark-btn[aria-pressed="true"] svg { fill: currentColor; }
.bookmark-btn-text { width: auto; height: auto; padding: 12px 20px; border: 1px solid var(--border); gap: 8px; font-weight: 600; font-size: 15px; color: var(--heading); background: var(--white); box-shadow: var(--shadow-sm); border-radius: 11px; }
.bookmark-btn-text[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); }

.tool-card-desc { flex: 1; font-size: 14.8px; line-height: 1.6; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card-badges { display: flex; flex-wrap: wrap; gap: 8px; }

/* Badges */
.badge { white-space: nowrap; line-height: 1.3; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .005em; }
.badge-pricing { background: #F1F5F9; color: #475569; }
.price-free { background: #DCFCE7; color: #166534; }
.price-freemium { background: #EDE9FE; color: #5B21B6; }
.price-paid { background: #FEF3C7; color: #92400E; }
.price-free-trial { background: #CCFBF1; color: #115E59; }
.price-contact-for-pricing { background: #E2E8F0; color: #334155; }
.badge-featured { background: var(--grad); color: #fff; }
.badge-featured::before { content: "\2605"; font-size: 11px; }

.tool-card-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.tool-card-actions .btn:last-child { margin-left: auto; }

.upvote-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
    border: 1px solid var(--border); border-radius: 9px; background: var(--white);
    font-size: 13.5px; font-weight: 600; color: var(--heading); box-shadow: var(--shadow-sm);
    transition: all .2s ease;
}
.upvote-btn:hover { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary-dark); }
.upvote-btn.is-voted { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.upvote-btn.is-voted svg { fill: currentColor; }
.upvote-btn-text { padding: 12px 20px; font-size: 15px; border-radius: 11px; }

/* ========================================
   Filters & pagination
   ======================================== */

.filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px;
    padding: 14px; background: var(--white); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.field { min-width: 160px; }
.field-grow { flex: 1 1 240px; }
.filter-bar input, .filter-bar select, .form-row input, .form-row select, .form-row textarea,
.inline-form input, .inline-form select {
    width: 100%; padding: 11px 14px; background: var(--background); border: 1px solid var(--border); border-radius: 11px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.filter-bar input:focus, .filter-bar select:focus, .form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(124, 58, 237, .14);
}
.reset-link { font-weight: 600; font-size: 14px; padding: 0 6px; }
.results-count { margin-bottom: 20px; font-size: 14.5px; color: var(--muted); font-weight: 500; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 46px; }
.page-link {
    min-width: 42px; padding: 9px 15px; text-align: center; text-decoration: none; font-weight: 600; font-size: 14.5px;
    color: var(--heading); background: var(--white); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm);
    transition: all .2s ease;
}
.page-link:hover { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); }
.page-link.is-current { background: var(--grad); border-color: transparent; color: #fff; }
.page-gap { color: var(--muted); padding: 0 4px; }

.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--primary-line); border-radius: 20px; background: var(--primary-soft); }
.empty-state h2 { margin-bottom: 10px; font-size: 24px; }
.empty-state p { margin-bottom: 24px; }

/* ========================================
   Categories
   ======================================== */

.categories-section { padding: 54px 0 90px; }
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.category-card {
    display: block; padding: 28px 24px; text-decoration: none; color: var(--text);
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-line); color: var(--text); }
.category-icon, .category-mini-icon {
    display: flex; align-items: center; justify-content: center; line-height: 1;
    background: hsl(var(--h, 262), 85%, 95%); border: 1px solid hsl(var(--h, 262), 70%, 88%);
}
.category-icon { width: 56px; height: 56px; margin-bottom: 18px; border-radius: 16px; font-size: 28px; }
.category-card h2 { font-size: 19px; margin-bottom: 8px; font-weight: 700; }
.category-card p { font-size: 14.5px; margin-bottom: 16px; }
.category-count { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12.5px; font-weight: 600; }

.category-mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.category-mini {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 12px 20px; text-align: center; text-decoration: none;
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.category-mini:hover { transform: translateY(-3px); border-color: var(--primary-line); box-shadow: var(--shadow-hover); }
.category-mini-icon { width: 54px; height: 54px; margin-bottom: 6px; border-radius: 16px; font-size: 26px; }
.category-mini-name { color: var(--heading); font-weight: 700; font-size: 15px; }
.category-mini-count { font-size: 13px; color: var(--muted); }

/* ========================================
   Tool detail
   ======================================== */

.tool-detail-header { position: relative; overflow: hidden; padding: 38px 0 54px; background: linear-gradient(180deg, #F5F3FF 0%, #FFFFFF 100%); border-bottom: 1px solid var(--border); }
.tool-detail-header::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(124, 58, 237, .2) 1px, transparent 1px); background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.tool-detail-header .container { position: relative; }
.tool-detail-top { display: flex; align-items: flex-start; gap: 30px; }
.tool-detail-title { flex: 1; min-width: 0; }
.tool-detail-badges { display: flex; gap: 8px; margin-bottom: 14px; }
.tool-detail-title h1 { font-size: clamp(32px, 4.8vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -.035em; margin-bottom: 14px; }
.tool-detail-title p { max-width: 720px; font-size: 18px; }
.tool-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.tool-detail-section { padding: 48px 0 80px; background: var(--background); }
.tool-detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); gap: 32px; align-items: start; }

.detail-card { margin-bottom: 22px; padding: 30px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-card h2 { font-size: 21px; font-weight: 700; margin-bottom: 16px; }
.detail-card .prose p:last-child { margin-bottom: 0; }

.prose { max-width: 70ch; }
.prose p { margin-bottom: 16px; font-size: 16.5px; line-height: 1.75; }
.prose h2 { font-size: 24px; margin: 34px 0 12px; font-weight: 700; }
.prose h3 { font-size: 19px; margin: 26px 0 10px; font-weight: 700; }
.prose ul { margin: 0 0 18px 22px; list-style: disc; }
.prose li { margin-bottom: 6px; font-size: 16.5px; line-height: 1.7; }
.prose a { font-weight: 600; }
.prose-article { max-width: none; padding: 44px 0 76px; }
.prose-article p, .prose-article li { font-size: 18px; line-height: 1.8; }
.prose-article h2 { font-size: 28px; margin-top: 44px; }

.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.check-list li { position: relative; padding-left: 32px; font-size: 15.5px; line-height: 1.55; }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--primary-soft); border: 1px solid var(--primary-line);
}
.check-list li::after {
    content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 5px;
    border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg);
}

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pros-box, .cons-box { padding: 20px; border-radius: 14px; border: 1px solid; }
.pros-box { background: var(--success-bg); border-color: #BBF7D0; }
.cons-box { background: var(--danger-bg); border-color: #FECACA; }
.pros-box h3 { color: var(--success); margin-bottom: 10px; font-size: 16px; }
.cons-box h3 { color: var(--danger); margin-bottom: 10px; font-size: 16px; }
.pros-box ul, .cons-box ul { margin-left: 18px; list-style: disc; }
.pros-box li, .cons-box li { margin-bottom: 6px; font-size: 15px; }

.tool-category-list { display: flex; flex-wrap: wrap; gap: 10px; }
.category-tag {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px;
    background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary-dark); text-decoration: none; font-size: 14px; font-weight: 600;
    transition: all .2s ease;
}
.category-tag:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.tool-action-card { position: sticky; top: 100px; padding: 28px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.tool-action-card h2 { font-size: 19px; margin-bottom: 14px; font-weight: 700; }
.facts { margin-bottom: 22px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--heading); font-weight: 600; text-align: right; }
.fine-print { margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ========================================
   Guides
   ======================================== */

.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.guide-card {
    position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px 24px 24px; overflow: hidden;
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.guide-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--grad); }
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-line); }
.guide-card time { font-size: 13px; color: var(--muted); font-weight: 500; }
.guide-card h3 { font-size: 19.5px; line-height: 1.3; font-weight: 700; }
.guide-card h3 a { color: var(--heading); text-decoration: none; }
.guide-card h3 a:hover { color: var(--primary); }
.guide-card p { flex: 1; font-size: 15px; }
.read-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.read-more::after { content: "\2192"; transition: transform .2s var(--ease); }
.read-more:hover::after { transform: translateX(3px); }

.article-header { padding: 44px 0 40px; background: linear-gradient(180deg, #F5F3FF 0%, #FFFFFF 100%); border-bottom: 1px solid var(--border); }
.article-header h1 { font-size: clamp(32px, 4.8vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.035em; margin-bottom: 14px; }
.article-meta { font-size: 14.5px; color: var(--muted); font-weight: 500; }
.plain-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.plain-list a { font-weight: 600; text-decoration: none; }

/* ========================================
   Forms & alerts
   ======================================== */

.form-card { padding: 34px; background: var(--white); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; margin-bottom: 7px; color: var(--heading); font-weight: 600; font-size: 14.5px; }
.form-row small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.optional { font-weight: 400; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-card .btn { margin-top: 6px; padding: 14px 28px; }

.alert { margin-bottom: 22px; padding: 14px 18px; border-radius: 12px; border: 1px solid; font-size: 15px; }
.alert ul { margin: 6px 0 0 20px; list-style: disc; }
.alert-success { background: var(--success-bg); border-color: #BBF7D0; color: var(--success); }
.alert-error { background: var(--danger-bg); border-color: #FECACA; color: var(--danger); }

/* ========================================
   Newsletter, CTA, 404
   ======================================== */

.cta-band { position: relative; overflow: hidden; padding: 56px 0; background: var(--grad); color: #fff; }
.cta-band::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(100deg, #000, transparent 70%); mask-image: linear-gradient(100deg, #000, transparent 70%);
}
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band h2 { color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.cta-band p { color: #E9E3FF; font-size: 17px; }

.newsletter { padding: 76px 0; background: var(--white); }
.newsletter-inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 44px 48px;
    background: linear-gradient(135deg, #F5F3FF 0%, #EEF2FF 100%); border: 1px solid var(--primary-line); border-radius: 24px;
}
.newsletter-copy h2 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter-form input[type="email"] { flex: 1 1 220px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); }
.form-note { flex-basis: 100%; min-height: 22px; font-size: 14px; }
.form-note.ok { color: var(--success); }
.form-note.err { color: var(--danger); }

.not-found { text-align: center; }
.not-found-code { font-size: 84px; font-weight: 800; line-height: 1; margin-bottom: 8px; letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.not-found h1 { margin-bottom: 12px; font-weight: 800; }
.not-found .hero-search { margin: 28px auto; }
.not-found-links a { font-weight: 600; }

.saved-toolbar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.saved-toolbar[hidden], .empty-state[hidden] { display: none; }

/* ========================================
   Footer
   ======================================== */

.site-footer { position: relative; background: var(--navy); color: #94A3B8; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
.footer-inner { padding: 64px 0 52px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px; }
.footer-logo { display: inline-block; margin-bottom: 16px; }
.footer-logo img { display: block; height: 52px; width: auto; }
.footer-brand h2 { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 14px; font-size: 21px; font-weight: 800; }
.footer-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0; }
.footer-brand p { max-width: 380px; font-size: 15px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h3 { color: #fff; margin-bottom: 6px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.footer-links a { color: #94A3B8; text-decoration: none; font-size: 15px; transition: color .2s ease; }
.footer-links a:hover { color: #C4B5FD; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; text-align: center; font-size: 14px; }

/* ========================================
   Scroll reveal (enabled by JS only)
   ======================================== */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1100px) {
    .site-logo img { height: 46px; }
    .main-nav a { padding: 8px 10px; }
    .category-mini-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 980px) {
    .tools-grid, .guides-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .category-mini-grid { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .tool-detail-layout { grid-template-columns: 1fr; gap: 24px; }
    .tool-action-card { position: static; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .newsletter-inner { grid-template-columns: 1fr; gap: 22px; padding: 34px 28px; }
}

@media (max-width: 900px) {
    .header-inner { min-height: 68px; }
    .header-btn { display: none; }
    .menu-toggle { display: inline-flex; }
    .site-logo img { height: 42px; }

    .main-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 20px 18px;
        background: var(--white); border-bottom: 1px solid var(--border); box-shadow: 0 16px 30px rgba(15,23,42,.1);
    }
    .site-header.nav-open .main-nav { display: flex; }
    .main-nav a { padding: 13px 14px; font-size: 16px; }
}

@media (max-width: 640px) {
    .container, .container-narrow, .container-form { width: min(100% - 32px, var(--container-width)); }
    .hero { padding: 56px 0 104px; }
    .hero p { font-size: 16.5px; }
    .hero-search { flex-wrap: wrap; padding: 12px; }
    .hero-search-icon { display: none; }
    .hero-search input { flex-basis: 100%; padding: 10px 8px; }
    .hero-search .btn { width: 100%; }
    .stats-wrap { margin-top: -52px; }
    .stats-card strong { font-size: 24px; }
    .stats-card span { font-size: 12px; }
    .stats-card div { padding: 20px 6px; }
    .section { padding: 52px 0; }
    .section-head { align-items: center; }
    .section-head h2 { font-size: 24px; }
    .tools-grid, .guides-grid, .categories-grid, .pros-cons, .form-grid, .check-list { grid-template-columns: 1fr; }
    .category-mini-grid { grid-template-columns: repeat(2, 1fr); }
    .tool-detail-top { flex-direction: column; gap: 20px; }
    .tool-detail-title p { font-size: 16px; }
    .detail-card { padding: 22px; }
    .form-card { padding: 22px; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .filter-bar .field, .filter-bar .btn { width: 100%; }
    .search-overlay { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ========================================
   Ratings & reviews
   ======================================== */

.stars {
    --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l3.1 6.3 6.9 1-5 4.9 1.2 6.9L12 17.9 5.8 21.3 7 14.4 2 9.5l6.9-1z'/%3E%3C/svg%3E");
    display: inline-block; width: 80px; height: 16px; flex-shrink: 0; vertical-align: middle;
    background: linear-gradient(90deg, #F59E0B var(--p, 0%), #E2E8F0 var(--p, 0%));
    -webkit-mask: var(--star) 0 0 / 16px 16px repeat-x; mask: var(--star) 0 0 / 16px 16px repeat-x;
}
.stars-lg { width: 110px; height: 22px; -webkit-mask-size: 22px 22px; mask-size: 22px 22px; }

.tool-card-rating { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin-top: -4px; }
.tool-card-rating strong { color: var(--heading); font-weight: 700; }

.detail-rating { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14.5px; color: var(--muted); text-decoration: none; }
.detail-rating strong { color: var(--heading); }
.detail-rating:hover span { text-decoration: underline; }
.detail-rating-empty { font-weight: 600; color: var(--primary); }
.detail-rating-empty:hover { text-decoration: underline; }

.detail-card[id] { scroll-margin-top: 96px; }

.rating-summary { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.rating-big { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.rating-big strong { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--heading); }
.rating-big span { font-size: 13.5px; color: var(--muted); }
.rating-bars { display: flex; flex-direction: column; gap: 8px; }
.rating-bar-row { display: grid; grid-template-columns: 52px 1fr 28px; gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); }
.rating-bar { height: 8px; border-radius: 999px; background: #EEF2F7; overflow: hidden; }
.rating-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #F59E0B, #F97316); }
.rating-bar-count { text-align: right; }

.review-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.review { padding: 20px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.review-head strong { color: var(--heading); font-size: 15.5px; }
.review p { font-size: 15.5px; line-height: 1.7; margin-bottom: 8px; }
.review small { color: var(--muted); font-size: 13px; }
.muted-note { margin-bottom: 8px; color: var(--muted); }

.review-form-title { margin: 30px 0 16px; font-size: 18px; font-weight: 700; padding-top: 26px; border-top: 1px solid var(--border); }
.review-form fieldset { border: 0; padding: 0; min-width: 0; }
.review-form legend { display: block; margin-bottom: 8px; color: var(--heading); font-weight: 600; font-size: 14.5px; padding: 0; }
.review-form .btn { margin-top: 4px; }

.rate-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rate-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-input label {
    display: block; width: 36px; height: 36px; cursor: pointer; background: #CBD5E1;
    -webkit-mask: var(--rate-star) center / 30px 30px no-repeat; mask: var(--rate-star) center / 30px 30px no-repeat;
    --rate-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l3.1 6.3 6.9 1-5 4.9 1.2 6.9L12 17.9 5.8 21.3 7 14.4 2 9.5l6.9-1z'/%3E%3C/svg%3E");
    transition: background .15s ease, transform .15s var(--ease);
}
.rate-input input:checked ~ label,
.rate-input label:hover,
.rate-input label:hover ~ label { background: #F59E0B; }
.rate-input label:hover { transform: scale(1.1); }
.rate-input input:focus-visible + label { outline: 3px solid #A78BFA; outline-offset: 0; border-radius: 6px; }

@media (max-width: 640px) {
    .rating-summary { grid-template-columns: 1fr; gap: 22px; }
}

/* ========================================
   Cookie banner
   ======================================== */

.cookie-banner {
    position: fixed; left: 20px; bottom: 20px; z-index: 150; width: min(440px, calc(100% - 40px));
    padding: 20px 22px; background: var(--white); border: 1px solid var(--border); border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .06);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner:focus { outline: none; }
.cookie-banner:focus-visible { outline: 3px solid #A78BFA; outline-offset: 2px; }
.cookie-banner p { margin-bottom: 16px; font-size: 14px; line-height: 1.6; color: var(--text); }
.cookie-banner a { font-weight: 600; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { flex: 1; }

.footer-link-btn { background: none; border: 0; padding: 0; color: #94A3B8; font: inherit; text-decoration: underline; cursor: pointer; }
.footer-link-btn:hover { color: #C4B5FD; }
.footer-sep { margin: 0 6px; }

.cookie-table { width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 14.5px; }
.cookie-table th, .cookie-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.cookie-table th { background: var(--background); color: var(--heading); font-size: 13px; }

@media (max-width: 640px) {
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px; }
    .cookie-table { display: block; overflow-x: auto; }
}
