/* v2.0.1 */

@import url(lib/normalize.css);
* { box-sizing: border-box; }

:root {
  --color-primary: #8655ed;
  --color-primary-contrast: #fff;
  --color-content: #232323;
  --color-content-secondary: #707070;
  --color-background: #fff;
  --color-primary-background: color-mix(in srgb, var(--color-primary), white 90%);
  --color-primary-border: color-mix(in srgb, var(--color-primary), white 75%);
  --color-code-background: #F0F3F4;
  --color-focus: #232323;

  --font-sans: Marblis, system-ui, -apple-system, ui-sans-serif, sans-serif;
  /* --font-sans-settings: normal; */
  /* --font-serif: 'Source Serif', ui-serif, serif; */
  /* --font-serif-settings: 'onum'; */
  /* --font-serif-weight: 380; */
  --font-mono: 'Google Code', ui-monospace, monospace;
  /* --font-mono-settings: normal; */
  --font-mono-weight: 380;
  --font-16: 1rem;
  --font-18: 1.125rem;
  --font-20: 1.25rem;
}

.hidden {
  display: none;
}

html {
  font-family: var(--font-sans);
  /* font-feature-settings: var(--font-sans-settings); */
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--color-content);
  background: var(--color-primary-background);
}

body {
  font-size: var(--font-18);
  line-height: 1.4;
  background: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 30px;
  line-height: 1.125;
}

.container {
  max-width: 800px;
  margin: 0 10px;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
}
a:hover {
  color: color-mix(in srgb, var(--color-primary), black 40%);
}
a:focus-visible {
  outline: none;
  color: var(--color-focus);
  background: #fd0;
  box-shadow: #fd0 0px -2px, var(--color-content) 4px 4px;
  text-decoration: none;
}
a:active {
  color: var(--color-content);
}
a[target=_blank]::after {
  display: inline;
  content: ' ↗︎';
  font-family: var(--font-sans);
}

.header {
  padding: 20px 0;
  line-height: 1;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}
.header .container {
  display: flex;
  align-items: center;
}
.header-logo {
  margin-right: 12px;
  filter: brightness(0) invert(1);
}
.header .header-title {
  margin: 0;
  line-height: 1;
  font-size: 1.75rem; /* 28px */
  font-weight: 500;
  letter-spacing: -.5px;
  color: var(--color-primary-contrast);
  text-decoration: none;
}
.header a.header-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 4px;
}
.header .header-title:focus-visible {
  color: var(--color-focus);
}
.header .header-subtitle {
  margin-top: 2px;
  font-size: var(--font-16);
  margin-left: 3px;
  text-wrap: balance;
}

.menu {
  margin-bottom: 2em;
  padding: 15px 0;
  background: var(--color-primary-background);
  border-bottom: 4px solid var(--color-primary);
}
.menu-links {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style-type: none;
  line-height: 1.75;
}
.menu-links a {
  display: block;
  margin-right: .75em;
  padding: 0 .25em;
  color: var(--color-content);
  text-decoration: none;
}
.menu-links a:hover {
  text-decoration: underline;
}
.menu-links li:last-child a {
  margin-right: 0;
}
.menu-links svg {
  margin-top: -3px;
  margin-right: .25em;
  vertical-align: middle;
}
.menu-search {
  margin-top: 20px;
}
.menu-search-inputs {
  margin: auto;
}
.menu-search-inputs #q {
  width: 100%;
}

p {
  margin: 15px 0;
}
ul {
  margin: 15px auto;
}
ul ul {
  margin-top: auto;
  margin-bottom: auto;
}

img, iframe, table {
  max-width: 100%;
}

.posts:has(article:only-child) hr.separator {
  display: none;
}

.post-title {
  margin-bottom: 12px;
  font-size: 2.25rem; /* 36px */
  text-wrap: balance;
}
.post-title a {
  text-decoration: none;
}
.post-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 4px;
}
.post-info {
  margin: 12px auto 24px;
  font-size: var(--font-16);
  color: var(--color-content-secondary);
}
.post-info a {
  color: var(--color-content-secondary);
}
.post-info a:hover {
  color: var(--color-content);
}
.post-info a:focus-visible {
  color: var(--color-focus);
}
.post-info svg {
  margin-top: -2px;
  vertical-align: middle;
  filter: opacity(0.7);
}

