/*
  Pcpropr Home Redesign
  Apple-inspired UI/UX: clean, airy, system typography, precise spatial rhythm
  ─────────────────────────────────────────────────────────────────────────────
*/

/* ── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
  --ap-bg: #f5f5f7;
  --ap-surface: #ffffff;
  --ap-surface-elevated: rgba(255,255,255,0.82);
  --ap-border: rgba(0,0,0,0.08);
  --ap-border-strong: rgba(0,0,0,0.14);
  --ap-ink: #1d1d1f;
  --ap-ink-2: #424245;
  --ap-ink-3: #6e6e73;
  --ap-ink-4: #86868b;
  --ap-brand: #ff7a1a;
  --ap-brand-dark: #e05e00;
  --ap-blue: #0a84ff;
  --ap-green: #30d158;
  --ap-red: #ff453a;
  --ap-sidebar-w: 280px;
  --ap-max: 1380px;
  --ap-header-h: 52px;
  --ap-radius-sm: 10px;
  --ap-radius: 18px;
  --ap-radius-lg: 28px;
  --ap-radius-xl: 40px;
  --ap-shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --ap-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --ap-shadow-lg: 0 22px 64px rgba(0,0,0,0.13), 0 4px 12px rgba(0,0,0,0.06);
}

/* ── RESET FOR HOME PAGE ─────────────────────────────────────────────────── */
.home-page {
  background: var(--ap-bg);
  color: var(--ap-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.ap-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--ap-header-h);
  background: rgba(245,245,247,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ap-border);
}

.ap-header-inner {
  max-width: var(--ap-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.ap-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ap-ink);
  flex-shrink: 0;
}

.ap-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.ap-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ap-ink);
}

.ap-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.ap-nav-link {
  text-decoration: none;
  color: var(--ap-ink-2);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.ap-nav-link:hover {
  background: rgba(0,0,0,0.06);
  color: var(--ap-ink);
}

.ap-nav-link.is-active {
  color: var(--ap-ink);
  font-weight: 600;
}

.ap-nav-cta {
  background: var(--ap-brand);
  color: #fff !important;
  font-weight: 600;
  padding: 6px 16px;
  transition: background 0.18s, transform 0.18s;
}

.ap-nav-cta:hover {
  background: var(--ap-brand-dark) !important;
  transform: none;
}

.ap-menu-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.ap-menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ap-ink);
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.2s;
}

/* ── HERO ────────────────────────────────────────────────────────────────── */
.ap-hero {
  background: linear-gradient(160deg, #ffffff 0%, #f0f0f5 60%, #e8e8ed 100%);
  border-bottom: 1px solid var(--ap-border);
  padding: 72px 24px 64px;
}

.ap-hero-inner {
  max-width: var(--ap-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
}

.ap-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ap-brand);
  margin-bottom: 16px;
}

.ap-hero-title {
  font-size: clamp(3.6rem, 7vw, 7.5rem);
  font-weight: 800;
  line-height: 0.93;
  letter-spacing: -0.05em;
  color: var(--ap-ink);
  margin: 0 0 20px;
}

.ap-hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--ap-ink-3);
  max-width: 520px;
  margin: 0 0 32px;
  font-weight: 400;
}

.ap-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--ap-radius);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.ap-btn:hover { transform: translateY(-1px); }

.ap-btn-primary {
  background: var(--ap-ink);
  color: #fff;
  box-shadow: var(--ap-shadow-sm);
}
.ap-btn-primary:hover { background: #2d2d30; }

.ap-btn-ghost {
  background: rgba(0,0,0,0.06);
  color: var(--ap-ink);
}
.ap-btn-ghost:hover { background: rgba(0,0,0,0.1); }

.ap-btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 10px;
}

/* ── HERO PANEL (stats + thermometer) ───────────────────────────────────── */
.ap-hero-panel {
  background: var(--ap-surface);
  border-radius: var(--ap-radius-xl);
  border: 1px solid var(--ap-border);
  box-shadow: var(--ap-shadow-lg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ap-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ap-panel-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ap-ink-4);
}

.ap-panel-total {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ap-ink);
  line-height: 1;
}

/* Thermometer */
.ap-thermo-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 110px;
}

.ap-thermo {
  flex-shrink: 0;
  width: 32px;
  height: 100%;
  background: #f0f0f3;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--ap-border);
}

.ap-thermo-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--ap-brand) 0%, #ffb340 100%);
  border-radius: 999px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
  transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ap-thermo-val {
  font-size: 0.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.ap-thermo-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 0;
}

.ap-thermo-labels span {
  font-size: 0.65rem;
  color: var(--ap-ink-4);
  font-weight: 600;
  line-height: 1;
}

