:root {
    --bg: #ffffff;
    --bg-soft: #f6f5f1;
    --bg-card: #faf8f4;
    --text: #0a0a0a;
    --text-muted: #4a4a4a;
    --text-dim: #8a8a8a;
    --accent: #1da1f2;
    --accent-soft: #0d8ddb;
    --line: #e6e3dc;
    
    /* Legacy compatibility */
    --bg-primary: var(--bg-soft);
    --bg-secondary: var(--bg-soft);
    --bg-card-hover: #ebe5db;
    --text-primary: var(--text);
    --text-secondary: #555555;
    --accent-purple: var(--accent);
    --accent-gold: var(--accent);
    --border-color: var(--line);
    --gradient-purple: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
}

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

/* ============================================
   SVG Icons Standardization
   ============================================ */
svg {
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Ensure icons inherit color properly */
svg:not([fill]) {
    fill: none;
}

svg:not([stroke]) {
    stroke: currentColor;
}

body {
    font-family: 'Thmanyah Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    padding-top: 68px;
}

/* ============================================
   Typography - نظام خطوط ثمانية الموحد
   ============================================ */

/* العناوين الرئيسية - Thmanyah Display Bold */
h1, .page-title, .hero-title, .main-title {
    font-family: 'Thmanyah Display', serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 24px;
}

/* عناوين الأقسام - Thmanyah Display Medium */
h2, .section-title {
    font-family: 'Thmanyah Display', serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* العناوين الفرعية - Thmanyah Serif Bold */
h3, h4, .subsection-title {
    font-family: 'Thmanyah Serif', serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 16px;
}

/* عناوين البطاقات والمحتوى - Thmanyah Serif Medium */
h5, h6,
.card-title,
.node-card-title,
.entity-name,
.article-title,
.poem-title {
    font-family: 'Thmanyah Display', serif;
    font-weight: 500;
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* النصوص والمحتوى - Thmanyah Sans Regular */
p, span, div, body,
.node-description,
.card-description,
.article-excerpt,
.text-content {
    font-family: 'Thmanyah Display', serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.8;
}

/* العناوين الفرعية والتسميات - Thmanyah Sans Medium */
.section-subtitle,
.card-type-name,
.node-card-type-name,
.label,
.badge {
    font-family: 'Thmanyah Display', serif;
    font-weight: 500;
    font-size: 13px;
}

/* أرقام وتفاصيل صغيرة - Thmanyah Sans Light */
.meta-info,
.date,
.count {
    font-family: 'Thmanyah Display', serif;
    font-weight: 300;
    font-size: 12px;
}

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

/* a:hover {
    color: var(--accent-purple);
} */

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

/* ============ TOPBAR ============ */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.topbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: transparent;
}
.topbar-inner {
    max-width: 1560px;
    margin: 0 auto;
    padding: 18px 128px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    position: relative;
}

/* Brand group */
.brand-group {
    display: inline-flex;
    align-items: center;
    gap: 18px;
}
.brand-group > * { align-self: center; }
.brand-group > .pages-toggle { align-self: center; }
.brand-group > .brand { align-self: center; }
.brand-group > .brand-nav { align-self: center; }

/* Hamburger toggle — hidden in new design, brand-nav replaces it */
.pages-toggle {
    display: none !important;
}
.pages-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 13px;
}
.pages-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(.22,1,.36,1), opacity 0.2s ease;
    transform-origin: center;
}
body.pages-open .pages-toggle { color: var(--accent); }
body.pages-open .pages-burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.pages-open .pages-burger span:nth-child(2) { opacity: 0; transform: scaleX(0.4); }
body.pages-open .pages-burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Brand */
.brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    vertical-align: middle;
}
.brand:hover { color: var(--accent); transform: translateY(-1px); }
.brand:active { transform: translateY(0); }
.brand-logo {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.brand-name {
    font-family: 'Thmanyah Display', serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.5px;
    line-height: 1;
}
.brand-sup {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    overflow: hidden;
    flex-shrink: 0;
}
.brand:hover .brand-sup { background: var(--accent-soft); }
.brand-sup svg { display: block; width: 18px; height: 18px; }
.brand-sup img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    border-radius: 0;
    display: block;
    flex-shrink: 0;
}

