@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&display=swap');

:root {
    --bg-page: #faf9f6; /* Warm Editorial Off-White Paper */
    --card-paper: #ffffff;
    --text-primary: #121316;
    --text-secondary: #64676e;
    --accent-emerald: #0f766e; /* Deep Editorial Emerald */
    --accent-soft: rgba(15, 118, 110, 0.08);
    --border-light: #e5e4df;
    --font-ui: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-serif: 'Newsreader', Georgia, serif;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
    min-height: 100vh;
}

/* Warm Clean Editorial Header */
header {
    position: sticky;
    top: 0;
    background: rgba(250, 249, 246, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.brand-logo svg {
    color: var(--accent-emerald);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-emerald);
}

.btn-editorial {
    padding: 9px 20px;
    background: var(--text-primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-editorial:hover {
    background: var(--accent-emerald);
}

/* Layout Container */
.main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* Hero Editorial */
.hero-editorial {
    text-align: center;
    margin-bottom: 50px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-soft);
    color: var(--accent-emerald);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Editorial Input Form */
.url-input-card {
    background: var(--card-paper);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.url-input-card input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-ui);
}

.btn-parse {
    padding: 12px 28px;
    background: var(--accent-emerald);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-parse:hover {
    opacity: 0.9;
}

/* Reading Sheet Container (Minimal Paper View) */
.paper-reader-sheet {
    display: none;
    background: var(--card-paper);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 60px;
    margin: 40px auto 60px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

.reader-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.controls-group {
    display: flex;
    gap: 10px;
}

.ctrl-btn {
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-btn:hover, .ctrl-btn.active {
    background: var(--accent-emerald);
    color: #fff;
    border-color: var(--accent-emerald);
}

.article-headline {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 16px;
}

.article-meta-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-body-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.85;
    color: #27272a;
}

.article-body-text p {
    margin-bottom: 24px;
}

.article-body-text h1, .article-body-text h2, .article-body-text h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 36px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-body-text h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.article-body-text h3 {
    font-size: 1.4rem;
}

.article-body-text ul, .article-body-text ol {
    margin-bottom: 24px;
    padding-left: 28px;
}

.article-body-text li {
    margin-bottom: 8px;
}

.article-body-text blockquote {
    border-left: 3px solid var(--accent-emerald);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-body-text a {
    color: var(--accent-emerald);
    text-decoration: underline;
}

/* Deep Research Panel */
.deep-research-panel {
    background: #f4f3ee;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 36px;
}

.deep-research-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.deep-research-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-emerald);
}

.deep-topics-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.deep-topic-pill {
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.deep-topic-pill:hover {
    background: var(--accent-emerald);
    color: #fff;
    border-color: var(--accent-emerald);
}

/* Research Toggle in Input Bar */
.toggle-research-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.toggle-switch-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-switch-label input[type="checkbox"] {
    accent-color: var(--accent-emerald);
    width: 16px;
    height: 16px;
    cursor: pointer;
}


/* Executive Summary (TL;DR / i5tisar) Card */
.summary-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.summary-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #166534;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-bullets li {
    font-size: 0.95rem;
    color: #14532d;
    line-height: 1.6;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.summary-bullets li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--accent-emerald);
    font-weight: bold;
}

.summary-stats-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--accent-emerald);
    border-radius: 12px;
}

/* Feature Cards Grid (Editorial Clean) */

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 80px;
}

.editorial-card {
    background: var(--card-paper);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 32px;
}

.editorial-card-icon {
    color: var(--accent-emerald);
    margin-bottom: 16px;
}

.editorial-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.editorial-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

footer {
    border-top: 1px solid var(--border-light);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Translation Bar & Controls */
.translation-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px dashed var(--border-light);
    flex-wrap: wrap;
}

.trans-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.trans-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.trans-pill {
    padding: 6px 12px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.trans-pill:hover, .trans-pill.active {
    background: var(--accent-emerald);
    color: #fff;
    border-color: var(--accent-emerald);
}

.trans-status {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-emerald);
    margin-left: auto;
    font-style: italic;
}

/* Quick Topic Suggestion Chips */
.quick-topics {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.topic-tag-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.topic-chip {
    padding: 6px 14px;
    background: var(--card-paper);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.topic-chip:hover {
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .editorial-grid { grid-template-columns: 1fr; }
    .url-input-card { flex-direction: column; }
    .paper-reader-sheet { padding: 24px; }
    .reader-header-bar { flex-direction: column; gap: 16px; align-items: flex-start; }
}

