
html {
    --c-bg-backdrop:        #ffffff;
    --c-bg-highlight:       #ffffff;
    --c-bg-figure-backdrop: #b5bcc8;
    --c-text:               hsl(220, 20%, 90%);
    --c-text-inverted:      hsl(220, 20%, 100%);
    --c-text-muted:         #5d5980;
    --c-text-highlight:     hsl(25, 90%, 60%);
    --c-bg-primary:         hsl(25, 100%, 64%);
    --c-fg-secondary:       #0dd8a8;
    --c-bg-secondary:       #0dd8a8;

    --shadow-opacity: 0.8;

    --default-border: 0.5px dotted rgba(255, 255, 255, 0.3);

    --l-main-pad: 20px;
}

@font-face {
    font-family: "EB Garamond";
    src: url("/fonts/EBGaramond/EBGaramond-VariableFont_wght.woff2");
    font-weight: 400 500 600 700 800;
}

@font-face {
    font-family: "EB Garamond";
    src: url("/fonts/EBGaramond/EBGaramond-Italic-VariableFont_wght.woff2");
    font-weight: 400 500 600 700 800;
    font-style: italic;  
}

@font-face {
    font-family: "Nunito Sans";
    src: url("/fonts/NunitoSans/NunitoSans-VariableFont_YTLC,opsz,wdth,wght.woff2");
    font-weight: 200 300 400 500 600 700 800;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("/fonts/NunitoSans/NunitoSans-Italic-VariableFont_YTLC,opsz,wdth,wght.woff2");
    font-weight: 200 300 400 500 600 700 800 900;
    font-style: italic;  
}

@font-face {
    font-family: "Fira Code";
    src: url("/fonts/fira_code/FiraCode-VariableFont_wght.ttf") format("truetype-variations");
    font-weight: 300 400 500 600 700;
}

html, body {
    border: 0;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    position: relative; /* important for sizing of background image ::before pseudo-element */
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(20em, 50em) 1fr;
    grid-template-rows: min-content;
    grid-template-areas:
        "logo header header"
        " . main . "
        " . footer . ";
    font-family: "EB Garamond";
    font-weight: 400;
    color: var(--c-text);
    padding: 20px;
}

body::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    z-index: -1000;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom, hsl(0 0% 3% / 80%), hsl(0 0% 3% / 100%)),
        center 20% / cover space no-repeat fixed url("/images/bg1.jpg"),
        white;
    background-blend-mode: darken, normal;
}

::selection {
    background-color: var(--c-bg-secondary);
    color: var(--c-text-inverted);
}

strong {
}

a:hover, a:visited, a:active, a:link {
    color: var(--c-text-highlight);
    text-decoration: none;
}

a:hover {
    background: var(--c-bg-secondary);
    color: var(--c-text);
}

nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 10px;
    min-height: 48px;
    height: auto;
    grid-area: header;
    align-self: start;
    font-family: "Nunito Sans";
    font-size: 24px;
    font-weight: 200;
    max-width: min(100%, 40em);
    border-left: 1px solid var(--c-fg-secondary);
    overflow: scroll;
}

nav > div {
    box-sizing: border-box;
    border: 1px solid var(--c-fg-secondary);
    height: 48px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin-bottom: 10px;
    margin-left: -1px;
}

nav > .search {
    min-width: 5em;
    flex-grow: 1;
}

nav a {
    display: flex;
    align-items: center;
}

.logo {
    
    content: url(/yasec-logo-v1-dark-web.svg);
    
    box-sizing: border-box;
    grid-area: logo;
    border: 1px solid var(--c-fg-secondary);
    margin-right: -1px;
    justify-self: end;
    align-self: start;
    height: 48px;
}

.logo > a {
    display: block;
    height: 100%;
    width: 100%;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
}

nav a:link, nav a:active, nav a:visited, nav a:hover {
    flex-grow: 1;
    text-align: center;
    color: inherit;
    padding: 0 10px 0 10px;
}

nav a:hover {
    background: var(--c-bg-primary);
}

main {
    box-sizing: border-box;
    text-align: justify;
    hyphens: auto;
    grid-area: main;
    border-left: 1px solid var(--c-fg-secondary);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 50px;
}

main > .intro {
    margin-top: 40px;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 50px;
    margin-bottom: 8px;
    font-family: "Nunito Sans";
    text-align: left;
    font-weight: 300;
}

h1 {
}

h2 {
    font-size: 30px;
    font-weight: 400;
}

h3 {
    font-size: 20px;
    font-weight: 700;
}

