:root {
    --bg: #f7f9fc;
    --surface: #fff;
    --surface2: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #5b5cf0;
    --brand2: #8b5cf6;
    --shadow: 0 18px 55px rgba(15, 23, 42, .08);
    --radius: 22px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6
}

body.dark {
    --bg: #080d18;
    --surface: #0f1728;
    --surface2: #151e31;
    --text: #eef2ff;
    --muted: #9aa8bf;
    --line: #263249;
    --shadow: 0 20px 60px rgba(0, 0, 0, .3)
}

a {
    text-decoration: none;
    color: inherit
}

button,
input,
select,
textarea {
    font: inherit
}

button {
    cursor: pointer
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: auto
}

.top-strip {
    background: #0b1220;
    color: #aebbd0;
    font-size: 12px
}

.strip-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 10px
}

.strip-inner button {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 16px
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line)
}

.nav {
    height: 86px;
    display: flex;
    align-items: center;
    gap: 32px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif
}

.brand em {
    color: var(--brand);
    font-style: normal
}

.brand-full-logo {
    display: block;
    width: 360px;
    height: auto;
    max-height: 86px;
    object-fit: contain;
    object-position: left center;
    flex: 0 0 auto
}

.brand-logo-dark {
    display: none
}

body.dark .brand-logo-light {
    display: none
}

body.dark .brand-logo-dark {
    display: block
}

.footer-full-logo {
    display: block;
    width: 300px;
    height: auto;
    max-width: 100%;
    object-fit: contain
}

nav {
    display: flex;
    gap: 25px;
    margin-left: 12px
}

nav a,
.footer-columns a {
    color: var(--muted);
    font-size: 14px
}

nav a:hover,
.footer-columns a:hover {
    color: var(--brand)
}

.nav-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center
}

.icon-btn,
.menu-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 12px;
    height: 40px;
    padding: 0 12px
}

.nav-btn,
.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text);
    color: var(--surface);
    padding: 12px 17px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px
}

.menu-btn {
    display: none
}

.hero {
    padding: 80px 0 70px;
    background: radial-gradient(circle at 75% 30%, rgba(99, 102, 241, .12), transparent 35%), radial-gradient(circle at 15% 20%, rgba(139, 92, 246, .08), transparent 30%)
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 60px;
    align-items: center
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: .14em
}

.eyebrow.small {
    font-size: 10px
}

.hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(44px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -.055em;
    margin: 18px 0
}

.hero h1 span,
.feature-wrap h2 span {
    background: linear-gradient(90deg, var(--brand), var(--brand2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.hero-copy>p {
    font-size: 18px;
    color: var(--muted);
    max-width: 620px
}

.hero-search {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 7px 8px 7px 15px;
    box-shadow: var(--shadow);
    max-width: 610px;
    margin: 28px 0 18px
}

.hero-search span {
    color: var(--muted);
    font-size: 20px
}

.hero-search input {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    flex: 1;
    padding: 10px
}

.hero-search button {
    border: 0;
    background: var(--brand);
    color: #fff;
    border-radius: 11px;
    padding: 10px 17px;
    font-weight: 700
}

.hero-links {
    display: flex;
    gap: 24px;
    font-size: 14px;
    font-weight: 700
}

.hero-links a:first-child {
    color: var(--brand)
}

.trust-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 24px;
    color: var(--muted);
    font-size: 12px
}

.hero-visual {
    position: relative;
    min-height: 420px;
    display: grid;
    place-items: center
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px)
}

.glow-a {
    width: 290px;
    height: 290px;
    background: rgba(91, 92, 240, .2);
    top: 40px;
    left: 30px
}

.glow-b {
    width: 220px;
    height: 220px;
    background: rgba(139, 92, 246, .18);
    bottom: 15px;
    right: 30px
}

.preview-card {
    position: relative;
    width: min(430px, 100%);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .6);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter: blur(20px);
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(36, 40, 100, .16);
    transform: rotate(1deg)
}

.preview-head {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 13px
}

.live {
    color: #16a34a
}

.live i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 4px
}

.preview-search {
    margin: 18px 0;
    background: var(--surface2);
    border: 1px solid var(--line);
    padding: 11px 13px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px
}

.preview-list {
    display: grid;
    gap: 9px
}

.preview-list>div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease
}

.preview-list>div:hover,
.preview-list>div:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(36, 40, 100, .10);
    border-color: var(--brand);
    outline: none
}

.preview-list>div:hover strong,
.preview-list>div:focus-visible strong {
    color: var(--brand)
}

.preview-list b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(91, 92, 240, .1);
    color: var(--brand)
}

.preview-list span {
    font-weight: 700;
    font-size: 13px;
    flex: 1
}

.preview-list small {
    display: block;
    color: var(--muted);
    font-weight: 500;
    font-size: 10px
}

.preview-list strong {
    color: var(--muted)
}

.preview-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 17px;
    color: var(--muted);
    font-size: 10px
}

.preview-stats b {
    color: var(--text);
    font-size: 16px
}

