.md-content {
  hyphens: auto;
  overflow-wrap: break-word; /* ensures long words don’t overflow */
  line-height: 1.7;
}

.md-content p {
  text-indent: 1.5em;
  margin-top: 0.5em;
  line-height: 1.75;    /* looser lines */
  margin-bottom: 1.2em; /* space between paragraphs */
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  overflow-wrap: break-word; /* ensures long words don’t overflow */
}

.blog-meta {
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--md-default-fg-color--light);
}

.md-content p:first-child {
  text-indent: 0; /* don’t indent the very first paragraph */
}

.md-content blockquote {
  font-style: italic;
  border-left: 4px solid var(--md-accent-fg-color);
  padding-left: 1em;
  margin-left: 0;
  color: var(--md-default-fg-color--light);
}

html[data-md-page^="blog/"] .md-content p {
  text-align: justify;
  text-justify: inter-word; /* improves spacing in some browsers */
}
/* Make the copyright row a full-width flex bar */
.md-footer .md-footer-meta__inner .md-copyright.custom-footer {
  display: flex !important;
  width: 100% !important;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75em 0;            /* matches footer rhythm */
  font-size: .9em;
}


/* Link color & spacing */
.md-footer .md-copyright.custom-footer a {
  color: var(--md-primary-fg-color);
  text-decoration: none;
}
.md-social-inline .md-header__button {
  padding: 1px;
}
.md-social-inline .md-header__button svg {
  vertical-align: middle;
  display: inline-block;
}

@media (max-width: 768px) {
  .md-header__option .md-social-inline {
    display: none !important;
  }
}

/* Push left/right ends apart, prevent wrap of the right side */
.md-footer .custom-footer-left  { margin-right: auto; }
.md-footer .custom-footer-right { margin-left:  auto; white-space: nowrap; }

/* On narrow screens, stack nicely */
@media (max-width: 720px) {
  .md-footer .md-footer-meta__inner .md-copyright.custom-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }
  .md-footer .custom-footer-right { margin-left: 0; white-space: normal; }
}

/* Make left sidebar narrower */
.md-sidebar--primary {
  width: 180px;
  max-width: 240px;
}

/* Shift content over to reclaim space */
.md-main__inner {
  margin-left: 0px;
}

/* Increase max-width of the main content container */
.md-grid {
  max-width: 100% !important;   /* let it expand full width */
}

.md-content {
  max-width: none !important;
  width: 100% !important;
  padding-left: 2rem;
  padding-right: 2rem;
}

.custom-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

@keyframes pulsate {
  0%, 40%, 80%, 100% {
    transform: scale(1);
  }
  20%, 60% {
    transform: scale(1.15);
  }
}
.pulsate {
  animation: pulsate 1000ms infinite;
}
.icon {
  color:var(--md-primary-fg-color);
}
.example {
  color: var(--md-primary-fg-color);
  font-size: 1.2em;    /* replaces `.lg` if you want bigger icons */
  vertical-align: middle;
  padding-right: .5em;
}

html[data-md-color-scheme="slate"] 
.inverted {
  color: white;
}

html[data-md-color-scheme="solarized"] .inverted {
  color: red;
}

.space-right {margin-right: 1em;}
.red { color:red}
.white { color:white}

img[src$="#float-right-10"] {
  float: right;
  margin: 0 1em 1em 0;
  max-width: 10%;
}
img[src$="#float-left-10"] {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 10%;
}
img[src$="#float-right-20"] {
  float: right;
  margin: 0 1em 1em 0;
  max-width: 20%;
}
img[src$="#float-left-20"] {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 20%;
}
img[src$="#float-right-30"] {
  float: right;
  margin: 0 1em 1em 0;
  max-width: 30%;
}
img[src$="#float-left-30"] {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 30%;
}
img[src$="#float-right-40"] {
  float: right;
  margin: 0 1em 1em 0;
  max-width: 40%;
}
img[src$="#float-left-40"] {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 40%;
}
img[src$="#float-right-50"] {
  float: right;
  margin: 0 1em 1em 0;
  max-width: 50%;
}
img[src$="#float-left-50"] {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 50%;
}
img[src$="#float-right-60"] {
  float: right;
  margin: 0 1em 1em 0;
  max-width: 60%;
}
img[src$="#float-left-60"] {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 60%;
}
img[src$="#float-right-70"] {
  float: right;
  margin: 0 1em 1em 0;
  max-width: 70%;
}
img[src$="#float-left-70"] {
  float: left;
  margin: 0 1em 1em 0;
  max-width: 70%;
}
/* Remove the default mask-based pseudo-icon */
.md-typeset details.example > summary::before {
  content: none !important;
}

.md-typeset .admonition-title,
.md-typeset details > summary {
  padding-left: .6rem !important;   /* was 2rem, now tighter */
  padding-right: .6rem;            /* keep the right padding */
}
img[class*="border-"] {
  border-style: solid !important;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

.wiggle-hover:hover {
  animation: wiggle 0.2s ease-in-out 1; /* 1 = run once */
}

#stock-data-chart, #stock-data-chart * {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge legacy */
}
#stock-data-chart::-webkit-scrollbar,
#stock-data-chart *::-webkit-scrollbar {
  display: none;                  /* Chrome/Safari */
}

/*----- */
/* --- symbol carousel --- */
#symbol-carousel {
  display: flex;
  gap: .5rem;
  padding: .35rem .5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* Firefox */
  mask-image: linear-gradient(
    to right,
    transparent 0, black 12px, black calc(100% - 12px), transparent 100%
  );                                     /* soft fade edges */
}
#symbol-carousel::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* pill button (theme-aware via Material CSS vars) */
.symbol-pill {
  scroll-snap-align: start;
  border-radius: 9999px;
  padding: .35rem .7rem;
  font-weight: 500;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  border: 1px solid var(--md-default-fg-color--lighter);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  transition: transform .06s ease, background-color .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.symbol-pill:hover {
  background: color-mix(in srgb, var(--md-primary-fg-color) 10%, var(--md-default-bg-color));
  border-color: var(--md-primary-fg-color);
}
.symbol-pill:active { transform: translateY(1px); }

/* active state */
.symbol-pill[data-active="true"] {
  background: color-mix(in srgb, var(--md-primary-fg-color) 18%, var(--md-default-bg-color));
  color: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--md-primary-fg-color) 35%, transparent);
}

/* small screens: tighter spacing */
@media (max-width: 720px) {
  #symbol-carousel { gap: .35rem; padding-inline: .35rem; }
  .symbol-pill { padding: .3rem .6rem; }
}

