*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.4;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(360px, 1fr);
  align-items: stretch;
}

.content {
  padding: 48px 48px 40px 48px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
}

.header-block {
  flex-shrink: 0;
}

.content-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.content-body__gap--top {
  flex: 1;
  min-height: 0;
}

.content-body__gap--bottom {
  flex: 2;
  min-height: 0;
}

.image-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: inherit;
}

.ascii-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

h1 {
  font-size: 32px;
  line-height: 1.4;
  margin: 0 0 0 0;
}

.location {
  margin: 0 0 1em 0;
  font-size: 0.8em;
}

.location-label {
  display: inline;
}

.location-meta {
  display: inline;
}

.weather {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.weather.is-loaded {
  opacity: 1;
}

.block {
  margin: 0 0 1.2em 0;
}

.label {
  font-weight: 700;
  margin: 0 0 0.2em 0;
}

.label-inline {
  font-weight: 700;
}

.line {
  margin: 0;
  line-height: 1.4;
}

.line + .line {
  margin-top: 0.2em;
}

.logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.72em;
  height: 0.72em;
  margin: 0;
  vertical-align: middle;
}

.logo {
  width: 0.72em;
  height: 0.72em;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.logo--revolut {
  border: 1px solid #d9d9d9;
  background: #fff;
}

.logo-wrapper:not(.has-image) {
  display: none;
}

.muted {
  color: rgba(0, 0, 0, 0.5);
}

.fetched {
  color: rgba(0, 0, 0, 0.5);
}

.media-link .media-title {
  color: inherit;
}

.company-link {
  color: inherit;
  text-decoration: none;
  display: inline;
  padding: 0;
}

.company-name {
  margin: 0 0 0 0.2em;
}

.company-link .logo-wrapper {
  transition: transform 0.2s ease;
  transform: translateY(-2px);
}

.company-link:hover .logo-wrapper {
  transform: translateY(-2px) scale(1.2);
}

.connector {
  margin: 0;
}

.block--past .line,
.line--past {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.block--past .line:hover {
  opacity: 1;
}

.company-years {
  margin-left: 0.1em;
}

.media-link {
  color: inherit;
  text-decoration: none;
  display: inline;
  margin-left: 0;
}

.media-link--block {
  white-space: nowrap;
}

.media-link--block .media-title,
.media-link--block .media-rating {
  white-space: normal;
}

.media-thumb {
  width: auto;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  display: none;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.media-thumb.is-loaded {
  display: inline-block;
}

.media-link--block:hover .media-thumb.is-loaded {
  transform: rotate(15deg) scale(1.2);
}

.media-link--block .media-thumb {
  vertical-align: middle;
}

.media-meta .media-source-link {
  color: inherit;
}

.media-source-link {
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

.footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  line-height: 1.4;
  font-size: 0.8em;
}

.footer::before {
  content: "";
  display: block;
  flex: 1 1 0;
  min-height: 0;
  max-height: 2.5em;
}

.footer-line {
  display: block;
}

.footer-line--secondary {
  font-size: 0.85em;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: none;
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
  }

  .image-panel {
    order: -1;
    min-height: 50vh;
  }

  .ascii-frame {
    min-height: 50vh;
  }

  .content {
    padding: 32px 40px 40px 40px;
  }

  .content-body__gap--top {
    min-height: 1.5em;
  }

  .content-body__gap--bottom {
    min-height: 2em;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #1c1c1c;
    color: #fff;
  }

  .muted,
  .fetched {
    color: rgba(255, 255, 255, 0.65);
  }

  .media-link .media-title {
    color: inherit;
  }

  .logo--revolut {
    border-color: rgba(255, 255, 255, 0.4);
    background: #fff;
  }
}
