/* ════════════════════════════════════════════════════════════════════
   A7 News — public injected styles.
   Theme-aware (DaisyUI vars on a7.ae), RTL-first.

   Layout: editorial grid — first card is a FEATURED hero (large cover,
   spans 2 cols on desktop), the rest fall into a compact 3-col grid.
   Replaces the previous 3-equal-column "AI default" layout.
   ════════════════════════════════════════════════════════════════════ */

.a7n-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  font-family: inherit;
  color: hsl(var(--base-content));
  font-variant-numeric: tabular-nums;
}

/* ─── Smart Stack (Coverflow-style featured carousel) ─── */
.a7n-stack {
  position: relative;
  width: 100%;
  height: clamp(280px, 38vw, 420px);
  margin: 12px 0 28px;
  perspective: 1400px;
  overflow: visible;
  user-select: none;
}
/* Reserved placeholder while the carousel engine + /stack load after first
   paint — holds .a7n-stack's clamp() height so the grid never shifts (CLS). */
.a7n-stack--skeleton {
  border-radius: 20px;
  background-color: color-mix(in oklch, var(--color-base-content) 5%, transparent);
  background-image: linear-gradient(100deg, transparent 35%,
    color-mix(in oklch, var(--color-base-content) 8%, transparent) 50%, transparent 65%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: a7n-stack-sk 1.5s ease-in-out infinite;
}
@keyframes a7n-stack-sk { from { background-position: 220% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) {
  .a7n-stack--skeleton { animation: none; background-image: none; }
}
.a7n-stack__viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}
.a7n-stack__card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(280px, 60%, 720px);
  height: clamp(260px, 36vw, 400px);
  border-radius: 18px;
  overflow: hidden;
  transform-origin: center;
  /* Strong ease-in-out for cards moving across (avoid overshoot for spatial decoration) */
  transition: transform 420ms cubic-bezier(0.77, 0, 0.175, 1),
              opacity 420ms cubic-bezier(0.23, 1, 0.32, 1),
              filter 420ms cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  box-shadow: 0 20px 50px -12px color-mix(in oklch, hsl(var(--base-content)) 32%, transparent);
  background-color: color-mix(in oklch, hsl(var(--base-content)) 8%, transparent);
  background-size: cover; background-position: center top;
}
.a7n-stack__card.is-active { transform: translate(-50%, -50%) translateZ(0) scale(1); opacity: 1; filter: blur(0); z-index: 3; }
/* Peeks: more recessed than before — opacity .46 + blur 1px so they read as background, not competing focus */
.a7n-stack__card.is-prev   { transform: translate(calc(-50% - 38%), -50%) translateZ(-220px) rotateY(28deg) scale(.82); opacity: .46; filter: blur(1px); z-index: 2; }
.a7n-stack__card.is-next   { transform: translate(calc(-50% + 38%), -50%) translateZ(-220px) rotateY(-28deg) scale(.82); opacity: .46; filter: blur(1px); z-index: 2; }
.a7n-stack__card.is-far    { opacity: 0; transform: translate(-50%, -50%) scale(.4); pointer-events: none; }

