/*
Theme Name: Mossline
Theme URI: https://www.cityvegplot.com
Author: Jenna Rodriguez
Author URI: https://www.cityvegplot.com
Description: A clean, airy layout with soft color accents, light surfaces, and a calm modern feel.
Version: 2.4.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --bg: #f3f1eb;
    --fg: #2e342f;
    --muted: #6b736d;
    --border: #ddd7cc;
    --surface: #fffef9;
    --accent: #6f8c63;
    --accent-strong: #516b47;
    --accent-warm: #c06a3c;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(46, 52, 47, 0.05), 0 12px 28px rgba(46, 52, 47, 0.07);
    --media-ratio: 3 / 2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.6em;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--accent-warm);
}

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

.content-area,
.widget-area,
.footer-inner {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1180px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 22px;
}

.site-branding {
    flex: 0 0 auto;
}

.site-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-name a {
    color: var(--fg);
}

.site-name a:hover,
.site-name a:focus {
    color: var(--accent-strong);
}

.custom-logo-link img {
    display: block;
    width: auto;
    max-height: 56px;
}

.primary-nav {
    margin-left: auto;
}

.nav-menu {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background: var(--bg);
    color: var(--accent-strong);
}

.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--accent-strong);
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 200;
    display: none;
    min-width: 240px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sub-menu a {
    padding: 9px 12px;
    border-radius: calc(var(--radius) - 4px);
    font-weight: 400;
    white-space: nowrap;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    display: block;
}

.sub-toggle {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-toggle,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    cursor: pointer;
}

.search-toggle:hover,
.menu-toggle:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.menu-toggle {
    display: none;
}

.toggle-bars {
    display: inline-block;
    width: 20px;
}

.toggle-bars span {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: currentColor;
    border-radius: 2px;
}

.header-search {
    position: absolute;
    top: calc(100% + 1px);
    right: 22px;
    z-index: 300;
    width: min(420px, calc(100vw - 44px));
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.header-search[hidden] {
    display: none;
}

/* Search form */
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-form label {
    flex: 1 1 auto;
}

.search-field {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 1rem;
}

