/* cFlash Stories - shared stylesheet
   Design tokens mirror the cflash.app landing (dark theme, orange primary, Inter font). */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #f39c12;
    --primary-dark: #d68910;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #2a2a3e;
    --success: #27ae60;
    --gradient-1: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.logo-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
    display: block;
    flex-shrink: 0;
}

.logo-suffix {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1;
}

.logo-compact .logo-img {
    height: 36px;
}

.logo-compact .logo-divider {
    height: 24px;
}

.logo-compact .logo-suffix {
    font-size: 1.1rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switcher {
    position: relative;
}

.lang-current {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.55rem 0.35rem 0.45rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.lang-current:hover,
.lang-current.open {
    color: var(--text-primary);
    border-color: var(--primary);
}

.lang-code {
    letter-spacing: 0.02em;
}

.lang-caret {
    width: 10px;
    height: 7px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.lang-current.open .lang-caret {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--primary);
}

.lang-flag {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* Main container */
.main-content {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero */
.hero {
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(243, 156, 18, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(231, 76, 60, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 .accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.65;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Hero (compact variant on list pages) */
.hero-compact {
    padding: 3.5rem 2rem 2rem;
}

.hero-compact h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 1rem;
}

.hero-compact .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Story list */
.story-list-section {
    padding: 2rem 2rem 5rem;
}

.story-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.story-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-1);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.story-card:hover {
    transform: translateY(-2px);
    border-color: rgba(243, 156, 18, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.story-card:hover::before {
    transform: scaleY(1);
}

.story-card-emoji {
    font-size: 2.25rem;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

.story-card-body {
    flex: 1;
    min-width: 0;
}

.story-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.story-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.story-card-meta-dot {
    opacity: 0.5;
}

.story-card-arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
    align-self: center;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.story-card:hover .story-card-arrow {
    color: var(--primary);
    transform: translateX(3px);
}

/* Empty state */
.empty-state {
    max-width: 520px;
    margin: 3rem auto;
    text-align: center;
    color: var(--text-secondary);
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 18px;
}

/* Pagination */
.pagination {
    max-width: 820px;
    margin: 2.5rem auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.pagination-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: color 0.2s, border-color 0.2s;
}

.pagination-link:hover:not(.disabled) {
    color: var(--primary);
    border-color: var(--primary);
}

.pagination-link.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Story detail article */
.story-article {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 2rem 5rem;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.story-article-meta-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.story-number-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    background: rgba(243, 156, 18, 0.12);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.story-article-updated {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.story-meta-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.2;
    cursor: help;
}

.story-meta-time time {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.story-meta-icon {
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.85;
}

@media (max-width: 640px) {
    .story-article-meta-top {
        gap: 0.4rem 0.6rem;
    }
    .story-meta-time,
    .story-meta-time time {
        font-size: 0.78rem;
    }
    .story-number-badge {
        font-size: 0.72rem;
        padding: 0.28rem 0.65rem;
    }
    .story-meta-icon {
        font-size: 0.82rem;
    }
}

.story-article-title-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.story-article-emoji {
    font-size: 2.75rem;
    line-height: 1.1;
    flex-shrink: 0;
}

.story-article-title {
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.story-article-narrative {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.75;
}

.story-article-narrative p {
    margin-bottom: 1.35rem;
}

.story-article-narrative p:last-child {
    margin-bottom: 0;
}

.story-article-narrative strong,
.story-article-narrative b {
    color: var(--text-primary);
    font-weight: 700;
}

.story-article-narrative em,
.story-article-narrative i {
    font-style: italic;
    color: var(--text-primary);
}

.story-article-narrative ul,
.story-article-narrative ol {
    margin: 0 0 1.35rem 1.5rem;
    padding: 0;
}

.story-article-narrative li {
    margin-bottom: 0.5rem;
}

.story-article-narrative li:last-child {
    margin-bottom: 0;
}

.story-article-narrative h2,
.story-article-narrative h3,
.story-article-narrative h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}

.story-article-narrative h2 { font-size: 1.5rem; }
.story-article-narrative h3 { font-size: 1.25rem; }
.story-article-narrative h4 { font-size: 1.1rem; }

.story-article-narrative blockquote {
    margin: 1.35rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid var(--primary);
    background: rgba(243, 156, 18, 0.05);
    color: var(--text-secondary);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.story-article-narrative code {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.story-article-narrative a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.story-article-narrative a:hover {
    color: var(--primary-dark);
}

/* AI attribution — sits between narrative and sources */
.story-attribution {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-top: 2.75rem;
    padding: 1.15rem 1.35rem;
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.32);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 500;
}

.story-attribution-icon {
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1.4;
}

.story-attribution-text {
    flex: 1;
}

/* App download CTA card */
.story-cta {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2.5rem;
    padding: 1.75rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.story-cta-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
}

.story-cta-headline {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.story-cta-subline {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.story-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.story-cta-btn {
    display: inline-block;
    line-height: 0;
    transition: transform 0.2s;
}

.story-cta-btn:hover {
    transform: translateY(-2px);
}

.story-cta-btn img {
    height: 50px;
    width: auto;
    display: block;
}

@media (max-width: 640px) {
    .story-cta {
        padding: 1.35rem 1.25rem;
        margin-top: 2rem;
    }
    .story-cta-headline { font-size: 1.1rem; }
    .story-cta-subline { font-size: 0.9rem; }
    .story-cta-btn img { height: 44px; }
}

/* Sources block */
.story-sources {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.story-sources-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.story-sources-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.story-source-item {
    display: block;
}

.story-source-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.story-source-link:hover {
    border-color: rgba(243, 156, 18, 0.35);
    transform: translateX(2px);
}

.story-source-emoji {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.story-source-body {
    flex: 1;
    min-width: 0;
}

.story-source-title {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.story-source-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.story-source-dot {
    opacity: 0.5;
}

.story-source-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.story-source-link:hover .story-source-arrow {
    color: var(--primary);
}

/* Error pages */
.error-section {
    padding: 6rem 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-inner {
    max-width: 500px;
}

.error-code {
    font-size: clamp(4rem, 10vw, 6rem);
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-inner h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.error-inner p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-1);
    color: var(--bg-dark);
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
    color: var(--bg-dark);
}

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-social {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-color);
    transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.social-link:hover {
    transform: translateY(-1px);
}

.social-x:hover {
    color: #fff;
    background: #000;
    border-color: #000;
}

.social-tg:hover {
    color: #fff;
    background: #229ED9;
    border-color: #229ED9;
}

.social-fb:hover {
    color: #fff;
    background: #1877F2;
    border-color: #1877F2;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .logo {
        gap: 0.5rem;
    }

    .logo-img {
        height: 42px;
    }

    .logo-divider {
        height: 26px;
    }

    .logo-suffix {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero-compact {
        padding: 2.5rem 1rem 1.5rem;
    }

    .story-list-section {
        padding: 1.5rem 1rem 3rem;
    }

    .story-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .story-card-emoji {
        font-size: 1.85rem;
    }

    .story-card-title {
        font-size: 1.1rem;
    }

    .story-card-arrow {
        display: none;
    }

    .story-article {
        padding: 1.75rem 1rem 4rem;
    }

    .story-article-title-row {
        gap: 0.75rem;
    }

    .story-article-emoji {
        font-size: 2.25rem;
    }

    .story-article-narrative {
        font-size: 1.02rem;
        line-height: 1.7;
    }

    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pagination-link {
        width: 100%;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links-group {
        align-items: flex-start;
    }
}

/* ===== Legal pages (privacy policy, terms of service) ===== */
.legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.legal-page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-page-header .back-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legal-page-header .back-link:hover {
    color: var(--primary);
}

.legal-page-title {
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.legal-page-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.legal-content {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.legal-content > p:first-child {
    color: var(--text-secondary);
    font-size: 1.02rem;
    margin-bottom: 1.5rem;
}

.legal-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.legal-content li {
    margin-bottom: 0.4rem;
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(243, 156, 18, 0.35);
    transition: color 0.2s, border-color 0.2s;
}

.legal-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.legal-content code {
    background: rgba(243, 156, 18, 0.1);
    color: var(--primary);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Menlo', monospace;
    font-size: 0.88em;
}

.highlight-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    margin: 1.25rem 0 1.5rem;
}

.highlight-box p {
    margin-bottom: 0;
}

.warning-box {
    background: rgba(243, 156, 18, 0.08);
    border: 1px solid rgba(243, 156, 18, 0.32);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    margin: 1.5rem 0;
}

.warning-box p {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

.warning-box strong {
    color: var(--primary);
}

.warning-box ul {
    color: var(--text-secondary);
    margin: 0.5rem 0 0.5rem 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.92rem;
}

.data-table th,
.data-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.data-table th {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.data-table td {
    color: var(--text-secondary);
}

.data-table code {
    background: rgba(243, 156, 18, 0.12);
    color: var(--primary);
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-size: 0.85em;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 1.5rem 1rem 3rem;
    }

    .legal-content {
        font-size: 0.95rem;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.55rem 0.5rem;
    }
}

/* Story detail: author byline (below title, above narrative) */
.story-byline-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.story-byline {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.75rem 0.4rem 0.4rem;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.story-byline:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--text-primary);
}

.story-byline-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-dark);
}

.story-byline-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.2;
    padding-right: 0.35rem;
}

.story-byline-prefix {
    color: var(--text-muted);
}

.story-byline-name {
    font-weight: 600;
    color: var(--text-primary);
}

.story-byline:hover .story-byline-name {
    color: var(--primary);
}

.story-byline-dot {
    color: var(--text-muted);
}

.story-byline-role {
    color: var(--text-secondary);
}

.story-edited {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.2;
    cursor: help;
}

.story-edited-icon {
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.8;
}

.story-edited-label {
    color: var(--text-muted);
}

.story-edited time {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .story-byline-row {
        gap: 0.55rem 0.75rem;
    }
    .story-edited,
    .story-edited time {
        font-size: 0.76rem;
    }
    .story-edited-icon {
        font-size: 0.78rem;
    }
}

/* Author page */
.author-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.author-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 2.5rem;
}

.author-hero-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
}

.author-hero-body {
    flex: 1;
    min-width: 0;
}

.author-hero-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.author-hero-role {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(243, 156, 18, 0.12);
    border: 1px solid rgba(243, 156, 18, 0.32);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.85rem;
}

.author-hero-bio {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0;
}

.author-stories-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
    letter-spacing: 0.01em;
}

@media (max-width: 640px) {
    .author-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.15rem;
        padding: 1.35rem;
    }

    .author-hero-avatar {
        width: 88px;
        height: 88px;
    }

    .author-hero-name {
        font-size: 1.5rem;
    }
}
