@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --navy: #102a44;
    --blue: #183c5b;
    --gold: #c6a05b;
    --ink: #14263a;
    --muted: #718197;
    --edge: #e3e9f0;
    --bg: #f4f6f9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    font: 15px Kanit, Inter, Arial, sans-serif;
    color: var(--ink);
}

a {
    color: inherit;
}

.wrap {
    max-width: 1200px;
    margin: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ======================================================
   HEADER / BRAND
====================================================== */

.top {
    min-height: 70px;
    height: auto;
    background: #fff;
    border-bottom: 1px solid var(--edge);
}

.top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 24px;
}

.brand {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 0;
}

.brand-image {
    display: block;
    width: 112px;
    height: 42px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

.brand-name {
    display: block;
    color: #18344e;
    font: 700 11px/1.35 Inter, sans-serif;
    letter-spacing: 1.15px;
    white-space: nowrap;
}

.brand-name small {
    display: block;
    color: #94a1af;
    font: 500 8px/1.5 Inter, sans-serif;
    margin-top: 3px;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
}

.nav a {
    font-size: 13px;
    text-decoration: none;
    color: #66768a;
    padding: 9px 12px;
    border-radius: 9px;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}

.nav a.active,
.nav a:hover {
    background: #eef3f8;
    color: #14344f;
}

.nav a:last-child {
    color: #173b5a;
    font-weight: 600;
}

.nav a:last-child:hover {
    background: #f3ead7;
    color: #8c692e;
}

/* ======================================================
   HERO
====================================================== */

.hero {
    background: radial-gradient(ellipse at 85% 5%, #2b4b64 0%, transparent 42%), linear-gradient(135deg, #0b2034, #163853);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: "";
    width: 600px;
    height: 600px;
    border: 1px solid #c49c5320;
    border-radius: 50%;
    position: absolute;
    right: -280px;
    top: -300px;
    box-shadow: 0 0 0 80px #c49c5309, 0 0 0 160px #c49c5308;
}

.hero-inside {
    text-align: center;
    position: relative;
    z-index: 1;
    padding-top: 54px;
    padding-bottom: 90px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #ffffff30;
    border-radius: 30px;
    padding: 7px 14px;
    color: #e7c989;
    font: 700 10px Inter, sans-serif;
    letter-spacing: 1.3px;
}

.pulse {
    height: 7px;
    width: 7px;
    border-radius: 50%;
    background: #d7b470;
    box-shadow: 0 0 0 4px #d7b47023;
}

.hero h1 {
    margin: 20px 0 12px;
    font-size: 39px;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: -.4px;
}

.hero h1 span {
    color: #e2c27c;
}

.hero p {
    margin: 0 auto;
    color: #cbd7e3;
    font-size: 14px;
    max-width: 740px;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 27px;
    color: #e1e8ef;
    font-size: 12px;
    flex-wrap: wrap;
}

/* ======================================================
   MAIN TOOL AREA
====================================================== */

.work {
    position: relative;
    margin-top: -50px;
    padding-bottom: 45px;
}













.tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
}

.work-card,
.side-card,
.results,
.seo {
    background: #fff;
    border: 1px solid var(--edge);
    border-radius: 15px;
    box-shadow: 0 6px 22px #0c24300b;
}

.work-card {
    padding: 29px 31px;
}

.step {
    font: 700 10px Inter, sans-serif;
    letter-spacing: 1.4px;
    color: #bf9750;
}

.card-head h2 {
    margin: 9px 0 5px;
    font-size: 25px;
    font-weight: 600;
}

.card-head p {
    color: #7c8998;
    font-size: 13px;
    margin: 0 0 23px;
}

.drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 34px 17px;
    border: 2px dashed #ccd7e2;
    border-radius: 12px;
    background: #f7f9fc;
    cursor: pointer;
    transition: .2s;
    outline: none;
}

.drop:hover,
.drop.drag {
    border-color: #c19d59;
    background: #fdfaf3;
}

.drop:focus-visible {
    outline: 3px solid #cfad6a;
}

.drop-icon {
    width: 57px;
    height: 57px;
    border-radius: 14px;
    background: #e8eff5;
    color: #315675;
    display: grid;
    place-items: center;
    font: 40px Inter, sans-serif;
    margin-bottom: 17px;
}

.drop strong {
    font-size: 15px;
    font-weight: 500;
}

.drop p {
    font-size: 12px;
    color: #8c98a7;
    margin: 5px 0 14px;
}

.drop .pick {
    display: inline-flex;
    background: #173650;
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 12px;
}

.drop small {
    font-size: 11px;
    color: #94a0ad;
    margin-top: 17px;
}

/* ======================================================
   SETTINGS
====================================================== */

.settings {
    padding: 24px 0 12px;
}

.settings-title {
    border-bottom: 1px solid #edf0f4;
    margin-bottom: 17px;
    padding-bottom: 13px;
}

.settings-title span {
    color: #bf9750;
    font: 700 10px Inter, sans-serif;
    letter-spacing: 1.3px;
}

.settings-title h3 {
    margin: 7px 0 0;
    font-size: 17px;
    font-weight: 500;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin: 15px 0 8px;
}

.control {
    width: 100%;
    height: 43px;
    padding: 0 13px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: #fff;
    font: 13px Kanit, sans-serif;
    color: #31445a;
    outline: none;
}

.control:focus {
    border-color: #bc9855;
}

.range-caps {
    display: flex;
    justify-content: space-between;
    color: #9aa4b1;
    font-size: 10px;
}

.hint {
    font-size: 11px;
    color: #95a0ae;
    line-height: 1.65;
}

.settings input[type=range] {
    width: 100%;
    accent-color: #b8924c;
}

