@charset "UTF-8";

:root {
    --bg: #fffdf9;
    --surface: #ffffff;
    --surface-soft: #fff7f0;
    --line: #e5e7eb;
    --line-strong: #d7dce4;
    --text: #0f172a;
    --muted: #475569;
    --accent: #dc2626;
    --accent-soft: #fef2f2;
    --accent-dark: #991b1b;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: 'Google Sans', 'Inter', 'Noto Sans', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(254, 226, 226, 0.55), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 237, 213, 0.65), transparent 32%),
        linear-gradient(180deg, #fffefe 0%, var(--bg) 100%);
}

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

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

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

.page-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.hero {
    margin-bottom: 14px;
}

.hero-copy {
    padding: 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.panel-head h2,
.audit-card h2,
.landing-card h3 {
    margin: 0;
    font-family: 'Google Sans', 'Inter', 'Noto Sans', sans-serif;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.02;
}

.hero-text,
.audit-card p,
.panel-head p,
.landing-card p {
    color: var(--muted);
    line-height: 1.5;
}

.hero-text {
    max-width: 64ch;
    margin: 14px 0 0;
    font-size: 1.02rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 26px;
    padding: 14px 0 18px;
    border-bottom: 1px solid var(--line);
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
    color: var(--accent);
    transform: translateY(-1px);
    outline: none;
}

.site-nav-link.is-current {
    color: var(--accent);
}

.tool-panel {
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 22px;
}

.panel-head h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.panel-head p {
    max-width: 48ch;
    margin: 0;
}

.hidden {
    display: none !important;
}

.landing-panel {
    display: block;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.landing-card {
    display: block;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.landing-card:hover,
.landing-card:focus-visible {
    transform: translateY(-2px);
    border-color: #f5c9c9;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1);
    outline: none;
}

.landing-card h3 {
    margin-bottom: 0;
}

.landing-card p {
    margin: 0;
}

.landing-card span {
    color: var(--accent);
    font-weight: 800;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-button:hover,
.secondary-button:hover,
.primary-button:focus-visible,
.secondary-button:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.16);
}

.secondary-button {
    color: var(--text);
    background: #eef2f7;
}

.inline-button {
    width: 100%;
}

.split-tool {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
    gap: 24px;
}

.split-tool-vcard {
    grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.88fr);
}

.stack-form,
.preview-card,
.grid-form,
.network-shell {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stack-form,
.network-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.grid-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.form-span-full {
    grid-column: 1 / -1;
}

.stack-form textarea,
.stack-form input,
.grid-form input,
.network-form input,
.network-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
}

.stack-form textarea:focus,
.stack-form input:focus,
.grid-form input:focus,
.network-form input:focus,
.network-form select:focus {
    border-color: #f1b6b6;
    outline: 3px solid rgba(220, 38, 38, 0.08);
}

.preview-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-placeholder,
.qrbox {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 18px;
    border: 1px dashed #d6dbe4;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--muted);
    text-align: center;
}

.qrbox {
    flex-direction: column;
    gap: 14px;
}

.qrbox img {
    border-radius: 12px;
}

.yt-thumb-container {
    max-width: 100%;
}

.yt-thumb-search-section {
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.18);
}

.yt-thumb-search-box {
    display: flex;
    gap: 10px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
}

.yt-thumb-input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
}

.yt-thumb-input:focus {
    outline: none;
}

.yt-thumb-btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
    padding: 12px 20px;
    border: none;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.yt-thumb-btn-search:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.yt-thumb-hint {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
}

.yt-thumb-error {
    padding: 14px 16px;
    border-radius: 16px;
    background: #fee2e2;
    color: #b42318;
}

.yt-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.yt-thumb-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.yt-thumb-card-image {
    min-height: 146px;
    background: #f1f5f9;
}

.yt-thumb-card-image img {
    display: block;
    width: 100%;
}

.img-error {
    display: grid;
    min-height: 146px;
    place-items: center;
    color: var(--muted);
}

.yt-thumb-card-info {
    padding: 14px;
}

.yt-thumb-card-name {
    margin-bottom: 12px;
    font-weight: 700;
}

.yt-thumb-card-actions {
    display: flex;
    gap: 8px;
}