.ad-slot {
    width: min(1160px, calc(100% - 40px));
    height: 90px;
    margin: 18px auto;
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 9px;
    letter-spacing: .12em;
    border: 1px dashed var(--line);
    border-radius: 14px
}

.ad-slot.wide {
    height: 110px
}

.stats {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface)
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr)
}

.stats-grid div {
    padding: 28px;
    text-align: center;
    border-right: 1px solid var(--line)
}

.stats-grid div:last-child {
    border: 0
}

.stats-grid b {
    display: block;
    font-size: 27px
}

.stats-grid span {
    color: var(--muted);
    font-size: 12px
}

.section {
    padding: 92px 0
}

.tools-section {
    background: var(--bg)
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 28px
}

.section-head h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 36px;
    letter-spacing: -.04em;
    margin: 7px 0
}

.section-head p {
    color: var(--muted);
    margin: 0
}

.tool-controls {
    display: flex;
    gap: 8px;
    align-items: center
}

.search-box {
    width: 290px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
    padding: 0 12px
}

.search-box span {
    color: var(--muted)
}

.search-box input {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    width: 100%
}

.search-box kbd {
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1px 5px;
    color: var(--muted);
    font-size: 10px
}

.filter-btn {
    height: 44px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 12px;
    padding: 0 12px
}

.filter-btn.active {
    background: var(--text);
    color: var(--surface)
}

.category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px
}

.category-tabs button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700
}

.category-tabs button.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand)
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px
}

.tool-card {
    cursor: pointer;
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    min-height: 185px;
    display: flex;
    flex-direction: column;
    transition: .2s ease;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .025)
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(91, 92, 240, .25)
}

.tool-card .star {
    position: absolute;
    top: 13px;
    right: 13px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 19px
}

.tool-card .star.on {
    color: #f59e0b
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(91, 92, 240, .12), rgba(139, 92, 246, .1));
    color: var(--brand);
    font-weight: 800;
    font-size: 15px
}

.tool-card h3 {
    font-size: 15px;
    margin: 14px 0 6px
}

.tool-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    margin: 0
}

.tool-card .open {
    margin-top: auto;
    padding-top: 14px;
    color: var(--brand);
    font-weight: 800;
    font-size: 12px
}

.empty {
    text-align: center;
    padding: 70px 20px
}

.empty>div {
    font-size: 35px;
    color: var(--muted)
}

.empty h3 {
    margin: 6px
}

.empty p {
    color: var(--muted)
}

.hidden {
    display: none !important
}

.secondary-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 15px
}

.category-section {
    background: var(--surface);
    border-top: 1px solid var(--line)
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 13px
}

.category-card {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 18px;
    padding: 22px;
    text-align: left;
    transition: .2s
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow)
}

.category-card .cat-icon {
    font-size: 26px
}

.category-card b {
    display: block;
    margin-top: 12px
}

.category-card small {
    color: var(--muted);
    font-size: 11px
}

.features-section {
    background: linear-gradient(180deg, var(--surface), var(--bg))
}

.feature-wrap {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 80px;
    align-items: center
}

.feature-wrap h2 {
    font-family: 'Plus Jakarta Sans';
    font-size: 44px;
    line-height: 1.12;
    letter-spacing: -.045em
}

.feature-wrap>div>p {
    color: var(--muted);
    max-width: 470px
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px
}

.feature-grid article {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface)
}

.feature-grid i {
    font-style: normal;
    font-size: 23px
}

.feature-grid h3 {
    margin: 12px 0 4px;
    font-size: 16px
}

.feature-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 12px
}

.about {
    background: var(--surface);
    border-top: 1px solid var(--line)
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px
}

.about h2 {
    font-family: 'Plus Jakarta Sans';
    font-size: 40px;
    line-height: 1.15;
    margin-top: 8px
}

.about-grid p {
    color: var(--muted)
}

.about-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 25px;
    color: var(--muted);
    font-size: 13px
}

.cta {
    padding: 65px 0;
    background: linear-gradient(110deg, #151b35, #25265e);
    color: #fff
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px
}

.cta .eyebrow {
    color: #b8bcff
}

.cta h2 {
    font-family: 'Plus Jakarta Sans';
    font-size: 34px;
    margin: 8px 0
}

.cta p {
    color: #b7c0d3;
    margin: 0
}

.cta .primary-btn {
    background: #fff;
    color: #111827
}

footer {
    background: #080d18;
    color: #dbe4f4;
    padding: 55px 0 20px
}

.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 40px
}

.footer-columns {
    display: flex;
    gap: 70px
}

.footer-columns div {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.footer-columns b {
    font-size: 12px;
    margin-bottom: 4px
}

.footer-columns a {
    font-size: 12px
}

.footer-bottom {
    border-top: 1px solid #202a3b;
    margin-top: 45px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    color: #718096;
    font-size: 11px
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(5px)
}

.modal-box {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .25)
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 15px;
    border: 0;
    background: var(--surface2);
    color: var(--text);
    width: 35px;
    height: 35px;
    border-radius: 10px;
    font-size: 22px
}

.modal-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 45px
}

.modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: rgba(91, 92, 240, .11);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 800
}

