/* My Keys To Music — Newsletter Index (extras Nord timeline chrome) */
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  --ink: #25191a;
  --muted: #62595a;
  --subtle: #766b6a;
  --page: #fffdf9;
  --surface: #fff;
  --soft: #f8f4f2;
  --line: #eadfdc;
  --field: #c9bdbc;
  --header: #8e1116;
  --accent: #a20f17;
  --accent-bright: #d71920;
  --link: #b51a22;
  --radius: 0.75rem;
  --shadow: 0 0.45rem 1.25rem rgba(67, 19, 19, 0.08);
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; color: var(--accent); }

.wrap {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* Header — extras burgundy bar */
.site-header {
  position: static;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem clamp(1rem, 4vw, 4rem);
  background: var(--header);
  color: #fff;
  z-index: 30;
}

.site-header .wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
  font-size: 0.88rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
  text-decoration: none !important;
}

.site-nav a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

.site-nav a[aria-current="page"] {
  color: #fff !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.site-footer {
  margin-top: auto;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.78rem;
  background: transparent;
}

.site-footer .wrap {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* Index hero / intro */
.hero {
  background: transparent;
  border-bottom: none;
  padding: clamp(1.5rem, 3.5vw, 2.5rem) 0 0;
}

.hero h1,
.intro h1 {
  margin: 0.35rem 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  font-weight: 800;
}

.hero p,
.intro > p {
  margin: 0.5rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 400;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Sticky filter / search toolbar (timeline chrome) */
.filters {
  position: sticky;
  top: 0.5rem;
  z-index: 10;
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 1.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 160px;
  flex: 1;
}

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: none;
}

.field input[type="search"],
.field select {
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--field);
  border-radius: 0.4rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}

.field input[type="search"]:focus,
.field select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-color: var(--accent);
}

.field-search { flex: 2; min-width: 220px; }

.meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--subtle);
}

.btn, button.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: 0.4rem;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  font: inherit;
}

.btn:hover, button.btn:hover {
  background: var(--accent-bright);
  text-decoration: none !important;
}

.btn.btn-ghost,
button.btn.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  font-weight: 600;
}

.btn.btn-ghost:hover,
button.btn.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--soft);
}

/* Cards — whole card clickable */
.results {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 2.5rem;
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-weight: inherit;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover,
a.card:hover {
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: 0 0.7rem 2rem rgba(67, 19, 19, 0.12);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: baseline;
}

.card h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--ink);
  font-weight: 800;
}

.card .card-source { font-size: 0.8em; opacity: 0.85; }

.card .date {
  color: var(--subtle);
  font-size: 0.85rem;
  white-space: nowrap;
}

.card .summary {
  margin: 0.55rem 0 0.7rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 400;
}

.card .piece-count {
  font-size: 0.8rem;
  color: var(--subtle);
  margin-top: 0.4rem;
  font-weight: 400;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
}

.tag-kb {
  background: color-mix(in srgb, var(--accent) 8%, var(--soft));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--accent);
}

.tag-cat {
  background: var(--soft);
  border-color: var(--line);
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--subtle);
}

/* Article pages */
main.article {
  padding: 1.25rem 0 2.5rem;
}

.back { margin: 0 0 1rem; font-size: 0.9rem; }

.article-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.article-header .date {
  margin: 0;
  color: var(--subtle);
  font-size: 0.9rem;
  font-weight: 600;
}

.article-header h1 {
  margin: 0.35rem 0 0.75rem;
  color: var(--ink);
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-weight: 800;
}

.article-header .summary {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  color: var(--muted);
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.piece {
  padding: 0.75rem 0 1.1rem;
  border-bottom: 1px solid var(--line);
}

.piece:last-child { border-bottom: none; padding-bottom: 0; }

.piece h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--ink);
}

.piece p { margin: 0 0 0.75rem; color: var(--ink); }
.piece p:last-child { margin-bottom: 0; }

.notice {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  color: var(--muted);
}

.article-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.article-footer .source {
  font-size: 0.78rem;
  color: var(--subtle);
  margin-bottom: 0.35rem;
  font-weight: 400;
}

.article-footer code {
  font-size: 0.75rem;
  background: var(--soft);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}

@media (min-width: 700px) and (min-height: 650px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .filters {
    top: 3.6rem;
  }
}

@media (max-width: 600px) {
  .hero h1, .intro h1 { font-size: clamp(1.85rem, 9vw, 2.4rem); }
  .article-header h1 { font-size: 1.45rem; }
  .article-body { padding: 1.1rem; }
  .filters { align-items: stretch; }
  .site-nav { width: 100%; }
}

/* Issue images */
.issue-image {
  margin: 1.25rem 0;
  padding: 0;
  text-align: center;
}

.issue-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--soft);
}

/* Social / platform icons — keep EO size (~48px), don't stretch full column */
.issue-image-icon {
  margin: 0.65rem 0;
}
.issue-image-icon img {
  max-width: 48px;
  width: auto;
  height: auto;
  border-radius: 0.45rem;
}

/* Social icons — horizontal row with tooltips via title */
.issue-social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem 1rem;
  margin: 1.25rem 0 0.5rem;
}
.issue-social-row .issue-image-icon {
  margin: 0;
  display: inline-flex;
}
.issue-social-row .issue-image-icon a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.issue-social-row .issue-image-icon img {
  display: block;
}
.issue-image img[style*="max-width"] {
  width: auto;
  height: auto;
  max-width: 100%; /* overridden by inline when smaller */
}


.issue-image a {
  display: inline-block;
  line-height: 0;
}
.issue-image:not(.issue-image-icon) a {
  max-width: 100%;
}
.issue-image:not(.issue-image-icon) a img {
  display: block;
}

.issue-image-hero {
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.issue-image-hero img {
  border-top: 3px solid var(--accent);
}

/* Platform source small print */
.platform-source {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--subtle);
  letter-spacing: 0.02em;
  font-weight: 400;
}

.article-footer .source-pdf {
  font-size: 0.7rem;
  color: var(--subtle);
  margin-bottom: 1rem;
}

.article-footer .source-pdf code {
  font-size: 0.65rem;
  word-break: break-all;
}

.card-source {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 400;
}

/* Links section */
.issue-links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.issue-links h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.issue-links ul {
  margin: 0;
  padding-left: 1.2rem;
}

.issue-links li {
  margin: 0.35rem 0;
}

.article-body a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.article-body a:hover {
  color: var(--accent);
}

.article-body > .issue-image + .piece {
  border-top: none;
}

.piece + .issue-image {
  margin-top: 0.5rem;
}

main.index-main {
  padding: 0 clamp(0, 0vw, 0) 0;
  flex: 1;
}

.index-shell {
  padding: 0 clamp(1rem, 4vw, 4rem) 2rem;
  width: min(1100px + 8vw, 100%);
  margin: 0 auto;
  box-sizing: border-box;
}


.issue-cta {
  margin: 0.75rem 0 0;
}
.issue-cta a {
  display: inline-block;
  font-weight: 800;
}


/* Issue page: standardized title + quieter original campaign title */
.article-header h1 {
  margin-bottom: 0.35rem;
}
.article-header .original-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--subtle);
  line-height: 1.35;
}
.article-header .original-title span {
  font-weight: 600;
  color: var(--muted);
}
