/*
 * Blog / article styling.
 *
 * The design is the client's advertorial export, matched value for value —
 * palette, weights, radii, the green CTA with its hard shadow. What changed is
 * only how it is delivered: the export carried its CSS inside the post content,
 * including a global `* { margin: 0 }` reset and `body` rules that reached the
 * site header and footer on any page it appeared, and it had to be pasted into
 * every new post. Here it lives in the theme, and every selector starts at
 * .t10-blog or below so nothing it does not own is touched.
 *
 * Light-only by design: the rest of the site is light, and an article that
 * flipped with the OS setting would not match its own header.
 */

.t10-blog {
  --t10-primary: #000000;
  --t10-accent: #00d632;
  --t10-accent-hover: #00b32a;
  --t10-accent-shadow: #009924;
  --t10-accent-tint: #f0fdf4;
  --t10-text: #333333;
  --t10-text-light: #666666;
  --t10-bg: #ffffff;
  --t10-bg-gray: #f4f4f5;
  --t10-measure: 768px;
}

/* ---------- host container reset ----------
 * Astra wraps every template in .ast-container, which carries its own max-width
 * and padding and becomes a flex row for sidebar layouts. These templates hold
 * their own measure, so the parent container is flattened — scoped to .t10-blog,
 * so no other page on the site is affected.
 */

.t10-blog .ast-container {
  max-width: none;
  width: 100%;
  padding-inline: 0;
  display: block;
}

.t10-blog #content .ast-container > .ast-row,
.t10-blog .site-content > .ast-container {
  margin-inline: 0;
}

.t10-blog #primary,
.t10-blog .t10-blog-primary {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* The site runs a dark ground to match the landing page, and Astra sets its
   text colour to suit. The advertorial design is a light page, so the content
   area paints its own — without this, near-black body copy lands on a near-black
   background and the headline disappears.
   Scoped to #content so the global header and the site footer keep their own
   dark styling; only the article sits on white. */
.t10-blog #content,
.t10-blog .site-content {
  background-color: var(--t10-bg);
  color: var(--t10-text);
}

.t10-blog .t10-wrap {
  max-width: var(--t10-measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.t10-blog .t10-wrap-wide {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- reading progress ---------- */

.t10-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  z-index: 9999;
  pointer-events: none;
}

.t10-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--t10-accent);
  transition: width 0.1s linear;
}

/* ---------- article ---------- */

.t10-article {
  color: var(--t10-text);
  line-height: 1.6;
  padding-block: 2rem 0;
}

.t10-article-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.t10-eyebrow {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t10-accent-shadow);
}

.t10-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.t10-eyebrow a:hover {
  text-decoration: underline;
}

.t10-article h1.t10-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--t10-primary);
  margin: 0;
  text-wrap: balance;
}

.t10-standfirst {
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.5;
  color: var(--t10-text-light);
  margin: 0;
}

.t10-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 1rem;
  border-top: 2px solid var(--t10-bg-gray);
  border-bottom: 2px solid var(--t10-bg-gray);
}

.t10-byline-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--t10-bg-gray);
}

.t10-byline-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t10-byline-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.t10-byline-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--t10-primary);
}

.t10-byline-meta {
  font-size: 0.875rem;
  color: var(--t10-text-light);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.t10-hero-figure {
  margin: 1.5rem 0 0;
}

.t10-hero-figure img,
.t10-article-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.t10-hero-figure figcaption,
.t10-article-body figcaption {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--t10-text-light);
  text-align: center;
  margin-top: 0.75rem;
}

/* ---------- article body ---------- *
 * Styles plain editor output, so a post with no CSS classes still reads right.
 */

.t10-article-body {
  padding-top: 2rem;
}

.t10-article-body p,
.t10-article-body ul,
.t10-article-body ol {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.t10-article-body ul,
.t10-article-body ol {
  padding-left: 1.5rem;
}

.t10-article-body li {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.t10-article-body h2 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: var(--t10-primary);
  margin: 2.5rem 0 1rem;
  text-wrap: balance;
}

.t10-article-body h3 {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--t10-primary);
  margin: 2rem 0 0.75rem;
}

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

.t10-article-body figure {
  margin: 1.5rem 0;
}

.t10-article-body > *:last-child {
  margin-bottom: 0;
}

/* The export's .image-caption, kept so existing content keeps working. */
.t10-article-body .image-caption {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--t10-text-light);
  text-align: center;
  margin-top: -0.75rem;
  margin-bottom: 2rem;
}

