/* -------------------------------------
    RESPONSIVE AND MOBILE FRIENDLY STYLES
------------------------------------- */
@media only screen and (max-width: 620px) {
    table[class=body] h1 {
        font-size: 28px !important;
        margin-bottom: 10px !important;
    }
    table[class=body] p,
    table[class=body] ul,
    table[class=body] ol,
    table[class=body] td,
    table[class=body] span,
    table[class=body] a {
        font-size: 16px !important;
    }
    table[class=body] .wrapper,
    table[class=body] .article {
        padding: 10px !important;
    }
    table[class=body] .content {
        padding: 0 !important;
    }
    table[class=body] .container {
        padding: 0 !important;
        width: 100% !important;
    }
    table[class=body] .main {
        border-left-width: 0 !important;
        border-radius: 0 !important;
        border-right-width: 0 !important;
    }
    table[class=body] .btn table {
        width: 100% !important;
    }
    table[class=body] .btn a {
        width: 100% !important;
    }
    table[class=body] .img-responsive {
        height: auto !important;
        max-width: 100% !important;
        width: auto !important;
    }
    table[class=body] p[class=small],
    table[class=body] a[class=small] {
        font-size: 11px !important;
    }
}

/* -------------------------------------
    POST CONTENT
------------------------------------- */
hr {
    position: relative;
    display: block;
    width: 100%;
    margin: 3em 0;
    padding: 0;
    height: 1px;
    background-color: transparent;
    border: 0;
    border-top: 1px solid {{dividerColor}};
}
.kg-hr-card td,
.kg-paywall-hr td {
    margin: 0;
    padding-top: 1.5em; /* account for elements above having bottom padding, we want 3em total */
    padding-bottom: 3em;
    font-size: 17px;
}
.kg-hr td {
    margin: 0;
    padding: 0;
    border-top: 1px solid {{dividerColor}};
    font-size: 0;
    line-height: 0;
}

p,
ul,
ol,
dl,
blockquote {
    margin: 0 0 1.5em 0;
    line-height: 1.6;
}

ol,
ul {
    padding-left: 1.3em;
    padding-right: 1.5em;
}

ol ol,
ul ul,
ul ol,
ol ul {
    margin: 0.5em 0 1em;
}

ul {
    list-style: disc;
}

ul ul {
    list-style: circle;
}

ul ul ul {
    list-style: square;
}

ol {
    list-style: decimal;
}

ol ol {
    list-style: lower-alpha;
}

ol ol ol {
    list-style: lower-roman;
}

ul,
ol {
    max-width: 100%;
}

