:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --panel-border: #e8e8ea;
  --ink: #181a2a;
  --muted: #696a75;
  --muted-2: #3b3c4a;
  --accent: #4b6bfb;
  --line: #dcdddf;
  --quote-bg: #f6f6f7;
  --radius-lg: 12px;
  --radius-sm: 6px;
}

.mobile-app-banner {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(102px + env(safe-area-inset-bottom));
  }

  .mobile-app-banner {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 1000;
    display: grid;
    grid-template-columns: minmax(118px, 1fr) repeat(3, 44px);
    align-items: center;
    gap: 8px;
    min-height: 76px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid rgba(24, 26, 42, 0.06);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(24, 26, 42, 0.18);
  }

  .mobile-app-banner a {
    min-width: 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-app-banner-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #66ff69 0%, #7cf582 100%);
    color: #000000;
    font-family: "Plus Jakarta Sans", "Work Sans", sans-serif;
    font-size: clamp(24px, 7vw, 34px);
    font-weight: 800;
    line-height: 1;
  }

  .mobile-app-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 54px;
    border-radius: 14px;
  }

  .mobile-app-banner-icon img {
    display: block;
    max-width: 33px;
    max-height: 33px;
    object-fit: contain;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  color: var(--ink);
  font-family: "Work Sans", "Plus Jakarta Sans", system-ui, sans-serif;
}
body.theme-dark {
  color-scheme: dark;
  --bg-soft: #181a2a;
  --panel-border: rgba(255, 255, 255, 0.08);
  --ink: #ffffff;
  --muted: #b7b8c4;
  --muted-2: #d3d5df;
  --line: rgba(255, 255, 255, 0.12);
  --quote-bg: rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, #141624 0%, #10111a 100%);
}
a { color: inherit; text-decoration: none; }
.inline-dogpay-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}
.inline-dogpay-link:hover { color: #6e88ff; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; }

.post-header, .post-main, .footer-top, .footer-bottom {
  width: min(1216px, calc(100% - 48px));
  margin: 0 auto;
}
.post-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 32px 0 24px;
}
.brand, .footer-brand, .top-nav, .top-actions, .footer-legal, .article-meta, .author-meta {
  display: flex;
  align-items: center;
}
.brand, .footer-brand, .author-meta { gap: 12px; }
.brand-mark {
  display: block;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(24, 26, 42, 0.12);
}
.brand-copy strong, .brand-copy small, .footer-brand strong, .footer-brand small { display: block; }
.brand-copy strong, .footer-brand strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}
.brand-copy small, .footer-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
.top-nav { justify-content: center; gap: 36px; }
.top-nav a, .footer-links a, .footer-legal a { color: var(--muted-2); font-size: 16px; line-height: 24px; }
.top-nav a:hover, .footer-links a:hover, .footer-legal a:hover { color: #cfd6ff; }
.top-actions { gap: 12px; }

.auth-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.auth-link-primary {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
}
.search-box {
  display: flex;
  width: 166px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 5px;
  background: #f4f4f5;
  color: #a1a1aa;
}

.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.search-box svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.search-box input, .newsletter-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.mode-toggle { padding: 0; border: 0; background: transparent; }
.mode-track {
  display: inline-flex;
  width: 48px;
  height: 28px;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #e8e8ea;
}
.mode-thumb {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #4b6bfb;
  font-size: 12px;
}
body.theme-dark .search-box, body.theme-dark .mode-track, body.theme-dark .newsletter-card, body.theme-dark .newsletter-input { background: rgba(255,255,255,0.06); }
body.theme-dark .mode-thumb { transform: translateX(20px); background: var(--accent); color: #fff; }
body.theme-light .mode-thumb { transform: translateX(0); }
body.theme-light .auth-link, body.theme-light .top-nav a { color: var(--ink); }
.auth-link:hover, .auth-link:focus-visible { color: #cfd6ff; }

.post-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 32px 0 80px;
}
.post-content-layout {
  display: grid;
  width: min(1216px, 100%);
  grid-template-columns: minmax(0, 800px) 280px;
  justify-content: center;
  align-items: start;
  gap: 28px;
}
.post-article { width: min(800px, 100%); }
.floating-download-ad {
  position: sticky;
  top: 112px;
}
.floating-download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 18px 16px;
  border-radius: 25px;
  background: #66ff69;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.floating-download-logo {
  width: 174px;
  max-width: 100%;
  height: auto;
}
.floating-download-headline,
.floating-download-copy,
.floating-download-actions {
  display: flex;
  flex-direction: column;
}
.floating-download-headline {
  gap: 2px;
  color: #111111;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.28;
}
.floating-download-headline p,
.floating-download-copy p {
  margin: 0;
}
.floating-download-copy {
  gap: 2px;
  color: #111111;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}
.floating-download-brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.floating-download-brands img {
  height: 24px;
  width: auto;
  object-fit: contain;
}
.floating-download-brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 5px;
  background: #1c3f95;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.floating-download-actions {
  width: 100%;
  gap: 10px;
}
.floating-download-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 18px;
  border: 1.2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  background: rgba(33, 33, 33, 0.6);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.floating-download-button span {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
}
.floating-download-button strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.floating-download-button:hover {
  background: rgba(24, 24, 24, 0.72);
}
.article-heading { display: flex; flex-direction: column; gap: 20px; }
.article-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
h1, h2, h3, p, blockquote { margin-top: 0; }
.article-heading h1 { margin-bottom: 0; font-size: 36px; font-weight: 600; line-height: 40px; }
.article-meta { gap: 24px; color: var(--muted); font-size: 14px; }
.author-meta { gap: 8px; }
.author-meta img { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; }
.article-hero, .article-inline-image { width: 100%; border-radius: var(--radius-lg); object-fit: cover; }
.article-hero { height: 462px; margin-top: 32px; }
.article-body { display: flex; flex-direction: column; gap: 32px; padding-top: 32px; }
.article-body > p, .article-section p, .related-card p {
  color: var(--muted-2);
  font-family: "Source Serif 4", serif;
  font-size: 20px;
  line-height: 32px;
}
.article-list {
  margin: 0;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted-2);
  font-family: "Source Serif 4", serif;
  font-size: 20px;
  line-height: 32px;
}
.article-list li {
  padding-left: 4px;
}
.article-section h3 {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
.article-section { display: flex; flex-direction: column; gap: 16px; }
.article-section h2, .related-heading h2 { margin-bottom: 0; font-size: 24px; font-weight: 600; line-height: 28px; }
.article-quote {
  margin: 0;
  padding: 32px;
  border-left: 4px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--quote-bg);
  color: var(--ink);
  font-family: "Source Serif 4", serif;
  font-size: 24px;
  font-style: italic;
  line-height: 32px;
}
.related-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.related-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.related-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.related-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 24px -8px rgba(24, 26, 42, 0.08);
  overflow: hidden;
  min-height: 496px;
}
body.theme-dark .related-card {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}
.related-card-link {
  display: flex;
  height: 100%;
  min-height: 100%;
  flex-direction: column;
}
.related-image {
  width: calc(100% - 32px);
  height: 220px;
  margin: 16px;
  border-radius: 10px;
  object-fit: cover;
}
.related-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-height: 172px;
  padding: 0 24px 24px;
}
.related-copy > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 132px;
}
.related-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  color: var(--muted);
  font-size: 14px;
}
.related-meta > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.related-meta img {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
}
.related-meta strong {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}
.related-topic {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(75, 107, 251, 0.12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}
.related-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.28;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  min-height: calc(24px * 1.28 * 4);
}
.related-card time {
  color: var(--muted);
  font-size: 14px;
}
.ad-banner {
  display: flex;
  width: min(750px, 100%);
  min-height: 100px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  background: #e8e8ea;
  color: #696a75;
  text-align: center;
}
.ad-banner span { font-size: 14px; }
.ad-banner strong { font-size: 20px; font-weight: 600; }
.ad-banner small { font-size: 18px; }
.post-footer { padding-top: 64px; border-top: 1px solid #e8e8ea; background: var(--bg-soft); }
body.theme-dark .post-footer, body.theme-dark .footer-bottom { border-color: rgba(255,255,255,0.08); }
.footer-top { display: grid; grid-template-columns: 289px 1fr 392px; gap: 20px; }
.footer-top h3 {
  margin-bottom: 12px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
}
.footer-about p, .newsletter-card p {
  color: var(--muted);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  line-height: 24px;
}
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; }
.footer-links div { display: flex; flex-direction: column; gap: 8px; }
.newsletter-card { padding: 32px; border-radius: 12px; background: #fff; }
.newsletter-card h3, .newsletter-card p { text-align: center; }
.newsletter-card h3 {
  margin-bottom: 16px;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
}
.newsletter-card p {
  margin-bottom: 28px;
  color: #818181;
  font-size: 28px;
  line-height: 1.38;
}
.newsletter-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #97989f;
}
.newsletter-button {
  width: 100%;
  display: inline-flex;
  min-height: 78px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1px solid #dcdddf;
}
.footer-legal { gap: 24px; }