/* Main page navigation next to the logo */
.brand-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: 10px;
}
.brand-nav-link {
    position: relative;
    padding: 4px 12px;
    font-family: 'Thmanyah Display', serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: -0.005em;
    line-height: 1;
    vertical-align: middle;
    transition: color 0.25s ease;
}
.brand-nav-link:hover { color: var(--text); }
.brand-nav-link.active { color: var(--accent); font-weight: 700; }

/* Auth Section */
.auth {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-inline-start: auto;
}

/* Nav cluster (search + home button) */
.nav-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
    margin-inline-start: 8px;
    margin-inline-end: auto;
}
.home-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    transition: color 0.2s ease, transform 0.2s ease;
}
.home-btn:hover { color: var(--accent); transform: scale(1.06); }
.home-btn:active { transform: scale(0.97); }
.home-btn svg { display: block; width: 22px; height: 22px; stroke-width: 2.2; }

/* Editorial underline search */
.search-pill {
    position: relative;
    flex: 0 1 300px;
    width: 300px;
    min-width: 0;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text);
    cursor: text;
}
.search-pill::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1px;
    background: color-mix(in srgb, var(--text) 18%, transparent);
    transition: background 0.25s ease;
}
.search-pill::after {
    content: "";
    position: absolute;
    inset-inline: 50%;
    bottom: 0;
    height: 1.5px;
    background: var(--accent);
    transform: translateX(0);
    transition: inset 0.35s cubic-bezier(.22,1,.36,1);
}
.search-pill:hover::before { background: color-mix(in srgb, var(--text) 30%, transparent); }
.search-pill:focus-within::before { background: transparent; }
.search-pill:focus-within::after { inset-inline: 0; }
.search-pill .sp-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    color: var(--text);
    transition: color 0.2s ease;
}
.search-pill:focus-within .sp-icon { color: var(--accent); }
.search-pill .sp-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Thmanyah Display', serif;
    font-size: 13px;
    color: var(--text);
    height: 100%;
    padding: 0;
}
.search-pill .sp-input::placeholder { color: var(--text-muted); opacity: 0.85; }
.search-pill .sp-input::-webkit-search-cancel-button { display: none; }

/* Buttons */
.btn {
    font-family: 'Thmanyah Display', serif;
    font-weight: 500;
    font-size: 15px;
    padding: 9px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-solid {
    background: var(--accent);
    color: #ffffff;
}

.btn-solid:hover {
    background: var(--accent-soft);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: rgba(10, 10, 10, 0.2);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Pages Panel Styles */
.pages-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    z-index: 1100;
}

body.pages-open .pages-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s;
}

.pages-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 25vw;
    min-width: 320px;
    max-width: 420px;
    background: #fff;
    border: none;
    border-radius: 22px 0 0 22px;
    padding: 0;
    box-shadow: -24px 0 60px rgba(20,20,20,0.16), -8px 0 22px rgba(20,20,20,0.06);
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(.22,1,.36,1);
    z-index: 1101;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
}

body.pages-open .pages-dropdown {
    transform: translateX(0);
}

.pages-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}

.pages-panel-title {
    font-family: 'Thmanyah Display', serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.pages-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pages-panel-close:hover {
    background: var(--bg-soft);
    color: var(--accent);
    transform: rotate(90deg);
}

.pages-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-radius: 0;
    font-family: 'Thmanyah Display', serif;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease, padding-inline-start 0.25s ease;
}

.pages-item svg {
    flex: 0 0 auto;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    transition: color 0.2s ease;
}

.pages-item::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.pages-item:hover {
    background: var(--bg-soft);
    color: var(--accent);
    padding-inline-start: 30px;
}

.pages-item:hover svg {
    color: var(--accent);
}

.pages-item:hover::before {
    transform: scaleY(1);
}