hr {
  margin: 40px auto;
  border: 0;
  border-top: 1px solid var(--color-primary-border);
  /* border-top: 1px solid var(--color-primary); */
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
hr.separator {
  display: block;
  height: 1px;
  margin-left: -10px;
  margin-right: -10px;
  line-height: 1px;
  text-align: center;
  border-top: 1px solid var(--color-primary-border);
  color: var(--color-primary-border);
  /* border-top: 1px solid var(--color-primary);
  color: var(--color-primary); */
  font-size: var(--font-20);
}
hr.separator::after {
  display: inline;
  content: '❦';
  padding: 0 15px;
  background: var(--color-background);
}
.dc-home hr.separator,
.dc-archive-month hr.separator,
.dc-category hr.separator,
.dc-tag hr.separator {
  margin-top: 60px;
  margin-bottom: 60px;
}

label {
  font-weight: bold;
}

input,
textarea,
select {
  display: inline-block;
  max-width: 100%;
  margin: 5px auto;
  padding: 8px;
  border: 1px solid var(--color-content);
  border-radius: 10px;
  color: var(--color-content);
  background: var(--color-background);
  font-family: var(--font-sans);
  /* font-feature-settings: var(--font-sans-settings); */
  line-height: 1.15;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-content);
  outline: 3px solid #fd0;
  outline-offset: 0;
  box-shadow: 0 0 0 1px inset var(--color-content);
}

button {
  display: inline-block;
  padding: 8px 16px;
  margin: 5px auto;
  font-family: var(--font-sans);
  /* font-feature-settings: var(--font-sans-settings); */
  font-weight: normal;
  text-align: center;
  text-decoration: none;
  color: var(--color-primary);
  background: var(--color-background);
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  line-height: 1.15;
}
button:not(:disabled):hover {
  color: var(--color-primary-contrast);
  background: var(--color-primary);
  transition: background-color 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out;
}
button:not(:disabled):focus {
  color: var(--color-content);
  outline: none;
  border-color: var(--color-content);
  box-shadow: 0 0 0 1px inset var(--color-content), 0 0 0 3px #fd0;
}
/* button:not(:disabled):active {
  background: color-mix(in srgb, var(--color-primary), black 40%);
  border-color: color-mix(in srgb, var(--color-primary), black 40%);
  color: var(--color-primary-contrast);
} */
button:disabled {
  opacity: .5;
}

.post-content {
  /* font-family: var(--font-serif);
  font-feature-settings: var(--font-serif-settings); */
  /* font-weight: var(--font-serif-weight); */
  line-height: 1.5;
}
.post-content,
.comments dd {
  max-width: 700px;
}

.txt-center {
  text-align: center;
}

pre, code, kbd {
  font-family: var(--font-mono);
  /* font-feature-settings: var(--font-mono-settings); */
  font-weight: var(--font-mono-weight);
  overflow: auto;
  font-size: 1rem;
}
pre {
  padding: 5px 15px;
  background: var(--color-code-background);
}
:not(pre) > code,
kbd {
  padding: 2.5px 5px;
  background: var(--color-code-background);
  border-radius: 5px;
  word-wrap: break-word;
}

blockquote {
  margin: 10px;
  padding: 5px 0 5px 15px;
  border-left: 4px solid var(--color-primary-border);
  /* border-left: 4px solid var(--color-code-background); */
  /* font-family: var(--font-sans);
  font-feature-settings: var(--font-sans-settings);
  font-weight: normal; */
}
blockquote p:first-child,
blockquote ul:first-child,
blockquote ol:first-child {
  margin-top: 0;
}
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
  margin-bottom: 0;
}

blockquote cite {
  display: block;
  /* margin-top: 24px; */
  font-style: italic;
}

