/* ==========================================================================
   Dreamscape Theme — Main Stylesheet
   Purple/Indigo dream interpretation design
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --clr-main: #2D1B69;
    --clr-deep: #1A0F3C;
    --clr-mid: #6B4FA0;
    --clr-soft: #9B7FD4;
    --clr-glow: #C4B1E8;
    --clr-text: #2C2C3A;
    --clr-text-light: #6B6B80;
    --clr-surface: #F8F6FC;
    --clr-white: #FFFFFF;
    --clr-border: #E4DFF0;
    --clr-card-bg: #FFFFFF;
    --clr-gold: #D4A843;
    --ff-heading: 'Crimson Pro', Georgia, serif;
    --ff-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --wrap-width: 1140px;
    --gap: 1.5rem;
    --radius-sm: 4px;
    --radius-md: 12px;
    --header-height: 70px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ff-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--clr-text);
    background: var(--clr-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--clr-mid);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--clr-main);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ff-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--clr-text);
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.85rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.6rem; }

p { margin-bottom: 1rem; }

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

blockquote {
    border-left: 3px solid var(--clr-mid);
    padding: 0.75rem 1.25rem;
    margin: 1.25rem 0;
    background: var(--clr-surface);
    font-style: italic;
    color: var(--clr-text-light);
}

/* ---------- Utility ---------- */
.wrap {
    max-width: var(--wrap-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ---------- Header / Masthead ---------- */
.masthead {
    position: relative;
    background: var(--clr-white);
    border-bottom: 1px solid var(--clr-border);
    overflow: hidden;
    z-index: 100;
}

.masthead-wrap {
    max-width: var(--wrap-width);
    margin: 0 auto;
    padding: 0 var(--gap);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    position: relative;
    z-index: 10;
}

/* Stars Canvas (behind header content) */
.stars-field {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.masthead .stars-field {
    display: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--clr-white);
    border-radius: 50%;
    animation: twinkle var(--dur, 3s) ease-in-out infinite;
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: var(--peak, 0.8); }
}

/* Brand / Logo */
.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

.brand-img {
    height: 46px;
    width: auto;
}

/* Navigation */
.site-nav {
    z-index: 10;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.nav-list li a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--clr-text);
    font-family: var(--ff-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-list li a:hover,
.nav-list li.current-menu-item a,
.nav-list li.current_page_item a {
    color: var(--clr-main);
    background: rgba(45, 27, 105, 0.06);
}

/* Hamburger Button */
.ham-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 20;
    flex-direction: column;
    gap: 5px;
}

.ham-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--clr-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ham-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.ham-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.ham-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero Section ---------- */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, var(--clr-deep) 0%, var(--clr-main) 50%, var(--clr-mid) 100%);
    padding: 4rem 0 3.5rem;
    text-align: center;
    overflow: hidden;
}

.hero-banner .stars-field {
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 5;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 var(--gap);
}

.hero-banner h1 {
    color: var(--clr-white);
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 20px rgba(26, 15, 60, 0.5);
}

.hero-banner p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

/* Search Form */
.dream-search {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.dream-search input[type="search"] {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--clr-white);
    font-family: var(--ff-body);
    font-size: 1rem;
    outline: none;
}

.dream-search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.dream-search button {
    padding: 0.85rem 1.5rem;
    border: none;
    background: var(--clr-mid);
    color: var(--clr-white);
    font-family: var(--ff-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dream-search button:hover {
    background: var(--clr-soft);
}

/* ---------- Content Layout ---------- */
.site-main {
    min-height: 60vh;
}

.content-wrap {
    max-width: var(--wrap-width);
    margin: 0 auto;
    padding: 2.5rem var(--gap);
}

/* Layout with sidebar */
.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    max-width: var(--wrap-width);
    margin: 0 auto;
    padding: 2.5rem var(--gap);
}

.layout-sidebar .primary-col {
    min-width: 0;
}

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

.sidebar-col .widget {
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.sidebar-col .widget-title {
    font-family: var(--ff-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-main);
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--clr-border);
}

.sidebar-col .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-col .widget ul li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--clr-border);
}

.sidebar-col .widget ul li:last-child {
    border-bottom: none;
}

.sidebar-col .widget ul li a {
    color: var(--clr-text);
    font-size: 0.9rem;
}

.sidebar-col .widget ul li a:hover {
    color: var(--clr-mid);
}

/* ---------- Section Headings ---------- */
.section-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-size: 1.85rem;
    color: var(--clr-main);
    position: relative;
    display: inline-block;
}

.section-heading h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--clr-mid), var(--clr-soft));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.section-heading p {
    color: var(--clr-text-light);
    max-width: 550px;
    margin: 0.5rem auto 0;
}

