:root {
    --cream: #f5f2eb;
    --forest: #2d5016;
    --terracotta: #c65d3b;
}

html {
    /* clip avoids horizontal bleed without breaking position:sticky (hidden does) */
    overflow-x: clip;
    max-width: 100%;
}

body {
    background-color: var(--cream);
    color: var(--forest);
    font-family: Lora, Georgia, serif;
    overflow-x: clip;
    max-width: 100%;
}

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

.ad-content {
    min-width: 0 !important;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.font-display {
    font-family: "Playfair Display", Georgia, serif;
}

.font-body {
    font-family: Lora, Georgia, serif;
}

/* Shared nav underline used across pages */
.navlink {
    position: relative;
    display: inline-block;
}
.navlink::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 1px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 260ms ease;
    background: currentColor;
    opacity: 0.7;
}
.navlink:hover::after,
.navlink:focus-visible::after {
    transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
    .navlink::after {
        transition: none;
    }
}

.uc-mark {
    background: rgba(198, 93, 59, 0.18);
    color: #2d5016;
    padding: 0 0.12em;
    border-radius: 0.1em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ebe6dc;
}
::-webkit-scrollbar-thumb {
    background: rgba(45, 80, 22, 0.35);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--terracotta);
}

::selection {
    background: rgba(198, 93, 59, 0.28);
    color: var(--forest);
}

/* Header shell — padding in CSS so it does not depend on incomplete Tailwind utilities */
.n2-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 242, 235, 0.97);
}
@media (min-width: 768px) {
    .n2-header {
        background: rgba(245, 242, 235, 0.92);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}
.n2-header-inner {
    padding: 1.15rem 1rem 1rem;
}
.n2-header-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.n2-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}
.n2-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.n2-nav-logo {
    height: 28px;
    width: auto;
    max-width: 120px;
    max-height: 28px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    object-position: left center;
}
.n2-nav-logo[hidden] {
    display: none;
}
.n2-nav-brand-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.n2-nav-mobile-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    max-width: 100%;
    flex-shrink: 0;
}
.n2-nav-mobile-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    line-height: 1;
    white-space: nowrap;
}
.n2-nav-mobile-links .navlink {
    color: rgba(45, 80, 22, 0.9);
}
.n2-nav-sep {
    color: rgba(45, 80, 22, 0.4);
}
.n2-nav-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-left: 0.65rem;
    border-left: 1px solid rgba(45, 80, 22, 0.18);
    min-height: 2rem;
}
.n2-nav-mobile-signin {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: rgba(45, 80, 22, 0.9);
}
.n2-header-tools {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

/* Desktop nav: visible links + More overflow dropdown */
.n2-nav-menus {
    position: relative;
    align-items: center;
    justify-content: flex-start;
    gap: 0.15rem;
    min-width: 0;
}
@media (min-width: 768px) {
    .n2-nav-menus.n2-nav-menus--pending {
        visibility: hidden;
    }
}
.n2-nav-primary {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    width: max-content;
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 1.5rem;
    min-width: 0;
    overflow: hidden;
}
.n2-nav-primary.is-measuring {
    overflow: visible;
}
.n2-nav-link {
    flex: 0 0 auto;
    display: block;
    max-width: none !important;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    color: rgba(45, 80, 22, 0.9);
}
.n2-nav-link.is-overflow {
    display: none !important;
}
.n2-nav-more {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
.n2-nav-more[hidden] {
    display: none !important;
}
.n2-nav-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.025em;
    white-space: nowrap;
    color: rgba(45, 80, 22, 0.9);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.n2-nav-more-btn i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}
.n2-nav-more.is-open .n2-nav-more-btn,
.n2-nav-more-btn:hover,
.n2-nav-more-btn:focus-visible {
    color: var(--forest);
    background: rgba(45, 80, 22, 0.08);
}
.n2-nav-more.has-active .n2-nav-more-btn {
    color: var(--forest);
}
.n2-nav-more.is-open .n2-nav-more-btn i {
    transform: rotate(180deg);
}
.n2-nav-more-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 70;
    min-width: 12rem;
    max-width: min(18rem, 70vw);
    max-height: min(60vh, 22rem);
    overflow-y: auto;
    padding: 0.4rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(45, 80, 22, 0.15);
    background: #f5f2eb;
    box-shadow: 0 16px 36px rgba(45, 80, 22, 0.18);
}
.n2-nav-more-panel[hidden] {
    display: none !important;
}
.n2-nav-more-panel .nav-menu-item {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 0.45rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--forest);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    transition: background 0.15s ease, color 0.15s ease;
}
.n2-nav-more-panel .nav-menu-item:hover,
.n2-nav-more-panel .nav-menu-item:focus-visible {
    background: rgba(45, 80, 22, 0.1);
    color: var(--forest);
}
.n2-nav-more-panel .nav-menu-item.active {
    color: var(--forest);
    background: rgba(45, 80, 22, 0.14);
    font-weight: 700;
}

