/* Guides and the blog: calm, long-form reading pages in the site's paper-and-felt look. Mobile first.
   Every image has its size set, so nothing shifts as tiles load; tiles below the fold load lazily.
   Felt is flat (design.md: no gradients); gold is the Score's gold, used sparingly for emphasis.
   #quick-answer and .article-body h2 are speakable selectors in the page's JSON-LD: keep them. */

.social-body[data-social-page="article"],
.social-body[data-social-page="articles"] {
  --article-ink: #1f2925;
  --article-soft: #3d4a44;
  --article-felt: #1d4f37;
  --article-felt-ink: #f3f0e8;
  --article-felt-muted: #c9d8cd;
  --article-gold: #f2c94c;
  --article-gold-deep: #8a5f0c;
  --article-gold-wash: #fbf3dc;
  --article-gold-line: rgba(196, 150, 40, 0.42);
  --article-card: var(--paper);
  --article-line: rgba(27, 39, 34, 0.12);
  --article-line-strong: rgba(27, 39, 34, 0.28);
  --article-measure: 68ch;
  --article-radius: 16px;
}

/* ------------------------------------------------------------------ frame */

.article-crumbs,
.article-layout,
.article-related,
.articles-hero,
.articles-list,
.articles-pages,
.articles-feed,
.articles-empty {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.article-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.article-crumbs a {
  color: var(--green-dark);
  font-weight: 600;
}

.article-crumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.article {
  min-width: 0;
  max-width: var(--article-measure);
  color: var(--article-ink);
  font-size: 1.0625rem;
  line-height: 1.72;
  overflow-wrap: break-word;
}

/* ------------------------------------------------------------------ header */

.article-head {
  margin-bottom: 28px;
}

.article-eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(55, 113, 89, 0.1);
  font: 700 0.74rem / 1 "Google Sans Flex", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article h1 {
  margin: 0;
  color: var(--ink);
  font: 850 clamp(2rem, 1.4rem + 2.6vw, 3.1rem) / 1.08 "Google Sans Flex", sans-serif;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.article-byline span:first-child {
  color: var(--article-soft);
  font-weight: 600;
}

.article-byline-dot {
  opacity: 0.6;
}

/* The direct answer: what an answer engine quotes. */
.article-answer {
  margin: 24px 0 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--article-gold-line);
  border-left: 4px solid var(--article-gold);
  border-radius: var(--article-radius);
  background: var(--article-gold-wash);
}

.article-answer-label {
  margin: 0 0 8px;
  color: var(--article-gold-deep);
  font: 800 0.74rem / 1 "Google Sans Flex", sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-dek {
  margin: 0;
  color: var(--article-ink);
  font: 600 1.16rem / 1.5 "Google Sans Flex", sans-serif;
  letter-spacing: -0.005em;
}

/* ------------------------------------------------------------------ table of contents */

.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.article-toc li {
  counter-increment: toc;
}

.article-toc a {
  display: grid;
  grid-template-columns: 1.6em minmax(0, 1fr);
  padding: 6px 0;
  color: var(--article-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}

.article-toc a::before {
  content: counter(toc);
  color: var(--muted);
  font: 700 0.8rem / 1.75 "Google Sans Flex", sans-serif;
  font-variant-numeric: tabular-nums;
}

.article-toc a:hover,
.article-toc a:focus-visible {
  color: var(--green-dark);
}

.article-toc-inline {
  margin: 0 0 28px;
  border: 1px solid var(--article-line);
  border-radius: 14px;
  background: var(--article-card);
}

.article-toc-inline summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  cursor: pointer;
  font: 700 0.95rem / 1.2 "Google Sans Flex", sans-serif;
  list-style: none;
}

.article-toc-inline summary::-webkit-details-marker {
  display: none;
}

.article-toc-inline summary::after,
.article-faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-left: 16px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--muted);
  transform: translateY(-3px) rotate(45deg);
}

