/* Socialcomarket — Editorial press style */

:root {
  --bg: #fbfaf7;
  --bg-elev: #ffffff;
  --bg-soft: #f3f1ec;
  --ink: #16140f;
  --ink-2: #2b2820;
  --ink-3: #5a5648;
  --ink-4: #8a8475;
  --rule: #d9d4c5;
  --rule-2: #e8e3d3;
  --accent: #16140f;

  /* Category colors */
  --cat-marketing: #B23A2C;
  --cat-marketing-soft: #fbe9e5;
  --cat-communication: #1F4E8C;
  --cat-communication-soft: #e6edf6;
  --cat-personnalites: #6B2D5C;
  --cat-personnalites-soft: #f1e7ee;
  --cat-awards: #A57A1E;
  --cat-awards-soft: #f6efd9;
  --cat-tendances: #16140f;

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --sidebar-w: 320px;
  --content-max: 1280px;
  --pad: 24px;

  --card-style: editorial; /* editorial | bordered | minimal */
}

[data-theme="dark"] {
  --bg: #11100c;
  --bg-elev: #17150f;
  --bg-soft: #1c1a14;
  --ink: #f3efe4;
  --ink-2: #e0dccf;
  --ink-3: #aea99a;
  --ink-4: #7c7768;
  --rule: #2f2c23;
  --rule-2: #25221b;

  --cat-marketing: #E27464;
  --cat-marketing-soft: #2a1a16;
  --cat-communication: #6CA0E0;
  --cat-communication-soft: #142030;
  --cat-personnalites: #C480AE;
  --cat-personnalites-soft: #2a1c26;
  --cat-awards: #D9B764;
  --cat-awards-soft: #2a2316;
  --cat-tendances: #f3efe4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ============ TOP STRIP ============ */
.top-strip {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.top-strip-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 8px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.top-strip .date { color: rgba(255,255,255,0.7); }
.top-strip .links { display: flex; gap: 18px; }
.top-strip .links a:hover { color: #fff; opacity: 1; }
.top-strip .links a { opacity: 0.7; }

/* ============ MASTHEAD ============ */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.masthead-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  font-feature-settings: "ss01";
}
.logo .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--cat-marketing);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: 4px;
}

.masthead-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.masthead-nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  transition: color 0.15s ease;
}
.masthead-nav a:hover { color: var(--ink); }
.masthead-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color, var(--ink));
}

.masthead-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.icon-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  border-radius: 4px;
  transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn.mobile-only { display: none; }

.auth-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-left: 4px;
  transition: opacity 0.15s ease;
}
.auth-cta:hover { opacity: 0.9; }
@media (max-width: 860px) { .auth-cta { display: none; } }

/* ============ CONTENT LAYOUT ============ */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 48px;
  padding: 40px var(--pad);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ============ KICKER + HEADLINES ============ */
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-color, var(--ink-3));
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker.with-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--cat-color, var(--ink));
  border-radius: 50%;
  display: inline-block;
}

.headline {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.dek {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-3);
  line-height: 1.4;
  text-wrap: pretty;
}

.meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta .dot-sep::before { content: "·"; margin: 0 4px; color: var(--ink-4); }

/* ============ SECTION HEADER ============ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 24px;
}
.section-header h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.section-header .see-all {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.section-header .see-all:hover { color: var(--ink); }

/* ============ ARTICLE CARDS ============ */
.placeholder-img {
  background:
    repeating-linear-gradient(135deg, var(--rule-2) 0 8px, var(--bg-soft) 8px 16px);
  position: relative;
  overflow: hidden;
}
.placeholder-img::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.card:hover .headline { color: var(--cat-color, var(--ink-3)); }
.card .img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}
.card .img-wrap > .placeholder-img { width: 100%; height: 100%; }
.card .headline { transition: color 0.15s ease; }

/* Editorial card style (default) — clean, no border */
[data-card-style="editorial"] .card {}

/* Bordered card style */
[data-card-style="bordered"] .card {
  border: 1px solid var(--rule);
  padding: 14px;
  background: var(--bg-elev);
}
[data-card-style="bordered"] .card .img-wrap { margin: -14px -14px 6px; }

/* Minimal card style — no images on cards */
[data-card-style="minimal"] .card .img-wrap { display: none; }
[data-card-style="minimal"] .card {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}

