html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top, rgba(44, 77, 125, 0.18) 0%, rgba(10, 18, 32, 0) 38%),
        linear-gradient(180deg, #08111d 0%, #0a1321 100%);
    color: #d9e3f2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Header */
.ewp-mobile-header {
    position: sticky;
    top: 0;
    z-index: 1800;
    background: rgba(8, 16, 28, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(196, 208, 226, 0.10);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.ewp-mobile-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    min-height: 82px;
    box-sizing: border-box;
    position: relative;
    z-index: 1805;
}

.ewp-mobile-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    position: relative;
    z-index: 1810;
}

.ewp-mobile-brand__logo {
    width: auto;
    height: 58px;
    object-fit: contain;
}

.ewp-mobile-menu-toggle {
    position: relative;
    z-index: 1815;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 1px solid rgba(194, 205, 223, 0.20);
    background: rgba(177, 191, 212, 0.10);
    border-radius: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    flex: 0 0 auto;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ewp-mobile-menu-toggle:hover {
    background: rgba(177, 191, 212, 0.16);
    border-color: rgba(194, 205, 223, 0.28);
}

.ewp-mobile-menu-toggle:active {
    transform: scale(0.98);
}

.ewp-mobile-menu-toggle span {
    width: 26px;
    height: 2px;
    background: #f3f7ff;
    border-radius: 2px;
    display: block;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.ewp-mobile-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.ewp-mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.ewp-mobile-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Backdrop */
.ewp-mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 14, 0.60);
    z-index: 1690;
}

/* Drawer Menu */
.ewp-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 390px);
    background: linear-gradient(180deg, rgba(14, 24, 40, 0.985) 0%, rgba(9, 16, 28, 0.995) 100%);
    border-left: 1px solid rgba(194, 205, 223, 0.12);
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.35);
    padding: 110px 18px 30px;
    z-index: 1700;
    overflow-y: auto;
    box-sizing: border-box;
}

.ewp-mobile-menu a {
    display: block;
    color: #d8e4f5;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.35;
    padding: 20px 12px;
    border-bottom: 1px solid rgba(194, 205, 223, 0.08);
    letter-spacing: 0.01em;
}

.ewp-mobile-menu a:hover,
.ewp-mobile-menu a:focus {
    color: #ffffff;
}

/* Feed shell */
.ewp-app-feed {
    display: grid;
    gap: 18px;
    padding: 16px 10px 128px;
}

/* Feed cards */
.ewp-app-story {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(16, 27, 45, 0.98) 0%, rgba(10, 18, 31, 0.98) 100%);
    border: 1px solid rgba(194, 205, 223, 0.10);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    min-height: 340px;
}

.ewp-app-story__link {
    display: block;
    position: relative;
    min-height: 340px;
    text-decoration: none;
    color: inherit;
}

.ewp-app-story__media {
    position: absolute;
    inset: 0;
}

.ewp-app-story__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    transform: scale(1.01);
}

.ewp-app-story__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(4, 10, 18, 0.10) 0%,
            rgba(4, 10, 18, 0.40) 40%,
            rgba(4, 10, 18, 0.92) 100%
        );
}

.ewp-app-story__content {
    position: relative;
    z-index: 2;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 22px;
    box-sizing: border-box;
}