.convert {
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 15px 17px;
    background: linear-gradient(95deg, #bb9148, #d0aa61);
    color: #fff;
    font: 600 15px Kanit, sans-serif;
    cursor: pointer;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.convert:disabled {
    background: #c6d0dc;
    cursor: not-allowed;
}

.convert:not(:disabled):hover {
    filter: brightness(.96);
}

.convert span {
    font-size: 20px;
}

/* ======================================================
   SIDEBAR
====================================================== */

.side {
    display: grid;
    gap: 17px;
}

.side-card {
    padding: 24px;
}

.side-icon {
    width: 46px;
    height: 46px;
    background: #f3ead7;
    color: #a27b37;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 28px;
}

.side h3 {
    font-size: 17px;
    font-weight: 500;
    margin: 15px 0 8px;
}

.side p {
    font-size: 12px;
    color: #7e8b9b;
    line-height: 1.9;
}

.divider {
    height: 1px;
    background: #ecf0f4;
    margin: 18px 0;
}

.secure-item {
    font-size: 12px;
    padding: 7px 0;
    color: #5d6e7e;
}

.secure-item span {
    color: #369566;
    margin-right: 9px;
}

.tips ol {
    padding-left: 22px;
    color: #62738a;
    font-size: 12px;
    line-height: 2.6;
}

/* ======================================================
   FILE SUMMARY
====================================================== */

.file-summary {
    margin-top: 13px;
    padding: 14px;
    background: #f7fafc;
    border: 1px solid #e2e9f0;
    border-radius: 9px;
    word-break: break-word;
}

.file-summary h4 {
    margin: 0 0 6px;
    font-size: 12px;
}

.file-summary p {
    margin: 0;
    font-size: 11px;
    color: #687c91;
}

.mini-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 11px;
}

.mini-image {
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    overflow: hidden;
    padding: 6px;
    position: relative;
}

.mini-image img {
    width: 100%;
    height: 85px;
    object-fit: contain;
    background: #f5f7f9;
    border-radius: 5px;
}

.mini-image strong {
    font-size: 10px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.image-buttons button {
    font-size: 10px;
    border: 1px solid #e1e7ed;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    padding: 4px 8px;
}

/* ======================================================
   PROGRESS / ERROR
====================================================== */

.progress {
    padding-top: 18px;
}

.progress-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
}

.bar {
    background: #e8edf2;
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}

.bar span {
    display: block;
    background: linear-gradient(90deg, #bd9550, #dfbd7e);
    height: 100%;
    width: 0;
    transition: width .2s;
}

.error {
    margin-top: 15px;
    padding: 14px;
    border: 1px solid #f1ccca;
    color: #a83c3b;
    background: #fff3f2;
    border-radius: 8px;
    font-size: 12px;
}

/* ======================================================
   RESULTS / SEO / FAQ
====================================================== */

.results {
    margin-top: 22px;
    padding: 25px;
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.results h2 {
    margin: 7px 0 3px;
    font-size: 20px;
}

.results p {
    margin: 0;
    color: #8d99a8;
    font-size: 12px;
}

.download-all,
.result-card button {
    border: 0;
    border-radius: 8px;
    background: #173b5a;
    color: #fff;
    padding: 10px 14px;
    font: 12px Kanit, sans-serif;
    cursor: pointer;
}

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

.result-card {
    border: 1px solid #e5ebf1;
    padding: 10px;
    border-radius: 9px;
    min-width: 0;
}

.result-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #f4f7fa;
    border-radius: 5px;
}

.result-card strong {
    font-size: 11px;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin: 7px 0;
}

.result-card button {
    width: 100%;
}

.seo {
    padding: 29px 31px;
    margin-top: 22px;
}

.seo h2 {
    font-size: 20px;
    margin: 0 0 10px;
}

.seo > p {
    font-size: 13px;
    color: #6b7b8d;
    line-height: 2;
}

.faq {
    margin-top: 20px;
}

.faq h3 {
    font-size: 16px;
}

.faq details {
    padding: 11px 0;
    border-top: 1px solid #edf0f3;
}

.faq summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.faq details p {
    font-size: 12px;
    color: #738296;
    line-height: 1.8;
}

/* ======================================================
   FOOTER
====================================================== */

footer {
    background: #0e2438;
    color: #d4dfe8;
}

.foot {
    padding-top: 29px;
    padding-bottom: 29px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.foot strong {
    font: 700 13px Inter, sans-serif;
    letter-spacing: 1px;
}

.foot small {
    display: block;
    color: #95a9bb;
    margin-top: 6px;
}

.foot a {
    color: #d8bb80;
    text-decoration: none;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.footer-brand img {
    display: block;
    width: 118px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
}

.footer-brand small {
    display: block;
}

.hidden {
    display: none !important;
}

/* ======================================================
   IMAGE TO WEBP
====================================================== */

.webp-tool {
    width: 100%;
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
}

/* Upload area */

.webp-drop {
    width: 100%;
    min-height: 220px;
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed #ccd7e2;
    border-radius: 12px;
    background: #f7f9fc;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
    outline: none;
}

.webp-drop:hover,
.webp-drop.drag {
    border-color: var(--gold);
    background: #fdfaf3;
}

.webp-drop:focus-visible {
    outline: 3px solid #cfad6a;
    outline-offset: 3px;
}

.webp-drop .drop-icon {
    margin-bottom: 15px;
}

.webp-drop strong {
    font-size: 16px;
    font-weight: 500;
}

.webp-drop p {
    margin: 6px 0 15px;
    color: #8c98a7;
    font-size: 12px;
}

.webp-drop .pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #173650;
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 12px;
}

.webp-drop small {
    display: block;
    margin-top: 15px;
    color: #94a0ad;
    font-size: 11px;
}

/* Selected files */

.webp-file-summary {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: #fff;
}

.webp-file-summary.hidden {
    display: none;
}

.webp-file-summary h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 500;
}

.webp-file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.webp-file-item {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--edge);
    border-radius: 10px;
    background: #f8fafc;
}

.webp-file-item img {
    display: block;
    width: 100%;
    height: 90px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}

.webp-file-item strong {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.webp-file-item small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px;
}

/* WebP settings */

.webp-settings {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: #f8fafc;
}

.webp-settings h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 500;
}

.webp-settings label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

#webp-quality {
    display: block;
    width: 100%;
    margin: 16px 0 8px;
    accent-color: var(--gold);
    cursor: pointer;
}