/* ============ HERO ============ */
.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  padding: 32px var(--pad);
  max-width: var(--content-max);
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.hero-main { display: flex; flex-direction: column; gap: 14px; cursor: pointer; }
.hero-main .img-wrap { aspect-ratio: 16 / 9; }
.hero-main .img-wrap > .placeholder-img { width: 100%; height: 100%; }
.hero-main .headline { font-size: clamp(28px, 4.5vw, 48px); }
.hero-main:hover .headline { color: var(--cat-color, var(--ink-3)); }
.hero-main .dek { font-size: 18px; }

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--rule);
  padding-left: 32px;
}
.hero-side-item {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.hero-side-item:first-child { padding-top: 0; }
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item .img-wrap {
  aspect-ratio: 1;
  background: var(--bg-soft);
  overflow: hidden;
}
.hero-side-item .img-wrap > .placeholder-img { width: 100%; height: 100%; }
.hero-side-item .headline { font-size: 17px; line-height: 1.2; }
.hero-side-item:hover .headline { color: var(--cat-color, var(--ink-3)); }
.hero-side-item .text { display: flex; flex-direction: column; gap: 6px; }

/* ============ SIDEBAR ============ */
.sidebar { display: flex; flex-direction: column; gap: 36px; }
.sidebar-block { display: flex; flex-direction: column; gap: 14px; }
.sidebar-block h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
  letter-spacing: -0.005em;
}
.sidebar-list { display: flex; flex-direction: column; }
.sidebar-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item .num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-4);
  line-height: 0.9;
  font-style: italic;
}
.sidebar-item .headline { font-size: 14px; line-height: 1.25; }
.sidebar-item:hover .headline { color: var(--cat-color, var(--ink-3)); }
.sidebar-item .meta { font-size: 11px; margin-top: 4px; }

.sidebar-newsletter {
  background: var(--bg-soft);
  padding: 20px;
  border-top: 3px solid var(--cat-marketing);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-newsletter h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
}
.sidebar-newsletter p { font-size: 13px; color: var(--ink-3); margin: 0; line-height: 1.4; }
.sidebar-newsletter form { display: flex; gap: 6px; margin-top: 4px; }
.sidebar-newsletter input {
  flex: 1;
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  outline: none;
}
.sidebar-newsletter input:focus { border-color: var(--ink); }
.sidebar-newsletter button {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============ HOMEPAGE GRID ============ */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
  padding: 40px 0;
}
.home-grid .card .headline { font-size: 20px; }
.home-grid .card .dek { font-size: 14px; }

.home-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding: 40px 0;
}
.home-grid-2col .card .headline { font-size: 22px; }

/* Latest list (homepage compact) */
.latest-list { display: flex; flex-direction: column; }
.latest-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.latest-item .img-wrap { aspect-ratio: 4/3; background: var(--bg-soft); }
.latest-item .img-wrap > .placeholder-img { width: 100%; height: 100%; }
.latest-item .headline { font-size: 18px; line-height: 1.2; }
.latest-item .dek { font-size: 14px; }
.latest-item:hover .headline { color: var(--cat-color, var(--ink-3)); }
.latest-item .text { display: flex; flex-direction: column; gap: 6px; }

/* ============ CATEGORY PAGE ============ */
.category-header {
  padding: 56px var(--pad) 32px;
  max-width: var(--content-max);
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.category-header .cat-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-color);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-header .cat-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--cat-color);
}
.category-header h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.category-header .cat-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-3);
  margin-top: 18px;
  max-width: 640px;
  line-height: 1.4;
}

.filter-bar {
  display: flex;
  gap: 4px;
  padding: 18px var(--pad);
  max-width: var(--content-max);
  margin: 0 auto;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
}
.filter-bar .filter-label {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-right: 12px;
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.article-tags .chip {
  display: inline-block;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 4px 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.article-tags .chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.filter-bar .chip {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.filter-bar .chip:hover { border-color: var(--ink); }
.filter-bar .chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.filter-bar .spacer { flex: 1; }
.filter-bar .sort-select {
  background: none;
  border: 1px solid var(--rule);
  padding: 6px 28px 6px 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  border-radius: 999px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='currentColor'><path d='M2 4l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
}
.category-grid .card .headline { font-size: 22px; }
.category-grid .card .dek { font-size: 14px; }

/* ============ ARTICLE PAGE ============ */
.article-hero {
  padding: 56px var(--pad) 0;
  max-width: 880px;
  margin: 0 auto;
}
.article-hero .kicker { margin-bottom: 18px; }
.article-hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--ink);
  text-wrap: balance;
}
.article-hero .dek {
  font-size: 20px;
  margin-bottom: 28px;
}
.article-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  gap: 16px;
  flex-wrap: wrap;
}
.article-hero-meta .author-line {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
}
.article-hero-meta .author-line strong { color: var(--ink); font-weight: 600; }
.article-hero-meta .share { display: flex; gap: 6px; }
.article-hero-meta .share .icon-btn { width: 32px; height: 32px; border: 1px solid var(--rule); }

