:root {
  --accent: #991b1b;
  --accent-2: #b45309;
  --accent-3: #78716c;
  --accent-dark: #7f1d1d;
  --accent-light: #fef2f2;
  --accent-light-2: #fffbeb;
  --accent-secondary: #44403c;
  --bg: #ffffff;
  --bg-alt: #fafaf9;
  --bg-section: #fef3c7;
  --text: #1c1917;
  --text-light: #44403c;
  --text-muted: #78716c;
  --border: #e7d8d8;
  --border-light: #f3ecec;
  --success: #166534;
  --error: #991b1b;
  --warning: #b45309;
  --shadow-sm: 0 2px 8px rgba(153, 27, 27, 0.06), 0 1px 2px rgba(180, 83, 9, 0.04);
  --shadow: 0 6px 22px rgba(153, 27, 27, 0.10), 0 2px 8px rgba(180, 83, 9, 0.06);
  --shadow-lg: 0 26px 56px rgba(153, 27, 27, 0.18), 0 10px 26px rgba(180, 83, 9, 0.12);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --max-w: 1240px;
  --max-w-content: 820px;
  --header-h: 76px;
  --font-head: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --trans: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 16px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 14px; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.55rem); margin-bottom: 12px; }
h4 { font-size: 1.1rem; margin-bottom: 10px; }

p { margin-bottom: 16px; color: var(--text-light); font-weight: 500; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  width: 100%;
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header { z-index: 100; }
.header-inner { height: auto; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  transition: all var(--trans);
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(153, 27, 27, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(153, 27, 27, 0.38);
  color: #fff;
  background: var(--accent-dark);
}
.btn-primary:active {
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(153, 27, 27, 0.12);
}
.btn-secondary:active {
  transform: translateY(0);
}
.btn-sm { padding: 8px 16px; font-size: 0.83rem; border-radius: 999px; font-weight: 700; }
.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: transparent;
}
.btn-danger:hover { background: #fca5a5; color: #7f1d1d; }
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--accent-light);
  min-height: 0;
}
.hero-bg {
  display: block;
  width: 100%;
}
.hero-bg img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(153, 27, 27, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(180, 83, 9, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(120, 113, 108, 0.10) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(153, 27, 27, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(180, 83, 9, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.hero-content-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  left: 0;
  right: 0;
}
.hero-content { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(153, 27, 27, 0.12);
  border: 2px solid var(--accent);
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.8vw, 3rem);
  margin-bottom: 12px;
  line-height: 1.1;
  text-align: center;
  color: var(--text);
}
.hero h1 span {
  color: var(--accent);
}
.hero-desc {
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  margin-bottom: 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
color: #fff;
  text-align: center;
  font-weight: 500;
}
.hero-search {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  gap: 6px;
  background: #fff;
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  border: 2.5px solid var(--accent);
  position: relative;
}
.hero-search form { flex: 1; min-width: 0; display: flex; align-items: center; }
.hero-search input {
  flex: 1;
  width: 100%;
  padding: 10px 18px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  font-weight: 600;
  min-width: 0;
  color: var(--text);
}
.hero-search input::placeholder { color: var(--text-muted); font-weight: 500; }
.hero-stats {
  display: flex;
  gap: 20px;
  margin-top: 44px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.08);
}
.hero-stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 700;
}
.hero-visual {
  position: relative;
  height: 440px;
  max-width: 100%;
}
.hero-card {
  position: absolute;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
  padding: 22px;
  border: 2px solid var(--border);
  width: auto;
  min-width: 0;
}
.hero-card-1 {
  top: 0;
  left: 0;
  right: 60px;
  max-width: calc(100% - 60px);
  transform: rotate(-3deg) skewX(-1deg);
  border-left: 5px solid var(--accent);
  border-top: none;
}
.hero-card-2 {
  bottom: 0;
  right: 0;
  left: 60px;
  max-width: calc(100% - 60px);
  transform: rotate(2.5deg) skewX(1deg);
  border-right: 5px solid var(--accent-2);
  border-top: none;
}
.pun-float {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 10px;
  border-left: 4px solid var(--accent-3);
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text);
}
.pun-float:last-child { margin-bottom: 0; }

