:root {
    --color-black: #111111;
    --color-text: #202124;
    --color-sub: #6b7280;
    --color-muted: #9ca3af;
    --color-line: #e5e7eb;
    --color-soft-line: #eeeeee;
    --color-bg: #ffffff;
    --color-light: #f7f8fa;
    --color-primary: #d71920;
    --color-primary-dark: #b90f15;
    --container: 1240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    letter-spacing: -0.025em;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    width: 100%;
}

button,
input {
    font-family: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

.site-wrap {
    min-height: 100vh;
}

.fb-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-line);
}

.top-strip {
    height: 38px;
    background: #111318;
    color: #fff;
}

.top-strip__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.top-breaking {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.top-breaking__label {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.top-breaking__text {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    flex-shrink: 0;
}

.top-links a:hover {
    color: #fff;
}

.brand-row {
    border-bottom: 1px solid var(--color-soft-line);
}

.brand-row__inner {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.06em;
    white-space: nowrap;
}

.site-logo span {
    color: #111;
}

.site-logo strong {
    color: var(--color-primary);
    font-weight: 900;
}

.header-search {
    width: 320px;
    height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: var(--color-light);
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.header-search:focus-within {
    border-color: #222;
    background: #fff;
}

.header-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 4px 0 18px;
    font-size: 14px;
}

.header-search button {
    width: 46px;
    height: 100%;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-row {
    height: 48px;
    background: #fff;
}

.nav-row__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.category-nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    position: relative;
    height: 100%;
    display: inline-flex;
    align-items: center;
    color: #222;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.category-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.category-nav a:hover,
.category-nav a.is-active {
    color: var(--color-primary);
}

.category-nav a:hover::after,
.category-nav a.is-active::after {
    transform: scaleX(1);
}

.latest-link {
    height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--color-line);
    display: inline-flex;
    align-items: center;
    color: #333;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.latest-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* FOOTER */

.site-footer {
    margin-top: 76px;
    border-top: 1px solid var(--color-line);
    background: #f8f9fb;
}

.footer-inner {
    padding: 46px 20px 54px;
}

.footer-brand {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--color-line);
}

.footer-logo {
    display: inline-flex;
    gap: 6px;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.footer-logo strong {
    color: var(--color-primary);
}

.footer-brand p {
    color: var(--color-sub);
    font-size: 14px;
    line-height: 1.7;
    text-align: right;
}

.footer-menu {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-menu a {
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.footer-menu a:hover {
    color: var(--color-primary);
}

.footer-info {
    margin-top: 22px;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.8;
}

/* ACCESSIBILITY */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(215, 25, 32, 0.22);
    outline-offset: 3px;
}

/* RESPONSIVE */

@media (max-width: 1024px) {
    .brand-row__inner {
        height: auto;
        padding-top: 18px;
        padding-bottom: 18px;
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .header-search {
        width: 100%;
    }

    .nav-row__inner {
        align-items: stretch;
    }

    .category-nav {
        gap: 23px;
    }

    .latest-link {
        display: none;
    }
}

@media (max-width: 768px) {
    .fb-container {
        padding: 0 16px;
    }

    .top-strip {
        height: 34px;
    }

    .top-links {
        display: none;
    }

    .top-breaking__text {
        font-size: 13px;
    }

    .site-logo {
        font-size: 25px;
    }

    .nav-row {
        height: 44px;
    }

    .category-nav a {
        font-size: 15px;
    }

    .footer-brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .footer-brand p {
        text-align: left;
    }
}