/* ============================================================
   Photonicat forum
   Loaded after Thredded's own stylesheet. Rules marked !important
   are there to beat Thredded's defaults; classes starting with
   pf- belong to our own templates in app/views/thredded.
   ============================================================ */

.thredded--main-container {
  --pf-navy: #00274d;
  --pf-navy-2: #16395b;
  --pf-text: #1f2937;
  --pf-muted: #5b6b7c;
  --pf-faint: #8a97a6;
  --pf-line: #e6eaf0;
  --pf-soft: #f5f8fc;
  --pf-tint: #eaf1fb;
  --pf-link: #1d5fd0;
  --pf-yellow: #fde021;
  --pf-radius: 14px;

  box-sizing: border-box !important;
  max-width: 1040px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 1.25rem 1rem 3rem !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  color: var(--pf-text) !important;
  line-height: 1.5;
}

.thredded--main-container *,
.thredded--main-container *::before,
.thredded--main-container *::after {
  box-sizing: border-box;
}

/* Thredded draws hairlines around most things; start from none.
   :where() keeps this at low priority so the rules below can add
   borders back where we want them. */

.thredded--main-container :where(*:not(input):not(textarea):not(select):not(.CodeMirror):not(.CodeMirror *):not(.editor-toolbar):not(.EasyMDEContainer *)) {
  border: none !important;
  box-shadow: none !important;
}

.thredded--main-container a {
  color: var(--pf-link);
  text-decoration: none;
}

.thredded--spacer,
.thredded--currently-online,
.thredded--grid-sizer,
.thredded--messageboards--grid-sizer,
.thredded--topics--follow-info,
.thredded--topics--sticky-topics-divider {
  display: none !important;
}

.thredded--main-section {
  margin-bottom: 1rem !important;
}

.pf-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

/* === Avatars ============================================== */

.pf-avatar {
  --pf-size: 40px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--pf-size);
  height: var(--pf-size);
  overflow: hidden;
  border-radius: 50%;
  background: hsl(var(--pf-hue, 210) 48% 88%);
  color: hsl(var(--pf-hue, 210) 45% 30%);
  font-size: calc(var(--pf-size) * 0.42);
  font-weight: 700;
  line-height: 1;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.pf-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.pf-avatar--xs { --pf-size: 22px; }

.pf-avatar--sm { --pf-size: 30px; }

.pf-avatar--lg { --pf-size: 56px; }

/* === Badges =============================================== */

.pf-badge,
.thredded--user-badge {
  display: inline-flex !important;
  align-items: center;
  height: 20px;
  padding: 0 8px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  line-height: 1 !important;
  text-transform: none !important;
  white-space: nowrap;
  vertical-align: middle;
}

.pf-badge--staff { background: var(--pf-yellow) !important; color: var(--pf-navy) !important; }

.pf-badge--author { background: var(--pf-tint); color: var(--pf-link); }