/* ---------- Symbol Cards (Grid) ---------- */
.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--gap);
}

.symbol-card {
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-border);
    border-bottom: 3px solid var(--clr-mid);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.symbol-card:hover {
    border-bottom-color: var(--clr-main);
}

.symbol-card a {
    display: block;
    color: inherit;
}

.symbol-card .card-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--clr-surface);
}

.symbol-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.symbol-card:hover .card-thumb img {
    opacity: 0.85;
}

.symbol-card .card-body {
    padding: 0.85rem 1rem;
}

.symbol-card .card-title {
    font-family: var(--ff-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-text);
    margin: 0;
}

.symbol-card .card-excerpt {
    font-size: 0.85rem;
    color: var(--clr-text-light);
    margin-top: 0.35rem;
    line-height: 1.45;
}

/* ---------- Category Cards ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease;
}

.cat-card:hover {
    border-color: var(--clr-mid);
}

.cat-card .cat-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.cat-card .cat-label {
    font-family: var(--ff-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--clr-text);
}

.cat-card .cat-count {
    font-size: 0.8rem;
    color: var(--clr-text-light);
}

/* ---------- Tool Cards ---------- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap);
}

.tool-card {
    background: linear-gradient(135deg, var(--clr-main), var(--clr-mid));
    border-radius: var(--radius-md);
    padding: 1.75rem;
    color: var(--clr-white);
    transition: opacity 0.2s ease;
}

.tool-card:hover {
    opacity: 0.92;
}

.tool-card a {
    color: var(--clr-white);
}

.tool-card .tool-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.tool-card h3 {
    color: var(--clr-white);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

/* ---------- Moon Widget ---------- */
.moon-widget {
    background: linear-gradient(135deg, var(--clr-deep), var(--clr-main));
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    color: var(--clr-white);
}

.moon-widget .moon-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.moon-widget h3 {
    color: var(--clr-glow);
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.moon-widget p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

/* ---------- Trending / Reddit Feed ---------- */
.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trending-list li {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--clr-border);
}

.trending-list li:last-child {
    border-bottom: none;
}

.trending-list .trend-title {
    font-weight: 500;
    color: var(--clr-text);
    font-size: 0.95rem;
}

.trending-list .trend-meta {
    font-size: 0.8rem;
    color: var(--clr-text-light);
    margin-top: 0.2rem;
}

/* ---------- A-Z Dictionary Bar ---------- */
.az-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    padding: 1.25rem 0;
}

.az-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-family: var(--ff-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--clr-main);
    background: var(--clr-card-bg);
    transition: background 0.2s ease, color 0.2s ease;
}

.az-bar a:hover,
.az-bar a.active {
    background: var(--clr-main);
    color: var(--clr-white);
    border-color: var(--clr-main);
}

/* ---------- Single Post / Page ---------- */
.entry-header {
    margin-bottom: 1.5rem;
}

.entry-header h1 {
    font-size: 2.25rem;
    color: var(--clr-text);
    line-height: 1.2;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--clr-text-light);
    margin-top: 0.5rem;
}

