/**
 * Public site — Graminto editorial feed
 * Charcoal + rose accent, media-first posts.
 */

:root {
  --brand: #e11d48;
  --brand-bright: #fb7185;
  --brand-soft: rgba(225, 29, 72, 0.1);
  --ink: #0a0a0a;
  --muted: #737373;
  --paper: #fafafa;
  --wash: #f5f5f5;
  --line: rgba(10, 10, 10, 0.08);
  --surface: #ffffff;
  --radius: 0.75rem;
  --radius-lg: 1.15rem;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --nav-h: 3.75rem;
  --feed-max: 42rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --story-ring: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 50%, #f77737 100%);
}

[data-bs-theme="dark"] {
  --ink: #fafafa;
  --muted: #a3a3a3;
  --paper: #0a0a0a;
  --wash: #141414;
  --line: rgba(250, 250, 250, 0.1);
  --surface: #121212;
  --brand-soft: rgba(251, 113, 133, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 85% -12%, rgba(238, 42, 123, 0.08), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--wash) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[data-bs-theme="dark"] body {
  background:
    radial-gradient(900px 480px at 75% -12%, rgba(238, 42, 123, 0.14), transparent 50%),
    linear-gradient(180deg, #050505 0%, #121212 100%);
}

a {
  color: var(--brand);
  text-underline-offset: 0.15em;
}

img {
  max-width: 100%;
  height: auto;
}

/* —— Nav (app bar) —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px) saturate(1.2);
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  color: var(--ink) !important;
  text-decoration: none !important;
}

.brand-mark__icon {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  border-radius: 0.45rem;
}

.brand-mark__text {
  line-height: 1;
}

.brand-mark em {
  font-style: normal;
  background: var(--story-ring);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark--footer {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link-soft {
  color: var(--muted) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem !important;
  border-radius: var(--radius);
  text-decoration: none !important;
}

.nav-link-soft:hover,
.nav-link-soft.active {
  color: var(--ink) !important;
  background: var(--brand-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-brand,
.btn-ghost,
.btn-outline-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 650;
  font-size: 0.92rem;
  border-radius: var(--radius);
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease;
}

.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff !important;
}

.btn-brand:hover {
  background: #be123c;
  border-color: #be123c;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink) !important;
}

.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.theme-toggle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

/* —— Full-bleed home hero —— */
.hero-bleed {
  position: relative;
  min-height: min(92vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #111111;
}

.hero-bleed__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: heroZoom 12s var(--ease) both;
}

.hero-bleed__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.2) 0%, rgba(10, 10, 10, 0.55) 42%, rgba(10, 10, 10, 0.9) 100%),
    radial-gradient(ellipse 70% 50% at 18% 85%, rgba(238, 42, 123, 0.35), transparent 60%);
}

.hero-bleed__content {
  position: relative;
  z-index: 1;
  padding: 6.5rem 0 3.5rem;
  color: #f8fafc;
}

.hero-bleed__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0 0 1rem;
  animation: rise 0.8s var(--ease) both;
}

.hero-bleed__logo {
  width: clamp(2.75rem, 7vw, 4.25rem);
  height: clamp(2.75rem, 7vw, 4.25rem);
  border-radius: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: rise 0.8s var(--ease) both;
}

.hero-bleed__wordmark span {
  background: var(--story-ring);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-bleed__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin: 0 0 0.75rem;
  animation: rise 0.8s var(--ease) 0.08s both;
}

.hero-bleed__lede {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.82);
  max-width: 32rem;
  margin: 0 0 1.75rem;
  animation: rise 0.8s var(--ease) 0.14s both;
}

.hero-bleed__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.8s var(--ease) 0.2s both;
}

.hero-bleed__cta .btn-brand {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff !important;
}

.hero-bleed__cta .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff !important;
  backdrop-filter: blur(8px);
}

/* —— Sections —— */
.section {
  padding: 3.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}

.section-sub {
  color: var(--muted);
  margin: 0;
  max-width: 34rem;
  line-height: 1.5;
}

.section-rail {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* —— Social feed (image + title side-by-side, matching article hero) —— */
.feed {
  max-width: min(52rem, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.feed-post {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(10, 10, 10, 0.04);
  animation: rise 0.7s var(--ease) both;
}

@media (min-width: 768px) {
  .feed-post {
    flex-direction: row;
    align-items: stretch;
  }
}

.feed-post__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  margin-bottom: 0.85rem;
}

.feed-avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-bright), var(--brand));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  text-decoration: none;
}

.feed-post__who {
  min-width: 0;
  flex: 1;
}

.feed-post__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-post__meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.feed-post__media {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 320px;
  background: var(--wash);
  overflow: hidden;
}

@media (min-width: 768px) {
  .feed-post__media {
    width: 200px;
    max-height: none;
    align-self: stretch;
  }
}

@media (min-width: 992px) {
  .feed-post__media {
    width: 240px;
  }
}

.feed-post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.feed-post:hover .feed-post__media img {
  transform: scale(1.03);
}

.feed-post__copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.2rem 1.25rem;
}

