/* Layout */
.page-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f3f4f6;
}
.page-body > main {
    flex: 1;
}

/* Brand / Logo */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: inherit;
}
.site-logo-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}
.site-logo-icon--nav {
    width: 2.25rem;
    height: 2.25rem;
    color: #fff;
}
.site-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.site-logo-name {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}
.site-logo-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.75;
}
.site-logo-text--nav .site-logo-name {
    color: #fff;
    font-size: 1.2rem;
}
.site-logo-tagline--nav {
    color: #bfdbfe;
    opacity: 1;
}
.site-logo--footer {
    color: #fff;
    margin-bottom: 0.75rem;
}
.site-logo--footer .site-logo-tagline {
    color: #93c5fd;
    opacity: 1;
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    margin-top: auto;
}
.site-footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2.5rem 1rem 2rem;
    display: grid;
    gap: 2rem;
}
@media (min-width: 768px) {
    .site-footer-inner {
        grid-template-columns: minmax(13rem, 0.9fr) minmax(0, 2.7fr);
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
.site-footer-desc {
    color: #94a3b8;
    font-size: 0.925rem;
    line-height: 1.6;
    max-width: 22rem;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .site-footer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}
.site-footer-list--cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
}
@media (max-width: 480px) {
    .site-footer-list--cols {
        grid-template-columns: 1fr;
    }
}
.site-footer-heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.75rem;
}
.site-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer-list li + li {
    margin-top: 0.5rem;
}
.site-footer-list a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.925rem;
    transition: color 0.15s;
}
.site-footer-list a:hover {
    color: #fff;
}
.site-footer-bottom {
    border-top: 1px solid #334155;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}
@media (min-width: 640px) {
    .site-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
.site-footer-badge {
    color: #475569;
    font-size: 0.8rem;
}

/* Main styles */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* QR Code styles */
#qr-frame-preview {
    position: relative;
}
#qr-frame-preview img {
    max-width: 100%;
    height: auto;
}
#qr-frame-preview .overlay {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    border: 3px dashed #3B82F6;
    box-sizing: border-box;
}
#qr-scan-container {
    width: 100%;
    height: 300px;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    overflow: hidden;
    position: relative;
}

/* QR Frame styles */
.qr-with-frame {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}
.qr-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    pointer-events: none;
}
.qr-frame-style-1 {
    border: 5px solid #000;
    border-radius: 10px;
}
.qr-frame-style-2 {
    border: 8px solid #000;
    border-radius: 50%;
}
.qr-frame-style-3 {
    border: 10px solid #000;
    clip-path: polygon(0% 0%, 30% 0%, 40% 10%, 60% 10%, 70% 0%, 100% 0%, 100% 30%, 90% 40%, 90% 60%, 100% 70%, 100% 100%, 70% 100%, 60% 90%, 40% 90%, 30% 100%, 0% 100%, 0% 70%, 10% 60%, 10% 40%, 0% 30%);
}
.qr-frame-style-4 {
    border: 3px dashed #000;
    border-radius: 15px;
}
.qr-frame-style-5 {
    border: 2px solid #000;
    box-shadow: 0 0 0 5px #000;
    border-radius: 5px;
    margin: 5px;
}

/* Navigation styles */
.main-nav {
    background-color: #1E40AF;
    color: white;
    position: relative;
    z-index: 200;
}
.main-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}
.nav-logo {
    font-weight: bold;
    font-size: 1.25rem;
    position: relative;
    z-index: 210;
}
.nav-dropdown {
    position: relative;
    margin: 0 0.25rem;
}
.nav-dropdown-btn {
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: white;
    transition: color 0.2s ease, background-color 0.2s ease;
    background: transparent;
    border: none;
    font: inherit;
    border-radius: 0.375rem;
}
.nav-dropdown-btn:hover,
.nav-dropdown.is-open > .nav-dropdown-btn {
    color: #93C5FD;
    background: rgba(255, 255, 255, 0.08);
}
.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 210px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    z-index: 300;
    padding: 0.35rem 0;
    border: 1px solid #e5e7eb;
}
.nav-dropdown:last-child .nav-dropdown-content {
    right: 0;
    left: auto;
}
.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown.is-open .nav-dropdown-content {
    display: block;
}
.nav-dropdown:hover,
.nav-dropdown.is-open {
    z-index: 310;
}
.nav-dropdown-content a {
    padding: 0.65rem 1rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.15s ease, color 0.15s ease;
    color: #374151;
    font-size: 0.925rem;
}
.nav-dropdown-content a:hover {
    background-color: #EFF6FF;
    color: #1E40AF;
}