/* Active card press feedback — instant "I heard you" response */
.a7n-stack__card.is-active:active {
  transform: translate(-50%, -50%) translateZ(0) scale(.97);
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
/* Subtle hover lift — pointer-only to avoid touch false positives */
@media (hover: hover) and (pointer: fine) {
  .a7n-stack__card.is-active:hover { transform: translate(-50%, -50%) translateZ(0) scale(1.012); }
}

/* RTL: peeks swap sides */
[dir="rtl"] .a7n-stack__card.is-prev { transform: translate(calc(-50% + 38%), -50%) translateZ(-220px) rotateY(-28deg) scale(.82); }
[dir="rtl"] .a7n-stack__card.is-next { transform: translate(calc(-50% - 38%), -50%) translateZ(-220px) rotateY(28deg) scale(.82); }

/* Glassy overlay at bottom of each card — radial-tinted gradient + frosted mask edge */
.a7n-stack__overlay {
  position: absolute;
  inset-inline: 0; bottom: 0;
  padding: 20px 24px 22px;
  background:
    radial-gradient(ellipse 120% 100% at 50% 100%, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%);
  color: #fff;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}
.a7n-stack__overlay::before {
  content: ''; position: absolute; inset: 0;
  backdrop-filter: blur(8px) saturate(1.2);
  mask: linear-gradient(to top, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  -webkit-mask: linear-gradient(to top, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  z-index: -1;
}
.a7n-stack__title {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.a7n-stack__excerpt {
  /* Bumped from 10px → 13px for legibility (the old size felt cramped) */
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  opacity: .92;
  margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.a7n-stack__sep {
  height: 1px; width: 100%;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(255,255,255,.55) 50%,
    transparent 100%);
  margin: 4px 0 2px;
}
.a7n-stack__meta {
  font-size: 12px;
  font-weight: 500;
  opacity: .88;
  margin-top: 10px;
  display: flex; gap: 8px; align-items: center;
  font-variant-numeric: tabular-nums;
}
.a7n-stack__meta svg { width: 13px; height: 13px; opacity: .85; }

/* Arrows */
.a7n-stack__arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in oklch, hsl(var(--base-100)) 85%, transparent);
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 14%, transparent);
  backdrop-filter: blur(10px) saturate(1.4);
  color: hsl(var(--base-content));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
  padding: 0;
}
.a7n-stack__arrow svg { width: 22px; height: 22px; }
[dir="ltr"] .a7n-stack__arrow.is-prev svg { transform: scaleX(-1); }
[dir="rtl"] .a7n-stack__arrow.is-next svg { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
  .a7n-stack__arrow:hover { transform: translateY(-50%) scale(1.08); }
}
.a7n-stack__arrow:active {
  transform: translateY(-50%) scale(.92);
  transition: transform 100ms cubic-bezier(0.23, 1, 0.32, 1);
}
.a7n-stack__arrow.is-prev { inset-inline-start: 8px; }
.a7n-stack__arrow.is-next { inset-inline-end: 8px; }

/* Dots */
.a7n-stack__dots {
  position: absolute; left: 0; right: 0; bottom: -22px;
  display: flex; justify-content: center; gap: 6px;
  z-index: 5;
}
.a7n-stack__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: color-mix(in oklch, hsl(var(--base-content)) 22%, transparent);
  border: none; padding: 0; cursor: pointer;
  transition: width 240ms cubic-bezier(0.23, 1, 0.32, 1),
              background 240ms ease-out;
}
.a7n-stack__dot.is-on { width: 22px; border-radius: 4px; background: hsl(var(--primary)); }

@media (max-width: 720px) {
  .a7n-stack__card { width: 86%; }
  .a7n-stack__card.is-prev,
  .a7n-stack__card.is-next { opacity: 0; pointer-events: none; }
  .a7n-stack__arrow { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .a7n-stack__card { transition: none; }
}

/* ─── Breadcrumb ─── */
.a7n-bc {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; font-size: 13px;
  padding: 0 4px; margin: 2px 0 12px;
  color: hsl(var(--base-content));
}
.a7n-bc__a {
  opacity: .55;
  text-decoration: none;
  color: inherit;
  transition: opacity .18s ease-out;
}
.a7n-bc__a:hover { opacity: 1; }
.a7n-bc__sep { opacity: .3; }
.a7n-bc__cur { font-weight: 600; opacity: .9; }

/* ─── Section title row ─── */
.a7n-titlerow {
  display: flex; align-items: center; gap: 16px;
  padding: 0 8px; margin: 32px 0 18px;
}
.a7n-titlerow__line {
  flex: 1; height: 1px;
}
/* Solid near the title, transparent toward the OUTER edge (LTR + RTL). */
.a7n-titlerow__line:first-child { background: linear-gradient(to left,  color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
.a7n-titlerow__line:last-child  { background: linear-gradient(to right, color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
[dir="rtl"] .a7n-titlerow__line:first-child { background: linear-gradient(to right, color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
[dir="rtl"] .a7n-titlerow__line:last-child  { background: linear-gradient(to left,  color-mix(in oklch, hsl(var(--base-content)) 22%, transparent), transparent); }
.a7n-titlerow__t {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ─── Category chips ─── */
.a7n-cats {
  display: flex; gap: 8px; justify-content: safe center;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 12px 4px;
}
.a7n-cats::-webkit-scrollbar { display: none; }
.a7n-chip {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  flex: 0 0 auto;   /* keep natural width — never compress/overlap; the row scrolls-x instead */
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 14%, transparent);
  background: transparent;
  font: 600 13.5px inherit;
  color: inherit;
  padding: 8px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: background .18s ease-out,
              border-color .18s ease-out,
              transform .22s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  .a7n-chip:hover {
    background: color-mix(in oklch, hsl(var(--base-content)) 7%, transparent);
    border-color: color-mix(in oklch, hsl(var(--base-content)) 24%, transparent);
  }
}
.a7n-chip:active { transform: scale(.96); transition: transform 100ms; }
.a7n-chip.is-on {
  background: hsl(var(--primary));
  color: hsl(var(--primary-content, var(--base-100)));
  border-color: hsl(var(--primary));
}

/* ─── Hairline divider ─── */
.a7n-hr {
  height: 1px;
  border: 0;
  width: 100%;
  max-width: 440px;
  margin: 22px auto;
  background: linear-gradient(90deg, transparent, color-mix(in oklch, hsl(var(--base-content)) 22%, transparent) 50%, transparent);
}

/* ─── Search toolbar ─── */
.a7n-toolbar {
  display: flex; gap: 10px; align-items: center;
  justify-content: center;            /* centered under the centered title + chips */
  padding: 0 12px; margin-bottom: 22px;
  min-height: 44px;                   /* A7Boot: zone never collapses */
}
.a7n-search {
  width: min(560px, 100%);            /* balanced centered field, not shoved to one side */
  position: relative;
}
.a7n-search__ic {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-end: 14px;
  width: 16px; height: 16px;
  opacity: .45;
  pointer-events: none;
  display: inline-flex;
  align-items: center; justify-content: center;
}
.a7n-search__ic svg { width: 16px; height: 16px; }
.a7n-search__input {
  width: 100%;
  background: hsl(var(--base-100));
  color: hsl(var(--base-content));
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 14%, transparent);
  padding: 11px 40px 11px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .18s ease-out, box-shadow .18s ease-out;
}
[dir="ltr"] .a7n-search__input { padding: 11px 40px 11px 16px; }
[dir="rtl"] .a7n-search__input { padding: 11px 16px 11px 40px; }
.a7n-search__input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px color-mix(in oklch, hsl(var(--primary)) 18%, transparent);
}

/* ═══════ Grid — editorial featured-first layout ═══════
   Replaces the generic 3-col equal grid.
   First card spans 2 cols on desktop with a tall hero image.
   Remaining cards fall into a 3-col compact grid.
*/
.a7n-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) {
  .a7n-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  .a7n-grid .a7n-card--hero {
    grid-column: 1 / -1;
    flex-direction: row;
    padding: 0;
    overflow: hidden;
    gap: 0;
    align-items: stretch;
  }
  .a7n-grid .a7n-card--hero .a7n-card__img {
    width: 52%;
    height: clamp(200px, 24vw, 280px);
    border-radius: 0;
    flex-shrink: 0;
  }
  .a7n-grid .a7n-card--hero .a7n-card__body {
    flex: 1;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }
  .a7n-grid .a7n-card--hero .a7n-card__title {
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.4;
    letter-spacing: -0.015em;
    -webkit-line-clamp: 4;
    margin-bottom: 14px;
  }
  .a7n-grid .a7n-card--hero .a7n-card__meta {
    font-size: 13px;
  }
}
@media (min-width: 980px) {
  .a7n-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Card (default — compact horizontal) ─── */
.a7n-card {
  position: relative;             /* anchor for .a7n-card__share */
  display: flex; flex-direction: row; gap: 14px;
  align-items: flex-start;
  padding: 12px;
  background: hsl(var(--base-100));
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 10%, transparent);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  /* Slower transitions — Emil: spatial movement reads better at 240–280ms */
  transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 240ms cubic-bezier(0.23, 1, 0.32, 1),
              border-color 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Circular share button — opens A7Share frosted sheet targeting /n/<id>.
   Top-trailing corner of every card; sits over the cover image so it stays
   visible on long headlines. Hover lifts, press squashes — mirrors .a7sc tile. */
.a7n-card__share {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  z-index: 4;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  padding: 0;
  border-radius: 999px;
  background: color-mix(in oklch, hsl(var(--base-100)) 78%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
          backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 16%, transparent);
  color: hsl(var(--base-content));
  cursor: pointer;
  opacity: .88;
  box-shadow: 0 4px 10px -4px color-mix(in oklch, hsl(var(--base-content)) 22%, transparent);
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1),
              opacity 180ms ease-out, background .18s, border-color .18s;
}
.a7n-card__share svg { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
  .a7n-card__share:hover {
    opacity: 1;
    transform: scale(1.08);
    background: hsl(var(--base-100));
    border-color: color-mix(in oklch, hsl(var(--base-content)) 30%, transparent);
  }
}
.a7n-card__share:active {
  transform: scale(.92);
  transition: transform 100ms cubic-bezier(0.23, 1, 0.32, 1);
}
.a7n-card__share:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklch, hsl(var(--primary)) 35%, transparent);
}

/* Hero card share sits a touch further in so it doesn't collide with crown/ribbon */
.a7n-card--hero .a7n-card__share { top: 14px; inset-inline-end: 14px; }

/* Stack share — top-trailing of the ACTIVE coverflow card. Only show on the
   active card to avoid noise on the recessed peeks. */
.a7n-stack__share {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 6;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
          backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.32);
  color: #fff;
  cursor: pointer;
  opacity: 0;                       /* hidden on peeks */
  pointer-events: none;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1),
              opacity 220ms ease-out, background .18s;
}
.a7n-stack__share svg { width: 17px; height: 17px; }
.a7n-stack__card.is-active .a7n-stack__share { opacity: .95; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .a7n-stack__share:hover { transform: scale(1.08); background: rgba(0,0,0,.65); }
}
.a7n-stack__share:active { transform: scale(.92); }
@media (hover: hover) and (pointer: fine) {
  .a7n-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in oklch, hsl(var(--base-content)) 24%, transparent);
    box-shadow: 0 8px 22px -10px color-mix(in oklch, hsl(var(--base-content)) 24%, transparent);
  }
}
.a7n-card:active {
  transform: scale(.99);
  transition: transform 100ms cubic-bezier(0.23, 1, 0.32, 1);
}
.a7n-card__body { flex: 1; min-width: 0; }
.a7n-card__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.a7n-card__meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  font-weight: 500;
  opacity: .7;
  white-space: nowrap;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.a7n-card__meta > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.a7n-card__meta svg { width: 12px; height: 12px; opacity: .75; flex-shrink: 0; }
