/* ═══════════════════════════════════════════════════════════
   AMCH Blog — amch.ltd aesthetic × Telegraph minimalism
   Font: Outfit (closest free match to Gilroy)
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:            #0f1011;
  --bg-elevated:   #161718;
  --bg-card:       #1a1b1c;
  --bg-surface:    #0a0a0b;

  --accent:        #1de227;
  --accent-dim:    rgba(29, 226, 39, 0.10);
  --accent-hover:  #17c420;

  --text:          #f5f5f7;
  --text-secondary:#9a9a9d;
  --text-muted:    #5e5e5e;

  --border:        rgba(245, 245, 247, 0.08);
  --border-strong: rgba(245, 245, 247, 0.14);
  --divider:       rgba(245, 245, 247, 0.05);

  --max-width:     1200px;
  --content-width: 680px;
  --header-height: 56px;

  --radius:        10px 0 10px 0;   /* TL BR rounded, TR BL sharp — AMCH signature */
  --radius-sm:     6px 0 6px 0;

  --ease:          cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);

  --font:          'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: 400;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Grain Overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ── Container ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; }

/* ── Typography (Gilroy-inspired: geometric, tight) ── */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
}
h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}


/* ══════════════════════════════════════
   HEADER
   ══════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 990;
  height: var(--header-height);
  background: rgba(15, 16, 17, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 20px;
}
.logo { display: flex; align-items: center; }
.logo-svg {
  height: 20px;
  width: auto;
  color: var(--text);
}
.main-nav { flex: 1; display: flex; justify-content: flex-end; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 1px;
  transition: 0.25s var(--ease);
}

/* ── CTA Button (amch.ltd: 1px green border, 10px radius, fw 400) ── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}
.btn-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── Language Switcher ── */
.lang-switcher { display: flex; gap: 1px; }
.lang-btn {
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.lang-btn:hover { color: var(--text-secondary); }
.lang-btn.active { color: var(--accent); font-weight: 600; }

/* ── Spacer for fixed header ── */
.main-content { padding-top: var(--header-height); min-height: calc(100vh - 200px); }


/* ══════════════════════════════════════
   HERO — Tile Slider
   ══════════════════════════════════════ */
.hero-section {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
}
.hero-slider {
  position: relative;
  overflow: hidden;
}
.hero-track {
  display: flex;
  gap: 16px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-tile {
  flex: 0 0 calc((100% - 32px) / 3);
  position: relative;
  border-radius: 12px 0 12px 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: block;
  text-decoration: none;
  color: #fff;
  background: var(--bg-elevated);
}
.hero-tile-img {
  position: absolute;
  inset: 0;
}
.hero-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.hero-tile:hover .hero-tile-img img {
  transform: scale(1.05);
}
.hero-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  gap: 8px;
}
.hero-tile-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.hero-tile-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-tile-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* Arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.hero-arrow:hover {
  background: rgba(0,0,0,0.7);
  border-color: rgba(255,255,255,0.4);
}
.hero-arrow-left { left: 12px; }
.hero-arrow-right { right: 12px; }

/* Dots */
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--text-muted);
  opacity: 0.3;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}
.hero-dot.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.2);
}


/* ══════════════════════════════════════
   SECTION + CATEGORY TABS
   ══════════════════════════════════════ */
.articles-section { padding: 40px 0 72px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-header h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.section-desc { color: var(--text-secondary); margin-top: 8px; width: 100%; font-size: 14px; }
.category-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.tab-btn {
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}
.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}


/* ══════════════════════════════════════
   ARTICLE FEED — Vertical list, Telegraph style
   ══════════════════════════════════════ */
