:root {
    --primary: #ef4444;
    /* UK Red */
    --primary-dark: #b91c1c;
    --secondary: #64748b;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --sidebar-width: 320px;
    --container-max: 1200px;
    --font-heading: "Noto Sans JP", sans-serif;
    --font-body: "Noto Sans JP", sans-serif;

    /* Category Colors */
    --color-reading: #ef4444;
    --color-listening: #3b82f6;
    --color-writing: #10b981;
    --color-speaking: #d4ac0d;
    /* Adjusted to Gold/Dark Yellow to avoid orange tint */
}



.text-listening {
    color: var(--color-listening) !important;
}

.text-writing {
    color: var(--color-writing) !important;
}

.text-speaking {
    color: var(--color-speaking) !important;
}

/* Nav Item Colors (Always visible) */
.nav-reading {
    color: var(--color-reading) !important;
}

.nav-listening {
    color: var(--color-listening) !important;
}

.nav-writing {
    color: var(--color-writing) !important;
}

.nav-speaking {
    color: var(--color-speaking) !important;
}

/* Hover effects */
.nav-reading:hover,
.nav-listening:hover,
.nav-writing:hover,
.nav-speaking:hover {
    opacity: 0.8;
}

/* Background Color Utilities (Solid) */
.bg-reading {
    background: linear-gradient(to right, #eff6ff, #dbeafe) !important;

    background-color: #fee2e2 !important;
}

.bg-listening {
    background: linear-gradient(to right, #eff6ff, #dbeafe) !important;

    background-color: #dbeafe !important;
}

.bg-writing {
    background: linear-gradient(to right, #fef2f2, #fee2e2) !important;

    background-color: #d1fae5 !important;
}

.bg-speaking {
    background: linear-gradient(to right, #fef2f2, #fee2e2) !important;

    background-color: #fef9c3 !important;
}

/* Light yellow solid */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* Header */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-inner {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    transform: translateY(-2px) scale(1.1);
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 2rem;
    padding: 2rem 0;
}

/* Main Content Area */
.content-area {
    min-width: 0;
}

/* Hero / Status Dashboard (Specific to Child Site) */
.dashboard-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    /* Reduced from 2rem */
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-delta {
    font-size: 0.8rem;
    color: #10b981;
}

/* Article List */
.article-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-thumb {
    height: 80px;
    /* Reduced from 200px */
    background-color: #cbd5e1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.article-body {
    padding: 1.5rem;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Single Article Styling */
.single-post header {
    margin-bottom: 2rem;
    border-bottom: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    position: static;
}

.single-post h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.data-notice {
    background-color: #fef2f2;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.adsense-placeholder {
    width: 100%;
    height: 250px;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-size: 0.8rem;
}

.profile-widget {
    text-align: center;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #cbd5e1;
    margin: 0 auto 1rem;
}

/* Footer */
footer.child-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }
}

/* --- New Compact Article List Style --- */
.article-item {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    overflow: hidden;
}

.article-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.article-item a {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    color: inherit;
    gap: 1.5rem;
}

.article-item .item-meta-group {
    display: flex;
    flex-direction: column;
    width: 180px;
    flex-shrink: 0;
}

.article-item .item-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.article-item .item-logo-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-item .item-logo {
    font-size: 1.5rem;
}

.article-item .item-click-hint {
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0.8;
}

.article-item .item-title-box {
    flex-grow: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.article-item .article-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-item .item-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Single Article Card Styling */
article.single-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.single-post header {
    padding: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    position: static;
    box-shadow: none;
}

.single-post header.bg-styled {
    padding: 1.5rem 2rem;
    background: transparent !important;
    border: none !important;
    margin-bottom: 0;
}

.single-post h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.post-content {
    padding: 2rem;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 1rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- Dynamic Category Color Sync --- */
.text-reading,
.nav-reading {
    color: var(--color-reading) !important;
}

.bg-reading {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.1)) !important;
    color: var(--color-reading) !important;
}

.single-post header.bg-reading {
    border-top: 4px solid var(--color-reading) !important;
}

.single-post header.bg-reading h1 {
    color: var(--color-reading) !important;
}

.text-listening,
.nav-listening {
    color: var(--color-listening) !important;
}

.bg-listening {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1)) !important;
    color: var(--color-listening) !important;
}

.single-post header.bg-listening {
    border-top: 4px solid var(--color-listening) !important;
}

.single-post header.bg-listening h1 {
    color: var(--color-listening) !important;
}

.text-writing,
.nav-writing {
    color: var(--color-writing) !important;
}

.bg-writing {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.1)) !important;
    color: var(--color-writing) !important;
}

.single-post header.bg-writing {
    border-top: 4px solid var(--color-writing) !important;
}

.single-post header.bg-writing h1 {
    color: var(--color-writing) !important;
}

.text-speaking,
.nav-speaking {
    color: var(--color-speaking) !important;
}

.bg-speaking {
    background: linear-gradient(135deg, rgba(212, 172, 13, 0.05), rgba(212, 172, 13, 0.1)) !important;
    color: var(--color-speaking) !important;
}

.single-post header.bg-speaking {
    border-top: 4px solid var(--color-speaking) !important;
}

.single-post header.bg-speaking h1 {
    color: var(--color-speaking) !important;
}