#webp-quality-label {
    color: #a57c35;
    font-weight: 600;
}

/* Action buttons */

.webp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.webp-actions button {
    min-height: 46px;
    padding: 11px 20px;
    border: 0;
    border-radius: 9px;
    font: 500 13px Kanit, sans-serif;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}

.webp-actions button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.webp-convert {
    flex: 1;
    background: linear-gradient(95deg, #bb9148, #d0aa61);
    color: #fff;
}

.webp-convert:not(:disabled):hover {
    filter: brightness(.96);
}

.webp-clear {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--edge) !important;
}

.webp-clear:not(:disabled):hover {
    border-color: var(--gold) !important;
    color: #98702f;
}

/* WebP progress */

.webp-progress {
    margin-top: 22px;
    padding: 18px;
    background: #f7f9fc;
    border: 1px solid var(--edge);
    border-radius: 10px;
}

.webp-progress.hidden {
    display: none;
}

.webp-progress-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 9px;
}

.webp-progress-track {
    height: 9px;
    background: #e5eaf0;
    border-radius: 20px;
    overflow: hidden;
}

.webp-progress-track span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #bd9550, #dfbd7e);
    border-radius: inherit;
    transition: width .2s ease;
}

/* WebP errors */

#webp-error {
    margin-top: 15px;
    padding: 14px;
    border: 1px solid #f1ccca;
    color: #a83c3b;
    background: #fff3f2;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.7;
}

#webp-error.hidden {
    display: none;
}

.webp-error-item {
    grid-column: 1 / -1;
    padding: 12px;
    border-radius: 8px;
    background: #fff4f1;
    color: #a33b2c;
    font-size: 12px;
    overflow-wrap: anywhere;
}

/* WebP results */

.webp-results {
    margin-top: 32px;
    scroll-margin-top: 20px;
}

.webp-results.hidden {
    display: none;
}

.webp-results h2 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 600;
}

.webp-result-info-text {
    color: var(--muted);
    font-size: 12px;
}

.webp-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.webp-summary > div {
    min-width: 0;
    padding: 20px 12px;
    background: #fff;
    border: 1px solid var(--edge);
    border-radius: 12px;
    text-align: center;
}

