/* ==========================================================================
   LAYOUT & UTILITIES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Flex Utilities
   -------------------------------------------------------------------------- */
.flex-row {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.full-height-children > * {
  height: var(--full);
}

/* --------------------------------------------------------------------------
   Shadow Utilities
   -------------------------------------------------------------------------- */
.main-shadow {
  box-shadow: var(--main-shadow);
}

.noshadow {
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Background Utilities
   -------------------------------------------------------------------------- */
.nobackground {
  background: transparent;
}

.blend-multiply {
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   Visibility Utilities
   -------------------------------------------------------------------------- */
.hide-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Legacy class support */
.hide-accesible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h4,
h5 {
  letter-spacing: -0.0125em;
}

figcaption,
.wp-element-caption {
  font-family: var(--font-sans);
  text-align: left;
  font-size: var(--fs-s);
}

figcaption::before {
  content: "\e90f";
  font-family: md-icon;
  margin-right: var(--space-xs);
}

/* ==========================================================================
   LINKS
   ========================================================================== */

.footer-copy a {
  text-decoration: underline;
  text-underline-offset: var(--text-underline-offset);
}

a:where(:not(.wp-element-button)) {
  text-decoration: underline;
  text-decoration-color: rgba(192, 57, 43, 0.26);
}

a:where(:not(.wp-element-button)):hover {
  text-decoration: none;
  color: var(--wp--preset--color--text-sec);
}

.header-menu a:where(:not(.wp-element-button)) {
  font-weight: 500;
}

.header-menu a:hover {
  color: inherit;
}

.byline a {
  border-bottom: 0;
}

/* Amazon link indicator */
h2 a[href*="amazon.com"]::after,
h3 a[href*="amazon.com"]::after,
p a[href*="amazon.com"]::after,
p a[href*="amazon.in"]::after {
  content: " ↗";
  color: var(--accent-color-primary);
}

/* Submenu hover */
.sub-menu a:hover {
  color: var(--accent-color-primary);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.buttons a {
  display: inline-block;
  padding: var(--btn-space);
  border: 0;
  border-radius: var(--radius-s);
  background: linear-gradient(to bottom, #f88040, #d33a2c);
  color: var(--wp--preset--color--white);
  box-shadow: var(--button-shadow);
}

.button.button-underline {
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-color-primary);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: var(--text-underline-offset);
}

.button.button-minimal {
  display: inline-block;
  padding: var(--space-xs);
  border: 1px solid var(--wp--preset--color--bordered);
  border-radius: var(--radius-s);
  background-color: transparent;
  color: var(--wp--preset--color--textshade);
  font-size: inherit;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-duration) ease;
}

.button.button-minimal:hover {
  border-color: transparent;
  background: var(--wp--preset--color--aliceblue);
}

.sagecell button.sagecell_evalButton {
  cursor: pointer;
}

:root :where(.wp-block-button.is-style-outline .wp-block-button__link) {
  border-bottom: 2px solid currentcolor;
}

/* ==========================================================================
   CONTENT & CARDS
   ========================================================================== */

.card,
.sidebar section {
  border: 1px solid var(--wp--preset--color--bordered);
  border-radius: var(--radius-s);
}

.format figure {
  margin-bottom: var(--content-gap);
}

header.content-headline {
  padding-top: var(--space-l);
}

/* Bleed layout */
.content-inner .alignfull.bleed,
.content-inner .bleed {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  max-width: none;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   CLICKABLE & INTERACTIVE ELEMENTS
   ========================================================================== */

:focus {
  outline: 2px solid var(--accent-color-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-color-primary);
  outline-offset: 2px;
}

.clickable-parent:not(a),
.clickable-parent:not(a) a {
  position: static;
}

.clickable-parent:not(a) > a::after {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  cursor: pointer;
}

.md-card-linked {
  position: relative;
}

/* Scroll behavior */
[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-l));
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.wp-block-table table th {
  background: var(--wp--preset--color--textshade);
  color: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--text-sec);
}

.wp-block-table table thead tr {
  border-bottom: 2px solid var(--wp--preset--color--button-sec);
}

.wp-block-table td,
.wp-block-table th {
  border-color: var(--wp--preset--color--bordered);
  padding: var(--space-xs);
}

.amz-table img,
.amaz-table img {
  max-width: 100px;
}

.is-style-small-table {
  font-size: var(--fs-s);
}

.has-ratings table tr strong::after,
.is-style-ratings table tr strong::after {
  content: "⭐";
  margin-left: var(--space-xs);
  padding: var(--space-xs);
  font-size: 100%;
}

/* ==========================================================================
   LISTS
   ========================================================================== */

.format .widget ul,
.format .widget ol,
.widget_recent_entries ul {
  margin-left: 0;
}

.is-style-list ul,
.is-style-list ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ==========================================================================
   BLOCKQUOTES
   ========================================================================== */

blockquote.wp-block-quote {
  font-size: var(--fs-m);
  line-height: 1.5;
}

blockquote.wp-block-quote::before {
  content: '"';
  display: inline-block;
  position: relative;
  left: calc(var(--space-s) * -1);
  top: calc(var(--space-l) * -1);
  float: left;
  font-size: 5rem;
  line-height: 1;
  color: var(--accent-color-primary);
  opacity: 0.3;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-linear-grid,
.form-linear-grid-fixed {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
}

/* ==========================================================================
   CTA BAR
   ========================================================================== */

.cta-bar-corner.cta-bar-close {
  margin-top: -30px;
  padding: var(--space-xs) 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(192, 57, 43, 0.8);
  font-size: 2rem;
}

.cta-bar__minimal,
.cta-bar__minimal .button span {
  font-size: var(--fs-base);
}

/* ==========================================================================
   BYLINE & AVATARS
   ========================================================================== */

.byline .avatar {
  margin-top: calc(var(--space-xs) * -1);
}

.byline-author img,
.w-80-h-80,
.w-80-h-80 img {
  width: 40px;
  max-width: 40px;
  height: 40px;
}

/* ==========================================================================
   DETAILS/ACCORDION
   ========================================================================== */

details {
  margin: var(--space-s) 0;
  padding: var(--space-s);
  border: 1px solid var(--wp--preset--color--bordered);
  border-radius: var(--radius-xs);
  transition: all var(--transition-duration) ease-in-out;
}

details:hover {
  border-color: var(--wp--preset--color--text-sec);
  background-color: var(--wp--preset--color--offwhite);
}

summary {
  cursor: pointer;
  font-weight: 600;
  outline: 0;
}

summary:focus,
summary:hover {
  font-weight: 900;
}

details details {
  margin-left: var(--space-m);
}

details > :not(summary) {
  margin-top: var(--space-s);
}

details > * {
  overflow: hidden;
  transition: max-height var(--transition-duration) ease;
}

/* ==========================================================================
   PARAGRAPH LIMITER
   ========================================================================== */

.paragraph-limited {
  position: relative;
  max-height: 4.9em;
  overflow: hidden;
  cursor: pointer;
  transition: max-height var(--transition-duration) ease;
}

.paragraph-limited::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--full);
  height: 2.5em;
  background: linear-gradient(transparent, var(--wp--preset--color--white));
  pointer-events: none;
}

.paragraph-limited.expanded {
  max-height: none;
  cursor: pointer;
}

.paragraph-limited.expanded::after {
  display: none;
}

.paragraph-limited-6 {
  max-height: 10em;
}

/* ==========================================================================
   SHARE BUTTONS
   ========================================================================== */

.content .share.share-bold a {
  max-width: 48px;
  margin-right: var(--space-s);
  border-radius: var(--radius-s);
}

/* ==========================================================================
   VIDEO EMBEDS
   ========================================================================== */

.perfmatters-lazy-youtube {
  border-radius: var(--border-radius);
  box-shadow: var(--main-shadow);
}

.wp-block-embed.is-type-video iframe {
  width: var(--full);
  height: auto;
  max-width: var(--full);
  margin: auto;
  aspect-ratio: 16 / 9;
}

/* ==========================================================================
   MISC COMPONENTS
   ========================================================================== */

.ff-t-container {
  margin-bottom: var(--content-gap);
}

.callout-icon.icon {
  line-height: 1;
}

span.cmd-button {
  padding: var(--space-xs);
  border-radius: var(--radius-xs);
  background: rgba(1, 25, 71, 0.4);
  color: var(--wp--preset--color--white);
  font-size: var(--fs-s);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes slideDowner {
  from {
    transform: translateY(calc(var(--space-m) * -1));
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slidedown {
  transform: translateY(calc(var(--space-m) * -1));
  opacity: 0;
  animation: slideDowner 0.5s forwards;
}

/* ==========================================================================
   RESPONSIVE - Desktop (768px+)
   ========================================================================== */

@media (min-width: 768px) {
  .megamenu .sub-menu {
    min-width: max-content;
    max-width: var(--full);
  }

  .no-desktop,
  .no-laptop,
  .nopc {
    display: none;
  }
}

/* ==========================================================================
   RESPONSIVE - Large Screens (992px+)
   ========================================================================== */

@media (min-width: 992px) {
  blockquote.wp-block-quote {
    margin-left: calc(var(--space-xl) * -1);
    margin-right: calc(var(--space-xl) * -1);
  }
}

/* ==========================================================================
   RESPONSIVE - Tablet and below (992px)
   ========================================================================== */

@media (max-width: 992px) {
  .notablet {
    display: none!important;
  }
}

/* ==========================================================================
   RESPONSIVE - Small Tablet and below (768px)
   ========================================================================== */

@media (max-width: 768px) {
  .menu .menu-toggle {
    background-color: transparent;
  }
}

/* ==========================================================================
   RESPONSIVE - Mobile (480px and below)
   ========================================================================== */

@media (max-width: 480px) {
  .nomobile {
    display: none!important;
  }
}
/*------------------------------*\
	$FIXED-TOC (Ahrefs-style sticky TOC)
\*------------------------------*/

/* Base styles - Mobile first (inline display) */

/* Desktop styles - Sticky sidebar */
@media (min-width: 1366px) {
	/* Content container needs relative positioning for absolute TOC */
	.fixed-toc nav {
	font-size: var(--fs-s);
	line-height: 1.5;
}

.fixed-toc nav ol,
.fixed-toc nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fixed-toc nav li {
	margin: 0!important;
	padding: 0!important;
	border-left: 2px solid transparent;
}

.fixed-toc nav li a {
	display: block;
	padding: 0.4em 0 0.4em 0.75em;
	color: var(--wp--preset--color--text-sec);
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
	border-left: 2px solid transparent;
	margin-left: -2px;
}

.fixed-toc nav li a:hover {
	color: var(--wp--preset--color--primary);
}

.fixed-toc nav li.active a,
.fixed-toc nav li a:focus {
	color: var(--wp--preset--color--primary);
	border-left-color: var(--wp--preset--color--primary);
	font-weight: 500;
}
	.content-text {
		position: relative;
	}

	.fixed-toc {
		position: absolute;
		left: 0;
		top: 0;
		width: 200px;
		margin-left: calc(-200px - 2rem);
		margin-bottom: 0;
		background-color: transparent;
		border: none;
		border-radius: 0;
		padding: 0;
	}

	.fixed-toc > p:first-child {
		font-size: 0.8125rem;
		padding-bottom: var(--space-xs);
		border-bottom: 1px solid var(--wp--preset--color--bordered);
		margin-bottom: var(--space-xs);
	}

	.fixed-toc nav {
		font-size: 0.8125rem;
		line-height: 1.45;
	}
	.fixed-toc nav li a {
		padding: 0.35em 0 0.35em 0.625em;
	}

	/* Sticky behavior when scrolling */
	.fixed-toc.is-sticky {
		position: fixed;
		top: calc(var(--header-height) + 1.5rem);
		max-height: calc(100vh - var(--header-height) - 3rem);
		overflow-y: auto;
	}

	/* Admin bar adjustment */
	.admin-bar .fixed-toc.is-sticky {
		top: calc(var(--header-height) + 32px + 1.5rem);
		max-height: calc(100vh - var(--header-height) - 32px - 3rem);
	}

	/* Stop sticky at bottom of content */
	.fixed-toc.is-stuck-bottom {
		position: absolute;
		top: auto;
		bottom: 0;
	}
}

/* Large desktop - Wider TOC */
@media (min-width: 1400px) {
	.fixed-toc {
		width: 220px;
		margin-left: calc(-220px - 2.5rem);
	}
}

/* Extra large screens */
@media (min-width: 1600px) {
	.fixed-toc {
		width: 240px;
		margin-left: calc(-240px - 3rem);
	}
}

/* Scrollbar styling for sticky TOC */
@media (min-width: 1366px) {
	.fixed-toc::-webkit-scrollbar {
		width: 4px;
	}

	.fixed-toc::-webkit-scrollbar-track {
		background: transparent;
	}

	.fixed-toc::-webkit-scrollbar-thumb {
		background-color: var(--wp--preset--color--bordered);
		border-radius: 4px;
	}

	.fixed-toc::-webkit-scrollbar-thumb:hover {
		background-color: var(--wp--preset--color--text-sec);
	}
}
}