.a7n-card__meta .dot { opacity: .3; }
.a7n-card__img {
  width: 110px; height: 78px;
  flex-shrink: 0;
  border-radius: 10px;
  background-color: color-mix(in oklch, hsl(var(--base-content)) 8%, transparent);
  background-size: cover; background-position: center top;
}

/* ─── Pagination ─── */
.a7n-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 32px 0 4px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.a7n-pager__btn {
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 14%, transparent);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background .18s ease-out,
              border-color .18s ease-out,
              transform .22s cubic-bezier(0.23, 1, 0.32, 1);
}
.a7n-pager__btn:disabled { opacity: .4; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .a7n-pager__btn:not(:disabled):hover {
    background: color-mix(in oklch, hsl(var(--base-content)) 7%, transparent);
    border-color: color-mix(in oklch, hsl(var(--base-content)) 24%, transparent);
  }
}
.a7n-pager__btn:not(:disabled):active { transform: scale(.96); transition: transform 100ms; }
.a7n-pager__info { opacity: .65; font-weight: 500; }

/* Keyboard focus — visible ring on every interactive (keyboard-only via
   :focus-visible; outline so layout never shifts). a11y baseline. */
.a7n-chip:focus-visible,
.a7n-card:focus-visible,
.a7n-pager__btn:focus-visible,
.a7n-search input:focus-visible,
.a7n-share__btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* ════════════════════════════════════════════════════════════════════
   Section kill-switch closure — SHARED design with the Card Designer
   (.a7cs-* mirrors features/cards/public/deck.css verbatim) so every A7
   section's "coming back soon" screen is pixel-identical. Theme-aware.
   ════════════════════════════════════════════════════════════════════ */