/* Mobile menu */
.mobile-menu-btn {
    cursor: pointer;
}
.mobile-menu {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Dark mode styles */
.dark-mode .scan-tab {
    background-color: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}
.dark-mode .scan-tab.active {
    background-color: #2c3e50;
    color: #3498db;
}
.dark-mode #file-qr-preview {
    border-color: #2c3e50;
}

/* QR Scanner tabs */
.scan-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}
.scan-tab {
    padding: 8px 15px;
    cursor: pointer;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
    font-size: 14px;
}
.scan-tab.active {
    background-color: white;
    border-bottom: 2px solid white;
    font-weight: bold;
    color: #3B82F6;
}
.scan-content {
    display: none;
}
.scan-content.active {
    display: block;
}
#file-qr-preview {
    max-width: 100%;
    max-height: 300px;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    margin: 15px auto 0;
    display: none;
}
.paste-zone {
    border: 2px dashed #93C5FD;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    background-color: #EFF6FF;
    transition: border-color 0.2s, background-color 0.2s;
    outline: none;
}
.paste-zone:focus,
.paste-zone.drag-over {
    border-color: #3B82F6;
    background-color: #DBEAFE;
}
.paste-zone kbd {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.85em;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    box-shadow: 0 1px 0 #cbd5e1;
}

/* Utility classes */
.qr-caption {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #000;
    word-break: break-word;
}
.frame-preview {
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.frame-preview-inner {
    width: 100px;
    height: 100px;
    background-color: #ccc;
    position: relative;
}
.frame-option {
    cursor: pointer;
    border: 2px solid transparent;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s;
}
.frame-option.selected {
    border-color: #3B82F6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Homepage */
.home-main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.home-hero {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto;
    padding-top: 0.5rem;
}
.home-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: #dbeafe;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}
.home-hero-title {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}
.home-hero-desc {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}
.home-btn-primary,
.home-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.home-btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}
.home-btn-primary:hover {
    background: #1d4ed8;
}
.home-btn-secondary {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.home-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.qr-guide,
.qr-knowledge,
.qr-faq {
    max-width: 68rem;
    margin: 2.25rem auto 0;
}
.qr-guide-intro {
    max-width: 44rem;
    margin: 0 auto 1.25rem;
    text-align: center;
}
.qr-guide-kicker {
    margin-bottom: 0.25rem;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.qr-guide h2,
.qr-knowledge h2,
.qr-faq h2 {
    margin-bottom: 0.55rem;
    color: #0f172a;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
}
.qr-guide-intro > p:last-child,
.qr-knowledge p,
.qr-use-cases li,
.qr-faq details p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.65;
}
.qr-how-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    list-style: none;
}
.qr-how-grid li {
    position: relative;
    padding: 1.1rem 1.1rem 1.1rem 3.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}
.qr-how-grid li > span {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 800;
}
.qr-how-grid h3,
.qr-use-cases h3 {
    margin-bottom: 0.25rem;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 750;
}
.qr-how-grid p {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.55;
}
.qr-knowledge {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid #dbeafe;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #eff6ff 0%, #fff 65%);
}
.qr-knowledge-main p + p {
    margin-top: 0.7rem;
}
.qr-use-cases {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.9);
}
.qr-use-cases ul {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.qr-use-cases a {
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}
.qr-use-cases a:hover {
    text-decoration: underline;
}
.qr-faq-list {
    display: grid;
    max-width: 52rem;
    margin: 0 auto;
    gap: 0.6rem;
}
.qr-faq details {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
}
.qr-faq summary {
    padding: 0.9rem 1rem;
    color: #1e293b;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}
.qr-faq details p {
    padding: 0 1rem 1rem;
}
.home-tools {
    margin-top: 2.5rem;
}
.home-tools-intro {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    margin: -0.35rem auto 1.25rem;
    max-width: 40rem;
}
.home-tools-category {
    max-width: 72rem;
    margin: 0 auto 1.25rem;
    padding: 1rem 1rem 0.85rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
}
.home-tools-category-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.home-tools-category-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.home-tools-category-head span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}
.home-tools-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}
@media (min-width: 640px) {
    .home-tools-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 960px) {
    .home-tools-links {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.home-tool-link {
    display: block;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.home-tool-link:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}
@media (min-width: 720px) {
    .qr-how-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .qr-knowledge {
        grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
        align-items: start;
    }
}
.home-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 1rem;
    text-align: center;
}
.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
    max-width: 56rem;
    margin: 0 auto;
}
@media (min-width: 640px) {
    .home-tools-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.home-tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.home-tool-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}
