/* Story detail page (templates/newthe/yenienderun.html + templates/newparse/story/*.html)
   Static files are cached for years on the CDN and the names are not hashed. To change this file,
   save it under a NEW name (story.v2.css ...) and update the link in yenienderun.html.
   Loaded after site.bundle so these rules win ties with the theme. Everything lives under .story-page.
   Note: the theme sets html { font-size: 62.5% }, so rem is NOT 16px here. Use px. */

.story-page {
    --sx-card: #232323;
    --sx-lime: #DDF247;
    --sx-ink: #161616;
    --sx-muted: #8A8AA0;
    --sx-soft: #B4B4C6;
    --sx-indigo: #5C6BC0;
    --sx-teal: #26C6DA;
    --sx-line: rgba(255, 255, 255, 0.1);
}

/* ---------- Breadcrumbs (one separator, 44px tall tap targets) ---------- */
.story-page .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
}
.story-page .breadcrumbs li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    opacity: 1;
}
.story-page .breadcrumbs li + li::before {
    content: "\203A";
    position: static;
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    font-weight: 600;
}
.story-page .breadcrumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    transition: color 0.18s ease;
}
.story-page .breadcrumbs a:hover,
.story-page .breadcrumbs a:focus-visible {
    color: var(--sx-lime);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.story-page .breadcrumbs li.current span {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
@media (max-width: 640px) {
    .story-page .breadcrumbs { font-size: 13px; }
    .story-page .breadcrumbs li.current span { max-width: 200px; }
    /* with a category the title would wrap behind a stray separator: give it its own full-width line instead */
    .story-page .breadcrumbs li.current:nth-child(3) { flex: 1 1 100%; min-width: 0; }
    .story-page .breadcrumbs li.current:nth-child(3)::before { display: none; }
    .story-page .breadcrumbs li.current:nth-child(3) span { max-width: 100%; }
}

/* ---------- Header meta row ---------- */
.story-page .meta-post { flex-wrap: wrap; gap: 12px 16px; }
.story-page .meta-info { flex-wrap: wrap; row-gap: 8px; }
.story-page .meta-info .item.sx-read { margin-left: 0; }
.story-page .sx-author-name {
    margin: 0;
    color: #fff;
    font: 400 12px/19px 'Azeret Mono', monospace;
}

/* ---------- Story text: same look as before (Georgia 18px), now on one wrapper for every block ---------- */
.story-page .story-text {
    margin: 24px 0;
}
.story-page .story-text,
.story-page .story-text p,
.story-page .story-text li,
.story-page .story-text blockquote {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 18px !important;
    line-height: 1.9 !important;
}
.story-page .story-text p { margin: 0 0 18px; }
.story-page .story-text > :last-child { margin-bottom: 0; }

/* ---------- Story pictures ---------- */
.story-page .sx-figure {
    margin: 28px 0;
}
.story-page .sx-figure img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 20px;
    background: var(--sx-card);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 14px 34px rgba(0, 0, 0, 0.45);
}

/* ---------- Shared bits ---------- */
.story-page .sx-h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: none;
}
.story-page .sx-pill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.story-page .sx-pill-link:hover { background: var(--sx-lime); color: var(--sx-ink); }
.story-page a:focus-visible { outline: 3px solid var(--sx-lime); outline-offset: 3px; }