/* Stats rows */
.ap-stats-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-stat-info {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 72px;
  flex-shrink: 0;
}

.ap-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ap-stat-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ap-ink-2);
  white-space: nowrap;
}

.ap-stat-bar-wrap {
  flex: 1;
  height: 6px;
  background: #f0f0f3;
  border-radius: 999px;
  overflow: hidden;
}

.ap-stat-bar {
  height: 100%;
  background: var(--ap-brand);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ap-stat-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ap-ink);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.ap-panel-cta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ap-ink-4);
  font-weight: 500;
  text-align: center;
}

/* ── MAIN LAYOUT (sidebar + content) ────────────────────────────────────── */
.ap-main-layout {
  max-width: var(--ap-max);
  margin: 0 auto;
  padding: 32px 24px 72px;
  display: grid;
  grid-template-columns: var(--ap-sidebar-w) 1fr;
  gap: 24px;
  align-items: start;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.ap-sidebar {
  position: sticky;
  top: calc(var(--ap-header-h) + 16px);
  background: var(--ap-surface);
  border-radius: var(--ap-radius-lg);
  border: 1px solid var(--ap-border);
  box-shadow: var(--ap-shadow-sm);
  overflow: hidden;
  max-height: calc(100vh - var(--ap-header-h) - 32px);
  display: flex;
  flex-direction: column;
}

.ap-sidebar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ap-border);
  background: var(--ap-bg);
  flex-shrink: 0;
}

.ap-sidebar-search svg {
  flex-shrink: 0;
}

.ap-sidebar-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--ap-ink);
  width: 100%;
  font-family: inherit;
}

.ap-sidebar-search input::placeholder {
  color: var(--ap-ink-4);
}

.ap-sidebar-section-label {
  padding: 12px 16px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ap-ink-4);
  flex-shrink: 0;
}

.ap-sidebar-filter {
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--ap-border);
  background: var(--ap-surface);
  flex-shrink: 0;
}

.ap-sidebar-filter .ap-sidebar-section-label {
  display: block;
  padding: 0 0 8px;
}

.ap-filter-select-wrap {
  position: relative;
}

.ap-filter-select-wrap::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 1rem;
  color: var(--ap-ink-4);
  pointer-events: none;
}

.ap-category-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  background: var(--ap-bg);
  color: var(--ap-ink);
  box-shadow: var(--ap-shadow-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  padding: 10px 36px 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.ap-category-select:hover {
  background: #fff;
}

.ap-category-select:focus {
  border-color: var(--ap-ink);
  box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.08);
}

.ap-sidebar-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
  padding: 4px 0 12px;
}

.ap-sidebar-list::-webkit-scrollbar { width: 4px; }
.ap-sidebar-list::-webkit-scrollbar-track { background: transparent; }
.ap-sidebar-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

/* Sidebar post items (generated by JS via sidebarPostHtml) */
.ap-sidebar-list .sidebar-post-item,
.ap-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--ap-ink);
  border-radius: 10px;
  margin: 0 6px;
  transition: background 0.15s;
}

.ap-sidebar-list .sidebar-post-item:hover,
.ap-sidebar-item:hover {
  background: rgba(0,0,0,0.04);
}

.ap-sidebar-list .sidebar-post-number {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ap-ink-4);
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
}

.ap-sidebar-list .sidebar-post-item strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ap-ink);
  line-height: 1.3;
  margin-bottom: 2px;
}

.ap-sidebar-list .sidebar-post-item small {
  font-size: 0.7rem;
  color: var(--ap-ink-4);
  font-weight: 400;
}