.search-field:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.search-submit {
    padding: 11px 18px;
    background: var(--accent);
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.search-submit:hover {
    background: var(--accent-strong);
}

/* Layout */
.site-main {
    padding: 44px 0 64px;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

.layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 0.85rem;
}

.trail {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.crumb + .crumb::before {
    content: "\203A";
    margin-right: 6px;
    color: var(--border);
}

.crumb a {
    color: var(--muted);
}

.crumb a:hover {
    color: var(--accent-warm);
}

.crumb.current {
    color: var(--fg);
}

/* Hero */
.hero {
    margin-bottom: 44px;
}

.hero-post {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-media {
    display: block;
}

.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: var(--media-ratio);
    object-fit: cover;
    border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
}

.hero-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 34px 32px;
}

.hero-title {
    margin: 0;
    font-size: 1.9rem;
}

.hero-title a {
    color: var(--fg);
}

.hero-title a:hover {
    color: var(--accent-strong);
}

.hero-excerpt {
    margin: 0;
    color: var(--muted);
}

.hero-link {
    align-self: flex-start;
    display: inline-block;
    padding: 10px 18px;
    background: var(--accent);
    border-radius: var(--radius);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-link:hover {
    background: var(--accent-strong);
    color: #fff;
}

/* Post cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 26px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-media {
    display: block;
}

.card-media img {
    display: block;
    width: 100%;
    aspect-ratio: var(--media-ratio);
    object-fit: cover;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 24px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.entry-meta span + span::before {
    content: "\00B7";
    margin-right: 8px;
}

.entry-meta a {
    color: var(--muted);
}

.entry-meta a:hover {
    color: var(--accent-warm);
}

.entry-title {
    margin: 0;
    font-size: 1.15rem;
}

.entry-title a {
    color: var(--fg);
}

.entry-title a:hover {
    color: var(--accent-strong);
}

.entry-summary {
    color: var(--muted);
    font-size: 0.92rem;
}

.entry-summary p {
    margin: 0;
}

/* Archive headers */
.archive-header {
    margin-bottom: 30px;
}

.archive-title {
    margin-bottom: 8px;
    font-size: 2rem;
}

.archive-description {
    max-width: 640px;
    color: var(--muted);
}

.page-title {
    margin-bottom: 26px;
    font-size: 2rem;
}

.empty-note {
    color: var(--muted);
}

/* Single post & page */
.single-post .entry-header,
.single-page .entry-header {
    margin-bottom: 24px;
}

.single-post .entry-title,
.single-page .entry-title {
    margin-bottom: 14px;
    font-size: 2.3rem;
}

.entry-media {
    margin: 0 0 28px;
}

.entry-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.entry-content {
    font-size: 1.02rem;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h2 {
    margin-top: 1.6em;
}

.entry-content h3 {
    margin-top: 1.4em;
}

.entry-content img {
    border-radius: var(--radius);
}

.entry-content blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-style: italic;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
}

.entry-content th,
.entry-content td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.entry-content code {
    padding: 2px 6px;
    background: var(--bg);
    border-radius: 4px;
    font-size: 0.9em;
}

.page-links {
    margin-top: 1.6em;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Author bio */
.author-bio {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 36px 0;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.author-avatar img {
    display: block;
    border-radius: 50%;
}

.author-name {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.author-description {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Tags */
.entry-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 28px 0 8px;
    font-size: 0.85rem;
}

.tags-label {
    color: var(--muted);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tag-list a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--fg);
}

.tag-list a:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

/* Related posts */
.related-posts {
    margin-top: 40px;
}

.related-title {
    margin-bottom: 18px;
    font-size: 1.35rem;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.related-media img {
    display: block;
    width: 100%;
    aspect-ratio: var(--media-ratio);
    object-fit: cover;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.related-body {
    padding: 14px 16px 16px;
}

.related-name {
    margin: 0 0 4px;
    font-size: 0.98rem;
}

.related-name a {
    color: var(--fg);
}

.related-name a:hover {
    color: var(--accent-strong);
}

.related-body time {
    color: var(--muted);
    font-size: 0.78rem;
}

/* Article note */
.article-note {
    margin: 36px 0 0;
    padding: 18px 22px;
    background: rgba(111, 140, 99, 0.12);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
}

.article-note p {
    margin: 0 0 0.6em;
}

.article-note p:last-child {
    margin-bottom: 0;
}

/* Comments */
.comments-area {
    margin-top: 48px;
}

.comments-title {
    margin-bottom: 20px;
    font-size: 1.35rem;
}

.comment-list {
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.comment-list .children {
    margin: 0;
    padding-left: 26px;
    list-style: none;
}

.comment-body {
    margin-bottom: 16px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.comment-meta {
    margin-bottom: 10px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
}

.comment-metadata {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.8rem;
}

.comment-metadata a {
    color: var(--muted);
}

.edit-link {
    margin-left: 8px;
}

.comment-awaiting-moderation {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
    font-style: italic;
}

.comment-content p {
    margin: 0 0 0.8em;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply a {
    font-size: 0.85rem;
    font-weight: 600;
}

.comment-respond {
    margin-top: 36px;
}

.comment-reply-title {
    font-size: 1.25rem;
}

.comment-notes,
.logged-in-as {
    color: var(--muted);
    font-size: 0.85rem;
}

.comment-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.95rem;
}

.comment-form .submit {
    padding: 12px 22px;
    background: var(--accent);
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.comment-form .submit:hover {
    background: var(--accent-strong);
}

.comment-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    margin-top: 40px;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.9rem;
}

.page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.page-numbers:hover:not(.current):not(.dots) {
    border-color: var(--accent);
    color: var(--accent-strong);
}

/* Widgets */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.widget {
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.92rem;
}

.widget-title {
    display: inline-block;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    font-size: 1.02rem;
}

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

.widget li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.widget li:last-child {
    border-bottom: 0;
}

.widget select,
.widget input[type="text"],
.widget input[type="search"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.widget .wp-calendar-table {
    width: 100%;
}

/* Footer */
.site-footer {
    margin-top: 20px;
    background: #2e342f;
    color: #cfd6cf;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 22px 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 34px;
    margin-bottom: 44px;
}

.footer-heading {
    display: block;
    margin-bottom: 14px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 9px;
}

.footer-links a {
    color: #cfd6cf;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-note {
    margin: 0 0 10px;
    color: #9aa79c;
    font-size: 0.85rem;
}

.copyright {
    margin: 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9aa79c;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1020px) {
    .menu-toggle {
        display: inline-flex;
    }

    .header-actions {
        margin-left: auto;
    }

    .primary-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 250;
        display: none;
        max-height: calc(100vh - 76px);
        margin-left: 0;
        overflow-y: auto;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .primary-nav.nav-open {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 10px 16px 18px;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li:last-child {
        border-bottom: 0;
    }

    .nav-menu a {
        padding: 13px 12px;
    }

    .nav-menu li:hover > .sub-menu,
    .nav-menu li:focus-within > .sub-menu {
        display: none;
    }

    .nav-menu li.open > .sub-menu {
        display: block;
    }

    .sub-menu {
        position: static;
        min-width: 0;
        padding: 0 0 8px 16px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .sub-menu a {
        white-space: normal;
    }

    .sub-toggle {
        position: absolute;
        top: 8px;
        right: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: var(--radius);
        color: var(--muted);
        cursor: pointer;
    }

    .sub-toggle::before {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    li.open > .sub-toggle::before {
        transform: rotate(225deg);
    }

    .header-search {
        right: 16px;
    }
}

@media (max-width: 920px) {
    .layout.has-sidebar {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero-media img {
        border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    body {
        font-size: 16px;
    }

    .header-inner {
        padding: 0 16px;
    }

    .hero-body {
        padding: 24px 20px;
    }

    .single-post .entry-title,
    .single-page .entry-title {
        font-size: 1.8rem;
    }

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

    .entry-content {
        overflow-x: hidden;
    }

    .mq4ztn-table-wrap {
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .mq4ztn-table-wrap table {
        width: auto;
        min-width: 100%;
        margin-bottom: 0;
    }

    .mq4ztn-table-wrap th {
        white-space: nowrap;
    }

    .mq4ztn-table-wrap td {
        min-width: 8rem;
    }
}
