/* CSS Variables */
:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #146b5f;
    --accent-strong: #0f4f46;
    --accent-soft: #e7f3ef;
    --secondary: #b83280;
    --secondary-soft: #f8e7f1;
    --brand-red: #e11d48;
    --brand-red-dark: #9f1239;
    --brand-pink: #f9a8d4;
    --brand-pink-soft: #fff1f6;
    --radius: 0.5rem;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111827;
        --surface: #1f2937;
        --text: #f9fafb;
        --muted: #9ca3af;
        --border: #374151;
        --accent: #f9fafb;
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background:
        linear-gradient(180deg, #fff7fb 0, #f7fbf8 28rem, #f9fafb 62rem),
        var(--bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

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

/* Forms */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.hidden {
    display: none;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* Prose (content styling) */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose strong {
    font-weight: 600;
}

/* Reading Mode */
body.reading-mode header,
body.reading-mode footer {
    opacity: 0.3;
    pointer-events: none;
}

body.reading-mode main {
    max-width: 42rem;
    margin: 0 auto;
}

body.reading-mode .prose {
    font-size: 1.25rem;
    line-height: 1.9;
}

/* Command Palette */
#command-palette {
    animation: fade-in 0.2s ease-out;
}

#command-palette input {
    width: 100%;
    outline: none;
}

#command-palette-results a {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

#command-palette-results a:hover,
#command-palette-results a.selected {
    background-color: var(--bg);
}

#command-palette-results a:last-child {
    border-bottom: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    nav.desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
    }
}

