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

:root {
  --bg: #ffffff;
  --bg2: #f5f5f5;
  --bg3: #ebebeb;
  --surface: #ffffff;
  --border: #e5e5e5;
  --border2: #d0d0d0;
  --text: #000000;
  --text2: #333333;
  --text3: #666666;
  --accent: #c1d5a4;
  --accent2: #f8c8dc;
  --link: #000000;
  --sidebar: 280px;
  --topbar: 64px;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, .05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .08);
}

[data-theme="dark"] {
  --bg: #000000;
  --bg2: #0a0a0a;
  --bg3: #141414;
  --surface: #000000;
  --border: #222222;
  --border2: #333333;
  --text: #ffffff;
  --text2: #cccccc;
  --text3: #888888;
  --accent: #c1d5a4;
  --accent2: #f8c8dc;
  --link: #ffffff;
  --shadow: 0 4px 20px rgba(255, 255, 255, .02);
  --shadow-md: 0 8px 30px rgba(255, 255, 255, .05);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  transition: background .25s, color .25s;
}

/* ── TOP BAR ── */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--topbar);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  transition: background .25s;
}

#topbar .logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

#topbar .logo span {
  color: var(--accent)
}

#topbar .logo sub {
  font-size: 10px;
  color: var(--text3);
  font-family: var(--font-ui);
  letter-spacing: 2px;
  text-transform: uppercase;
  align-self: flex-end;
  padding-bottom: 3px
}

#topbar .topbar-center {
  flex: 1;
  display: flex;
  justify-content: center
}

#topbar .search-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
}

#topbar .search-wrap input {
  width: 100%;
  height: 34px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 0 36px 0 14px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--text);
  transition: all .2s;
  outline: none;
}

#topbar .search-wrap input::placeholder {
  color: var(--text3)
}

#topbar .search-wrap input:focus {
  border-color: var(--border2);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(193, 213, 164, .4)
}

#topbar .search-wrap .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
  font-size: 14px;
}

#topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  font-size: 15px;
}

.icon-btn:hover {
  background: var(--bg3);
  color: var(--text)
}

.icon-btn.active {
  color: var(--accent)
}

#menu-toggle {
  display: none
}

/* ── LAYOUT ── */
#layout {
  display: flex;
  padding-top: var(--topbar);
  min-height: 100vh;
}

/* ── SIDEBAR ── */
#sidebar {
  position: fixed;
  top: var(--topbar);
  left: 0;
  bottom: 0;
  width: var(--sidebar);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 0 40px;
  transition: transform .25s, background .25s;
  z-index: 90;
}

#sidebar::-webkit-scrollbar {
  width: 4px
}

#sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px
}

.sidebar-section {
  margin-bottom: 8px
}

.sidebar-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 8px 20px 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text2);
  cursor: pointer;
  border-radius: 0;
  transition: background .15s, color .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
}

.sidebar-item:hover {
  background: var(--bg2);
  color: var(--text)
}

.sidebar-item.active {
  color: var(--accent);
  background: var(--bg2)
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-item .cat-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0
}

.sidebar-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font-ui);
  padding: 1px 6px;
  border-radius: 9px;
}

.sidebar-item .item-actions {
  margin-left: auto;
  display: none;
  gap: 4px;
}

.sidebar-item:hover .item-actions {
  display: flex
}

.sidebar-item .item-actions button {
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}

.sidebar-item .item-actions button:hover {
  color: var(--text);
  background: var(--border)
}

.sidebar-add-btn {
  margin: 4px 16px;
  padding: 8px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
  width: calc(100% - 32px);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg2)
}

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(0, 0, 0, .4)
}

/* ── MAIN ── */
#main {
  margin-left: var(--sidebar);
  flex: 1;
  min-height: calc(100vh - var(--topbar));
  display: flex;
  flex-direction: column;
}

/* ── CATEGORY HEADER ── */
#cat-header {
  border-bottom: 1px solid var(--border);
  padding: 28px 40px 20px;
  position: sticky;
  top: var(--topbar);
  background: var(--bg);
  z-index: 50;
  transition: background .25s;
}

#cat-header h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text);
  line-height: 1.15;
}

#cat-header .cat-sub {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
  letter-spacing: .3px;
}

.cat-date-rule {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}

/* ── FEED GRID ── */
#feed-area {
  padding: 32px 40px 80px;
  flex: 1
}

.feed-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0;
  color: var(--text3);
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 14px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

/* Hero article */
.hero-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow .3s, transform .3s, border-color .3s;
}

.hero-article:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent)
}

.hero-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
  background: var(--bg3);
}

.hero-img-placeholder {
  min-height: 280px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.hero-body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.article-source {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-source .source-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border2);
  display: inline-block;
}

.hero-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.3px;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-body p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text3);
}

.article-meta .read-time {
  display: flex;
  align-items: center;
  gap: 4px
}

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

.art-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: color .15s, background .15s;
}

.art-btn:hover {
  background: var(--bg3);
  color: var(--text)
}

.art-btn.saved {
  color: var(--accent)
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: box-shadow .3s, transform .3s, border-color .3s;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent)
}

.card-img-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s
}

.article-card:hover .card-img {
  transform: scale(1.03)
}