/* Prevent long literals from breaking the page layout's width */ 
span.pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    overflow-wrap: anywhere;
}

main header {
    z-index: 1;
    margin-top: 30px;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    margin-top: 100px;
}

/*main .subheading, */
main .intro,
main > .card,
main > .document p,
main > .document blockquote,
main > .document .line-block,
main > .breadcrumbs,
.pagination-links > a,
/*main header,*/
nav > div {
    backdrop-filter: brightness(105%) blur(5px);
}

blockquote,
main > .document .line-block {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px 10px 20px;
    margin: 10px 0px 10px 0px;
}

p + blockquote {
    margin: 0;
}

main > header::after {
    content: "";
    background-image: linear-gradient(to right, var(--c-fg-secondary), rgba(0, 0, 0, 0%)); 
    height: 5px;
    width: 100%;
}

header > h1 {
    font-size: clamp(20px, 40px, min(10vw, 10vh));
    padding: 0 var(--l-main-pad) 0 var(--l-main-pad);
    margin: 0;
}

main .intro, main .subheading {
    padding: 10px var(--l-main-pad) 10px var(--l-main-pad);
    margin: 10px 0 10px 0;
}

main > .document p,
main > .document h1,
main > .document h2,
main > .document h3,
main > .document h4,
main > .document h5 {
    margin: 0;
    padding: 10px var(--l-main-pad) 10px var(--l-main-pad);
}

main > h2 {
    padding: 0 var(--l-main-pad) 0 var(--l-main-pad);
}

main > div.breadcrumbs {
    display: flex;
    align-items: center;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0 20px 0;
    padding: 10px var(--l-main-pad) 10px var(--l-main-pad);
}

div.breadcrumbs > ul {
    padding: 0;
    margin: 0;
}

div.breadcrumbs > .date {
    font-weight: 700;
    margin-left: 10px;
}

.breadcrumbs li {
    list-style: none;
    display: inline;
}

.breadcrumbs li + li::before {
    content: "/";
    margin: 0 5px 0 5px;
}