.articles-grid {
  display: flex;
  flex-direction: column;
}
.article-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--divider);
  background: transparent;
  border-radius: 0;
}
.article-card:last-child { border-bottom: none; }
.card-image {
  order: 2;
  width: 140px;
  height: 88px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.article-card:hover .card-image img { transform: scale(1.03); }
.card-content {
  order: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-category {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: none;
  padding: 0;
  border-radius: 0;
  width: fit-content;
}
.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0;
}
.card-title a { transition: color 0.15s; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Grid for related articles */
.articles-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
.articles-grid-3 .article-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px;
  border-bottom: none;
  background: var(--bg);
}
.articles-grid-3 .card-image { order: 0; width: 100%; height: 140px; margin-bottom: 12px; }
.articles-grid-3 .card-content { order: 0; }


/* ══════════════════════════════════════
   ARTICLE PAGE — Pure reading
   ══════════════════════════════════════ */
.article-page { padding-bottom: 64px; }
.article-hero { margin-bottom: 0; }
.article-hero-img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 0;
}
.article-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
}
.article-header {
  padding-top: 40px;
  margin-bottom: 40px;
}
.article-header .card-category { margin-bottom: 14px; }
.article-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.article-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.article-meta span::before { content: none; }

/* ── Article Body ── */
.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 400;
}
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  color: var(--text);
  margin: 36px 0 14px;
  letter-spacing: -0.025em;
}
.article-body h2 { font-size: 1.25rem; font-weight: 700; }
.article-body h3 { font-size: 1.0625rem; font-weight: 600; }
.article-body p { margin-bottom: 22px; }
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(29, 226, 39, 0.25);
  transition: text-decoration-color 0.2s;
}
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body ul, .article-body ol { margin: 18px 0; padding-left: 18px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; padding-left: 4px; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 0 0 0 20px;
  margin: 28px 0;
  color: var(--text);
  font-size: 17px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.55;
}
.article-body pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}
.article-body code {
  background: var(--bg-surface);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.87em;
  color: var(--accent);
}
.article-body pre code { background: none; padding: 0; color: var(--text-secondary); }
.article-body img { border-radius: var(--radius-sm); margin: 28px 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 13px; }
.article-body th, .article-body td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.article-body th { font-weight: 600; color: var(--text); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Share ── */
.article-share {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-muted);
}
.share-btn {
  padding: 5px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all 0.2s ease-in-out;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Subscribe ── */
.subscribe-block {
  margin: 40px 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.subscribe-inner {
  padding: 28px;
  background: var(--bg-elevated);
}
.subscribe-inner h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.subscribe-inner p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}
.subscribe-form {
  display: flex;
  gap: 8px;
}
.subscribe-input {
  flex: 1;
  padding: 9px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-input:focus { border-color: var(--accent); }
.subscribe-input::placeholder { color: var(--text-muted); }
.subscribe-btn {
  padding: 9px 22px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
}
.subscribe-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.subscribe-msg {
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}
.subscribe-msg--ok {
  color: var(--accent);
  background: var(--accent-dim);
}
.subscribe-msg--err {
  color: #f44;
  background: rgba(255, 68, 68, 0.08);
}

/* ── Tags ── */
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.tag-link {
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 400;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all 0.2s ease-in-out;
}
.tag-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── Related ── */
.related-section { padding: 48px 0; border-top: 1px solid var(--border); }
.related-section h3 {
  margin-bottom: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}


/* ══════════════════════════════════════
   BREADCRUMBS
   ══════════════════════════════════════ */
.breadcrumbs { padding: 14px 0; }
.breadcrumbs .container { max-width: var(--content-width); }
.breadcrumbs ol { display: flex; gap: 5px; font-size: 11px; color: var(--text-muted); }
.breadcrumbs li::after { content: '/'; margin-left: 5px; color: var(--border-strong); }
.breadcrumbs li:last-child::after { content: none; }
.breadcrumbs a { color: var(--text-secondary); transition: color 0.15s; }
.breadcrumbs a:hover { color: var(--accent); }


/* ══════════════════════════════════════
   PAGINATION (legacy, kept for admin)
   ══════════════════════════════════════ */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 40px; }
.page-link {
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all 0.2s ease-in-out;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.active { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }

/* ══════════════════════════════════════
   INFINITE SCROLL
   ══════════════════════════════════════ */
.infinite-sentinel {
  display: flex;
  justify-content: center;
  padding: 40px 0;
  min-height: 60px;
}
.infinite-sentinel.loading .infinite-loader { opacity: 1; }

.infinite-loader {
  display: flex;
  gap: 6px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.infinite-sentinel .infinite-loader { opacity: 1; }
.infinite-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: infinite-bounce 1.2s ease-in-out infinite;
}
.infinite-loader span:nth-child(2) { animation-delay: 0.15s; }
.infinite-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes infinite-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Next Article Trigger ── */
.next-article-trigger {
  display: block;
  width: 100%;
  max-width: var(--content-width, 720px);
  margin: 0 auto;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  text-align: left;
  position: relative;
}
.next-article-trigger:hover {
  border-color: var(--accent);
  background: var(--bg-elevated, var(--bg-surface));
}
.next-article-trigger-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.next-article-trigger .next-article-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}
.next-article-trigger .next-article-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.next-article-trigger .next-article-arrow {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.3s;
}
.next-article-trigger:hover .next-article-arrow {
  transform: translateY(-50%) translateY(4px);
}

/* Loading state */
.next-article-trigger .next-article-loading {
  display: none;
  justify-content: center;
  padding: 8px 0;
}
.next-article-trigger .next-article-loading .infinite-loader { opacity: 1; }
.next-article-trigger.is-loading .next-article-trigger-inner { opacity: 0.3; }
.next-article-trigger.is-loading .next-article-loading { display: flex; }
.next-article-trigger.is-loading .next-article-arrow { display: none; }

/* ── Loaded Article Animation ── */
.next-article-wrapper {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.next-article-wrapper.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.loaded-article-divider {
  padding: 48px 0 0;
}
.loaded-article-divider hr {
  border: none;
  border-top: 1px solid var(--border);
  max-width: var(--content-width, 720px);
  margin: 0 auto;
}
.loaded-article .article-page { padding-top: 0; }
.loaded-article .article-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0;
  color: var(--text);
}


/* ══════════════════════════════════════
   SEARCH
   ══════════════════════════════════════ */
.search-header { margin-bottom: 36px; }
.search-header h1 { margin-bottom: 20px; }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-input {
  flex: 1;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }
.search-count { color: var(--text-muted); font-size: 12px; margin-bottom: 20px; }
.empty-state { text-align: center; padding: 72px 0; color: var(--text-muted); font-size: 14px; }


/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand .logo-svg { height: 18px; }
.footer-desc { color: var(--text-muted); font-size: 12px; line-height: 1.5; margin-bottom: 14px; }
.footer-links-row { display: flex; gap: 14px; }
.footer-links-row a {
  color: var(--accent);
  font-size: 11px;
  font-weight: 400;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.footer-links-row a:hover { border-bottom-color: var(--accent); }
.footer-col h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 3px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.store-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 400;
  transition: all 0.2s ease-in-out;
  margin-bottom: 5px;
}
.store-badge:hover { border-color: var(--accent); color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  font-size: 11px;
  color: var(--text-muted);
}


/* ══════════════════════════════════════
   DISCLAIMER
   ══════════════════════════════════════ */
.disclaimer {
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}
.disclaimer-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}
.disclaimer-toggle::-webkit-details-marker { display: none; }
.disclaimer-toggle::after {
  content: '+';
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease);
}
.disclaimer[open] .disclaimer-toggle { color: var(--text-secondary); }
.disclaimer[open] .disclaimer-toggle::after {
  content: '\2212';
  color: var(--accent);
}
.disclaimer-content {
  padding: 0 0 16px;
  animation: disclaimerReveal 0.3s var(--ease-out) both;
}
@keyframes disclaimerReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.disclaimer-content p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.disclaimer-content p:last-child { margin-bottom: 0; }
.disclaimer-content strong {
  color: var(--text-secondary);
  font-weight: 600;
}