/* Skeleton items */
.skeleton-item span {
  display: block;
  background: linear-gradient(90deg, #e8e8ed 0%, #f5f5f7 50%, #e8e8ed 100%);
  background-size: 300% 100%;
  animation: ap-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 6px;
}

.skeleton-item span:first-child { height: 12px; width: 80%; }
.skeleton-item span:last-child  { height: 10px; width: 50%; }

@keyframes ap-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Sidebar empty state */
.sidebar-empty {
  padding: 16px;
  font-size: 0.82rem;
  color: var(--ap-ink-4);
  text-align: center;
}

/* Skeleton for sidebar posts generated by site.js */
.sidebar-skeleton {
  pointer-events: none;
}
.sidebar-skeleton strong,
.sidebar-skeleton small {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8e8ed 0%, #f5f5f7 50%, #e8e8ed 100%);
  background-size: 300% 100%;
  animation: ap-shimmer 1.4s ease-in-out infinite;
}
.sidebar-skeleton strong { width: 75%; margin-bottom: 5px; }
.sidebar-skeleton small  { width: 45%; height: 9px; }

/* ── CONTENT AREA ────────────────────────────────────────────────────────── */
.ap-content-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── CATEGORY FILTER ─────────────────────────────────────────────────────── */
.ap-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ap-cat-btn {
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--ap-surface);
  color: var(--ap-ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  font-family: inherit;
  box-shadow: var(--ap-shadow-sm);
}

.ap-cat-btn:hover {
  background: var(--ap-bg);
  transform: translateY(-1px);
}

.ap-cat-btn.is-active {
  background: var(--ap-ink);
  color: #fff;
  border-color: var(--ap-ink);
}

/* Map the existing site.js category buttons to our style */
.ap-categories button {
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--ap-surface);
  color: var(--ap-ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  box-shadow: var(--ap-shadow-sm);
}
.ap-categories button:hover { background: var(--ap-bg); }
.ap-categories button.is-active { background: var(--ap-ink); color:#fff; border-color: var(--ap-ink); }

/* ── ARTICLE GRID ────────────────────────────────────────────────────────── */
.ap-article-grid,
[data-wp-archive] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Override the site.js injected cards */
[data-wp-archive] .wp-post-card,
[data-wp-archive] .article-card {
  background: var(--ap-surface) !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: var(--ap-radius-lg) !important;
  padding: 20px !important;
  box-shadow: var(--ap-shadow-sm) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  text-decoration: none !important;
  color: var(--ap-ink) !important;
}

[data-wp-archive] .wp-post-card:hover,
[data-wp-archive] .article-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--ap-shadow) !important;
}

[data-wp-archive] .wp-card-image {
  height: 160px !important;
  margin: -20px -20px 0 !important;
  border-radius: calc(var(--ap-radius-lg) - 1px) calc(var(--ap-radius-lg) - 1px) 0 0 !important;
}

[data-wp-archive] .card-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
}

[data-wp-archive] .tag {
  display: inline-flex !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  background: var(--ap-bg) !important;
  color: var(--ap-ink-3) !important;
  border: 1px solid var(--ap-border) !important;
}

[data-wp-archive] h3 {
  margin: 0 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em !important;
  color: var(--ap-ink) !important;
}

[data-wp-archive] p {
  margin: 0 !important;
  font-size: 0.85rem !important;
  color: var(--ap-ink-3) !important;
  line-height: 1.55 !important;
  flex: 1 !important;
}

[data-wp-archive] .wp-card-footer {
  font-size: 0.78rem !important;
  color: var(--ap-ink-4) !important;
  margin-top: auto !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

[data-wp-archive] .wp-card-footer strong {
  color: var(--ap-brand) !important;
  font-size: 0.78rem !important;
}

/* Skeleton cards */
.skeleton-card,
.ap-card.skeleton-card,
[data-wp-archive] .wp-skeleton {
  background: var(--ap-surface) !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: var(--ap-radius-lg) !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  pointer-events: none !important;
}

.skeleton-card span,
[data-wp-archive] .wp-skeleton span {
  display: block !important;
  background: linear-gradient(90deg, #e8e8ed 0%, #f5f5f7 50%, #e8e8ed 100%) !important;
  background-size: 300% 100% !important;
  animation: ap-shimmer 1.4s ease-in-out infinite !important;
  border-radius: 6px !important;
}

.skeleton-card span:nth-child(1),
[data-wp-archive] .wp-skeleton span:nth-child(1) { height: 130px !important; border-radius: 12px !important; margin-bottom: 4px !important; }
.skeleton-card span:nth-child(2),
[data-wp-archive] .wp-skeleton span:nth-child(2) { height: 12px !important; width: 40% !important; }
.skeleton-card span:nth-child(3),
[data-wp-archive] .wp-skeleton span:nth-child(3) { height: 16px !important; width: 90% !important; }
.skeleton-card span:nth-child(4),
[data-wp-archive] .wp-skeleton span:nth-child(4) { height: 12px !important; width: 60% !important; }

/* wp-status-card inside grid */
[data-wp-archive] .wp-status-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: var(--ap-radius-lg) !important;
  border: 1px solid var(--ap-border) !important;
  background: var(--ap-surface) !important;
  box-shadow: var(--ap-shadow-sm) !important;
  padding: 32px !important;
  backdrop-filter: none !important;
}

[data-wp-archive] .wp-status-card h1,
[data-wp-archive] .wp-status-card h3 {
  font-size: 1.5rem !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 8px !important;
  color: var(--ap-ink) !important;
}

[data-wp-archive] .wp-status-card p {
  font-size: 0.9rem !important;
  color: var(--ap-ink-3) !important;
}

/* ── PRINCIPLES ──────────────────────────────────────────────────────────── */
.ap-principles {
  border-top: 1px solid var(--ap-border);
  padding-top: 40px;
  margin-top: 16px;
}

.ap-principles-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ap-ink);
  margin: 0 0 24px;
}