.a7cs-wrap {
  --cs-accent:        hsl(var(--primary));
  --cs-accent-press:  color-mix(in oklch, hsl(var(--primary)) 82%, #000);
  --cs-accent-soft:   color-mix(in oklch, hsl(var(--primary)) 12%, transparent);
  --cs-text:          hsl(var(--base-content));
  --cs-muted:         color-mix(in oklch, hsl(var(--base-content)) 62%, transparent);
  --cs-faint:         color-mix(in oklch, hsl(var(--base-content)) 42%, transparent);
  --cs-surface-2:     hsl(var(--base-200));
  --cs-border:        color-mix(in oklch, hsl(var(--base-content)) 12%, transparent);
  --cs-border-strong: color-mix(in oklch, hsl(var(--base-content)) 18%, transparent);
  min-height: 74vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 22px;
  font-family: inherit;
  color: var(--cs-text);
  background: radial-gradient(120% 80% at 50% -10%,
    color-mix(in oklch, hsl(var(--base-content)) 5%, transparent), transparent 60%);
}
.a7cs-card { width: 100%; max-width: 560px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.a7cs-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: var(--cs-accent-soft); color: var(--cs-accent); font-size: 13px; font-weight: 700;
  margin-bottom: 30px; border: 1px solid color-mix(in oklch, hsl(var(--primary)) 22%, transparent);
}
.a7cs-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cs-accent); position: relative; }
.a7cs-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--cs-accent);
  animation: a7cs-pulse 1.8s cubic-bezier(.22,.61,.36,1) infinite;
}
@keyframes a7cs-pulse { 0% { transform: scale(1); opacity: .6 } 70% { transform: scale(3); opacity: 0 } 100% { opacity: 0 } }
.a7cs-iconwrap { position: relative; width: 128px; height: 128px; margin-bottom: 34px; display: flex; align-items: center; justify-content: center; }
.a7cs-ring { position: absolute; inset: 0; border-radius: 34px; border: 1.5px solid var(--cs-border-strong); animation: a7cs-floaty 5s ease-in-out infinite; }
.a7cs-ring--b { inset: -14px; border-radius: 42px; opacity: .5; animation-delay: .4s; }
.a7cs-iconbox {
  width: 96px; height: 96px; border-radius: 28px;
  background: linear-gradient(155deg, hsl(var(--primary)), var(--cs-accent-press));
  display: flex; align-items: center; justify-content: center; color: hsl(var(--primary-content));
  box-shadow: 0 14px 34px -10px color-mix(in oklch, hsl(var(--primary)) 45%, transparent);
  animation: a7cs-floaty 5s ease-in-out infinite;
}
.a7cs-iconbox svg { width: 48px; height: 48px; }
@keyframes a7cs-floaty { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
.a7cs-title {
  font-family: inherit; font-weight: 800; font-size: clamp(22px, 3.8vw, 28px);
  line-height: 1.3; margin: 0 0 14px; letter-spacing: -.3px; color: var(--cs-text);
  text-wrap: balance;
}
.a7cs-sub { font-size: clamp(15px, 2.4vw, 18px); color: var(--cs-muted); line-height: 1.7; margin: 0 0 34px; max-width: 430px; }
.a7cs-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.a7cs-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 24px; border-radius: 14px;
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; border: none; font-family: inherit;
  transition: transform .08s, background .14s;
}
.a7cs-btn svg { width: 18px; height: 18px; }
.a7cs-wrap[dir="rtl"] .a7cs-btn svg { transform: scaleX(-1); }
.a7cs-btn:active { transform: scale(.97); }
.a7cs-btn--primary {
  background: hsl(var(--primary)); color: hsl(var(--primary-content));
  box-shadow: 0 6px 18px -4px color-mix(in oklch, hsl(var(--primary)) 55%, transparent);
}
.a7cs-btn--primary:hover { background: var(--cs-accent-press); }
.a7cs-progress { margin-top: 40px; width: 100%; max-width: 300px; }
.a7cs-bar { height: 6px; border-radius: 999px; background: var(--cs-surface-2); overflow: hidden; border: 1px solid var(--cs-border); }
.a7cs-fill { height: 100%; width: var(--cs-progress, 68%); border-radius: 999px; background: linear-gradient(90deg, hsl(var(--primary)), var(--cs-accent-press)); animation: a7cs-grow 2.4s cubic-bezier(.22,.61,.36,1) both; }
@keyframes a7cs-grow { from { width: 0 } to { width: var(--cs-progress, 68%) } }
.a7cs-lbl { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--cs-faint); }
@media (prefers-reduced-motion: reduce) {
  .a7cs-ring, .a7cs-iconbox, .a7cs-pulse::after, .a7cs-fill { animation: none !important; }
}