.modal-top h2 {
    margin: 3px 0;
    font-family: 'Plus Jakarta Sans';
    font-size: 25px
}

.modal-fav {
    margin-left: auto;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    font-size: 19px
}

.modal-box>p {
    color: var(--muted);
    font-size: 13px
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 13px
}

.field label {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted)
}

.field input,
.field select,
.tool-textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: var(--surface2);
    color: var(--text);
    border-radius: 11px;
    outline: 0
}

.field input:focus,
.field select:focus,
.tool-textarea:focus {
    border-color: var(--brand)
}

.tool-textarea {
    min-height: 150px;
    resize: vertical
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.calc-btn {
    width: 100%;
    border: 0;
    background: var(--brand);
    color: #fff;
    padding: 12px;
    border-radius: 11px;
    font-weight: 800;
    margin: 5px 0 12px
}

.result {
    padding: 15px;
    background: var(--surface2);
    border: 1px solid var(--line);
    border-radius: 12px;
    min-height: 50px;
    font-weight: 700;
    white-space: pre-wrap;
    word-break: break-word
}

.live-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px
}

.live-stats div {
    padding: 12px;
    background: var(--surface2);
    border-radius: 10px;
    text-align: center
}

.live-stats b {
    display: block;
    font-size: 18px
}

.live-stats small {
    color: var(--muted)
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    color: var(--muted);
    font-size: 10px
}

.modal-footer button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 9px;
    padding: 7px 10px
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translate(-50%, 20px);
    background: #111827;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    z-index: 200
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0)
}

@media(max-width:1000px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .hero-grid,
    .feature-wrap {
        grid-template-columns: 1fr
    }

    .hero-visual {
        min-height: 360px
    }

    .feature-wrap {
        gap: 40px
    }

    .about-grid {
        gap: 40px
    }
}

@media(max-width:760px) {
    .container {
        width: min(100% - 24px, 600px)
    }

    .nav {
        height: 64px
    }

    .nav nav,
    .nav-btn {
        display: none
    }

    .menu-btn {
        display: block
    }

    .nav nav.mainNav-open {
        display: flex;
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        margin-left: 0;
        padding: 14px;
        flex-direction: column;
        gap: 4px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: var(--shadow);
        z-index: 60
    }

    .nav nav.mainNav-open a {
        display: block;
        padding: 12px 14px;
        border-radius: 10px
    }

    .nav nav.mainNav-open a:hover {
        background: var(--soft)
    }

    .nav-actions {
        gap: 6px
    }

    .hero {
        padding: 55px 0 35px
    }

    .hero h1 {
        font-size: 44px
    }

    .hero-copy>p {
        font-size: 15px
    }

    .hero-search {
        flex-wrap: wrap
    }

    .hero-search input {
        min-width: 0
    }

    .hero-search button {
        width: 100%
    }

    .hero-visual {
        min-height: 300px
    }

    .preview-card {
        width: 100%
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr
    }

    .stats-grid div {
        padding: 20px 10px
    }

    .stats-grid div:nth-child(2) {
        border-right: 0
    }

    .stats-grid div:nth-child(-n+2) {
        border-bottom: 1px solid var(--line)
    }

    .section {
        padding: 65px 0
    }

    .section-head {
        display: block
    }

    .section-head h2 {
        font-size: 30px
    }

    .tool-controls {
        margin-top: 20px;
        flex-wrap: wrap
    }

    .search-box {
        width: 100%
    }

    .tool-grid {
        grid-template-columns: 1fr 1fr
    }

    .category-grid {
        grid-template-columns: 1fr 1fr
    }

    .feature-wrap,
    .about-grid {
        grid-template-columns: 1fr
    }

    .feature-wrap h2,
    .about h2 {
        font-size: 34px
    }

    .cta-inner {
        display: block
    }

    .cta .primary-btn {
        margin-top: 20px
    }

    .footer-main {
        display: block
    }

    .footer-columns {
        margin-top: 35px;
        gap: 35px;
        flex-wrap: wrap
    }

    .footer-bottom {
        display: block
    }

    .footer-bottom span {
        display: block;
        margin-bottom: 7px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .live-stats {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:450px) {
    .tool-grid {
        grid-template-columns: 1fr
    }

    .category-grid {
        grid-template-columns: 1fr 1fr
    }

    .category-card {
        padding: 16px
    }

    .hero h1 {
        font-size: 39px
    }

    .hero-links {
        gap: 13px
    }

    .trust-row {
        gap: 10px
    }

    .modal-box {
        padding: 22px
    }

    .modal-top h2 {
        font-size: 21px
    }
}

.preview-search {
    cursor: pointer
}

.preview-search:hover,
.preview-search:focus-visible {
    border-color: var(--brand);
    outline: none
}

.suggest-section {
    padding: 48px 0
}

.suggest-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow)
}

.suggest-copy h2 {
    margin: 8px 0 10px
}

.suggest-copy p {
    margin: 0;
    color: var(--muted)
}

.suggest-form {
    display: grid;
    gap: 10px
}