li {
    margin: 0.5em 0;
    padding-left: 0.3em;
    line-height: 1.6;
    color: {{#if backgroundIsDark}}#ffffff{{else}}#15212A{{/if}};
}

dt {
    float: left;
    margin: 0 20px 0 0;
    width: 120px;
    color: {{#if backgroundIsDark}}#ffffff{{else}}#15212A{{/if}};
    font-weight: 500;
    text-align: right;
}

dd {
    margin: 0 0 5px 0;
    text-align: left;
}

blockquote {
    margin: 0;
    padding: 0;
    border-left: {{accentColor}} 2px solid;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: -0.2px;
}

blockquote.kg-blockquote-alt {
    border-left: 0 none;
    text-align: center;
    font-size: 1.2em;
    font-style: italic;
    {{#if backgroundIsDark}}
        color: #ffffff;
        color: rgba(255, 255, 255, .6);
    {{else}}
        color: #15212a;
        color: rgba(0, 0, 0, 0.6);
    {{/if}}
}

blockquote p {
    margin: 2em 25px;
    padding: 0 !important;
    font-size: 1em;
}

blockquote.kg-blockquote-alt p {
    margin-right: 50px;
    margin-left: 50px;
}

blockquote small {
    display: inline-block;
    margin: 0.8em 0 0.8em 1.5em;
    font-size: 0.9em;
    opacity: 0.8;
}

blockquote cite {
    font-weight: bold;
}
blockquote cite a {
    font-weight: normal;
}

a {
    color: {{accentColor}};
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-family: -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.11;
    font-weight: {{titleWeight}};
    text-rendering: optimizeLegibility;
}

.title-serif h1,
.title-serif h2,
.title-serif h3,
.title-serif h4,
.title-serif h5,
.title-serif h6 {
    font-family: Georgia, serif;
    letter-spacing: -0.01em;
}

h1 {
    margin: 1.5em 0 0.5em 0;
    font-size: 42px;
}

h2 {
    margin: 1.5em 0 0.5em 0;
    font-size: 32px;
}

h3 {
    margin: 1.5em 0 0.5em 0;
    font-size: 26px;
}

h4 {
    margin: 1.8em 0 0.5em 0;
    font-size: 21px;
    line-height: 1.2;
}

h5 {
    margin: 2em 0 0.5em 0;
    font-size: 19px;
    line-height: 1.3;
}

h6 {
    margin: 2em 0 0.5em 0;
    font-size: 19px;
    line-height: 1.3;
}

/*
  Adjust margins and padding when hr cards surround headings to simulate the
  margin collapsing that we no longer have when using table+padding for hr cards.
  Goal is to always have 3em spacing between heading and divider line.
*/
h1:has(+ .kg-hr-card),
h2:has(+ .kg-hr-card),
h3:has(+ .kg-hr-card),
h4:has(+ .kg-hr-card),
h5:has(+ .kg-hr-card),
h6:has(+ .kg-hr-card),
h1:has(+ .kg-paywall),
h2:has(+ .kg-paywall),
h3:has(+ .kg-paywall),
h4:has(+ .kg-paywall),
h5:has(+ .kg-paywall),
h6:has(+ .kg-paywall) {
    margin-bottom: 0;
}

h1 + .kg-hr-card td,
h2 + .kg-hr-card td,
h3 + .kg-hr-card td,
h4 + .kg-hr-card td,
h5 + .kg-hr-card td,
h6 + .kg-hr-card td,
h1 + .kg-paywall .kg-paywall-hr td,
h2 + .kg-paywall .kg-paywall-hr td,
h3 + .kg-paywall .kg-paywall-hr td,
h4 + .kg-paywall .kg-paywall-hr td,
h5 + .kg-paywall .kg-paywall-hr td,
h6 + .kg-paywall .kg-paywall-hr td {
    padding-top: 3em;
}

.kg-hr-card + h1,
.kg-hr-card + h2,
.kg-hr-card + h3,
.kg-hr-card + h4,
.kg-hr-card + h5,
.kg-hr-card + h6,
.kg-paywall-hr + h3 {
    margin-top: 0;
}

.kg-callout-card:not(.kg-callout-card-accent) a {
    color: {{linkColor}};
}

h1 strong,
h2 strong,
h3 strong,
h4 strong,
h5 strong,
h6 strong {
    font-weight: {{titleStrongWeight}};
}

strong {
    font-weight: 700;
}

figure {
    margin: 0 0 1.5em;
    padding: 0;
}

figcaption {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 1.5;
    {{#if backgroundIsDark}}
        color: #ffffff;
        color: rgba(255, 255, 255, .6);
    {{else}}
        color: #15212a;
        color: rgba(0, 0, 0, 0.6);
    {{/if}}
}

figcaption a {
    text-decoration: none!important;
}

code {
    font-size: 0.9em;
}

pre {
    white-space: pre-wrap;
    overflow: auto;
    background: #15212A;
    padding: 15px;
    border-radius: 3px;
    line-height: 1.2;
    color: #ffffff;
}

p code,
li code {
    background: #F2F7FA;
    word-break: break-all;
    padding: 1px 7px;
    border-radius: 3px;
    color: {{accentColor}};
}

figure blockquote p {
    font-size: 1em;
}