.ap-principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.ap-principle-card {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-lg);
  padding: 24px;
  box-shadow: var(--ap-shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}

.ap-principle-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow);
}

.ap-principle-icon {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--ap-brand);
  line-height: 1;
}

.ap-principle-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ap-ink);
  letter-spacing: -0.02em;
}

.ap-principle-card p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ap-ink-3);
  line-height: 1.55;
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.ap-footer {
  background: var(--ap-ink);
  color: rgba(255,255,255,0.6);
  padding: 36px 24px;
  margin-top: 0;
}

.ap-footer-inner {
  max-width: var(--ap-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.ap-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ap-footer-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  opacity: 0.9;
}

.ap-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-left: auto;
}

.ap-footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}

.ap-footer-links a:hover { color: #fff; }

.ap-footer-copy {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.28);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}

/* ── COOKIE BANNER ───────────────────────────────────────────────────────── */
.ap-cookie {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(29,29,31,0.94);
  color: #fff;
  border-radius: var(--ap-radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--ap-shadow-lg);
  backdrop-filter: blur(20px);
  z-index: 999;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
}

.ap-cookie p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
}

.ap-cookie strong { color: #fff; }

/* Override site.js cookie banner show/hide since we renamed the class */
#cookie-banner { display: none !important; }
.ap-cookie[hidden] { display: none !important; }

/* ── SIDEBAR SEARCH FILTER (JS-driven) ───────────────────────────────────── */
.ap-sidebar-item-hidden {
  display: none !important;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ap-hero-inner {
    grid-template-columns: 1fr 300px;
    gap: 32px;
  }
}

@media (max-width: 920px) {
  :root { --ap-sidebar-w: 240px; }

  .ap-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ap-hero-panel { max-width: 360px; }

  .ap-principles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ap-nav {
    display: none;
    position: fixed;
    top: var(--ap-header-h);
    left: 0; right: 0;
    background: rgba(245,245,247,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--ap-border);
    gap: 4px;
    z-index: 99;
  }

  .ap-nav.is-open { display: flex; }

  .ap-nav-link {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--ap-radius-sm);
    font-size: 0.95rem;
  }

  .ap-menu-toggle { display: block; }

  .ap-main-layout {
    grid-template-columns: 1fr;
    padding: 20px 16px 48px;
  }

  .ap-sidebar {
    position: static;
    max-height: 340px;
  }

  .ap-article-grid,
  [data-wp-archive] { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

  .ap-principles-grid { grid-template-columns: 1fr; }

  .ap-footer-inner { flex-direction: column; align-items: flex-start; }
  .ap-footer-links { margin-left: 0; }

  .ap-hero { padding: 48px 16px 40px; }
  .ap-hero-title { font-size: clamp(3rem, 12vw, 4.5rem); }
}

@media (max-width: 480px) {
  .ap-article-grid,
  [data-wp-archive] { grid-template-columns: 1fr; }

  .ap-cookie { flex-direction: column; text-align: center; white-space: normal; }
}

/* ── ARTICLE PAGINATION ──────────────────────────────────────────────────── */
.ap-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 18px;
}

.ap-pagination[hidden] {
  display: none !important;
}

.ap-page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.ap-page-btn {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  background: var(--ap-surface);
  color: var(--ap-ink-2);
  box-shadow: var(--ap-shadow-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0 14px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}

.ap-page-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--ap-shadow);
  background: #fff;
}

.ap-page-btn.is-active {
  background: var(--ap-ink);
  color: #fff;
  border-color: var(--ap-ink);
}

.ap-page-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.ap-page-prev,
.ap-page-next {
  min-width: 92px;
}

.ap-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 38px;
  color: var(--ap-ink-4);
  font-weight: 700;
}

@media (max-width: 480px) {
  .ap-pagination {
    justify-content: stretch;
  }

  .ap-page-prev,
  .ap-page-next {
    flex: 1;
  }

  .ap-page-numbers {
    width: 100%;
    order: -1;
  }
}

/* ── ARTICLE READING PAGE ────────────────────────────────────────────────── */
.article-reading-page {
  background: var(--ap-bg);
  color: var(--ap-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.article-reading-page .ap-header {
  box-shadow: none;
}

.article-reader-shell {
  min-height: 72vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.95), transparent 34rem),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 42%, #ffffff 100%);
  padding: clamp(46px, 7vw, 92px) 24px clamp(58px, 8vw, 112px);
}