.post-content ul {
  padding: 0;
  margin-left: 5px;
  list-style: none;
}
.post-content ul > li {
    position: relative;
    padding-left: 1.5em;
}
.post-content ul > li::before {
    content: '—';
    position: absolute;
    left: 0;
    width: 1em;
    color: var(--color-primary);
}
.post-content ol {
  padding: 0;
  margin-left: 5px;
  list-style: none;
  counter-reset: oli;
}
.post-content ol > li {
  position: relative;
  padding-left: 1.75em;
  list-style: none;
  counter-increment: oli;
}
.post-content ol > li::before {
  content: counter(oli) '.';
  color: var(--color-primary);
  position: absolute;
  left: 0;
  width: 1.25em;
  text-align: right;
  font-feature-settings: normal;
}

.post-content ol pre, .post-content ul pre, .post-content ol pre, .post-content ul pre {
  margin-top: 5px;
  margin-bottom: 5px;
}

.post-content figure {
  margin: 30px auto 40px;
}
.post-content figcaption {
  font-size: var(--font-16);
  margin-top: 5px;
  /* font-family: var(--font-sans);
  font-feature-settings: var(--font-sans-settings); */
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: 15px auto;
  caption-side: bottom;
}
thead {
  background: var(--color-primary-background);
  text-align: left;
}
td, th {
  border: 1px solid var(--color-primary);
  padding: 5px 15px;
}

.img-thumbnail {
  border-radius: 5px;
  padding: 5px;
  border: 1px solid var(--color-primary-border);
}
.img-screenshot {
  border-radius: 5px;
  box-shadow: 0 0 20px #989898;
}

.has-translation {
  margin: 30px auto;
  padding: 0 25px;
  border: 1px solid var(--color-primary);
  border-radius: 5px;
  /* background: var(--color-primary-background); */
  /* font-family: var(--font-sans);
  font-feature-settings: var(--font-sans-settings); */
  font-size: var(--font-16);
}

.post-tags {
  margin-top: 50px;
  /* font-size: var(--font-16); */
}
.post-tags a {
  color: var(--color-content);
  /* text-decoration-color: var(--color-primary); */
  text-decoration: none;
}
.post-tags a:hover {
  /* color: color-mix(in srgb, var(--color-primary), black 40%);
  text-decoration-color: inherit; */
  text-decoration: underline;
}
.post-tags a .tag-prefix {
  display: inline;
  color: var(--color-primary);
  text-decoration: none;
}

.post nav {
  margin-top: 50px;
  margin-bottom: 50px;
}
.dc-post nav hr.separator {
  border-top: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.link-to {
  display: inline-block;
  margin-top: 24px;
}
.link-to::after {
  display: inline-block;
  margin-left: 5px;
  content: '→';
  transition: all ease-in-out 200ms;
}
.link-to:hover::after,
.link-to:focus-visible::after {
  margin-left: 8px;
}

.navigation a,
.navigation .placeholder {
  display: flex;
  padding: 5px;
  text-decoration: none;
  text-wrap: balance;
}
.navigation .previous a::before,
.navigation .previous .placeholder::before {
  display: block;
  margin-right: 10px;
  content: '←';
}
.navigation .next a {
  justify-content: flex-end;
  text-align: right;
}
.navigation .next a::after,
.navigation .next .placeholder::after {
  display: block;
  margin-left: 10px;
  content: '→';
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
}
.grid-2.navigation {
  grid-gap: 15px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-right: 5px;
}
.pagination > * {
  margin: 5px 0 0 5px;
}
.pagination .previous {
  margin-left: 0;
}
.pagination > a,
.pagination .etc, .pagination .this {
  padding: 5px 10px;
  text-decoration: none;
  font-weight: bold;
}
.pagination > a:hover {
  text-decoration: underline;
  text-decoration-thickness: 4px;
}
.navigation .placeholder {
  display: none;
  visibility: hidden;
}

#attachments {
  margin-top: 50px;
}
.attachment small {
  text-transform: lowercase;
}

