:root {
    --primary: #722F37;
    --primary-dark: #5A252C;
    --primary-light: #8B3D47;
    --primary-subtle: #F5ECED;
    
    --left: #2E5B9A;
    --left-bg: #E8F0F8;
    --centre: #4A5568;
    --centre-bg: #F0F2F5;
    --right: #9A432E;
    --right-bg: #F8ECE8;
    
    --text: #1A1A2E;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    
    --bg: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F0F2F5;
    
    --border: #E2E8F0;
    --border-light: #EDF2F7;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

ul {
    list-style: none;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Header */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 56px;
    width: auto;
}

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

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-subtle) 0%, var(--bg) 100%);
    padding: 64px 0;
    text-align: center;
}

.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

/* Search */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 520px;
    margin: 28px auto 0;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
}

.search-form input:focus {
    outline: 2px solid var(--primary-light);
    border-color: var(--primary-light);
}

/* Daily Briefing */
.briefing {
    background: var(--bg-secondary);
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.briefing-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.briefing-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.briefing-head h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    color: var(--primary);
}

.briefing-date {
    font-size: 13px;
    color: var(--text-muted);
}

.briefing-topics {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.briefing-topic {
    background: var(--primary-subtle);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.briefing-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
}

.briefing-col h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 20px;
}

.briefing-col h4:first-child {
    margin-top: 0;
}

.briefing-stories,
.briefing-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.briefing-stories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.briefing-stories a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.briefing-stories a:hover {
    color: var(--primary);
}

.briefing-counts {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.pip {
    min-width: 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    color: white;
}

.pip-left { background: var(--left); }
.pip-centre { background: var(--centre); }
.pip-right { background: var(--right); }

.briefing-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
}

.briefing-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.briefing-list li.muted,
li.muted {
    color: var(--text-muted);
    font-style: italic;
}

.briefing-list li.muted::before {
    color: var(--text-muted);
}

/* Topics Bar */
.topics-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 72px;
    z-index: 90;
}

.topics {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.topic-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    color: var(--text-secondary);
}

.topic-btn:hover {
    background: var(--border);
}

.topic-btn.active {
    background: var(--primary);
    color: white;
}