.article-cover {
  max-width: 1080px;
  margin: 32px auto 0;
  aspect-ratio: 16/9;
  padding: 0 var(--pad);
}
.article-cover .placeholder-img { width: 100%; height: 100%; }
.article-cover .caption {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
  padding: 8px 0;
  font-style: italic;
}

.article-body {
  max-width: 700px;
  margin: 40px auto 0;
  padding: 0 var(--pad);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-2);
}
.article-body p { margin: 0 0 1.2em; text-wrap: pretty; }
.article-body p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 5em;
  float: left;
  line-height: 0.85;
  padding: 4px 12px 0 0;
  font-weight: 700;
  color: var(--ink);
}
.article-body h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  margin: 2em 0 0.6em;
  letter-spacing: -0.01em;
}
.article-body blockquote {
  border-left: 3px solid var(--cat-color, var(--ink));
  padding: 6px 0 6px 24px;
  margin: 1.6em 0;
  font-style: italic;
  font-size: 24px;
  color: var(--ink);
  line-height: 1.3;
}
.article-body a { color: var(--cat-color, var(--ink)); text-decoration: underline; text-underline-offset: 3px; }

/* ============ COMMENTS ============ */
.comments {
  max-width: 700px;
  margin: 56px auto 0;
  padding: 0 var(--pad);
}
.comments h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.comments .comment-count {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-4);
  margin-bottom: 24px;
}
.comment-form {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.comment-form input,
.comment-form textarea {
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}
.comment-form textarea { min-height: 90px; resize: vertical; font-family: var(--sans); }
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--ink); }
.comment-form button {
  align-self: flex-start;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comment-form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.comment-form-foot .form-rule {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-4);
  font-style: italic;
}
.comment-form .form-notice {
  margin-top: 8px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  border-left: 3px solid var(--ink-4);
  background: var(--bg-soft);
  color: var(--ink-2);
}
.comment-form .form-notice-info { border-left-color: #d9914a; }
.comment-form .form-notice-success { border-left-color: #4a9268; }
.comment-form .form-notice-error { border-left-color: #c44a3c; color: #c44a3c; }

.comment {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.comment-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.comment-date {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
}
.comment-body {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}

/* ============ RELATED ============ */
.related {
  max-width: var(--content-max);
  margin: 64px auto 0;
  padding: 40px var(--pad);
  border-top: 4px double var(--rule);
}
.related h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin: 0 0 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.related-grid .card .headline { font-size: 18px; }

/* ============ FOOTER ============ */
.newsletter-band {
  background: var(--ink);
  color: var(--bg);
  padding: 56px var(--pad);
  margin-top: 64px;
}
.newsletter-band-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.newsletter-band h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--bg);
}
.newsletter-band p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.4;
}
.newsletter-band form { display: flex; gap: 8px; }
.newsletter-band input {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--bg);
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
}
.newsletter-band input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-band input:focus { border-color: var(--bg); }
.newsletter-band button {
  background: var(--bg);
  color: var(--ink);
  border: none;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.footer {
  background: var(--bg-soft);
  padding: 64px var(--pad) 32px;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { font-size: 32px; margin-bottom: 14px; display: inline-block; }
.footer-brand p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-3);
  margin: 0 0 18px;
  line-height: 1.45;
  max-width: 320px;
}
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: all 0.15s ease;
}
.footer-social a:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg);
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .links { display: flex; gap: 18px; }