.pages-divider {
    height: 1px;
    margin: 10px 24px;
    background: var(--line);
}

body.pages-open {
    overflow: hidden;
}

/* ============ Section search (inline) ============ */
.section-search {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    cursor: text;
    flex: 0 0 auto;
}
.section-search::after { display: none; }
.section-search-icon-btn {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 0;
    padding: 0;
    transition: color 0.3s ease, transform 0.3s ease;
}
.section-search-icon-btn svg { width: 18px; height: 18px; }
.section-search:hover .section-search-icon-btn { color: var(--text); }
.section-search:focus-within .section-search-icon-btn {
    color: var(--accent);
    transform: none;
}
.section-search-input {
    flex: 0 0 auto;
    min-width: 0;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    outline: none;
    background: transparent;
    box-shadow: none;
    font-family: 'Thmanyah Display', serif;
    font-size: 15.5px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    field-sizing: content;
    width: auto;
    min-width: 110px;
    max-width: 320px;
    padding: 2px 0 4px;
    letter-spacing: -0.005em;
    transition: border-bottom-color 0.3s ease, border-bottom-width 0.3s ease;
}
.section-search:hover .section-search-input {
    border-bottom-color: color-mix(in srgb, var(--text) 28%, transparent);
}
.section-search:focus-within .section-search-input {
    border-bottom-color: var(--accent);
    border-bottom-width: 2px;
    padding-bottom: 3px;
}
.section-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
    font-weight: 400;
}
.section-search-input::-webkit-search-cancel-button { display: none; }
.section-search-kbd { display: none; }

/* More link */
.more-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 2px;
    font-family: 'Thmanyah Display', serif;
    font-size: 18.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.015em;
    transition: color 0.3s ease;
    margin-inline-start: auto;
}
.more-link::after {
    content: "";
    position: absolute;
    inset-inline-start: 2px;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    transition: width 0.4s cubic-bezier(.22,1,.36,1);
}
.more-link:hover { color: var(--accent); }
.more-link:hover::after { width: calc(100% - 4px); }
.more-link .more-arrow {
    flex: 0 0 auto;
    transition: transform 0.35s cubic-bezier(.22,1,.36,1), color 0.3s ease;
}
.more-link:hover .more-arrow { transform: translateX(-5px); }
.more-link svg { transition: transform 0.35s cubic-bezier(.22,1,.36,1); }
.more-link:hover svg { transform: translateX(-5px); }

/* ============ HERO SECTION ============ */
.hero {
    padding: 100px 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    color: var(--accent-purple);
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

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

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============ STATS ============ */
.stats-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 32px 24px;
    background: transparent;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-purple);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ============ SECTION HEADER ============ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
}

.section-link {
    color: var(--accent-purple);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-link:hover {
    gap: 12px;
}

/* ============ CARDS GRID ============ */
.section {
    padding: 50px 0;
}

.section-alt {
    background: transparent;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.content-card {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
    padding: 16px;
    margin: -16px;
}

.content-card:hover {
    background: var(--bg-card-hover);
}

.card-image {
    height: 180px;
    background: #e8e3db;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image i {
    font-size: 40px;
    color: var(--text-muted);
}

/* Circular Card Style */
.card-circle {
    flex-direction: row;
    align-items: center;
    gap: 16px;
}
.card-circle .card-image-circle {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}
.card-circle .card-image-circle img {
    border-radius: 50%;
}
.card-circle .card-body {
    padding: 12px 0;
    flex: 1;
}
.card-circle .card-badge {
    position: static;
    margin-top: 8px;
    display: inline-block;
}
.card-circle .card-footer {
    display: none;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-purple);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-category {
    color: var(--accent-purple);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-meta {
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ TYPE CARDS ============ */
.type-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.type-card {
    background: transparent;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.type-card:hover {
    background: var(--bg-card-hover);
}

.type-card i {
    font-size: 40px;
    color: var(--accent-purple);
    margin-bottom: 16px;
}

.type-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.type-card span {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============ POETS SECTION ============ */
.poets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.poet-card {
    text-align: center;
    padding: 24px;
    background: transparent;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.poet-card:hover {
    background: var(--bg-card-hover);
}

.poet-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.poet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poet-avatar i {
    font-size: 32px;
    color: var(--text-muted);
}

.poet-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

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

/* ============ FOOTER (Minimal Design) ============ */
.footer-minimal {
    background: var(--bg);
    padding: 36px 0;
    border-top: 1px solid var(--line);
    position: relative;
    margin-top: 20px;
}

.footer-minimal::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: min(280px, 50%);
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 60%, transparent) 50%, transparent 100%);
}

.footer-min-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 24px;
    max-width: 100%;
}

.footer-min-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 28%, transparent);
}

.footer-min-mark svg {
    width: 12px;
    height: 12px;
    display: block;
}

.footer-min-text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Thmanyah Display', serif;
    color: var(--text-muted);
    font-size: 13.5px;
    letter-spacing: 0.01em;
}