.article-toc-inline[open] summary::after,
.article-faq details[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.article-toc-inline ol {
  padding: 0 16px 12px;
}

.article-rail {
  display: none;
}

.article-toc-title {
  margin: 0 0 8px;
  color: var(--muted);
  font: 700 0.74rem / 1 "Google Sans Flex", sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ body */

.article-body > :first-child {
  margin-top: 0;
}

.article-body h2 {
  margin: 2.1em 0 0.5em;
  color: var(--ink);
  font: 800 clamp(1.45rem, 1.2rem + 1vw, 1.8rem) / 1.2 "Google Sans Flex", sans-serif;
  letter-spacing: -0.02em;
  text-wrap: balance;
  scroll-margin-top: 88px;
}

.article-body h3 {
  margin: 1.7em 0 0.35em;
  color: var(--ink);
  font: 750 1.2rem / 1.3 "Google Sans Flex", sans-serif;
  scroll-margin-top: 88px;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1.05em;
}

.article-body ul,
.article-body ol {
  padding-left: 1.35em;
}

.article-body li + li {
  margin-top: 0.4em;
}

.article-body li::marker {
  color: var(--green);
  font-weight: 700;
}

.article-body strong {
  color: var(--ink);
  font-weight: 700;
}

.article-body a:not(.cta):not(.article-embed),
.article-faq a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(40, 86, 65, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body a:not(.cta):not(.article-embed):hover,
.article-faq a:hover {
  text-decoration-color: currentColor;
}

/* Callouts: a quiet card with a round badge. */
.article-callout {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 1.6em 0;
  padding: 16px 18px;
  border: 1px solid rgba(55, 113, 89, 0.22);
  border-radius: 14px;
  background: rgba(55, 113, 89, 0.07);
}

.article-callout p {
  margin: 0;
}

.article-callout-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font: 800 0.82rem / 1 "Google Sans Flex", sans-serif;
}

.article-callout-note {
  border-color: var(--article-gold-line);
  background: var(--article-gold-wash);
}

.article-callout-note .article-callout-icon {
  color: #3a2a06;
  background: var(--article-gold);
  font-style: italic;
  font-family: Georgia, serif;
}

.article-callout-label {
  margin-right: 6px;
  color: var(--green-dark);
  font: 800 0.76rem / 1 "Google Sans Flex", sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.article-callout-note .article-callout-label {
  color: var(--article-gold-deep);
}

/* Tiles and scored hands sit on flat felt, like the table. */
.article-tiles,
.article-hand {
  margin: 1.8em 0;
  padding: 20px;
  border-radius: var(--article-radius);
  color: var(--article-felt-ink);
  background: var(--article-felt);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.article-tiles figcaption,
.article-hand figcaption {
  margin-top: 14px;
  color: var(--article-felt-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.article-tiles figcaption a,
.article-hand figcaption a {
  color: var(--article-felt-ink);
}

.article-tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.article-tiles .article-tile-row {
  justify-content: center;
}

.article-tile-row img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
  aspect-ratio: 256 / 352;
}

.article-hand-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.article-hand-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

.article-hand-label {
  color: var(--article-felt-muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.article-hand-equation {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font: 850 1.4rem / 1.2 "Google Sans Flex", sans-serif;
  font-variant-numeric: tabular-nums;
}

.article-hand-equation > span[aria-hidden] {
  color: var(--article-felt-muted);
  font-weight: 600;
}

/* The app's score colors: Chips blue, Mult red, the Score gold. */
.article-chips {
  color: #8cc4ff;
}

.article-mult {
  color: #ff8f7a;
}

.article-score {
  color: var(--article-gold);
  font-size: 1.15em;
}

.article-body .article-hand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
}

.article-body .article-hand-pills li {
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

/* Lesson and puzzle embeds: one clickable card each. */
.article-embed {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 1.6em 0;
  padding: 12px 18px 12px 12px;
  border: 1px solid var(--article-line);
  border-radius: var(--article-radius);
  background: var(--article-card);
  color: var(--article-ink);
  text-decoration: none;
}

.article-embed:hover,
.article-embed:focus-visible {
  border-color: var(--article-line-strong);
}

.article-embed-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 128px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--article-felt);
}

.article-embed-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-embed-play {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--article-felt);
  background: rgba(255, 255, 255, 0.92);
  font: 800 0.95rem / 1 "Google Sans Flex", sans-serif;
}

.article-embed-puzzle .article-embed-play {
  color: #3a2a06;
  background: var(--article-gold);
}

.article-embed-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.35;
}

.article-embed small {
  color: var(--green);
  font: 700 0.72rem / 1 "Google Sans Flex", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-embed strong {
  font: 750 1.05rem / 1.3 "Google Sans Flex", sans-serif;
}

.article-embed-text span {
  color: var(--muted);
  font-size: 0.9rem;
}

.article-embed-go {
  color: var(--green-dark);
  font-weight: 700;
}

.article-cta-row {
  margin: 1.8em 0;
}

.article-cta-row .cta,
.article-play-button {
  display: inline-flex;
  justify-content: center;
  width: auto;
  min-height: 52px;
  padding: 12px 26px;
  font-weight: 800;
}

/* ------------------------------------------------------------------ FAQ */

.article-faq {
  margin-top: 3em;
}

.article-faq h2 {
  margin: 0 0 0.7em;
  color: var(--ink);
  font: 800 clamp(1.45rem, 1.2rem + 1vw, 1.8rem) / 1.2 "Google Sans Flex", sans-serif;
  letter-spacing: -0.02em;
}

.article-faq-list {
  display: grid;
  gap: 8px;
}

.article-faq details {
  border: 1px solid var(--article-line);
  border-radius: 14px;
  background: var(--article-card);
}

.article-faq details[open] {
  border-color: var(--article-line-strong);
}

.article-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 18px;
  cursor: pointer;
  color: var(--ink);
  font: 700 1.02rem / 1.4 "Google Sans Flex", sans-serif;
  list-style: none;
}

.article-faq summary::-webkit-details-marker {
  display: none;
}

.article-faq details p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--article-soft);
}

.article-faq summary:focus-visible,
.article-toc-inline summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 12px;
}