.suggest-form input,
.suggest-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: black;
    font: inherit
}

.suggest-form textarea {
    resize: vertical
}

.suggest-form button {
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    background-color: var(--brand2);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease
}

.suggest-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12)
}

.suggest-form button:active {
    transform: translateY(0)
}

.suggest-note {
    margin: 0;
    font-size: 12px;
    color: var(--muted)
}

@media(max-width:700px) {
    .suggest-card {
        grid-template-columns: 1fr;
        padding: 20px
    }

    .suggest-section {
        padding: 32px 0
    }
}

@media (max-width:640px) {
    .brand-full-logo {
        width: 300px;
        max-height: 72px
    }

    .footer-full-logo {
        width: 270px
    }
}

.tool-guide {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text)
}

.tool-guide h3 {
    margin: 0 0 8px;
    font-size: 1.05rem
}

.tool-guide h4 {
    margin: 16px 0 6px;
    font-size: .94rem
}

.tool-guide p {
    margin: 7px 0;
    line-height: 1.65
}

.tool-guide ol {
    margin: 6px 0 0;
    padding-left: 22px
}

.tool-guide li {
    margin: 5px 0;
    line-height: 1.55
}

.tool-help-muted {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55
}

.engineering-hub-section {
    padding: 42px 0 58px;
    background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--brand) 4%, var(--bg)) 48%, var(--bg));
    overflow: hidden
}

.engineering-hub-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 52px);
    border: 1px solid color-mix(in srgb, #8b91ff 34%, var(--line));
    border-radius: 30px;
    background: radial-gradient(ellipse at 85% 15%, rgba(110, 92, 255, .22), transparent 38%), linear-gradient(125deg, #0b1224 0%, #121a36 58%, #20205a 100%);
    color: #f7f8ff;
    box-shadow: 0 24px 70px rgba(20, 24, 65, .18)
}

.engineering-hub-panel:after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 1px solid rgba(177, 182, 255, .12);
    right: -110px;
    top: -170px;
    box-shadow: 0 0 0 36px rgba(177, 182, 255, .035), 0 0 0 72px rgba(177, 182, 255, .025);
    pointer-events: none
}

.engineering-hub-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #b9c2ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    position: relative;
    z-index: 1
}

.engineering-pulse {
    width: 8px;
    height: 8px;
    background: #78f0c2;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(120, 240, 194, .12)
}

.engineering-topline-divider {
    opacity: .45
}

.engineering-hub-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 28px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 24px 0 30px
}

.engineering-hub-copy h2 {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: clamp(32px, 4.6vw, 56px);
    line-height: 1.09;
    letter-spacing: -.045em;
    margin: 0 0 18px;
    color: #fff
}

.engineering-hub-copy h2 span {
    background: linear-gradient(90deg, #a9b4ff, #7de9d0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent
}

.engineering-hub-copy p {
    max-width: 610px;
    color: #c1cbe0;
    font-size: 15px;
    line-height: 1.85;
    margin: 0
}

.engineering-hub-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 26px
}

.engineering-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 13px 18px;
    border-radius: 12px;
    background: #f7f8ff;
    color: #171d43;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    transition: transform .2s, box-shadow .2s
}

.engineering-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22)
}

.engineering-secondary-link {
    color: #e2e7ff;
    font-weight: 700;
    font-size: 13px
}

.engineering-secondary-link span {
    margin-left: 6px
}

.engineering-visual-card {
    height: 300px;
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(198, 204, 255, .18);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .018));
    overflow: hidden
}

.engineering-visual-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(194, 201, 255, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(194, 201, 255, .075) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(135deg, black, transparent 90%)
}

.engineering-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(159, 170, 255, .3);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-22deg)
}

.engineering-orbit-one {
    width: 210px;
    height: 130px
}

.engineering-orbit-two {
    width: 260px;
    height: 190px;
    transform: translate(-50%, -50%) rotate(48deg)
}

.engineering-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 94px;
    height: 94px;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #7777ff, #5a5ce5 60%, #4547bd);
    box-shadow: 0 0 0 10px rgba(116, 118, 255, .11), 0 18px 40px rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .4)
}

.engineering-core span {
    font-size: 38px;
    line-height: 1;
    font-weight: 700
}

.engineering-core small {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .14em;
    margin-top: 5px
}

.engineering-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid rgba(218, 222, 255, .19);
    border-radius: 13px;
    background: rgba(13, 20, 46, .88);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    backdrop-filter: blur(10px)
}

.engineering-float>span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(133, 143, 255, .16);
    color: #c8d0ff;
    font-size: 18px
}

.engineering-float b,
.engineering-float small {
    display: block
}

.engineering-float b {
    font-size: 11px;
    color: #fff
}

.engineering-float small {
    font-size: 9px;
    color: #aeb9d8;
    margin-top: 2px
}

.engineering-float-a {
    top: 24px;
    left: 16px
}

.engineering-float-b {
    right: 13px;
    top: 120px
}

.engineering-float-c {
    left: 23px;
    bottom: 20px
}

.engineering-hub-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(211, 216, 255, .17);
    padding-top: 22px;
    position: relative;
    z-index: 1;
    gap: 16px
}