.footer-min-name {
    font-family: 'Thmanyah Display', serif;
    font-weight: 800;
    font-size: 16px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.footer-min-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.55;
    display: inline-block;
}

.footer-min-rights {
    font-weight: 500;
}

/* ============ SEARCH MODAL ============ */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    padding: 100px 24px;
}

.search-modal.active {
    display: block;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper input {
    width: 100%;
    padding: 20px 24px;
    padding-right: 60px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.search-input-wrapper i {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
}

.search-close {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.search-results {
    margin-top: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: block;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--bg-card-hover);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent-purple);
}

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.pagination a:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.pagination .current {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
    font-weight: 600;
}

/* ============ VERSE STYLES ============ */
.verse-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border-right: 4px solid var(--accent-purple);
}

.verse-text {
    font-size: 20px;
    line-height: 2;
    text-align: center;
}

.verse-separator {
    color: var(--accent-purple);
    margin: 0 24px;
}

/* ============ TAGS ============ */
.tag {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
}

/* ============ BADGES ============ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: var(--accent-purple);
    color: #fff;
}

.badge-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Network Graph */
#network-graph {
    height: 400px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

/* Account bar — logged-in navbar */
.account-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Thmanyah Display', serif;
}

/* Standalone icon buttons (dashboard, logout) */
.account-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.account-icon-btn:hover {
    background: var(--bg-soft);
    color: var(--accent);
}
.account-icon-btn svg {
    display: block;
    flex-shrink: 0;
}

/* User name + avatar pill */
.account-name-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px 0 4px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 999px;
    max-width: 200px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.account-name-link:hover {
    background: var(--bg-soft);
    border-color: color-mix(in srgb, var(--text) 22%, var(--line));
    color: var(--accent);
}
.account-name-text {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    order: 1;
}
.nav-avatar-badge {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 80%, #000));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Thmanyah Display', serif;
    font-weight: 800;
    font-size: 11px;
    order: 2;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--accent) 28%, transparent);
    overflow: hidden;
}
.nav-avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* ============ Publishers Squares Section ============ */
.publishers-squares {
    background: var(--bg-soft);
    padding: 24px 0 28px;
    border-top: 1px solid var(--line);
}
.publishers-squares-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 128px;
}
.publishers-squares-head {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}
.publishers-squares-head .more-link { margin-inline-start: auto; }
.publishers-squares-head .section-heading { 
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-heading {
    font-family: 'Thmanyah Display', serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--text);
    letter-spacing: -0.3px;
}
.section-heading svg {
    flex: 0 0 auto;
    opacity: 0.85;
}

.squares-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.square-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--c);
    color: var(--ink);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 0 rgba(0,0,0,0.10);
}
.square-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(255,255,255,0.18), transparent 55%),
                radial-gradient(ellipse at bottom left, rgba(0,0,0,0.16), transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.square-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.10);
}

.sq-name {
    position: relative;
    z-index: 1;
    font-family: 'Thmanyah Display', serif;
    font-weight: 900;
    font-size: clamp(14px, 1.05vw, 18px);
    line-height: 1.05;
    letter-spacing: -0.6px;
    text-align: center;
    padding: 0 8px;
}