/* Responsive Grid */
@media (max-width: 640px) {
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-6 {
        grid-template-columns: 2fr;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* Focus States */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: fade-in 0.3s ease-out;
}

.toast.success {
    background-color: #10b981;
}

.toast.error {
    background-color: #ef4444;
}

.toast.info {
    background-color: #3b82f6;
}

/* Admin Panel */
.admin-shell {
    min-height: 100vh;
    color: #111827;
    background: #f4f6f8;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1rem;
    color: #f9fafb;
    background: #111827;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
    border-radius: 0.5rem;
    color: #ffffff;
}

.admin-brand:hover {
    background: rgba(255, 255, 255, 0.06);
}

.admin-brand-mark {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #e11d48, #be185d);
    box-shadow: 0 12px 28px rgba(225, 29, 72, 0.32);
    font-size: 0.82rem;
    font-weight: 850;
}

.admin-brand strong,
.admin-brand small {
    display: block;
    line-height: 1.1;
}

.admin-brand strong {
    font-size: 1rem;
}

.admin-brand small {
    margin-top: 0.15rem;
    color: #f9a8d4;
    font-size: 0.7rem;
    font-weight: 700;
}

.admin-nav {
    display: grid;
    gap: 1.1rem;
    margin-top: 1.5rem;
    overflow-y: auto;
}

.admin-nav-group {
    display: grid;
    gap: 0.25rem;
}

.admin-nav-label {
    padding: 0 0.65rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-nav a {
    display: flex;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.45rem;
    color: #d1d5db;
    font-size: 0.92rem;
    font-weight: 650;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
}

.admin-nav a.is-active {
    box-shadow: inset 3px 0 0 #f472b6;
}

.admin-sidebar-footer {
    display: grid;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-ghost-link {
    display: block;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border-radius: 0.4rem;
    color: #cbd5e1;
    text-align: left;
    font-size: 0.9rem;
}

.admin-ghost-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.admin-eyebrow {
    color: #be185d;
    font-size: 0.75rem;
    font-weight: 850;
}

.admin-topbar h1 {
    margin-top: 0.12rem;
    color: #111827;
    font-size: 1.28rem;
    font-weight: 780;
}

.admin-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.admin-global-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: min(24rem, 34vw);
}

.admin-global-search input {
    width: 100%;
    padding: 0.66rem 2.6rem 0.66rem 0.95rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
    font-size: 0.9rem;
}

.admin-global-search button {
    position: absolute;
    right: 0.35rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.4rem;
    color: #6b7280;
}

.admin-global-search button:hover {
    color: #be185d;
    background: #fff1f6;
}

.admin-global-search svg {
    width: 1rem;
    height: 1rem;
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.45rem;
    font-size: 0.88rem;
    font-weight: 750;
}

.admin-button-primary {
    color: #ffffff;
    background: #111827;
}

.admin-button-primary:hover {
    background: #1f2937;
}

.admin-button-secondary {
    color: #9f1239;
    background: #fff1f6;
    border: 1px solid #f9a8d4;
}

.admin-button-secondary:hover {
    background: #ffe4ef;
}

.admin-button-muted {
    color: #475569;
    background: #f8fafc;
    border: 1px solid #dbe3ea;
}

.admin-button-muted:hover {
    color: #111827;
    background: #eef2f7;
}

.admin-content {
    padding: 1.5rem;
}

.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-page-head h2 {
    color: #101827;
    font-size: 1.08rem;
    font-weight: 820;
}

.admin-page-head p {
    max-width: 58rem;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.55;
}

.admin-card,
.admin-table-card,
.admin-empty-state,
.admin-stat-card {
    border: 1px solid #dfe7ef;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.admin-card {
    padding: 1.15rem;
    border-radius: 0.55rem;
}

.admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-card-head h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 800;
}

.admin-card-head p {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.86rem;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.admin-stat-card {
    display: block;
    padding: 1rem;
    border-radius: 0.55rem;
    color: #334155;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-stat-card:hover {
    transform: translateY(-1px);
    border-color: #f0b7c8;
    box-shadow: 0 16px 38px rgba(159, 18, 57, 0.11);
}

.admin-stat-card.is-active {
    color: #ffffff;
    border-color: #9f1239;
    background: linear-gradient(135deg, #9f1239, #c0265a);
}

.admin-stat-card span {
    display: block;
    color: inherit;
    opacity: 0.78;
    font-size: 0.76rem;
    font-weight: 800;
}

.admin-stat-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.8rem;
    line-height: 1;
}

.admin-filter-card {
    margin-bottom: 1rem;
}

.admin-filter-grid {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: end;
}

.admin-filter-grid-wide {
    grid-template-columns: 170px 210px minmax(0, 1fr) auto;
}

.admin-filter-grid label,
.admin-term-form label {
    display: block;
    margin-bottom: 0.35rem;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 800;
}

.admin-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-tabs {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding-bottom: 0.2rem;
    overflow-x: auto;
}

.admin-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.65rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid #dfe7ef;
    border-radius: 0.55rem;
    color: #475569;
    background: #ffffff;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.admin-tabs a:hover,
.admin-tabs a.is-active {
    color: #9f1239;
    border-color: #f0b7c8;
    background: #fff7fa;
}

.admin-tabs strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    color: #9f1239;
    background: #ffe4ef;
    font-size: 0.75rem;
}

.admin-term-form {
    display: grid;
    grid-template-columns: 180px minmax(170px, 1fr) minmax(220px, 1.5fr) auto;
    gap: 0.8rem;
    align-items: end;
}

.admin-term-form .flex {
    align-items: end;
}

.admin-term-form input[type="number"] {
    width: 5.5rem;
}

.admin-table-card {
    overflow: hidden;
    border-radius: 0.6rem;
}

.admin-table-card table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table-card th,
.admin-table-card td {
    padding: 0.95rem 1rem;
    text-align: left;
    vertical-align: middle;
}

.admin-table-card th {
    color: #64748b;
    background: #f8fafc;
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.admin-table-card tbody tr + tr td {
    border-top: 1px solid #eef2f7;
}

.admin-table-card tbody tr:hover td {
    background: #fff8fb;
}

.admin-table-card td {
    color: #475569;
    font-size: 0.9rem;
}

.admin-table-title {
    color: #111827;
    font-weight: 800;
}

.admin-table-subtitle {
    margin-top: 0.18rem;
    color: #64748b;
    font-size: 0.82rem;
}

.admin-table-note {
    display: inline-flex;
    margin-top: 0.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    color: #9f1239;
    background: #fff1f6;
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.admin-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.admin-row-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.38rem 0.65rem;
    border: 1px solid #d7dee8;
    border-radius: 0.45rem;
    color: #475569;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 750;
}

.admin-row-button:hover {
    color: #111827;
    background: #f8fafc;
}

.admin-row-button.is-primary {
    color: #ffffff;
    border-color: #111827;
    background: #111827;
}

.admin-row-button.is-primary:hover {
    background: #293241;
}

.admin-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    padding: 3rem 1rem;
    border-radius: 0.6rem;
    text-align: center;
}

.admin-empty-state h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 800;
}

.admin-empty-state p {
    max-width: 32rem;
    color: #64748b;
    font-size: 0.9rem;
}

.admin-global-search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.admin-search-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-search-result-list {
    display: grid;
    gap: 0.55rem;
}