/* ---------- Listen strip ---------- */
.story-page .sx-listen {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    margin: 22px 0 26px;
    padding: 12px 14px 12px 12px;
    border: 1.5px solid transparent;
    border-radius: 22px;
    background: linear-gradient(var(--sx-card), var(--sx-card)) padding-box,
                linear-gradient(120deg, var(--sx-lime), var(--sx-indigo) 55%, var(--sx-teal)) border-box;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    color: #fff;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.story-page .sx-listen:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(221, 242, 71, 0.08);
    color: #fff;
}
.story-page .sx-listen-icon {
    position: relative;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
}
.story-page .sx-listen-icon img {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.story-page .sx-listen-icon b {
    position: absolute;
    right: -6px;
    bottom: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding-left: 1px;
    border: 2px solid var(--sx-card);
    border-radius: 50%;
    background: var(--sx-lime);
    color: var(--sx-ink);
    font-size: 9px;
    line-height: 1;
}
.story-page .sx-listen-text { flex: 1; min-width: 0; }
.story-page .sx-listen-text strong {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}
.story-page .sx-listen-text small {
    display: block;
    margin-top: 3px;
    color: var(--sx-soft);
    font-size: 13px;
    line-height: 1.45;
}
.story-page .sx-listen-wave {
    display: none;
    align-items: center;
    gap: 3px;
    height: 32px;
}
.story-page .sx-listen-wave i {
    display: block;
    width: 4px;
    border-radius: 3px;
    background: linear-gradient(var(--sx-lime), var(--sx-teal));
    animation: sxWave 1.1s ease-in-out infinite;
}
.story-page .sx-listen-wave i:nth-child(1) { height: 10px; }
.story-page .sx-listen-wave i:nth-child(2) { height: 20px; animation-delay: 0.12s; }
.story-page .sx-listen-wave i:nth-child(3) { height: 30px; animation-delay: 0.24s; }
.story-page .sx-listen-wave i:nth-child(4) { height: 18px; animation-delay: 0.36s; }
.story-page .sx-listen-wave i:nth-child(5) { height: 26px; animation-delay: 0.48s; }
.story-page .sx-listen-wave i:nth-child(6) { height: 14px; animation-delay: 0.6s; }
.story-page .sx-listen-wave i:nth-child(7) { height: 8px; animation-delay: 0.72s; }
@keyframes sxWave {
    0%, 100% { transform: scaleY(0.45); }
    50% { transform: scaleY(1); }
}
.story-page .sx-listen-go {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    background: var(--sx-lime);
    color: var(--sx-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}
.story-page .sx-listen-go-text { display: none; }
/* phones: the whole card is the tap target and the lime badge on the icon says "play", so the arrow chip is dropped to keep the strip slim */
@media (max-width: 559px) {
    .story-page .sx-listen { min-height: 0; }
    .story-page .sx-listen-go { display: none; }
    .story-page .sx-listen-text strong { font-size: 15px; }
    .story-page .sx-listen-text small { font-size: 12.5px; line-height: 1.4; }
}
@media (min-width: 560px) {
    .story-page .sx-listen { gap: 16px; padding: 14px 16px 14px 14px; }
    .story-page .sx-listen-text strong { font-size: 17px; }
    .story-page .sx-listen-wave { display: inline-flex; }
    .story-page .sx-listen-go { padding: 0 18px; }
    .story-page .sx-listen-go-text { display: inline; }
}

/* ---------- YouTube facade ---------- */
.story-page .sx-video { margin: 32px 0; }
.story-page .sx-video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 14px 34px rgba(0, 0, 0, 0.45);
}
.story-page .sx-video-facade {
    position: absolute;
    inset: 0;
    display: block;
    color: #fff;
}
.story-page .sx-video-facade img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.story-page .sx-video-facade::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55));
    pointer-events: none;
}
.story-page .sx-video-facade:hover img { transform: scale(1.03); }
.story-page .sx-video-play {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    padding-left: 4px;
    border-radius: 50%;
    background: var(--sx-lime);
    color: var(--sx-ink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 8px rgba(221, 242, 71, 0.28);
    transition: transform 0.25s ease;
}
.story-page .sx-video-facade:hover .sx-video-play { transform: scale(1.08); }
.story-page .sx-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.story-page .sx-video-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 10px 0 0;
    color: var(--sx-muted);
    font-size: 14px;
    line-height: 1.4;
}
@media (max-width: 480px) {
    .story-page .sx-video-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}