#comments {
  margin-bottom: 50px;
}
.comments dt {
  margin-top: 30px;
  display: flex;
  align-items: center;
}
.comments .number {
  margin-right: 15px;
  padding: 5px;
  min-width: 40px;
  min-height: 40px;
  line-height: 30px;
  text-align: center;
  border-radius: 5px;
  color: var(--color-content);
  border: 1px solid var(--color-content);
  text-decoration: none;
}
 .comments dt a.number:hover {
  background: var(--color-content);
  color: var(--color-background);
}
.comments dt a[target="_blank"]::after {
  font-weight: normal;
}
.comments dt.me a.number {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.comments dt.me a.number:hover {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}
.comments dt.me a.number:focus-visible {
  color: var(--color-content);
}

.comments dt:not(.me) .author a {
  color: var(--color-content);
}
.comments dd:not(.me) a {
  color: var(--color-content-secondary);
}
.comments dt:not(.me) .author a:hover, .comments dt:not(.me) .author a:focus-visible,
.comments dd:not(.me) a:hover, .comments dd:not(.me) a:focus-visible {
  color: var(--color-content);
}

.comments dt div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.comments dt .author {
  font-weight: 500;
}
.comments dt .datetime {
  font-size: var(--font-16);
  color: var(--color-content-secondary);
  text-decoration: none;
}
.comments dd {
  margin-left: 0;
}
.comments dd.me {
  /* font-family: var(--font-serif);
  font-feature-settings: var(--font-serif-settings); */
  /* font-weight: var(--font-serif-weight); */
}

#comment-form .field {
  margin: 5px auto;
}
#comment-form textarea,
#comment-form input:not([type="submit"]) {
  width: 100%;
  max-width: 100%;
}
#comment-form .help {
  font-size: var(--font-16);
  color: var(--color-content-secondary);
  font-weight: 400;
  display: inline-block;
}
#comment-form textarea + .help {
  display: block;
}
#comment-form .grid-2 {
  justify-content: stretch;
}
#comment-form .grid-2 p {
  width: 100%;
  max-width: 100%;
}

#preview.comments {
  border: 1px solid var(--color-primary);
  padding: 0 30px;
}
#preview.comments dt {
  margin-top: 15px;
}
#preview.msg-success {
  color: #28A745;
  border: 1px solid #28A745;
  padding: 30px;
}
#preview.msg-error {
  color: #DC3545;
  border: 1px solid #DC3545;
  padding: 30px;
}

.comments + .comments-closed {
  margin: 60px auto;
}

#comments-feed {
  margin-top: 30px;
}
#comments-feed svg {
  margin-top: -3px;
  vertical-align: middle;
}

