:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  max-width: 960px;
  margin: 20px auto;
  padding: 0 16px 32px;
  font-family: Arial, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #222;
  background: #f6f6ef;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 7px 0;
  border-bottom: 1px solid #d8d8d0;
  color: #333;
  background: transparent;
}

.nav-brand {
  justify-self: start;
  font-weight: 700;
}

.nav-center,
.nav-auth {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-center {
  justify-self: center;
}

.nav-auth {
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#turnstile-container {
  min-height: 65px;
  margin: 12px 0;
}

a {
  color: #222;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

h2,
h3 {
  margin: 18px 0 10px;
  font-size: 16px;
}

#post h2 {
  margin-bottom: 3px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.feed-item {
  margin-bottom: 12px;
}

.title-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}

.title-line a {
  font-size: 14px;
}

.title-line > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.vote-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #6d6d67;
  font-size: 12px;
  white-space: nowrap;
}

.external-link {
  color: #6d6d67;
  font-size: 12px;
}

.metadata,
.reply-line,
.source-url,
.message {
  color: #6d6d67;
  font-size: 12px;
}

.metadata {
  margin-left: 19px;
}

.feed-item > .metadata {
  margin-left: 72px;
}

.metadata a,
.reply-line a,
.source-url a {
  color: inherit;
}

.vote-button {
  width: 15px;
  min-width: 15px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #999;
  opacity: 0.7;
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.vote-button.voted {
  color: #000;
  opacity: 1;
  font-weight: 700;
}

.vote-button:disabled {
  cursor: wait;
}

.more-link {
  display: inline-block;
  margin: 8px 0 0 19px;
}

.source-url {
  margin: 6px 0 0 19px;
  overflow-wrap: anywhere;
}

.user-text {
  margin-top: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#discussion {
  margin-top: 26px;
}

#comment-text,
textarea,
.wide-input {
  width: min(100%, 680px);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  padding: 5px 6px;
  border: 1px solid #bbb;
  border-radius: 0;
  color: #222;
  background: #fff;
}

button:not(.vote-button) {
  padding: 3px 8px;
}

.comment {
  margin-top: 16px;
  margin-left: calc(var(--comment-depth) * 20px);
}

.comment .metadata {
  margin-left: 0;
}

.comment .user-text {
  margin: 3px 0;
}

.reply-line {
  margin-top: 2px;
}

.error {
  color: #8a2d2d;
}

.link-button {
  margin: 0;
  padding: 0 !important;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
  text-decoration: underline;
}

.link-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.flag-link {
  color: #777;
}

.flagged {
  color: #999;
}

.report-host:empty {
  display: none;
}

.report-host {
  margin-left: 19px;
}

.comment .report-host {
  margin-left: 0;
}

.report-form {
  max-width: 560px;
  margin: 7px 0 10px;
  padding-left: 9px;
  border-left: 2px solid #ccc;
  color: #555;
  font-size: 12px;
}

.report-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  margin: 3px 0 6px;
}

.report-reasons label {
  white-space: nowrap;
}

.report-note {
  display: block;
  width: min(100%, 420px);
  margin: 5px 0;
}

.report-actions {
  margin-top: 5px;
}

.hidden-label {
  color: #333;
  font-weight: 700;
}

.admin-report {
  margin-bottom: 20px;
}

.admin-report-title {
  font-weight: 700;
}

.admin-report-meta,
.admin-actions {
  color: #6d6d67;
  font-size: 12px;
}

.admin-actions a,
.admin-actions button {
  color: inherit;
}

.admin-comment-text,
.admin-report-note {
  margin: 3px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-report-note {
  color: #555;
  font-size: 12px;
}

.user-header {
  margin-bottom: 0;
}

.user-section {
  margin-top: 24px;
}

.user-entry {
  margin-bottom: 14px;
}

.user-meta,
.user-comment-context {
  color: #6d6d67;
  font-size: 12px;
}

.user-meta a,
.user-comment-context a {
  color: inherit;
}

.user-comment-text {
  margin: 3px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  body {
    margin-top: 0;
    padding: 0 9px 24px;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px 12px;
  }

  .nav-center {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .nav-auth {
    gap: 10px;
  }

  .comment {
    margin-left: calc(var(--comment-depth) * 12px);
  }
}