/* ============ Top Contributors Section ============ */
.top-contributors {
    background: var(--bg);
    padding: 28px 0 36px;
    border-top: 1px solid var(--line);
}
.top-contributors-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 128px;
}
.top-contributors-head {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
}
.top-contributors-head .more-link { margin-inline-start: auto; }
.top-contributors-head .section-heading { margin-bottom: 0; }

.tc-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
}
.tc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s cubic-bezier(.22,1,.36,1);
}
.tc-card:hover { 
    transform: translateY(-3px); 
}

.tc-avatar {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-soft);
    box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(20,20,20,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.tc-card:hover .tc-avatar {
    box-shadow: 0 0 0 2px var(--accent), 0 12px 28px rgba(20,20,20,0.10),
                0 4px 10px color-mix(in srgb, var(--accent) 22%, transparent);
}
.tc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}
.tc-card:hover .tc-avatar img { 
    transform: scale(1.06); 
}

.tc-name {
    font-family: 'Thmanyah Display', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    line-height: 1.35;
    letter-spacing: -0.005em;
    transition: color 0.25s ease;
}
.tc-card:hover .tc-name { 
    color: var(--accent); 
}

/* ============ Latest Topics Section ============ */
.latest-topics-section {
    background: var(--bg);
    padding: 0 0 24px;
}
.latest-topics-inner {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 128px;
}
.lt-head {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: none;
    border-top: 1px solid var(--line);
    padding-top: 22px;
    padding-bottom: 0;
    margin-bottom: 22px;
}
.lt-head .lt-more-link { margin-inline-start: auto; }
.lt-title {
    font-family: 'Thmanyah Display', serif;
    font-weight: 800;
    font-size: 24px;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.3px;
}
.lt-tabs {
    width: 100%;
    margin-inline-start: 0;
    margin-top: 4px;
    padding-top: 0;
    border-top: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}
.lt-tab {
    position: relative;
    background: color-mix(in srgb, var(--text) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
    cursor: pointer;
    padding: 9px 18px;
    border-radius: 999px;
    font-family: 'Thmanyah Display', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.2;
    transition: background 0.25s ease, border-color 0.25s ease,
                color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.lt-tab + .lt-tab::before { display: none; }
.lt-tab:hover {
    background: color-mix(in srgb, var(--text) 7%, transparent);
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    color: var(--text);
    transform: translateY(-1px);
}
.lt-tab.active {
    background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 88%, #000) 100%);
    color: #fff;
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 4px 12px color-mix(in srgb, var(--accent) 28%, transparent);
    transform: none;
}
.lt-tab.active:hover { transform: none; filter: brightness(1.04); }

.lt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 36px;
    row-gap: 28px;
}
.lt-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    column-gap: 18px;
    align-items: start;
    min-width: 0;
    transition: transform 0.35s cubic-bezier(.22,1,.36,1);
}
.lt-card:hover { 
    transform: translateY(-2px); 
}
.lt-thumb-wrapper {
    grid-column: 1;
    grid-row: 1 / span 4;
    position: relative;
    width: 140px;
    height: 140px;
}
.lt-thumb {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-soft);
    border-radius: 14px;
    overflow: hidden;
    transition: filter 0.35s ease, transform 0.5s cubic-bezier(.22,1,.36,1);
}
.lt-card:hover .lt-thumb {
    filter: brightness(1.04);
    transform: scale(1.02);
}
.lt-body {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    min-width: 0;
}
.lt-card-title {
    font-family: 'Thmanyah Display', serif;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.32;
    margin: 0 0 10px;
    color: var(--text);
    letter-spacing: -0.2px;
    overflow-wrap: break-word;
}
.lt-card-title a { 
    color: inherit;
    text-decoration: none;
}
.lt-card-title a:hover { 
    color: var(--accent); 
}
.lt-desc {
    font-family: 'Thmanyah Display', serif;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lt-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-family: 'Thmanyah Display', serif;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}