@media (max-width: 1180px) {
  .post-header { grid-template-columns: 1fr; justify-items: start; }
  .top-nav, .top-actions { flex-wrap: wrap; justify-content: flex-start; }
  .post-content-layout { grid-template-columns: minmax(0, 1fr); width: min(800px, 100%); }
  .floating-download-ad { display: none; }
  .footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .post-header, .post-main, .footer-top, .footer-bottom { width: calc(100% - 32px); }
  .post-header { gap: 20px; padding: 20px 0; }
  .top-nav { gap: 20px; flex-wrap: wrap; }
  .top-actions, .search-box { width: 100%; }
  .post-main { gap: 32px; padding: 20px 0 64px; }
  .article-heading h1 { font-size: 32px; line-height: 38px; }
  .article-hero { height: 320px; margin-top: 24px; }
  .article-body { gap: 24px; padding-top: 24px; }
  .article-body > p, .article-section p, .article-quote { font-size: 18px; line-height: 30px; }
  .article-section h2, .related-heading h2 { font-size: 22px; }
  .article-quote { padding: 24px; }
  .related-heading { align-items: start; flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .related-image {
    width: calc(100% - 24px);
    height: 200px;
    margin: 12px;
  }
  .related-copy {
    padding: 0 18px 18px;
  }
  .related-card h3 {
    font-size: 20px;
    line-height: 1.35;
  }
  .related-meta {
    align-items: start;
    flex-direction: column;
  }
  .footer-links, .footer-bottom { gap: 24px; }
  .footer-bottom { align-items: start; flex-direction: column; }
}