.card-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text3);
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.2px;
  color: var(--text);
  margin-bottom: 8px;
}

.card-body p {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.card-footer .source-chip {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--accent);
}

.card-footer .time {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text3);
  margin-left: auto;
}

/* Horizontal list articles */
.article-list-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity .15s;
}

.article-list-item:hover {
  opacity: .8
}

.article-list-item:last-child {
  border-bottom: none
}

.list-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg3);
}

.list-thumb-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--bg3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.list-body {
  flex: 1;
  min-width: 0
}

.list-body h4 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-body p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text3);
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 20px;
}

.section-divider h2 {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider::before {
  display: none
}

/* ── ARTICLE READER ── */
#reader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  overflow-y: auto;
  transition: background .25s;
}

#reader.open {
  display: block
}

#reader-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background .25s;
}

#reader-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--text2);
  cursor: pointer;
  background: none;
  border: none;
  transition: color .15s;
  padding: 6px 0;
}

#reader-back:hover {
  color: var(--accent2)
}

#reader-back svg {
  width: 16px;
  height: 16px
}

#reader-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 300;
  width: 0%;
  transition: width .1s;
}

#reader-topbar .reader-actions {
  margin-left: auto;
  display: flex;
  gap: 6px
}

.reader-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 40px 120px
}

.reader-source {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reader-content h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.reader-deck {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  color: var(--text2);
  line-height: 1.55;
  margin-bottom: 24px;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.reader-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text3);
}

.reader-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 32px;
  display: block;
}

.reader-body {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.78;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.reader-body img,
.reader-body video,
.reader-body figure {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  margin: 1.5em 0;
  display: block;
}

.reader-body p {
  margin-bottom: 1.4em
}

.reader-body h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 1.6em 0 .6em;
  color: var(--text);
}

.reader-body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 3px solid var(--accent);
  background: var(--bg2);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text2);
  font-size: 18px;
}

.reader-body a {
  color: var(--link)
}

.reader-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin: 24px 0;
}

.reader-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.reader-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0;
}

.reader-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .2s;
}

.reader-gallery img:hover {
  opacity: .9
}

.reader-gallery .full-width {
  grid-column: 1/-1;
  height: 280px
}

.reader-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
  transition: background .15s;
  word-break: break-all;
}

.reader-link:hover {
  background: var(--bg2)
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  transform: translateY(8px);
  transition: transform .2s, background .25s;
  box-shadow: var(--shadow-md);
}

.modal-overlay.open .modal {
  transform: translateY(0)
}

.modal h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.modal-field {
  margin-bottom: 16px
}

.modal-field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}

.modal-field input,
.modal-field select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  appearance: none;
}

.modal-field input:focus,
.modal-field select:focus {
  border-color: var(--accent)
}

.modal-field input::placeholder {
  color: var(--text3)
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 8px;
  background: var(--bg2);
  border-radius: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.emoji-opt {
  font-size: 20px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background .15s;
  border: 2px solid transparent;
}

.emoji-opt:hover {
  background: var(--bg3)
}

.emoji-opt.selected {
  border-color: var(--accent);
  background: var(--bg3)
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: flex-end
}

.btn {
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid transparent;
}

.btn-ghost {
  background: none;
  border-color: var(--border);
  color: var(--text2)
}

.btn-ghost:hover {
  background: var(--bg2);
  border-color: var(--border2)
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent)
}

.btn-primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #000
}

.btn-danger {
  background: none;
  border-color: #e74c3c;
  color: #e74c3c
}

.btn-danger:hover {
  background: #e74c3c;
  color: #fff
}

/* ── EMPTY STATES ── */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  font-family: var(--font-ui);
  color: var(--text3);
}

.empty-state .es-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 8px
}

.empty-state p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto
}

/* ── RESPONSIVE ── */
@media(max-width:900px) {
  :root {
    --sidebar: 0px
  }

  #sidebar {
    transform: translateX(-280px);
    width: 280px
  }

  #sidebar.open {
    transform: translateX(0)
  }

  #sidebar-overlay {
    display: block
  }

  #main {
    margin-left: 0
  }

  #menu-toggle {
    display: flex
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .hero-article {
    grid-template-columns: 1fr
  }

  .hero-img,
  .hero-img-placeholder {
    min-height: 200px
  }

  #feed-area {
    padding: 24px 20px 80px
  }

  #cat-header {
    padding: 20px 20px 16px
  }

  #cat-header h1 {
    font-size: 26px
  }

  .reader-content {
    padding: 32px 20px 100px
  }

  .reader-content h1 {
    font-size: 28px
  }

  .reader-body {
    font-size: 17px
  }
}

@media(max-width:600px) {
  .article-grid {
    grid-template-columns: 1fr
  }

  #topbar .search-wrap {
    display: none
  }
}

/* Animations */
.fade-in {
  animation: fadeIn .35s ease both
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.stagger-1 {
  animation-delay: .05s
}

.stagger-2 {
  animation-delay: .1s
}

.stagger-3 {
  animation-delay: .15s
}

.stagger-4 {
  animation-delay: .2s
}

/* Tooltip */
[data-tip] {
  position: relative
}

[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-ui);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 999;
}