.feed-post__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.55rem;
  line-height: 1.2;
}

.feed-post__title a {
  color: var(--ink);
  text-decoration: none;
}

.feed-post__title a:hover {
  color: var(--brand);
}

.feed-post__excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1 1 auto;
}

.feed-post__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.feed-stats {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

/* —— Stories / creators —— */
.stories {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.stories::-webkit-scrollbar {
  height: 0;
}

.story {
  flex: 0 0 auto;
  width: 4.75rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  scroll-snap-align: start;
  transition: transform 0.3s var(--ease);
}

.story:hover {
  transform: translateY(-3px);
}

.story__ring {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 0.45rem;
  border-radius: 50%;
  padding: 3px;
  background: var(--story-ring);
}

.story__face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand);
}

.story__label {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— Trending list —— */
.trend-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.trend-item {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.trend-item:hover .trend-item__title {
  color: var(--brand);
}

.trend-item__rank {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-bright);
  font-size: 1.15rem;
}

.trend-item__title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
  transition: color 0.2s ease;
}

.trend-item__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* —— Topics —— */
.topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.topic {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.86rem;
  text-decoration: none;
}

.topic:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  color: var(--brand);
}

.topic span {
  color: var(--muted);
  font-weight: 500;
  margin-left: 0.35rem;
}

/* —— Newsletter —— */
.newsletter {
  padding: 2.25rem 0;
  border-block: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(238, 42, 123, 0.07), transparent 55%),
    var(--surface);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 0.7rem 0.9rem;
}

.newsletter-form input:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent);
  outline-offset: 1px;
}

/* —— Search shell (non-hero) —— */
.search-shell {
  display: flex;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 36rem;
}

.search-shell input {
  border: 0;
  background: transparent;
  box-shadow: none !important;
  padding-left: 0.75rem;
  color: var(--ink);
}

.search-shell input:focus {
  outline: none;
}

/* —— Article page —— */
.article-hero {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 12% -20%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface) 55%, transparent);
}

.article-hero__grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .article-hero__grid {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }
}

.article-hero__media {
  margin: 0;
  flex: 0 0 auto;
  width: min(100%, 280px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  aspect-ratio: 9 / 16;
  box-shadow: 0 18px 40px rgba(10, 10, 10, 0.08);
}

@media (min-width: 768px) {
  .article-hero__media {
    width: 280px;
  }
}

@media (min-width: 992px) {
  .article-hero__media {
    width: 320px;
  }
}

.article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-hero__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.article-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}

.article-hero__lede {
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.15rem;
}

.article-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.85rem;
}

/* Shared page header (listings, static pages) */
.page-hero {
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(1.35rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 12% -20%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface) 55%, transparent);
}

.page-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
}

.page-hero__lede {
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 40rem;
  margin: 0;
}

.page-hero__creator {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-hero__creator .page-hero__title {
  margin-bottom: 0.35rem;
}

.article-page {
  padding: clamp(2rem, 4vw, 3rem) 0 4rem;
}

.article-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 992px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 2.75rem;
  }

  .article-layout:not(:has(.article-sidebar)) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 48rem;
  }
}

.article-main {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  min-width: 0;
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.article-sidebar__stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .article-sidebar .sticky-lg-top {
    top: calc(var(--nav-h) + 1rem);
  }
}

.article-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.15rem, 2.5vw, 1.5rem);
  box-shadow: 0 10px 30px rgba(10, 10, 10, 0.04);
}

.article-panel--prose {
  padding: clamp(1.35rem, 3vw, 1.85rem);
}

.article-panel--reel {
  padding-bottom: 1rem;
}

.article-panel__head {
  margin-bottom: 1rem;
}

.article-panel__eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.35rem;
}

.article-muted {
  color: var(--muted);
  margin: 0 0 1rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0 0.15rem;
}

/* Instagram embed (main column) */
.reel-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reel-embed__frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: calc(var(--radius-lg) - 0.15rem);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a0a;
}

.reel-embed__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.reel-embed__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.reel-embed__link::after {
  content: "→";
}

.prose {
  font-size: 1.06rem;
  line-height: 1.82;
  color: var(--ink);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.15;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.prose h1 {
  font-size: clamp(1.65rem, 3vw, 2rem);
  margin: 0 0 1rem;
}

.prose h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  margin: 2.25rem 0 0.85rem;
  padding-top: 0.35rem;
}

.prose h3 {
  font-size: 1.12rem;
  margin: 1.65rem 0 0.65rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 1.05rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose a {
  font-weight: 600;
}

.prose img {
  border-radius: var(--radius);
  margin: 1.25rem 0;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--brand-bright);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.key-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.key-points li {
  position: relative;
  padding-left: 1.35rem;
  line-height: 1.55;
}

.key-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: color-mix(in srgb, var(--wash) 45%, var(--surface));
}

.faq-item__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.faq-item__trigger:hover {
  background: color-mix(in srgb, var(--brand) 4%, transparent);
}

.faq-item__icon {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}

