:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --ink: #211c18;
  --muted: #5f564d;
  --line: #d8d0c4;
  --accent: #ff7a00;
  --accent-ink: #903800;
  --panel: #fffdf8;
  --shell: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 1.25rem;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.09;
  text-wrap: balance;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.085em;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid #a44300;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  left: var(--gutter);
  transform: translateY(-200%);
  border-radius: 0.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.65rem 1rem;
}

.skip-link:focus {
  transform: none;
}

.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  font-size: 1.16rem;
  font-weight: 850;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.brand img {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.article-cover {
  width: 100%;
  height: auto;
  margin-block-end: 2rem;
  border-radius: var(--radius);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.55rem, 2.2vw, 1.5rem);
  font-size: 0.875rem;
  font-weight: 700;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.site-nav a:not(.pill-link):hover,
.site-footer a:hover,
.breadcrumbs a:hover {
  text-decoration: underline;
}

.pill-link,
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  border: 1px solid transparent;
  border-radius: 2rem;
  background: var(--accent);
  color: #21170e;
  padding: 0.55rem 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.pill-link:hover,
.store-button:hover {
  background: #ffab59;
}

.intro {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
  padding-block: clamp(2.8rem, 5.6vw, 5rem) clamp(1.8rem, 3.5vw, 2.75rem);
}

.section-label,
.tag {
  width: fit-content;
  font-size: 0.71rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent-ink);
}

.section-label::before {
  width: 1.4rem;
  height: 2px;
  background: var(--accent);
  content: "";
}

.intro h1 {
  max-width: 19ch;
  font-size: clamp(2.65rem, 6.6vw, 5.55rem);
  font-weight: 800;
  letter-spacing: -0.047em;
}

.intro-copy {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.85vw, 1.25rem);
  text-wrap: pretty;
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: stretch;
  border: 1px solid #ead2b8;
  border-radius: var(--radius);
  background: #fbe6cf;
}

.featured-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  padding: clamp(1.35rem, 4vw, 3rem);
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tag-line, #b88d65);
  border-radius: 1rem;
  background: var(--tag-paper, #fff4e3);
  color: #3b2f25;
  padding: 0.38rem 0.65rem;
}

.featured h2 {
  font-size: clamp(1.85rem, 3.6vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.043em;
}

.featured h2 a,
.post-card h3 a {
  text-decoration: none;
}

.featured h2 a:hover,
.post-card h3 a:hover {
  text-decoration: underline;
}

.featured-copy p {
  max-width: 45ch;
  color: #554438;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  text-wrap: pretty;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.read-link:hover {
  color: var(--accent-ink);
}

.featured-art {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 19rem;
  margin: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #dcb997;
}

.featured-art img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.article-list {
  padding-block: clamp(2.75rem, 4.5vw, 3.75rem) clamp(3rem, 7vw, 6rem);
}

.list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.95rem;
}

.list-heading h2,
.related h2 {
  font-size: clamp(1.65rem, 3.5vw, 2.55rem);
  font-weight: 820;
  letter-spacing: -0.04em;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.65vw, 1.25rem);
}

.post-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  gap: 0.75rem;
  min-width: 0;
  border: 1px solid var(--card-line, #ded1c1);
  border-radius: var(--radius);
  background: var(--card-paper, var(--panel));
  padding: clamp(1.05rem, 2.3vw, 1.65rem);
}

.post-card h3 {
  font-size: clamp(1.23rem, 2vw, 1.67rem);
  font-weight: 790;
  letter-spacing: -0.032em;
}

.post-card p {
  color: var(--muted);
  font-size: 0.965rem;
  text-wrap: pretty;
}

.card-meta {
  color: var(--muted);
  padding-top: 0.45rem;
  font-size: 0.815rem;
  font-weight: 650;
}

[data-category="growth"] {
  --card-paper: #fcf0e1;
  --card-line: #e9cfad;
  --tag-line: #c49e76;
  --tag-paper: #fff8ee;
}

