/* ========= ABM Newsletter Landing Page — Sidebar + Tiles ========= */
:root {
  --bg: #071a12;
  --surface: #0c2318;
  --surface-2: #143a28;
  --surface-hover: #184430;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --brand: #0d7c4a;
  --brand-light: #10b981;
  --accent: #f59e0b;
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", "Segoe UI", Roboto, Arial, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  height: 100%;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { font: inherit; border: none; background: none; color: inherit; cursor: pointer; }
ul { list-style: none; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: rgba(7,26,18,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  z-index: 100;
}

.topbar__burger {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background .2s;
}
.topbar__burger:hover { background: var(--surface-2); }
.topbar__burger svg { width: 22px; height: 22px; }

.topbar__logo {
  width: 36px; height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(13,124,74,.3));
}

.topbar__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.topbar__sub {
  font-size: .78rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.shell {
  display: flex;
  height: 100%;
  padding-top: var(--topbar-h);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  padding: 20px 12px 32px;
  border-right: 1px solid rgba(255,255,255,.06);
  background: var(--surface);
  transition: transform .3s ease;
}

.sidebar__heading {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 12px;
}

/* Year folder */
.year { margin-bottom: 4px; }

.year__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  transition: background .2s;
}
.year__btn:hover { background: var(--surface-2); }

.year__btn svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--brand-light);
}

.year__chevron {
  width: 16px; height: 16px;
  margin-left: auto;
  color: var(--muted);
  transition: transform .25s ease;
  flex-shrink: 0;
}

.year.open > .year__btn .year__chevron { transform: rotate(90deg); }

/* Quarter list inside year */
.year__quarters {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.year.open > .year__quarters { max-height: 500px; }

.quarter-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 38px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: var(--muted);
  transition: background .2s, color .2s;
  cursor: pointer;
}
.quarter-link:hover { background: var(--surface-2); color: var(--ink); }
.quarter-link.active {
  background: var(--surface-2);
  color: var(--brand-light);
  font-weight: 600;
}

.quarter-link__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background .2s;
}
.quarter-link.active .quarter-link__dot { background: var(--brand-light); }

.quarter-link__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .7rem;
  color: rgba(148,163,184,.5);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 48px;
}

/* Content header */
.content-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.content-header__title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.content-header__sub {
  font-size: .88rem;
  color: var(--muted);
}

/* Empty / no-selection state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}

.empty-state svg {
  width: 56px; height: 56px;
  color: var(--surface-2);
  margin-bottom: 20px;
}

.empty-state__title {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-state__text {
  font-size: .88rem;
  max-width: 360px;
  line-height: 1.6;
}

/* ============================================================
   HORIZONTAL TILE  (YouTube-style)
   ============================================================ */
.tile-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tile {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  height: 160px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.tile:hover {
  border-color: rgba(13,124,74,.35);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  transform: translateY(-2px);
}

/* Thumbnail */
.tile__thumb {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.tile__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.tile:hover .tile__thumb img { transform: scale(1.05); }

.tile__badge {
  position: absolute;
  bottom: 10px; left: 10px;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  color: #fff;
}

.tile__pages {
  position: absolute;
  bottom: 10px; right: 10px;
  font-family: var(--mono);
  font-size: .65rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,.7);
  color: #fff;
}

/* Body */
.tile__body {
  padding: 14px 20px 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.tile__period {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--brand-light);
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.tile__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
}

.tile__desc {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.tile__stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.tile__stat-n {
  font-family: var(--mono);
  font-size: .9rem;
  font-weight: 700;
  color: var(--brand-light);
}

.tile__stat-l {
  font-size: .68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tile__cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-light);
  transition: gap .25s;
}
.tile:hover .tile__cta { gap: 10px; }
.tile__cta svg { width: 16px; height: 16px; }

/* ============================================================
   FOOTER (inside main scroll area)
   ============================================================ */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
}

.footer__line {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.8;
}

.footer__line a {
  color: var(--brand-light);
  text-decoration: underline;
  text-decoration-color: rgba(16,185,129,.3);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.footer__line a:hover { text-decoration-color: var(--brand-light); }

.footer__hearts {
  margin-top: 10px;
  font-size: .7rem;
  color: rgba(255,255,255,.2);
  letter-spacing: .06em;
  padding-bottom: 8px;
}

/* ============================================================
   OVERLAY (mobile sidebar)
   ============================================================ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(0,0,0,.5);
}
.overlay.visible { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .topbar__burger { display: flex; }

  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }

  .tile {
    grid-template-columns: 190px 1fr;
    height: 150px;
  }

  .main { padding: 20px 16px 40px; }
}

@media (max-width: 560px) {
  .tile {
    grid-template-columns: 1fr;
    height: auto;
  }

  .tile__thumb { height: 160px; }

  .tile__body { padding: 14px 16px 16px; overflow: hidden; }

  .topbar__sub { display: none; }
  .content-header__title { font-size: 1.3rem; }
}