.reader-article {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.reader-breadcrumbs {
  width: min(100%, 880px);
  margin: 0 auto clamp(28px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ap-ink-4);
  font-size: 0.84rem;
  font-weight: 600;
}

.reader-breadcrumbs a {
  color: var(--ap-ink-3);
  text-decoration: none;
  transition: color 0.16s;
}

.reader-breadcrumbs a:hover {
  color: var(--ap-ink);
}

.reader-breadcrumbs strong {
  color: var(--ap-ink-2);
  font-weight: 700;
}

.reader-hero {
  width: min(100%, 920px);
  margin: 0 auto;
  text-align: center;
}

.reader-kicker-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ap-ink-4);
  font-size: 0.82rem;
  font-weight: 700;
}

.reader-kicker-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.reader-kicker-row .reader-kicker {
  color: var(--ap-brand);
  border-color: rgba(255,122,26,0.2);
  background: rgba(255,122,26,0.08);
}

.reader-hero h1 {
  margin: 0;
  color: var(--ap-ink);
  font-size: clamp(3.1rem, 7vw, 6.8rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.062em;
  text-wrap: balance;
}

.reader-excerpt {
  max-width: 760px;
  margin: clamp(20px, 3vw, 28px) auto 0;
  color: var(--ap-ink-3);
  font-size: clamp(1.12rem, 1.7vw, 1.38rem);
  line-height: 1.62;
  letter-spacing: -0.015em;
}

.reader-author-row {
  margin: clamp(24px, 4vw, 36px) auto 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--ap-border);
  box-shadow: var(--ap-shadow-sm);
  text-align: left;
}

.reader-author-avatar {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--ap-ink), #3a3a3c);
  color: #fff;
  font-weight: 800;
}

.reader-author-row strong,
.reader-author-row small {
  display: block;
}

.reader-author-row strong {
  color: var(--ap-ink);
  font-size: 0.9rem;
  line-height: 1.1;
}

.reader-author-row small {
  margin-top: 3px;
  color: var(--ap-ink-4);
  font-size: 0.76rem;
  font-weight: 600;
}

.reader-cover {
  width: min(100%, 1080px);
  margin: clamp(34px, 6vw, 66px) auto 0;
  border-radius: clamp(28px, 4vw, 46px);
  overflow: hidden;
  background: #e8e8ed;
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: 0 32px 90px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.7);
}

.reader-cover img {
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 340px;
  object-fit: cover;
}

.reader-body-layout {
  width: min(100%, 1080px);
  margin: clamp(22px, 4vw, 42px) auto 0;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
}

.reader-side-card {
  position: static;
  width: 100%;
  border-radius: 28px;
  padding: clamp(18px, 3vw, 26px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 42px);
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--ap-border);
  box-shadow: var(--ap-shadow-sm);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.reader-side-main {
  min-width: 0;
}

.reader-side-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.reader-side-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ap-ink-4);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reader-side-card strong {
  display: block;
  color: var(--ap-ink);
  font-size: clamp(1.46rem, 2.5vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.reader-side-card p {
  max-width: 460px;
  margin: 10px 0 0;
  color: var(--ap-ink-3);
  font-size: 0.96rem;
  line-height: 1.58;
}

.reader-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 0;
}

.reader-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f2f2f7;
  color: var(--ap-ink-3);
  border: 1px solid var(--ap-border);
  font-size: 0.75rem;
  font-weight: 700;
}

.reader-side-card a {
  color: var(--ap-brand);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 800;
}

.reader-content {
  width: 100%;
  min-width: 0;
  padding: clamp(34px, 5.8vw, 74px) clamp(34px, 7vw, 88px);
  border-radius: clamp(28px, 4vw, 42px);
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--ap-border);
  box-shadow: 0 18px 55px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.88);
  color: #2c2c2e;
}

.reader-content > *:first-child {
  margin-top: 0 !important;
}

.reader-content > *:last-child {
  margin-bottom: 0 !important;
}

.reader-content p,
.reader-content li {
  color: #3a3a3c;
  font-size: clamp(1.06rem, 1.1vw, 1.17rem);
  line-height: 1.86;
  letter-spacing: -0.006em;
}

.reader-content p {
  margin: 0 0 1.34em;
}

.reader-content h2,
.reader-content h3,
.reader-content h4 {
  color: var(--ap-ink);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.reader-content h2 {
  margin: 2.15em 0 0.55em;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.04;
}

.reader-content h3 {
  margin: 1.8em 0 0.52em;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.12;
}

.reader-content h4 {
  margin: 1.6em 0 0.5em;
  font-size: 1.16rem;
  line-height: 1.22;
}

.reader-content ul,
.reader-content ol {
  margin: 0 0 1.45em;
  padding-left: 1.35em;
}

.reader-content li {
  margin: 0.36em 0;
  padding-left: 0.18em;
}

.reader-content a {
  color: var(--ap-brand);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,122,26,0.34);
}

