body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;

  border-bottom: 2px solid #777;
}

.profile-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.create-post {
  border: 1px solid black;
  padding: 4px 10px;
  text-decoration: none;
  color: black;
}

.profile-link {
  text-decoration: none;
  color: black;
}

.logo {
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  font-weight: bold;
  color: black;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1em;
  gap: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1.5rem 1rem;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
}
.post-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}
.post-card:hover { background: rgba(255,255,255,0.02); }

.rank {
  font-size: 1rem;
  color: #414040;
  letter-spacing: 0.05em;
  text-align: right;
  align-self: center;
}

.voting-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vote-btn {
  background: none;
  border: 1px solid #414040;
  color: #414040;
  font-size: 0.65rem;
  width: 28px;
  height: 22px;
  border-radius: 5px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-btn.up:hover  { background: #d4f000;   color: #000; border-color: #d4f000; }

.vote-btn.down:hover{ background: #ff4444; color: #fff; border-color: #ff4444; }

.vote-btn.voted-up  { background: #d4f000;   color: #000; border-color: #d4f000; }  /*TBD: Assign voted-up class if user upvoted*/

.vote-btn.voted-down{ background: #ff4444; color: #fff; border-color: #ff4444; }  /*TBD: Assign voted-down class if user downvoted*/

.score {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 2ch;
  text-align: center;
}

.post-thumbnail-link { display: block; border-radius: 2px; overflow: hidden; }

.post-thumbnail {
  width: 120px;
  height: 80px;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.2s;
}

.post-thumbnail-link:hover .post-thumbnail { filter: grayscale(0%); }

.post-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: max-content; }

.post-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.post-sub {
  font-size: 0.7rem;
  color: #414040;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dot { color: #414040; }

.author { color: #9dae00; }

.comments-link { color: #414040; }

.post-page {
  padding: 1.5rem 1rem;
}

.post-page .post-card {
  width: min(100%, 900px);
  margin: 0 auto;
  align-items: flex-start;
  gap: 1rem;
}

.post-page .post-body {
  min-width: 0;
}

.register-page {
  margin: 2rem auto;
  padding: 0 1rem;
}

.register-form {
  margin-top: 1rem;
}

.register-form .form-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.register-form .form-row label {
  width: 160px;
  text-align: left;
}

.register-form .form-row input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem;
  max-width: 300px;
}

.register-form h2 {
  margin: 1.5rem 0 1rem;
}

.register-form .form-actions {
  margin-top: 1rem;
  padding-left: calc(160px + 0.75rem);
}

.register-form .form-actions .btn-submit {
  padding: 0.5rem;
}

.error {
  color: oklch(64.5% 0.246 16.439);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 2px;
}

.post-img-expanded {
  object-fit: cover;
  height: 30vh;
  width: auto;
  max-width: 100vh;
}

.comment-container {
  display: flex;
  align-items: flex-start;
  border: 1px solid #bbb;
  border-radius: 5px;
  margin: 5px;
}

.comment-field {
  padding: 5px;
  flex: 1;
}

.comment-text {
  white-space: pre-line;
  margin-left: 15px;
  display: block;
}

.comment-date {
  font-style: italic;
  font-size: small;
}

.comment-buttons {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  align-items: end;
  margin-right: 10px;
  gap: 5px;
}

.description {
  white-space: pre-line;
}