.ewp-app-story__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ewp-app-story__type {
    display: inline-block;
    color: #99b3df;
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.ewp-app-story__date {
    color: #9baecc;
    font-size: 1rem;
    font-weight: 600;
}

.ewp-app-story__title {
    margin: 0;
    color: #f6f9ff;
    font-size: 2.2rem;
    line-height: 1.03;
    letter-spacing: -0.03em;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ewp-app-story__excerpt {
    margin-top: 12px;
    color: #d1dced;
    line-height: 1.7;
    font-size: 1.12rem;
}

/* No image fallback */
.ewp-app-story--no-image {
    min-height: 240px;
}

.ewp-app-story--no-image .ewp-app-story__link {
    min-height: 240px;
}

.ewp-app-story--no-image .ewp-app-story__content {
    min-height: 240px;
    justify-content: center;
}

.ewp-app-story--no-image .ewp-app-story__title {
    font-size: 1.82rem;
}

/* Footer / bottom nav */
.ewp-mobile-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1400;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    background: rgba(6, 13, 24, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(194, 205, 223, 0.08);
}

.ewp-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.ewp-mobile-bottom-nav a,
.ewp-mobile-bottom-nav button {
    appearance: none;
    -webkit-appearance: none;
    min-height: 88px;
    border: 1px solid rgba(194, 205, 223, 0.14);
    background: linear-gradient(180deg, rgba(17, 28, 46, 0.98) 0%, rgba(10, 18, 31, 0.98) 100%);
    color: #e8f0fd;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.08rem;
    line-height: 1.2;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.ewp-mobile-bottom-nav a span,
.ewp-mobile-bottom-nav button span {
    display: block;
}

.ewp-mobile-bottom-nav a:hover,
.ewp-mobile-bottom-nav button:hover {
    background: linear-gradient(180deg, rgba(22, 37, 60, 0.99) 0%, rgba(12, 21, 36, 0.99) 100%);
    border-color: rgba(194, 205, 223, 0.20);
}

.ewp-mobile-bottom-nav a:active,
.ewp-mobile-bottom-nav button:active {
    transform: scale(0.98);
}

/* Shared mobile content shells */
.ewp-app-single {
    display: grid;
    gap: 18px;
    padding: 16px 10px 128px;
}

.ewp-app-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.ewp-app-single__type {
    display: inline-block;
    color: #99b3df;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.ewp-app-single__date {
    color: #9baecc;
    font-size: 1rem;
    font-weight: 600;
}

.ewp-app-single__hero-card {
    overflow: hidden;
}

/* Fed directory */
.ewp-mobile-fed-grid {
    display: grid;
    gap: 16px;
}

.ewp-mobile-fed-card__link {
    display: block;
}

.ewp-mobile-fed-card__logo {
    margin-bottom: 14px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(8, 16, 28, 0.6);
    padding: 18px;
}

.ewp-mobile-fed-card__logo img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.ewp-mobile-fed-card__title {
    margin-bottom: 10px;
}

/* Results / sidebar blocks rendered on mobile pages */
.sidebar-stack,
.sidebar-stack-right,
.sidebar-stack-left {
    display: grid;
    gap: 16px;
}

.sidebar-card {
    background: linear-gradient(180deg, rgba(16, 27, 45, 0.98) 0%, rgba(10, 18, 31, 0.98) 100%);
    border: 1px solid rgba(194, 205, 223, 0.10);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    padding: 22px;
}

.sidebar-title {
    margin: 0 0 16px;
    font-size: 1.18rem;
    line-height: 1.1;
    color: #f1f5fd;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 2px;
    margin-top: 10px;
    background: linear-gradient(90deg, #9fb4cf 0%, rgba(159, 180, 207, 0) 100%);
}

.sidebar-title a {
    color: inherit;
}

.sidebar-list {
    display: grid;
    gap: 12px;
}

.sidebar-list-item,
.sidebar-fed-import-item {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(194, 205, 223, 0.08);
}

.sidebar-list-item:last-child,
.sidebar-fed-import-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sidebar-list a,
.sidebar-fed-import-item a,
.sidebar-fed-import-item span {
    display: block;
    color: #b8c7dc;
    font-weight: 600;
    line-height: 1.55;
    font-size: 1.12rem;
}

.sidebar-list a:hover,
.sidebar-fed-import-item a:hover {
    color: #ffffff;
}

.sidebar-fed-import-meta {
    margin-top: 6px;
    font-size: 0.98rem;
    opacity: 0.78;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.4;
}

/* Reading / archive typography */
.archive-title,
.single-title {
    margin: 0 0 16px;
    font-size: 2.45rem;
    line-height: 1.02;
    color: #f4f8ff;
    letter-spacing: -0.03em;
}

.archive-description,
.single-subtitle,
.story-excerpt,
.empty-state {
    color: #c7d3e5;
    line-height: 1.9;
    font-size: 1.18rem;
}

.content-meta {
    font-size: 1.08rem;
    color: #9aacc7;
    margin-top: 10px;
    line-height: 1.65;
}

.content-back-link {
    margin-bottom: 16px;
}

.content-back-link a {
    color: #a9c1eb;
    font-weight: 700;
    font-size: 1.08rem;
}

.single-featured-image {
    overflow: hidden;
    border-radius: 18px;
    background: #0a1423;
}

.single-featured-image img {
    width: 100%;
}

.single-body {
    color: #d6e0ef;
    line-height: 2;
    font-size: 1.42rem;
}

.single-body p {
    margin: 0 0 1.15em;
}

.single-body p:first-child {
    margin-top: 0;
}

.single-body h2 {
    color: #f4f8ff;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-size: 2.1rem;
}

.single-body h3 {
    color: #f4f8ff;
    margin-top: 1.7em;
    margin-bottom: 0.55em;
    line-height: 1.14;
    letter-spacing: -0.02em;
    font-size: 1.82rem;
}

.single-body h4 {
    color: #f4f8ff;
    margin-top: 1.6em;
    margin-bottom: 0.5em;
    line-height: 1.16;
    letter-spacing: -0.01em;
    font-size: 1.52rem;
}

.single-body ul,
.single-body ol {
    padding-left: 30px;
    font-size: 1.36rem;
    line-height: 2;
}

.single-body li {
    margin-bottom: 0.45em;
}

.single-body a {
    color: #9dbcf4;
}

.single-body blockquote {
    margin: 1.6em 0;
    padding: 20px 22px;
    border-left: 4px solid #90a8c7;
    background: rgba(178, 191, 212, 0.08);
    color: #d5dff0;
    border-radius: 0 14px 14px 0;
    font-size: 1.24rem;
    line-height: 1.9;
}

.content-tags {
    margin-top: 20px;
    line-height: 1.8;
}

.content-tag-pill {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(178, 191, 212, 0.10);
    border: 1px solid rgba(194, 205, 223, 0.12);
    color: #d7e3f5;
    font-size: 1.04rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
}

/* Small-screen refinements */
@media (max-width: 480px) {
    .ewp-mobile-header__inner {
        padding: 14px 16px;
        min-height: 76px;
    }

    .ewp-mobile-brand__logo {
        height: 52px;
    }

    .ewp-mobile-menu-toggle {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .ewp-mobile-menu {
        width: min(90vw, 360px);
        padding: 104px 16px 24px;
    }

    .ewp-mobile-menu a {
        font-size: 1.28rem;
        padding: 18px 10px;
    }

    .ewp-app-feed,
    .ewp-app-single {
        gap: 16px;
        padding: 14px 8px 122px;
    }

    .ewp-app-story,
    .ewp-app-story__link,
    .ewp-app-story__content {
        min-height: 305px;
    }

    .ewp-app-story__content {
        padding: 24px 18px;
    }

    .ewp-app-story__title {
        font-size: 1.92rem;
    }

    .ewp-app-story__date {
        font-size: 0.9rem;
    }

    .ewp-mobile-bottom-nav {
        gap: 8px;
    }

    .ewp-mobile-bottom-nav a,
    .ewp-mobile-bottom-nav button {
        min-height: 82px;
        font-size: 1rem;
        border-radius: 14px;
        padding: 8px 6px;
    }

    .archive-title,
    .single-title {
        font-size: 2.2rem;
    }

    .archive-description,
    .single-subtitle,
    .story-excerpt,
    .empty-state {
        font-size: 1.14rem;
    }

    .content-meta {
        font-size: 1.02rem;
    }

    .single-body {
        font-size: 1.3rem;
        line-height: 1.95;
    }

    .single-body h2 {
        font-size: 1.9rem;
    }

    .single-body h3 {
        font-size: 1.66rem;
    }

    .single-body h4 {
        font-size: 1.4rem;
    }

    .single-body ul,
    .single-body ol {
        font-size: 1.26rem;
    }

    .single-body blockquote {
        font-size: 1.16rem;
    }
}