/* ===== Hero Grid Layout ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}

/* ===== Section ===== */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  margin-bottom: 48px;
  text-align: left;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 10px;
}
.section-head h2 span {
  color: var(--accent);
}
.section-head p {
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0;
  color: var(--text-light);
  font-weight: 500;
}

/* ===== Article Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: var(--accent);
  transition: height var(--trans), opacity var(--trans);
  z-index: 2;
  opacity: 0.95;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card:hover::before { height: 5px; }
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(153, 27, 27, 0.14), 0 8px 24px rgba(180, 83, 9, 0.10);
  border-color: var(--accent);
}
.card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: var(--accent-light);
}
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(153, 27, 27, 0.06);
  pointer-events: none;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: saturate(1.02);
}
.card:hover .card-img img { transform: scale(1.1); filter: saturate(1.08) contrast(1.02); }
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 3.8rem;
  background: var(--bg-alt);
}
.card-body {
  padding: 22px 22px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.77rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 12px;
  flex-wrap: wrap;
  order: 3;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
}
.card-meta .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.7rem;
  border: 1px solid var(--border);
}
.card-meta .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent-2);
}
.card-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.3;
  font-weight: 700;
  order: 1;
}
.card-title a { color: var(--text); }
.card-title a:hover {
  color: var(--accent);
}
.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-light);
  margin-bottom: 14px;
  flex: 1;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.65;
  order: 2;
}
.card-foot {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  order: 0;
  margin-top: 0;
  padding-bottom: 14px;
}
.card-foot .btn-primary {
  background: var(--accent-2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.22);
  border: none;
}
.card-foot .btn-primary:hover {
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(153, 27, 27, 0.28);
}

/* ===== Related cards ===== */
.card-grid-related {
  gap: 22px;
}
.card-grid-related .card-body {
  padding: 18px 18px 16px;
}
.card-grid-related .card-excerpt {
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 0.86rem;
}

/* ===== Article Page ===== */
.article-hero {
  padding: 48px 0 28px;
}
.article-category {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.22);
}
.article-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--text);
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--accent-light-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: inline-flex;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.article-cover {
  margin: 32px 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: var(--bg-section);
  border: 3px solid var(--border);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 5rem;
  background: var(--bg-alt);
}
.article-content {
  max-width: var(--max-w-content);
  margin: 0 auto;
}
.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 36px;
  margin-bottom: 14px;
}
.article-content h1:first-child,
.article-content h2:first-child,
.article-content h3:first-child { margin-top: 0; }
.article-content h2 {
  padding: 18px 24px;
  background: var(--accent-light);
  border: 2px solid var(--border);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  font-size: clamp(1.3rem, 2.8vw, 1.75rem);
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.08);
}
.article-content h3 {
  padding: 14px 20px;
  background: var(--accent-light-2);
  border: 2px solid var(--border);
  border-left: 5px solid var(--accent-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.08);
}
.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  font-weight: 500;
}
.article-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all var(--trans);
  word-break: break-word;
  position: relative;
}
.article-content a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--trans);
  border-radius: 2px;
}
.article-content a:hover {
  color: var(--accent-dark);
}
.article-content a:hover::after {
  width: 100%;
}