.t10-article-body blockquote {
  font-size: 1.25rem;
  font-weight: 700;
  font-style: italic;
  color: var(--t10-primary);
  border-left: 4px solid var(--t10-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

.t10-article-body blockquote p:last-child {
  margin-bottom: 0;
}

.t10-article-body a:not(.t10-cta):not(.cta-button) {
  color: var(--t10-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--t10-accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.t10-article-body a:not(.t10-cta):not(.cta-button):hover {
  background-color: var(--t10-accent);
}

.t10-article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.t10-article-body th,
.t10-article-body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--t10-bg-gray);
}

.t10-article-body .wp-block-table {
  overflow-x: auto;
}

/* ---------- listicle cards and callouts ---------- *
 * Applied per block via the editor's "Additional CSS class" field.
 */

.t10-article-body .list-item {
  position: relative;
  background: var(--t10-bg-gray);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 3rem;
}

.t10-article-body .list-item > h2:first-child,
.t10-article-body .list-item > h3:first-child {
  margin-top: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.t10-article-body .list-item > *:last-child {
  margin-bottom: 0;
}

.t10-article-body .list-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--t10-primary);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  margin-top: 2px;
}

.t10-article-body .highlight-box {
  background: var(--t10-accent-tint);
  border-left: 6px solid var(--t10-accent);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

.t10-article-body .highlight-box > *:last-child {
  margin-bottom: 0;
}

/* ---------- calls to action ---------- */

.t10-cta-wrap {
  margin: 2rem 0;
}

.t10-blog .t10-cta,
.t10-article-body .cta-button {
  display: block;
  width: 100%;
  background-color: var(--t10-accent);
  color: var(--t10-primary);
  text-align: center;
  padding: 1.25rem;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--t10-accent-shadow);
  transition: all 0.2s ease;
}

.t10-blog .t10-cta:hover,
.t10-article-body .cta-button:hover {
  background-color: var(--t10-accent-hover);
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--t10-accent-shadow);
}

.t10-blog .t10-cta:focus-visible {
  outline: 3px solid var(--t10-primary);
  outline-offset: 3px;
}

.t10-cta-arrow {
  display: inline-block;
  margin-left: 4px;
}

/* Sticky bar. Rendered in the footer, so it is never trapped inside a
   transformed ancestor. */
.t10-sticky-cta {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem 1.25rem;
  background-color: var(--t10-bg);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(110%);
  transition: transform 0.28s ease;
}

.t10-sticky-cta.is-in {
  transform: translateY(0);
}

.t10-sticky-cta .t10-cta {
  max-width: 500px;
  margin: 0;
  padding: 1rem;
  font-size: 1.125rem;
}

.t10-sticky-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid #e2e2e6;
  border-radius: 50%;
  background: transparent;
  color: var(--t10-text-light);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.t10-sticky-close:hover {
  color: var(--t10-primary);
  border-color: var(--t10-text-light);
}

/* Only reserve space once the bar is actually showing. */
.t10-article-view.t10-sticky-on {
  padding-bottom: 90px;
}

/* ---------- article footer ---------- */

.t10-article-foot {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--t10-bg-gray);
}

.t10-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.t10-tags a {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--t10-text-light);
  background: var(--t10-bg-gray);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
}

.t10-tags a:hover {
  color: var(--t10-primary);
}

/* ---------- listing ---------- */

.t10-listing {
  padding-block: 2.5rem 3rem;
  color: var(--t10-text);
  line-height: 1.6;
}

.t10-listing-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--t10-bg-gray);
  margin-bottom: 2.5rem;
}

.t10-listing-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--t10-primary);
  margin: 0;
  text-wrap: balance;
}

.t10-listing-sub {
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  color: var(--t10-text-light);
  margin: 0;
  max-width: 46rem;
}

.t10-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2rem;
}

.t10-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.t10-card-thumb {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--t10-bg-gray);
  aspect-ratio: 16 / 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.t10-card:hover .t10-card-thumb img {
  transform: scale(1.03);
}

.t10-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin: 0;
  text-wrap: balance;
}

.t10-card h2 a {
  color: var(--t10-primary);
  text-decoration: none;
}

.t10-card h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--t10-accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.t10-card-excerpt {
  font-size: 1rem;
  color: var(--t10-text-light);
  margin: 0;
}

.t10-card-meta {
  font-size: 0.875rem;
  color: var(--t10-text-light);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.t10-empty {
  font-size: 1.125rem;
  color: var(--t10-text-light);
}

.t10-pagination {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--t10-bg-gray);
}

.t10-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.t10-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding-inline: 12px;
  border: 2px solid var(--t10-bg-gray);
  border-radius: 10px;
  color: var(--t10-text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.t10-pagination .page-numbers:hover {
  border-color: var(--t10-primary);
  color: var(--t10-primary);
}

.t10-pagination .page-numbers.current {
  background: var(--t10-primary);
  border-color: var(--t10-primary);
  color: #ffffff;
}

/* ---------- related ---------- */

.t10-related {
  background: var(--t10-bg-gray);
  margin-top: 3.5rem;
  padding-block: 3rem;
  line-height: 1.6;
}

.t10-related h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--t10-primary);
  margin: 0 0 1.75rem;
}

.t10-related .t10-card-thumb {
  background: var(--t10-bg);
}

/* ---------- search ---------- */

.t10-searchform {
  display: flex;
  gap: 10px;
  max-width: 30rem;
}

.t10-searchform input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 2px solid var(--t10-bg-gray);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  color: var(--t10-text);
  background: var(--t10-bg);
}

.t10-searchform input[type="search"]:focus-visible {
  outline: 2px solid var(--t10-accent);
  outline-offset: 1px;
}

.t10-searchform button {
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--t10-primary);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .t10-blog *,
  .t10-blog *::before,
  .t10-blog *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 600px) {
  .t10-article-body .list-item {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  .t10-blog .t10-cta,
  .t10-article-body .cta-button {
    font-size: 1.05rem;
    padding: 1rem;
  }
  .t10-sticky-cta {
    padding: 0.75rem 1rem;
  }
}