.lt-meta .avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Thmanyah Display', serif;
    font-weight: 700;
    font-size: 10.5px;
    margin-inline-end: 2px;
}
.lt-meta .lt-author {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.lt-meta .lt-author:hover { 
    color: var(--text);
    text-decoration: none;
}
.lt-meta .pub-link {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.lt-meta .pub-link:hover { 
    color: var(--accent);
    text-decoration: none;
}
.lt-meta strong {
    color: var(--text);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.lt-meta strong::before {
    content: "✱";
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.lt-meta .dot-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
    margin: 0 3px;
}

/* Load more */
.lt-card.lt-hidden { display: none !important; }
.lt-card.lt-reveal { animation: ltReveal 0.5s cubic-bezier(.22,1,.36,1) both; }
@keyframes ltReveal {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lt-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 40px auto 8px;
    padding: 8px 4px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: 'Thmanyah Display', serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s ease, opacity 0.4s ease, transform 0.2s ease;
}
.lt-load-more:hover { color: var(--accent-soft); }
.lt-load-more.is-loading { pointer-events: none; }
.lt-load-more.is-loading .lt-load-spinner { display: inline-block; }
.lt-load-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ltSpin 0.7s linear infinite;
}
@keyframes ltSpin { to { transform: rotate(360deg); } }
.lt-load-more.is-done { opacity: 0; pointer-events: none; transform: scale(0.9); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .publishers-squares-inner,
    .top-contributors-inner,
    .latest-topics-inner {
        padding: 0 56px;
    }
    .squares-row { 
        grid-template-columns: repeat(4, 1fr); 
        gap: 16px; 
    }
    .tc-grid { 
        grid-template-columns: repeat(4, 1fr); 
        gap: 22px 18px; 
    }
    .lt-grid { 
        grid-template-columns: repeat(2, 1fr); 
        column-gap: 32px; 
    }
}

@media (max-width: 1100px) {
    .search-pill { width: 300px; flex-basis: 300px; }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-cluster { margin-inline-start: 20px; }
    .search-pill { width: 240px; flex-basis: 240px; }
}

@media (max-width: 768px) {
    /* Dynamic Font Sizes */
    .hero h1 {
        font-size: clamp(28px, 8vw, 56px);
    }
    
    .hero p {
        font-size: clamp(14px, 4vw, 20px);
    }
    
    .section-title {
        font-size: clamp(22px, 6vw, 32px);
    }
    
    .stat-number {
        font-size: clamp(32px, 8vw, 48px);
    }
    
    .stat-label {
        font-size: clamp(13px, 3.5vw, 16px);
    }
    
    .card-title {
        font-size: clamp(15px, 4vw, 18px);
    }
    
    .card-description {
        font-size: clamp(13px, 3.5vw, 14px);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    /* Section Header - Keep in row */
    .section-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
    }
    
    .section-link {
        font-size: 14px;
    }
    
    /* Container padding */
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 48px 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    /* Cards */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-image {
        height: 160px;
    }
    
    .card-image i {
        font-size: 32px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .content-card {
        padding: 12px;
        margin: -12px;
    }
    
    .type-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .type-card {
        padding: 20px 16px;
    }
    
    .type-card i {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .type-card h3 {
        font-size: 15px;
    }
    
    /* Poets grid */
    .poets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .poet-card {
        padding: 16px;
    }
    
    .poet-avatar {
        width: 60px;
        height: 60px;
    }
    
    .poet-name {
        font-size: 14px;
    }
    
    /* Header */
    .header-content {
        height: 60px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo i {
        font-size: 22px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Footer */
    .footer-title {
        font-size: 15px;
    }
    
    .footer-links a {
        font-size: 13px;
    }
}

@media (max-width: 760px) {
    .brand-nav { display: none; }
    .pages-dropdown {
        width: 80vw;
        min-width: 0;
        max-width: 360px;
        border-radius: 18px 0 0 18px;
    }
}

@media (max-width: 720px) {
    body { padding-top: 56px; }
    .topbar-inner { padding: 10px 12px; }
    .brand-group { gap: 12px; }
    .brand { gap: 6px; }
    .brand-logo { width: 32px !important; height: 32px !important; max-width: 32px !important; max-height: 32px !important; min-width: 32px; min-height: 32px; border-radius: 6px; }
    .brand-name { font-size: 20px; }
    .brand-sup { width: 28px !important; height: 28px !important; }
    .brand-sup svg { width: 14px; height: 14px; }
    .brand-nav { display: none; }
    .nav-cluster { margin-inline-start: 14px; gap: 6px; flex: 1 1 auto; }
    .home-btn { width: 40px; height: 40px; }
    .home-btn svg { width: 20px; height: 20px; }
    .search-pill { flex: 1 1 auto; width: auto; min-width: 0; height: 40px; padding: 0 14px; gap: 8px; }
    .search-pill .sp-icon { width: 18px; height: 18px; }
    .search-pill .sp-input { font-size: 13.5px; }
    .auth { margin-inline-start: 8px; gap: 8px; }
    .account-bar { gap: 4px; }
    .account-icon-btn { 
        width: 34px; 
        height: 34px; 
        flex-shrink: 0;
    }
    .account-icon-btn svg {
        width: 16px;
        height: 16px;
    }
    .account-name-link {
        max-width: none;
    }
    
    .publishers-squares-inner,
    .top-contributors-inner,
    .latest-topics-inner {
        padding: 0 20px;
    }
    .publishers-squares {
        padding: 10px 0 4px;
    }
    .publishers-squares-head,
    .top-contributors-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }
    .publishers-squares-head .section-heading,
    .top-contributors-head .section-heading {
        font-size: 18px;
        margin: 0;
        flex: 0 0 auto;
    }
    .publishers-squares-head .more-link,
    .top-contributors-head .more-link {
        margin-inline-start: auto;
        font-size: 13px;
        order: 1;
    }
    .publishers-squares-head .section-search,
    .top-contributors-head .section-search {
        display: none;
    }
    .squares-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .square-tile {
        border-radius: 12px;
    }
    .sq-name {
        font-size: 14px;
    }
    .top-contributors {
        padding: 10px 0 4px;
    }
    .tc-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px 10px;
    }
    .tc-avatar {
        max-width: 64px;
    }
    .tc-name {
        font-size: 11.5px;
    }
    .latest-topics-section {
        padding: 20px 0 24px;
    }
    .lt-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding-top: 14px;
        margin-bottom: 14px;
    }
    .lt-head .lt-title {
        flex: 0 0 auto;
        font-size: 18px;
    }
    .lt-head .lt-more-link {
        margin-inline-start: auto;
        order: 1;
        font-size: 13px;
    }
    .lt-head .lt-tabs {
        order: 3;
        width: 100%;
        gap: 6px;
    }
    .lt-tab {
        padding: 6px 12px;
        font-size: 12.5px;
    }
    .lt-head .section-search {
        display: none;
    }
    .lt-grid {
        grid-template-columns: 1fr;
        row-gap: 16px;
    }
    .lt-card {
        grid-template-columns: 90px 1fr;
        column-gap: 12px;
    }
    .lt-thumb-wrapper {
        width: 90px;
        height: 90px;
    }
    .lt-thumb {
        width: 100%;
        height: 100%;
        border-radius: 10px;
    }
    .lt-card-title { font-size: 14px; margin: 0 0 6px; }
    .lt-desc { font-size: 12px; -webkit-line-clamp: 2; margin: 0 0 8px; }
    .lt-meta { font-size: 11.5px; }
    .section-heading { font-size: 18px; }
}

@media (max-width: 600px) {
    .footer-minimal { padding: 28px 0; }
    .footer-min-text { font-size: 12.5px; gap: 10px; }
    .footer-min-name { font-size: 15px; }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .stat-card {
        padding: 16px 12px;
    }
    .type-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    .container { padding: 0 12px; }
    .section { padding: 36px 0; }
    .cards-grid { gap: 14px; }
    .card-image { height: 140px; }
    .content-card { padding: 10px; margin: -10px; }
}