/* Nav search */
.n2-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.65rem;
    border: 1px solid rgba(45, 80, 22, 0.15);
    border-radius: 0.75rem;
    background: var(--cream);
}
.n2-search svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: rgba(45, 80, 22, 0.55);
}
.n2-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 0.875rem;
    color: var(--forest);
    outline: none;
}
.n2-search input::placeholder {
    color: rgba(45, 80, 22, 0.45);
}
.n2-search button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 0.5rem;
    background: var(--forest);
    color: var(--cream);
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
}
.n2-search button:hover {
    background: rgba(45, 80, 22, 0.9);
}

@media (min-width: 768px) {
    .n2-header-inner {
        padding: 1.5rem 1.5rem 1.15rem;
    }
    .n2-header-stack {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
    }
    .n2-brand {
        font-size: 1.875rem;
    }
    .n2-nav-mobile-meta {
        display: none;
    }
    .n2-header-tools {
        flex: 1 1 auto;
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        min-width: 0;
    }
    .n2-nav-menus {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
    }
    .n2-search,
    .n2-header-tools > .n2-nav-auth {
        flex-shrink: 0;
    }
    .n2-search {
        width: auto;
        max-width: none;
        padding: 0.35rem 0.65rem;
    }
    .n2-search input {
        width: 9rem;
        flex: 0 1 9rem;
    }
    .n2-search button {
        padding: 0.4rem 0.7rem;
    }
}