/* ═══════ Skeleton — matches card shape (image rect + 2 title lines + meta line) ═══════
   Replaces the previous bare 110px rectangle that didn't suggest the layout.
*/
.a7n-sk-card {
  display: flex; flex-direction: row; gap: 14px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid color-mix(in oklch, hsl(var(--base-content)) 10%, transparent);
  border-radius: 14px;
  background: hsl(var(--base-100));
}
.a7n-sk-card__img {
  width: 110px; height: 78px;
  border-radius: 10px;
  flex-shrink: 0;
}
.a7n-sk-card__body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.a7n-sk-card__line {
  height: 12px;
  border-radius: 6px;
}
.a7n-sk-card__line--t1 { width: 92%; }
.a7n-sk-card__line--t2 { width: 68%; }
.a7n-sk-card__line--meta {
  width: 44%;
  height: 10px;
  margin-top: 4px;
}
/* Hero skeleton — matches new horizontal full-width hero layout */
@media (min-width: 720px) {
  .a7n-sk-card.is-hero {
    grid-column: 1 / -1;
    flex-direction: row;
    padding: 0;
    overflow: hidden;
    gap: 0;
    align-items: stretch;
  }
  .a7n-sk-card.is-hero .a7n-sk-card__img {
    width: 52%;
    height: clamp(200px, 24vw, 280px);
    border-radius: 0;
    flex-shrink: 0;
  }
  .a7n-sk-card.is-hero .a7n-sk-card__body {
    flex: 1;
    padding: 22px 26px;
    justify-content: center;
  }
  .a7n-sk-card.is-hero .a7n-sk-card__line--t1 { height: 16px; }
}

