
/* ImgConvert.in V2 — Design Foundation
   Step 1: typography, colors, layout, buttons, cards, tables and article basics.
   Lightweight: no framework, no jQuery, no external CSS dependency.
*/

:root {
    --ic-primary: #2457d6;
    --ic-primary-dark: #1745b7;
    --ic-primary-soft: #eef4ff;

    --ic-text: #111827;
    --ic-text-soft: #4b5563;
    --ic-muted: #6b7280;

    --ic-bg: #ffffff;
    --ic-surface: #f8fafc;
    --ic-border: #e5e7eb;
    --ic-border-soft: #edf0f4;

    --ic-success: #16803c;
    --ic-success-bg: #f0fdf4;
    --ic-warning: #b45309;
    --ic-warning-bg: #fffbeb;
    --ic-danger: #c2410c;
    --ic-danger-bg: #fff7ed;

    --ic-radius-sm: 8px;
    --ic-radius: 12px;
    --ic-radius-lg: 16px;

    --ic-shadow-sm: 0 2px 10px rgba(15, 23, 42, .05);
    --ic-shadow: 0 8px 30px rgba(15, 23, 42, .07);

    --ic-container: 1180px;
    --ic-reading: 790px;

    --ic-space-1: 4px;
    --ic-space-2: 8px;
    --ic-space-3: 12px;
    --ic-space-4: 16px;
    --ic-space-5: 20px;
    --ic-space-6: 24px;
    --ic-space-7: 32px;
    --ic-space-8: 40px;
    --ic-space-9: 48px;
    --ic-space-10: 64px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ic-bg);
    color: var(--ic-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--ic-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

:focus-visible {
    outline: 3px solid rgba(36, 87, 214, .35);
    outline-offset: 3px;
}

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

.ic-breadcrumbs {
    padding: 18px 0 10px;
    color: var(--ic-muted);
    font-size: 13px;
}

.ic-breadcrumbs a {
    color: var(--ic-primary);
}

.ic-breadcrumbs .sep {
    margin: 0 7px;
    color: #a1a8b3;
}

.ic-article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}

.ic-article {
    min-width: 0;
}

.ic-article-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    gap: 32px;
    align-items: center;
    padding: 28px 0 20px;
}

.ic-category {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border: 1px solid #d9e5ff;
    border-radius: 999px;
    background: var(--ic-primary-soft);
    color: var(--ic-primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.ic-article h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 4vw, 39px);
    line-height: 1.13;
    letter-spacing: -.035em;
}

.ic-lead {
    margin: 0;
    max-width: 680px;
    color: var(--ic-text-soft);
    font-size: 17px;
    line-height: 1.7;
}

.ic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 22px;
    color: var(--ic-muted);
    font-size: 13px;
}

.ic-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ic-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--ic-muted);
    font-size: 13px;
}

.ic-share a {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--ic-border);
    border-radius: 50%;
    background: #fff;
    color: var(--ic-primary);
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ic-share a:hover {
    transform: translateY(-2px);
    border-color: #c7d5f5;
    box-shadow: var(--ic-shadow-sm);
    text-decoration: none;
}

.ic-hero-art {
    min-height: 250px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--ic-border-soft);
    border-radius: var(--ic-radius-lg);
    background: linear-gradient(145deg, #f7faff, #eef4ff);
}

.ic-format-row {
    display: flex;
    align-items: end;
    gap: 16px;
}

.ic-format {
    width: 76px;
    text-align: center;
    font-weight: 800;
}

.ic-format-card {
    position: relative;
    display: grid;
    width: 68px;
    height: 82px;
    place-items: center;
    margin: 0 auto 7px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15,23,42,.10);
    font-size: 15px;
}

.ic-format-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 15px;
    height: 15px;
    background: #fff;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.ic-jpg .ic-format-card { border-top: 7px solid #f59e0b; color: #c2410c; }