.pagination-links {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.pagination-links > a {
    padding: 10px 20px 10px 20px;
}

.pagination-links > a:hover {
    background: var(--c-bg-primary);
}

.arrow-right {
  display: inline-block;
  width: 0; 
  height: 0; 
  border-top: .3rem solid transparent;
  border-bottom: .3rem solid transparent;
  border-left: .3rem solid ;
  margin-bottom: .05rem;
  margin-left: 5px;
}

.card {
    padding: 30px 20px 30px 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.card > .links {
    margin-left: -20px;
    margin-bottom: -30px;
    border-top: var(--default-border);
    margin-top: 20px;
    width: calc(100% + 40px);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.card > .links > a {
    padding: 10px 10px 10px 10px;
    flex-grow: 1;
    text-align: center;
}

main > .links {
    margin: 20px 0px 40px 0px;
    border: var(--default-border);
    border-left: none;
    border-right: none;
    width: calc(100%);
    max-width: calc(100%);
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

main > .links > a {
    padding: 10px 10px 10px 10px;
    flex-grow: 1;
    text-align: center;
}

/* un-mess-up rst2html output */
.card > .summary > .document, .card > .summary > .document > p {
    display: inline;
}

.card > h1,
.card > h2,
.card > h3,
.card > h4,
.card > h5,
.card > h6 {
    margin-top: 0px;
}

tt {
    font-family: "Fira Code";
    font-weight: bold;
    font-size: 14px;
}

cite {
    font-family: "Fira Code";
    font-weight: bold;
    font-size: 14px;
    font-style: normal;
}

figure {
    margin-top: 2em;
    margin-bottom: 2em;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--c-bg-figure-backdrop);
    display: flex;
    flex-direction: column;
}

.subfigure {
    margin-top: 2em;
    margin-bottom: 2em;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: stretch; 
    align-items: stretch;
    column-gap: 40px;
    row-gap: 40px;
}

.subfigure > figure {
    margin-top: 0;
    margin-bottom: 0;
}

figure.side-by-side {
    min-width: 15em;
    margin: 0 0 0 0;
    padding: 0 40px 0 0;
}

figure img, figure video {
    display: block;
    margin: 0 auto 0 auto;
    width: 100%;
}

figcaption {
    background-color: var(--c-bg-highlight);
    line-height: 16pt;
    padding: 1em;
    flex-grow: 1;
}


figure.header {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
}

main img {
    max-width: 100%;
    margin: 40px auto 40px auto;
    display: block;
    filter: brightness(70%);
    transition: filter 100ms;
}

img:hover {
    filter: none;
}

/*****************************************************/
/* Code block formatting / syntax highlighting rules */
/*****************************************************/

.code {
    font-family: "Fira Code";
    font-size: 13px;
    text-align: left; /* Override default content "justify" alignment */
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    display: grid;
    align-items: start;
    grid-template-columns: min-content 1fr;
}

.code > .line {
    padding-left: calc(2em + 5px);
    text-indent: -2em;
    padding-top: 2px;
    min-width: 15em;
}

/* Make individual syntax tokens wrap anywhere */
.code > .line > span {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

/* We render line numbers in CSS! */
.code > .lineno {
    counter-increment: lineno;
    word-break: keep-all;
    margin: 0;
    padding-left: 15px;
    padding-right: 5px;
    overflow: clip;
    position: relative;
    text-align: right;
    color: var(--c-text-muted);
    border-right: 1px solid var(--c-text);
    align-self: stretch;
}

/* We also handle line continuation markers in CSS. */
.code > .lineno::after {
    position: absolute;
    right: 5px;
    content: "\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳\a↳";
    white-space: pre;
    color: var(--c-text-muted);
}

/* Insert the actual line number */
.code > .lineno::before {
    content: counter(lineno);
}

.code::before {
    counter-reset: lineno;
}

/* Token styling rules for syntax highlighting */
.code .hll {}
.code .c   { color: var(--c-text); font-weight: 400 } /* Comment */
.code .n   { color: var(--c-text); font-weight: 400 } /* Name */
.code .o   { color: var(--c-text); font-weight: 400 } /* Operator */
.code .cm  { color: var(--c-text); font-weight: 400 } /* Comment.Multiline */
.code .cp  { color: var(--c-text); font-weight: 400 } /* Comment.Preproc */
.code .c1  { color: var(--c-text); font-weight: 400 } /* Comment.Single */
.code .cs  { color: var(--c-text); font-weight: 400 } /* Comment.Special */
.code .nd  { color: var(--c-text); font-weight: 400 } /* Name.Decorator */
.code .nn  { color: var(--c-text); font-weight: 400 } /* Name.Namespace */
.code .vc  { color: var(--c-text); font-weight: 400 } /* Name.Variable.Class */
.code .vg  { color: var(--c-text); font-weight: 400 } /* Name.Variable.Global */
.code .vi  { color: var(--c-text); font-weight: 400 } /* Name.Variable.Instance */
.code .err { color: var(--c-text-highlight); font-weight: 500 } /* Error */
.code .k   { color: var(--c-text-highlight); font-weight: 500 } /* Keyword */
.code .l   { color: var(--c-text-highlight); font-weight: 500 } /* Literal */
.code .kc  { color: var(--c-text-highlight); font-weight: 500 } /* Keyword.Constant */
.code .kd  { color: var(--c-text-highlight); font-weight: 500 } /* Keyword.Declaration */
.code .kn  { color: var(--c-text-highlight); font-weight: 500 } /* Keyword.Namespace */
.code .kp  { color: var(--c-text-highlight); font-weight: 500 } /* Keyword.Pseudo */
.code .kr  { color: var(--c-text-highlight); font-weight: 500 } /* Keyword.Reserved */
.code .kt  { color: var(--c-text-highlight); font-weight: 500 } /* Keyword.Type */
.code .na  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Attribute */
.code .nb  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Builtin */
.code .nc  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Class */
.code .no  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Constant */
.code .ni  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Entity */
.code .ne  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Exception */
.code .nf  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Function */
.code .nl  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Label */
.code .nx  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Other */
.code .py  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Property */
.code .nt  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Tag */
.code .nv  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Variable */
.code .ow  { color: var(--c-text-highlight); font-weight: 500 } /* Operator.Word */
.code .bp  { color: var(--c-text-highlight); font-weight: 500 } /* Name.Builtin.Pseudo */
.code .ld  { color: var(--c-text); font-weight: 600 } /* Literal.Date */
.code .m   { color: var(--c-text); font-weight: 600 } /* Literal.Number */
.code .s   { color: var(--c-text); font-weight: 600 } /* Literal.String */
.code .mb  { color: var(--c-text); font-weight: 600 } /* Literal.Number.Bin */
.code .mf  { color: var(--c-text); font-weight: 600 } /* Literal.Number.Float */
.code .mh  { color: var(--c-text); font-weight: 600 } /* Literal.Number.Hex */
.code .mi  { color: var(--c-text); font-weight: 600 } /* Literal.Number.Integer */
.code .mo  { color: var(--c-text); font-weight: 600 } /* Literal.Number.Oct */
.code .sb  { color: var(--c-text); font-weight: 600 } /* Literal.String.Backtick */
.code .sc  { color: var(--c-text); font-weight: 600 } /* Literal.String.Char */
.code .sd  { color: var(--c-text); font-weight: 600 } /* Literal.String.Doc */
.code .s2  { color: var(--c-text); font-weight: 600 } /* Literal.String.Double */
.code .se  { color: var(--c-text); font-weight: 600 } /* Literal.String.Escape */
.code .sh  { color: var(--c-text); font-weight: 600 } /* Literal.String.Heredoc */
.code .si  { color: var(--c-text); font-weight: 600 } /* Literal.String.Interpol */
.code .sx  { color: var(--c-text); font-weight: 600 } /* Literal.String.Other */
.code .sr  { color: var(--c-text); font-weight: 600 } /* Literal.String.Regex */
.code .s1  { color: var(--c-text); font-weight: 600 } /* Literal.String.Single */
.code .ss  { color: var(--c-text); font-weight: 600 } /* Literal.String.Symbol */
.code .il  { color: var(--c-text); font-weight: 600 } /* Literal.Number.Integer.Long */

footer {
    margin-top: 30px;
    align-self: center;
    margin-bottom: 10px;
    text-align: center;
    padding: 5px 25px 5px 25px;
    grid-area: footer;
}

.search {
    align-self: center;
    max-width: calc(100vw - 20px);
    flex-grow: 1;
}

.pagefind-ui__form {
    max-width: 100%;
}

.search input {
    height: 1.5lh;
    max-width: 100%;
}

#search, .pagefind-ui, #search form, #search input {
    width: 100%;
}

.search button {
    display: none;
}

.pagefind-ui__drawer {
    position: fixed;
    margin-top: 10px;
    background: var(--c-bg-highlight);
    max-width: min(100%, min(100vw, 40em));
    max-height: 100%;
    overflow-x: clip;
    overflow-y: scroll;
    text-overflow: clip;
    z-index: 100;
}

.pagefind-ui__message {
    font-family: "Nyght Serif";
    font-weight: 700;
    font-size: 16pt;
}

.pagefind-ui__results-area {
    padding: 10px;
}

.pagefind-ui__results-area img {
    max-width: min(50vw, 200px);
}

.pagefind-ui__results-area a {
    max-width: min(50vw, 200px);
    color: var(--c-fg-secondary) !important;
    text-decoration: none;
    padding: 10px 10px 10px 0 !important;
    font-family: "Nyght Serif";
    font-weight: 700;
    font-size: 12pt;
}

.pagefind-ui__results-area figure, .pagefind-ui__results-area div.subfigure, .pagefind-ui__results-area img {
    display: none;
}

@media print, (prefers-color-scheme: light) {
    html {
        --c-bg-backdrop:        #ffffff;
        --c-bg-highlight:       #ffffff;
        --c-bg-figure-backdrop: #b5bcc8;
        --c-text:               hsl(220, 20%, 20%);
        --c-text-inverted:      hsl(220, 20%, 100%);
        --c-text-muted:         #5d5980;
        --c-text-highlight:     hsl(25, 100%, 50%);
        --c-bg-primary:         hsl(25, 100%, 64%);
        --c-fg-secondary:       #0dd8a8;
        --c-bg-secondary:       #0dd8a8;

        --shadow-opacity: 0.2;

        --default-border: 0.5px dotted hsla(220, 10%, 30%, 50%);
    }

    
    .logo {
        content: url(/yasec-logo-v1-light-web.svg);
    }
    

    body::before {
        background:
            linear-gradient(to bottom, hsl(0 0% 99% / 60%), hsl(0 0% 99% / 100%)),
            center 20% / cover space no-repeat fixed url("/images/bg1.jpg"),
            white;
        background-blend-mode: lighten, normal;
    }

    main {
    }

    body > header > h1 {
    }

    a:hover, nav a:hover {
        color: var(--c-text-inverted);
    }

    img {
        filter: none;
    }
    
    .card {
    }
}

@media print, (max-width: 30em) {
    html {
        --l-main-pad: 10px;
    }

    body {
        grid-template-areas:
            " logo  "
            " header "
            " main  "
            " footer ";
        grid-template-columns: 1fr;
    }

    .logo {
        justify-self: start;
        margin-left: -1px;
        margin-bottom: 10px;
    }

    main > .intro {
        margin-top: 20px;
    }
}