/* Shimmer */
.a7n-sk {
  background: linear-gradient(90deg,
    color-mix(in oklch, hsl(var(--base-content)) 7%, transparent) 25%,
    color-mix(in oklch, hsl(var(--base-content)) 14%, transparent) 50%,
    color-mix(in oklch, hsl(var(--base-content)) 7%, transparent) 75%);
  background-size: 200% 100%;
  animation: a7n-skel 1.4s ease-in-out infinite;
}
@keyframes a7n-skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) { .a7n-sk { animation: none; } }

/* ─── Empty state ─── */
.a7n-empty {
  padding: 64px 16px;
  text-align: center;
  opacity: .65;
  font-weight: 500;
  font-size: 14.5px;
}

/* ============ A7 Featured — Gold Frame (shared a7- classes; port from shortcuts)
   The frame is drawn OUTSIDE the card via ::before/::after so the featured cell
   keeps the EXACT size + position of its grid siblings — the gold ring bleeds
   into the grid gap. --a7-radius matches .a7n-card (14px). --a7-page-bg defaults
   to the live theme bg so the gap colour auto-matches light/dark. */
.a7-featured{ position: relative; border-radius: var(--a7-radius); animation: a7-feat-bob 3.6s ease-in-out infinite; }
.a7-featured::before{                 /* animated gold ring (3px), bleeds 7px out */
  content:""; position:absolute; inset:-7px; z-index:0; pointer-events:none;
  border-radius: calc(var(--a7-radius) + 7px);
  background: linear-gradient(135deg,#ffe9a8,#f6b321,#d4881a,#ffe9a8);
  background-size: 300% 300%; animation: a7-goldflow 5s ease infinite;
  box-shadow: 0 16px 38px -14px rgba(214,150,20,.7);
}
.a7-featured::after{                  /* page-bg gap (4px) between ring and card */
  content:""; position:absolute; inset:-4px; z-index:1; pointer-events:none;
  border-radius: calc(var(--a7-radius) + 4px);
  background: var(--a7-page-bg, hsl(var(--base-100)));
}
.a7-featured__card{ position:relative; z-index:2; }
@keyframes a7-goldflow{ 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
@keyframes a7-feat-bob{ 0%,100%{ transform: scale(1) } 50%{ transform: scale(1.01) } }
.a7-featured__crown{
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  z-index: 8; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg,#ffe08a,#f6b321); color: #5a3c05;
  box-shadow: 0 6px 16px rgba(214,150,20,.55), inset 0 1px 0 rgba(255,255,255,.7);
  border: 3px solid var(--a7-page-bg, hsl(var(--base-100)));
}
.a7-featured__crown svg{ width: 24px; height: 24px; }
.a7-featured__ribbon{
  position: absolute; top: 0; left: 0; width: 128px; height: 128px;
  overflow: hidden; z-index: 6; pointer-events: none;
}
.a7-featured__ribbon span{
  position: absolute; top: 30px; left: -32px; width: 166px; text-align: center;
  transform: rotate(-45deg); white-space: nowrap;
  background: linear-gradient(90deg,#f6b321,#ffe08a,#f6b321); color: #5a3c05;
  font-weight: 800; font-size: 11px; padding: 7px 0; box-shadow: 0 4px 10px rgba(0,0,0,.28);
}
.a7-shine{ position: relative; overflow: hidden; }
.a7-shine::after{
  content: ""; position: absolute; top: -20%; left: -60%;
  width: 42%; height: 150%; z-index: 4; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg); animation: a7-shimmer 3.6s ease-in-out infinite;
}
@keyframes a7-shimmer{ 0%{left:-60%} 55%,100%{left:135%} }
@media (prefers-reduced-motion: reduce){
  .a7-featured, .a7-featured::before, .a7-shine::after{ animation: none; }
}
/* The hero ribbon stays on the DEFAULT top-left corner — same side as every
   other A7 section (apps/shortcuts/wallpapers all use top:0;left:0) so the
   "الأكثر تميّزاً" banner is consistent across the site in RTL. (No hero-only
   right-side override — that broke consistency and, via scaleX, mirrored text.) */
/* A featured article pinned to the hero slot: the gold FRAME (grid child) must
   span the full row so the big hero inside keeps its full width. */
@media (min-width: 720px) {
  .a7n-grid .a7-featured--hero { grid-column: 1 / -1; }
}

/* ── Ads woven into the news grid AS CARDS. News cards are now COMPACT
   horizontal rows (110×78 thumb + text, ~110px tall) — NOT 16/9 cover cards.
   A 16/9 aspect box ballooned to ~2× a card's height (it scales with column
   width while the card height is fixed), so the ad slot now simply matches the
   card row height: it stretches to its grid row and floors at the card height,
   never inflating the row. Children fill it via absolute inset-0. ────────── */
.a7n-ad {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  min-height: 112px;
  background: color-mix(in oklch, hsl(var(--base-content)) 5%, transparent);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px -8px rgba(0,0,0,.10);
}
/* Loading shine behind the ad — same effect as wallpapers, just retuned. */
.a7n-ad__sk {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to right, transparent,
    color-mix(in oklch, hsl(var(--base-content)) 20%, transparent), transparent);
  transform: translateX(-100%) skewX(-15deg);
  animation: a7n-ad-shine 2s linear infinite;
}
@keyframes a7n-ad-shine {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%)  skewX(-15deg); }
}
@media (prefers-reduced-motion: reduce) { .a7n-ad__sk { animation: none; } }
/* AdSense responsive ads (data-ad-format=auto) reserve ~280px and, once filled,
   set inline styles on <ins> that pull it back into flow — towering over the
   compact 122px article cards. Pin the WHOLE AdSense subtree (it nests the
   creative as <ins><div><iframe>) to the slot with !important so it can never
   exceed the card height, whatever AdSense injects inline. */