/* Section Title */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.section-title .section-count {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Stories Header */
.stories-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.stories-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.total-count {
    font-weight: 600;
    color: var(--primary);
}

.last-updated {
    color: var(--text-muted);
    font-size: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Story Section */
.story-section {
    margin-bottom: 48px;
}

.story-section:last-child {
    margin-bottom: 0;
}

.stories-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Stories Section */
.stories {
    padding: 48px 0;
}

/* Story Card */
.story-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.story-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.story-topic {
    background: var(--primary-subtle);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-time {
    font-size: 13px;
    color: var(--text-muted);
}

.story-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.story-title a {
    transition: var(--transition);
}

.story-title a:hover {
    color: var(--primary);
}

.story-summary {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Perspectives */
.perspectives {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.perspective {
    padding: 16px;
    border-radius: var(--radius);
    border-left: 4px solid;
}

.perspective-left {
    background: var(--left-bg);
    border-left-color: var(--left);
}

.perspective-centre {
    background: var(--centre-bg);
    border-left-color: var(--centre);
}

.perspective-right {
    background: var(--right-bg);
    border-left-color: var(--right);
}

.perspective-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.perspective-left .perspective-label {
    color: var(--left);
}

.perspective-centre .perspective-label {
    color: var(--centre);
}

.perspective-right .perspective-label {
    color: var(--right);
}

.perspective p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.source-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* Story Footer */
.story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.agreement-preview {
    font-size: 14px;
    color: var(--text-secondary);
}

.agreement-preview .label {
    font-weight: 600;
    color: var(--text);
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Newsletter */
.newsletter {
    background: var(--primary);
    padding: 64px 0;
}

.newsletter-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    color: white;
    margin-bottom: 12px;
}

.newsletter p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
}

.newsletter-form input:focus {
    outline: 2px solid var(--primary-light);
}

.newsletter-form .btn {
    background: white;
    color: var(--primary);
}

.newsletter-form .btn:hover {
    background: var(--bg-secondary);
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 12px;
    font-size: 14px;
}

.footer-logo {
    height: 48px;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
}

.footer-links h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Story Page Specific Styles */
.story-page {
    padding: 48px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    transition: var(--transition);
}

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

.story-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.story-page .story-title {
    font-size: 36px;
    margin-bottom: 8px;
}

.story-page .story-time {
    font-size: 14px;
}

.story-section {
    margin-bottom: 40px;
}

.story-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.neutral-summary {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
}

.neutral-summary p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.perspectives-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.perspective-detailed {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.perspective-detailed.left {
    background: var(--left-bg);
    border: 1px solid var(--left);
}

.perspective-detailed.right {
    background: var(--right-bg);
    border: 1px solid var(--right);
}

.perspective-detailed h3 {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perspective-detailed.left h3 {
    color: var(--left);
}

.perspective-detailed.right h3 {
    color: var(--right);
}

.perspective-detailed p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.agreements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.agreement-box,
.disagreement-box {
    padding: 20px;
    border-radius: var(--radius);
}

.agreement-box {
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
}

.disagreement-box {
    background: #FFF3E0;
    border-left: 4px solid #FF9800;
}

.agreement-box h4,
.disagreement-box h4 {
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agreement-box h4 {
    color: #2E7D32;
}

.disagreement-box h4 {
    color: #E65100;
}

.agreement-box ul,
.disagreement-box ul {
    list-style: none;
}

.agreement-box li,
.disagreement-box li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.agreement-box li:last-child,
.disagreement-box li:last-child {
    border-bottom: none;
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.source-item:hover {
    background: var(--bg-tertiary);
}

.source-info {
    flex: 1;
}

.source-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.source-headline {
    font-size: 14px;
    color: var(--text-secondary);
}

.source-bias {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.source-bias.left {
    background: var(--left-bg);
    color: var(--left);
}

.source-bias.centre {
    background: var(--centre-bg);
    color: var(--centre);
}

.source-bias.right {
    background: var(--right-bg);
    color: var(--right);
}

/* Sources Page */
.sources-page {
    padding: 48px 0;
}

.sources-intro {
    max-width: 700px;
    margin-bottom: 40px;
}

.sources-intro p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.source-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.source-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.source-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.source-card h3 {
    font-size: 16px;
    font-weight: 600;
}

.source-card-country {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.source-card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.bias-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.bias-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}

.bias-dot.active.left {
    background: var(--left);
}

.bias-dot.active.centre-left {
    background: #5B7FB8;
}

.bias-dot.active.centre {
    background: var(--centre);
}

.bias-dot.active.centre-right {
    background: #B86B5B;
}

.bias-dot.active.right {
    background: var(--right);
}

.bias-label {
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* About Page */
.about-page {
    padding: 48px 0;
}

.about-hero {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.about-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 16px;
}

.about-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-section {
    margin-bottom: 48px;
}

.about-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    color: var(--text);
    margin-bottom: 20px;
}

.about-section p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

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

.methodology-item {
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.methodology-item .number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.methodology-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.methodology-item p {
    font-size: 14px;
    margin-bottom: 0;
}

/* Perspective dots */
.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

.dot-left { background: var(--left); }
.dot-right { background: var(--right); }

/* Blind spot lists */
.blind-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blind-list li {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
}

.blind-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Loading & error states */
.story-loading,
.state-box {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.state-box.error {
    background: #FDECEA;
    color: #B03A2E;
}

.story-error {
    padding: 32px 0;
    color: var(--text-secondary);
}

.story-loading {
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Search results */
.search-result {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.search-result:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.result-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    align-self: flex-start;
    background: var(--primary-subtle);
    padding: 2px 8px;
    border-radius: 10px;
}

.result-type.result-left { background: var(--left-bg); color: var(--left); }
.result-type.result-centre { background: var(--centre-bg); color: var(--centre); }
.result-type.result-right { background: var(--right-bg); color: var(--right); }

.result-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
}

.result-snippet {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
    .perspectives {
        grid-template-columns: 1fr;
    }
    
    .perspectives-detailed {
        grid-template-columns: 1fr;
    }
    
    .agreements-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .sources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .methodology-grid {
        grid-template-columns: 1fr;
    }

    .briefing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .nav-links {
        display: none;
    }
    
    .story-title {
        font-size: 20px;
    }
    
    .story-page .story-title {
        font-size: 28px;
    }
    
    .newsletter-form,
    .search-form {
        flex-direction: column;
    }
    
    .story-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .sources-grid {
        grid-template-columns: 1fr;
    }
}