/* Reserve logged-in auth width so menu More-collapse doesn't jump when member UI appears */
.n2-nav-auth {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.n2-nav-auth-sizer {
    visibility: hidden;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
}
.n2-nav-auth-sizer-avatar {
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 9999px;
    flex-shrink: 0;
    border: 1.5px solid transparent;
}
.n2-nav-auth-sizer-name {
    max-width: 6.5rem;
    overflow: hidden;
}
.n2-nav-auth-sizer-divider {
    width: 1px;
    height: 1rem;
    flex-shrink: 0;
}
.n2-nav-auth-sizer-out {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.625rem;
}
.n2-nav-auth-live {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}
@media (max-width: 767px) {
    .n2-nav-auth {
        display: none !important;
    }
}

@media (max-width: 640px) {
    main.mx-auto.max-w-6xl,
    footer .mx-auto.max-w-6xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* —— Home: mobile type & summary density —— */
.n2-home-main {
    padding-top: 1.5rem;
}
.n2-hero-img {
    height: 220px;
}
.n2-hero-title {
    margin-top: 0.85rem;
    font-size: 1.65rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    word-break: break-word;
}
.n2-hero-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-top: 0.85rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    word-break: break-word;
}
.n2-hero-meta {
    margin-top: 1rem;
    font-size: 0.8125rem;
}
.n2-section-title {
    font-size: 1.25rem;
    line-height: 1.25;
}
.n2-city-img {
    height: 260px;
}
.n2-city-overlay {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
}
.n2-city-title {
    margin-top: 0.65rem;
    font-size: 1.35rem;
    line-height: 1.2;
    word-break: break-word;
}
.n2-city-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    word-break: break-word;
}
.n2-module {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
}
.n2-module-title {
    font-size: 0.9375rem;
    line-height: 1.3;
}
.n2-module-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    word-break: break-word;
}
.n2-site-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* —— Detail: mobile cover / quote / continue —— */
.n2-cover {
    height: 48vh;
    min-height: 280px;
    max-height: 420px;
}
.n2-cover-inner {
    padding-bottom: 1.25rem;
    padding-top: 2.5rem;
}
.n2-cover-title {
    margin-top: 0.65rem;
    font-size: 1.65rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    word-break: break-word;
}
.n2-cover-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-top: 0.65rem;
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}
.n2-cover-meta {
    margin-top: 1rem;
    font-size: 0.8125rem;
}
.n2-pull-quote {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin-top: 0.75rem;
    font-size: 1.25rem;
    line-height: 1.3;
    word-break: break-word;
}
.n2-pull-card {
    display: none;
}
.n2-detail-body {
    padding-top: 1.75rem;
}
.n2-continue-section {
    padding-top: 2.5rem;
}
.n2-continue-title {
    font-size: 1.5rem;
}
.n2-continue-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 0.85rem;
    font-size: 1.15rem;
    line-height: 1.25;
    word-break: break-word;
}
.n2-continue-card-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    word-break: break-word;
}
.n2-continue-num {
    font-size: 1.75rem;
}
.uc-article {
    font-size: 1rem;
    line-height: 1.75;
}
.uc-article p {
    margin: 0 0 1.25rem 0;
}
.uc-article p:first-of-type::first-letter {
    font-size: 3rem;
    padding: 0.12rem 0.5rem 0 0;
}

@media (min-width: 768px) {
    .n2-home-main {
        padding-top: 2.5rem;
    }
    .n2-hero-img {
        height: 340px;
    }
    .n2-hero-title {
        margin-top: 1rem;
        font-size: 3rem;
        line-height: 1.05;
    }
    .n2-hero-summary {
        -webkit-line-clamp: 5;
        margin-top: 1.25rem;
        font-size: 1rem;
        line-height: 1.625;
    }
    .n2-hero-meta {
        margin-top: 1.75rem;
        font-size: 0.875rem;
    }
    .n2-section-title {
        font-size: 1.5rem;
    }
    .n2-city-img {
        height: 420px;
    }
    .n2-city-overlay {
        left: 1.5rem;
        right: 1.5rem;
        bottom: 1.5rem;
    }
    .n2-city-title {
        margin-top: 1rem;
        font-size: 2.25rem;
    }
    .n2-city-summary {
        -webkit-line-clamp: 3;
        margin-top: 0.75rem;
        font-size: 0.875rem;
    }
    .n2-module {
        margin-top: 3.5rem;
        padding-top: 2.5rem;
    }
    .n2-module-title {
        font-size: 1rem;
    }
    .n2-module-summary {
        -webkit-line-clamp: 3;
        font-size: 0.875rem;
    }
    .n2-site-desc {
        -webkit-line-clamp: unset;
        display: block;
        margin-bottom: 2rem;
        font-size: 0.875rem;
    }
    .n2-cover {
        height: 62vh;
        min-height: 420px;
        max-height: none;
    }
    .n2-cover-inner {
        padding-bottom: 2.5rem;
        padding-top: 4rem;
    }
    .n2-cover-title {
        margin-top: 1rem;
        font-size: 3.75rem;
        line-height: 1.05;
    }
    .n2-cover-summary {
        -webkit-line-clamp: 4;
        margin-top: 1rem;
        font-size: 1rem;
        line-height: 1.625;
    }
    .n2-cover-meta {
        margin-top: 1.75rem;
        font-size: 0.875rem;
    }
    .n2-pull-quote {
        -webkit-line-clamp: 6;
        margin-top: 1rem;
        font-size: 1.875rem;
    }
    .n2-pull-card {
        display: block;
    }
    .n2-detail-body {
        padding-top: 3rem;
    }
    .n2-continue-section {
        padding-top: 4rem;
    }
    .n2-continue-title {
        font-size: 1.875rem;
    }
    .n2-continue-card-title {
        margin-top: 1.25rem;
        font-size: 1.5rem;
    }
    .n2-continue-card-summary {
        -webkit-line-clamp: 3;
        margin-top: 0.75rem;
        font-size: 0.875rem;
    }
    .n2-continue-num {
        font-size: 2.25rem;
    }
    .uc-article {
        font-size: 1.06rem;
        line-height: 1.9;
    }
    .uc-article p {
        margin: 0 0 1.65rem 0;
    }
    .uc-article p:first-of-type::first-letter {
        font-size: 4.2rem;
        padding: 0.18rem 0.7rem 0 0;
    }
}

