/* ========================================================================
   ZIPD — electric news. Mobile-first, system fonts, no external deps.
   ======================================================================== */

:root {
  /* Core palette — near-black canvas, electric accents */
  --bg:        #0a0a0b;
  --bg-2:      #121214;
  --card:      #161619;
  --card-edge: #232328;
  --ink:       #f4f4f5;
  --ink-soft:  #a1a1aa;
  --ink-faint: #6b6b73;

  /* Electric accents */
  --zap:       #d4ff3f;   /* signature acid-lime */
  --zap-deep:  #b6e600;
  --hot:       #ff2d78;   /* hot magenta */
  --cool:      #2dd4ff;   /* electric cyan */

  /* Tag colors */
  --tag-world:    #ff2d78;
  --tag-tech:     #2dd4ff;
  --tag-markets:  #d4ff3f;
  --tag-politics: #b388ff;
  --tag-science:  #4ade80;

  --radius:    16px;
  --radius-sm: 9px;
  --shadow:    0 8px 30px rgba(0,0,0,.45);
  --maxw:      640px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto,
          Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo,
          Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* subtle electric glow bleeding from the top */
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(212,255,63,.07), transparent 60%),
    radial-gradient(80% 50% at 100% 0%, rgba(255,45,120,.06), transparent 55%);
  background-attachment: fixed;
}

/* ----------------------------- Header ----------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,11,.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--card-edge);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 18px calc(14px - 2px);
  padding-top: max(14px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wordmark {
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: -.04em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-style: italic;          /* leans forward = speed */
  transform: skewX(-3deg);
}
.wordmark-z {
  color: var(--zap);
  text-shadow: 0 0 18px rgba(212,255,63,.55);
}
.wordmark-bolt {
  font-style: normal;
  font-size: .9em;
  margin-left: .04em;
  color: var(--zap);
  filter: drop-shadow(0 0 8px rgba(212,255,63,.6));
}

.header-date {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ------------------------------ Feed ------------------------------------ */
.feed {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 14px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ------------------------------ Card ------------------------------------ */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 16px 16px 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise .4s cubic-bezier(.2,.7,.2,1) both;
}
.card::before {
  /* electric edge accent on the left */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--accent, var(--zap)), transparent);
  opacity: .9;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Tag pill */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0a0a0b;
  background: var(--accent, var(--zap));
  margin-bottom: 10px;
}

/* Headline */
.headline {
  margin: 0 0 12px;
  font-size: 1.32rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

/* THE ZIPD block — the hero */
.zipd {
  position: relative;
  background:
    linear-gradient(180deg, rgba(212,255,63,.10), rgba(212,255,63,.03));
  border: 1px solid rgba(212,255,63,.28);
  border-radius: var(--radius-sm);
  padding: 12px 13px 13px;
  margin-bottom: 14px;
}
.zipd-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--zap-deep);
  margin-bottom: 6px;
}
.zipd-label::before {
  content: "⚡";
  font-size: .9em;
  filter: drop-shadow(0 0 6px rgba(212,255,63,.7));
}
.zipd-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #eafbc2;
  font-weight: 450;
}

/* Source rows */
.sources-label {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 2px 6px;
}
.sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each source is a quiet block: outlet pill + 2-3 sentence summary.
   Deliberately lower-contrast than THE ZIPD so the eye lands there first. */
.source {
  display: block;
  padding: 11px 13px 13px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  background: #ffffff05;
  border: 1px solid var(--card-edge);
  border-left: 2px solid #2c2c33;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
  -webkit-tap-highlight-color: transparent;
}
.source:hover,
.source:focus-visible {
  background: var(--bg-2);
  border-left-color: var(--accent, var(--zap));
  outline: none;
}
.source:active { transform: scale(.995); }

.source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.outlet {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 3px 9px;
  border-radius: 6px;
  background: #ffffff0f;
  border: 1px solid var(--card-edge);
  color: var(--ink);
  white-space: nowrap;
}

.source-summary {
  margin: 0;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.source-arrow {
  flex: none;
  color: var(--ink-faint);
  font-size: 1rem;
  transition: transform .15s ease, color .15s ease;
}
.source:hover .source-arrow,
.source:focus-visible .source-arrow {
  color: var(--accent, var(--zap));
  transform: translate(2px, -2px);
}

/* ----------------------------- Footer ----------------------------------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 18px calc(28px + env(safe-area-inset-bottom));
  color: var(--ink-faint);
  font-size: .74rem;
  text-align: center;
}
.footer p { margin: 0; }

/* --------------------------- Skeleton/Load ------------------------------ */
.skeleton-wrap { display: flex; flex-direction: column; gap: 18px; }
.skeleton-card {
  height: 220px;
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, var(--card) 30%, #1d1d22 50%, var(--card) 70%);
  background-size: 200% 100%;
  border: 1px solid var(--card-edge);
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* ------------------------------ States ---------------------------------- */
.state {
  text-align: center;
  padding: 48px 22px;
  margin: 12px auto;
  max-width: 420px;
}
.state-bolt {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 14px rgba(212,255,63,.6));
  display: block;
  margin-bottom: 10px;
}
.state h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.state p { margin: 0 0 18px; color: var(--ink-soft); font-size: .92rem; }
.state button {
  font: inherit;
  font-weight: 700;
  color: #0a0a0b;
  background: var(--zap);
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .01em;
  box-shadow: 0 0 22px rgba(212,255,63,.35);
}
.state button:active { transform: translateY(1px); }

/* --------------------------- Wider screens ------------------------------ */
@media (min-width: 720px) {
  .headline { font-size: 1.5rem; }
  .feed { padding-top: 24px; }
}

/* --------------------------- Reduced motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  .card, .skeleton-card { animation: none; }
  .source, .source-arrow { transition: none; }
}