.engineering-hub-metrics>div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-left: 17px;
    border-left: 1px solid rgba(211, 216, 255, .16)
}

.engineering-hub-metrics>div:first-child {
    padding-left: 0;
    border-left: 0
}

.engineering-hub-metrics b {
    font-size: 22px;
    letter-spacing: -.03em;
    color: #fff
}

.engineering-hub-metrics span {
    font-size: 11px;
    color: #b6c0dc
}

.engineering-branches-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 44px 0 20px;
    scroll-margin-top: 110px
}

.engineering-branches-head h3 {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: clamp(23px, 3vw, 32px);
    letter-spacing: -.035em;
    margin: 5px 0 5px
}

.engineering-branches-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px
}

.engineering-branch-note {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--muted);
    white-space: nowrap
}

.engineering-branch-note b {
    color: var(--brand);
    font-size: 17px;
    margin-left: 8px
}

.engineering-branch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.engineering-branch-card {
    --branch-accent: #7378ff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-height: 188px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    width: 100%
}

.engineering-branch-card:before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--branch-accent), transparent 90%);
    opacity: .8
}

.engineering-branch-card:hover,
.engineering-branch-card:focus-visible {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--branch-accent) 52%, var(--line));
    box-shadow: 0 16px 34px rgba(35, 43, 95, .1);
    outline: none
}

.engineering-branch-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--branch-accent) 13%, var(--surface));
    color: var(--branch-accent);
    font-size: 22px;
    margin-bottom: 14px
}

.engineering-branch-card strong {
    font-size: 14px;
    line-height: 1.35
}

.engineering-branch-card p {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.55;
    margin: 6px 0 15px
}

.engineering-branch-card .engineering-branch-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    width: 100%;
    font-size: 10px;
    font-weight: 800;
    color: var(--branch-accent)
}

.engineering-branch-bottom .branch-count {
    color: var(--muted);
    font-weight: 600
}

.engineering-branch-bottom .branch-arrow {
    font-size: 16px;
    transition: transform .2s
}

.engineering-branch-card:hover .branch-arrow {
    transform: translate(3px, -2px)
}

.engineering-safety-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px solid color-mix(in srgb, #e5a94b 35%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, #e5a94b 7%, var(--surface));
    color: var(--muted)
}

.engineering-safety-note>span {
    font-size: 18px;
    color: #c88a25;
    line-height: 1.3
}

.engineering-safety-note p {
    font-size: 11px;
    line-height: 1.7;
    margin: 0
}

.engineering-safety-note b {
    color: var(--text)
}

@media(max-width:950px) {
    .engineering-branch-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .engineering-hub-intro {
        grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
        gap: 20px
    }

    .engineering-visual-card {
        height: 270px
    }
}

@media(max-width:700px) {
    .engineering-hub-section {
        padding: 26px 0 40px
    }

    .engineering-hub-panel {
        padding: 23px 18px;
        border-radius: 23px
    }

    .engineering-hub-intro {
        grid-template-columns: 1fr;
        padding: 22px 0 24px
    }

    .engineering-hub-copy h2 {
        font-size: 36px
    }

    .engineering-hub-copy p {
        font-size: 13px
    }

    .engineering-visual-card {
        height: 245px
    }

    .engineering-hub-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 17px
    }

    .engineering-hub-metrics>div:nth-child(3) {
        padding-left: 0;
        border-left: 0
    }

    .engineering-branches-head {
        align-items: flex-start;
        margin-top: 32px
    }

    .engineering-branch-note {
        display: none
    }

    .engineering-branch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .engineering-branch-card {
        padding: 14px;
        min-height: 174px;
        border-radius: 16px
    }

    .engineering-branch-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 11px
    }

    .engineering-branch-card strong {
        font-size: 12px
    }

    .engineering-branch-card p {
        font-size: 10px
    }

    .engineering-branch-bottom {
        font-size: 9px
    }
}

@media(max-width:390px) {
    .engineering-branch-grid {
        grid-template-columns: 1fr
    }

    .engineering-branch-card {
        min-height: 145px
    }

    .engineering-float {
        padding: 8px
    }

    .engineering-float-a {
        left: 8px
    }

    .engineering-float-b {
        right: 8px
    }

    .engineering-float-c {
        left: 10px
    }
}

.category-section {
    padding: 64px 0 52px;
    scroll-margin-top: 90px
}

.category-section .section-head {
    margin-bottom: 24px
}

.category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 178px;
    cursor: pointer;
    color: var(--text);
    text-align: left;
    transition: transform .2s, border-color .2s, box-shadow .2s
}

.category-card:hover,
.category-card:focus-visible {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
    box-shadow: var(--shadow);
    outline: none
}

.category-card .cat-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    font-size: 22px;
    margin-bottom: 13px
}

.category-card b {
    font-size: 14px;
    line-height: 1.4
}

.category-card small {
    font-size: 11px;
    line-height: 1.55;
    margin-top: 5px
}

.category-card-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    padding-top: 15px;
    font-size: 10px;
    font-weight: 800;
    color: var(--brand)
}