/* ============ MOBILE MENU ============ */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--rule);
}
.mobile-menu-nav {
  padding: 24px var(--pad);
  display: flex;
  flex-direction: column;
}
.mobile-menu-nav a {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu-nav a .arrow {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--cat-color, var(--ink-3));
}
.mobile-menu-foot {
  margin-top: auto;
  padding: 24px var(--pad);
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============ SEARCH MODAL ============ */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-modal.open { opacity: 1; pointer-events: auto; }
.search-modal-inner {
  background: var(--bg);
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  padding: 18px 24px;
  gap: 14px;
}
.search-input-wrap svg { color: var(--ink-4); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}
.search-input-wrap input::placeholder { color: var(--ink-4); }
.search-input-wrap .esc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  border: 1px solid var(--rule);
  padding: 2px 8px;
}
.search-results {
  overflow-y: auto;
  padding: 8px 0;
}
.search-results .empty {
  padding: 40px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-4);
}
.search-results-section {
  padding: 12px 0;
}
.search-results-section h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin: 0;
  padding: 8px 24px;
}
.search-result {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  padding: 12px 24px;
  align-items: center;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.search-result:hover { background: var(--bg-soft); border-left-color: var(--cat-color, var(--ink)); }
.search-result .img-wrap { aspect-ratio: 1; background: var(--bg-soft); }
.search-result .img-wrap > .placeholder-img { width: 100%; height: 100%; }
.search-result .headline { font-size: 15px; line-height: 1.2; }
.search-result .meta { font-size: 11px; margin-top: 4px; }
.search-result .cat-tag {
  font-family: var(--sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cat-color);
  font-weight: 600;
  white-space: nowrap;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.pagination .pg-arrow {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 9px 14px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pagination .pg-arrow:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.pagination .pg-arrow:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination .pg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination .pg-num {
  background: none;
  border: none;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-3);
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  font-feature-settings: "tnum";
}
.pagination .pg-num:hover { color: var(--ink); border-bottom-color: var(--rule); }
.pagination .pg-num.active {
  color: var(--ink);
  border-bottom-color: var(--cat-color, var(--ink));
  font-weight: 700;
}
.pagination .pg-ellipsis {
  font-family: var(--serif);
  color: var(--ink-4);
  padding: 0 4px;
  font-size: 17px;
  letter-spacing: 0.1em;
}

/* ============ CATEGORY SEO TEXT ============ */
.cat-seo {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 4px double var(--rule);
}
.cat-seo h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 20px;
  color: var(--ink);
  max-width: 640px;
}
.cat-seo p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0 0 16px;
  max-width: 680px;
  text-wrap: pretty;
}
.cat-seo p:last-child { margin-bottom: 0; }