/* ══════════════════════════════════════
   RESPONSIVE — Tablet
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-tile { flex: 0 0 calc((100% - 16px) / 2); }
  .hero-arrow { width: 36px; height: 36px; font-size: 20px; }
  .articles-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}


/* ══════════════════════════════════════════════════════════
   MOBILE — Ultra-minimal for in-app WebView
   Max focus on content. No visual noise.
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --header-height: 48px;
  }

  body { font-size: 14px; }
  body::before { display: none; } /* no grain on mobile — performance */

  .container { padding: 0 16px; }

  /* ── Compact header ── */
  .logo-svg { height: 16px; }
  .menu-toggle { display: flex; flex-direction: column; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: rgba(15, 16, 17, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-link {
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--divider);
    border-radius: 0;
  }
  .nav-link:hover { background: none; }
  .btn-cta {
    padding: 6px 14px;
    font-size: 12px;
  }
  .lang-btn { font-size: 11px; padding: 4px 6px; }

  /* ── Hero: Single tile on mobile ── */
  .hero-section { padding: 20px 0 16px; }
  .hero-tile { flex: 0 0 100%; aspect-ratio: 4 / 5; }
  .hero-tile-title { font-size: 1rem; }
  .hero-tile-overlay { padding: 16px; }
  .hero-arrow { width: 32px; height: 32px; font-size: 18px; }
  .hero-dots { margin-top: 12px; }

  /* ── Section ── */
  .articles-section { padding: 24px 0 48px; }
  .section-header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  .category-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 4px 11px; font-size: 11px; }

  /* ── Cards: Full-width text, no images ── */
  .article-card {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 16px 0;
  }
  .card-image { display: none; } /* hide images on mobile — text-only feed */
  .card-content { gap: 4px; }
  .card-category { font-size: 9px; letter-spacing: 0.1em; }
  .card-title { font-size: 15px; line-height: 1.3; }
  .card-excerpt {
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-height: 1.45;
    color: var(--text-muted);
  }
  .card-meta { font-size: 10px; gap: 8px; }

  /* ── Article page: Clean reading ── */
  .article-container { padding: 0 16px; }
  .article-header { padding-top: 24px; margin-bottom: 28px; }
  .article-header .card-category { margin-bottom: 10px; }
  .article-header h1 {
    font-size: 1.625rem;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: 14px;
  }
  .article-meta { font-size: 11px; gap: 10px; padding-top: 12px; }
  .article-body {
    font-size: 15px;
    line-height: 1.75;
  }
  .article-body h2 { font-size: 1.125rem; margin: 28px 0 12px; }
  .article-body h3 { font-size: 1rem; margin: 24px 0 10px; }
  .article-body p { margin-bottom: 18px; }
  .article-body blockquote {
    font-size: 15px;
    padding-left: 16px;
    margin: 24px 0;
  }
  .article-body pre { padding: 14px 16px; margin: 20px 0; font-size: 12px; }
  .article-body img { margin: 20px -16px; width: calc(100% + 32px); max-width: none; border-radius: 0; }
  .article-hero-img { max-height: 240px; }

  .subscribe-inner { padding: 20px 16px; }
  .subscribe-inner h4 { font-size: 15px; }
  .subscribe-inner p { font-size: 12px; margin-bottom: 12px; }
  .subscribe-form { flex-direction: column; gap: 8px; }
  .subscribe-input { padding: 10px 14px; font-size: 15px; }
  .subscribe-btn { padding: 10px; font-size: 14px; }
  .subscribe-block { margin: 28px 0; }

  .article-tags { gap: 4px; margin-top: 10px; }
  .tag-link { padding: 3px 9px; font-size: 10px; }

  .next-article-trigger { padding: 20px 16px; margin: 0 16px; }
  .next-article-trigger .next-article-title { font-size: 0.9375rem; }
  .next-article-trigger .next-article-arrow { right: 16px; font-size: 1.25rem; }
  .loaded-article-divider { padding: 36px 0 0; }
  .loaded-article .article-header h2 { font-size: 1.625rem; }

  .related-section { padding: 32px 0; }
  .articles-grid-3 { grid-template-columns: 1fr; background: transparent; }
  .articles-grid-3 .article-card {
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
    background: transparent;
  }
  .articles-grid-3 .card-image { display: none; }

  .breadcrumbs { padding: 10px 0; }
  .breadcrumbs ol { font-size: 10px; }

  .pagination { gap: 4px; margin-top: 28px; } /* legacy admin */
  .page-link { padding: 5px 10px; font-size: 11px; } /* legacy admin */

  .search-form { flex-direction: column; gap: 8px; }
  .search-input { padding: 10px 14px; font-size: 15px; border-radius: var(--radius); }

  /* ── Minimal footer on mobile ── */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  .footer-desc { font-size: 11px; }
  .footer-col h4 { font-size: 9px; margin-bottom: 8px; }
  .footer-col a { font-size: 12px; padding: 2px 0; }
  .footer-bottom { font-size: 10px; padding-top: 14px; }
}