.faq-item__trigger[aria-expanded="true"] .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__body {
  padding: 0 1rem 1rem;
}

.faq-item__body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.share-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.share-pill:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  background: var(--brand-soft);
  color: var(--brand);
}

.share-pill.is-copied {
  background: color-mix(in srgb, #22c55e 14%, var(--surface));
  border-color: color-mix(in srgb, #22c55e 35%, var(--line));
  color: #15803d;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.comment-box {
  background: color-mix(in srgb, var(--wash) 50%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
}

.comment-box__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}

.comment-box__author {
  font-weight: 700;
}

.comment-box__time {
  font-size: 0.78rem;
  color: var(--muted);
}

.comment-box__body {
  margin: 0;
  line-height: 1.6;
}

.comment-form {
  margin-top: 0.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.related-card {
  display: flex;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  padding: 0.55rem;
  margin: -0.55rem;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.related-card:hover {
  background: color-mix(in srgb, var(--brand) 5%, transparent);
}

.related-card__thumb {
  width: 76px;
  height: 96px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 0.1rem);
  flex-shrink: 0;
  background: var(--wash);
  border: 1px solid var(--line);
}

.related-card__copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.related-card__title {
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.related-card__meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Legacy aliases */
.article-cover__grid { display: grid; }
.related-thumb {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--wash);
}

.form-panel,
.related-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
}

.process-panel {
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.2rem 1.15rem;
  animation: rise 0.55s ease both;
}

.process-panel.is-failed {
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, #c45c5c 16%, transparent), transparent 55%),
    var(--surface);
}

.process-panel.is-done .process-orb__ring,
.process-panel.is-done .process-orb__core,
.process-panel.is-done .process-meter__bar,
.process-panel.is-done .process-pulse span,
.process-panel.is-done .process-step__dot,
.process-panel.is-failed .process-orb__ring,
.process-panel.is-failed .process-orb__core,
.process-panel.is-failed .process-meter__bar,
.process-panel.is-failed .process-pulse span {
  animation: none !important;
}

.process-panel.is-done .process-meter__bar {
  width: 100% !important;
  background: var(--brand);
  background-size: auto;
}

.process-panel__header {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.process-panel__title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  line-height: 1.25;
}

.process-panel__detail {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.process-panel__error {
  margin-top: 0.85rem;
  color: #b42318;
  font-size: 0.9rem;
}

.process-orb {
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.process-orb__ring,
.process-orb__core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.process-orb__ring {
  border: 2px solid color-mix(in srgb, var(--brand) 35%, transparent);
  border-top-color: var(--brand);
  animation: processSpin 0.9s linear infinite;
}

.process-orb__core {
  inset: 0.55rem;
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  animation: processPulse 1.4s ease-in-out infinite;
}

.process-orb--done {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand);
  animation: rise 0.4s ease both;
}

.process-meter {
  height: 0.55rem;
  background: var(--wash);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.process-meter__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--brand) 75%, #222),
    var(--brand),
    color-mix(in srgb, var(--brand) 70%, #fff)
  );
  background-size: 200% 100%;
  transition: width 0.45s ease;
  animation: processShimmer 1.8s linear infinite;
}

.process-meter__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.process-pulse {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}

.process-pulse span {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.35;
  animation: processDot 1.1s ease-in-out infinite;
}

.process-pulse span:nth-child(2) { animation-delay: 0.15s; }
.process-pulse span:nth-child(3) { animation-delay: 0.3s; }

.process-steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

.process-step__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--line) 80%, var(--muted));
  flex: 0 0 auto;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.process-step.is-active {
  color: var(--ink);
  font-weight: 650;
}

.process-step.is-active .process-step__dot {
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
  animation: processPulse 1.4s ease-in-out infinite;
}

.process-step.is-complete {
  color: var(--ink);
}

.process-step.is-complete .process-step__dot {
  background: var(--brand);
}

.submit-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.submit-busy[hidden] {
  display: none !important;
}

.submit-idle-label[hidden] {
  display: none !important;
}

#submit-reel-btn.is-busy {
  cursor: wait;
  opacity: 0.92;
}

.submit-busy__spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, #fff 35%, transparent);
  border-top-color: #fff;
  animation: processSpin 0.75s linear infinite;
}

@keyframes processSpin {
  to { transform: rotate(360deg); }
}

@keyframes processPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes processShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes processDot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding: 2.75rem 0 2rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
}

.display-font {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Legacy article-row → map to feed spacing on listing pages */
.article-row {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep submit/process motion visible; only tone down page scroll. */
  html {
    scroll-behavior: auto;
  }
}

/* —— Pagination —— */
.pager {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.pager__summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.pager__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.pager__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.pager__link:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--brand-soft);
}

.pager__link.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper) !important;
}

[data-bs-theme="dark"] .pager__link.is-current {
  background: #fafafa;
  border-color: #fafafa;
  color: #0a0a0a !important;
}

.pager__link.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pager__gap {
  display: inline-flex;
  align-items: center;
  min-width: 1.5rem;
  justify-content: center;
  color: var(--muted);
}