.category-card-count strong {
    font-size: 16px;
    transition: transform .2s
}

.category-card:hover .category-card-count strong {
    transform: translate(3px, -2px)
}

.tools-section {
    scroll-margin-top: 90px
}

.tools-section .section-head {
    align-items: flex-end
}

@media(max-width:950px) {
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:650px) {
    .category-section {
        padding: 42px 0 34px
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .category-card {
        padding: 16px;
        min-height: 168px
    }

    .category-card b {
        font-size: 13px
    }

    .category-card small {
        font-size: 10px
    }
}

.tool-results-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: clamp(10px, 2.5vw, 28px);
    isolation: isolate
}

.tool-results-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(8, 13, 31, .68);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    animation: resultsFadeIn .22s ease both
}

.tool-results-panel {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: min(88vh, 900px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(20px, 3vw, 38px);
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    border-radius: 28px;
    background: var(--bg);
    box-shadow: 0 32px 100px rgba(0, 0, 0, .32);
    animation: resultsPanelIn .28s cubic-bezier(.2, .8, .2, 1) both
}

.tool-results-panel .section-head {
    padding-right: 38px;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 18px
}

.tool-results-panel .section-head h2 {
    font-size: clamp(26px, 3vw, 38px);
    margin: 8px 0 7px
}

.tool-results-panel .section-head p {
    max-width: 560px;
    line-height: 1.6
}

.tool-results-close {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-size: 27px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease
}

.tool-results-close:hover {
    transform: rotate(90deg);
    background: var(--surface2);
    border-color: var(--brand)
}

.tool-results-panel .tool-controls {
    margin-top: 0;
    padding-top: 0;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap
}

.tool-results-panel .search-box {
    min-width: min(260px, 100%)
}

.tool-results-panel .tool-grid {
    padding-bottom: 8px
}

.tool-results-panel .tool-card {
    animation: toolCardIn .32s ease both;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease
}

.tool-results-panel .tool-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 18px 38px rgba(55, 65, 120, .12)
}

.tool-results-panel .empty {
    padding: 44px 18px
}

@keyframes resultsFadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes resultsPanelIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.985)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes toolCardIn {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@media(max-width:700px) {
    .tool-results-overlay {
        padding: 0;
        align-items: end
    }

    .tool-results-panel {
        width: 100%;
        max-height: 93dvh;
        padding: 25px 15px 18px;
        border-radius: 25px 25px 0 0;
        border-bottom: 0;
        animation: resultsPanelMobile .28s cubic-bezier(.2, .8, .2, 1) both
    }

    .tool-results-close {
        right: 13px;
        top: 13px;
        width: 38px;
        height: 38px;
        border-radius: 12px
    }

    .tool-results-panel .section-head {
        display: block;
        padding-right: 34px;
        margin-bottom: 18px
    }

    .tool-results-panel .section-head h2 {
        font-size: 27px
    }

    .tool-results-panel .tool-controls {
        margin-top: 17px;
        justify-content: flex-start
    }

    .tool-results-panel .search-box {
        width: 100%;
        min-width: 100%
    }

    .tool-results-panel .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .tool-results-panel .tool-card {
        padding: 14px;
        min-height: 170px
    }

    .tool-results-panel .tool-card h3 {
        font-size: 13px
    }

    .tool-results-panel .tool-card p {
        font-size: 11px
    }
}

@keyframes resultsPanelMobile {
    from {
        opacity: 0;
        transform: translateY(28px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@media(max-width:380px) {
    .tool-results-panel .tool-grid {
        grid-template-columns: 1fr
    }

    .tool-results-panel .tool-card {
        min-height: 140px
    }
}

@media(prefers-reduced-motion:reduce) {

    .tool-results-backdrop,
    .tool-results-panel,
    .tool-results-panel .tool-card {
        animation: none !important;
        transition: none !important
    }
}

.tool-results-overlay.hidden {
    display: none !important
}

.helpful-guide {
    border-top: 1px solid var(--line)
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px
}

.guide-card,
.guide-notice,
.guide-faq {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface)
}

.guide-card h3,
.guide-notice h3,
.guide-faq h3 {
    margin: 0 0 10px;
    font-size: 17px
}

.guide-card p,
.guide-notice p,
.guide-faq details p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px
}

.guide-card p:last-child,
.guide-notice p:last-child,
.guide-faq details p:last-child {
    margin-bottom: 0
}

.guide-card .guide-example {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg, rgba(120, 130, 160, .08));
    color: var(--text)
}

.guide-notice,
.guide-faq {
    margin-top: 16px
}

.guide-notice a,
.guide-faq a {
    color: var(--accent, #5b5cf0);
    text-underline-offset: 3px
}

.guide-faq details {
    padding: 14px 0;
    border-top: 1px solid var(--line)
}

.guide-faq details:first-of-type {
    margin-top: 8px
}

.guide-faq summary {
    cursor: pointer;
    font-weight: 650;
    line-height: 1.5
}

.guide-faq details p {
    margin: 9px 0 0
}

@media (max-width:700px) {
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 12px
    }

    .guide-card,
    .guide-notice,
    .guide-faq {
        padding: 18px
    }
}

@supports (content-visibility:auto) {

    .features-section,
    .helpful-guide,
    #about,
    .cta {
        content-visibility: auto;
        contain-intrinsic-size: auto 520px
    }
}

/* Accessibility contrast improvements */
.preview-search {
    color: #475569
}

body.dark .preview-search {
    color: #cbd5e1
}

.ad-slot {
    color: #64748b
}

body.dark .ad-slot {
    color: #cbd5e1
}

footer .footer-columns a {
    color: #cbd5e1
}

footer .footer-columns a:hover,
footer .footer-columns a:focus-visible {
    color: #fff
}

/* Final UI polish: clear focus, refined micro-interactions and motion preferences */
:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 78%, white);
    outline-offset: 3px;
}