/* ── Extra small: max density ── */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .article-header h1 { font-size: 1.375rem; }
  .article-body { font-size: 14px; line-height: 1.7; }
  .article-body img { margin: 16px -12px; width: calc(100% + 24px); }
  .btn-cta { padding: 5px 12px; font-size: 11px; }
}

/* ── Page load ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main-content { animation: fadeUp 0.35s var(--ease-out) both; }


/* ══════════════════════════════════════════════════════════
   MINI APP — Telegraph-like pure reading mode (?mini_app)
   No header, no footer, no noise. Just content.
   ══════════════════════════════════════════════════════════ */
.mini-app {
  background: #000;
}
.mini-app::before { display: none; } /* no grain */
.mini-app .main-content {
  padding-top: 0;
  min-height: 100vh;
}

/* ── Index: clean feed ── */
.mini-app .hero-section { display: none; }
.mini-app .articles-section { padding: 16px 0 32px; }
.mini-app .section-header { border-bottom: none; margin-bottom: 12px; padding-bottom: 8px; }
.mini-app .section-header h2 { display: none; }
.mini-app .category-tabs { gap: 4px; }
.mini-app .tab-btn { padding: 4px 10px; font-size: 11px; }
.mini-app .article-card { padding: 14px 0; gap: 0; grid-template-columns: 1fr; }
.mini-app .card-image { display: none; }
.mini-app .card-content { gap: 3px; }
.mini-app .card-category { font-size: 9px; }
.mini-app .card-title { font-size: 15px; }
.mini-app .card-excerpt { font-size: 12px; -webkit-line-clamp: 2; color: var(--text-muted); }
.mini-app .card-meta { font-size: 10px; }

