/* Ghost Casper Content Styles
   Extracted from the Casper theme for proper content formatting
   ---------------------------------------------------------- */

:root {
    /* Colours */
    --color-green: #a4d037;
    --color-yellow: #fecd35;
    --color-red: #f05230;
    --color-darkgrey: #15171A;
    --color-midgrey: #738a94;
    --color-lightgrey: #f1f1f1;
    --color-secondary-text: #979797;
    --color-border: #e1e1e1;
    --color-wash: #e5eff5;
    --color-darkmode: #151719;

    /* Fonts */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    --font-serif: Georgia, Times, serif;
    --font-mono: Menlo, Courier, monospace;
}

/* Animated gradient text keyframes */
@keyframes animated_text {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Gradient heading styles - purple theme */
.gh-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.6rem;
    background-image: linear-gradient(92.31deg, #5b21b6 5.74%, #7c3aed 28.17%, #a78bfa 62.19%, #7c3aed 91.87%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: animated_text 13s linear infinite;
}

.gh-content h3 {
    font-size: 2rem;
    margin-bottom: 1.6rem;
}

/* Styled links with purple color */
.gh-content a {
    color: #7c3aed;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #a78bfa;
    word-break: break-word;
}

.gh-content a:hover {
    border-bottom-color: #7c3aed;
}

/* Content grid
/* ---------------------------------------------------------- */

.gh-canvas {
    display: grid;
    grid-template-columns:
        [full-start]
        minmax(max(4vmin, 20px), auto)
            [wide-start]
            minmax(auto, 240px)
                [main-start]
                    min(720px, calc(100% - max(8vmin, 40px)))
                [main-end]
            minmax(auto, 240px)
            [wide-end]
        minmax(max(4vmin, 20px), auto)
        [full-end]
    ;
}

.gh-canvas > * {
    grid-column: main-start / main-end;
}

.kg-width-wide {
    grid-column: wide-start / wide-end;
}

.kg-width-full {
    grid-column: full-start / full-end;
}

.kg-width-full img {
    width: 100%;
}


/* Content
/* ---------------------------------------------------------- */

.gh-content > * + * {
    margin-top: max(3.2vmin, 24px);
    margin-bottom: 0;
}

.gh-content > [id] {
    margin: 0;
}

/* Color for headings without gradient (h1, h4, h5, h6) */
.gh-content > h1[id],
.gh-content > h4[id],
.gh-content > h5[id],
.gh-content > h6[id] {
    color: var(--color-darkgrey);
}

.gh-content > [id]:not(:first-child) {
    margin: 2em 0 0;
}

.gh-content > [id] + * {
    margin-top: 1.5rem !important;
}

.gh-content > hr,
.gh-content > blockquote {
    position: relative;
    margin-top: max(4.8vmin, 32px);
}
.gh-content > hr + *,
.gh-content > blockquote + * {
    margin-top: max(4.8vmin, 32px) !important;
}

.gh-content > blockquote:not([class]),
.gh-content > ol,
.gh-content > ul,
.gh-content > dl,
.gh-content > p {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.6em;
}

.gh-content .kg-callout-card .kg-callout-text,
.gh-content .kg-toggle-card .kg-toggle-content > ol,
.gh-content .kg-toggle-card .kg-toggle-content > ul,
.gh-content .kg-toggle-card .kg-toggle-content > p {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.9rem;
    line-height: 1.6em;
}

.gh-content .kg-product-card .kg-product-card-description > p,
.gh-content .kg-product-card .kg-product-card-description > ol,
.gh-content .kg-product-card .kg-product-card-description > ul {
    font-size: 1.7rem;
    line-height: 1.6em;
}

.gh-content .kg-callout-card .kg-callout-emoji {
    font-size: 2.1rem;
    line-height: 1.4em;
}

.gh-content .kg-toggle-card .kg-toggle-heading-text {
    font-size: 2.0rem;
}

.gh-content > ul,
.gh-content > ol,
.gh-content > dl,
.gh-content .kg-toggle-card .kg-toggle-content > ol,
.gh-content .kg-toggle-card .kg-toggle-content > ul,
.gh-content .kg-product-card .kg-product-card-description > ol,
.gh-content .kg-product-card .kg-product-card-description > ul {
    padding-left: 1.9em;
}

.gh-content > blockquote:not([class]) {
    position: relative;
    font-style: italic;
    padding: 0;
}

.gh-content > blockquote:not([class])::before {
    content: "";
    position: absolute;
    left: -1.5em;
    top: 0;
    bottom: 0;
    width: 0.3rem;
    background: var(--ghost-accent-color, #7c3aed);
}

.gh-content :not(pre) > code {
    vertical-align: middle;
    padding: 0.15em 0.4em 0.15em;
    border: #e1eaef 1px solid;
    font-weight: 400 !important;
    font-size: 0.9em;
    line-height: 1em;
    color: #15171A;
    background: #f0f6f9;
    border-radius: 0.25em;
}

.gh-content pre {
    overflow: auto;
    padding: 16px 20px;
    color: var(--color-wash);
    font-size: 1.4rem;
    line-height: 1.5em;
    background: var(--color-darkgrey);
    border-radius: 5px;
    box-shadow: 0 2px 6px -2px rgba(0,0,0,.1), 0 0 1px rgba(0,0,0,.4);
}

@media (max-width: 650px) {
    .gh-content > blockquote:not([class]),
    .gh-content > ol,
    .gh-content > ul,
    .gh-content > dl,
    .gh-content > p,
    .gh-content .kg-callout-card .kg-callout-text,
    .gh-content .kg-toggle-card .kg-toggle-content > ol,
    .gh-content .kg-toggle-card .kg-toggle-content > ul,
    .gh-content .kg-toggle-card .kg-toggle-content > p {
        font-size: 1.8rem;
    }

    .gh-content .kg-product-card .kg-product-card-description > p,
    .gh-content .kg-product-card .kg-product-card-description > ol,
    .gh-content .kg-product-card .kg-product-card-description > ul {
        font-size: 1.6rem;
    }

    .gh-content blockquote:not([class])::before {
        left: min(-4vmin, -20px);
    }
}


/* Cards
/* ---------------------------------------------------------- */

.gh-content :not(.kg-card):not([id]) + .kg-card {
    margin-top: 6vmin;
    margin-bottom: 0;
}
.gh-content .kg-card + :not(.kg-card) {
    margin-top: 6vmin;
    margin-bottom: 0;
}

.kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.kg-image-card img {
    margin: auto;
}

.gh-content .kg-callout-card-accent a {
    text-decoration: underline;
}

.kg-blockquote-alt {
    font-family: var(--font-serif);
    color: var(--color-midgrey);
}

.kg-card.kg-header-card.kg-style-dark {
    background: var(--color-darkgrey);
}


/* Captions */
figcaption {
    padding: 1.5rem 1.5rem 0;
    text-align: center;
    color: rgba(0,0,0,0.5);
    font-size: 1.3rem;
    line-height: 1.4em;
}
figcaption strong {
    color: rgba(0,0,0,0.8);
}
figcaption a {
    text-decoration: underline;
}


/* Instagram embeds */
iframe.instagram-media {
    margin-top: 6vmin !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 0 !important;
}

iframe.instagram-media + script + :not([id]) {
    margin-top: 6vmin;
}


/* Card captions */
.kg-width-full.kg-card-hascaption {
    display: grid;
    grid-template-columns: inherit;
}

.kg-width-wide.kg-card-hascaption img {
    grid-column: wide-start / wide-end;
}
.kg-width-full.kg-card-hascaption img {
    grid-column: 1 / -1;
}

.kg-width-full.kg-card-hascaption figcaption {
    grid-column: main-start / main-end;
}


/* Tables */
.gh-content table:not(.gist table) {
    display: inline-block;
    overflow-x: auto;
    max-width: 100%;
    width: auto;
    border-spacing: 0;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 1.6rem;
    white-space: nowrap;
    vertical-align: top;
    -webkit-overflow-scrolling: touch;
    background: radial-gradient(ellipse at left, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 75%) 0 center, radial-gradient(ellipse at right, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 75%) 100% center;
    background-attachment: scroll, scroll;
    background-size: 10px 100%, 10px 100%;
    background-repeat: no-repeat;
}

.gh-content table:not(.gist table) td:first-child {
    background-image: linear-gradient(to right, rgba(255,255,255, 1) 50%, rgba(255,255,255, 0) 100%);
    background-size: 20px 100%;
    background-repeat: no-repeat;
}

.gh-content table:not(.gist table) td:last-child {
    background-image: linear-gradient(to left, rgba(255,255,255, 1) 50%, rgba(255,255,255, 0) 100%);
    background-position: 100% 0;
    background-size: 20px 100%;
    background-repeat: no-repeat;
}

.gh-content table:not(.gist table) th {
    color: var(--color-darkgrey);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-align: left;
    text-transform: uppercase;
    background-color: #f6f8fa;
}

.gh-content table:not(.gist table) th,
.gh-content table:not(.gist table) td {
    padding: 6px 12px;
    border: #e5e7eb 1px solid;
}


/* Article styles */
.article {
    padding: max(8vmin, 40px) 0 max(8vmin, 64px);
    word-break: break-word;
}

.page-template .article {
    padding-top: max(12vmin, 64px);
}

.article-header {
    padding: 0 0 max(6.4vmin, 40px) 0;
}

.page-template .article-header {
    padding-bottom: max(3.2vmin, 28px);
}

.article-tag {
    margin-bottom: 16px;
    font-size: 1.6rem;
}

.article-tag a {
    color: var(--color-secondary-text);
}

.article-title {
    margin-bottom: 0;
    font-size: clamp(3.2rem, 5vw, 5.2rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--color-darkgrey);
}

.article-excerpt {
    margin-top: 20px;
    max-width: 720px;
    font-size: 2rem;
    line-height: 1.45;
    color: var(--color-darkgrey);
}

.gh-canvas .article-image {
    grid-column: wide-start / wide-end;
    width: 100%;
    margin: max(6.4vmin, 40px) 0 0;
}

.image-full .article-image {
    grid-column: full-start / full-end;
}

.image-small .article-image {
    grid-column: main-start / main-end;
}

.gh-canvas .article-image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

@media (max-width: 767px) {
    .article-excerpt {
        margin-top: 14px;
        font-size: 1.7rem;
    }
}


/* Article byline */
.article-byline {
    display: flex;
    justify-content: space-between;
    margin: min(24px, 5.6vmin) 0 0;
}

.article-byline-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.article-byline-content .author-list {
    justify-content: flex-start;
    padding: 0 14px 0 0;
}

.article-byline-meta {
    color: var(--color-secondary-text);
    font-size: 1.4rem;
    line-height: 1.2em;
}

.article-byline-meta .author-name {
    margin: 0 0 6px;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-darkgrey);
}

.article-byline-meta .bull {
    display: inline-block;
    margin: 0 2px;
}

.article-comments {
    margin: 6vmin 0 0 0;
}

@media (max-width: 767px) {
    .article-byline-content .author-list {
        padding-right: 12px;
    }
    .article-byline-meta .author-name {
        margin-bottom: 4px;
    }
}


/* Footnotes */
.footnotes-sep {
    margin-bottom: 30px;
}

.footnotes {
    font-size: 1.5rem;
}

.footnotes p {
    margin: 0;
}

.footnote-backref {
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none !important;
    box-shadow: none !important;
}


/* Bookmark cards */
.kg-bookmark-card,
.kg-bookmark-publisher {
    position: relative;
    width: 100%;
}

.kg-bookmark-container,
.kg-bookmark-container:hover {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    color: currentColor;
    background: rgba(255,255,255,0.6);
    font-family: var(--font-sans);
    text-decoration: none;
    border-radius: 3px;
    box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.kg-bookmark-content {
    flex-basis: 0;
    flex-grow: 999;
    padding: 20px;
    order: 1;
}

.kg-bookmark-title {
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.3em;
}

.kg-bookmark-description {
    display: -webkit-box;
    max-height: 45px;
    margin: 0.5em 0 0 0;
    font-size: 1.4rem;
    line-height: 1.55em;
    overflow: hidden;
    opacity: 0.8;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.kg-bookmark-metadata {
    margin-top: 20px;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1.3em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kg-bookmark-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.kg-bookmark-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
}

.kg-bookmark-thumbnail {
    display: flex;
    flex-basis: 24rem;
    flex-grow: 1;
    justify-content: flex-end;
}

.kg-bookmark-thumbnail img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
    object-fit: cover;
}

.kg-bookmark-author {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.kg-bookmark-publisher::before {
    content: "•";
    margin: 0 .5em;
}


/* Gallery cards */
.kg-gallery-card + .kg-gallery-card {
    margin-top: 0.75em;
}

.kg-gallery-container {
    position: relative;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
}

.kg-gallery-row:not(:first-of-type) {
    margin: 0.75em 0 0 0;
}

.kg-gallery-image:not(:first-of-type) {
    margin: 0 0 0 0.75em;
}


/* Button cards */
.kg-button-card {
    display: flex;
    position: static;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.kg-btn {
    display: flex;
    position: static;
    align-items: center;
    padding: 0 2.0rem;
    height: 4.4rem;
    line-height: 4.4rem;
    font-size: 1.65rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: opacity 0.2s ease-in-out;
}

.kg-btn:hover {
    opacity: 0.85;
}

.kg-btn-accent {
    background-color: var(--ghost-accent-color, #7c3aed);
    color: #fff;
}


/* File cards */
.kg-file-card {
    display: flex;
}

.kg-file-card a.kg-file-card-container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    color: inherit;
    padding: 12px;
    min-height: 92px;
    border: 1px solid rgb(124 139 154 / 25%);
    border-radius: 5px;
    transition: all ease-in-out 0.35s;
    text-decoration: none;
    width: 100%;
}

.kg-file-card a.kg-file-card-container:hover {
    border: 1px solid rgb(124 139 154 / 35%);
}

.kg-file-card-contents {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 4px 8px;
    width: 100%;
}

.kg-file-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3em;
}

.kg-file-card-caption {
    font-size: 1.4rem;
    line-height: 1.3em;
    opacity: .7;
}

.kg-file-card-title + .kg-file-card-caption {
    margin-top: -3px;
}

.kg-file-card-metadata {
    display: inline;
    font-size: 1.4rem;
    line-height: 1.3em;
    margin-top: 2px;
}

.kg-file-card-filename {
    display: inline;
    font-weight: 500;
}

.kg-file-card-filesize {
    display: inline;
    font-weight: 400;
    opacity: .6;
}

.kg-file-card-filesize::before {
    display: inline-block;
    content: "•";
    margin-left: 6px;
    margin-right: 6px;
}

.kg-file-card-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    min-width: 80px;
    height: 100%;
}

.kg-file-card-icon::before {
    position: absolute;
    display: block;
    content: "";
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: .06;
    transition: opacity ease-in-out 0.35s;
    border-radius: 3px;
}

.kg-file-card a.kg-file-card-container:hover .kg-file-card-icon::before {
    opacity: .08;
}

.kg-file-card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--ghost-accent-color, #7c3aed);
}

.kg-file-card-medium a.kg-file-card-container {
    min-height: 72px;
}

.kg-file-card-medium .kg-file-card-caption {
    opacity: 1.0;
    font-weight: 500;
}

.kg-file-card-small a.kg-file-card-container {
    align-items: center;
    min-height: 52px;
}

.kg-file-card-small .kg-file-card-metadata {
    margin-top: 0;
}

.kg-file-card-small .kg-file-card-icon svg {
    width: 20px;
    height: 20px;
}

.kg-file-card + .kg-file-card {
    margin-top: 1em;
}


/* Audio cards */
.kg-audio-card {
    display: flex;
    width: 100%;
    box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
    border-radius: 3px;
}

.kg-audio-thumbnail {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    min-width: 80px;
    height: 80px;
    background: transparent;
    object-fit: cover;
    aspect-ratio: 1/1;
    border-radius: 3px 0 0 3px;
}

.kg-audio-thumbnail.placeholder {
    background: var(--ghost-accent-color, #7c3aed);
}

.kg-audio-thumbnail.placeholder svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.kg-audio-player-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    --seek-before-width: 0%;
    --volume-before-width: 100%;
    --buffered-width: 0%;
}

.kg-audio-title {
    width: 100%;
    padding: 8px 12px 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4em;
}

.kg-audio-player {
    display: none;
}

.kg-width-full.kg-card-hascaption {
    display: grid;
    grid-template-columns: inherit;
}

.kg-audio-player-container input[type="range"] {
    width: 100%;
}


/* Callout cards */
.kg-callout-card {
    display: flex;
    padding: 20px 28px;
    border-radius: 3px;
}

.kg-callout-card-grey {
    background: rgba(124, 139, 154, 0.13);
}

.kg-callout-card-white {
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
}

.kg-callout-card-blue {
    background: rgba(33, 172, 232, 0.12);
}

.kg-callout-card-green {
    background: rgba(52, 183, 67, 0.12);
}

.kg-callout-card-yellow {
    background: rgba(240, 165, 15, 0.13);
}

.kg-callout-card-red {
    background: rgba(209, 46, 46, 0.11);
}

.kg-callout-card-pink {
    background: rgba(225, 71, 174, 0.11);
}

.kg-callout-card-purple {
    background: rgba(135, 85, 236, 0.12);
}

.kg-callout-card-accent {
    background: var(--ghost-accent-color, #7c3aed);
    color: #fff;
}

.kg-callout-card-accent a {
    color: #fff;
}

.kg-callout-emoji {
    padding-right: 16px;
    line-height: 1.3;
    font-size: 1.25em;
}

.kg-callout-text {
    font-size: 1.5rem;
    line-height: 1.5em;
}


/* Toggle cards */
.kg-toggle-card {
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
    border-radius: 4px;
}

.kg-toggle-card-icon {
    height: 24px;
    width: 24px;
    fill: var(--color-midgrey);
}

.kg-toggle-heading {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
}

.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-heading {
    padding-bottom: 0;
}

.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-heading {
    padding-bottom: 20px;
}

.kg-toggle-heading-text {
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.4em;
}

.kg-toggle-content {
    height: auto;
    overflow: hidden;
    padding: 0 20px 20px;
    transition: opacity 0.25s ease;
    opacity: 1;
}

.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content {
    height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: padding 0.35s ease;
    opacity: 0;
}

.kg-toggle-content p:first-of-type {
    margin-top: 20px;
}


/* Product cards */
.kg-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: transparent;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgb(124 139 154 / 25%);
}

.kg-product-card-image {
    height: auto;
    max-width: 100%;
}

.kg-product-card-title-container {
    display: flex;
    flex-direction: column;
}

.kg-product-card-title {
    font-family: var(--font-sans);
    font-size: 1.7rem;
    font-weight: 700;
}

.kg-product-card-rating-star {
    height: 24px;
    width: 20px;
    margin-right: 2px;
}

.kg-product-card-rating-star svg {
    width: 16px;
    height: 16px;
    fill: var(--ghost-accent-color, #7c3aed);
    opacity: 0.15;
}

.kg-product-card-rating-active.kg-product-card-rating-star svg {
    opacity: 1;
}

.kg-product-card-description p:first-of-type {
    margin-top: 12px;
}


/* Video cards */
.kg-video-card {
    position: relative;
    --seek-before-width: 0%;
    --volume-before-width: 100%;
    --buffered-width: 0%;
}

.kg-video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kg-video-large-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -40px;
    margin-top: -40px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.15));
    transition: opacity 0.25s ease;
}

.kg-video-container input[type="range"] {
    position: absolute;
    -webkit-appearance: none;
    background: transparent;
    height: auto;
    padding: 0;
    border: 0;
}