.home-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
}
.home-tool-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}
.home-tool-icon--qr { background: #dbeafe; color: #2563eb; }
.home-tool-icon--scan { background: #dcfce7; color: #16a34a; }
.home-tool-icon--calculator { background: #cffafe; color: #0891b2; }
.home-tool-icon--image { background: #fef3c7; color: #d97706; }
.home-tool-icon--pdf { background: #fee2e2; color: #dc2626; }
.home-tool-icon--device { background: #ede9fe; color: #7c3aed; }
.home-tool-icon--guides { background: #e0e7ff; color: #4338ca; }
.home-tool-name {
    font-size: 0.925rem;
    font-weight: 600;
    color: #1e293b;
}
.home-tool-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.35;
}
.home-qr-section {
    scroll-margin-top: 1rem;
}
.qr-builder-card {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
}
.home-qr-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.home-qr-header-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: #2563eb;
    color: #fff;
    border-radius: 0.625rem;
}
.home-qr-header-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}
.home-qr-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}
.home-qr-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.2rem;
}
.qr-benefits {
    margin-bottom: 1rem;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
}
.qr-benefits span {
    padding: 0 0.35rem;
    color: #94a3b8;
}
.qr-builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}
.qr-builder-editor {
    min-width: 0;
}
.qr-step-heading {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 0.75rem;
}
.qr-step-heading--generate {
    margin-top: 1rem;
}
.qr-step-number {
    display: inline-flex;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: #2563eb;
    font-size: 0.8rem;
    font-weight: 800;
}
.qr-step-heading strong {
    display: block;
    color: #1e293b;
    font-size: 0.9rem;
}
.qr-step-heading small {
    display: block;
    margin-top: 0.1rem;
    color: #94a3b8;
    font-size: 0.72rem;
}
.qr-design-panel {
    margin-top: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
}
.qr-design-panel > summary {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    color: #334155;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    list-style: none;
}
.qr-design-panel > summary::-webkit-details-marker {
    display: none;
}
.qr-design-panel > summary::after {
    content: '+';
    margin-left: auto;
    color: #2563eb;
    font-size: 1.1rem;
}
.qr-design-panel[open] > summary::after {
    content: '−';
}
.qr-design-panel > summary small {
    margin-left: 0.5rem;
    margin-right: 0.75rem;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 500;
}
.qr-design-content {
    padding: 0.8rem;
    border-top: 1px solid #e2e8f0;
}
.qr-design-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}
.qr-design-control {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.35rem;
}
.qr-design-control > span {
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
}
.qr-design-control input,
.qr-design-control select {
    width: 100%;
    min-height: 2.45rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.45rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.8rem;
}
.qr-design-control input:focus,
.qr-design-control select:focus {
    border-color: #3b82f6;
    outline: 2px solid rgba(59, 130, 246, 0.18);
}
.qr-design-control input[type="file"] {
    overflow: hidden;
    padding: 0.35rem;
    font-size: 0.7rem;
}
.qr-design-caption {
    margin-top: 0.7rem;
}
.qr-styled-code,
.qr-styled-code canvas,
.qr-styled-code svg {
    display: block;
    max-width: 100%;
    height: auto;
}
@media (min-width: 700px) {
    .qr-design-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.qr-tab-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem;
    padding-bottom: 0.6rem;
    border-bottom: 0 !important;
}
.qr-tab-nav::-webkit-scrollbar {
    display: none;
}
.qr-tab-nav .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    color: #475569;
    background: #f8fafc;
    text-decoration: none;
}
.qr-tab-nav .tab-btn.bg-blue-600 {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}
.qr-generate-action {
    margin-top: 0.75rem;
}
.qr-primary-action,
.qr-download-action {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    color: #fff;
    background: #2563eb;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s, opacity 0.15s;
}
.qr-primary-action:hover {
    background: #1d4ed8;
}
.qr-preview-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-self: start;
    padding: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    background: #f8fafc;
}
.qr-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.qr-preview-heading strong {
    color: #1e293b;
    font-size: 0.95rem;
}
.qr-preview-heading .qr-preview-status {
    color: #94a3b8;
    font-size: 0.72rem;
}
.qr-preview-stage {
    display: flex;
    min-height: 20rem;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: #fff;
}
.qr-preview-code {
    display: flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
}
.qr-preview-code img,
.qr-preview-code canvas {
    max-width: 100%;
    height: auto;
}
.qr-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    text-align: center;
}
.qr-preview-placeholder svg {
    width: 9rem;
    height: 9rem;
    fill: #cbd5e1;
    stroke: #cbd5e1;
    stroke-width: 7;
}
.qr-preview-placeholder span {
    font-size: 0.8rem;
}
.qr-download-action {
    margin-top: 0.75rem;
    background: #059669;
}
.qr-download-action:hover:not(:disabled) {
    background: #047857;
}
.qr-download-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.qr-preview-note {
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.7rem;
    text-align: center;
}
@media (min-width: 900px) {
    .qr-builder-card {
        padding: 2rem;
    }
    .qr-builder-layout {
        grid-template-columns: minmax(0, 1.65fr) minmax(19rem, 0.85fr);
        gap: 2rem;
    }
    .qr-preview-panel {
        position: sticky;
        top: 1rem;
    }
}
@media (max-width: 639px) {
    .qr-builder-card {
        padding: 1rem;
    }
    .home-qr-header-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    .qr-preview-stage {
        min-height: 18rem;
    }
}
.home-trust {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 56rem;
    margin: 0 auto;
    padding-bottom: 1rem;
}
@media (min-width: 640px) {
    .home-trust {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.home-trust-item {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}
.home-trust-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}
.home-trust-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.35rem;
}
.home-trust-item p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}

