/* Blog-only styles. Shared tokens, header, footer, and .button/.shell/.eyebrow
   come from ../styles.css, loaded alongside this file. */

.blog-hero { padding-top: 10rem; }
.blog-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(3rem, 7vw, 9rem); }
.blog-hero h1 { text-transform: uppercase; }
.blog-hero .lede { max-width: 34rem; }
.blog-hero-frame { position: relative; width: min(80%, 420px); margin-inline: auto; }
.blog-hero-frame .hero-frame { width: 100%; }
.blog-hero-frame .hero-frame img { aspect-ratio: 1.1; }

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.blog-search {
  position: relative;
  flex: 1 1 16rem;
  min-width: 14rem;
}
.blog-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.blog-search input {
  width: 100%;
  padding: .85rem 1rem .85rem 2.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
}
.blog-search input::placeholder { color: var(--muted); }
.blog-select {
  padding: .85rem 2.4rem .85rem 1.1rem;
  background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" fill="none" stroke="%23c89b3c" stroke-width="1.6"/></svg>') right 1rem center no-repeat;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  appearance: none;
}
.blog-count { margin-left: auto; color: var(--muted); font-size: .85rem; letter-spacing: .05em; white-space: nowrap; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2.2rem);
  padding: clamp(2.5rem, 4vw, 4rem) 0;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.blog-card-thumb { margin: 0; aspect-ratio: 1.78; overflow: hidden; background: #080908; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.6rem 1.7rem; }
.blog-card-meta {
  margin-bottom: .8rem;
  color: var(--gold-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.blog-card-meta span:last-child { color: var(--muted); font-weight: 500; }
.blog-card h3 { margin: 0 0 .7rem; font-size: 1.2rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; text-transform: none; }
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--gold-light); }
.blog-card p { margin: 0; flex: 1; color: var(--muted); font-size: .92rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card .text-link { display: inline-flex; margin-top: 1.2rem; font-size: .85rem; }

.blog-empty { grid-column: 1 / -1; padding: 4rem 0; text-align: center; color: var(--muted); }

.pagination { display: flex; justify-content: center; align-items: center; gap: .5rem; padding-bottom: clamp(4rem, 6vw, 7rem); }
.pagination button {
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 .6rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.pagination button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-light); }
.pagination button[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: #17120a; font-weight: 700; }
.pagination button:disabled { opacity: .35; cursor: default; }

@media (max-width: 960px) {
  .blog-hero-grid { grid-template-columns: 1fr; text-align: center; }
  .blog-hero .lede { margin-inline: auto; }
  .blog-hero-frame { margin-top: 2rem; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-count { margin-left: 0; width: 100%; order: 10; }
}

@media (max-width: 620px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .blog-select { width: 100%; }
}

/* ---- individual post page ---- */
.post-hero { padding-top: 10rem; padding-bottom: 2rem; max-width: 46rem; margin-inline: auto; text-align: center; }
.post-hero .blog-card-meta { justify-content: center; display: flex; gap: .5rem; }
.post-hero h1 { margin: 1.2rem auto; max-width: none; text-transform: none; font-size: clamp(2rem, 4vw, 3.4rem); }
.post-byline { color: var(--muted); font-size: .85rem; letter-spacing: .05em; }
.post-cover { margin: clamp(2.5rem, 5vw, 4rem) auto; max-width: 60rem; border: 1px solid var(--line); box-shadow: var(--shadow); }
.post-cover img { width: 100%; display: block; }
.post-body { max-width: 42rem; margin: 0 auto; padding-bottom: clamp(3rem, 6vw, 5rem); font-size: 1.08rem; line-height: 1.85; color: #ddd9cd; }
.post-body p { margin: 0 0 1.6rem; }
.post-body h2 { font-size: 1.6rem; text-transform: none; margin: 2.4rem 0 1.2rem; color: var(--text); }
.post-body blockquote { margin: 2.2rem 0; padding-left: 1.4rem; border-left: 2px solid var(--gold); color: var(--gold-light); font-size: 1.25rem; font-style: italic; }
.post-back { display: block; max-width: 42rem; margin: 0 auto 3rem; }

/* Figures, diagrams, and tables inside the article body break out to the same
   width as the cover image — wider than the 42rem prose column, still short of
   the page's own .shell max-width. */
.post-wide { max-width: 60rem; margin: 2.6rem auto; }
.post-figure { margin: 0; }
.post-figure img { width: 100%; display: block; border: 1px solid var(--line); box-shadow: var(--shadow); }
.post-figure figcaption { margin-top: .9rem; color: var(--muted); font-size: .88rem; text-align: center; }

.post-callout-image { position: relative; }
.callout-badge {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--gold);
  color: #17120a;
  font: 700 .95rem/1 var(--sans, inherit);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.callout-key { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .5rem; color: var(--muted); font-size: .92rem; }
.callout-key li { display: flex; align-items: baseline; gap: .7rem; }
.callout-key .callout-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--gold); color: #17120a; font: 700 .8rem/1 inherit; }

.post-diagram { padding: clamp(2rem, 4vw, 3rem); border: 1px solid var(--line); background: var(--surface); }
.post-diagram svg { width: 100%; height: auto; display: block; }
.post-diagram figcaption { margin-top: 1.2rem; color: var(--muted); font-size: .88rem; text-align: center; }
.post-diagram .dbox { fill: var(--surface-2); stroke: var(--gold-dark); stroke-width: 1.5; }
.post-diagram .dbox-featured { fill: rgba(200,155,60,.12); stroke: var(--gold); }
.post-diagram .dlabel { fill: var(--text); font: 600 15px/1.3 "Raleway", sans-serif; text-anchor: middle; }
.post-diagram .dsub { fill: var(--muted); font: 11px/1.3 "Raleway", sans-serif; text-anchor: middle; letter-spacing: .04em; text-transform: uppercase; }
.post-diagram .darrow { stroke: var(--gold); stroke-width: 2; fill: none; marker-end: url(#arrowhead); }
.post-diagram .darrow-dashed { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; marker-end: url(#arrowhead-muted); }

.post-compare-wrap { overflow-x: auto; border: 1px solid var(--line); background: rgba(20,21,20,.6); box-shadow: var(--shadow); }
.post-compare-wrap table { width: 100%; min-width: 480px; border-collapse: collapse; }
.post-compare-wrap th, .post-compare-wrap td { padding: 1rem 1.3rem; text-align: left; vertical-align: top; font-size: .92rem; line-height: 1.5; border-bottom: 1px solid var(--line); }
.post-compare-wrap thead th { padding-top: 1.3rem; padding-bottom: 1rem; border-bottom: 1px solid var(--gold-dark); color: var(--gold-light); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.post-compare-wrap tbody th { color: var(--text); font-weight: 500; }
.post-compare-wrap tbody td { color: var(--muted); }
.post-compare-wrap tbody tr:last-child th, .post-compare-wrap tbody tr:last-child td { border-bottom: none; }
.post-compare-wrap td.post-compare-featured, .post-compare-wrap th.post-compare-featured { background: linear-gradient(180deg, rgba(200,155,60,.1), rgba(200,155,60,.03)); color: var(--text); }

.post-img-grid { display: grid; gap: 1rem; }
.post-img-grid-3 { grid-template-columns: repeat(3, 1fr); }
.post-img-grid-2 { grid-template-columns: repeat(2, 1fr); }
.post-img-grid img { border: 1px solid var(--line); width: 100%; display: block; }
@media (max-width: 620px) {
  .post-img-grid-3, .post-img-grid-2 { grid-template-columns: 1fr; }
}

.more-stories { border-top: 1px solid var(--line); padding: clamp(3rem, 5vw, 5rem) 0; }
.more-stories h2 { font-size: 1.4rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 2rem; }