.webp-summary strong {
    display: block;
    color: var(--navy);
    font-size: 21px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.webp-summary small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.webp-download-all {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.webp-download-all button {
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #173b5a;
    color: #fff;
    font: 12px Kanit, sans-serif;
    cursor: pointer;
    transition: background .2s ease;
}

.webp-download-all button:hover {
    background: var(--blue);
}

.webp-download-all button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.webp-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.webp-result-item {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: #fff;
    min-width: 0;
}

.webp-result-item img {
    display: block;
    width: 100px;
    height: 95px;
    object-fit: contain;
    border-radius: 8px;
    background: #f4f6f9;
}

.webp-result-info {
    min-width: 0;
}

.webp-result-info strong {
    display: block;
    font-size: 13px;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.webp-result-info small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.webp-result-info .webp-saving {
    color: #26754b;
    font-weight: 600;
}

.webp-result-item .webp-download {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-size: 13px;
    transition: background .2s ease;
}

.webp-result-item .webp-download:hover {
    background: var(--blue);
}

/* ======================================================
   RESPONSIVE - TABLET
====================================================== */

@media (max-width: 900px) {

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

    .side {
        grid-template-columns: 1fr 1fr;
    }

    .result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .webp-tool {
        max-width: 100%;
    }

    .webp-result-grid {
        grid-template-columns: 1fr;
    }

}

/* ======================================================
   RESPONSIVE - MOBILE
====================================================== */

@media (max-width: 600px) {

    .wrap {
        padding-left: 14px;
        padding-right: 14px;
    }

    .top {
        height: auto;
    }

    .top-inner {
        min-height: 0;
        padding-top: 8px;
        padding-bottom: 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .brand {
        align-self: flex-start;
        justify-content: flex-start;
        gap: 4px;
    }

    .brand-image {
        width: 100px;
        height: 36px;
    }

    .brand-name {
        font-size: 10px;
    }

    .brand-name small {
        font-size: 7px;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
        align-self: flex-start;
        gap: 2px;
    }

    .nav a {
        padding: 7px 9px;
        font-size: 11px;
    }

    .hero-inside {
        padding-top: 41px;
        padding-bottom: 76px;
    }

    .hero h1 {
        font-size: 27px;
    }

    .hero p {
        font-size: 12px;
    }

    .hero-tags {
        gap: 10px 17px;
    }

    

    

    

    

    

    .work-card {
        padding: 20px 17px;
    }

    .card-head h2 {
        font-size: 22px;
    }

    .side {
        grid-template-columns: 1fr;
    }

    .results {
        padding: 18px;
    }

    .results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-card img {
        height: 115px;
    }

    .seo {
        padding: 20px;
    }

    .foot {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-brand img {
        width: 108px;
        height: 38px;
    }

    .mini-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* WebP mobile */

    .webp-drop {
        min-height: 190px;
        padding: 25px 14px;
    }

    .webp-file-summary {
        padding: 13px;
    }

    .webp-file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .webp-file-item {
        padding: 8px;
    }

    .webp-file-item img {
        height: 80px;
    }

    .webp-settings {
        padding: 16px;
    }

    .webp-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .webp-actions button {
        width: 100%;
    }

    .webp-progress {
        padding: 14px;
    }

    .webp-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .webp-summary > div {
        padding: 13px;
    }

    .webp-summary strong {
        font-size: 18px;
    }

    .webp-download-all {
        justify-content: stretch;
    }

    .webp-download-all button {
        width: 100%;
    }

    .webp-result-item {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .webp-result-item img {
        width: 78px;
        height: 78px;
    }

    .webp-result-info strong {
        font-size: 12px;
    }

}

/* ======================================================
   ACCESSIBILITY / TOUCH
====================================================== */

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ======================================================
   J&P IT SOLUTION — PROFESSIONAL DESIGN SYSTEM
   Responsive refinements for desktop, tablet and mobile
   Existing component classes and JavaScript hooks preserved
====================================================== */

:root {
    color-scheme: light;
    --navy: #102a44;
    --blue: #183c5b;
    --blue-strong: #214d70;
    --gold: #c6a05b;
    --gold-light: #ead9b6;
    --ink: #172b40;
    --muted: #718197;
    --edge: #e3e9f0;
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --success: #27845b;
    --danger: #b64242;
    --radius-sm: 9px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-sm: 0 3px 12px rgba(16, 42, 68, .05);
    --shadow-md: 0 10px 30px rgba(16, 42, 68, .08);
    --shadow-lg: 0 18px 48px rgba(16, 42, 68, .12);
    --content-width: 1200px;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

img {
    height: auto;
}

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

button {
    touch-action: manipulation;
}

.wrap {
    width: min(100% - 48px, var(--content-width));
    padding-left: 0;
    padding-right: 0;
}

.hidden,
[hidden] {
    display: none !important;
}

/* HEADER */

.top {
    position: relative;
    z-index: 20;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(227, 233, 240, .9);
    box-shadow: 0 2px 12px rgba(16, 42, 68, .025);
}

.top-inner {
    min-height: 76px;
}

.brand {
    gap: 9px;
}

.brand-image {
    width: 118px;
    height: 46px;
}

.nav {
    gap: 6px;
}

.nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-weight: 400;
}

.nav a.active {
    background: #edf2f7;
    color: var(--navy);
    font-weight: 600;
}

.nav a:last-child {
    border: 1px solid rgba(198, 160, 91, .3);
    background: #fbf8f1;
}

/* HERO */

.hero {
    isolation: isolate;
    background:
        radial-gradient(circle at 82% 18%, rgba(75, 112, 142, .36), transparent 34%),
        radial-gradient(circle at 12% 100%, rgba(198, 160, 91, .10), transparent 34%),
        linear-gradient(125deg, #0b2034 0%, #153650 58%, #1a405d 100%);
}

.hero:before {
    pointer-events: none;
    opacity: .8;
}

.hero-inside {
    padding-top: clamp(48px, 6vw, 76px);
    padding-bottom: clamp(76px, 8vw, 108px);
}

.pill {
    min-height: 32px;
    background: rgba(255, 255, 255, .045);
    backdrop-filter: blur(8px);
}

.hero h1 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(29px, 4vw, 43px);
    line-height: 1.35;
    letter-spacing: -.5px;
}

.hero p {
    max-width: 760px;
    line-height: 1.9;
}

.hero-tags {
    gap: 12px 26px;
}

/* MAIN LAYOUT */

.work {
    z-index: 2;
    padding-bottom: clamp(34px, 5vw, 58px);
}









.tool-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    align-items: start;
    gap: 24px;
}

.work-card,
.side-card,
.results,
.seo {
    border-color: rgba(222, 230, 238, .95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.work-card {
    padding: clamp(22px, 3vw, 34px);
}

.card-head h2 {
    line-height: 1.4;
    letter-spacing: -.2px;
}

.card-head p {
    line-height: 1.8;
}

/* UPLOAD DROP ZONE */

.drop,
.webp-drop {
    position: relative;
    border-width: 1.5px;
    border-color: #cbd6e1;
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(245, 248, 251, .96));
}

.drop:hover,
.drop.drag,
.webp-drop:hover,
.webp-drop.drag {
    border-color: var(--gold);
    background: linear-gradient(180deg, #fffdf8, #fbf7ee);
    box-shadow: inset 0 0 0 1px rgba(198, 160, 91, .12);
}

.drop-icon {
    box-shadow: 0 5px 15px rgba(49, 86, 117, .08);
}

.drop .pick,
.webp-drop .pick {
    min-height: 42px;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 42, 68, .12);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.drop:hover .pick,
.webp-drop:hover .pick {
    background: #214d70;
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(16, 42, 68, .16);
}

/* SETTINGS AND FORM CONTROLS */

.settings {
    padding-top: 28px;
}

.settings-title {
    border-color: #e9eef3;
}

.control {
    min-height: 46px;
    border-color: #d8e1e9;
    border-radius: var(--radius-sm);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.control:hover {
    border-color: #b9c7d5;
}

.control:focus,
.control:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(198, 160, 91, .14);
}

input[type="range"] {
    accent-color: var(--gold);
}

.convert {
    min-height: 50px;
    border-radius: 10px;
    background: linear-gradient(105deg, #ad8543 0%, #c6a05b 55%, #d5b675 100%);
    box-shadow: 0 7px 16px rgba(173, 133, 67, .18);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.convert:not(:disabled):hover {
    filter: brightness(1.025);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(173, 133, 67, .23);
}

.convert:active:not(:disabled) {
    transform: translateY(0);
}

.convert:disabled {
    box-shadow: none;
}

/* SIDEBAR */

.side {
    gap: 18px;
}

.side-card {
    padding: 24px;
}

.side-icon {
    box-shadow: inset 0 0 0 1px rgba(198, 160, 91, .12);
}

.side p,
.tips ol {
    line-height: 1.9;
}

.secure-item {
    line-height: 1.7;
}

/* FILES AND PREVIEWS */

.file-summary,
.webp-file-summary {
    border-color: #e4eaf0;
    border-radius: var(--radius-md);
    background: #fbfcfd;
}

.mini-image,
.webp-file-item {
    border-color: #e3e9f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.mini-image:hover,
.webp-file-item:hover {
    border-color: #d0b477;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.mini-image img,
.webp-file-item img {
    background: #f6f8fa;
}

.image-buttons button {
    min-height: 30px;
    padding: 5px 9px;
}

/* PROGRESS AND FEEDBACK */

.progress,
.webp-progress {
    border-radius: var(--radius-md);
}

.bar,
.webp-progress-track {
    height: 9px;
    background: #e9eef3;
}

.bar span,
.webp-progress-track span {
    background: linear-gradient(90deg, #b48b49, #d7b979);
}

.error,
#webp-error {
    border-radius: 10px;
    line-height: 1.75;
}

/* RESULTS */

.results,
.seo {
    padding: clamp(20px, 3vw, 30px);
}

.results-head {
    align-items: flex-start;
}

.download-all,
.result-card button,
.webp-download-all button {
    min-height: 42px;
    border-radius: 9px;
    background: linear-gradient(110deg, #102a44, #214d70);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.download-all:hover,
.result-card button:hover,
.webp-download-all button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 42, 68, .16);
}

.result-card {
    border-color: #e4eaf0;
    border-radius: 11px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.result-card:hover {
    border-color: #d4bd8d;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.result-card img {
    border-radius: 7px;
    background: #f7f9fb;
}

.seo {
    line-height: 1.9;
}

.seo h2 {
    line-height: 1.45;
}

.seo > p {
    line-height: 2;
}

.faq details {
    padding: 15px 0;
}

.faq summary {
    line-height: 1.7;
}

.faq details p {
    margin-bottom: 0;
    line-height: 1.9;
}

/* IMAGE TO WEBP */

.webp-tool {
    max-width: 100%;
}

.webp-drop {
    min-height: 235px;
}

.webp-settings {
    border-color: #e3e9f0;
    border-radius: var(--radius-md);
    background: #fbfcfd;
}

.webp-settings h3 {
    line-height: 1.5;
}

.webp-actions button {
    min-height: 48px;
    border-radius: 10px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.webp-convert {
    background: linear-gradient(105deg, #ad8543 0%, #c6a05b 55%, #d5b675 100%);
    box-shadow: 0 7px 16px rgba(173, 133, 67, .16);
}

.webp-convert:not(:disabled):hover {
    filter: brightness(1.025);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(173, 133, 67, .2);
}

.webp-clear {
    border-color: #dce4eb !important;
}

.webp-clear:not(:disabled):hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.webp-summary > div {
    border-color: #e4eaf0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.webp-result-item {
    border-color: #e3e9f0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.webp-result-item:hover {
    border-color: #d4bd8d;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.webp-result-item img {
    background: #f6f8fa;
}

.webp-result-item .webp-download {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(110deg, #102a44, #214d70);
}

/* PROFESSIONAL FOOTER — supports the current includes/footer.php */

.site-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: clamp(32px, 5vw, 56px);
    border-top: 3px solid var(--gold);
    background:
        radial-gradient(circle at 90% 0%, rgba(56, 91, 120, .28), transparent 32%),
        linear-gradient(135deg, #0b2034 0%, #102a44 58%, #163853 100%);
    color: #d5e0e9;
}

.site-footer::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e1c17f, transparent);
    opacity: .65;
}

.site-footer .footer-main {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1.4fr;
    gap: clamp(22px, 3vw, 38px);
    padding-top: clamp(36px, 4vw, 50px);
    padding-bottom: clamp(30px, 4vw, 44px);
}

.site-footer .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.site-footer .footer-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-footer .footer-logo img {
    display: block;
    width: 150px;
    height: 48px;
    object-fit: contain;
    object-position: left center;
}

.site-footer .footer-description {
    margin: 0;
    color: #aebdcc;
    font-size: 12px;
    line-height: 1.9;
}

.site-footer .footer-column {
    min-width: 0;
}

.site-footer .footer-column h3 {
    position: relative;
    margin: 3px 0 18px;
    padding-bottom: 11px;
    color: #e4c785;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.site-footer .footer-column h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 34px;
    height: 2px;
    border-radius: 5px;
    background: var(--gold);
}

.site-footer .footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-column li {
    margin: 0 0 10px;
}

.site-footer .footer-column a {
    display: inline-block;
    color: #b8c6d3;
    font-size: 12px;
    line-height: 1.7;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.site-footer .footer-column a:hover {
    color: #e4c785;
    transform: translateX(3px);
}

.site-footer .footer-about p {
    margin: 0;
    color: #aebdcc;
    font-size: 12px;
    line-height: 1.95;
}

.site-footer .footer-bottom {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, .10);
    color: #93a6b8;
    font-size: 11px;
}

.site-footer .footer-tagline {
    color: #d0b477;
    letter-spacing: .35px;
}

/* Legacy footer markup remains supported */

footer:not(.site-footer) {
    background: #0e2438;
    color: #d4dfe8;
}

footer:not(.site-footer) .foot {
    min-height: 92px;
    padding-top: 22px;
    padding-bottom: 22px;
}

/* RESPONSIVE: LARGE TABLETS AND SMALL LAPTOPS */

@media (max-width: 1024px) {
    .wrap {
        width: min(100% - 40px, var(--content-width));
    }

    .tool-grid {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 18px;
    }

    .work-card {
        padding: 25px;
    }

    .site-footer .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 36px;
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
    }
}

/* RESPONSIVE: TABLETS */

@media (max-width: 800px) {
    .top-inner {
        gap: 14px;
    }

    .nav {
        gap: 3px;
    }

    .nav a {
        padding: 8px 10px;
        font-size: 12px;
    }

    .hero-inside {
        padding-top: 48px;
        padding-bottom: 82px;
    }

    .tool-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .webp-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* RESPONSIVE: MOBILE */

@media (max-width: 600px) {
    .wrap {
        width: calc(100% - 28px);
        padding-left: 0;
        padding-right: 0;
    }

    .top-inner {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .brand {
        align-self: flex-start;
    }

    .brand-image {
        width: 104px;
        height: 38px;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 0 5px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .nav a {
        flex: 0 0 auto;
        min-height: 36px;
        padding: 7px 10px;
        font-size: 11px;
    }

    .hero-inside {
        padding-top: 38px;
        padding-bottom: 70px;
    }

    .hero h1 {
        font-size: clamp(25px, 7vw, 32px);
        line-height: 1.4;
    }

    .hero p {
        font-size: 12px;
        line-height: 1.85;
    }

    .hero-tags {
        gap: 8px 15px;
        margin-top: 20px;
        font-size: 11px;
    }

    .work {
        margin-top: -38px;
    }

    

    

    

    

    

    .work-card {
        padding: 19px 15px;
        border-radius: 14px;
    }

    .card-head h2 {
        font-size: 21px;
    }

    .card-head p {
        font-size: 12px;
        margin-bottom: 18px;
    }

    .drop {
        padding: 26px 13px;
    }

    .drop-icon {
        width: 51px;
        height: 51px;
        font-size: 34px;
    }

    .drop strong {
        font-size: 14px;
    }

    .side {
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
    }

    .side-card {
        padding: 19px;
    }

    .settings {
        padding-top: 20px;
    }

    .convert {
        min-height: 48px;
    }

    .results,
    .seo {
        margin-top: 16px;
        padding: 17px 15px;
        border-radius: 14px;
    }

    .results-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .download-all {
        width: 100%;
    }

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

    .result-card {
        padding: 8px;
    }

    .result-card img {
        height: 112px;
    }

    .seo h2 {
        font-size: 18px;
    }

    .seo > p {
        font-size: 12px;
    }

    .faq summary {
        font-size: 12px;
    }

    .mini-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* WEBP */

    .webp-drop {
        min-height: 190px;
        padding: 23px 12px;
    }

    .webp-file-summary {
        padding: 13px;
    }

    .webp-file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .webp-file-item {
        padding: 8px;
    }

    .webp-file-item img {
        height: 78px;
    }

    .webp-settings {
        margin-top: 18px;
        padding: 15px;
    }

    .webp-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .webp-actions button {
        width: 100%;
    }

    .webp-summary {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 8px;
    }

    .webp-summary > div {
        padding: 12px;
    }

    .webp-summary strong {
        font-size: 18px;
    }

    .webp-download-all {
        justify-content: stretch;
    }

    .webp-download-all button {
        width: 100%;
    }

    .webp-result-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .webp-result-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .webp-result-item img {
        width: 76px;
        height: 76px;
    }

    .webp-result-info strong {
        font-size: 12px;
    }

    /* FOOTER */

    .site-footer {
        margin-top: 30px;
    }

    .site-footer .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px 16px;
        padding-top: 30px;
        padding-bottom: 25px;
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
    }

    .site-footer .footer-logo img {
        width: 135px;
        height: 43px;
    }

    .site-footer .footer-column h3 {
        margin-bottom: 13px;
        font-size: 12px;
    }

    .site-footer .footer-column a,
    .site-footer .footer-about p {
        font-size: 11px;
    }

    .site-footer .footer-bottom {
        min-height: 64px;
        padding-top: 12px;
        padding-bottom: 12px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        text-align: center;
        font-size: 10px;
    }

    footer:not(.site-footer) .foot {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    footer:not(.site-footer) .footer-brand {
        align-items: center;
    }
}

/* RESPONSIVE: VERY SMALL PHONES */

@media (max-width: 380px) {
    .wrap {
        width: calc(100% - 24px);
    }

    .hero h1 {
        font-size: 25px;
    }

    

    

    .result-card img {
        height: 95px;
    }

    .site-footer .footer-main {
        column-gap: 12px;
    }

    .site-footer .footer-column h3 {
        font-size: 11px;
    }
}

/* ACCESSIBILITY AND MOTION */

:focus-visible {
    outline: 3px solid rgba(198, 160, 91, .72);
    outline-offset: 3px;
}

@media (hover: none) {
    .nav a:hover,
    .footer-column a:hover,
    .result-card:hover,
    .webp-result-item:hover {
        transform: none;
    }
}

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

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



/* ======================================================
   MOBILE WIDTH FIX — 360PX SCREENS
   Prevent page-level horizontal scrolling on small phones.
   Existing component and JavaScript hooks are preserved.
====================================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.wrap {
    width: min(100% - 32px, var(--content-width));
    min-width: 0;
}

.top,
.top-inner,
.hero,
.hero-inside,
.work,
.tool-grid,
.work-card,
.side,
.side-card,
.results,
.seo,
.webp-tool,
.webp-file-summary,
.webp-settings,
.webp-results,
.site-footer,
.site-footer .footer-main,
.site-footer .footer-bottom {
    min-width: 0;
    max-width: 100%;
}

.tool-grid > *,
.side > *,
.result-grid > *,
.webp-file-list > *,
.webp-summary > *,
.webp-result-grid > *,
.site-footer .footer-main > * {
    min-width: 0;
}

.nav {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
}

.nav a {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}





input,
select,
textarea,
button {
    max-width: 100%;
}

pre,
code,
table {
    max-width: 100%;
}

@media (max-width: 600px) {
    .wrap {
        width: calc(100% - 24px);
        max-width: 100%;
    }

    .top-inner {
        width: 100%;
    }

    .nav {
        width: 100%;
        flex-wrap: wrap;
        overflow: visible;
        padding-bottom: 0;
    }

    .nav a {
        flex: 0 1 auto;
        padding: 7px 8px;
        font-size: 11px;
    }

    .tool-grid,
    .side,
    .result-grid,
    .webp-file-list,
    .webp-summary,
    .webp-result-grid,
    .site-footer .footer-main {
        grid-template-columns: minmax(0, 1fr);
    }

    

    .results-head,
    .webp-progress-line {
        min-width: 0;
        flex-wrap: wrap;
    }

    .result-card,
    .webp-result-item,
    .webp-file-item,
    .mini-image {
        min-width: 0;
        max-width: 100%;
    }

    .webp-result-item {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .webp-result-item img {
        width: 68px;
        max-width: 100%;
    }

    .site-footer .footer-main {
        gap: 22px;
    }

    .site-footer .footer-brand {
        grid-column: auto;
    }

    .site-footer .footer-bottom {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 380px) {
    .wrap {
        width: calc(100% - 20px);
    }

    .work-card,
    .results,
    .seo,
    .side-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero h1 {
        overflow-wrap: anywhere;
    }

    

    

    

    .site-footer .footer-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-footer .footer-brand {
        grid-column: auto;
    }
}


/* ======================================================
   FINAL MOBILE OVERFLOW GUARD — 360PX AND SMALLER
   Prevent horizontal page scrolling without hiding
   or clipping the actual content inside tool components.
====================================================== */

@media screen and (max-width: 600px) {
    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    @supports (overflow: clip) {
        html,
        body {
            overflow-x: clip !important;
        }
    }

    body {
        position: relative;
    }

    /* Prevent flex/grid children from forcing the page wider. */
    .top-inner,
    .brand,
    .nav,
    .hero-inside,
    .work,
    .tabs,
    .tab,
    .tool-grid,
    .work-card,
    .side,
    .side-card,
    .results,
    .results-head,
    .result-grid,
    .result-card,
    .seo,
    .webp-tool,
    .webp-file-summary,
    .webp-file-list,
    .webp-file-item,
    .webp-settings,
    .webp-actions,
    .webp-progress,
    .webp-progress-line,
    .webp-results,
    .webp-summary,
    .webp-result-grid,
    .webp-result-item,
    .webp-result-info,
    .site-footer,
    .site-footer .footer-main,
    .site-footer .footer-column,
    .site-footer .footer-bottom {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* The navigation must wrap; it must not become a swipeable row. */
    .nav {
        display: flex;
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-start;
        overflow: visible !important;
        white-space: normal !important;
    }

    .nav a {
        flex: 0 1 auto !important;
        max-width: 100%;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    /* Keep wide media and long text within their parent. */
    img,
    svg,
    video,
    canvas,
    iframe,
    pre,
    table {
        max-width: 100% !important;
    }

    .hero h1,
    .hero p,
    .card-head,
    .card-head h2,
    .card-head p,
    .seo,
    .seo p,
    .faq summary,
    .faq details p,
    .site-footer,
    .site-footer * {
        overflow-wrap: anywhere;
    }

    /* Avoid fixed-width result rows extending beyond the viewport. */
    .webp-result-item {
        grid-template-columns: 64px minmax(0, 1fr) !important;
    }

    .webp-result-item img {
        width: 64px !important;
        max-width: 100% !important;
    }

    .site-footer .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 380px) {
    .wrap {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
    }

    .site-footer .footer-main {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .site-footer .footer-brand {
        grid-column: auto !important;
    }

    

    
}

/* ======================================================
   RESPONSIVE SYSTEM — ALL DEVICES
   Fluid layout for phones, tablets, laptops and desktops.
   This layer supersedes earlier device-specific overrides.
====================================================== */

/* Fluid foundations */
:root {
    --page-gutter: clamp(12px, 3.2vw, 32px);
    --section-space: clamp(18px, 3vw, 32px);
    --card-space: clamp(15px, 2.8vw, 30px);
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    scroll-padding-top: 16px;
}

body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

.wrap {
    width: min(calc(100% - (var(--page-gutter) * 2)), 1200px);
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 0;
}

main,
header,
footer,
section,
article,
aside,
nav {
    min-width: 0;
}

.tool-grid > *,
.side > *,
.footer-main > *,
.result-grid > *,
.webp-result-grid > *,
.webp-file-list > * {
    min-width: 0;
}

img,
picture,
video,
canvas,
svg,
iframe {
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

/* Wide desktop: keep content balanced rather than stretched */
@media (min-width: 1440px) {
    .wrap {
        width: min(calc(100% - 64px), 1240px);
    }

    .tool-grid {
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 28px;
    }

    .hero-inside {
        padding-top: 78px;
        padding-bottom: 112px;
    }
}

/* Standard desktop and laptop */
@media (min-width: 1025px) {
    .tool-grid {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
        align-items: start;
    }

    .side {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-main,
    .site-footer .footer-main {
        grid-template-columns: 1.25fr 1fr 1fr 1.4fr;
    }
}

/* Tablet landscape, small laptops */
@media (min-width: 801px) and (max-width: 1024px) {
    .wrap {
        width: calc(100% - 40px);
    }

    .top-inner {
        gap: 14px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .nav a {
        padding-inline: 9px;
    }

    .tool-grid {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 18px;
    }

    .work-card {
        padding: 24px;
    }

    .result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .webp-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-main,
    .site-footer .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Tablet portrait and large phones */
@media (min-width: 601px) and (max-width: 800px) {
    .wrap {
        width: calc(100% - 36px);
    }

    .top-inner {
        min-height: 0;
        padding-block: 12px;
        align-items: center;
        flex-wrap: wrap;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hero-inside {
        padding: 48px 0 82px;
    }

    .hero h1 {
        font-size: clamp(28px, 5vw, 38px);
    }

    .tool-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .webp-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-main,
    .site-footer .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Phones */
@media (max-width: 600px) {
    .wrap {
        width: calc(100% - 28px);
    }

    .top-inner {
        min-height: 0;
        padding-block: 10px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .brand {
        max-width: 100%;
    }

    .brand-image {
        width: clamp(88px, 25vw, 108px);
        height: 38px;
    }

    .nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px;
        overflow: visible;
    }

    .nav a {
        flex: 0 1 auto;
        min-height: 35px;
        padding: 6px 9px;
        white-space: normal;
        overflow-wrap: anywhere;
        font-size: 11px;
    }

    .hero-inside {
        padding: 38px 0 68px;
    }

    .hero h1 {
        font-size: clamp(25px, 6.5vw, 32px);
        line-height: 1.4;
    }

    .hero p {
        font-size: 12px;
        line-height: 1.85;
    }

    .hero-tags {
        flex-wrap: wrap;
        gap: 8px 14px;
    }

    .work {
        margin-top: -36px;
    }

    

    

    

    .work-card {
        padding: var(--card-space);
    }

    .tool-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .side {
        grid-template-columns: minmax(0, 1fr);
    }

    .drop,
    .webp-drop {
        min-height: 180px;
        padding: 24px 12px;
    }

    .control {
        width: 100%;
        min-width: 0;
    }

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

    .result-card {
        min-width: 0;
        padding: 8px;
    }

    .result-card img {
        height: clamp(85px, 27vw, 120px);
    }

    .results-head {
        flex-direction: column;
        align-items: stretch;
    }

    .download-all {
        width: 100%;
    }

    .webp-file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .webp-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .webp-actions button {
        width: 100%;
    }

    .webp-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .webp-summary > div {
        min-width: 0;
        padding: 12px 6px;
    }

    .webp-summary strong {
        font-size: clamp(15px, 4vw, 19px);
        overflow-wrap: anywhere;
    }

    .webp-result-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .webp-result-item {
        grid-template-columns: clamp(64px, 19vw, 84px) minmax(0, 1fr);
    }

    .webp-result-item img {
        width: 100%;
        height: clamp(64px, 19vw, 84px);
    }

    .site-footer .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
    }

    .site-footer .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 5px;
        padding-block: 13px;
    }

    .foot {
        flex-wrap: wrap;
    }
}

/* Compact phones */
@media (max-width: 380px) {
    .wrap {
        width: calc(100% - 22px);
    }

    .hero h1 {
        font-size: clamp(23px, 7vw, 27px);
    }

    

    

    

    

    .webp-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-footer .footer-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-footer .footer-brand {
        grid-column: auto;
    }
}

/* Very narrow screens */
@media (max-width: 340px) {
    .wrap {
        width: calc(100% - 18px);
    }

    .work-card {
        padding: 13px 10px;
    }

    .card-head h2 {
        font-size: 18px;
    }

    .drop strong,
    .webp-drop strong {
        font-size: 13px;
    }

    .result-grid,
    .webp-file-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .result-card img {
        height: 150px;
    }

    .webp-result-item {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .webp-result-item img {
        height: 58px;
    }
}

/* Short landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-inside {
        padding-top: 24px;
        padding-bottom: 58px;
    }

    .hero h1 {
        margin-top: 12px;
        font-size: clamp(24px, 4vw, 32px);
    }

    .top-inner {
        min-height: 58px;
    }

    .drop,
    .webp-drop {
        min-height: 150px;
    }
}

/* Touch devices: preserve comfortable tap targets */
@media (hover: none) and (pointer: coarse) {
    .nav a,
    .webp-actions button,
    .convert,
    .download-all,
    .result-card button,
    .webp-download-all button,
    .image-buttons button {
        min-height: 40px;
    }
}

/* Avoid accidental horizontal overflow from long filenames/content */
.file-summary,
.file-summary *,
.webp-file-summary,
.webp-file-summary *,
.webp-result-info,
.webp-result-info *,
.result-card,
.result-card *,
.seo,
.seo *,
.footer-column,
.footer-column * {
    overflow-wrap: anywhere;
}



/* PDF utility support styles */
.pdfu-file-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    border:1px solid var(--edge);
    border-radius:10px;
    background:#fff;
    margin-top:8px;
    overflow-wrap:anywhere;
}
.pdfu-file-row strong {font-size:14px;font-weight:600}
.pdfu-file-row span {color:var(--muted);font-size:13px;white-space:nowrap}
#pdfu-pages {width:100%;margin:8px 0}
#pdfu-result {margin-top:22px}
#pdfu-download {display:inline-flex;align-items:center;justify-content:center;text-decoration:none;margin-top:12px}

@media(max-width:700px) {
    .pdfu-file-row {align-items:flex-start;flex-direction:column;gap:4px}
}
















/* Tablet */
@media (min-width: 601px) and (max-width: 900px) {
    
}

/* Mobile */
@media (max-width: 600px) {
    

    

    

    

    
}


/* ======================================================
   UNIFIED TOOL NAVIGATION — 19 TOOLS
   One source of truth for .tabs / .all-tool-tabs.
   No !important overrides; works with full-tool-menu.css.
   ====================================================== */
.tabs,
.tabs.all-tool-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 12px;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-md);
}
/* Neutral default for every tool; visited links must not look active. */
.tabs.all-tool-tabs .tab,
.tabs.all-tool-tabs .tab:visited {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 9px;
    min-width: 0;
    min-height: 68px;
    width: 100%;
    padding: 11px 10px;
    border: 1px solid #e3e9f0;
    border-radius: 10px;
    background: #ffffff;
    color: #526579;
    text-align: left;
    text-decoration: none;
    overflow-wrap: break-word;
    box-shadow: none;
    transition: background .2s ease, border-color .2s ease;
}
/* Hover is distinct from the current page. */
@media (hover: hover) {
    .tabs.all-tool-tabs .tab:hover:not([aria-current="page"]) {
        background: #f3f6f9;
        border-color: #cbd5e1;
        color: #263d51;
    }
}
/* Only the PHP-assigned current URL is highlighted. */
.tabs.all-tool-tabs .tab[aria-current="page"],
.tabs.all-tool-tabs .tab[aria-current="page"]:visited,
.tabs.all-tool-tabs .tab[aria-current="page"]:hover {
    background: #e8f2fb;
    border-color: #93b8d7;
    color: #173b5a;
    box-shadow: inset 0 0 0 1px rgba(36, 91, 134, .08);
}
.tabs.all-tool-tabs .tab[aria-current="page"] strong { color: #173b5a; }
.tabs.all-tool-tabs .tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tabs .tab .tab-icon {
    flex: 0 0 28px;
    width: 28px;
    text-align: center;
    font-size: 23px;
    line-height: 1.25;
    color: #b48c4e;
}
.tabs .tab strong,
.tabs .tab small {
    display: block;
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.45;
}
.tabs .tab strong { font: 600 13px/1.45 Kanit, Inter, Arial, sans-serif; }
.tabs .tab small { margin-top: 3px; font-size: 11px; color: #718197; }
@media (max-width: 1250px) {
    .tabs, .tabs.all-tool-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .tabs, .tabs.all-tool-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .tabs, .tabs.all-tool-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 7px;
        margin-bottom: 18px;
    }
    .tabs .tab { min-height: 60px; padding: 9px 7px; gap: 6px; }
    .tabs .tab .tab-icon { flex-basis: 22px; width: 22px; font-size: 19px; }
    .tabs .tab strong { font-size: 12px; }
    .tabs .tab small { font-size: 10px; }
}
@media (max-width: 380px) {
    .tabs, .tabs.all-tool-tabs { gap: 5px; padding: 6px; }
    .tabs .tab { padding: 8px 6px; }
    .tabs .tab strong { font-size: 11px; }
}
