/* EyeNewz web feed — NewsBreak-level polish, EyeNewz brand */

:root {
  --accent: #e30613;
  --accent-deep: #b5050f;
  --accent-soft: rgba(227, 6, 19, 0.08);
  --ink: #111827;
  --ink-muted: #6b7280;
  --ink-subtle: #9ca3af;
  --bg: #f2f3f5;
  --surface: #ffffff;
  --border: #e5e7eb;
  --nav-width: 220px;
  --rail-width: 300px;
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.feed-app {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  outline: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Shell: flush left nav + dense columns —— */
.app-shell {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 680px) var(--rail-width);
  gap: 1.75rem;
  justify-content: center;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  align-items: start;
  width: 100%;
  min-height: 100vh;
}

/* —— Left nav (flush sticky strip) —— */
.left-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  background: var(--surface);
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  margin-left: calc(-1 * min(1.25rem, 4vw));
  padding-left: min(1.25rem, 4vw);
}

.left-nav-inner {
  padding: 1.25rem 1rem 1.5rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-height: 100%;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  padding: 0.15rem 0.5rem 0.25rem;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.95;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(227, 6, 19, 0.22);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-subtle);
  letter-spacing: 0.01em;
  padding-left: 0.15rem;
}

.guest-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.5rem;
}

.guest-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, #eef0f3, #e2e5ea);
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.guest-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.guest-meta strong {
  font-size: 0.92rem;
}

.guest-meta span {
  font-size: 0.72rem;
  color: var(--ink-subtle);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.nav-link {
  appearance: none;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.62rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-link:hover {
  background: #f3f4f6;
}

.nav-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 650;
}

.btn-signin {
  appearance: none;
  border: none;
  width: calc(100% - 0.5rem);
  margin: 0.15rem 0.25rem 0;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.btn-signin:hover {
  background: #000;
  transform: translateY(-1px);
}

.nav-about {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.nav-heading {
  margin: 0 0 0.45rem;
  padding: 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.nav-about a {
  display: block;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  color: var(--ink-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.nav-about a:hover {
  background: #f5f6f8;
  color: var(--ink);
  text-decoration: none;
}

/* —— Center feed —— */
.feed-main {
  min-width: 0;
  padding-top: 1.15rem;
}

.feed-header {
  margin-bottom: 0.85rem;
  padding: 0 0.15rem;
}

.feed-header h1 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.feed-sub {
  margin: 0.3rem 0 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.trust-strip {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-subtle);
}

.market-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0.35rem 0.55rem;
}

.market-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

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

.market-soon {
  font-size: 0.68rem;
  color: var(--ink-subtle);
  padding-left: 0.2rem;
}

.consent-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 250;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #111827;
  color: #f9fafb;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
  line-height: 1.45;
}

.consent-bar p {
  margin: 0;
  flex: 1 1 220px;
}

.consent-bar a {
  color: #fca5a5;
}

.consent-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.consent-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.consent-essential {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid #4b5563;
}

.consent-accept {
  background: #fff;
  color: #111827;
}

.feed-status {
  padding: 1.75rem 1.25rem;
  text-align: center;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feed-status[hidden] {
  display: none;
}

.feed-status.is-error {
  color: var(--accent-deep);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* —— Article cards (social-style) —— */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}

.article-card:hover {
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
}

.article-body {
  padding: 0.95rem 1.05rem 0.9rem;
}

.article-publisher {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.pub-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.pub-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.25;
}

.pub-meta strong {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
}

.pub-meta span {
  font-size: 0.78rem;
  color: var(--ink-subtle);
}

.article-media {
  display: block;
  margin: 0 1.05rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #e8eaee;
  overflow: hidden;
  max-height: 360px;
  aspect-ratio: 16 / 9;
}

.article-media img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  outline: none;
  transition: transform 0.35s var(--ease);
}

.article-card:hover .article-media img {
  transform: scale(1.02);
}

.article-headline {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.article-headline a {
  color: inherit;
  text-decoration: none;
}

.article-headline a:hover {
  color: var(--accent);
}

.article-summary {
  margin: 0 0 0.85rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.15rem;
  border-top: 1px solid #f0f1f3;
  margin-top: 0.15rem;
  padding-top: 0.7rem;
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.icon-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.icon-btn svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.icon-btn:hover {
  background: #f3f4f6;
  color: var(--ink);
  text-decoration: none;
}

.icon-btn.is-liked {
  color: var(--accent);
}

.action-source {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
}

.action-source:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.feed-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.btn-load-more {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.btn-load-more:hover {
  border-color: #c9ced6;
  transform: translateY(-1px);
}

.btn-load-more:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/* —— Right rail —— */
.right-rail {
  position: sticky;
  top: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1.15rem;
}

.rail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.rail-app-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.rail-app-head img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(227, 6, 19, 0.2);
}

.rail-app-head h2 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.rail-card > h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.rail-kicker {
  margin: 0 0 0.85rem !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  font-weight: 700;
}

.rail-card p {
  margin: 0 0 0.9rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.play-store-link {
  display: inline-block;
  line-height: 0;
}

.play-store-link:hover {
  text-decoration: none;
  opacity: 0.92;
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.why-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.65rem;
  align-items: start;
}

.why-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.why-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.why-copy strong {
  font-size: 0.9rem;
  font-weight: 650;
}

.why-copy span {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.rail-links {
  margin: 1rem 0 0 !important;
  font-size: 0.85rem !important;
}

/* —— Sign-in modal —— */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.48);
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: 18px;
  padding: 1.7rem 1.45rem 1.4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.modal-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.modal-legal {
  margin: 0 0 1.1rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.82rem 1rem;
  border-radius: 999px;
  border: 1px solid #d8dbe2;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s var(--ease);
}

.btn-google:hover {
  background: #f8f9fb;
  text-decoration: none;
}

.modal-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-subtle);
  line-height: 1.45;
}

body.modal-open {
  overflow: hidden;
}

/* —— Mobile —— */
.nav-toggle {
  display: none;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 120;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  position: relative;
  border-radius: 1px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: var(--nav-width) minmax(0, 1fr);
    gap: 1.25rem;
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(10, 12, 16, 0.4);
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 3.75rem 0.85rem 2rem;
    gap: 1rem;
    justify-content: stretch;
  }

  .left-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    width: min(288px, 88vw);
    height: 100vh;
    margin-left: 0;
    padding-left: 0;
    border-right: 1px solid var(--border);
    transform: translateX(-105%);
    transition: transform 0.22s var(--ease);
  }

  .left-nav-inner {
    padding: 1.25rem 1rem 1.5rem;
  }

  body.nav-open .left-nav {
    transform: translateX(0);
  }

  .feed-main {
    padding-top: 0.25rem;
  }

  .article-media {
    margin: 0 0.85rem 0.75rem;
    max-height: 240px;
  }

  .article-media img {
    max-height: 240px;
  }

  .article-body {
    padding: 0.85rem;
  }

  .right-rail {
    display: flex;
    position: static;
    padding-top: 0;
  }
}