/* ===== Pun Box ===== */
.pun-box {
  position: relative;
  background: var(--accent-light-2);
  border: 2px solid var(--accent);
  border-left-width: 6px;
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  margin: 26px 0;
  box-shadow: 0 10px 28px rgba(153, 27, 27, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pun-box::before { display: none; }
.pun-box::after { display: none; }
.pun-box *::before { display: none; }
.pun-box *::after { display: none; }
.pun-text::before { display: none; }
.pun-text::after { display: none; }
.pun-box:hover {
  transform: translateX(-2px);
  box-shadow: 4px 14px 32px rgba(153, 27, 27, 0.12), 0 0 0 2px rgba(153, 27, 27, 0.06);
  border-color: var(--accent-2);
  border-left-color: var(--accent-2);
}
.pun-box:hover .pun-copy-btn {
  transform: translateY(-50%) scale(1.05);
}
.pun-text {
  display: block;
  margin-bottom: 10px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.65;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-shadow: none;
}
.pun-text:last-child {
  margin-bottom: 0;
}
.pun-copy-btn {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  transition: all var(--trans);
  white-space: nowrap;
  min-width: 68px;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.22);
}
.pun-copy-btn:hover {
  transform: translateY(-50%) scale(1.05);
  background: var(--accent-dark);
  box-shadow: 0 8px 20px rgba(153, 27, 27, 0.32);
}
.pun-copy-btn.copied {
  background: var(--success);
}

/* ===== Related Articles ===== */
.related-section {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 2px dashed var(--border);
}

/* ===== Author Card ===== */
.author-card {
  margin-top: 52px;
  padding: 28px 28px;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 22px;
  align-items: flex-start;
  box-shadow: 0 6px 20px rgba(153, 27, 27, 0.06);
  position: relative;
  overflow: hidden;
}
.author-card::before { display: none; }
.author-avatar {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.15);
  background: var(--bg-section);
}
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.author-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.author-role {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}
.author-bio {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text-light);
  margin-bottom: 16px;
  font-weight: 500;
}
.author-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Share Card ===== */
.share-card {
  margin-top: 32px;
  padding: 28px 28px;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.share-head {
  margin-bottom: 22px;
  text-align: left;
}
.share-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.share-sub {
  font-size: 0.93rem;
  color: var(--text-light);
  margin: 0;
  font-weight: 500;
}
.share-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 10px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  cursor: pointer;
  transition: all var(--trans);
  border: none;
  text-decoration: none;
  line-height: 1.3;
}
.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
  color: #fff;
}
.share-btn:active {
  transform: translateY(-1px);
}
.share-btn span { font-size: 1rem; }
.share-fb { background: #1877f2; }
.share-fb:hover { background: #166fe5; }
.share-x { background: #0f172a; }
.share-x:hover { background: #1e293b; }
.share-pin { background: #e60023; }
.share-pin:hover { background: #cc001f; }
.share-tg { background: #0088cc; }
.share-tg:hover { background: #0077b3; }
.share-wa { background: #25d366; }
.share-wa:hover { background: #20bd5b; }
.share-li { background: #0a66c2; }
.share-li:hover { background: #0958ab; }
.share-copy { background: var(--accent); }
.share-copy:hover { background: var(--accent-dark); }
.share-copy.copied { background: var(--success); }

/* ===== Content + Sidebar layout ===== */
.content-sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: flex-start;
}
.content-sidebar-layout .main-content {
  min-width: 0;
}
.content-sidebar-layout .sidebar {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

/* ===== Sidebar widgets ===== */
.sidebar-widget {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  position: relative;
}
.sidebar-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-widget-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--border-light);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidebar-post-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-light);
  transition: transform var(--trans);
}
.sidebar-post-item:hover { transform: translateX(4px); }
.sidebar-post-item:hover .sidebar-post-title { color: var(--accent); }
.sidebar-post-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.sidebar-post-thumb {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  border: 1px solid var(--border);
}
.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-post-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-post-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  transition: color var(--trans);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-post-title:hover {
  color: var(--accent);
}
.sidebar-post-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ===== Detail page layout ===== */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: flex-start;
}
.detail-main {
  min-width: 0;
  width: 100%;
}
.detail-sidebar {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

/* ===== Page Header ===== */
.page-header {
  padding: 52px 0 40px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 30%, rgba(153, 27, 27, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 70%, rgba(180, 83, 9, 0.05) 0%, transparent 50%);
  pointer-events: none;
}
.page-header.small { padding: 28px 0; }
.page-header > * { position: relative; z-index: 1; }
.search-result-count {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-weight: 700;
}
.search-result-count strong { color: var(--accent); font-family: var(--font-head); }
.no-results {
  text-align: center;
  padding: 64px 20px;
  background: var(--bg-section);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}
.no-results-icon {
  font-size: 3.8rem;
  margin-bottom: 18px;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  transition: all var(--trans);
  color: var(--text-light);
}
.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.14);
}
.pagination .current {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(153, 27, 27, 0.28);
}
.pagination .dots { border: none; background: none; color: var(--text-muted); }

/* ===== Footer ===== */
.site-footer {
  background: #1c1917;
  color: #d6d3d1;
  padding: 68px 0 28px;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--accent);
}
.site-footer::after { display: none; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
}
.footer-brand .logo {
  color: #fff;
  margin-bottom: 18px;
  font-size: 1.5rem;
}
.footer-brand .logo-icon {
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.45);
}
.footer-brand p {
  color: #a8a29e;
  font-size: 0.93rem;
  line-height: 1.75;
  font-weight: 500;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.08rem;
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: #a8a29e;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--trans);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.footer-col a:hover {
  color: #f87171;
  transform: translateX(4px);
}
.footer-bottom {
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.83rem;
  color: #78716c;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.footer-bottom p { color: #78716c; margin-bottom: 0; }

/* ===== Forms ===== */
.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text);
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  font-weight: 600;
  background: #fff;
  color: var(--text);
  transition: all var(--trans);
  outline: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(153, 27, 27, 0.12);
  background: #fff;
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-help {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.form-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 22px;
  border: 1px solid #fca5a5;
  border-left: 4px solid var(--error);
}
.form-success {
  background: #d1fae5;
  color: #065f46;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 22px;
  border: 1px solid #6ee7b7;
  border-left: 4px solid var(--success);
}

/* ===== About / Legal Pages ===== */
.legal-content {
  max-width: var(--max-w-content);
  margin: 0 auto;
}
.legal-content p { font-size: 1rem; line-height: 1.85; font-weight: 500; }
.legal-content h2 { margin-top: 36px; }
.legal-content h3 { margin-top: 26px; }

/* ===== 404 ===== */
.error-page {
  min-height: calc(100vh - var(--header-h) - 220px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 72px 20px;
}
.error-code {
  font-family: var(--font-head);
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.error-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 22px 0 12px; }
.error-desc { margin-bottom: 34px; color: var(--text-light); font-weight: 500; }

/* ===== Admin Panel ===== */
.admin-layout {
  min-height: 100vh;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
}
.admin-header {
  background: #1c1917;
  color: #fff;
  padding: 14px 0;
  border-bottom: 4px solid var(--accent);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.14);
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.admin-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.18rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.admin-logo > span:first-child {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(153, 27, 27, 0.35);
}
.admin-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.admin-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 0.86rem;
  font-weight: 700;
  color: #94a3b8;
  transition: all var(--trans);
}
.admin-nav a:hover, .admin-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}
.admin-nav a.active {
  background: rgba(153, 27, 27, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fff;
}
.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.admin-user-avatar {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-2);
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.32);
}
.admin-body {
  flex: 1;
  padding: 36px 0;
}
.admin-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 14px;
}
.page-title {
  font-family: var(--font-head);
  font-size: 1.85rem;
  margin: 0;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}
.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 72px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  opacity: 0.9;
}
.stat-card.green::before { background: var(--success); }
.stat-card.blue::before { background: var(--accent-2); }
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  font-family: var(--font-head);
}
.stat-value {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.stat-card.accent .stat-value {
  color: var(--accent);
}
.stat-card.green .stat-value { color: var(--success); }
.stat-card.blue .stat-value { color: var(--accent-2); }

/* Tables */
.table-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 2px solid var(--border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  font-weight: 600;
}
.data-table th {
  background: var(--bg-alt);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-size: 0.82rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--accent-light); }