button,
.primary-btn,
.nav-btn,
.category-card,
.engineering-branch-card,
.tool-card,
.feature-grid article,
.guide-card,
.preview-tool,
.footer-columns a {
    -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
.primary-btn,
.nav-btn {
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

button:not(:disabled):active,
.primary-btn:active,
.nav-btn:active {
    transform: translateY(1px) scale(.99);
}

.category-card,
.engineering-branch-card,
.tool-card,
.feature-grid article,
.guide-card,
.preview-tool,
.suggest-card {
    transition: transform .24s cubic-bezier(.2, .75, .25, 1), box-shadow .24s ease, border-color .24s ease;
}

@media (hover: hover) and (pointer: fine) {

    .category-card:hover,
    .engineering-branch-card:hover,
    .tool-card:hover,
    .feature-grid article:hover,
    .guide-card:hover {
        transform: translateY(-4px);
        border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
        box-shadow: 0 18px 44px rgba(38, 46, 100, .10);
    }

    body.dark .category-card:hover,
    body.dark .engineering-branch-card:hover,
    body.dark .tool-card:hover,
    body.dark .feature-grid article:hover,
    body.dark .guide-card:hover {
        box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
    }
}

.hero-copy>*,
.hero-visual {
    animation: smarttoolsRiseIn .65s cubic-bezier(.2, .75, .25, 1) both;
}

.hero-copy>*:nth-child(2) {
    animation-delay: .06s;
}

.hero-copy>*:nth-child(3) {
    animation-delay: .12s;
}

.hero-copy>*:nth-child(4) {
    animation-delay: .18s;
}

.hero-copy>*:nth-child(5) {
    animation-delay: .24s;
}

.hero-visual {
    animation-delay: .12s;
}

@keyframes smarttoolsRiseIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-btn {
    flex: 0 0 auto;
    font-size: 19px;
    line-height: 1;
}

.legal-page h2 {
    margin-top: 25px;
}

.legal-page p,
.legal-page li {
    line-height: 1.8;
}

@media (max-width: 760px) {
    .nav nav.mainNav-open {
        animation: smarttoolsMenuIn .18s ease-out both;
    }

    .brand-full-logo {
        width: min(58vw, 290px);
        max-height: 64px;
    }

    .nav {
        gap: 10px;
    }
}

@keyframes smarttoolsMenuIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* SmartTools India refresh: premium surfaces, accessible controls, file utilities */
:root {
    --brand: #6557f5;
    --brand2: #06b6d4;
    --radius: 20px;
    --shadow: 0 20px 60px rgba(24, 32, 70, .10)
}

body {
    background-image: radial-gradient(ellipse at 15% 0%, rgba(101, 87, 245, .075), transparent 38%), radial-gradient(ellipse at 95% 10%, rgba(6, 182, 212, .055), transparent 32%)
}

body.dark {
    --brand: #9387ff;
    --brand2: #42d7e8;
    background-image: radial-gradient(ellipse at 15% 0%, rgba(101, 87, 245, .14), transparent 38%), radial-gradient(ellipse at 95% 10%, rgba(6, 182, 212, .08), transparent 32%)
}

button,
.tool-card,
.category-card,
.primary-btn,
.nav-btn,
.calc-btn {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease
}

.tool-card,
.category-card {
    border-radius: 22px;
    box-shadow: 0 6px 22px rgba(24, 32, 70, .035)
}

.tool-card:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(78, 70, 190, .13);
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line))
}

.primary-btn:hover,
.nav-btn:hover,
.calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(101, 87, 245, .2)
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 70%, white);
    outline-offset: 3px
}

.file-tool-panel {
    display: grid;
    gap: 14px
}

.file-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 150px;
    padding: 24px;
    border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
    text-align: center;
    cursor: pointer
}

.file-drop>span {
    font-size: 28px
}

.file-drop small {
    color: var(--muted);
    max-width: 420px
}

.file-drop input {
    display: block;
    max-width: 100%;
    margin-top: 10px;
    color: var(--muted)
}

.compact-drop {
    min-height: 80px;
    padding: 12px
}

.file-list {
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: var(--surface2);
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere
}

.image-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap
}