.reader-content a:hover {
  border-bottom-color: currentColor;
}

.reader-content strong {
  color: var(--ap-ink);
  font-weight: 800;
}

.reader-content img,
.reader-content figure {
  max-width: 100%;
}

.reader-content figure {
  margin: 2.1em 0;
}

.reader-content img {
  height: auto;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.12);
}

.reader-content figcaption,
.reader-content .wp-caption-text {
  margin-top: 10px;
  color: var(--ap-ink-4);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
}

.reader-content blockquote {
  margin: 2em 0;
  padding: clamp(22px, 3vw, 34px);
  border: 0;
  border-radius: 28px;
  background: #1d1d1f;
  color: #fff;
  box-shadow: 0 18px 48px rgba(0,0,0,0.18);
}

.reader-content blockquote p {
  color: rgba(255,255,255,0.9);
  font-size: clamp(1.16rem, 1.6vw, 1.38rem);
  line-height: 1.62;
}

.reader-content pre {
  max-width: 100%;
  overflow: auto;
  margin: 1.8em 0;
  padding: 22px;
  border-radius: 22px;
  background: #111113;
  color: #f5f5f7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.reader-content code {
  border-radius: 8px;
  padding: 0.18em 0.36em;
  background: #f2f2f7;
  color: #1d1d1f;
  font-size: 0.94em;
}

.reader-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.reader-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ap-border);
}

.reader-content th,
.reader-content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ap-border);
  text-align: left;
  vertical-align: top;
}

.reader-content th {
  color: var(--ap-ink);
  background: #f5f5f7;
  font-weight: 800;
}

.reader-next-card {
  width: min(100%, 880px);
  margin: clamp(34px, 6vw, 70px) auto 0;
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-radius: 34px;
  background: #1d1d1f;
  color: #fff;
  box-shadow: var(--ap-shadow-lg);
}

.reader-next-card span {
  color: var(--ap-brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reader-next-card h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.reader-next-card p {
  max-width: 520px;
  margin: 0;
  color: rgba(255,255,255,0.68);
  line-height: 1.62;
}

.reader-next-card .ap-btn-primary {
  background: #fff;
  color: #1d1d1f;
  box-shadow: none;
  white-space: nowrap;
}

.reader-status-card {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 64px);
  text-align: center;
  border-radius: 38px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--ap-border);
  box-shadow: var(--ap-shadow);
}

.reader-status-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  display: block;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--ap-brand), #ffb067);
  box-shadow: 0 16px 38px rgba(255,122,26,0.24);
}