.data-table .title-cell {
  max-width: 300px;
  font-weight: 700;
  color: var(--text);
}
.data-table .title-cell a { color: var(--text); }
.data-table .title-cell a:hover { color: var(--accent); }
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.74rem;
  font-weight: 700;
}
.badge-published { background: #d1fae5; color: #065f46; }
.badge-draft { background: #fce7f3; color: #831843; }
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Editor */
.editor-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 2px solid var(--border);
}
.editor-toolbar {
  display: flex;
  gap: 6px;
  padding: 14px;
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border-light);
  flex-wrap: wrap;
}
.editor-toolbar button {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 2px solid var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  transition: all var(--trans);
  color: var(--text);
}
.editor-toolbar button:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.12);
}
.editor-toolbar button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
.editor-toolbar button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.editor-toolbar .toolbar-sep {
  width: 1px;
  background: var(--border);
  margin: 6px 10px;
}
.editor-toolbar .toolbar-image-btn {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.24);
}
.editor-toolbar .toolbar-image-btn:hover:not(:disabled) {
  background: var(--accent-dark);
  color: #fff;
  border-color: transparent;
}
.editor-textarea {
  width: 100%;
  min-height: 500px;
  padding: 22px;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.93rem;
  line-height: 1.75;
  resize: vertical;
  background: #fff;
  font-weight: 600;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.form-grid .full { grid-column: 1 / -1; }

/* SEO Checklist */
.seo-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  border: 2px solid var(--border);
}
.seo-box h4 { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-head); }
.seo-score {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.24);
  background: var(--accent);
}
.seo-check-list { display: flex; flex-direction: column; gap: 10px; }
.seo-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text-light);
  font-weight: 600;
}
.seo-check-item .tick {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  font-weight: 700;
  color: #fff;
}
.seo-check-item.pass .tick { background: var(--success); }
.seo-check-item.fail .tick { background: var(--error); }

