/* Cloud: the CodeLauncher website (cl.v2ex.pro, 2022) as a Planet template.
   The sky is "clouds" by Mia, painted for that site. */
:root {
  --shadow-highlight: 0px 0px 0px 3px rgba(70, 145, 208, 0.25);
  --backdrop-blur-radius: 10px;
  --default-transition-option: 0.15s ease-in-out;
  --shadow-large:
    0px 0.6px 2.2px rgba(0, 0, 0, 0.02),
    0px 1.3px 5.3px rgba(0, 0, 0, 0.028),
    0px 2.5px 10px rgba(0, 0, 0, 0.035),
    0px 4.5px 17.9px rgba(0, 0, 0, 0.042),
    0px 8.4px 33.4px rgba(0, 0, 0, 0.05),
    0px 20px 80px rgba(0, 0, 0, 0.07);
}

* { box-sizing: border-box; }
html, body { padding: 0px; margin: 0px; }
body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
a:link, a:visited { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }
pre {
  padding: 10px;
  font-family: "JetBrains Mono", "Panic Sans", "SF Mono", monospace;
  border-radius: 4px;
  background-color: #2b303b;
  color: #c0c5ce;
  overflow-x: auto;
}
pre code { font-family: inherit; }

.wrapper {
  position: static;
  min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  background-image: url("clouds.png");
  background-attachment: fixed;
  background-size: cover;
  background-position: 50% 0px;
  background-repeat: no-repeat;
  display: flex;
}
#app {
  display: flex;
  width: 100%;
  max-width: calc(800px - env(safe-area-inset-left) - env(safe-area-inset-right));
  margin: 32px auto;
  border-radius: 4px;
  box-shadow: var(--shadow-large);
}
.sidebar {
  min-width: 200px;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--backdrop-blur-radius));
  -webkit-backdrop-filter: blur(var(--backdrop-blur-radius));
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  padding: 80px 10px 10px 10px;
}
.sidebar-inner {
  position: sticky;
  top: 10px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.main {
  flex: 1;
  width: 100%;
  min-width: 0;
  background-color: #fff;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  padding: 20px;
}
p, li { line-height: 1.6; }
h1:first-child, h2:first-child, p:first-child, ul:first-child { margin-top: 0px; }
h1:last-child, h2:last-child, p:last-child, ul:last-child { margin-bottom: 0px; }
/* a post's text sits in .content, whose first block keeps the gap above it */
.content > h1:first-child, .content > h2:first-child, .content > p:first-child, .content > ul:first-child { margin-top: revert; }

.sidebar-item:link, .sidebar-item:visited {
  font-size: 16px;
  font-weight: normal;
  text-decoration: none;
  color: #222;
  padding: 10px;
  border-radius: 4px;
  transition: background-color var(--default-transition-option);
}
.sidebar-item:hover { background-color: rgba(0, 0, 0, 0.05); }
.sidebar-item.active { background-color: rgba(0, 0, 0, 0.1); }

.screenshot { width: 100%; display: block; }
.content img { max-width: 100%; height: auto; }
.content video, .content audio { width: 100%; display: block; }
.h-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.h-stack h1 { margin-top: 0px; margin-bottom: 0px; flex: 1; }
.app-icon { width: 48px; height: 48px; }
hr { border: none; color: rgba(0, 0, 0, 0.1); background-color: rgba(0, 0, 0, 0.1); height: 2px; }
.subtitle { color: #999; font-size: 12px; }

#breadcrumb {
  font-size: 14px;
  padding: 5px;
  line-height: 1;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chevron {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("chevron.png");
  background-size: 12px 12px;
}

.list-items { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; gap: 10px; align-items: center; }
.list-item-prefix { font-size: 14px; min-width: 6em; white-space: nowrap; }
.list-item-avatar { display: flex; align-items: center; flex: none; }
.list-item-title { flex: 1; }
.list-item-count { font-size: 14px; color: #999; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: block; border: none; }
.avatar:hover { box-shadow: var(--shadow-highlight); }
.author { display: flex; align-items: center; gap: 10px; }
.author-name { font-size: 14px; }
.page-info { font-size: 14px; color: #999; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 2em; font-size: 14px; }
.tags .quiet { color: #999; }
.pager { display: flex; justify-content: space-between; margin-top: 20px; font-size: 14px; }

@media (min-width: 600px) and (max-width: 800px) {
  .wrapper { align-items: flex-start; }
  #app {
    min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: 0px;
    border-radius: 0px;
  }
  .sidebar { min-width: 160px; border-top-left-radius: 0px; border-bottom-left-radius: 0px; }
  .main { border-top-right-radius: 0px; border-bottom-right-radius: 0px; }
}
@media (max-width: 600px) {
  .wrapper { align-items: flex-start; }
  #app {
    min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: 0px;
    border-radius: 0px;
    flex-direction: column;
  }
  .sidebar {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 160px;
    padding: 0px;
  }
  .sidebar-inner { flex-direction: row; top: 0; gap: 0; overflow-x: auto; }
  .sidebar-item:link, .sidebar-item:visited { font-size: 14px; border-radius: 0px; white-space: nowrap; }
  .main { border-top-right-radius: 0px; border-bottom-right-radius: 0px; }
}