/* ---------- End-of-story app card ---------- */
.story-page .sx-app {
    position: relative;
    display: grid;
    gap: 22px;
    margin: 44px 0 28px;
    padding: 26px 18px 22px;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(38, 198, 218, 0.22) 0%, rgba(38, 198, 218, 0) 55%),
        radial-gradient(80% 70% at 0% 100%, rgba(92, 107, 192, 0.25) 0%, rgba(92, 107, 192, 0) 60%),
        linear-gradient(150deg, #0E1B30 0%, #12335A 55%, #0B4650 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.45);
}
.story-page .sx-app::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 12% 16%, #FFE08A 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 34% 78%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 58% 9%, #9FD8FF 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 90% 58%, #fff 50%, transparent 51%);
}
.story-page .sx-app > * { position: relative; }
.story-page .sx-app-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: #FFE08A;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1;
}
.story-page .sx-app-kicker img {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
}
.story-page .sx-app-kicker em {
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--sx-lime);
    color: var(--sx-ink);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.2;
}
.story-page .sx-app-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(23px, 5.6vw, 32px);
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.18;
    text-transform: none;
}
.story-page .sx-app-intro {
    margin: 0 0 16px;
    color: #D5E4F5;
    font-size: 16px;
    line-height: 1.65;
}
.story-page .sx-app-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}
.story-page .sx-app-pills li {
    margin: 0;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
}
.story-page .sx-app-pills li::before,
.story-page .sx-app-phones li::before,
.story-page .sx-fun-grid li::before { content: none; }
.story-page .sx-app-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.story-page .sx-app-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 18px;
    background: var(--sx-lime);
    box-shadow: 0 10px 24px rgba(221, 242, 71, 0.22), inset 0 -3px 0 rgba(0, 0, 0, 0.14);
    color: var(--sx-ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.story-page .sx-app-primary:hover { transform: translateY(-2px); color: var(--sx-ink); box-shadow: 0 14px 28px rgba(221, 242, 71, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.14); }
.story-page .sx-store {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 16px 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: #0A1424;
    color: #fff;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.story-page .sx-store:hover { border-color: rgba(255, 255, 255, 0.55); color: #fff; transform: translateY(-1px); }
.story-page .sx-store svg { flex: 0 0 auto; }
.story-page .sx-store-label { display: flex; flex-direction: column; }
.story-page .sx-store-label small { color: rgba(255, 255, 255, 0.7); font-size: 10px; line-height: 1.2; }
.story-page .sx-store-label strong { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; }

@media (max-width: 899px) {
    /* big full-width button, then the two store badges side by side */
    .story-page .sx-app-primary { flex: 1 1 100%; }
    .story-page .sx-store { flex: 1 1 0; justify-content: center; min-width: 0; padding: 0 10px; }
}

/* phone screens: swipe strip on small screens, a fan on wide ones */
.story-page .sx-app-phones {
    display: flex;
    gap: 12px;
    margin: 0 -18px;
    padding: 8px 18px 20px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 18px;
    scrollbar-width: none;
}
.story-page .sx-app-phones::-webkit-scrollbar { display: none; }
.story-page .sx-app-phones li { flex: 0 0 128px; margin: 0; scroll-snap-align: start; }
.story-page .sx-phone {
    position: relative;
    display: block;
    aspect-ratio: 3 / 5;
    overflow: hidden;
    border: 4px solid #0A1424;
    border-radius: 24px;
    background: linear-gradient(160deg, #2D6A8A, #0E4B57);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}
.story-page .sx-phone-stories { background: linear-gradient(160deg, #2D6A8A, #0E4B57); }
.story-page .sx-phone-games { background: linear-gradient(160deg, #5C6BC0, #1B3A6E); }
.story-page .sx-phone-learn { background: linear-gradient(160deg, #2E8B6E, #0E4B57); }
.story-page .sx-phone-sleep { background: linear-gradient(160deg, #26457D, #0C1730); }
.story-page .sx-phone::before {
    content: "";
    position: absolute;
    z-index: 3;
    top: 6px;
    left: 50%;
    width: 30%;
    height: 5px;
    margin-left: -15%;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.45);
}
.story-page .sx-phone-emoji {
    position: absolute;
    inset: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}
.story-page .sx-phone img {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-page .sx-phone-label {
    position: absolute;
    z-index: 2;
    right: 6px;
    bottom: 6px;
    left: 6px;
    padding: 7px 6px;
    border-radius: 12px;
    background: rgba(10, 20, 36, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}
@media (min-width: 992px) {
    .story-page .sx-app { padding: 32px 34px 26px; }
    .story-page .sx-app-phones { justify-content: center; margin: 0; padding: 14px 0 6px; overflow: visible; gap: 0; }
    .story-page .sx-app-phones li { flex: 0 0 138px; margin: 0 -4px; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
    .story-page .sx-app-phones li:nth-child(1) { transform: rotate(-7deg) translateY(12px); }
    .story-page .sx-app-phones li:nth-child(2) { transform: rotate(-2deg); z-index: 1; }
    .story-page .sx-app-phones li:nth-child(3) { transform: rotate(3deg); z-index: 1; }
    .story-page .sx-app-phones li:nth-child(4) { transform: rotate(8deg) translateY(14px); }
    .story-page .sx-app-phones li:hover { transform: translateY(-10px) rotate(0) scale(1.05); z-index: 2; }
}

/* ---------- More fun strip ---------- */
.story-page .sx-fun { margin: 0 0 8px; }
.story-page .sx-fun-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: none;
}
.story-page .sx-fun-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.story-page .sx-fun-grid li { margin: 0; }
.story-page .sx-fun-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 8px;
    border: 1px solid var(--sx-line);
    border-radius: 16px;
    background: var(--sx-card);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
.story-page .sx-fun-link:hover {
    transform: translateY(-2px);
    border-color: var(--sx-lime);
    background: #2A2A2A;
    color: var(--sx-lime);
}
.story-page .sx-fun-emoji { font-size: 22px; line-height: 1; }
@media (min-width: 640px) {
    .story-page .sx-fun-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- FAQ (flat markup, no nested fixed-width container) ---------- */
.story-page .faq-section-wrapper {
    margin: 40px 0 0;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.story-page .faq-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.story-page .faq-header .faq-emoji { font-size: 30px; line-height: 1; }
.story-page .faq-header-text .faq-title {
    margin: 0;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: none;
}
.story-page .faq-header-text .faq-subtitle {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
}
@media (max-width: 480px) {
    .story-page .faq-header .faq-emoji { font-size: 26px; }
    .story-page .faq-header-text .faq-title { font-size: 24px; }
    .story-page .faq-header-text .faq-subtitle { font-size: 15px; }
}

/* ---------- Share row (wraps instead of running off the screen, 44px targets) ---------- */
.story-page .bottom { gap: 12px; }
.story-page .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.story-page .social-links li { display: block; }
.story-page.inner-content .bottom .widget-tag .social-links li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 16px;
    text-decoration: none;
}
.story-page .bottom .widget-tag { flex-wrap: wrap; gap: 8px 10px; }

/* ---------- Reduced motion: no wave, no hover movement ---------- */
@media (prefers-reduced-motion: reduce) {
    .story-page .sx-listen-wave i { animation: none; transform: scaleY(0.8); }
    .story-page .sx-listen,
    .story-page .sx-pill-link,
    .story-page .sx-video-facade img,
    .story-page .sx-video-play,
    .story-page .sx-app-primary,
    .story-page .sx-store,
    .story-page .sx-app-phones li,
    .story-page .sx-fun-link { transition: none; }
    .story-page .sx-listen:hover,
    .story-page .sx-app-primary:hover,
    .story-page .sx-store:hover,
    .story-page .sx-fun-link:hover,
    .story-page .sx-video-facade:hover .sx-video-play { transform: none; }
    .story-page .sx-video-facade:hover img { transform: none; }
}
