.update-detail-page {
  width: 100%;
  margin: 0 auto;
}

.update-detail-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.updates-back-link {
  align-self: flex-start;
  color: #0f8b8d;
  font-weight: 700;
  text-decoration: none;
}

.updates-back-link:hover {
  color: #0b6f71;
  text-decoration: underline;
}

.update-detail-hero,
.update-body-panel,
.comments-section,
.comment-compose-panel {
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(25, 40, 71, 0.08);
}

.update-detail-hero,
.update-body-panel,
.comments-section,
.comment-compose-panel {
  padding: clamp(22px, 4vw, 32px);
}

.update-kicker {
  margin-bottom: 14px;
  color: #0f8b8d;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.update-title {
  margin: 0 0 16px;
  color: #172233;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.08;
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.update-date,
.update-comments,
.comments-count {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

.update-date {
  background: #edf3f8;
  color: #415165;
}

.update-comments,
.comments-count {
  background: rgba(15, 139, 141, 0.12);
  color: #0b6f71;
}

.update-body {
  max-width: 70ch;
  color: #1e2a3b;
  font-size: 1.05rem;
  line-height: 1.8;
}

.update-body > *:first-child {
  margin-top: 0;
}

.update-body > *:last-child {
  margin-bottom: 0;
}

.update-body p,
.update-body ul,
.update-body ol,
.update-body blockquote {
  margin-bottom: 1rem;
}

.comments-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.comments-title {
  margin: 0;
  color: #223246;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment {
  padding: 16px;
  background-color: #f7f8fb;
  border-radius: 12px;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.comment-author {
  color: #172233;
  font-weight: 700;
}

.comment-date {
  color: #6b7686;
  font-size: 0.92rem;
}

.comment-body {
  margin: 0;
  color: #405064;
  line-height: 1.65;
}

.comments-empty {
  margin: 0;
  color: #5c6a7d;
}

.comment-compose-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.comment-compose-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.comment-compose-copy {
  max-width: 58ch;
}

.comment-compose-kicker {
  margin-bottom: 12px;
  color: #0f8b8d;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.comment-compose-lead {
  margin: 12px 0 0;
  color: #546376;
  line-height: 1.7;
}

.comment-compose-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.comment-compose-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: #edf3f8;
  color: #415165;
  font-size: 0.88rem;
  font-weight: 600;
}

.comment-form {
  max-width: 720px;
}

.comment-form input[type="submit"] {
  min-width: 140px;
  width: auto;
}

@media (max-width: 640px) {
  .update-detail-hero,
  .update-body-panel,
  .comments-section,
  .comment-compose-panel {
    padding: 20px 16px;
  }

  .comments-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-compose-header {
    flex-direction: column;
  }

  .comment-compose-badges {
    justify-content: flex-start;
  }

  .comment-form {
    max-width: none;
  }

  .comment-form input[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}

.dark-mode .updates-back-link {
  color: #64d2d4;
}

.dark-mode .updates-back-link:hover {
  color: #90f0f2;
}

.dark-mode .update-detail-hero,
.dark-mode .update-body-panel,
.dark-mode .comments-section,
.dark-mode .comment-compose-panel {
  background: #262626;
  box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
}

.dark-mode .update-title,
.dark-mode .comments-title,
.dark-mode .comment-author {
  color: #f0f3f8;
}

.dark-mode .update-date {
  background: #333a46;
  color: #d0d7e4;
}

.dark-mode .update-comments,
.dark-mode .comments-count {
  background: rgba(100, 210, 212, 0.14);
  color: #8ee9eb;
}

.dark-mode .update-body,
.dark-mode .comment-body,
.dark-mode .comments-empty,
.dark-mode .comment-compose-lead {
  color: #d0d7e4;
}

.dark-mode .comment {
  background-color: #333a46;
}

.dark-mode .comment-compose-badge {
  background: #333a46;
  color: #d0d7e4;
}

.dark-mode .comment-date {
  color: #aeb8ca;
}