/* ------------------------------------------------------------------ the Play card */

.article-play {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 3em;
  padding: 24px;
  border-radius: 20px;
  color: var(--article-felt-ink);
  background: var(--article-felt);
}

.article-play-tiles {
  display: flex;
  gap: 4px;
}

.article-play-tiles img {
  display: block;
  width: 36px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  aspect-ratio: 256 / 352;
}

.article-play-tiles img:nth-child(4) {
  margin-left: 10px;
}

.article-play h2 {
  margin: 0;
  font: 850 1.5rem / 1.15 "Google Sans Flex", sans-serif;
  letter-spacing: -0.02em;
}

.article-play p {
  margin: 6px 0 0;
  color: var(--article-felt-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.article-play .article-play-button {
  justify-self: start;
  border-color: var(--article-gold);
  color: #2b1f04;
  background: var(--article-gold);
  box-shadow: none;
}

/* ------------------------------------------------------------------ Keep reading and the index cards */

.article-related {
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--article-line);
}

.article-related h2 {
  margin: 0 0 16px;
  font: 800 1.35rem / 1.2 "Google Sans Flex", sans-serif;
  letter-spacing: -0.02em;
}

.article-related ul,
.articles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-related a,
.articles-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--article-line);
  border-radius: var(--article-radius);
  background: var(--article-card);
  color: var(--article-ink);
  text-decoration: none;
}

.article-related a:hover,
.articles-card:hover,
.article-related a:focus-visible,
.articles-card:focus-visible {
  border-color: var(--article-line-strong);
}