/* Theme, install controls, and 404 page */
[hidden] {
    display: none !important;
}
.nav-utility-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-utility-btn {
    display: inline-flex;
    min-width: 2.25rem;
    min-height: 2.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
}
.nav-utility-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}
.nav-utility-label {
    display: none;
}
.theme-icon--sun {
    display: none;
}
html[data-theme="dark"] .theme-icon--sun {
    display: inline;
}
html[data-theme="dark"] .theme-icon--moon {
    display: none;
}
@media (min-width: 768px) {
    .nav-utility-label {
        display: inline;
    }
}
.not-found-main {
    display: grid;
    min-height: 72vh;
    padding: 2rem 1rem;
    place-items: center;
}
.not-found-card {
    width: min(100%, 42rem);
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid #dbeafe;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    text-align: center;
}
.not-found-code {
    color: #2563eb;
    font-size: clamp(4.5rem, 16vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.9;
}
.not-found-card h1 {
    margin-top: 1rem;
    color: #0f172a;
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    font-weight: 800;
}
.not-found-card > p {
    max-width: 34rem;
    margin: 0.75rem auto 0;
    color: #64748b;
    line-height: 1.65;
}
.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.35rem;
}
.not-found-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid #e2e8f0;
}
.not-found-links a {
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

html[data-theme="dark"] .page-body,
html[data-theme="dark"] body {
    background: #0b1120;
    color: #cbd5e1;
}
html[data-theme="dark"] .main-nav {
    background: #0f172a;
}
html[data-theme="dark"] .nav-dropdown-content,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .qr-builder-card,
html[data-theme="dark"] .qr-preview-panel,
html[data-theme="dark"] .qr-design-panel,
html[data-theme="dark"] .qr-design-control input,
html[data-theme="dark"] .qr-design-control select,
html[data-theme="dark"] .home-tool-card,
html[data-theme="dark"] .home-trust-item,
html[data-theme="dark"] .qr-how-grid li,
html[data-theme="dark"] .qr-use-cases,
html[data-theme="dark"] .qr-faq details,
html[data-theme="dark"] .not-found-card,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    border-color: #334155 !important;
    background: #111827 !important;
    color: #e2e8f0 !important;
}
html[data-theme="dark"] .bg-gray-50,
html[data-theme="dark"] .bg-gray-100,
html[data-theme="dark"] .qr-preview-stage,
html[data-theme="dark"] .pdf-tool-shell,
html[data-theme="dark"] .pdf-workspace,
html[data-theme="dark"] .pdf-page-card {
    border-color: #334155 !important;
    background: #0f172a !important;
    color: #e2e8f0 !important;
}
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .home-qr-title,
html[data-theme="dark"] .qr-guide h2,
html[data-theme="dark"] .qr-knowledge h2,
html[data-theme="dark"] .qr-faq h2,
html[data-theme="dark"] .qr-how-grid h3,
html[data-theme="dark"] .qr-use-cases h3,
html[data-theme="dark"] .qr-faq summary,
html[data-theme="dark"] .home-trust-item h3,
html[data-theme="dark"] .home-section-title,
html[data-theme="dark"] .not-found-card h1 {
    color: #f8fafc !important;
}
html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .home-qr-subtitle,
html[data-theme="dark"] .home-tool-desc,
html[data-theme="dark"] .qr-guide-intro > p:last-child,
html[data-theme="dark"] .qr-knowledge p,
html[data-theme="dark"] .qr-use-cases li,
html[data-theme="dark"] .qr-faq details p,
html[data-theme="dark"] .home-trust-item p,
html[data-theme="dark"] .not-found-card > p {
    color: #94a3b8 !important;
}
html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-300,
html[data-theme="dark"] .qr-design-panel,
html[data-theme="dark"] .qr-design-content,
html[data-theme="dark"] .not-found-links {
    border-color: #334155 !important;
}
html[data-theme="dark"] .nav-dropdown-content a {
    color: #cbd5e1;
}
html[data-theme="dark"] .nav-dropdown-content a:hover {
    background: #1e293b;
    color: #93c5fd;
}
html[data-theme="dark"] .qr-knowledge {
    border-color: #1e3a5f;
    background: linear-gradient(135deg, #0f1e35 0%, #111827 70%);
}
html[data-theme="dark"] .home-btn-secondary {
    border-color: #475569;
    background: #1e293b;
    color: #e2e8f0;
}
html[data-theme="dark"] .home-btn-secondary:hover {
    background: #334155;
}

/* Refined dark palette */
html[data-theme="dark"] .page-body,
html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 50% -15%, rgba(37, 99, 235, 0.14), transparent 34rem),
        #070b14;
}
html[data-theme="dark"] .main-nav {
    border-bottom: 1px solid #1e3a5f;
    background: rgba(10, 18, 33, 0.96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
html[data-theme="dark"] .nav-utility-btn {
    border-color: #334155;
    background: #172033;
    color: #dbeafe;
}
html[data-theme="dark"] .nav-utility-btn:hover {
    border-color: #3b82f6;
    background: #1e293b;
}
html[data-theme="dark"] .qr-builder-card {
    border-color: #29384f !important;
    background: linear-gradient(145deg, #111827 0%, #0e1727 100%) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
html[data-theme="dark"] .home-qr-header-icon {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
html[data-theme="dark"] .qr-benefits {
    color: #60a5fa;
}
html[data-theme="dark"] .qr-benefits span {
    color: #475569;
}
html[data-theme="dark"] .qr-step-heading strong,
html[data-theme="dark"] .qr-preview-heading strong,
html[data-theme="dark"] .qr-design-panel > summary,
html[data-theme="dark"] .home-tool-name,
html[data-theme="dark"] label {
    color: #e5edf8 !important;
}
html[data-theme="dark"] .qr-step-number {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
html[data-theme="dark"] .qr-tab-nav {
    border-bottom-color: #334155 !important;
}
html[data-theme="dark"] .qr-tab-nav .tab-btn {
    border-color: #334155;
    background: #172033;
    color: #cbd5e1;
}
html[data-theme="dark"] .qr-tab-nav .tab-btn:hover {
    border-color: #475569;
    background: #1e293b;
    color: #fff;
}
html[data-theme="dark"] .qr-tab-nav .tab-btn.bg-blue-600 {
    border-color: #3b82f6;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #64748b;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}
html[data-theme="dark"] .qr-design-panel {
    background: #0c1525 !important;
}
html[data-theme="dark"] .qr-design-panel > summary small,
html[data-theme="dark"] .qr-preview-status,
html[data-theme="dark"] .qr-preview-note {
    color: #8190a7 !important;
}
html[data-theme="dark"] .qr-preview-panel {
    border-color: #2b3b52 !important;
    background: #0c1525 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
html[data-theme="dark"] .qr-preview-stage {
    border-color: #334155 !important;
    background:
        linear-gradient(45deg, rgba(51, 65, 85, 0.16) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(51, 65, 85, 0.16) 25%, transparent 25%),
        #101a2b !important;
    background-size: 18px 18px !important;
}
html[data-theme="dark"] .qr-preview-placeholder {
    color: #8190a7;
}
html[data-theme="dark"] .qr-preview-placeholder svg {
    fill: #52627a;
    stroke: #52627a;
}
html[data-theme="dark"] .qr-download-action {
    background: #059669;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.18);
}
html[data-theme="dark"] .qr-download-action:hover:not(:disabled) {
    background: #10b981;
}
html[data-theme="dark"] .qr-download-action:disabled {
    background: #174c43;
    color: #789e97;
    opacity: 1;
}
html[data-theme="dark"] .qr-how-grid li,
html[data-theme="dark"] .home-tool-card,
html[data-theme="dark"] .home-trust-item,
html[data-theme="dark"] .qr-faq details {
    border-color: #26364d !important;
    background: #101827 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] .qr-how-grid li > span {
    background: #1e3a8a;
    color: #bfdbfe;
}
html[data-theme="dark"] .home-tools-category {
    border-color: #26364d !important;
    background: #101827 !important;
}
html[data-theme="dark"] .home-tools-category-head h3 {
    color: #e2e8f0;
}
html[data-theme="dark"] .home-tools-category-head span {
    background: #1e293b;
    color: #94a3b8;
}
html[data-theme="dark"] .home-tool-link {
    border-color: #26364d;
    background: #0f172a;
    color: #e2e8f0;
}
html[data-theme="dark"] .home-tool-link:hover {
    border-color: #3b82f6;
    background: #121e31;
    color: #93c5fd;
}
html[data-theme="dark"] .home-tools-intro {
    color: #94a3b8;
}
html[data-theme="dark"] .qr-knowledge {
    border-color: #294568;
    background:
        radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.16), transparent 20rem),
        #0d1727;
}
html[data-theme="dark"] .qr-use-cases {
    border-color: #2b3c54 !important;
    background: rgba(15, 23, 42, 0.82) !important;
}
html[data-theme="dark"] .pdf-tool-panel,
html[data-theme="dark"] .pdf-info-card,
html[data-theme="dark"] .pdf-toolbar,
html[data-theme="dark"] .pdf-results {
    border-color: #29384f !important;
    background: #111827 !important;
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .pdf-drop-zone {
    border-color: #3b82f6 !important;
    background: #0c1525 !important;
}
html[data-theme="dark"] .pdf-drop-zone:hover,
html[data-theme="dark"] .pdf-drop-zone:focus,
html[data-theme="dark"] .pdf-drop-zone.dragover {
    border-color: #60a5fa !important;
    background: #10203a !important;
}
html[data-theme="dark"] .pdf-info-card h2,
html[data-theme="dark"] .pdf-tool-panel h2,
html[data-theme="dark"] .pdf-tool-panel h3 {
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .pdf-info-card p,
html[data-theme="dark"] .pdf-info-card li,
html[data-theme="dark"] .pdf-drop-title,
html[data-theme="dark"] .pdf-drop-hint {
    color: #94a3b8 !important;
}
/* ===== Blog / Guides ===== */
.blog-shell {
    width: min(46rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}
.blog-hero h1 {
    margin: 0.35rem 0 0.75rem;
    font-size: clamp(1.85rem, 4vw, 2.55rem);
    line-height: 1.15;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.blog-kicker {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}
.blog-kicker a {
    color: inherit;
    text-decoration: none;
}
.blog-kicker a:hover {
    text-decoration: underline;
}
.blog-lead {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.65;
    color: #475569;
}
.blog-meta {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: #64748b;
}
.blog-list {
    display: grid;
    gap: 1.75rem;
    margin-top: 2.5rem;
}
.blog-list-item {
    padding-top: 1.75rem;
    border-top: 1px solid #e2e8f0;
}
.blog-list-item h2 {
    margin: 0 0 0.55rem;
    font-size: 1.35rem;
    line-height: 1.35;
    font-weight: 700;
}
.blog-list-item h2 a {
    color: #0f172a;
    text-decoration: none;
}
.blog-list-item h2 a:hover {
    color: #1d4ed8;
}
.blog-list-item p {
    margin: 0 0 0.75rem;
    color: #475569;
    line-height: 1.6;
}
.blog-read-more {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}
.blog-read-more:hover {
    text-decoration: underline;
}
.blog-content {
    margin-top: 2rem;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
}
.blog-content h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.35rem;
    color: #0f172a;
    font-weight: 700;
}
.blog-content p,
.blog-content ul,
.blog-content ol {
    margin: 0 0 1rem;
}
.blog-content ul,
.blog-content ol {
    padding-left: 1.25rem;
}
.blog-content li + li {
    margin-top: 0.35rem;
}
.blog-content a {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.blog-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.25rem;
    margin: 1.75rem 0 0;
    padding: 1rem 1.15rem;
    border-left: 3px solid #2563eb;
    background: #eff6ff;
}
.blog-cta p {
    margin: 0;
    color: #1e3a8a;
    font-weight: 600;
}
.blog-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    border-radius: 0.5rem;
    background: #1d4ed8;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none !important;
}
.blog-cta-btn:hover {
    background: #1e40af;
}
.blog-cta--bottom {
    margin-top: 2.5rem;
}
.blog-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
}
.blog-table th,
.blog-table td {
    border: 1px solid #e2e8f0;
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
}
.blog-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}
.blog-more {
    margin-top: 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.blog-more h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: #0f172a;
}
.blog-more ul {
    margin: 0;
    padding-left: 1.1rem;
}
.blog-more li + li {
    margin-top: 0.35rem;
}
.blog-more a {
    color: #1d4ed8;
    text-decoration: none;
}
.blog-more a:hover {
    text-decoration: underline;
}
.nav-guides-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.375rem;
}
.nav-guides-link:hover {
    background: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .blog-hero h1,
html[data-theme="dark"] .blog-list-item h2 a,
html[data-theme="dark"] .blog-content h2,
html[data-theme="dark"] .blog-more h2,
html[data-theme="dark"] .blog-table th {
    color: #f1f5f9;
}
html[data-theme="dark"] .blog-lead,
html[data-theme="dark"] .blog-list-item p,
html[data-theme="dark"] .blog-content {
    color: #94a3b8;
}
html[data-theme="dark"] .blog-meta {
    color: #64748b;
}
html[data-theme="dark"] .blog-list-item,
html[data-theme="dark"] .blog-more,
html[data-theme="dark"] .blog-table th,
html[data-theme="dark"] .blog-table td {
    border-color: #29384f;
}
html[data-theme="dark"] .blog-table th {
    background: #111827;
}
html[data-theme="dark"] .blog-cta {
    background: #10203a;
    border-left-color: #60a5fa;
}
html[data-theme="dark"] .blog-cta p {
    color: #bfdbfe;
}
html[data-theme="dark"] .blog-list-item h2 a:hover {
    color: #93c5fd;
}