[data-category="posture"] {
  --card-paper: #e9eee2;
  --card-line: #cbd6bf;
  --tag-line: #9aa98c;
  --tag-paper: #f4f7ef;
}

[data-category="sleep"] {
  --card-paper: #eeebf4;
  --card-line: #d7cce3;
  --tag-line: #b2a4c4;
  --tag-paper: #f8f4fc;
}

[data-category="nutrition"] {
  --card-paper: #f9eee5;
  --card-line: #e7d2c2;
  --tag-line: #c4a896;
  --tag-paper: #fff7f2;
}

[data-category="tracking"] {
  --card-paper: #e9eff3;
  --card-line: #c9d7e0;
  --tag-line: #a0b0bd;
  --tag-paper: #f4f8fa;
}

.article-shell {
  width: min(calc(100% - var(--gutter) * 2), 47rem);
  margin-inline: auto;
  padding-block: clamp(1.6rem, 5vw, 3.5rem) clamp(3rem, 8vw, 6rem);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 660;
}

.article-header {
  display: grid;
  justify-items: start;
  gap: 1.1rem;
  margin-block: clamp(1.8rem, 5.5vw, 3.8rem) 2.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.7rem;
}

.article-header h1 {
  font-size: clamp(2.35rem, 6.6vw, 4.9rem);
  font-weight: 800;
  letter-spacing: -0.043em;
}

.article-lede {
  color: var(--muted);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.article-body {
  color: #332c25;
  font-size: clamp(1rem, 2.1vw, 1.135rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.article-body section + section {
  margin-top: 2.1rem;
}

.article-body h2 {
  margin-bottom: 0.55rem;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.031em;
}

.article-body p + p,
.article-body ul,
.article-body ol {
  margin-top: 0.8rem;
}

.article-figure {
  margin: 1.25rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.article-body ul,
.article-body ol {
  margin-bottom: 0.85rem;
  padding-left: 1.6rem;
}

.article-body li + li {
  margin-top: 0.42rem;
}

.sources a {
  color: var(--accent-ink);
}

.download-box {
  display: grid;
  justify-items: start;
  gap: 0.7rem;
  margin-block: clamp(2.25rem, 5vw, 3.5rem);
  border-radius: var(--radius);
  background: #211b16;
  color: #fff9ef;
  padding: clamp(1.3rem, 4.6vw, 2.4rem);
}

.download-box h2 {
  color: inherit;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  font-weight: 820;
  letter-spacing: -0.04em;
}

.download-box p {
  max-width: 58ch;
  color: #f0dece;
  text-wrap: pretty;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.45rem;
  font-size: 0.9rem;
}

.store-button + .store-button {
  border-color: #baa996;
  background: transparent;
  color: #fff9ef;
}

.store-button + .store-button:hover {
  border-color: #fff9ef;
  background: #3c3027;
}

.download-box a:focus-visible {
  outline-color: #fff9ef;
}

.sources {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  color: var(--muted);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.sources h2 {
  margin-bottom: 0.6rem;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.sources ul {
  margin: 0;
  padding-left: 1.2rem;
}

.sources li + li {
  margin-top: 0.4rem;
}

.related {
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.45rem;
}

.related-links {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.related-links a {
  display: block;
  width: fit-content;
  padding-block: 0.25rem;
  font-weight: 730;
}

.related-links a:hover {
  color: var(--accent-ink);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  flex-wrap: wrap;
  padding-block: 1rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer a {
  font-weight: 660;
  text-decoration: none;
}

@media (max-width: 53rem) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 38rem) {
  .featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-art {
    grid-row: 1;
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .featured-copy {
    gap: 0.75rem;
  }
}

@media (max-width: 29rem) {
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    gap: 0.65rem;
    min-height: 4.3rem;
  }

  .brand {
    gap: 0.4rem;
    font-size: 1rem;
  }

  .brand img {
    width: 1.75rem;
    height: 1.75rem;
  }

  .site-nav {
    gap: 0.4rem 0.65rem;
    font-size: 0.79rem;
  }

  .pill-link {
    padding-inline: 0.65rem;
  }
}
