.forum-page {
  background: var(--theme-canvas, #f6f8fb);
  color: var(--theme-ink, #172126);
  font-size: .88rem;
  min-height: 70vh;
  padding: 1.25rem 0 2rem;
}

.forum-page .container {
  max-width: 1180px;
}

.forum-hero,
.forum-section-head {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.forum-hero > div {
  max-width: 850px;
}

.forum-hero h1,
.forum-section-head h1,
.forum-form-wrap h1,
.forum-post h1,
.forum-replies-title,
.forum-reply-box h2 {
  color: var(--theme-ink, #172126);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: .25rem 0;
}

.forum-hero p,
.forum-section-head p,
.forum-form-wrap > p {
  color: var(--theme-muted, #607080);
  font-size: .9rem;
  line-height: 1.45;
  margin: 0;
}

.forum-page .mk-eyebrow {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .055em;
}

.forum-page .btn,
.forum-page button:not(.navbar-toggler) {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 500;
  gap: .3rem;
  justify-content: center;
  line-height: 1;
  min-height: 30px;
  padding: .3rem .65rem;
}

.forum-new-topic {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.forum-membership-note {
  margin: 0 0 .75rem;
}

.forum-page .alert {
  border-radius: 4px;
  font-size: .82rem;
  margin-bottom: .75rem;
  padding: .55rem .75rem;
}

.forum-panel {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 4px;
  box-shadow: none;
  margin-bottom: .85rem;
  overflow: hidden;
}

.forum-panel-head {
  align-items: center;
  background: var(--theme-surface-raised, #f8fafb);
  border-bottom: 1px solid var(--theme-line, #dce2e8);
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  min-height: 34px;
  padding: .4rem .7rem;
}

.forum-panel-head h2 {
  color: var(--theme-ink, #172126);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.forum-panel-head > a {
  color: var(--theme-primary, #054a85);
  font-size: .76rem;
  font-weight: 500;
  text-decoration: none;
}

.forum-panel-kicker {
  color: var(--theme-muted, #607080);
  display: block;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.forum-table-wrap {
  overflow-x: auto;
}

.forum-table {
  border-collapse: collapse;
  color: var(--theme-ink, #172126);
  font-size: .82rem;
  margin: 0;
  table-layout: fixed;
  width: 100%;
}

.forum-table th,
.forum-table td {
  border-bottom: 1px solid var(--theme-line, #dce2e8);
  padding: .48rem .65rem;
  text-align: left;
  vertical-align: middle;
}

.forum-table thead th {
  background: var(--theme-surface-raised, #f8fafb);
  color: var(--theme-muted, #607080);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.forum-table tbody tr:last-child td {
  border-bottom: 0;
}

.forum-table tbody tr:not(.forum-section-row):hover {
  background: color-mix(in srgb, var(--theme-primary-soft, #e8f2fa) 24%, transparent);
}

.forum-table .forum-section-row th {
  background: var(--theme-primary-soft, #e8f2fa);
  border-bottom-color: color-mix(in srgb, var(--theme-primary, #054a85) 16%, transparent);
  color: var(--theme-primary, #054a85);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .035em;
  padding: .32rem .65rem;
  text-transform: uppercase;
}

.forum-number-column {
  text-align: center !important;
  width: 68px;
}

.forum-last-column {
  width: min(26vw, 230px);
}

.forum-number {
  color: var(--theme-muted, #607080);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: center !important;
}

.forum-category-main {
  align-items: center;
  display: flex;
  gap: .55rem;
  min-width: 0;
}

.forum-category-icon,
.forum-recent-icon {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--theme-primary, #054a85);
  display: inline-flex;
  flex: 0 0 24px;
  font-size: .9rem;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.forum-category-title,
.forum-topic-title {
  color: var(--theme-ink, #172126);
  display: inline-block;
  font-size: .84rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.forum-category-title:hover,
.forum-topic-title:hover,
.forum-last a:hover {
  color: var(--theme-primary, #054a85);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.forum-category-main small,
.forum-topic-meta {
  color: var(--theme-muted, #607080);
  display: block;
  font-size: .72rem;
  line-height: 1.35;
  margin-top: .08rem;
}

.forum-inline-action {
  color: var(--theme-primary, #054a85);
  display: inline-block;
  font-size: .68rem;
  font-weight: 500;
  margin-top: .12rem;
  text-decoration: none;
}

.forum-last {
  color: var(--theme-muted, #607080);
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.forum-last > a {
  color: var(--theme-ink, #172126);
  display: block;
  font-size: .76rem;
  font-weight: 500;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-last time,
.forum-recent-stats time {
  color: var(--theme-muted, #607080);
  display: block;
  font-size: .68rem;
  margin-top: .08rem;
}

.forum-no-activity {
  color: var(--theme-muted, #607080);
  font-style: italic;
}

.forum-recent-panel {
  margin-top: .85rem;
}

.forum-recent-list {
  display: grid;
}

.forum-recent-item {
  align-items: center;
  border-bottom: 1px solid var(--theme-line, #dce2e8);
  color: var(--theme-ink, #172126);
  display: flex;
  gap: .5rem;
  min-height: 42px;
  padding: .4rem .65rem;
  text-decoration: none;
}

.forum-recent-item:last-child {
  border-bottom: 0;
}

.forum-recent-item:hover {
  background: color-mix(in srgb, var(--theme-primary-soft, #e8f2fa) 24%, transparent);
  color: var(--theme-ink, #172126);
}

.forum-recent-main {
  min-width: 0;
}

.forum-recent-main strong {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.forum-recent-main small {
  color: var(--theme-muted, #607080);
  display: block;
  font-size: .7rem;
  margin-top: .06rem;
}

.forum-recent-stats {
  color: var(--theme-muted, #607080);
  font-size: .7rem;
  margin-left: auto;
  min-width: 98px;
  text-align: right;
}

.forum-badge {
  border: 1px solid transparent;
  border-radius: 3px;
  display: inline-flex;
  font-size: .61rem;
  font-weight: 600;
  gap: .15rem;
  margin-right: .22rem;
  padding: .1rem .3rem;
  vertical-align: .08em;
  white-space: nowrap;
}

.forum-badge.is-pinned {
  background: #fff8df;
  border-color: #eadca8;
  color: #6a5500;
}

.forum-badge.is-solved {
  background: #edf8f1;
  border-color: #bdddc8;
  color: #176238;
}

.forum-badge.is-locked,
.forum-badge.is-archived {
  background: #f1f3f5;
  border-color: #d8dde2;
  color: #46525d;
}

.forum-breadcrumb {
  color: var(--theme-muted, #607080);
  display: flex;
  flex-wrap: wrap;
  font-size: .72rem;
  gap: .35rem;
  margin-bottom: .65rem;
}

.forum-breadcrumb a {
  color: var(--theme-primary, #054a85);
}

.forum-empty {
  color: var(--theme-muted, #607080);
  font-size: .8rem;
  padding: 1rem;
  text-align: center;
}

.forum-form-wrap {
  max-width: 920px;
}

.forum-form {
  display: grid;
  gap: .7rem;
}

.forum-form label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: .2rem;
}

.forum-form small {
  color: var(--theme-muted, #607080);
  display: block;
  font-size: .7rem;
  margin-top: .18rem;
}

.forum-form .form-control,
.forum-form .form-select {
  border-radius: 4px;
  font-size: .82rem;
  padding: .38rem .5rem;
}

.math-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  margin-bottom: .28rem;
}

.math-toolbar button {
  background: var(--theme-surface-raised, #f7f8fa);
  border: 1px solid var(--theme-line, #dce2e8);
  color: var(--theme-ink, #172126);
  min-width: 30px;
  padding: .22rem .4rem;
}

.math-toolbar button:hover {
  border-color: var(--theme-primary, #054a85);
}

.math-help {
  color: var(--theme-muted, #607080);
  font-size: .7rem;
  margin: .22rem 0;
}

.math-preview {
  background: var(--theme-surface-raised, #f7f8fa);
  border: 1px dashed var(--theme-line-strong, #bcc7d0);
  border-radius: 4px;
  font-size: .82rem;
  margin-top: .35rem;
  min-height: 48px;
  padding: .5rem;
}

.forum-post {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 4px;
  margin-bottom: .65rem;
  overflow: hidden;
}

.forum-post header {
  align-items: center;
  background: var(--theme-surface-raised, #f8fafb);
  border-bottom: 1px solid var(--theme-line, #dce2e8);
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .4rem .65rem;
}

.forum-post h1 {
  display: inline;
  margin-left: .35rem;
}

.forum-topic-label,
.forum-status {
  border-radius: 3px;
  display: inline-block;
  font-size: .64rem;
  font-weight: 600;
  padding: .1rem .3rem;
}

.forum-topic-label {
  background: var(--theme-primary-soft, #e8f2fa);
  color: var(--theme-primary, #054a85);
}

.forum-status {
  background: #edf1f4;
  color: #43515d;
  white-space: nowrap;
}

.forum-post-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 92px;
}

.forum-author {
  background: var(--theme-surface-raised, #f8fafb);
  border-right: 1px solid var(--theme-line, #dce2e8);
  display: block;
  margin: 0;
  padding: .55rem .65rem;
}

.forum-author strong {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.forum-author span {
  color: var(--theme-muted, #607080);
  display: block;
  font-size: .68rem;
  margin-top: .15rem;
}

.forum-message {
  min-width: 0;
  padding: .65rem .75rem;
}

.forum-body {
  color: var(--theme-ink, #172126);
  font-size: .84rem;
  line-height: 1.58;
  min-height: 42px;
  overflow-wrap: anywhere;
}

.forum-post footer {
  align-items: center;
  border-top: 1px solid var(--theme-line, #dce2e8);
  display: flex;
  justify-content: space-between;
  margin-top: .6rem;
  padding-top: .45rem;
}

.forum-replies-title {
  margin: .85rem 0 .4rem;
}

.forum-replies-title span {
  color: var(--theme-muted, #607080);
  font-weight: 400;
}

.forum-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .6rem;
}

.forum-attachments img {
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 3px;
  height: 105px;
  object-fit: cover;
  width: 150px;
}

.forum-file {
  align-items: center;
  background: var(--theme-surface-raised, #f7f8fa);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 3px;
  display: flex;
  font-size: .72rem;
  gap: .3rem;
  padding: .35rem .5rem;
  text-decoration: none;
}

.forum-reply-box {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 4px;
  margin-top: .85rem;
  padding: .65rem .75rem;
}

.forum-report summary {
  color: var(--theme-muted, #607080);
  cursor: pointer;
  font-size: .7rem;
}

.forum-report form {
  display: flex;
  gap: .3rem;
  margin-top: .3rem;
}

.forum-report textarea {
  font-size: .75rem;
  max-width: 240px;
}

.forum-report button {
  font-size: .68rem;
}

.math-error,
.errorlist {
  color: #b42318;
}

.errorlist {
  font-size: .72rem;
  margin: .2rem 0 0;
  padding-left: 1rem;
}

@media (max-width: 760px) {
  .forum-page {
    padding: .85rem 0 1.4rem;
  }

  .forum-hero,
  .forum-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: .5rem;
  }

  .forum-new-topic,
  .forum-section-head .btn {
    align-self: start;
  }

  .forum-table-wrap {
    overflow: visible;
  }

  .forum-table,
  .forum-table tbody,
  .forum-table tr,
  .forum-table td,
  .forum-table th {
    display: block;
    width: 100%;
  }

  .forum-table {
    table-layout: auto;
  }

  .forum-table thead {
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }

  .forum-table tbody tr:not(.forum-section-row) {
    border-bottom: 1px solid var(--theme-line, #dce2e8);
    padding: .15rem 0;
  }

  .forum-table tbody tr:last-child {
    border-bottom: 0;
  }

  .forum-table th,
  .forum-table td {
    border: 0;
    padding: .32rem .6rem;
  }

  .forum-table .forum-section-row th {
    padding: .32rem .6rem;
  }

  .forum-table td {
    align-items: start;
    display: grid;
    gap: .45rem;
    grid-template-columns: 4.8rem minmax(0, 1fr);
    text-align: left !important;
  }

  .forum-table td::before {
    color: var(--theme-muted, #607080);
    content: attr(data-label);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .035em;
    text-transform: uppercase;
  }

  .forum-table td:first-child {
    display: block;
    padding-bottom: .4rem;
    padding-top: .5rem;
  }

  .forum-table td:first-child::before {
    display: none;
  }

  .forum-last > a {
    white-space: normal;
  }

  .forum-recent-item {
    align-items: start;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .forum-recent-stats {
    grid-column: 2;
    margin-left: 0;
    min-width: 0;
    text-align: left;
  }

  .forum-post header {
    align-items: start;
    flex-direction: column;
    gap: .3rem;
  }

  .forum-post h1 {
    display: block;
    margin: .2rem 0 0;
  }

  .forum-post-grid {
    display: block;
  }

  .forum-author {
    border-bottom: 1px solid var(--theme-line, #dce2e8);
    border-right: 0;
    display: flex;
    gap: .4rem;
  }

  .forum-author span {
    margin-top: 0;
  }

  .forum-post footer {
    align-items: start;
    flex-direction: column;
    gap: .45rem;
  }

  .forum-attachments img {
    height: auto;
    max-width: 100%;
    width: 100%;
  }
}


/* SGA: gelişmiş denklem editörü ve mobil kamera yükleme alanı */
.forum-form-wrap {
  max-width: 1180px;
}

.math-toolbar {
  align-items: center;
  background: var(--theme-surface-raised, #f7f8fa);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 4px;
  display: flex;
  gap: .35rem;
  margin-bottom: .35rem;
  padding: .3rem .4rem;
  position: relative;
}

.math-toolbar-label,
.math-pane-title,
.forum-upload-title {
  color: var(--theme-muted, #607080);
  font-size: .68rem;
  font-weight: 600;
}

.math-toolbar-label {
  flex: 0 0 auto;
  padding: 0 .2rem;
}

.math-toolbar-groups {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  min-width: 0;
}

.math-tool-group {
  position: relative;
}

.math-tool-group > summary {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 3px;
  color: var(--theme-ink, #172126);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 500;
  line-height: 1;
  list-style: none;
  min-height: 26px;
  padding: .38rem .45rem;
  user-select: none;
}

.math-tool-group > summary::-webkit-details-marker {
  display: none;
}

.math-tool-group > summary::after {
  content: " ▾";
  color: var(--theme-muted, #607080);
}

.math-tool-group[open] > summary,
.math-tool-group > summary:hover {
  border-color: var(--theme-primary, #054a85);
  color: var(--theme-primary, #054a85);
}

.math-tool-menu {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line-strong, #bcc7d0);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(20, 37, 52, .12);
  display: grid;
  gap: .2rem;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  left: 0;
  min-width: 250px;
  padding: .35rem;
  position: absolute;
  top: calc(100% + 3px);
  z-index: 20;
}

.math-tool-menu-symbols {
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  min-width: 230px;
}

.math-tool-menu button {
  background: var(--theme-surface-raised, #f7f8fa);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 3px;
  color: var(--theme-ink, #172126);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .78rem;
  font-weight: 400;
  min-height: 28px !important;
  min-width: 0;
  padding: .25rem .3rem !important;
}

.math-tool-menu button:hover,
.math-tool-menu button:focus-visible {
  background: var(--theme-primary-soft, #e8f2fa);
  border-color: var(--theme-primary, #054a85);
  outline: none;
}

.math-workspace {
  align-items: stretch;
  display: grid;
  gap: .55rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.math-input-pane,
.math-preview-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.math-pane-title {
  margin-bottom: .18rem;
}

.math-input-pane textarea {
  flex: 1;
  min-height: 290px;
  resize: vertical;
}

.math-preview {
  flex: 1;
  margin: 0;
  min-height: 290px;
  overflow: auto;
}

.forum-upload-control {
  border-top: 1px solid var(--theme-line, #dce2e8);
  padding-top: .55rem;
}

.forum-upload-title {
  display: block;
  margin-bottom: .25rem;
}

.forum-upload-title small {
  font-weight: 400;
}

.forum-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.forum-file-input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.forum-upload-button {
  cursor: pointer;
  margin: 0;
}

.forum-upload-status {
  color: var(--theme-muted, #607080);
  font-size: .68rem;
  margin-top: .25rem;
}

.forum-upload-status.is-error {
  color: #b42318;
  font-weight: 600;
}

.forum-upload-preview {
  display: grid;
  gap: .3rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: .3rem;
}

.forum-upload-item {
  align-items: center;
  background: var(--theme-surface-raised, #f7f8fa);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 3px;
  display: grid;
  font-size: .68rem;
  gap: .3rem;
  grid-template-columns: 42px minmax(0, 1fr) 26px;
  min-height: 48px;
  padding: .2rem;
}

.forum-upload-item img {
  border-radius: 2px;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.forum-upload-item > i {
  font-size: 1.3rem;
  text-align: center;
}

.forum-upload-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-upload-remove {
  background: transparent;
  border: 0;
  color: var(--theme-muted, #607080);
  min-height: 26px !important;
  padding: .2rem !important;
}

.forum-upload-remove:hover {
  color: #b42318;
}

@media (max-width: 760px) {
  .math-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .math-toolbar-groups {
    width: 100%;
  }

  .math-tool-group {
    position: static;
  }

  .math-tool-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: .4rem;
    max-height: 45vh;
    min-width: 0;
    overflow: auto;
    right: .4rem;
    top: auto;
    width: auto;
  }

  .math-tool-menu-symbols {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .math-workspace {
    grid-template-columns: 1fr;
  }

  .math-input-pane textarea {
    min-height: 220px;
  }

  .math-preview {
    min-height: 120px;
  }

  .forum-upload-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .forum-upload-button {
    width: 100%;
  }

  .forum-upload-preview {
    grid-template-columns: 1fr;
  }
}


/* SGA: yetkiye göre görünen kompakt gönderi aksiyonları */
.forum-actions {
  position: relative;
}

.forum-actions > summary {
  align-items: center;
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 3px;
  color: var(--theme-muted, #607080);
  cursor: pointer;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 500;
  gap: .22rem;
  line-height: 1;
  list-style: none;
  min-height: 26px;
  padding: .32rem .48rem;
}

.forum-actions > summary::-webkit-details-marker {
  display: none;
}

.forum-actions > summary:hover,
.forum-actions[open] > summary {
  border-color: var(--theme-primary, #054a85);
  color: var(--theme-primary, #054a85);
}

.forum-actions-menu {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line-strong, #bcc7d0);
  border-radius: 4px;
  box-shadow: 0 7px 18px rgba(20, 37, 52, .12);
  display: grid;
  min-width: 172px;
  padding: .25rem;
  position: absolute;
  right: 0;
  top: calc(100% + 3px);
  z-index: 25;
}

.forum-actions-menu form {
  margin: 0;
}

.forum-actions-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: var(--theme-ink, #172126);
  display: flex;
  font-size: .7rem;
  font-weight: 500;
  gap: .35rem;
  min-height: 28px !important;
  padding: .35rem .45rem !important;
  text-align: left;
  width: 100%;
}

.forum-actions-menu button:hover {
  background: var(--theme-surface-raised, #f7f8fa);
}

.forum-actions-menu button.is-danger {
  color: #b42318;
}

.forum-message > footer {
  align-items: center;
  display: flex;
  gap: .35rem;
  justify-content: flex-end;
  margin-top: .55rem;
}

@media (max-width: 760px) {
  .forum-actions-menu {
    left: 0;
    right: auto;
  }
}

/* SGA: sürekli açık cevap ağacı ve doğrudan erişilen kompakt işlemler */
.forum-thread {
  display: grid;
  gap: .42rem;
  min-width: 0;
}

.forum-tree-node {
  margin-inline-start: clamp(0rem, calc(var(--tree-depth) * 1.15rem), 8rem);
  position: relative;
}

.forum-tree-node[style*="--tree-depth: 0"]::before {
  display: none;
}

.forum-tree-node::before {
  border-left: 1px solid var(--theme-line-strong, #bcc7d0);
  border-top: 1px solid var(--theme-line-strong, #bcc7d0);
  content: "";
  height: calc(100% + .45rem);
  left: -.7rem;
  position: absolute;
  top: -.45rem;
  width: .55rem;
}

.forum-tree-node.is-deleted {
  background: var(--theme-surface-raised, #f7f8fa);
}

.forum-deleted-reply {
  color: var(--theme-muted, #607080);
  font-size: .72rem;
  font-style: italic;
  padding: .2rem 0;
}

.forum-message-actions {
  align-items: flex-start !important;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: space-between !important;
  min-width: 0;
}

.forum-action-buttons {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: .3rem;
  justify-content: flex-end;
  min-width: 0;
}

.forum-action-buttons form {
  margin: 0;
  max-width: 100%;
}

.forum-action-button {
  align-items: center;
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-line, #dce2e8);
  border-radius: 3px;
  color: var(--theme-ink-soft, #394955);
  display: inline-flex;
  font-size: .68rem;
  font-weight: 500;
  gap: .25rem;
  line-height: 1.15;
  min-height: 26px !important;
  max-width: 100%;
  padding: .3rem .48rem !important;
  text-decoration: none;
  white-space: normal;
}

.forum-action-button:hover {
  border-color: var(--theme-primary, #054a85);
  color: var(--theme-primary, #054a85);
}

.forum-action-button.is-danger {
  color: #b42318;
}

.forum-reply-target {
  align-items: center;
  background: var(--theme-surface-raised, #f7f8fa);
  border-left: 3px solid var(--theme-primary, #054a85);
  display: flex;
  font-size: .72rem;
  gap: .6rem;
  justify-content: space-between;
  margin-bottom: .55rem;
  padding: .48rem .6rem;
}

.forum-reply-target span,
.forum-reply-target strong {
  display: block;
}

.forum-reply-target strong {
  font-weight: 600;
}

.forum-reply-target a {
  font-size: .68rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .forum-tree-node {
    margin-inline-start: clamp(0rem, calc(var(--tree-depth) * .65rem), 3.25rem);
  }

  .forum-tree-node::before {
    left: -.42rem;
    width: .3rem;
  }

  .forum-action-buttons {
    justify-content: flex-start;
  }

  .forum-action-button {
    font-size: .64rem;
    min-height: 25px !important;
    padding: .28rem .42rem !important;
  }
}


/* SGA: tek satırlı kategori başlığı ve kesintisiz cevap ağacı. */
.forum-category-head {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 68px 68px min(26vw, 230px);
  padding: 0;
}

.forum-category-head-main {
  align-items: center;
  display: flex;
  gap: .7rem;
  justify-content: space-between;
  min-width: 0;
  padding: .4rem .7rem;
}

.forum-category-head-main > a {
  color: var(--theme-primary, #054a85);
  font-size: .72rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.forum-category-column-label {
  align-items: center;
  border-left: 1px solid var(--theme-line, #dce2e8);
  color: var(--theme-muted, #607080);
  display: flex;
  font-size: .65rem;
  font-weight: 600;
  justify-content: center;
  letter-spacing: .045em;
  padding: .4rem .3rem;
  text-transform: uppercase;
}

.forum-category-last-label {
  justify-content: flex-start;
  padding-inline: .65rem;
}

.forum-thread {
  display: block;
}

.forum-thread .forum-tree-node {
  border-radius: 0;
  margin-bottom: 0;
}

.forum-thread .forum-tree-node + .forum-tree-node {
  border-top: 0;
}

.forum-thread .forum-tree-node::before {
  height: calc(100% + 1px);
  top: -1px;
}

@media (max-width: 760px) {
  .forum-category-head {
    display: flex;
    padding: 0;
  }

  .forum-category-head-main {
    width: 100%;
  }

  .forum-category-column-label {
    display: none;
  }
}


/* SGA: ölçülü kart aralıklarıyla gerçek, sürekli açık cevap dalları. */
.forum-thread {
  --forum-tree-gutter: 1.35rem;
  display: grid;
  gap: .8rem;
  min-width: 0;
  padding-inline-start: var(--forum-tree-gutter);
  position: relative;
}

.forum-tree-branch {
  min-width: 0;
  position: relative;
}

.forum-tree-node {
  border-radius: 4px !important;
  margin: 0 !important;
  position: relative;
  z-index: 1;
}

.forum-tree-node::before {
  content: none !important;
  display: none !important;
}

.forum-tree-children {
  --forum-tree-gutter: 1.35rem;
  display: grid;
  gap: .65rem;
  margin-block-start: .65rem;
  margin-inline-start: 1.15rem;
  min-width: 0;
  padding-inline-start: var(--forum-tree-gutter);
  position: relative;
}

.forum-thread::before,
.forum-tree-children::before {
  border-inline-start: 1px solid var(--theme-primary, #547895);
  bottom: 0;
  content: "";
  inset-inline-start: .55rem;
  position: absolute;
  top: 0;
}

.forum-thread > .forum-tree-branch::before,
.forum-tree-children > .forum-tree-branch::before {
  border-top: 1px solid var(--theme-primary, #547895);
  content: "";
  inset-inline-start: calc(.55rem - var(--forum-tree-gutter));
  position: absolute;
  top: 1.15rem;
  width: calc(var(--forum-tree-gutter) - .55rem);
}

.forum-thread > .forum-tree-branch:last-child::after,
.forum-tree-children > .forum-tree-branch:last-child::after {
  background: var(--theme-canvas, #f6f8fb);
  bottom: 0;
  content: "";
  inset-inline-start: calc(.55rem - var(--forum-tree-gutter));
  position: absolute;
  top: calc(1.15rem + 1px);
  width: 2px;
  z-index: 0;
}

@media (max-width: 760px) {
  .forum-thread,
  .forum-tree-children {
    --forum-tree-gutter: .9rem;
    padding-inline-start: var(--forum-tree-gutter);
  }

  .forum-thread {
    gap: .65rem;
  }

  .forum-tree-children {
    gap: .55rem;
    margin-block-start: .55rem;
    margin-inline-start: .35rem;
  }

  .forum-thread::before,
  .forum-tree-children::before {
    inset-inline-start: .32rem;
  }

  .forum-thread > .forum-tree-branch::before,
  .forum-tree-children > .forum-tree-branch::before,
  .forum-thread > .forum-tree-branch:last-child::after,
  .forum-tree-children > .forum-tree-branch:last-child::after {
    inset-inline-start: calc(.32rem - var(--forum-tree-gutter));
  }

  .forum-thread > .forum-tree-branch::before,
  .forum-tree-children > .forum-tree-branch::before {
    width: calc(var(--forum-tree-gutter) - .32rem);
  }
}