.reader-status-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.reader-status-card p {
  max-width: 600px;
  margin: 0 auto 24px;
  color: var(--ap-ink-3);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .reader-body-layout {
    width: min(100%, 860px);
  }

  .reader-side-card {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .article-reader-shell {
    padding: 34px 16px 72px;
  }

  .reader-breadcrumbs {
    justify-content: flex-start;
    margin-bottom: 28px;
  }

  .reader-hero {
    text-align: left;
  }

  .reader-kicker-row {
    justify-content: flex-start;
  }

  .reader-hero h1 {
    font-size: clamp(2.72rem, 12vw, 4.4rem);
  }

  .reader-excerpt {
    margin-left: 0;
    margin-right: 0;
  }

  .reader-author-row {
    margin-left: 0;
  }

  .reader-cover img {
    aspect-ratio: 4 / 3;
    min-height: 240px;
  }

  .reader-side-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .reader-side-actions {
    align-items: flex-start;
    text-align: left;
  }

  .reader-tags {
    justify-content: flex-start;
  }

  .reader-content {
    padding: 26px;
    border-radius: 28px;
  }

  .reader-content p,
  .reader-content li {
    font-size: 1.03rem;
    line-height: 1.78;
  }

  .reader-next-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .reader-author-row {
    border-radius: 22px;
    align-items: flex-start;
  }

  .reader-cover,
  .reader-content,
  .reader-next-card,
  .reader-status-card {
    border-radius: 24px;
  }
}

/* ── ARTICLE HERO REFINEMENT: imagem + título sobreposto ─────────────────── */
.article-reader-shell {
  padding-top: clamp(34px, 5vw, 64px);
}

.reader-article-featured {
  width: min(100%, 1200px);
}

.reader-visual-hero {
  position: relative;
  width: min(100%, 1080px);
  margin: 0 auto clamp(8px, 2vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
}

.reader-visual-hero.no-cover {
  padding-top: 42px;
}

.reader-cover.reader-cover-top {
  width: min(100%, 980px);
  margin: 0 auto;
  border-radius: clamp(20px, 3vw, 34px);
  overflow: hidden;
  background: #e8e8ed;
  border: 1px solid rgba(255,255,255,0.86);
  box-shadow: 0 20px 58px rgba(0,0,0,0.14), 0 1px 0 rgba(255,255,255,0.88) inset;
}

.reader-cover.reader-cover-top img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 250px;
  object-fit: cover;
}

.reader-breadcrumbs.reader-breadcrumbs-floating {
  position: absolute;
  z-index: 4;
  top: -16px;
  left: 50%;
  width: auto;
  max-width: calc(100% - 36px);
  margin: 0;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  font-size: 0.72rem;
  white-space: nowrap;
}

.reader-headline-stack {
  position: relative;
  z-index: 5;
  width: min(100%, 760px);
  margin: clamp(-28px, -2.5vw, -16px) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reader-title-card {
  width: min(100%, 690px);
  padding: clamp(14px, 2vw, 22px) clamp(18px, 3vw, 34px) clamp(16px, 2.2vw, 26px);
  border-radius: 8px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 16px 38px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.88);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  text-align: center;
}

.reader-title-card .reader-kicker-row {
  margin-bottom: 9px;
  gap: 6px;
}

.reader-title-card .reader-kicker-row span {
  min-height: 22px;
  padding: 4px 9px;
  font-size: 0.68rem;
  background: rgba(255,255,255,0.82);
}

.reader-title-card h1 {
  margin: 0;
  color: var(--ap-ink);
  font-size: clamp(2.18rem, 4.2vw, 4.12rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.068em;
  text-wrap: balance;
}

.reader-excerpt.reader-excerpt-card {
  width: min(100%, 560px);
  max-width: 560px;
  margin: -1px auto 0;
  padding: 12px 20px 14px;
  border-radius: 6px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.86);
  color: var(--ap-ink-3);
  font-size: clamp(0.86rem, 1vw, 1rem);
  line-height: 1.58;
  text-align: center;
  letter-spacing: -0.01em;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.reader-author-row.reader-author-floating {
  align-self: flex-start;
  margin: -10px 0 0 clamp(18px, 9vw, 88px);
  padding: 7px 12px 7px 7px;
  transform: scale(0.92);
  transform-origin: left top;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 12px 30px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.9);
}

.reader-author-row.reader-author-floating .reader-author-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.84rem;
}

.reader-author-row.reader-author-floating strong {
  font-size: 0.78rem;
}

.reader-author-row.reader-author-floating small {
  font-size: 0.68rem;
}

.reader-article-featured .reader-body-layout {
  width: min(100%, 1080px);
  margin-top: clamp(8px, 2vw, 20px);
}

.reader-article-featured .reader-reading-summary {
  border-radius: 22px;
  padding: clamp(16px, 2.5vw, 24px);
}

.reader-article-featured .reader-content {
  width: 100%;
  max-width: none;
}

@media (max-width: 768px) {
  .article-reader-shell {
    padding-top: 28px;
  }

  .reader-visual-hero {
    align-items: stretch;
  }

  .reader-cover.reader-cover-top {
    width: 100%;
    border-radius: 24px;
  }

  .reader-cover.reader-cover-top img {
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }

  .reader-breadcrumbs.reader-breadcrumbs-floating {
    position: relative;
    top: auto;
    left: auto;
    justify-content: flex-start;
    align-self: flex-start;
    order: -1;
    max-width: 100%;
    margin: 0 0 12px;
    transform: none;
    white-space: normal;
  }

  .reader-headline-stack {
    width: 100%;
    margin-top: -18px;
    align-items: flex-start;
  }

  .reader-title-card {
    width: calc(100% - 20px);
    margin: 0 auto;
    text-align: left;
  }

  .reader-title-card .reader-kicker-row {
    justify-content: flex-start;
  }

  .reader-title-card h1 {
    font-size: clamp(2.2rem, 11vw, 3.8rem);
  }

  .reader-excerpt.reader-excerpt-card {
    width: calc(100% - 42px);
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .reader-author-row.reader-author-floating {
    margin: 12px 0 0 0;
    transform: none;
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .reader-title-card,
  .reader-excerpt.reader-excerpt-card {
    border-radius: 18px;
  }

  .reader-title-card .reader-kicker-row span {
    font-size: 0.64rem;
  }
}

/* === Reader article layout: compact hero card like the approved mockup === */
.reader-article-clean {
  width: min(100%, 1100px);
}

.reader-top-card {
  width: min(100%, 980px);
  margin: 0 auto clamp(26px, 4vw, 34px);
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.09), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.reader-top-card.no-cover {
  padding-top: 8px;
}

.reader-top-cover {
  margin: 0;
  aspect-ratio: 16 / 5.4;
  background: #ebecef;
  overflow: hidden;
}

.reader-top-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-top-body {
  padding: 16px 16px 14px;
}

.reader-top-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.reader-top-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f4f4f6;
  border: 1px solid rgba(16, 24, 40, 0.08);
  color: #6d6d75;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.reader-top-title {
  margin: 0;
  color: var(--ap-ink);
  font-size: clamp(2rem, 3.1vw, 3.28rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
  font-weight: 800;
  text-wrap: balance;
}

.reader-top-excerpt {
  margin: 14px 0 0;
  max-width: 900px;
  color: #6e6e73;
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  line-height: 1.58;
  letter-spacing: -0.012em;
}

.reader-top-footer {
  margin-top: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.reader-top-date {
  color: #7a7a80;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.reader-author-row.reader-author-inline {
  margin: 0;
  padding: 8px 14px 8px 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.10);
}

.reader-content-wrap {
  width: min(100%, 980px);
  margin: 0 auto;
}

.reader-content-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.reader-breadcrumbs.reader-breadcrumbs-inline {
  margin: 0;
  padding: 0;
  color: #86868b;
  font-size: 0.88rem;
}

.reader-breadcrumbs.reader-breadcrumbs-inline a,
.reader-breadcrumbs.reader-breadcrumbs-inline strong {
  color: inherit;
}

.reader-back-link {
  color: var(--ap-accent);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}

.reader-back-link:hover {
  text-decoration: underline;
}

.reader-content-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.08), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
  overflow: hidden;
}