.image-preview img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: repeating-conic-gradient(var(--surface2) 0% 25%, var(--surface) 0% 50%) 50%/20px 20px
}

.inline-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px
}

.inline-field input {
    width: 18px;
    height: 18px
}

.serp-preview {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    text-align: left
}

.serp-preview strong {
    display: block;
    color: #1a0dab;
    font-size: 18px;
    font-weight: 500;
    overflow-wrap: anywhere
}

body.dark .serp-preview strong {
    color: #9bb8ff
}

.serp-preview small {
    display: block;
    color: #16803c;
    overflow-wrap: anywhere
}

.serp-preview p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px
}

.tool-guide {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface2)
}

.tool-guide h3 {
    margin-top: 0
}

@media(max-width:640px) {
    .file-drop {
        padding: 16px
    }

    .hero {
        padding-top: 48px
    }

    .tool-card:hover,
    .category-card:hover {
        transform: none
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important
    }
}


/* Premium UI refinement — stable controls and polished surfaces */
:root {
    --brand: #6557f5;
    --brand2: #13b8c8;
    --radius: 22px;
    --shadow: 0 22px 65px rgba(24, 32, 70, .11);
}

body {
    background-image:
        radial-gradient(ellipse at 8% 5%, rgba(101, 87, 245, .075), transparent 32%),
        radial-gradient(ellipse at 95% 24%, rgba(19, 184, 200, .055), transparent 30%);
}

body.dark {
    background-image:
        radial-gradient(ellipse at 8% 5%, rgba(101, 87, 245, .15), transparent 34%),
        radial-gradient(ellipse at 95% 24%, rgba(19, 184, 200, .075), transparent 30%);
}

.hero {
    position: relative;
    overflow: hidden;
    padding-top: clamp(58px, 7vw, 92px);
    padding-bottom: clamp(55px, 6vw, 84px);
}

.hero h1 {
    letter-spacing: -.055em;
    line-height: 1.06;
    text-wrap: balance;
}

.hero p {
    max-width: 620px;
    line-height: 1.8;
}

.tool-card,
.category-card,
.feature-grid article,
.guide-card {
    border-radius: 20px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.tool-card {
    box-shadow: 0 7px 24px rgba(20, 30, 60, .035);
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
}

.tool-card:hover,
.category-card:hover {
    box-shadow: 0 20px 44px rgba(72, 67, 180, .13);
}

.primary-btn,
.calc-btn,
.nav-btn {
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.primary-btn:hover,
.calc-btn:hover,
.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(101, 87, 245, .2);
}

:focus-visible {
    outline: 3px solid rgba(101, 87, 245, .55);
    outline-offset: 3px;
}

/* Theme switch remains reachable while scrolling, without occupying the header */
#themeToggle {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 120;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #6557f5, #8b5cf6 62%, #13b8c8);
    box-shadow: 0 12px 32px rgba(79, 70, 229, .32);
    font-size: 22px;
    line-height: 1;
    backdrop-filter: blur(14px);
    transition: transform .2s ease, box-shadow .2s ease;
}

#themeToggle:hover {
    transform: translateY(-3px) rotate(-4deg);
    box-shadow: 0 16px 38px rgba(79, 70, 229, .4);
}

#themeToggle:active {
    transform: scale(.96);
}

body.dark #themeToggle {
    border-color: rgba(255, 255, 255, .22);
}

/* Keep the tool close control visible while the modal content itself scrolls */
.modal-box {
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.modal-close {
    position: sticky;
    top: 8px;
    float: right;
    z-index: 15;
    margin-top: -8px;
    margin-right: -8px;
    margin-bottom: -35px;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .12);
    border: 1px solid var(--line);
    cursor: pointer;
}

.modal-top {
    clear: none;
}

.qr-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    margin: 15px auto 4px;
}

.qr-download-actions .calc-btn {
    min-width: 145px;
}

.qr-download-actions .qr-secondary {
    color: var(--text);
    background: var(--surface2);
    border: 1px solid var(--line);
}

#qrOutput {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#qrOutput>img {
    max-width: min(100%, 300px);
    height: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .09);
}

@media (max-width: 600px) {
    #themeToggle {
        width: 48px;
        height: 48px;
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        border-radius: 16px;
    }

    .modal {
        padding: 10px;
    }

    .modal-box {
        max-height: 94dvh;
        padding: 20px 17px;
        border-radius: 22px;
    }

    .modal-close {
        margin-right: -5px;
    }

    .qr-download-actions .calc-btn {
        flex: 1 1 130px;
    }
}


/* Editorial guide links: clear, keyboard-accessible paths to topic-specific help. */
.guide-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--accent, #5b5cf0);
    text-decoration: none;
    text-underline-offset: 4px;
}

.guide-read-more:hover,
.guide-read-more:focus-visible {
    text-decoration: underline;
}

.guide-read-more:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 3px;
}

/* AdSense readiness: make each tool's guide link easy to discover. */
.tool-guide-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin: .35rem 0 .15rem;
    color: var(--accent, #5b5cf0);
    font-weight: 700;
    text-underline-offset: 3px
}

.tool-guide-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px
}