/* ============ AUTH PAGES (login / signup) ============ */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 100px);
}
.auth-aside {
  background: #0c0b08;
  color: #f5f1e6;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-aside::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 110%, #B23A2C 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, #1F4E8C 0%, transparent 35%);
  opacity: 0.28;
  pointer-events: none;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside-top { display: flex; flex-direction: column; gap: 14px; }
.auth-aside-top .badge {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245,241,230,0.55);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
}
.auth-aside-top .badge::before {
  content: "";
  width: 24px; height: 1px;
  background: rgba(245,241,230,0.4);
}
.auth-aside-top .logo { color: #f5f1e6; font-size: 32px; }
.auth-aside-top .logo .dot { background: #E27464; }
.auth-aside h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 24px 0 16px;
  color: #f5f1e6;
  text-wrap: balance;
  max-width: 460px;
}
.auth-aside .lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: rgba(245,241,230,0.75);
  margin: 0 0 32px;
  max-width: 440px;
  line-height: 1.45;
}
.auth-aside .perks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 24px 0 0;
  list-style: none;
  border-top: 1px solid rgba(245,241,230,0.15);
}
.auth-aside .perks li {
  font-family: var(--sans);
  font-size: 14px;
  color: rgba(245,241,230,0.85);
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: baseline;
}
.auth-aside .perks li .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  color: rgba(245,241,230,0.45);
  font-size: 13px;
  font-feature-settings: "tnum";
}
.auth-aside-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 12px;
  color: rgba(245,241,230,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  background: var(--bg);
}
.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}
.auth-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  margin: 0 0 12px;
}
.auth-form-wrap h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 10px;
  color: var(--ink);
}
.auth-form-wrap .sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-3);
  margin: 0 0 28px;
  line-height: 1.4;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
  gap: 24px;
}
.auth-tabs button {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  padding: 0 0 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.auth-tabs button:hover { color: var(--ink-2); }
.auth-tabs button.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: 10px 0;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus {
  border-bottom-color: var(--ink);
}
.field input::placeholder { color: var(--ink-4); font-style: italic; }
.field .hint {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 2px;
}
.field .pw-wrap { position: relative; display: flex; align-items: center; }
.field .pw-wrap input { flex: 1; padding-right: 60px; }
.field .pw-toggle {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 600;
  padding: 4px 2px;
}
.field .pw-toggle:hover { color: var(--ink); }

.pw-strength { display: flex; gap: 4px; margin-top: 6px; }
.pw-strength span {
  height: 3px;
  flex: 1;
  background: var(--rule);
  transition: background 0.2s ease;
}
.pw-strength[data-score="1"] span:nth-child(-n+1) { background: #c44a3c; }
.pw-strength[data-score="2"] span:nth-child(-n+2) { background: #d9914a; }
.pw-strength[data-score="3"] span:nth-child(-n+3) { background: #c9b54a; }
.pw-strength[data-score="4"] span:nth-child(-n+4) { background: #4a9268; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.4;
}
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox .box {
  width: 16px;
  height: 16px;
  border: 1px solid var(--rule);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.checkbox input:checked + .box {
  background: var(--ink);
  border-color: var(--ink);
}
.checkbox input:checked + .box::after {
  content: "";
  width: 4px;
  height: 8px;
  border-right: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: rotate(45deg) translate(-1px, -1px);
}
.checkbox a { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }
.forgot-link {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.forgot-link:hover { color: var(--ink); }

.auth-submit {
  margin-top: 18px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.15s ease;
}
.auth-submit:hover { opacity: 0.9; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-divider {
  position: relative;
  text-align: center;
  margin: 28px 0 20px;
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
}
.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--rule);
  z-index: 0;
}
.auth-divider span {
  background: var(--bg);
  padding: 0 14px;
  position: relative;
  z-index: 1;
}

.sso-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sso-btn:hover { border-color: var(--ink); color: var(--ink); }

.auth-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}
.auth-foot a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-success {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--cat-marketing);
  padding: 18px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.4;
  margin-bottom: 18px;
}

@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; min-height: auto; }
  .auth-aside { padding: 40px var(--pad); }
  .auth-aside h1 { font-size: 32px; }
  .auth-aside .perks { display: none; }
  .auth-aside-bottom { display: none; }
  .auth-main { padding: 40px var(--pad) 56px; }
}

@media (max-width: 560px) {
  .auth-form-wrap h2 { font-size: 26px; }
  .sso-row { grid-template-columns: 1fr; }
}

/* ============ READING PROGRESS ============ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--cat-color, var(--ink));
  z-index: 150;
  width: var(--progress, 0%);
  transition: width 0.1s linear;
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-grid .footer-col:nth-child(5),
  .footer-grid .footer-col:nth-child(4) { display: none; }
  :root { --sidebar-w: 280px; }
}

@media (max-width: 860px) {
  .masthead-nav { display: none; }
  .icon-btn.mobile-only { display: inline-flex; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-side { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 16px; }
  .with-sidebar { grid-template-columns: 1fr; gap: 48px; padding: 32px var(--pad); }
  .sidebar { border-top: 4px double var(--rule); padding-top: 32px; }
  .home-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .home-grid-2col { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; gap: 20px; }
  .newsletter-band-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid .footer-col:nth-child(3) { display: block; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  :root { --pad: 16px; }
  .top-strip .links { display: none; }
  .logo { font-size: 22px; }
  .home-grid { grid-template-columns: 1fr; gap: 24px; }
  .home-grid .card .headline { font-size: 22px; }
  .latest-item { grid-template-columns: 100px 1fr; gap: 14px; }
  .latest-item .headline { font-size: 16px; }
  .hero-side-item { grid-template-columns: 1fr 80px; }
  .article-body { font-size: 17px; }
  .article-body p:first-of-type::first-letter { font-size: 4em; }
  .article-hero-meta { flex-direction: column; align-items: flex-start; }
  .comment-form .row { grid-template-columns: 1fr; }
  .filter-bar { gap: 6px; }
  .filter-bar .filter-label { width: 100%; margin-bottom: 4px; }
  .pagination { gap: 12px; }
  .pagination .pg-arrow { font-size: 11px; padding: 8px 10px; }
  .pagination .pg-num { font-size: 15px; min-width: 30px; height: 32px; padding: 0 4px; }
  .cat-seo h2 { font-size: 22px; }
  .cat-seo p { font-size: 15px; }
}