.pf-badge--pinned { background: #fff3bf; color: #7a5b00; }

.pf-badge--muted { background: #eef1f5; color: var(--pf-muted); }

.pf-badge--new { background: var(--pf-tint); color: var(--pf-link); }

/* === Buttons ============================================== */

.pf-btn,
.thredded--button,
.thredded--form--submit,
input[type="submit"].thredded--form--submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 1.1rem !important;
  border: 1px solid var(--pf-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--pf-navy) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pf-btn:hover,
.thredded--button:hover {
  background: var(--pf-soft) !important;
  border-color: #cfd8e3 !important;
}

.pf-btn--primary,
.thredded--form--submit,
input[type="submit"].thredded--form--submit {
  border-color: var(--pf-navy) !important;
  background: var(--pf-navy) !important;
  color: #fff !important;
}

.pf-btn--primary:hover,
.thredded--form--submit:hover,
input[type="submit"].thredded--form--submit:hover {
  border-color: var(--pf-navy-2) !important;
  background: var(--pf-navy-2) !important;
}

.pf-btn--danger {
  border-color: #f3c7c7 !important;
  background: #fff !important;
  color: #b42318 !important;
}

.pf-btn--danger:hover {
  background: #fef3f2 !important;
}

.pf-btn:focus-visible,
.thredded--main-container a:focus-visible,
.thredded--main-container button:focus-visible {
  outline: 2px solid var(--pf-link);
  outline-offset: 2px;
}

/* === Forum home: title block ============================== */

.pf-hero {
  padding: 0.25rem 0 1rem;
}

.pf-hero--title {
  margin: 0;
  color: var(--pf-navy);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.pf-hero--intro {
  margin: 0.3rem 0 0;
  color: var(--pf-muted);
  font-size: 0.95rem;
}

.pf-hero--rules {
  max-width: 78ch;
  margin: 0.2rem 0 0;
  color: var(--pf-faint);
  font-size: 0.78rem;
}

/* === Top bar: breadcrumbs, search, account links =========== */

.thredded--main-header {
  margin: 0 0 1rem !important;
  padding: 0 !important;
  background: none !important;
}

.pf-nav {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pf-nav--crumbs {
  flex: 1 1 12rem;
  min-width: 0;
}

.pf-nav--index .pf-nav--crumbs {
  display: none;
}

.pf-crumbs {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.4rem;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
}

.pf-crumbs a {
  padding: 0 !important;
  color: var(--pf-muted) !important;
  font-weight: 500;
}

.pf-crumbs a:last-child {
  color: var(--pf-navy) !important;
  font-weight: 600;
}

.pf-crumbs a:hover {
  color: var(--pf-link) !important;
}

.pf-crumbs--sep {
  color: var(--pf-faint);
}

.pf-nav--search {
  flex: 0 1 18rem;
  min-width: 0;
}

.pf-nav--index .pf-nav--search {
  flex: 1 1 18rem;
  max-width: 26rem;
}

.thredded--navigation--search {
  position: static !important;
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}

.thredded--navigation--search label,
.thredded--navigation--search button[type="submit"] {
  display: none !important;
}

.thredded--navigation--search input[type="search"] {
  width: 100% !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 0.75rem 0 2.25rem !important;
  border: 1px solid var(--pf-line) !important;
  border-radius: 10px !important;
  background: var(--pf-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%238a97a6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.2-5.2m0 0A7.5 7.5 0 1 0 5.2 5.2a7.5 7.5 0 0 0 10.6 10.6Z'/%3E%3C/svg%3E") no-repeat 0.7rem center / 1.05rem !important;
  color: var(--pf-text) !important;
  font-size: 0.9rem !important;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
}

.thredded--navigation--search input[type="search"]:focus {
  border-color: var(--pf-link) !important;
  background-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(29, 95, 208, 0.12) !important;
  outline: none !important;
}

.pf-nav--actions {
  position: static !important;
  display: flex !important;
  flex: none;
  align-items: center;
  gap: 0.15rem;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  list-style: none !important;
}

.pf-nav--actions .thredded--user-navigation--item {
  position: static !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pf-nav--actions .thredded--user-navigation--item a {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  height: 40px;
  margin: 0 !important;
  padding: 0 0.65rem !important;
  border-radius: 10px !important;
  color: var(--pf-muted) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.pf-nav--actions .thredded--user-navigation--item a:hover,
.pf-nav--actions .thredded--is-current a {
  background: var(--pf-soft) !important;
  color: var(--pf-navy) !important;
}

.pf-nav--actions .thredded--nav-text {
  display: inline !important;
}

.thredded--icon {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
}

.thredded--user-navigation--private-topics--unread,
.thredded--user-navigation--moderation--pending-count {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: #e5484d !important;
  color: #fff !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
}

/* === Forum home: board list =============================== */

.thredded--messageboards {
  display: block !important;
}

.thredded--messageboards-group {
  display: block !important;
  margin: 0 0 1.25rem !important;
  overflow: hidden;
  border: 1px solid var(--pf-line) !important;
  border-radius: var(--pf-radius) !important;
  background: #fff;
}

.thredded--messageboards-group::before,
.thredded--messageboards-group::after {
  display: none !important;
}

.thredded--messageboards-group--title {
  margin: 0 !important;
  padding: 0.9rem 1.15rem !important;
  border-bottom: 1px solid var(--pf-line) !important;
  background: var(--pf-soft);
  color: var(--pf-navy) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}

.pf-board {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto minmax(0, 15rem);
  align-items: center;
  gap: 0.25rem 1rem;
  margin: 0 !important;
  padding: 1rem 1.15rem !important;
  border-bottom: 1px solid var(--pf-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: inherit !important;
  transition: background 0.15s ease;
}

.pf-board:last-of-type {
  border-bottom: none !important;
}

.pf-board:hover {
  background: var(--pf-soft) !important;
}

.pf-board-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--pf-tint);
  color: var(--pf-navy);
  font-size: 1.1rem;
  font-weight: 700;
}

.pf-board-icon--svg {
  width: 22px;
  height: 22px;
}

.pf-board--main {
  min-width: 0;
}

.pf-board--name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  color: var(--pf-navy);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.3;
}

.pf-board:hover .pf-board--name {
  color: var(--pf-link);
}

.pf-board--desc {
  margin: 0.15rem 0 0;
  color: var(--pf-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.pf-board--stats {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0 0.5rem;
}

.pf-board--stats > div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  min-width: 3rem;
}

.pf-board--stats dd {
  margin: 0;
  color: var(--pf-navy);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.pf-board--stats dt {
  color: var(--pf-faint);
  font-size: 0.72rem;
  font-weight: 500;
}

.pf-board--latest {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-left: 1rem;
  border-left: 1px solid var(--pf-line) !important;
  font-size: 0.8rem;
  line-height: 1.4;
}

.pf-board--latest-title {
  overflow: hidden;
  color: #374151;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-board--latest-meta {
  overflow: hidden;
  color: var(--pf-faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thredded--messageboards--actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* === Board page: heading and topic list =================== */

.pf-board-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.25rem 0 1rem;
}

.pf-board-head--main {
  flex: 1;
  min-width: 0;
}

.pf-board-head--title {
  margin: 0;
  color: var(--pf-navy);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.pf-board-head--desc {
  margin: 0.1rem 0 0;
  color: var(--pf-muted);
  font-size: 0.9rem;
}

.thredded--topics {
  overflow: hidden;
  border: 1px solid var(--pf-line) !important;
  border-radius: var(--pf-radius) !important;
  background: #fff !important;
}

.thredded--topics--topic {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  margin: 0 !important;
  padding: 0.8rem 1.15rem !important;
  border-bottom: 1px solid var(--pf-line) !important;
  transition: background 0.15s ease;
}

.thredded--topics--topic:last-of-type {
  border-bottom: none !important;
}

.thredded--topics--topic:hover {
  background: var(--pf-soft) !important;
}

.thredded--topics--title {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

.thredded--topics--title a {
  color: var(--pf-text) !important;
}

.thredded--topics--title a:hover,
.thredded--topics--topic:hover .thredded--topics--title a {
  color: var(--pf-link) !important;
}

/* Reply-count pill, as used by the private message list */

.thredded--topics--posts-count {
  position: static !important;
  flex: none;
  width: auto !important;
  min-width: 2rem !important;
  height: auto !important;
  padding: 0.2rem 0.6rem !important;
  border-radius: 999px !important;
  background: #eef1f5 !important;
  color: var(--pf-muted) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-align: center;
}

.thredded--topics--updated-by {
  flex: none;
  color: var(--pf-faint) !important;
  font-size: 0.78rem !important;
  font-style: normal !important;
  white-space: nowrap;
}

.thredded--topics--updated-by a {
  color: var(--pf-muted) !important;
}

/* Our topic row: avatar | title + meta | replies | last activity */

.pf-topic {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) 4rem 9.5rem;
  gap: 0.15rem 0.9rem;
}

.pf-topic--main {
  min-width: 0;
}

.pf-topic--title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.pf-topic--title .pf-badge {
  margin-right: 0.25rem !important;
  vertical-align: 2px;
}

/* The whole row opens the topic; other links stay clickable above it */

.pf-topic--title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.pf-topic--meta a,
.pf-topic--last a,
.pf-topic .thredded--topics--categories a {
  position: relative;
  z-index: 1;
}

.pf-topic--unread .pf-topic--title a {
  color: var(--pf-navy) !important;
  font-weight: 700;
}

.pf-topic--unread .pf-topic--title a::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--pf-link);
  vertical-align: 1px;
}

.pf-topic--meta {
  margin: 0.15rem 0 0;
  overflow: hidden;
  color: var(--pf-faint);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-topic--meta a {
  color: var(--pf-muted) !important;
  font-weight: 500;
}

.pf-topic--meta a:hover,
.pf-topic--last a:hover {
  color: var(--pf-link) !important;
}

.pf-topic--replies {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: var(--pf-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pf-topic--replies .pf-icon {
  color: var(--pf-faint);
}

.pf-topic--last {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  line-height: 1.4;
  text-align: right;
}

.pf-topic--last-user {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thredded--topics--categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.3rem 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pf-empty {
  padding: 2.5rem 1rem;
  color: var(--pf-muted);
  font-size: 0.9rem;
  text-align: center;
}

.pf-empty--title {
  margin: 0 0 0.2rem;
  color: var(--pf-navy);
  font-size: 1.05rem;
  font-weight: 700;
}

/* === Topic page: heading ================================== */

.pf-topic-head {
  display: flex !important;
  align-items: flex-start;
  gap: 1rem;
  margin: 0.25rem 0 1rem !important;
  padding: 0 !important;
  background: none !important;
}

.pf-topic-head::after {
  display: none !important;
}

.pf-topic-head--main {
  flex: 1;
  min-width: 0;
}

.thredded--topic-header--title {
  margin: 0 0 0.4rem !important;
  color: var(--pf-navy) !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
}

.thredded--topic-header--title .pf-badge {
  vertical-align: 4px;
}

.pf-topic-head--meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.45rem;
  margin: 0 !important;
  color: var(--pf-muted) !important;
  font-size: 0.85rem !important;
  font-style: normal !important;
}

.pf-topic-head--meta a {
  color: var(--pf-navy);
  font-weight: 600;
}

.pf-topic-head--meta a:hover,
.pf-topic-head--meta .pf-topic-head--edit {
  color: var(--pf-link);
}

.pf-dot {
  color: var(--pf-faint);
}

.pf-follow {
  position: static !important;
  flex: none;
  float: none !important;
  max-width: none !important;
  margin: 0.2rem 0 0 !important;
}

.pf-follow form {
  position: static !important;
  display: block !important;
  margin: 0 !important;
}

.pf-follow form button,
.pf-follow form input[type="submit"] {
  display: inline-flex !important;
  align-items: center;
  height: 36px;
  padding: 0 1rem !important;
  border: 1px solid var(--pf-line) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--pf-navy) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  white-space: nowrap;
  cursor: pointer;
}

.pf-follow form button:hover,
.pf-follow form input[type="submit"]:hover {
  background: var(--pf-soft) !important;
}

.pf-follow--on form button,
.pf-follow--on form input[type="submit"] {
  border-color: #c9d8ee !important;
  background: var(--pf-tint) !important;
}

.thredded--topic-followers {
  flex-basis: 100%;
  color: var(--pf-faint);
  font-size: 0.8rem;
}

/* === Posts ================================================ */

.pf-posts {
  border: 1px solid var(--pf-line) !important;
  border-radius: var(--pf-radius);
  background: #fff;
}

/* avatar | (name line, then content). The <header> is flattened
   so the avatar and the name line sit directly in the grid. */

.thredded--post {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.35rem 0.9rem;
  margin: 0 !important;
  padding: 1.1rem 1.25rem !important;
  border-bottom: 1px solid var(--pf-line) !important;
  background: none !important;
}

.thredded--post:last-child {
  border-bottom: none !important;
}

.thredded--post > header {
  display: contents;
}

.thredded--post .pf-avatar {
  grid-column: 1;
  grid-row: 1 / span 4;
  align-self: start;
}

.pf-post--meta {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  align-items: center;
  gap: 0.2rem 0.5rem;
  min-height: 24px;
  padding-right: 2rem;
}

.thredded--post--user,
.thredded--post--user-and-topic {
  display: inline !important;
  margin: 0 !important;
  color: var(--pf-navy) !important;
  font-size: 0.92rem !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
}

.thredded--post--user a {
  color: var(--pf-navy) !important;
}

.thredded--post--user a:hover {
  color: var(--pf-link) !important;
}

.thredded--post--created-at {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--pf-faint) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
}

a.thredded--post--created-at:hover {
  color: var(--pf-link) !important;
}

.thredded--post > .thredded--alert {
  grid-column: 2;
  margin: 0.25rem 0 0 !important;
}

.thredded--unread--post {
  background: linear-gradient(to right, var(--pf-link) 3px, transparent 3px) !important;
}

/* Post menu (quote / edit / delete) */

.thredded--post--dropdown {
  position: absolute !important;
  top: 0.85rem;
  right: 0.75rem;
  float: none !important;
  z-index: 2;
}

.thredded--post--dropdown--toggle {
  box-sizing: content-box !important;
  width: 1rem !important;
  height: 1rem !important;
  margin: 0 !important;
  padding: 0.5rem !important;
  border-radius: 8px !important;
  color: var(--pf-faint) !important;
}

.thredded--post--dropdown:hover .thredded--post--dropdown--toggle {
  background: var(--pf-soft);
  color: var(--pf-navy) !important;
}

.thredded--post--dropdown--actions {
  margin-top: 0 !important;
  border: 1px solid var(--pf-line) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 39, 77, 0.12) !important;
}

.thredded--post--dropdown--actions--item {
  padding: 0.6rem 0.9rem !important;
  color: var(--pf-text) !important;
  font-size: 0.85rem !important;
  cursor: pointer;
}

.thredded--post--dropdown--actions--item:hover {
  background: var(--pf-soft) !important;
}

/* Post body */

.thredded--post--content {
  grid-column: 2;
  min-width: 0;
  color: var(--pf-text) !important;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
  overflow-wrap: anywhere;
}

.thredded--post--content > *:first-child { margin-top: 0 !important; }

.thredded--post--content > *:last-child { margin-bottom: 0 !important; }

.thredded--post--content p {
  margin: 0 0 0.7rem !important;
}

.thredded--post--content h1,
.thredded--post--content h2,
.thredded--post--content h3,
.thredded--post--content h4,
.thredded--post--content h5,
.thredded--post--content h6 {
  margin: 1.1rem 0 0.4rem !important;
  color: var(--pf-navy) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.thredded--post--content h1 { font-size: 1.3rem !important; }

.thredded--post--content h2 { font-size: 1.15rem !important; }

.thredded--post--content h3 { font-size: 1.05rem !important; }

.thredded--post--content h4,
.thredded--post--content h5,
.thredded--post--content h6 { font-size: 0.95rem !important; }

.thredded--post--content ul,
.thredded--post--content ol {
  margin: 0 0 0.7rem 1.35rem !important;
  padding: 0 !important;
}

.thredded--post--content ul { list-style: disc !important; }

.thredded--post--content ol { list-style: decimal !important; }

.thredded--post--content li { margin-bottom: 0.2rem !important; }

.thredded--post--content a {
  color: var(--pf-link) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.thredded--post--content img {
  max-width: 100% !important;
  height: auto !important;
  margin: 0.25rem 0 !important;
  border-radius: 8px !important;
}

.thredded--post--content hr {
  margin: 1.25rem 0 !important;
  border-top: 1px solid var(--pf-line) !important;
}

.thredded--post--content table {
  display: block;
  width: -moz-max-content;
  width: max-content;
  max-width: 100%;
  margin: 0.75rem 0 !important;
  overflow-x: auto;
  border-collapse: collapse !important;
  font-size: 0.875rem;
}

.thredded--post--content th,
.thredded--post--content td {
  padding: 0.45rem 0.8rem !important;
  border: 1px solid var(--pf-line) !important;
  text-align: left !important;
}

.thredded--post--content th {
  background: var(--pf-soft) !important;
  font-weight: 600 !important;
}

.thredded--post--content blockquote {
  margin: 0 0 0.7rem !important;
  padding: 0.5rem 0.9rem !important;
  border-left: 3px solid #c9d8ee !important;
  border-radius: 0 8px 8px 0 !important;
  background: var(--pf-soft) !important;
  color: var(--pf-muted) !important;
  font-size: 0.9rem !important;
}

.thredded--post--content code {
  padding: 0.12rem 0.35rem !important;
  border-radius: 5px !important;
  background: #eef1f5 !important;
  color: #a1264b !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 0.85em !important;
}

.thredded--post--content pre {
  margin: 0 0 0.7rem !important;
  padding: 0.8rem 1rem !important;
  overflow-x: auto !important;
  border-radius: 10px !important;
  background: #0f2137 !important;
  color: #e6edf5 !important;
  font-size: 0.82rem !important;
  line-height: 1.55 !important;
}

.thredded--post--content pre code {
  padding: 0 !important;
  background: none !important;
  color: inherit !important;
  font-size: inherit !important;
}

/* === Cards, prompts, forms ================================= */

.pf-card {
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--pf-line) !important;
  border-radius: var(--pf-radius);
  background: #fff;
}

.pf-card--title {
  margin: 0 0 0.9rem !important;
  color: var(--pf-navy) !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

.pf-callout {
  margin-top: 1.25rem;
  padding: 1.5rem 1rem;
  border-radius: var(--pf-radius);
  background: var(--pf-soft);
  text-align: center;
}

.pf-callout--title {
  margin: 0 0 0.75rem;
  color: var(--pf-navy);
  font-size: 1rem;
  font-weight: 700;
}

.pf-callout--hint {
  margin: 0.75rem 0 0;
  color: var(--pf-muted);
  font-size: 0.85rem;
}

.pf-callout a:not(.pf-btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pf-callout--warning {
  background: #fff7db;
}

.pf-callout--warning .pf-callout--title {
  color: #7a5b00;
}

.thredded--form {
  padding: 0 !important;
  border-radius: 0 !important;
  background: none !important;
}

.thredded--form-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.thredded--form-list li {
  margin-bottom: 0.9rem !important;
}

.thredded--form-list li:last-child {
  margin-bottom: 0 !important;
}

.thredded--form-list label {
  display: block !important;
  margin-bottom: 0.35rem !important;
  color: #374151 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

.thredded--form-list input[type="text"],
.thredded--form-list textarea,
.thredded--form-list select {
  width: 100% !important;
  padding: 0.6rem 0.8rem !important;
  border: 1px solid #d5dbe3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--pf-text) !important;
  font-size: 0.95rem !important;
}

.thredded--form-list input[type="text"]:focus,
.thredded--form-list textarea:focus,
.thredded--form-list select:focus {
  border-color: var(--pf-link) !important;
  box-shadow: 0 0 0 3px rgba(29, 95, 208, 0.12) !important;
  outline: none !important;
}

.thredded--form-list textarea {
  min-height: 180px !important;
  line-height: 1.6 !important;
  resize: vertical !important;
}

.thredded--form-list li.captcha input[type="text"] {
  width: 64px !important;
  padding: 0.35rem 0.5rem !important;
  font-size: 0.9rem !important;
}

/* The "new topic" form is always open (no JS to expand it) */

.thredded--is-compact input[type="submit"],
.thredded--is-compact label {
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.thredded--is-compact li:not(.title) {
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.thredded--form-list--admin-options {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem !important;
  padding: 0.25rem 0 !important;
}

.thredded--form-list--admin-options label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  margin: 0 !important;
  color: var(--pf-muted) !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}

.thredded--form-list--admin-options input[type="checkbox"] {
  position: static !important;
  width: 16px !important;
  height: 16px !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-appearance: checkbox !important;
  -moz-appearance: auto !important;
       appearance: auto !important;
  cursor: pointer !important;
}

/* Markdown editor */

.thredded--form .EasyMDEContainer {
  width: 100% !important;
}

.thredded--form .EasyMDEContainer .editor-toolbar {
  border: 1px solid #d5dbe3 !important;
  border-bottom: none !important;
  border-radius: 10px 10px 0 0 !important;
  background: var(--pf-soft);
}

.thredded--form .EasyMDEContainer .CodeMirror {
  min-height: 200px !important;
  border: 1px solid #d5dbe3 !important;
  border-radius: 0 0 10px 10px !important;
  font-size: 0.95rem !important;
}

.thredded--topic-delete--wrapper {
  margin-top: 1.5rem;
  text-align: right;
}

/* === Notices and pagination ================================ */

.thredded--flash-message,
.thredded--alert,
.thredded--topic--locked-notice {
  margin: 0 0 1rem !important;
  padding: 0.7rem 1rem !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
}

.thredded--topic--locked-notice {
  margin-top: 1rem !important;
}

.thredded--pagination-top,
.thredded--pagination-bottom {
  padding: 0 !important;
}

.thredded--pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin: 1rem 0 !important;
  padding: 0 !important;
}

.thredded--pagination > span {
  margin: 0 !important;
}

.thredded--pagination > span > a,
.thredded--pagination > span.current {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem !important;
  border-radius: 9px !important;
  color: var(--pf-muted) !important;
  font-size: 0.875rem !important;
  font-weight: 500;
}

.thredded--pagination > span > a:hover {
  background: var(--pf-soft) !important;
  color: var(--pf-navy) !important;
}

.thredded--pagination > span.current {
  background: var(--pf-navy) !important;
  color: #fff !important;
  font-weight: 700;
}

/* === Phones and small tablets ============================== */

@media (max-width: 760px) {
  .pf-board {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    padding: 0.9rem 1rem !important;
  }

  .pf-board-icon {
    width: 40px;
    height: 40px;
  }

  .pf-board--stats,
  .pf-board--latest {
    grid-column: 2;
  }

  .pf-board--stats {
    gap: 0.75rem;
    margin-top: 0.3rem;
    padding: 0;
  }

  .pf-board--stats > div {
    flex-direction: row-reverse;
    align-items: baseline;
    gap: 0.25rem;
    min-width: 0;
  }

  .pf-board--stats dd {
    font-size: 0.8rem;
  }

  .pf-board--latest {
    flex-direction: row;
    gap: 0.4rem;
    padding-left: 0;
    border-left: none !important;
  }

  .pf-board--latest-meta {
    flex: none;
  }
}

@media (max-width: 640px) {
  .thredded--main-container {
    padding: 0.9rem 0.75rem 2.5rem !important;
  }

  .pf-hero--title,
  .pf-board-head--title,
  .thredded--topic-header--title {
    font-size: 1.3rem !important;
  }

  .pf-nav--crumbs {
    flex-basis: 100%;
  }

  .pf-nav--search,
  .pf-nav--index .pf-nav--search {
    flex: 1 1 0;
    max-width: none;
  }

  .pf-nav--actions .thredded--nav-text {
    display: none !important;
  }

  .pf-nav--actions .thredded--user-navigation--item a {
    padding: 0 0.6rem !important;
  }

  .pf-board-head {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .pf-board-head--main {
    flex-basis: 100%;
  }

  .pf-board-head .pf-board-icon {
    display: none;
  }

  .pf-topic {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: start;
    padding: 0.8rem 0.9rem !important;
  }

  .pf-topic .pf-avatar {
    --pf-size: 36px;
    grid-row: 1 / span 2;
  }

  .pf-topic--meta {
    white-space: normal;
  }

  .pf-topic--replies {
    padding-top: 0.1rem;
  }

  .pf-topic--last {
    flex-direction: row;
    grid-column: 2 / span 2;
    justify-content: flex-start;
    gap: 0.35rem;
    text-align: left;
  }

  .pf-topic--last::before {
    content: "↳";
  }

  .pf-topic-head {
    flex-direction: column;
    gap: 0.6rem;
  }

  .pf-follow {
    margin: 0 !important;
  }

  .thredded--post {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 0.3rem 0.7rem;
    padding: 0.9rem 0.9rem !important;
  }

  .thredded--post .pf-avatar {
    --pf-size: 32px;
  }

  .pf-card {
    padding: 1rem 0.9rem;
  }

  .thredded--topic-delete--wrapper {
    text-align: left;
  }
}

/* === Thredded's own breadcrumb lists (private messages, edit pages) === */

ul.thredded--navigation-breadcrumbs {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.4rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  font-size: 0.875rem !important;
}

ul.thredded--navigation-breadcrumbs li {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--pf-navy);
  font-size: 0.875rem !important;
  font-weight: 600;
}

ul.thredded--navigation-breadcrumbs li::before,
ul.thredded--navigation-breadcrumbs li::after {
  content: none !important;
}

ul.thredded--navigation-breadcrumbs li + li::before {
  content: "\203A" !important;
  color: var(--pf-faint);
  font-weight: 400;
}

ul.thredded--navigation-breadcrumbs li a {
  padding: 0 !important;
  color: var(--pf-muted) !important;
  font-size: 0.875rem !important;
  font-weight: 500;
}

ul.thredded--navigation-breadcrumbs li:last-child a {
  color: var(--pf-navy) !important;
  font-weight: 600;
}

/* Empty states on Thredded's own pages */

.thredded--empty {
  padding: 2.5rem 1rem !important;
  text-align: center;
}

.thredded--empty--title {
  margin: 0 0 1rem !important;
  color: var(--pf-navy) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
}