.reader-content-card .reader-content {
  width: 100%;
  max-width: none;
  padding: clamp(28px, 4vw, 50px) clamp(22px, 4vw, 58px);
}

@media (max-width: 768px) {
  .reader-top-card,
  .reader-content-wrap,
  .reader-next-card {
    width: 100%;
  }

  .reader-top-cover {
    aspect-ratio: 4 / 3;
  }

  .reader-top-body {
    padding: 14px 14px 16px;
  }

  .reader-top-title {
    font-size: clamp(1.9rem, 8.2vw, 2.7rem);
  }

  .reader-top-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .reader-author-row.reader-author-inline {
    width: 100%;
    max-width: 280px;
  }

  .reader-content-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .reader-content-card {
    border-radius: 24px;
  }

  .reader-content-card .reader-content {
    padding: 24px 18px 30px;
  }
}


/* === Ajustes finos solicitados: breadcrumb no topo e voltar abaixo do autor === */
.reader-top-meta {
  align-items: center;
}

.reader-breadcrumbs.reader-breadcrumbs-chip {
  margin: 0 0 0 12px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 30px;
  color: #8b8b91;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.reader-breadcrumbs.reader-breadcrumbs-chip a,
.reader-breadcrumbs.reader-breadcrumbs-chip strong {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.reader-breadcrumbs.reader-breadcrumbs-chip a:hover {
  color: var(--ap-accent);
}

.reader-author-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.reader-back-link.reader-back-link-under-author {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 24, 40, 0.10);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  color: var(--ap-ink);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.012em;
}

.reader-back-link.reader-back-link-under-author:hover {
  color: var(--ap-accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.reader-content-topbar {
  display: none !important;
}

@media (max-width: 768px) {
  .reader-top-meta {
    align-items: flex-start;
  }

  .reader-breadcrumbs.reader-breadcrumbs-chip {
    flex-basis: 100%;
    margin: 2px 0 0;
    white-space: normal;
  }

  .reader-author-actions {
    align-items: flex-start;
    width: 100%;
  }

  .reader-back-link.reader-back-link-under-author {
    width: 100%;
    max-width: 280px;
  }
}


/* === Ajuste solicitado: autor e botão menores com border-radius 1px === */
.reader-author-row.reader-author-inline {
  min-height: 42px;
  padding: 5px 9px 5px 5px;
  border-radius: 50px !important;
  gap: 7px;
}

.reader-author-row.reader-author-inline .reader-author-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.76rem;
  border-radius: 50%;
}

.reader-author-row.reader-author-inline strong {
  font-size: 0.72rem;
  line-height: 1.05;
}

.reader-author-row.reader-author-inline small {
  font-size: 0.62rem;
  line-height: 1.05;
}

.reader-author-actions {
  gap: 5px;
}

.reader-back-link.reader-back-link-under-author {
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 1px !important;
  font-size: 0.76rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.07);
}

@media (max-width: 768px) {
  .reader-author-row.reader-author-inline {
    width: auto;
    max-width: 235px;
  }

  .reader-back-link.reader-back-link-under-author {
    width: auto;
    max-width: 235px;
  }
}