/* Preview modal */
.preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 9999;
  padding: 30px 20px;
  overflow-y: auto;
}
.preview-modal.show { display: block; }
.preview-modal-inner {
  max-width: var(--max-w-content);
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.35);
  border: 2px solid var(--border);
}
.preview-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-family: var(--font-head);
  font-weight: 700;
  transition: all var(--trans);
  color: var(--accent-dark);
}
.preview-modal-close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }

/* Login page */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse at top left, rgba(153, 27, 27, 0.10), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(180, 83, 9, 0.10), transparent 50%),
    var(--bg-alt);
}
.login-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  padding: 42px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--accent);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .logo {
  justify-content: center;
  margin-bottom: 12px;
  font-size: 1.7rem;
}
.login-card h1 {
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.6rem;
  margin-bottom: 26px;
  font-weight: 700;
}

/* Delete confirm form */
.inline-form { display: inline; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-content { max-width: 100%; text-align: center; margin-left: auto; margin-right: auto; }
  .hero h1 { text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; text-align: center; }
  .hero-search { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-visual { height: 340px; max-width: 500px; width: 100%; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .content-sidebar-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .content-sidebar-layout .sidebar {
    position: static;
    order: 2;
  }
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .detail-sidebar {
    position: static;
    order: 2;
  }
}

@media (max-width: 768px) {
  .site-header { box-shadow: 0 1px 0 var(--border-light); }
  .header-inner { gap: 12px; }
  :root { --header-h: 76px; }
  .section { padding: 52px 0; }
  .hero-content-wrap { padding: 0 18px; }
  .hero-grid { gap: 16px; }
  .hero h1 { font-size: clamp(1.15rem, 3.2vw, 1.7rem); margin-bottom: 6px; }
  .hero-desc { font-size: clamp(0.78rem, 1.6vw, 0.9rem); margin-bottom: 12px; }
  .hero-search { flex-direction: column; padding: 8px; border-radius: var(--radius-lg); max-width: 420px; }
  .hero-search .btn { width: 100%; padding: 9px 16px; font-size: 0.82rem; }
  .hero-search input { padding: 9px 12px; font-size: 0.84rem; }
  .hero-stats { gap: 12px; flex-wrap: wrap; }
  .hero-stat { padding: 12px 18px; }
  .hero-stat-num { font-size: 1.65rem; }
  .hero-visual { height: 310px; }
  .hero-card { padding: 16px 18px; }
  .hero-card-1 {
    left: 0;
    right: 20%;
    max-width: 80%;
    transform: rotate(-2deg);
  }
  .hero-card-2 {
    right: 0;
    left: 20%;
    max-width: 80%;
    transform: rotate(2deg);
  }
  .pun-float {
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* === COMPACT PUN BOX: text on left, Copy button on right === */
  .pun-box {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    margin: 14px 0 !important;
    min-height: 0 !important;
    height: auto !important;
    transform: none !important;
  }
  .pun-box:hover {
    transform: none !important;
  }
  .pun-text {
    flex: 1 1 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.93rem !important;
    line-height: 1.45 !important;
    min-width: 0 !important;
    width: auto !important;
  }
  .pun-copy-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    flex: 0 0 auto !important;
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    min-width: 0 !important;
    margin: 0 !important;
    align-self: center !important;
    white-space: nowrap !important;
  }
  .pun-copy-btn:hover {
    transform: none !important;
  }

  .article-hero { padding: 32px 0 20px; }
  .article-hero h1 { padding: 0; font-size: 1.65rem; }
  .article-meta { padding: 10px 14px; }
  .author-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 22px;
    gap: 16px;
  }
  .author-avatar {
    margin: 0 auto;
    width: 84px;
    height: 84px;
  }
  .author-links { justify-content: center; }
  .share-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  .share-btn {
    font-size: 0.8rem;
    padding: 10px 8px;
  }
  .data-table-wrap { overflow-x: auto; }
  .data-table th:nth-child(3),
  .data-table td:nth-child(3) { display: none; }
  .preview-modal-inner { padding: 26px 20px; }
  .share-card { padding: 24px 22px; }
  .card-grid { gap: 22px; }
  .card-body { padding: 20px 18px 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat-card { padding: 20px 18px; }
  .stat-value { font-size: 1.9rem; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .container, .container-sm { padding: 0 18px; }
  .hero-content-wrap { padding: 0 14px; }
  .hero-grid { gap: 10px; }
  .hero h1 { font-size: clamp(1rem, 4.2vw, 1.35rem); margin-bottom: 4px; }
  .hero-desc { font-size: clamp(0.72rem, 2.6vw, 0.82rem); margin-bottom: 8px; }
  .hero-search { max-width: 100%; padding: 6px; }
  .hero-search .btn { padding: 8px 14px; font-size: 0.78rem; }
  .hero-search input { padding: 8px 10px; font-size: 0.8rem; }
  .hero-visual { height: 290px; }
  .hero-card-1 {
    left: 0;
    right: 12%;
    max-width: 88%;
    transform: rotate(-1.5deg);
  }
  .hero-card-2 {
    right: 0;
    left: 12%;
    max-width: 88%;
    transform: rotate(1.5deg);
  }
  .pun-float {
    padding: 9px 11px;
    margin-bottom: 8px;
    font-size: 0.86rem;
    line-height: 1.45;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col h4 { margin-bottom: 14px; font-size: 0.98rem; }
  .footer-col li { margin-bottom: 8px; }
  .footer-col a { font-size: 0.86rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Keep pun box compact */
  .pun-box {
    padding: 10px 14px !important;
    gap: 8px !important;
    margin: 12px 0 !important;
  }
  .pun-text {
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
  }
  .pun-copy-btn {
    padding: 5px 10px !important;
    font-size: 0.7rem !important;
  }

  .page-title-row { flex-direction: column; align-items: flex-start; }
  .admin-nav { display: none; }
  .data-table th:nth-child(2),
  .data-table td:nth-child(2),
  .data-table th:nth-child(5),
  .data-table td:nth-child(5) { display: table-cell; }
  .login-card { padding: 30px 22px; }
  .section-head { margin-bottom: 32px; }
  .article-content h2 { padding: 12px 16px; font-size: 1.15rem; }
  .article-cover { margin: 24px 0 32px; }
}

@media (max-width: 400px) {
  .container, .container-sm { padding: 0 14px; }
  .hero-content-wrap { padding: 0 12px; }
  .hero-grid { gap: 6px; }
  .hero-stat-num { font-size: 1.45rem; }
  .btn { padding: 9px 18px; font-size: 0.82rem; border-radius: 999px; }
  .pun-text { font-size: 0.92rem; }
  .hero h1 { font-size: clamp(0.92rem, 5vw, 1.15rem); margin-bottom: 3px; }
  .hero-desc { font-size: clamp(0.68rem, 3vw, 0.76rem); margin-bottom: 6px; }
  .hero-search { padding: 5px; }
  .hero-search .btn { padding: 7px 12px; font-size: 0.74rem; }
  .hero-search input { padding: 7px 9px; font-size: 0.76rem; }
  .hero-visual { height: 260px; }
  .hero-card-1 { right: 8%; max-width: 92%; }
  .hero-card-2 { left: 8%; max-width: 92%; }
  .pun-float { font-size: 0.82rem; padding: 8px 10px; }
  .footer-grid { gap: 20px; }
  .footer-col h4 { font-size: 0.92rem; }
  .footer-col a { font-size: 0.82rem; }
  .card-title { font-size: 1.08rem; }
  .card-body { padding: 18px 16px 16px; }
  .stat-card { padding: 16px 14px; }
  .stat-value { font-size: 1.7rem; }
  .stat-label { font-size: 0.78rem; }
  .pagination a, .pagination span { min-width: 38px; height: 38px; padding: 0 12px; }
  .share-buttons { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Admin Panel — Puns Jolly distinct theme ===== */
.admin-layout {
  background: var(--bg-alt);
}
.admin-header {
  background: #1c1917;
  border-bottom: 4px solid var(--accent);
}
.admin-layout .admin-logo > span:first-child {
  background: var(--accent) !important;
  box-shadow: 0 4px 14px rgba(153, 27, 27, 0.35) !important;
}
.admin-layout .admin-nav a.active {
  background: rgba(153, 27, 27, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.4);
}
.admin-layout .admin-user-avatar {
  background: var(--accent-2);
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.28);
}
.admin-layout .page-title::after {
  background: var(--accent);
  width: 84px;
  height: 5px;
  border-radius: 3px;
}
.admin-layout .stat-card {
  border-radius: 18px;
  background: #fff;
  border: 2px solid var(--border-light);
  box-shadow: 0 8px 22px rgba(153, 27, 27, 0.05), 0 2px 6px rgba(180, 83, 9, 0.04);
}
.admin-layout .stat-card::before {
  height: 5px;
  background: var(--accent);
  border-radius: 0 0 6px 6px;
}
.admin-layout .stat-card.accent::before { background: var(--accent); }
.admin-layout .stat-card.green::before { background: var(--success); }
.admin-layout .stat-card.blue::before { background: var(--accent-2); }
.admin-layout .stat-card.accent .stat-value {
  color: var(--accent);
}
.admin-layout .table-wrap {
  border-radius: 20px;
  border: 2px solid var(--border-light);
  box-shadow: 0 8px 22px rgba(153, 27, 27, 0.04), 0 2px 6px rgba(180, 83, 9, 0.03);
}
.admin-layout .data-table th {
  background: var(--accent-light);
  border-bottom: 2px solid var(--border);
}
.admin-layout .data-table tr:hover td {
  background: var(--bg-alt);
}
.admin-layout .btn-primary {
  background: var(--accent);
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.24);
}
.admin-layout .btn-primary:hover {
  box-shadow: 0 10px 28px rgba(153, 27, 27, 0.35);
  background: var(--accent-dark);
}
.admin-layout .btn-secondary {
  border-color: rgba(153, 27, 27, 0.25);
  background: var(--accent-light);
  color: var(--accent-dark);
}
.admin-layout .btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.admin-layout .login-card {
  border: 2px solid rgba(153, 27, 27, 0.18);
  box-shadow: 0 24px 60px rgba(153, 27, 27, 0.10), 0 10px 24px rgba(180, 83, 9, 0.08);
}
.admin-layout .login-logo .logo-icon {
  background: var(--accent);
}
.admin-layout .badge-published {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.admin-layout .badge-draft {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

/* ===== Hero/Footer layout tweaks for PunsJolly ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 0;
  min-height: 520px;
  padding: 28px 0 20px;
}
.hero-content {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.hero h1 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 860px;
  font-size: 2.9rem;
  line-height: 1.18;
}
.hero-desc {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 720px;
  width: 100%;
}
.hero-search {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 620px;
  justify-content: center;
}
.hero-stats {
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}
.footer-grid {
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .hero h1 { font-size: 2.15rem; }
  .hero-grid { min-height: 440px; padding: 20px 0 10px; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-grid { min-height: 380px; }
}