.footer {
  margin-top: 4em;
  padding: 30px 0 20px;
  border-top: 4px solid var(--color-primary);
  background: var(--color-primary-background);
}
/* .footer a {
  text-decoration: none;
  line-height: 1;
}
.footer a:hover, .footer a:active {
  text-decoration: underline;
} */
.footer-brand a {
  display: inline-block;
}
.footer-brand img {
  vertical-align: middle;
}
.footer-links {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
  padding: 0;
  list-style-type: none;
  line-height: 1.75;
}
.footer-links a {
  margin-right: .75em;
  padding: .25em;
  color: var(--color-content);
  text-decoration: none;
}
.footer-links li:last-child a {
  margin-right: 0;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-notice {
  margin-top: 25px;
  font-size: var(--font-16);
}
.footer-notice p {
  margin: 0;
}
.footer-notice svg {
  margin-top: -2px;
  margin-left: -5px;
  vertical-align: middle;
  fill: color-mix(in srgb, var(--color-content), white 20%);
}

@media (min-width: 550px) {
  body {
    font-size: var(--font-20);
  }
  .header .header-logo {
    width: 100px;
    height: 100px;
    margin-right: 18px;
  }
  .header .header-title {
    font-size: 2.625rem; /* 42px */
  }
  .header .header-subtitle {
    margin-top: 5px;
    font-size: 20px;
  }
  .menu-search-inputs {
    display: flex;
    gap: 10px;
  }
  .post-info {
    font-size: var(--font-18);
  }
  .post-content {
    /* line-height: 1.5; */
  }
  .has-translation {
    font-size: var(--font-18);
  }
  .dc-post .post nav,
  .dc-page .post nav {
    margin-top: 80px;
    margin-bottom: 70px;
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  #comment-form .grid-2 {
    grid-gap: 15px;
  }
  .footer-links {
    flex-direction: row;
    margin-bottom: 15px;
  }
  .footer-links + .footer-links {
    margin-left: auto;
  }
}
@media (min-width: 820px) {
  .container {
    margin: auto;
  }
  .header .header-logo {
    margin-right: 24px;
  }
  .header .header-title {
    letter-spacing: normal;
  }
  .header .header-subtitle {
    /* letter-spacing: .5px; */
  }
  .menu-links-end {
    margin-left: auto;
  }
  .post-title {
    font-size: 3rem; /* 48px */
    line-height: 1.2;
  }
  .post-info {
    margin: 12px auto 30px;
  }

  hr.separator {
    margin-left: 0;
    margin-right: 0;
  }
  .dc-home hr.separator {
    width: calc(100vw - 20px);
    margin-left: 50%;
    transform: translateX(-50%);
  }
  /* Chrome & Edge on Windows (.dc-home) + Firefox (.dc-post) */
  .dc-home, .dc-post {
    overflow-x: hidden;
  }
  .post-content .figure-lg,
  pre {
    margin-right: -100px;
  }
  .comments dd {
    margin-left: 55px;
  }
  .pagination {
    justify-content: space-between;
  }
  .pagination > * {
    margin-left: 10px;
  }
  .pagination .previous, .pagination .previous {
    display: block;
  }
  .pagination .previous {
    margin: 0 auto 0 0;
  }
  .pagination .next {
    margin: 0 0 0 auto;
  }
  .pagination .placeholder {
    display: flex;
  }
  .footer-links-container {
    display: flex;
  }
}

@media (min-width: 1000px) {
  .container {
    max-width: 900px;
  }
  .post-content,
  .comments dd {
    max-width: 750px;
  }
  .post-content .figure-lg,
  pre {
    margin-right: -150px;
  }
  .post nav {
    width: calc(100vw - 20px);
    margin-left: 50%;
    transform: translateX(-50%);
  }
  .post .navigation {
    margin-left: 30px;
    margin-right: 30px;
    grid-gap: 25vw;
  }
}
/* Really a use case?! */
@media (max-width: 290px) {
  .header .header-logo,
  .menu svg,
  .post-info svg {
    display: none;
  }
}

@media (prefers-color-scheme: dark)
{
  :root {
    --color-content: #dedede;
    --color-content-secondary: #9b9999;
    --color-background: #101010;
    --color-primary-background: color-mix(in srgb, var(--color-primary), black 80%);
    --color-primary-border: color-mix(in srgb, var(--color-primary), black 65%);
    --color-code-background: #222;
  }
  a:hover,
  .menu-links a:hover {
    color: color-mix(in srgb, var(--color-primary), white 20%);
  }
   .menu-links a:focus-visible,
   .post-tags a:focus-visible,
   .comments .number:focus-visible, .comments dt.me a.number:focus-visible,
   .comments dt:not(.me) .author a:focus-visible, .comments dd:not(.me) a:focus-visible,
   .footer-links a:focus-visible {
    color: var(--color-focus);
   }
  .menu-links-end svg g, .post-info svg g {
    stroke: var(--color-content-secondary);
  }
}

@media print {
  .menu,
  .dc-post .post nav, .dc-page .post nav,
  a[href*="nicolas.pm"]::after,
  #comment-form,
  #pings, #ping-url,
  #comments-feed,
  .footer-links-container {
    display: none !important;
  }
  html, body, .header, .footer {
    background: none;
  }
  .header, .header .header-title {
    color: #8655ed;
  }
  .post-content pre {
    text-wrap: auto;
  }

  .post-info-permalink::after {
    display: block;
    content: attr(href);
  }
}