.admin-search-result-list a,
.admin-search-result-list p {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    padding: 0.85rem;
    border: 1px solid #eef0f3;
    border-radius: 0.5rem;
    background: #fbfcfd;
}

.admin-search-result-list a:hover {
    border-color: #f9a8d4;
    background: #fff7fb;
}

.admin-search-result-list strong {
    color: #111827;
    font-size: 0.92rem;
}

.admin-search-result-list span,
.admin-search-result-list p {
    color: #6b7280;
    font-size: 0.82rem;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #dfe7ef;
    border-radius: 0.6rem;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.admin-pagination-summary {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

.admin-pagination-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.admin-pagination-pages a,
.admin-pagination-pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: 0 0.65rem;
    border-radius: 0.45rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 800;
}

.admin-pagination-pages a {
    border: 1px solid #d7dee8;
    background: #ffffff;
}

.admin-pagination-pages a:hover {
    color: #9f1239;
    border-color: #f0b7c8;
    background: #fff7fa;
}

.admin-pagination-pages .is-current {
    color: #ffffff;
    background: #9f1239;
}

.admin-pagination-pages .is-disabled {
    opacity: 0.42;
    pointer-events: none;
}

.admin-pagination-gap {
    min-width: 1.25rem !important;
    padding: 0 !important;
    color: #94a3b8 !important;
}

.admin-shell .bg-white.rounded-lg.shadow {
    border: 1px solid #e5e7eb;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.06);
}

.admin-shell table {
    background: #ffffff;
    color: #111827;
}

.admin-shell thead {
    background: #f9fafb;
}

.admin-shell th {
    color: #6b7280;
    letter-spacing: 0;
}

.admin-shell tbody tr {
    transition: background-color 0.16s ease;
}

.admin-shell tbody tr:hover {
    background: #fff7fb;
}

.admin-shell input,
.admin-shell textarea,
.admin-shell select {
    color: #111827 !important;
    -webkit-text-fill-color: #111827;
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    caret-color: #be185d;
    box-shadow: none;
    opacity: 1;
}

.admin-shell input[type="checkbox"],
.admin-shell input[type="radio"] {
    -webkit-text-fill-color: initial;
    accent-color: #be185d;
}

.admin-shell input::placeholder,
.admin-shell textarea::placeholder {
    color: #b8c1cc !important;
    -webkit-text-fill-color: #b8c1cc;
    font-style: italic;
    font-weight: 400;
    opacity: 0.82;
}

.admin-shell option {
    color: #111827;
    background: #ffffff;
}

.admin-shell input:focus,
.admin-shell textarea:focus,
.admin-shell select:focus {
    outline: 2px solid rgba(190, 24, 93, 0.28);
    outline-offset: 2px;
    border-color: #be185d !important;
}

.admin-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    max-width: min(28rem, calc(100vw - 2rem));
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
}

.admin-toast-success {
    background: #047857;
}