.yt-thumb-btn {
    flex: 1;
    padding: 11px 12px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.yt-thumb-btn-download {
    color: #ffffff;
    background: #0f9d7a;
}

.yt-thumb-btn-copy {
    background: #eef2ff;
    color: #1e293b;
}

.yt-thumb-btn-copy.copied {
    color: #166534;
    background: #dcfce7;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.75);
}

.site-footer .page-shell {
    padding-top: 18px;
    padding-bottom: 18px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .split-tool,
    .split-tool-vcard,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .panel-head p {
        max-width: none;
    }
}

@media (max-width: 900px) {
    .site-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-top: 4px;
    }

    .site-nav-link {
        min-height: 44px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #ffffff;
        text-align: center;
    }

    .site-nav-link.is-current {
        background: var(--accent-soft);
        border-color: #fecaca;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 18px, 1280px);
        padding: 18px 0 42px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.08;
    }

    .hero-text {
        margin-top: 10px;
        font-size: 0.96rem;
    }

    .yt-thumb-search-box,
    .yt-thumb-card-actions {
        flex-direction: column;
    }

    .yt-thumb-btn-search,
    .primary-button,
    .secondary-button {
        width: 100%;
        min-width: 0;
    }

    .stack-form,
    .preview-card,
    .grid-form,
    .network-shell {
        padding: 18px;
        border-radius: 18px;
    }
}

@media (max-width: 520px) {
    .site-nav {
        grid-template-columns: 1fr;
    }

    .eyebrow {
        font-size: 0.75rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .landing-grid,
    .yt-thumb-grid {
        grid-template-columns: 1fr;
    }
}
.site-header {
    position: relative;
    margin-bottom: 28px;
    padding: 22px 24px 20px;
    border: 1px solid rgba(215, 220, 228, 0.9);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(254, 226, 226, 0.7), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 248, 242, 0.96) 100%);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.site-header::after {
    content: none;
    display: none;
}

.site-header-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    text-decoration: none;
}

.site-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 11px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    color: #ffffff;
    font-family: 'Google Sans', 'Inter', 'Noto Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.site-brand-copy {
    display: grid;
    gap: 2px;
}

.site-brand-copy strong {
    font-family: 'Google Sans', 'Inter', 'Noto Sans', sans-serif;
    font-size: 1.12rem;
    letter-spacing: -0.03em;
}

.site-brand-copy span {
    color: var(--muted);
    font-size: 0.92rem;
}

.site-menu-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(215, 220, 228, 0.95);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.site-menu-toggle-icon,
.site-menu-toggle-icon::before,
.site-menu-toggle-icon::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-menu-toggle-icon {
    position: relative;
}

.site-menu-toggle-icon::before,
.site-menu-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.site-menu-toggle-icon::before {
    top: -5px;
}

.site-menu-toggle-icon::after {
    top: 5px;
}

.site-header.is-menu-open .site-menu-toggle-icon {
    background: transparent;
}

.site-header.is-menu-open .site-menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.site-header.is-menu-open .site-menu-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.site-header .hero {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

.site-header .hero-copy {
    max-width: 72ch;
}

.site-header .hero-text {
    margin-top: 12px;
}

.site-header .site-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(215, 220, 228, 0.9);
    border-bottom: none;
}

.site-header .site-nav-link {
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.site-header .site-nav-link:hover,
.site-header .site-nav-link:focus-visible {
    color: var(--accent);
    border-color: #fecaca;
    background: #ffffff;
}

.site-header .site-nav-link.is-current {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.16);
}

@media (max-width: 900px) {
    .site-header {
        padding: 18px;
        border-radius: 22px;
    }

    .site-brand-copy span {
        font-size: 0.86rem;
    }

    .site-menu-toggle {
        display: inline-flex;
    }

    .site-header .site-nav {
        display: none;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 14px;
        padding-top: 14px;
    }

    .site-header.is-menu-open .site-nav {
        display: grid;
    }

    .site-header .site-nav-link {
        justify-content: flex-start;
        width: 100%;
        border-radius: 14px;
    }
}

@media (max-width: 720px) {
    .site-header {
        margin-bottom: 22px;
        padding: 16px;
    }

    .site-header-bar {
        margin-bottom: 14px;
    }

    .site-brand {
        gap: 10px;
        min-width: 0;
    }

    .site-brand-mark {
        min-width: 56px;
        padding: 10px 12px;
        border-radius: 14px;
        font-size: 0.92rem;
    }

    .site-brand-copy strong {
        font-size: 1rem;
    }

    .site-brand-copy span {
        font-size: 0.8rem;
    }

    .site-menu-toggle {
        min-height: 42px;
        padding: 10px 12px;
    }

    .site-menu-toggle-label {
        display: none;
    }
}

@media (max-width: 520px) {
    .site-header {
        border-radius: 18px;
    }

    .site-brand-copy span {
        display: none;
    }

    .site-header .hero h1 {
        font-size: 1.65rem;
    }
}
/* codex-layout-fixes */
html {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

body > .page-shell {
    flex: 1 0 auto;
}

.site-footer {
    margin-top: auto;
}