.a7n-ad .adsbygoogle {
  position: absolute !important; inset: 0 !important; z-index: 1;
  display: block !important; width: 100% !important; height: 100% !important;
  min-height: 0 !important;
}
.a7n-ad .adsbygoogle * { max-height: 100% !important; }
.a7n-ad iframe {
  position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important; max-height: 100% !important;
  border: 0 !important;
}
.a7n-ad__native { position: absolute; inset: 0; display: block; text-decoration: none; }
.a7n-ad__native img { width: 100%; height: 100%; display: block; object-fit: cover; }
.a7n-ad__cap {
  position: absolute; inset-inline: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.62), transparent);
  color: #fff; font-family: inherit;
}
/* Banner name — centered frosted pill (BANNER CTA standard). */
.a7n-ad__t {
  font-weight: 700; font-size: 13px; color: #fff;
  padding: 5px 16px; border-radius: 999px;
  background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(6px) saturate(1.4);
          backdrop-filter: blur(6px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: transform .15s ease, background .15s, border-color .15s;
}
.a7n-ad__native:hover .a7n-ad__t {
  transform: scale(1.07);
  background: rgba(0,0,0,.62);
  border-color: rgba(255,255,255,.55);
}
/* CTA line icon inside the pill — same icon theme as the dashboard.
   display:inline-block overrides any global svg{display:block} that would
   push the icon onto its own line. */
.a7n-ad__ti {
  display: inline-block;
  width: 15px; height: 15px;
  vertical-align: -3px;
  margin-inline-end: 6px;
}
.a7n-ad__b {
  background: hsl(var(--primary)); color: #fff;
  padding: 6px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