/* Footer section links — gap so they read as separate taps */
.n2-footer-links {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.25rem;
    row-gap: 0.75rem;
}
.n2-footer-links .navlink {
    display: inline-block;
    padding: 0.15rem 0;
}

/* Category / categories page — mobile-friendly lists & cards */
/* Grid/flex children default min-width:auto can blow past the viewport; clip + scroll need min-width:0 */
.n2-cat-aside,
.n2-story-main,
.n2-story-card,
.n2-story-card > a {
    min-width: 0;
    max-width: 100%;
}
.n2-cat-list {
    display: flex;
    gap: 0.5rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35rem;
    margin-top: 0.85rem;
    /* so the last chip is not flush-cut against the edge */
    padding-right: 0.25rem;
}
.n2-cat-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(45, 80, 22, 0.15);
    border-radius: 999px;
    background: rgba(245, 242, 235, 0.6);
    font-size: 0.8125rem;
    line-height: 1.2;
    color: rgba(45, 80, 22, 0.85);
    white-space: nowrap;
    text-decoration: none;
}
.n2-cat-chip:hover,
.n2-cat-chip:focus-visible {
    border-color: rgba(45, 80, 22, 0.3);
}
.n2-cat-chip-arrow {
    font-size: 0.7rem;
    color: rgba(45, 80, 22, 0.4);
}
/* space-y-* missing from prebuilt Tailwind — own gap here */
.n2-story-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.25rem;
    min-width: 0;
}
.n2-story-card {
    overflow: hidden;
}
.n2-story-card-media {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #d8d4cb;
}
.n2-story-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* hide broken-image alt text bleed */
    font-size: 0;
    color: transparent;
}
.n2-story-card-overlay {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.n2-story-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 1.05rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.n2-story-card-meta {
    padding: 0.9rem 1rem 1rem;
    min-width: 0;
    overflow: hidden;
}
.n2-story-card-meta .line-clamp-3,
.n2-story-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.n2-story-issue {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}
.n2-story-issue-num {
    font-size: 1.15rem;
    line-height: 1;
}

@media (min-width: 768px) {
    .n2-cat-list {
        flex-direction: column;
        overflow: visible;
        gap: 0.5rem;
        margin-top: 1.25rem;
        padding-bottom: 0;
        padding-right: 0;
    }
    .n2-cat-chip {
        flex: none;
        width: 100%;
        justify-content: space-between;
        border-radius: 0.75rem;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        white-space: normal;
    }
    .n2-story-list {
        gap: 2rem;
        margin-top: 2rem;
    }
    .n2-story-card-media {
        height: 100%;
        min-height: 220px;
    }
    .n2-story-card-media img {
        min-height: 220px;
    }
    .n2-story-card-overlay {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .n2-story-card-title {
        font-size: 1.5rem;
        line-height: 1.25;
    }
    .n2-story-card-meta {
        padding: 1.5rem 1.75rem;
    }
    .n2-story-issue {
        flex-direction: column;
        gap: 0.5rem;
    }
    .n2-story-issue-num {
        font-size: 2.25rem;
    }
}