.entry-thumb {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.entry-thumb img {
    width: 100%;
    height: auto;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.entry-content h2 {
    margin-top: 2rem;
    color: var(--clr-main);
}

.entry-content h3 {
    margin-top: 1.5rem;
}

.entry-content a {
    color: var(--clr-mid);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: var(--clr-main);
}

/* FAQ Accordion */
.faq-section {
    margin-top: 2rem;
}

.faq-item {
    border-bottom: 1px solid var(--clr-border);
    padding: 1rem 0;
}

.faq-item summary {
    font-family: var(--ff-heading);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    color: var(--clr-text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--clr-mid);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item .faq-answer {
    padding-top: 0.5rem;
    color: var(--clr-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* DreamBank Stat Box */
.stat-box {
    background: var(--clr-surface);
    border-left: 4px solid var(--clr-mid);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.stat-box strong {
    color: var(--clr-main);
}

/* Related Symbols */
.related-symbols {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--clr-border);
}

.related-symbols h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.related-grid a {
    display: block;
    padding: 0.65rem 1rem;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--clr-text);
    text-align: center;
    transition: border-color 0.2s ease;
}

.related-grid a:hover {
    border-color: var(--clr-mid);
    color: var(--clr-mid);
}

/* ---------- Author Box ---------- */
.author-box {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    margin-top: 2rem;
}

.author-box .author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.author-box .author-name {
    font-family: var(--ff-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.25rem;
}

.author-box .author-bio {
    font-size: 0.9rem;
    color: var(--clr-text-light);
    line-height: 1.6;
}

/* ---------- Archive Pages ---------- */
.archive-header {
    background: linear-gradient(135deg, var(--clr-deep), var(--clr-main));
    padding: 3rem 0 2.5rem;
    text-align: center;
    color: var(--clr-white);
    position: relative;
    overflow: hidden;
}

.archive-header h1 {
    color: var(--clr-white);
    font-size: 2rem;
}

.archive-header p {
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0.5rem auto 0;
}

/* ---------- Pagination ---------- */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--clr-border);
}

.nav-links a,
.nav-links span.current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a {
    color: var(--clr-text);
    background: var(--clr-card-bg);
    transition: border-color 0.2s ease;
}

.nav-links a:hover {
    border-color: var(--clr-mid);
    color: var(--clr-mid);
}

.nav-links span.current {
    background: var(--clr-main);
    color: var(--clr-white);
    border-color: var(--clr-main);
}

/* ---------- Footer / Colophon ---------- */
.colophon {
    background: var(--clr-deep);
    color: rgba(255, 255, 255, 0.6);
    padding: 2rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
}

.colophon-wrap {
    max-width: var(--wrap-width);
    margin: 0 auto;
    padding: 0 var(--gap);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.colophon-wrap p {
    margin: 0;
}

.colophon-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}

.colophon-links li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.colophon-links li a:hover {
    color: var(--clr-glow);
}

/* ---------- Breadcrumbs (Yoast) ---------- */
.breadcrumbs {
    font-size: 0.82rem;
    color: var(--clr-text-light);
    margin-bottom: 1.25rem;
}

.breadcrumbs a {
    color: var(--clr-mid);
}

.breadcrumbs a:hover {
    color: var(--clr-main);
}

/* ---------- Homepage Sections ---------- */
.home-section {
    padding: 3rem 0;
}

.home-section:nth-child(even) {
    background: var(--clr-white);
}

.home-section .wrap {
    max-width: var(--wrap-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    font-family: var(--ff-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--clr-main);
    border-color: var(--clr-main);
    color: var(--clr-white);
}

.btn-outline {
    background: transparent;
    color: var(--clr-mid);
    border-color: var(--clr-mid);
}

.btn-outline:hover {
    background: var(--clr-mid);
    color: var(--clr-white);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--clr-white);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Tables ---------- */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.entry-content th,
.entry-content td {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--clr-border);
    text-align: left;
    font-size: 0.95rem;
}

.entry-content th {
    background: var(--clr-surface);
    font-family: var(--ff-heading);
    font-weight: 700;
    color: var(--clr-main);
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    font-family: var(--ff-body);
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    background: var(--clr-white);
    color: var(--clr-text);
    transition: border-color 0.2s ease;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--clr-mid);
}

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

    .sidebar-col {
        order: 2;
    }

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

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }

    .ham-btn {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--clr-deep);
        padding: 5rem 1.5rem 2rem;
        transition: right 0.35s ease;
        z-index: 15;
        overflow-y: auto;
    }

    .site-nav.is-open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list li a {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 1rem;
        border-radius: 0;
    }

    .hero-banner {
        padding: 3rem 0 2.5rem;
    }

    .hero-banner h1 {
        font-size: 1.85rem;
    }

    .colophon-wrap {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .colophon-links {
        justify-content: center;
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .az-bar a {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .symbol-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .dream-search {
        flex-direction: column;
    }

    .dream-search button {
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }
}

/* Overlay for mobile nav */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 12;
}

.nav-overlay.is-visible {
    display: block;
}

/* ---------- Listing page entry ---------- */
.entry-listing {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--clr-border);
}

.entry-listing .entry-thumb {
    width: 180px;
    flex-shrink: 0;
    margin: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16/10;
}

.entry-listing .entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entry-listing .entry-heading {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.entry-listing .entry-heading a {
    color: var(--clr-text);
}

.entry-listing .entry-heading a:hover {
    color: var(--clr-mid);
}

.entry-listing .entry-excerpt {
    font-size: 0.9rem;
    color: var(--clr-text-light);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .entry-listing {
        flex-direction: column;
    }

    .entry-listing .entry-thumb {
        width: 100%;
    }
}

/* ---------- WordPress Core Overrides ---------- */
.wp-block-image {
    margin-bottom: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    word-wrap: normal;
}

/* ---------- Tool Pages ---------- */
.tool-page{max-width:var(--wrap-width);margin:2rem auto;padding:0 var(--gap)}
.tool-article .entry-header{margin-bottom:1.25rem}
.tool-article .entry-header h1{font-size:2rem;color:var(--clr-main)}
.tool-article .entry-thumb{margin-bottom:1.5rem;border-radius:var(--radius-md);overflow:hidden}
.tool-article .entry-content{font-size:1.02rem;line-height:1.75}
.tool-article .entry-content h2{margin-top:1.75rem}
.tool-article .entry-content h3{margin-top:1.25rem}