.article-related small,
.articles-type {
  color: var(--green);
  font: 700 0.72rem / 1 "Google Sans Flex", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-related strong {
  font: 750 1.08rem / 1.3 "Google Sans Flex", sans-serif;
  letter-spacing: -0.01em;
}

.article-related-dek,
.articles-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.articles-more {
  margin-top: auto;
  padding-top: 4px;
  color: var(--green-dark);
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 700;
}

/* ------------------------------------------------------------------ the index */

.articles-hero {
  padding: 8px 0 4px;
}

.articles-hero-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font: 700 0.76rem / 1 "Google Sans Flex", sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.articles-hero h1 {
  margin: 0;
  max-width: 18ch;
  color: var(--ink);
  font: 850 clamp(2.1rem, 1.5rem + 3vw, 3.4rem) / 1.04 "Google Sans Flex", sans-serif;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.articles-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.articles-card h2 {
  margin: 0;
  color: var(--ink);
  font: 800 1.25rem / 1.25 "Google Sans Flex", sans-serif;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* The newest post (or first guide) leads, on felt. */
.articles-featured {
  grid-column: 1 / -1;
}

.articles-featured .articles-card {
  gap: 12px;
  padding: clamp(22px, 4vw, 36px);
  border-color: transparent;
  color: var(--article-felt-ink);
  background: var(--article-felt);
}

.articles-featured .articles-card:hover,
.articles-featured .articles-card:focus-visible {
  border-color: var(--article-gold-line);
}

.articles-featured .articles-meta,
.articles-featured .articles-card p {
  color: var(--article-felt-muted);
}

.articles-featured .articles-type {
  color: var(--article-gold);
}

.articles-featured .articles-card h2 {
  max-width: 24ch;
  color: #fff;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.articles-featured .articles-card p {
  max-width: 60ch;
  font-size: 1.04rem;
}

.articles-featured .articles-more {
  color: var(--article-gold);
}

.articles-pages {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.articles-pages a[rel="next"] {
  justify-self: end;
}

.articles-pages a,
.articles-feed a,
.articles-empty a {
  color: var(--green-dark);
  font-weight: 700;
}

.articles-feed,
.articles-empty {
  margin: 0;
  color: var(--muted);
}

.articles-empty {
  padding: 24px;
  border: 1px dashed var(--article-line-strong);
  border-radius: var(--article-radius);
}

/* ------------------------------------------------------------------ focus and motion */

.article-related a:focus-visible,
.articles-card:focus-visible,
.article-embed:focus-visible,
.article-toc a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .article-related a,
  .articles-card,
  .article-embed {
    transition: border-color 160ms ease, transform 160ms ease;
  }

  .article-related a:hover,
  .articles-card:hover,
  .article-embed:hover {
    transform: translateY(-2px);
  }

  .article-toc-inline summary::after,
  .article-faq summary::after {
    transition: transform 160ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ------------------------------------------------------------------ wide screens */

@media (min-width: 640px) {
  .article-play {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 28px 30px;
  }

  .article-play-tiles {
    grid-column: 1 / -1;
  }

  .article-play .article-play-button {
    justify-self: end;
  }
}

@media (min-width: 1100px) {
  .article-layout.has-toc {
    grid-template-columns: minmax(0, var(--article-measure)) 220px;
    gap: 56px;
    justify-content: start;
  }

  .article-layout.has-toc .article-toc-inline {
    display: none;
  }

  .article-rail {
    display: block;
    min-width: 0;
  }

  .article-toc-side {
    position: sticky;
    top: 32px;
    padding-left: 16px;
    border-left: 1px solid var(--article-line);
  }

  .article-toc-side a {
    padding: 5px 0;
    font-size: 0.88rem;
  }
}

/* ------------------------------------------------------------------ phones: a 16px gutter, nothing wider than the screen */

@media (max-width: 900px) {
  .social-body[data-social-page="article"] main.social-main,
  .social-body[data-social-page="articles"] main.social-main {
    padding-inline: 16px;
  }
}

@media (max-width: 560px) {
  .article {
    font-size: 1rem;
  }

  .article-dek {
    font-size: 1.06rem;
  }

  .article-answer {
    padding: 16px;
  }

  .article-tiles,
  .article-hand {
    padding: 14px;
  }

  .article-tile-row img {
    width: 34px;
  }

  .article-embed {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding-right: 14px;
  }

  .article-embed-media {
    width: 88px;
  }

  .article-embed-go {
    display: none;
  }

  .article-play {
    padding: 20px;
  }

  .article-play .article-play-button {
    justify-self: stretch;
  }

  .articles-pages {
    font-size: 0.86rem;
  }
}
