/* Threaded comment sheet; selectors deliberately stop at the enhanced panel. */
.ta-thread-panel[data-comment-sheet-ready="1"] {
  --ta-comment-line: #e3eaf2;
  --ta-comment-ink: #183c63;
  --ta-comment-muted: #718299;
  --ta-comments-vv-height: 100dvh;
  --ta-comments-vv-bottom: 0px;
  box-sizing: border-box;
  position: fixed;
  z-index: 10050;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: min(420px, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ta-comment-line);
  border-radius: 16px 0 0 16px;
  background: #fff;
  color: var(--ta-comment-ink);
  box-shadow: -10px 0 40px #163c641a;
  animation: taCommentPaneIn .2s ease-out;
  text-align: start;
  overscroll-behavior: contain;
  isolation: isolate;
}
.ta-thread-panel[data-comment-sheet-ready="1"][hidden],
.ta-thread-panel [hidden],
.ta-comment-sheet-backdrop[hidden] { display: none !important; }
.ta-thread-panel *, .ta-thread-panel *::before, .ta-thread-panel *::after { box-sizing: border-box; }
.ta-thread-panel .inline-comments-head, .ta-thread-panel .comments-head {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  min-height: 58px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ta-comment-line);
  background: #fff;
}
.ta-thread-panel .inline-comments-head strong,
.ta-thread-panel .comments-head h2 { margin: 0; min-width: 0; color: var(--ta-comment-ink); font-size: 16px; line-height: 1.4; font-weight: 750; overflow-wrap: anywhere; }
.ta-thread-panel .inline-comments-head strong span { color: inherit; }
.ta-thread-panel .inline-comments-head-actions { display: flex; flex: 0 0 auto; align-items: center; margin-inline-start: auto; }
.ta-thread-panel .js-comments-collapse {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f0f5fa;
  color: #244d77;
  font: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.ta-thread-panel .inline-comment-list {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.ta-thread-panel .ta-comment-thread { min-width: 0; padding: 7px 0 12px; border-bottom: 1px solid var(--ta-comment-line); }
.ta-thread-panel .ta-comment-thread:last-child { border-bottom: 0; }
.ta-thread-panel :is(.inline-comment-item,.comment-item) {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-width: 0;
  width: 100%;
  margin: 0 !important;
  padding: 13px 0 6px;
  border: 0;
  scroll-margin-block: 12px;
}
.ta-thread-panel :is(.inline-comment-main,.comment-content) { min-width: 0; overflow-wrap: anywhere; }
.ta-thread-panel :is(.inline-comment-avatar,.comment-avatar,.ta-user-avatar-shell-comment) { width: 34px; height: 34px; min-width: 0; margin: 0; }
.ta-thread-panel :is(.inline-comment-avatar,.comment-avatar) img { width: 100%; height: 100%; object-fit: cover; }
.ta-thread-panel :is(.inline-comment-meta,.comment-meta) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; min-width: 0; margin: 0; font-size: 11px; line-height: 1.5; color: var(--ta-comment-muted); }
.ta-thread-panel :is(.inline-comment-meta,.comment-meta) :is(a,strong) { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.ta-thread-panel :is(.inline-comment-company,.comment-company-line) { max-width: 100%; margin: 0 0 3px; overflow-wrap: anywhere; font-size: 10px; line-height: 1.4; }
.ta-thread-panel .ta-comment-country { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 3px; white-space: nowrap; font-size: 11px; line-height: 1.5; font-weight: 500; color: var(--ta-comment-muted); unicode-bidi: isolate; }
.ta-thread-panel bdi { unicode-bidi: isolate; }
.ta-thread-panel .ta-translatable-block :is(p,.ta-translation-current),
.ta-thread-panel .inline-comment-main > p { margin: 6px 0; color: #213d59; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; word-break: normal; }
.ta-thread-panel .ta-comment-replies { min-width: 0; margin-inline-start: 42px; }
.ta-thread-panel .ta-comment-replies :is(.inline-comment-item,.comment-item) { grid-template-columns: 27px minmax(0, 1fr); gap: 8px; }
.ta-thread-panel .ta-comment-replies :is(.inline-comment-avatar,.comment-avatar,.ta-user-avatar-shell-comment) { width: 27px; height: 27px; }
.ta-thread-panel .ta-comment-thread-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 14px; margin-block-start: 5px; margin-inline-start: 43px; }
.ta-thread-panel .ta-comment-thread-button, .ta-thread-panel .ta-comment-retry {
  max-width: 100%;
  min-height: 36px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #526b86;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.ta-thread-panel .ta-comment-thread-button:hover, .ta-thread-panel .ta-comment-retry:hover { color: #0966e9; }
.ta-thread-panel .comment-utility-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 5px 0 0; }
.ta-thread-panel .comment-utility-translate { flex: 1 1 auto; min-width: 0; }
.ta-thread-panel .comment-interaction-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; min-width: 0; justify-content: flex-start; }
.ta-thread-panel :is(.comment-reaction-btn,.comment-quote-btn) { min-height: 32px; max-width: 100%; padding: 4px 7px; font-size: 11px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.ta-thread-panel .comment-quote-btn { border-color: #0969da; background: #0969da; color: #fff; font-weight: 650; }
.ta-thread-panel .comment-quote-btn:hover { border-color: #0756b3; background: #0756b3; color: #fff; }
.ta-thread-panel .comment-reaction-static { font-size: 11px; }
.ta-thread-panel .comment-reply-reference { margin: 4px 0; color: #677f98; font-size: 12px; overflow-wrap: anywhere; }
.ta-thread-panel .comment-quote-card { display: none; }
.ta-thread-panel .comment-replying-to { margin: 4px 0; font-size: 12px; overflow-wrap: anywhere; }
.ta-thread-panel .comment-inline-delete { max-width: 100%; margin: 5px 0; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.ta-thread-panel :is(.inline-comment-empty,.comment-empty) { padding: 24px 0; font-size: 13px; line-height: 1.6; }
.ta-thread-panel .ta-comment-sheet-status { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 8px 16px; color: #617890; background: #f4f8fc; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.ta-thread-panel .js-inline-comment-form { flex: 0 0 auto; order: 5; width: 100%; min-width: 0; margin: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--ta-comment-line); background: #fff; }
.ta-thread-panel .js-inline-comment-form label { display: block; min-width: 0; margin: 0; }
.ta-thread-panel .js-inline-comment-form label > span { display: none; }
.ta-thread-panel .js-inline-comment-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  height: 92px;
  min-height: 76px;
  max-height: 180px;
  margin: 0;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #cedceb;
  border-radius: 13px;
  background: #f8fafc;
  color: #173f65;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.ta-thread-panel .js-inline-comment-form textarea:focus { border-color: #3b87ef; outline: 2px solid #d9eaff; box-shadow: none; }
.ta-thread-panel .ta-char-counter { display: block; margin: 4px 0; font-size: 11px; line-height: 1.4; text-align: end; }
.ta-thread-panel :is(.inline-comment-form-actions,.comment-form-actions) { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 5px 0 0; }
.ta-thread-panel :is(.inline-comment-form-actions,.comment-form-actions) .btn { max-width: 100%; min-height: 38px; padding: 7px 15px; font-size: 13px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.ta-thread-panel .comment-compose-quote { min-width: 0; margin: 0 0 8px; padding: 6px 9px; font-size: 12px; line-height: 1.5; }
.ta-thread-panel .comment-compose-quote > div { min-width: 0; }
.ta-thread-panel [data-comment-compose-author] { display: inline; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ta-thread-panel [data-comment-compose-author]::before { content: '@'; }
.ta-thread-panel [data-comment-compose-excerpt] { display: none; }
.ta-thread-panel [data-comment-compose-quote-close] { flex: 0 0 auto; min-width: 30px; min-height: 30px; }
.ta-thread-panel [data-comment-compose-done] { display: none; }
.ta-thread-panel [data-comment-write] { display: none; }
.ta-thread-panel :is(.inline-comment-login,.comments-signin) { order: 5; flex: 0 0 auto; margin: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--ta-comment-line); }
.ta-thread-panel :is(.inline-comment-login,.comments-signin) .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.ta-thread-panel button:focus-visible, .ta-thread-panel a:focus-visible { outline: 2px solid #3786f5; outline-offset: 3px; }
.ta-comment-sheet-backdrop { position: fixed; z-index: 10049; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: #10243b26; cursor: default; }
html[dir="rtl"] .ta-thread-panel { border-radius: 0 16px 16px 0; box-shadow: 10px 0 40px #163c641a; }
@keyframes taCommentPaneIn { from { opacity: .3; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes taCommentSheetIn { from { opacity: .5; transform: translateY(55px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 768px) {
  body.ta-comment-sheet-desktop { --ta-comment-pane-size: 420px; }
  /* Reserve the real pane width so a post remains readable beside its comments. */
  body.ta-ui-rc.ta-comment-sheet-desktop .ta-site-frame {
    inline-size: calc(100% - var(--ta-comment-pane-size));
    max-inline-size: none;
    margin-inline-start: 0;
    margin-inline-end: var(--ta-comment-pane-size);
  }
  body.ta-comment-sheet-desktop .ta-v124-home-dashboard,
  body.ta-comment-sheet-desktop .home-main > .layout { grid-template-columns: minmax(0, 1fr) !important; }
  body.ta-comment-sheet-desktop #homeSupportRail { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1050px) {
  body.ta-comment-sheet-desktop { --ta-comment-pane-size: min(390px, 52vw); }
  .ta-thread-panel[data-comment-sheet-ready="1"] { width: min(390px, 52vw); }
}
@media (max-width: 767px) {
  /* The comment entry temporarily replaces site navigation and floating tools. */
  body.ta-comment-sheet-mobile :is(.ta-mobile-bottom-nav,.global-chat-widget,.global-chat-fallback-fab,.admin-support-unread-fab,.back-to-top) {
    display: none !important;
  }
  .ta-thread-panel[data-comment-sheet-ready="1"] {
    inset-block-start: auto;
    inset-inline: 0;
    bottom: var(--ta-comments-vv-bottom);
    width: 100%;
    max-width: 100%;
    height: 70vh;
    height: min(70dvh, var(--ta-comments-vv-height));
    max-height: var(--ta-comments-vv-height);
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    box-shadow: 0 -6px 28px #163c641a;
    animation: taCommentSheetIn .2s ease-out;
  }
  html[dir="rtl"] .ta-thread-panel { border-radius: 20px 20px 0 0; }
  .ta-thread-panel .inline-comments-head { min-height: 58px; padding: 10px 14px; }
  .ta-thread-panel .inline-comment-list { padding-inline: 14px; }
  .ta-thread-panel .js-inline-comment-form { display: none; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
  .ta-thread-panel [data-comment-write] {
    display: flex;
    order: 4;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
    min-height: 44px;
    margin: 10px 14px max(12px, env(safe-area-inset-bottom));
    padding: 10px 13px;
    border: 1px solid #dce5ee;
    border-radius: 24px;
    background: #f3f6f9;
    color: #7a8a9d;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    text-align: start;
    cursor: text;
  }
  .ta-thread-panel [data-comment-write-copy] { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .ta-thread-panel [data-comment-write].has-draft { color: #2d537a; }
  .ta-thread-panel[data-comment-sheet-ready="1"].is-writing {
    height: auto;
    max-height: min(70dvh, var(--ta-comments-vv-height));
  }
  .ta-thread-panel.is-writing .js-inline-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto minmax(56px, 90px) auto;
    gap: 3px 8px;
    flex: 0 1 auto;
    min-height: 0;
    max-height: 100%;
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .ta-thread-panel.is-writing [data-comment-write] { display: none; }
  .ta-thread-panel.is-writing .inline-comment-list { display: none; }
  .ta-thread-panel.is-writing .comment-compose-quote {
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 0 5px;
    border-inline-start-width: 2px;
  }
  .ta-thread-panel.is-writing .comment-compose-quote > div { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .ta-thread-panel.is-writing [data-comment-compose-author] { white-space: nowrap; }
  .ta-thread-panel.is-writing [data-comment-compose-quote-close] { min-width: 24px; min-height: 24px; width: 24px; padding: 0; }
  .ta-thread-panel.is-writing .ta-char-counter { grid-column: 2; grid-row: 1; align-self: center; margin: 0; font-size: 10px; line-height: 1.3; white-space: nowrap; }
  .ta-thread-panel.is-writing [data-comment-compose-done] { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 36px; padding: 5px 9px; border: 0; background: #eef4fa; color: #456783; border-radius: 8px; font: inherit; font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
  .ta-thread-panel.is-writing .js-inline-comment-form textarea { grid-column: 1 / -1; grid-row: 2; height: 100%; min-height: 56px; max-height: 90px; font-size: 16px; resize: none; }
  .ta-thread-panel.is-writing :is(.inline-comment-form-actions,.comment-form-actions) {
    grid-column: 1 / -1;
    grid-row: 3;
    position: sticky;
    z-index: 1;
    bottom: 0;
    margin-block-start: 0;
    padding-block-start: 0;
    background: #fff;
  }
  .ta-thread-panel .ta-comment-replies { margin-inline-start: 36px; }
  .ta-thread-panel .ta-comment-thread-actions { margin-inline-start: 43px; }
  /* Give long reply labels room by shrinking the translation slot first. */
  .ta-thread-panel .comment-utility-row { flex-wrap: nowrap; align-items: center; gap: 6px; }
  .ta-thread-panel .comment-utility-translate { flex: 1 1 0; min-inline-size: 0; }
  .ta-thread-panel .comment-utility-translate .ta-translation-meta { min-inline-size: 0; max-inline-size: 100%; margin: 0; gap: 3px; }
  .ta-thread-panel .comment-utility-translate :is(button,a) { min-inline-size: 0; max-inline-size: 100%; padding: 4px 6px; font-size: 10px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
  .ta-thread-panel .comment-interaction-row { flex: 0 1 auto; min-inline-size: 0; max-inline-size: 74%; flex-wrap: nowrap; justify-content: flex-end; gap: 3px; margin-inline-start: auto; margin-inline-end: 0; }
  .ta-thread-panel .comment-interaction-row :is(.comment-reaction-btn,.comment-reaction-static) { flex: 0 0 auto; white-space: nowrap; }
  .ta-thread-panel .comment-interaction-row .comment-reaction-btn { padding-inline: 5px; }
  .ta-thread-panel .comment-interaction-row .comment-quote-btn { flex: 0 1 auto; min-inline-size: 0; }
}
@media (max-width: 980px) {
  .ta-ui-rc .publication-feed-copy > .publication-feed-title { font-size: 1rem; line-height: 1.4; }
  .ta-ui-rc .content-detail-card .publication-detail-title { font-size: 1.25rem; line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .ta-thread-panel[data-comment-sheet-ready="1"] { animation: none; }
}
