/* COSYmagazine newsstand: warm, quiet, easy to filter. */
.ns { max-width: 1180px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem) 0; color: var(--ink, #1c1917); }
.ns-head { max-width: 46rem; margin-bottom: 1.75rem; }
.ns-kicker { font: 700 .78rem/1 var(--font-sans, system-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--cosy-color-primary, #3f6b4b); margin: 0 0 .75rem; }
.ns h1 { font-family: var(--font-serif, Georgia, serif); font-weight: 560; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.06; letter-spacing: -.015em; margin: 0 0 .9rem; text-wrap: balance; }
.ns-lede { font-size: 1.1rem; line-height: 1.55; color: var(--ink-muted, #5a5a50); margin: 0; max-width: 40rem; }
.ns-head-links { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.ns-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border, rgba(74,107,80,.25)); background: var(--warm-white, #fffdf8); color: var(--ink, #1c1917); text-decoration: none; font-weight: 600; font-size: .92rem; }
.ns-pill:hover { border-color: var(--cosy-color-primary, #3f6b4b); }

/* Featured story + must-read rail */
.ns-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; margin: 0 0 3rem; }
.ns-hero[hidden] { display: none; }
.ns-hero-lead { display: flex; flex-direction: column; min-width: 0; }
.ns-hero-art { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(35,56,39,.14), 0 18px 36px -22px rgba(35,56,39,.5); }
.ns-hero-art svg, .ns-rail-art svg, .ns-card-art svg { display: block; width: 100%; height: auto; }
.ns-hero-body { padding-top: 1.1rem; }
.ns-hero-eyebrow { font: 700 .74rem/1.3 var(--font-sans, system-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--cosy-color-primary, #3f6b4b); margin: 0 0 .55rem; }
.ns-hero-lead h2 { font-family: var(--font-serif, Georgia, serif); font-weight: 560; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.06; letter-spacing: -.015em; margin: 0 0 .7rem; text-wrap: balance; }
.ns-hero-lead h2 a { color: inherit; text-decoration: none; }
.ns-hero-lead .ns-dek { font-size: 1.05rem; max-width: 40rem; }
.ns-hero-foot { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--border, rgba(74,107,80,.18)); font-size: .85rem; color: var(--ink-muted, #5a5a50); }

.ns-hero-rail { border-left: 1px solid var(--border, rgba(74,107,80,.18)); padding-left: clamp(1rem, 2vw, 1.5rem); min-width: 0; }
.ns-hero-rail[hidden] { display: none; }
.ns-rail-title { font: 700 .78rem/1 var(--font-sans, system-ui); letter-spacing: .12em; text-transform: uppercase; color: #993C1D; margin: .2rem 0 1rem; }
.ns-rail-title[hidden] { display: none; }
.ns-rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.ns-rail-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: .85rem; align-items: center; }
.ns-rail-art { display: block; border-radius: 8px; overflow: hidden; background: var(--sage-mist, #F0F5F1); }
.ns-rail-meta { font: 700 .66rem/1.3 var(--font-sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--cosy-color-primary, #3f6b4b); }
.ns-rail-copy h3 { font-family: var(--font-serif, Georgia, serif); font-size: .98rem; line-height: 1.25; margin: .2rem 0 0; font-weight: 560; }
.ns-rail-copy h3 a { color: inherit; text-decoration: none; }
.ns-rail-copy h3 a:hover { text-decoration: underline; text-decoration-color: #F3C969; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Contents: the numbered edit, borrowed from a print contents page */
.ns-contents { margin: 0 0 3.25rem; }
.ns-contents[hidden] { display: none; }
.ns-contents .ns-section-head { align-items: baseline; }
.ns-contents-meta { margin-left: auto; font: 700 .7rem/1 var(--font-sans, system-ui); letter-spacing: .12em; text-transform: uppercase; color: #993C1D; }
.ns-section-link { font: 700 .8rem/1 var(--font-sans, system-ui); color: var(--cosy-color-primary, #3f6b4b); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .15rem; }
.ns-section-link:hover { color: var(--ink, #1c1917); }
.ns-contents-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3rem); border-top: 1px solid var(--border, rgba(74,107,80,.18)); }
.ns-contents-item { display: grid; grid-template-columns: 2.2rem 7.5rem minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1.1rem 0; border-bottom: 1px solid var(--border, rgba(74,107,80,.18)); min-width: 0; }
.ns-contents-num { font-family: var(--font-serif, Georgia, serif); font-size: 1.75rem; line-height: 1; font-weight: 560; color: var(--cosy-color-primary, #3f6b4b); font-variant-numeric: tabular-nums; }
.ns-contents-art { display: block; border-radius: 8px; overflow: hidden; background: var(--sage-mist, #F0F5F1); }
.ns-contents-art svg { display: block; width: 100%; height: auto; }
.ns-contents-copy { min-width: 0; }
.ns-contents-kicker { margin: 0 0 .25rem; font: 700 .66rem/1.3 var(--font-sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--cosy-color-primary, #3f6b4b); }
.ns-contents-copy h3 { margin: 0; font-family: var(--font-serif, Georgia, serif); font-size: 1.05rem; line-height: 1.2; font-weight: 560; text-wrap: balance; }
.ns-contents-copy h3 a { color: inherit; text-decoration: none; }
.ns-contents-copy h3 a:hover { text-decoration: underline; text-decoration-color: #F3C969; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ns-contents-copy .ns-dek { margin: .3rem 0 0; font-size: .86rem; line-height: 1.45; -webkit-line-clamp: 2; }

.ns-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 1.3rem; border-radius: 999px; background: var(--cosy-color-primary, #3f6b4b); color: #fff; text-decoration: none; font-weight: 700; }
.ns-btn:hover { filter: brightness(1.08); }

/* Filters */
.ns-filters { position: sticky; top: 58px; z-index: 20; display: grid; gap: .75rem; padding: .85rem 0; margin-bottom: 1.25rem; background: color-mix(in srgb, var(--cream, #FAF7F2) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border, rgba(74,107,80,.18)); }
.ns-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.ns-search { flex: 1 1 15rem; min-width: 0; height: 42px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--border, rgba(74,107,80,.3)); background: var(--warm-white, #fffdf8); color: inherit; font: inherit; }
.ns-select { height: 42px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--border, rgba(74,107,80,.3)); background: var(--warm-white, #fffdf8); color: inherit; font: inherit; font-size: .93rem; max-width: 100%; }
.ns-chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ns-chips::-webkit-scrollbar { display: none; }
.ns-chip { flex: none; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border, rgba(74,107,80,.3)); background: transparent; color: inherit; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.ns-chip[aria-pressed="true"] { background: var(--cosy-color-primary, #3f6b4b); border-color: transparent; color: #fff; }
.ns-chip span { opacity: .65; font-weight: 500; margin-left: .25rem; }
.ns-count { margin-left: auto; font-size: .9rem; color: var(--ink-muted, #5a5a50); }
.ns-reset { border: 0; background: none; color: var(--cosy-color-primary, #3f6b4b); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0 .25rem; }
.ns-reset[hidden] { display: none; }

/* Cards */
.ns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.ns-card { display: flex; flex-direction: column; background: var(--warm-white, #fffdf8); border: 1px solid var(--border, rgba(74,107,80,.2)); border-radius: 18px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; position: relative; }
.ns-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(35,56,39,.5); }
.ns-card-art { display: block; }
.ns-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.15rem 1.15rem; flex: 1; }
.ns-meta { display: flex; gap: .5rem; align-items: center; font: 700 .72rem/1 var(--font-sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--cosy-color-primary, #3f6b4b); }
.ns-meta i { font-style: normal; color: var(--ink-muted, #5a5a50); font-weight: 600; letter-spacing: 0; text-transform: none; }
.ns-card h3 { font-family: var(--font-serif, Georgia, serif); font-weight: 560; font-size: 1.2rem; line-height: 1.22; margin: 0; text-wrap: balance; }
.ns-card h3 a { color: inherit; text-decoration: none; }
.ns-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ns-dek { margin: 0; color: var(--ink-muted, #5a5a50); font-size: .95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Language Pills for Multi-Language Cards */
.ns-card-langs { margin-top: auto; padding-top: .6rem; display: flex; flex-direction: column; gap: .35rem; position: relative; z-index: 2; }
.ns-langs-badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cosy-color-primary, #3f6b4b); display: flex; align-items: center; gap: .25rem; }
.ns-langs-pills { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.ns-lang-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; padding: .15rem .4rem; border-radius: 6px; background: var(--sage-mist, #F0F5F1); color: var(--ink, #1c1917); text-decoration: none; font-size: .72rem; font-weight: 700; text-transform: uppercase; border: 1px solid transparent; transition: all .15s ease; }
.ns-lang-pill:hover { background: #F3C969; color: #1c1917; border-color: rgba(0,0,0,.1); transform: translateY(-1px); }
.ns-lang-pill.is-active { background: var(--cosy-color-primary, #3f6b4b); color: #ffffff; border-color: transparent; }

.ns-foot { padding-top: .5rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--ink-muted, #5a5a50); }
.ns-foot-meta { margin-top: auto; }
.ns-empty { padding: 3rem 1rem; text-align: center; color: var(--ink-muted, #5a5a50); }

.ns-about { margin: 3rem 0 0; border-top: 1px solid var(--border, rgba(74,107,80,.2)); padding-top: 1.25rem; }
.ns-about summary { cursor: pointer; font-weight: 700; }
.ns-about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.ns-about-grid div { background: var(--sage-mist, #F0F5F1); border-radius: 14px; padding: 1rem 1.15rem; }
.ns-about-grid h3 { font-size: 1rem; margin: 0 0 .4rem; font-family: var(--font-serif, Georgia, serif); }
.ns-about-grid p { margin: 0; font-size: .93rem; line-height: 1.5; color: var(--ink-muted, #5a5a50); }

@media (max-width: 820px) { .ns-filters { top: 92px; } .ns-count { margin-left: 0; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .ns-card { transition: none; } .ns-card:hover { transform: none; } }

html[data-theme="dark"] .ns-about-grid div { background: #19231c; }
html[data-theme="dark"] .ns-card, html[data-theme="dark"] .ns-select, html[data-theme="dark"] .ns-search, html[data-theme="dark"] .ns-pill { background: #1b251e; border-color: rgba(255,255,255,.12); color: #e8f0e9; }
html[data-theme="dark"] .ns-filters { background: color-mix(in srgb, #121a15 94%, transparent); }
html[data-theme="dark"] .ns-langs a { background: #26332a; color: #e8f0e9; }
html[data-theme="dark"] .ns-card h3 a { color: #f1ecdf; }
html[data-theme="dark"] .ns-chip { color: #e8f0e9; }
html[data-theme="dark"] .ns-sub-box { background: #141f17 !important; border: 1px solid rgba(255, 255, 255, 0.12); }

/* Never let a scroller or a long title widen the page on phones. */
.ns { min-width: 0; }
.ns-filters, .ns-row, .ns-chips { min-width: 0; max-width: 100%; }
.ns-chips { flex: 1 1 100%; }
.ns-select { flex: 1 1 9rem; }
html, body { overflow-x: clip; }

/* Shown when an article has no version in the selected navigation language yet */
.ns-fallback { font-size: .68rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: var(--cosy-color-surface-2, #f1ece3); color: var(--cosy-color-muted, #78716c); }


/* ---- Issue vibes: each card is a page torn from that month's notebook -------------------------------------- */
.ns-card { --c-paper: var(--warm-white, #fffdf8); --c-ink: #3f6a4c; --c-line: rgba(63, 106, 76, .12); --c-tape: rgba(255, 214, 110, .85); }
.ns-card[data-issue="aug"] { --c-paper: #fffef8; --c-ink: #1e46a0; --c-line: rgba(30, 70, 160, .12); --c-tape: rgba(255, 214, 110, .85); }
.ns-card[data-issue="sep"] { --c-paper: #fbfffd; --c-ink: #0f6e66; --c-line: rgba(15, 110, 102, .12); --c-tape: rgba(160, 235, 210, .9); }
.ns-card[data-issue="oct"] { --c-paper: #f3e6cf; --c-ink: #b0245f; --c-line: rgba(176, 36, 95, .12); --c-tape: rgba(255, 170, 205, .85); }
.ns-card[data-issue="sat"] { --c-paper: #fffdf8; --c-ink: #c62828; --c-line: rgba(198, 40, 40, .1); --c-tape: rgba(255, 190, 190, .85); }
.ns-card[data-issue="nov"] { --c-paper: #fbf3e2; --c-ink: #6b4423; --c-line: rgba(107, 68, 35, .13); --c-tape: rgba(245, 200, 120, .85); }
.ns-card[data-issue="dec"] { --c-paper: #f3f8ff; --c-ink: #2a5d9f; --c-line: rgba(42, 93, 159, .12); --c-tape: rgba(190, 220, 255, .9); }
.ns-card[data-issue="feb"] { --c-paper: #f4faef; --c-ink: #2c7a45; --c-line: rgba(44, 122, 69, .12); --c-tape: rgba(190, 235, 170, .9); }
.ns-card[data-issue] {
  background: var(--c-paper); border-radius: 6px 6px 14px 14px; border-color: var(--c-line);
  box-shadow: 0 1px 0 var(--c-line), 0 8px 18px -14px rgba(35, 40, 50, .45);
}
.ns-card[data-issue] .ns-card-body {
  background-image: repeating-linear-gradient(transparent 0 26px, var(--c-line) 26px 27px);
  background-position: 0 .6rem;
}
.ns-card[data-issue]::before {          /* a strip of washi tape holding the cover on */
  content: ""; position: absolute; top: -7px; left: 50%; width: 84px; height: 22px; z-index: 3;
  transform: translateX(-50%) rotate(-3deg); background: var(--c-tape);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 92% 0, 96% 10%, 100% 0, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 8% 100%, 4% 90%, 0 100%);
  opacity: .9; pointer-events: none;
}
.ns-card[data-issue]:nth-child(even)::before { transform: translateX(-50%) rotate(2.5deg); left: 38%; }
.ns-card[data-issue]:nth-child(3n)::before { left: 62%; }
.ns-card[data-issue] h3 { text-decoration: underline wavy var(--c-line); text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
.ns-card[data-issue] .ns-card-art { border-bottom: 2px solid var(--c-ink); }
@media (prefers-reduced-motion: no-preference) { .ns-card[data-issue]:nth-child(odd) { transform: rotate(-.25deg); } .ns-card[data-issue]:nth-child(even) { transform: rotate(.2deg); } .ns-card[data-issue]:hover { transform: translateY(-3px) rotate(0); } }
html[data-theme="dark"] .ns-card[data-issue] { background: #1b251e; --c-line: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .ns-card[data-issue] .ns-card-art { border-bottom-color: var(--c-tape); }

/* Section heading shared by the feed */
.ns-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border, rgba(74,107,80,.18));
}
.ns-section-head h2 {
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 560;
  margin: 0;
  line-height: 1.1;
}

/* The magazine: one cover-sized promotion, linking to the issues page */
.ns-magazine {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin: 3.5rem 0 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--sage-mist, #F0F5F1);
  border-radius: 22px;
}
.ns-magazine[hidden] { display: none; }
.ns-magazine-art { width: 100%; max-width: 20rem; justify-self: center; }
.ns-mag-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #241C18;
  box-shadow: 0 14px 34px -18px rgba(35, 40, 50, .6);
  color: #fff;
  text-decoration: none;
  transition: transform .2s ease;
}
.ns-mag-cover:hover { transform: translateY(-2px); }
.ns-mag-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ns-mag-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,12,10,.45) 0%, rgba(15,12,10,.04) 38%, rgba(15,12,10,.74) 100%); }
.ns-mag-masthead {
  position: absolute; top: 7%; left: 0; right: 0; text-align: center;
  font-family: var(--font-serif, Georgia, serif); font-weight: 900;
  font-size: clamp(1rem, 2.4vw, 1.5rem); letter-spacing: .02em;
  color: #f6ecd9; text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.ns-mag-line { position: absolute; left: 8%; right: 8%; bottom: 8%; display: grid; gap: .35rem; }
.ns-mag-line small { font: 700 .62rem/1.2 var(--font-sans, system-ui); letter-spacing: .1em; text-transform: uppercase; color: #f3c969; }
.ns-mag-line strong { font-family: var(--font-serif, Georgia, serif); font-size: clamp(1.1rem, 2.2vw, 1.6rem); line-height: 1.15; font-weight: 600; }
.ns-magazine-copy h2 {
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 560;
  line-height: 1.1;
  margin: .35rem 0 .8rem;
  text-wrap: balance;
}
.ns-magazine-copy p { color: var(--ink-muted, #5a5a50); line-height: 1.55; margin: 0 0 1.25rem; max-width: 34rem; }

@media (max-width: 900px) {
  .ns-hero { grid-template-columns: 1fr; }
  .ns-hero-rail { border-left: 0; border-top: 1px solid var(--border, rgba(74,107,80,.18)); padding-left: 0; padding-top: 1.25rem; }
  .ns-contents-list { grid-template-columns: 1fr; }
  .ns-magazine { grid-template-columns: 1fr; }
  .ns-magazine-art { max-width: 16rem; }
}
@media (max-width: 560px) {
  .ns-rail-item { grid-template-columns: 72px minmax(0, 1fr); }
  .ns-contents-item { grid-template-columns: 1.8rem 5.5rem minmax(0, 1fr); gap: .75rem; }
  .ns-contents-num { font-size: 1.35rem; }
  .ns-contents-copy .ns-dek { display: none; }
  .ns-contents-meta { display: none; }
}

html[data-theme="dark"] .ns-hero-rail { border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .ns-rail-art { background: #26332a; }
html[data-theme="dark"] .ns-contents-list,
html[data-theme="dark"] .ns-contents-item { border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .ns-contents-art { background: #26332a; }
html[data-theme="dark"] .ns-section-link { color: #a3d6b0; }
html[data-theme="dark"] .ns-magazine { background: #19231c; }
html[data-theme="dark"] .ns-magazine-copy p { color: #a3b899; }

/* Product identity: the lead panel and its art follow the editorial rhythm. */
[data-product] .ns-hero-art {
  border-radius: var(--cosy-product-radius, 18px);
  box-shadow: var(--cosy-product-shadow, none);
}