.admin-toast-error {
    background: #b91c1c;
}

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

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stat-grid,
    .admin-filter-grid,
    .admin-term-form {
        grid-template-columns: 1fr;
    }

    .admin-pagination,
    .admin-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-topbar-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .admin-global-search {
        min-width: 0;
        width: 100%;
    }

    .admin-search-result-grid {
        grid-template-columns: 1fr;
    }

    .admin-pagination-pages {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .admin-topbar,
    .admin-content {
        padding: 1rem;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-nav {
        grid-template-columns: 1fr;
    }

    .admin-global-search-page-form {
        grid-template-columns: 1fr;
    }
}

/* Site Shell */
.site-soft-shell {
    background:
        linear-gradient(180deg, rgba(255, 241, 246, 0.96) 0, rgba(241, 250, 246, 0.72) 17rem, rgba(255, 255, 255, 0.96) 38rem),
        #ffffff;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(190, 24, 93, 0.16);
    background: rgba(255, 250, 252, 0.95);
    backdrop-filter: blur(12px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.75rem;
    gap: 1rem;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--brand-red-dark);
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.65rem;
    background: var(--brand-red);
    box-shadow: 0 10px 24px rgba(190, 24, 93, 0.28);
}

.brand-mark svg {
    width: 2.45rem;
    height: 2.45rem;
}

.brand-copy {
    display: grid;
    gap: 0.02rem;
    line-height: 1.05;
}

.brand-name {
    color: var(--brand-red-dark);
    font-size: 1.06rem;
    font-weight: 820;
}

.brand-owner {
    color: #be185d;
    font-size: 0.68rem;
    font-weight: 750;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 1.05rem;
    color: #4b5563;
    font-size: 0.92rem;
    font-weight: 500;
}

.primary-nav > a,
.nav-dropdown-trigger {
    color: inherit;
}

.primary-nav > a:hover,
.nav-dropdown-trigger:hover {
    color: var(--brand-red-dark);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: -0.75rem;
    right: -0.75rem;
    height: 0.65rem;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.4rem;
}

.nav-dropdown-trigger svg {
    width: 1rem;
    height: 1rem;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 50%;
    z-index: 80;
    display: grid;
    gap: 0.2rem;
    width: 18rem;
    transform: translateX(-50%);
    padding: 0.45rem;
    border: 1px solid rgba(190, 24, 93, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #fff7fb);
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel,
.nav-dropdown.is-open .nav-dropdown-panel {
    transform: translateX(-50%) translateY(0.1rem);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-dropdown-panel a {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.8rem;
    border-radius: 0.4rem;
}

.nav-dropdown-panel a:hover {
    background: var(--brand-pink-soft);
    color: var(--brand-red-dark);
}

.nav-dropdown-panel span {
    font-size: 0.92rem;
    font-weight: 650;
}

.nav-dropdown-panel small {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(190, 24, 93, 0.14);
    background:
        linear-gradient(180deg, #ffffff 0, #fff7fb 100%);
}

.site-footer-inner {
    width: min(100%, 80rem);
    margin: 0 auto;
    padding: 2.8rem 1rem 1.6rem;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.site-footer-brand,
.site-footer-column {
    min-width: 0;
}

.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--brand-red-dark);
    font-weight: 850;
}

.site-footer-mark,
.site-footer-mark svg {
    width: 2.25rem;
    height: 2.25rem;
}

.site-footer-brand p {
    max-width: 16rem;
    margin-top: 0.95rem;
    margin-bottom: 0;
    color: #5f6875;
    font-size: 0.92rem;
    line-height: 1.65;
}

.site-footer-column h3 {
    margin-bottom: 0.95rem;
    color: #111827;
    font-size: 0.86rem;
    font-weight: 800;
}

.site-footer-column ul {
    display: grid;
    gap: 0.62rem;
    list-style: none;
}

.site-footer-column a {
    color: #5f6875;
    font-size: 0.9rem;
}

.site-footer-column a:hover {
    color: var(--brand-red-dark);
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.4rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    color: #667085;
    font-size: 0.86rem;
}

.site-footer-bottom p {
    margin: 0;
}

.site-footer-note {
    max-width: 42rem;
    text-align: right;
}

.site-footer-note a {
    color: var(--brand-red-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.topic-text-card {
    display: grid;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #ffffff 0, #fff9fb 100%);
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.topic-text-card:hover {
    border-color: rgba(190, 24, 93, 0.32);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.topic-text-card::before,
.poem-listen-card::before,
.archive-feature-card::before {
    content: "";
    display: block;
    height: 0.2rem;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.poem-listen-card::before {
    margin: -1.35rem -1.35rem 1rem;
}

.archive-feature-card::before {
    margin: -1.35rem -1.35rem 1rem;
}

.topic-text-card span {
    display: grid;
    gap: 0.28rem;
    padding: 1.15rem;
}

.topic-text-card strong {
    color: #111827;
    font-size: 1rem;
    font-weight: 750;
}

.topic-text-card small {
    color: #6b7280;
    font-size: 0.86rem;
    line-height: 1.45;
}

.topic-mini-grid,
.popular-topic-grid {
    display: grid;
    gap: 1rem;
}

.topic-mini-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.popular-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.topic-mini-grid a,
.popular-topic-grid a {
    display: grid;
    align-items: center;
    min-height: 4.35rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #ffffff 0, #fbf7fa 100%);
    color: #111827;
    font-weight: 700;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.topic-mini-grid a:hover,
.popular-topic-grid a:hover {
    border-color: rgba(190, 24, 93, 0.32);
    box-shadow: 0 14px 28px rgba(190, 24, 93, 0.08);
    transform: translateY(-1px);
}

.topic-mini-grid span,
.popular-topic-grid span {
    padding: 0.9rem 0.95rem;
}

.popular-topic-grid span {
    text-align: center;
}

@media (min-width: 640px) {
    .popular-topic-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .popular-topic-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .site-footer-note {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .site-footer-grid {
        grid-template-columns: 1fr;
    }
}

.poem-listen-card {
    display: grid;
    overflow: hidden;
    padding: 1.35rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #ffffff 0, #fbfffd 100%);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.poem-listen-card:hover {
    border-color: rgba(20, 107, 95, 0.24);
    box-shadow: 0 16px 36px rgba(20, 107, 95, 0.08);
    transform: translateY(-1px);
}

.home-stat-card {
    position: relative;
    overflow: hidden;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(190, 24, 93, 0.12);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.06);
}

.home-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.25rem;
    background: var(--brand-red);
}

.home-stat-card-green {
    background: linear-gradient(180deg, #ffffff, #f1faf6);
}

.home-stat-card-green::before {
    background: var(--accent);
}

.home-stat-card-rose {
    background: linear-gradient(180deg, #ffffff, #fff1f6);
}

.home-stat-card-rose::before {
    background: var(--secondary);
}

.home-stat-card-gold {
    background: linear-gradient(180deg, #ffffff, #fff8e8);
}

.home-stat-card-gold::before {
    background: #c98216;
}

.archive-count-banner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-height: 4.1rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.06);
}

.archive-count-banner strong {
    flex: 0 0 auto;
    color: #111827;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1;
}

.archive-count-banner span {
    color: #4b5563;
    font-size: 0.92rem;
    font-weight: 700;
}

.archive-count-banner-green {
    border-color: rgba(20, 107, 95, 0.2);
    background: linear-gradient(135deg, #ffffff 0, #edf8f4 100%);
}

.archive-count-banner-green strong {
    color: var(--accent-strong);
}

.archive-count-banner-rose {
    border-color: rgba(190, 24, 93, 0.2);
    background: linear-gradient(135deg, #ffffff 0, #fff1f6 100%);
}

.archive-count-banner-rose strong {
    color: var(--brand-red-dark);
}

.archive-count-banner-gold {
    border-color: rgba(201, 130, 22, 0.22);
    background: linear-gradient(135deg, #ffffff 0, #fff8e8 100%);
}

.archive-count-banner-gold strong {
    color: #925a0a;
}

.archive-feature-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 8.2rem;
    padding: 1.35rem;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 0.5rem;
    background: #ffffff;
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.archive-feature-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(17, 24, 39, 0.08);
}

.archive-feature-card-green {
    background: linear-gradient(180deg, #ffffff, #f1faf6);
}

.archive-feature-card-green:hover {
    border-color: rgba(20, 107, 95, 0.28);
}

.archive-feature-card-rose {
    background: linear-gradient(180deg, #ffffff, #fff3f8);
}

.archive-feature-card-rose:hover {
    border-color: rgba(190, 24, 93, 0.28);
}

.archive-feature-card-gold {
    background: linear-gradient(180deg, #ffffff, #fff8e8);
}

.archive-feature-card-gold:hover {
    border-color: rgba(201, 130, 22, 0.3);
}

.poem-listen-card h2 {
    margin-bottom: 0.5rem;
    color: #111827;
    font-size: 1rem;
    font-weight: 760;
}

.poem-listen-card p {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.6;
}

.poem-listen-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: max-content;
    min-height: 2.25rem;
    margin-top: 1rem;
    padding: 0.5rem 0.78rem;
    border: 1px solid rgba(190, 24, 93, 0.22);
    border-radius: 0.45rem;
    background: #fff1f6;
    color: #9f1239;
    font-size: 0.88rem;
    font-weight: 800;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.poem-listen-button:hover,
.poem-listen-button[data-listening="true"] {
    border-color: rgba(190, 24, 93, 0.42);
    background: #be185d;
    color: #ffffff;
}

.poem-listen-button svg {
    width: 1rem;
    height: 1rem;
}

.seo-poem-listen {
    margin-top: 1.1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.45rem;
    color: #4b5563;
    transition: background-color 0.2s, color 0.2s;
}

.icon-button:hover {
    color: var(--brand-red-dark);
    background: var(--brand-pink-soft);
}

.icon-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.mobile-nav-trigger {
    display: none;
}

.mobile-nav-panel {
    display: none;
    padding: 0.5rem 0 0.9rem;
    border-top: 1px solid var(--border);
}

.mobile-nav-panel a {
    display: block;
    padding: 0.7rem 0.2rem;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
}

body.mobile-nav-open .mobile-nav-panel {
    display: grid;
}

/* Account */
.account-dashboard {
    color: #111827;
}

.account-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.4rem;
    border: 1px solid rgba(190, 24, 93, 0.12);
    border-radius: 0.5rem;
    background:
        linear-gradient(135deg, rgba(255, 241, 246, 0.95), rgba(255, 255, 255, 0.98)),
        #ffffff;
}

.account-avatar {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #e11d48, #be185d);
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 850;
}

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

.account-hero h1 {
    margin: 0.15rem 0 0.35rem;
    color: #111827;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.15;
}

.account-hero p {
    max-width: 68ch;
    color: #4b5563;
}

.account-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-hero-actions a,
.account-empty a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.45rem;
    background: #111827;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 750;
}

.account-hero-actions a + a {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.account-stats a,
.account-stats div {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
}

.account-stats span {
    color: #6b7280;
    font-size: 0.84rem;
    font-weight: 700;
}

.account-stats strong {
    color: #111827;
    font-size: 1.7rem;
    line-height: 1;
}

.account-stats small {
    color: #9ca3af;
    font-size: 0.78rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.account-panel {
    padding: 1.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
}

.account-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-panel-heading h2 {
    color: #111827;
    font-size: 1.05rem;
    font-weight: 800;
}

.account-panel-heading p {
    margin-top: 0.2rem;
    color: #6b7280;
    font-size: 0.88rem;
}

.account-panel-heading > a {
    color: #be185d;
    font-size: 0.86rem;
    font-weight: 750;
}

.account-listen-panel {
    border-color: rgba(190, 24, 93, 0.18);
    background: #fff9fc;
}

.account-listen-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(190, 24, 93, 0.14);
    border-radius: 0.5rem;
    background: #ffffff;
    text-align: left;
}

.account-listen-item strong,
.account-mini-list strong,
.account-poem-grid strong,
.account-poet-list strong {
    display: block;
    color: #111827;
    font-weight: 750;
}

.account-listen-item small {
    display: block;
    margin-top: 0.2rem;
    color: #6b7280;
    font-size: 0.82rem;
}

.account-listen-item > span:last-child {
    flex: 0 0 auto;
    color: #be185d;
    font-size: 0.86rem;
    font-weight: 800;
}

.account-mini-list {
    display: grid;
    gap: 0.65rem;
}

.account-mini-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.account-mini-list a:last-child {
    border-bottom: 0;
}

.account-mini-list small {
    display: block;
    margin-top: 0.18rem;
    color: #9ca3af;
    font-size: 0.8rem;
}

.account-mini-list em {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.28rem 0.52rem;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 750;
}

.account-poem-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.account-poem-grid a {
    min-height: 8rem;
    padding: 0.9rem;
    border: 1px solid #f1f5f9;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.account-poem-grid span {
    display: block;
    margin-top: 0.45rem;
    color: #6b7280;
    font-size: 0.86rem;
    line-height: 1.55;
}

.account-poet-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.account-poet-list a {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 0.5rem;
    background: #f9fafb;
    text-align: center;
}

.account-poet-list img,
.account-poet-list a > span {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    object-fit: cover;
    background: #ffe4ef;
    color: #9f1239;
    font-weight: 850;
}

.account-poet-list small {
    color: #6b7280;
    font-size: 0.8rem;
}

.account-empty {
    padding: 1rem;
    border: 1px dashed #d1d5db;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.account-empty h3 {
    color: #111827;
    font-weight: 800;
}

.account-empty p {
    margin: 0.35rem 0 0.8rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* SEO Pages */
.seo-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1.25rem 4rem;
}

.seo-breadcrumb {
    padding: 0.2rem 0 0.85rem;
}

.seo-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.86rem;
}

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

.seo-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.78fr);
    align-items: end;
    gap: 2.5rem;
    padding: 1.25rem 0 1.8rem;
}

.seo-hero-copy {
    padding-bottom: 0.35rem;
}

.seo-hero h1 {
    max-width: 18ch;
    margin-bottom: 1rem;
    color: #111827;
    font-size: 2.05rem;
    font-weight: 740;
    line-height: 1.12;
}

.seo-lead {
    max-width: 62ch;
    color: #3f4a57;
    font-size: 1rem;
    line-height: 1.82;
}

.seo-featured-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #eef7f4;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.11);
}

.seo-featured-image::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(20, 107, 95, 0.12);
    pointer-events: none;
}

.seo-featured-image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.seo-intro-panel {
    display: grid;
    gap: 1rem;
    max-width: 880px;
    margin: 0 0 1.4rem;
    padding: 1.4rem 0 0.4rem;
    border-top: 1px solid rgba(20, 107, 95, 0.16);
}

.seo-intro-panel p {
    margin: 0;
    color: #2f3943;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1rem;
    line-height: 1.9;
}

.seo-intro-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.05rem;
    padding-bottom: 0.25rem;
}

.seo-intro-links a {
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(20, 107, 95, 0.3);
}

.seo-intro-links a:hover {
    color: var(--secondary);
    border-color: var(--secondary);
}

.seo-poem-section {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 2.25rem;
    padding: 2.35rem 0;
    border-top: 1px solid rgba(17, 24, 39, 0.1);
    scroll-margin-top: 5rem;
}

.seo-section-title {
    margin: 0 0 0.65rem;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 740;
    line-height: 1.24;
}

.seo-section-description {
    margin: 0;
    color: #5b6472;
    font-size: 0.92rem;
    line-height: 1.7;
}

.seo-poem-grid {
    display: grid;
    gap: 1.35rem;
}

.seo-poem-card {
    position: relative;
    display: grid;
    align-content: start;
    min-height: 0;
    padding: 0.3rem 0 1.05rem 1.25rem;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: linear-gradient(90deg, rgba(20, 107, 95, 0.055), rgba(255, 255, 255, 0) 62%);
}

.seo-poem-meta,
.seo-poem-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    color: #6b7280;
    font-size: 0.82rem;
}

.seo-poem-meta {
    margin-bottom: 0.85rem;
    font-weight: 650;
}

.seo-poem-content {
    white-space: pre-line;
    max-width: 58ch;
    color: #18212c;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1rem;
    line-height: 2;
}

.seo-poem-stats {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.seo-empty-state,
.seo-bottom-content,
.seo-related-pages {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(17, 24, 39, 0.1);
}

.seo-bottom-content {
    margin-bottom: 1.4rem;
    color: #374151;
}

.seo-related-pages h2 {
    margin-bottom: 0.9rem;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 730;
}

.seo-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.seo-related-grid a {
    display: grid;
    gap: 0.25rem;
    padding: 0.2rem 0 0.75rem;
    border-bottom: 1px solid rgba(20, 107, 95, 0.18);
}

.seo-related-grid a:hover {
    border-color: var(--secondary);
}

.seo-related-grid span {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 700;
}

.seo-related-grid small {
    color: #6b7280;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .primary-nav {
        display: none;
    }

    .mobile-nav-trigger {
        display: inline-flex;
    }

    .account-hero,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-hero {
        align-items: start;
    }

    .account-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .seo-hero,
    .seo-intro-panel,
    .seo-poem-section {
        grid-template-columns: 1fr;
    }

    .seo-hero {
        gap: 1.25rem;
        padding-top: 1.25rem;
    }

    .seo-hero h1 {
        max-width: 100%;
        font-size: 1.9rem;
    }

    .seo-poem-grid,
    .seo-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header-inner {
        min-height: 3.4rem;
    }

    .brand-link {
        gap: 0.55rem;
    }

    .brand-mark,
    .brand-mark svg {
        width: 2.15rem;
        height: 2.15rem;
    }

    .brand-name {
        font-size: 0.96rem;
    }

    .brand-owner {
        font-size: 0.62rem;
    }

    .header-actions {
        gap: 0.35rem;
    }

    .account-stats,
    .account-poem-grid,
    .account-poet-list {
        grid-template-columns: 1fr;
    }

    .seo-page {
        padding: 0.75rem 1rem 3rem;
    }

    .seo-section-title {
        font-size: 1.35rem;
    }
}

/* SEO Pages: editorial refresh */
.seo-page {
    max-width: 1280px;
    padding: 1.15rem 1rem 4.5rem;
}

.seo-cover {
    position: relative;
    display: grid;
    min-height: 23.5rem;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 0;
    background: #123f39;
    box-shadow: 0 24px 62px rgba(17, 24, 39, 0.18);
}

.seo-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(105deg, rgba(11, 55, 50, 0.98) 0%, rgba(20, 107, 95, 0.94) 58%, rgba(184, 50, 128, 0.64) 100%);
}

.seo-cover-content {
    position: relative;
    z-index: 2;
    display: grid;
    max-width: 860px;
    padding: 2.45rem;
    color: #ffffff;
}

.seo-cover .seo-breadcrumb {
    padding: 0 0 1.65rem;
}

.seo-cover .seo-breadcrumb ol {
    color: rgba(255, 255, 255, 0.74);
}

.seo-cover .seo-breadcrumb a:hover {
    color: #ffffff;
}

.seo-kicker {
    width: max-content;
    margin-bottom: 0.85rem;
    padding-bottom: 0.22rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.72);
    color: #ffd6e6;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
}

.seo-cover h1 {
    max-width: 16ch;
    margin: 0 0 1.05rem;
    color: #ffffff;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2.85rem;
    font-weight: 700;
    line-height: 1.08;
}

.seo-cover .seo-lead {
    max-width: 64ch;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.82;
}

.seo-cover-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.seo-cover-meta span {
    padding: 0.42rem 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.84rem;
    font-weight: 700;
}

.seo-reading-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.4rem;
    align-items: start;
    max-width: 1040px;
    margin: 2.4rem auto 0;
    padding-bottom: 2.2rem;
}

.seo-reading-intro p {
    margin: 0;
    color: #25313c;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.95;
}

.seo-reading-intro p::first-letter {
    float: left;
    padding: 0.1rem 0.5rem 0 0;
    color: var(--accent-strong);
    font-size: 3.25rem;
    line-height: 0.88;
}

.seo-intro-links {
    display: grid;
    gap: 0.7rem;
    padding-top: 0.2rem;
}

.seo-intro-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0 0.7rem;
    border-bottom: 1px solid rgba(20, 107, 95, 0.18);
    color: #0f4f46;
    font-size: 0.92rem;
    font-weight: 750;
}

.seo-intro-links a::after {
    content: "→";
    color: var(--secondary);
    font-weight: 800;
}

.seo-intro-links a:hover {
    color: var(--secondary);
    border-color: rgba(184, 50, 128, 0.38);
}

.seo-poem-section {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 3.25rem;
    max-width: 1040px;
    margin: 0 auto;
    padding: 3rem 0;
    border-top: 1px solid rgba(17, 24, 39, 0.1);
}

.seo-section-heading {
    position: sticky;
    top: 5.25rem;
    align-self: start;
}

.seo-section-number {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--secondary);
    font-size: 0.86rem;
    font-weight: 850;
}

.seo-section-title {
    margin-bottom: 0.8rem;
    color: #111827;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.seo-section-description {
    max-width: 28ch;
    color: #5b6472;
    font-size: 0.95rem;
    line-height: 1.75;
}

.seo-poem-grid {
    display: grid;
    gap: 1.45rem;
}

.seo-poem-card {
    position: relative;
    padding: 1.5rem 1.65rem 1.7rem;
    border: 1px solid rgba(20, 107, 95, 0.12);
    border-radius: 0.5rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 250, 0.96)),
        #ffffff;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.07);
}