.ic-png .ic-format-card { border-top: 7px solid #2563eb; color: #1d4ed8; }
.ic-webp .ic-format-card { border-top: 7px solid #4caf50; color: #16803c; }

.ic-speed {
    width: 92px;
    height: 48px;
    margin-top: 12px;
    border: 7px solid #dbe6f8;
    border-bottom-color: #22a34a;
    border-radius: 100px 100px 0 0;
    position: relative;
}

.ic-speed::after {
    content: "";
    position: absolute;
    left: 48%;
    bottom: -4px;
    width: 5px;
    height: 37px;
    border-radius: 5px;
    background: var(--ic-text);
    transform-origin: bottom center;
    transform: rotate(38deg);
}

.ic-section {
    margin-top: 42px;
}

.ic-section h2 {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.ic-section h3 {
    margin: 28px 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

.ic-section p {
    margin: 0 0 16px;
    color: #374151;
}

.ic-section ul,
.ic-section ol {
    margin: 0 0 18px;
    padding-left: 22px;
    color: #374151;
}

.ic-check-list {
    list-style: none;
    padding: 0 !important;
}

.ic-check-list li {
    position: relative;
    margin: 7px 0;
    padding-left: 25px;
}

.ic-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--ic-success);
    font-weight: 800;
}

.ic-comparison {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    box-shadow: var(--ic-shadow-sm);
    font-size: 14px;
}

.ic-comparison th,
.ic-comparison td {
    padding: 12px 14px;
    border-right: 1px solid var(--ic-border);
    border-bottom: 1px solid var(--ic-border);
    text-align: left;
}

.ic-comparison tr:last-child td {
    border-bottom: 0;
}

.ic-comparison th:last-child,
.ic-comparison td:last-child {
    border-right: 0;
}

.ic-comparison thead th {
    background: #f8fafc;
    font-weight: 800;
}

.ic-comparison thead th:nth-child(2) {
    background: #fff3e0;
    color: #b45309;
}

.ic-comparison thead th:nth-child(3) {
    background: #eaf1ff;
    color: #1d4ed8;
}

.ic-comparison thead th:nth-child(4) {
    background: #edf9ef;
    color: #16803c;
}

.ic-comparison tbody td:first-child {
    font-weight: 700;
    background: #fafafa;
}

.ic-toc {
    margin-top: 26px;
    padding: 18px 20px;
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    background: #fff;
    box-shadow: var(--ic-shadow-sm);
}

.ic-toc-title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 800;
}

.ic-toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
}

.ic-toc a {
    font-weight: 600;
}

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

.ic-info-card {
    padding: 20px;
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    background: #fff;
}

.ic-info-card.good {
    border-color: #ccebd5;
    background: var(--ic-success-bg);
}

.ic-info-card.bad {
    border-color: #fed7aa;
    background: var(--ic-danger-bg);
}

.ic-info-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.ic-info-card ul {
    margin: 0;
}

.ic-tool-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 34px 0;
    padding: 20px 22px;
    border: 1px solid #dbe6ff;
    border-radius: var(--ic-radius);
    background: linear-gradient(110deg, #f5f8ff, #eef4ff);
}

.ic-tool-cta strong {
    display: block;
    margin-bottom: 3px;
    font-size: 17px;
}

.ic-tool-cta p {
    margin: 0;
    color: var(--ic-text-soft);
    font-size: 14px;
}

.ic-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--ic-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.ic-button:hover {
    background: var(--ic-primary-dark);
    box-shadow: 0 7px 18px rgba(36,87,214,.20);
    transform: translateY(-1px);
    text-decoration: none;
}

.ic-sidebar {
    position: sticky;
    top: 24px;
}

.ic-sidebar-card {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    background: #fff;
    box-shadow: var(--ic-shadow-sm);
}

.ic-sidebar-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
}

.ic-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ic-sidebar-list li + li {
    border-top: 1px solid var(--ic-border-soft);
}

.ic-sidebar-list a {
    display: block;
    padding: 10px 0;
    color: var(--ic-text);
    font-size: 14px;
}

.ic-sidebar-list a:hover {
    color: var(--ic-primary);
    text-decoration: none;
}

.ic-faq {
    border-top: 1px solid var(--ic-border);
}

.ic-faq details {
    border-bottom: 1px solid var(--ic-border);
}

.ic-faq summary {
    cursor: pointer;
    padding: 16px 4px;
    font-weight: 700;
}

.ic-faq p {
    padding: 0 4px 16px;
}

.ic-related {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ic-related-card {
    padding: 16px;
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease;
}

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

.ic-related-card strong {
    display: block;
    margin-top: 8px;
    line-height: 1.4;
}

.ic-related-thumb {
    height: 100px;
    border-radius: 9px;
    background: linear-gradient(135deg, #edf4ff, #f8fafc);
}

@media (max-width: 900px) {
    .ic-article-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ic-sidebar {
        position: static;
        margin-top: 42px;
    }

    .ic-article-hero {
        grid-template-columns: 1fr;
    }

    .ic-hero-art {
        min-height: 220px;
    }
}

@media (max-width: 640px) {
    .ic-container {
        width: min(calc(100% - 28px), var(--ic-container));
    }

    body {
        font-size: 15px;
    }

    .ic-article h1 {
        font-size: 34px;
    }

    .ic-section h2 {
        font-size: 24px;
    }

    .ic-info-grid,
    .ic-related {
        grid-template-columns: 1fr;
    }

    .ic-tool-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .ic-comparison {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .ic-toc ol {
        display: block;
    }

    .ic-toc li {
        margin: 7px 0;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