/* ── Article: pure reading ── */
.mini-app .article-hero-img { max-height: 220px; }
.mini-app .article-container { padding: 0 16px; max-width: 100%; }
.mini-app .article-header { padding-top: 20px; margin-bottom: 24px; }
.mini-app .article-header h1 {
  font-size: 1.5rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.mini-app .article-meta { font-size: 11px; gap: 8px; padding-top: 10px; }
.mini-app .article-body {
  font-size: 15px;
  line-height: 1.7;
}
.mini-app .article-body h2 { font-size: 1.0625rem; margin: 24px 0 10px; }
.mini-app .article-body h3 { font-size: 1rem; margin: 20px 0 8px; }
.mini-app .article-body p { margin-bottom: 16px; }
.mini-app .article-body blockquote { font-size: 15px; padding-left: 14px; margin: 20px 0; }
.mini-app .article-body img {
  margin: 16px -16px;
  width: calc(100% + 32px);
  max-width: none;
  border-radius: 0;
}
.mini-app .subscribe-block { display: none; }
.mini-app .next-article-trigger { display: none; }
.mini-app .article-tags { margin-top: 24px; }
.mini-app .tag-link { padding: 3px 9px; font-size: 10px; }
.mini-app .article-page { padding-bottom: 32px; }

/* ── Related: minimal list ── */
.mini-app .related-section { padding: 24px 0; }
.mini-app .related-section .articles-grid { display: flex; flex-direction: column; }
.mini-app .related-section .article-card {
  grid-template-columns: 1fr;
  padding: 10px 0;
}
.mini-app .related-section .card-image { display: none; }

/* ── Pagination ── */
.mini-app .pagination { margin-top: 20px; }
.mini-app .page-link { padding: 5px 10px; font-size: 11px; }

/* ── Search ── */
.mini-app .search-header h1 { font-size: 1.25rem; margin-bottom: 14px; }
.mini-app .search-input { font-size: 15px; padding: 10px 14px; }

/* ── Breadcrumbs ── */
.mini-app .breadcrumbs { display: none; }