.seo-poem-card::before {
    content: "“";
    position: absolute;
    top: 0.3rem;
    right: 1.1rem;
    color: rgba(20, 107, 95, 0.1);
    font-family: Georgia, serif;
    font-size: 5.4rem;
    line-height: 1;
}

.seo-poem-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-bottom: 1rem;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 750;
}

.seo-poem-content {
    position: relative;
    z-index: 1;
    max-width: 62ch;
    white-space: pre-line;
    color: #1d2731;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.03rem;
    line-height: 2.05;
}

.seo-bottom-content,
.seo-related-pages {
    max-width: 1040px;
    margin-right: auto;
    margin-left: auto;
    padding: 2rem 0 0;
}

.seo-bottom-content {
    color: #3b4652;
    font-size: 1rem;
    line-height: 1.85;
}

.seo-related-pages h2 {
    color: #111827;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.35rem;
}

.seo-related-grid {
    gap: 1.5rem;
}

.seo-related-grid a {
    padding-bottom: 0.95rem;
}

@media (max-width: 900px) {
    .seo-cover-content {
        padding: 1.35rem;
    }

    .seo-cover h1 {
        max-width: 100%;
        font-size: 2.1rem;
    }

    .seo-reading-intro,
    .seo-poem-section {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .seo-section-heading {
        position: static;
    }

    .seo-section-description {
        max-width: 64ch;
    }
}

@media (min-width: 640px) {
    .seo-page {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .seo-page {
        padding-right: 2rem;
        padding-left: 2rem;
    }
}

@media (max-width: 640px) {
    .seo-page {
        padding: 0.85rem 1rem 3.25rem;
    }

    .seo-cover h1 {
        font-size: 1.85rem;
    }

    .seo-reading-intro p {
        font-size: 1rem;
    }

    .seo-poem-card {
        padding: 1.2rem;
    }

    .seo-poem-content {
        font-size: 0.98rem;
        line-height: 1.95;
    }
}
