.kol-account-login__profile > .kol-account-login__comments { display: grid; gap: 16px; margin-top: 4px; padding-top: 22px; border-top: 1px solid var(--border); }
.kol-comments-profile__name-field input:focus { border-color: var(--primary); outline: 0 !important; box-shadow: none !important; }
.kol-comments-profile__editor-actions button:disabled { opacity: .65; cursor: wait; }
.kol-comments-profile__editor-message.is-success { color: var(--starless-success); }
.kol-comments-profile__editor-message.is-error { color: var(--destructive); }

.kol-account-login__comments-state { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--starless-success) 30%, var(--border)); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--starless-success) 8%, var(--card)); }
.kol-account-login__comments-state p { margin: 0 !important; }
.kol-account-login__comments-state .kol-account-login__hint { margin-inline-start: auto !important; }
.kol-comments-profile__stat + .kol-comments-profile__stat { border-inline-start: 1px solid var(--border); }
.kol-comments-profile__tabs button.is-active { border-bottom-color: var(--primary); color: var(--foreground); }
.kol-comments-profile__panel { display: none; }
.kol-comments-profile__panel.is-active { display: grid; }
.kol-comments-profile__pagination { position: relative; display: grid; justify-items: center; gap: 8px; padding-block: 12px 16px; }
.kol-comments-profile__pagination[hidden], .kol-comments-profile__pagination button[hidden] { display: none; }
.kol-comments-profile__pagination p { margin: 0; color: var(--muted-foreground); font-size: 13px; text-align: center; }
.kol-comments-profile__pagination p:not(.is-error) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kol-comments-profile__pagination p:empty { display: none; }
.kol-comments-profile__pagination p.is-error { color: var(--destructive); }
.kol-comments-profile__pagination .kol-ui-button { --button-color: var(--muted-foreground); --surface-hover: transparent; min-height: 44px; gap: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.kol-comments-profile__pagination .kol-ui-button:hover { --button-color: var(--foreground); text-decoration: underline; text-underline-offset: .25em; }
.kol-comments-profile__pagination .kol-ui-button::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.kol-comments-profile__pagination .kol-ui-button:not([data-state="ready"])::after { visibility: hidden; }
.kol-comments-profile__title-card img { display: block; width: 54px !important; min-width: 54px; max-width: 54px !important; height: 72px !important; min-height: 72px; max-height: 72px; flex: 0 0 54px; margin: 0 !important; border-radius: 7px; object-fit: cover; }
.kol-comments-profile-shortcode { width: 100%; max-width: none; margin-inline: 0; box-sizing: border-box; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--secondary); }

@media (min-width: 900px) {
  .kol-comments-profile-shortcode {
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: clamp(24px, 4vw, 56px);
  }
}

/* Public translator profile. */
.kol-translator-profile__stats > div + div { border-inline-start: 1px solid var(--border); }
.kol-translator-profile .kol-comments-profile__tabs { position: sticky; z-index: 5; top: 0; background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(10px); }
.kol-translator-profile__work { color: var(--foreground) !important; text-decoration: none !important; }
.kol-translator-profile__work:hover, .kol-translator-profile__work:focus-visible { border-color: var(--primary); outline: none; box-shadow: 0 10px 24px color-mix(in srgb, var(--foreground) 8%, transparent); transform: translateY(-2px); }
.kol-translator-profile__work img, .kol-translator-profile__cover-fallback { display: grid; width: 68px !important; min-width: 68px; max-width: 68px !important; height: 92px !important; min-height: 92px; max-height: 92px !important; flex: 0 0 68px; margin: 0 !important; place-items: center; border-radius: 9px; background: var(--muted); object-fit: cover; }
.kol-translator-profile__stars button, .kol-translator-profile__stars span { padding: 2px; border: 0; background: transparent; color: color-mix(in srgb, var(--muted-foreground) 35%, transparent); font: inherit; font-size: 28px; line-height: 1; }
.kol-translator-profile__stars button { border-radius: 6px; cursor: pointer; }
.kol-translator-profile__stars .is-filled { color: var(--rating); }
.kol-translator-profile__stars button:hover, .kol-translator-profile__stars button:focus-visible { outline: 2px solid var(--ring); color: var(--rating); }
.kol-translator-profile__review-form input:focus, .kol-translator-profile__review-form textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 22%, transparent); }
.kol-translator-profile__review time, .kol-translator-profile__edited { color: var(--muted-foreground); font-size: 11px; }
@media (max-width: 640px) {
  .kol-account-login__comments-state { align-items: flex-start; flex-direction: column; }
  .kol-account-login__comments-state .kol-account-login__hint { margin-inline-start: 0 !important; }
  .kol-comments-profile__stat + .kol-comments-profile__stat { border-inline-start: 0; }
  .kol-comments-profile__title-card img { width: 44px !important; min-width: 44px; max-width: 44px !important; height: 59px !important; min-height: 59px; max-height: 59px; flex-basis: 44px; }
  .kol-comments-profile-shortcode { padding: 12px; }
  .kol-translator-profile__stats > div + div { border-inline-start: 0; border-top: 1px solid var(--border); }
  .kol-translator-profile__stats > div:nth-child(2) { border-top: 0; }
  .kol-translator-profile__stats > div:nth-child(even) { border-inline-start: 1px solid var(--border); }
}

/* The shared primitives own generic bases while the profile
 * selectors keep the established editorial geometry and Arabic typography. */
.kol-comments-profile__editor.kol-ui-card {
  display: grid;
  overflow: visible;
  margin-block-start: 18px;
  border: 1px solid var(--kol-border-color, var(--border, #dddddd));
  border-radius: 0;
  padding: 18px;
  background: var(--background);
  box-shadow: none;
}

.kol-comments-profile__editor .kol-comments-profile__name-field {
  position: relative;
  display: block;
}

.kol-comments-profile__editor .kol-comments-profile__name-field > span {
  position: absolute;
  z-index: 1;
  inset-inline-start: 10px;
  top: 23px;
  max-width: calc(100% - 24px);
  padding: 0 4px;
  transform: translateY(-50%);
  background: var(--background);
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  transition: top 150ms ease, transform 150ms ease, font-size 150ms ease, color 150ms ease;
}

.kol-comments-profile__editor .kol-comments-profile__name-field:has(input:focus, input:not(:placeholder-shown)) > span {
  z-index: 2;
  top: 0;
  transform: translateY(-50%);
  font-size: 11px;
}

.kol-comments-profile__editor .kol-comments-profile__name-field:has(input:focus) > span {
  color: var(--primary);
}

.kol-comments-profile__editor .kol-comments-profile__name-field > small {
  display: block;
  margin-top: 6px;
}

.kol-translator-profile__rating-summary.kol-ui-card {
  display: flex;
  box-shadow: none;
}

.kol-translator-profile__feedback-form.kol-ui-card {
  display: grid;
  overflow: visible;
  box-shadow: none;
}

/* Public reader profiles follow the site's quiet, ruled editorial language. */
.kol-comments-profile-shortcode {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.kol-comments-profile-shortcode .kol-comments-profile {
  gap: 0;
  color: var(--foreground);
  font-family: var(--font-sans, inherit);
}

.kol-comments-profile-shortcode .kol-comments-profile__header {
  display: flex;
  min-height: 0;
  align-items: center;
  gap: clamp(14px, 2.4vw, 24px);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: clamp(18px, 3vw, 30px) 0;
  background: transparent;
  text-align: start;
}

.kol-comments-profile-shortcode .kol-comments-profile__avatar {
  box-sizing: border-box;
  width: clamp(64px, 7vw, 84px) !important;
  height: clamp(64px, 7vw, 84px) !important;
  flex: 0 0 clamp(64px, 7vw, 84px) !important;
  border: 1px solid var(--border) !important;
  background: var(--card);
  color: var(--primary);
  font-size: 22px;
}

.kol-comments-profile-shortcode .kol-comments-profile__identity {
  min-width: 0;
}

.kol-comments-profile-shortcode .kol-comments-profile__identity h2 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-sans, inherit);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
}

.kol-comments-profile-shortcode .kol-comments-profile__identity p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.kol-comments-profile-shortcode .kol-comments-profile__identity p:empty {
  display: none;
}

.kol-comments-profile-shortcode .kol-comments-profile__tabs.kol-ui-tabs {
  display: flex;
  width: 100%;
  min-height: 0;
  gap: 0;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin: 18px 0 0;
  background: transparent;
}

.kol-comments-profile-shortcode .kol-comments-profile__tabs > button {
  min-width: 0;
  min-height: 44px;
  flex: 1 0 auto;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0;
  padding: 10px clamp(12px, 2vw, 22px);
  background: transparent !important;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.kol-comments-profile-shortcode .kol-comments-profile__tabs > button:hover {
  color: var(--foreground);
}

.kol-comments-profile-shortcode .kol-comments-profile__tabs > button.is-active {
  border-bottom-color: var(--primary) !important;
  color: var(--foreground);
}

.kol-comments-profile-shortcode .kol-comments-profile__tabs > button:focus-visible {
  position: relative;
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

.kol-comments-profile-shortcode .kol-comments-profile__panels {
  display: grid;
}

.kol-comments-profile-shortcode .kol-comments-profile__panel.is-active {
  display: grid;
  gap: 0;
}

.kol-comments-profile-shortcode .kol-comments-profile__activity {
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 18px 0;
  background: transparent;
}

.kol-comments-profile-shortcode .kol-comments-profile__activity-head {
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
  justify-content: space-between;
}

.kol-comments-profile-shortcode .kol-comments-profile__activity-head strong {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.kol-comments-profile-shortcode .kol-comments-profile__activity-head time {
  color: var(--muted-foreground);
  font-size: 11px;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.kol-comments-profile-shortcode .kol-comments-profile__activity > p {
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .kol-comments-profile-shortcode .kol-comments-profile__header {
    flex-direction: row;
    align-items: center;
    padding-block: 18px;
    text-align: start;
  }

  .kol-comments-profile-shortcode .kol-comments-profile__identity h2 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .kol-comments-profile-shortcode .kol-comments-profile__tabs.kol-ui-tabs {
    margin-top: 14px;
  }

  .kol-comments-profile-shortcode .kol-comments-profile__tabs > button {
    padding-inline: 10px;
  }

  .kol-comments-profile-shortcode .kol-comments-profile__activity {
    padding-block: 15px;
  }
}

.kol-comments-profile__message.kol-ui-alert,
.kol-translator-profile__login-note.kol-ui-alert {
  display: block;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  place-items: initial;
  gap: 0;
  box-shadow: none;
}

.kol-comments-profile__message.kol-ui-alert--info,
.kol-translator-profile__login-note.kol-ui-alert--info {
  color: var(--link-foreground);
}

.kol-comments-profile__message.kol-ui-alert--danger {
  color: var(--destructive-foreground);
}

/* These grid column counts are not part of the shared utility bundle. */
.kol-comments-profile__stats {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 0;
  border-block: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.kol-comments-profile__stat {
  min-height: 72px;
  min-width: 0;
  align-content: center;
  padding-block: 12px;
  padding-inline: 8px;
}

.kol-comments-profile__stat > strong {
  color: var(--foreground);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.kol-comments-profile__stat > .kol-comments-profile__value--text {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.kol-comments-profile__stat > span {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.45;
}

.kol-comments-profile__awards {
  gap: 12px;
  border: 0;
  border-block-end: 1px solid var(--border);
  padding-block: 18px 20px;
}

.kol-comments-profile__awards > h3 {
  border-block-end: 1px solid var(--border);
  padding-block-end: 9px;
  font-size: 16px;
  line-height: 1.4;
}

.kol-comments-profile__awards > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, 4vw, 38px);
}

.kol-comments-profile__awards > div > div {
  align-content: start;
  gap: 8px;
}

.kol-comments-profile__awards > div > div + div {
  border-inline-start: 1px solid var(--border);
  padding-inline-start: clamp(18px, 4vw, 38px);
}

.kol-comments-profile__awards h4 {
  border-block-end: 1px solid var(--border);
  padding-block-end: 7px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.kol-comments-profile__awards p {
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.7;
}

.kol-comments-profile__award.kol-ui-badge {
  max-width: 100%;
  border-color: var(--border);
  color: var(--foreground);
  white-space: normal;
}

@media (max-width: 900px) {
  .kol-comments-profile__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kol-comments-profile__stats > .kol-comments-profile__stat {
    border-inline-start: 0;
  }

  .kol-comments-profile__stats > .kol-comments-profile__stat:nth-child(even) {
    border-inline-start: 1px solid var(--border);
  }

  .kol-comments-profile__stats > .kol-comments-profile__stat:nth-child(n + 3) {
    border-block-start: 1px solid var(--border);
  }

  .kol-comments-profile__stats > .kol-comments-profile__stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .kol-comments-profile__awards > div {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 14px;
  }

  .kol-comments-profile__awards > div > div + div {
    border-inline-start: 0;
    border-block-start: 1px solid var(--border);
    padding-block-start: 12px;
    padding-inline-start: 0;
  }
}

.kol-comments-profile__editor-message.kol-ui-alert {
  display: block;
  flex: 1 1 auto;
  box-shadow: none;
}

.kol-comments-profile__editor-message[hidden] {
  display: none !important;
}

.kol-comments-profile__editor-message.kol-ui-alert--success {
  color: var(--foreground);
}

.kol-comments-profile__editor-message.kol-ui-alert--danger {
  color: var(--destructive-foreground);
}

.kol-comments-profile__tabs.kol-ui-tabs {
  flex-wrap: nowrap;
  height: auto;
}

.kol-comments-profile__tabs.kol-ui-tabs > .kol-ui-tab {
  height: auto;
  box-shadow: none;
}

.kol-comments-profile__role.kol-ui-badge,
.kol-translator-profile__eyebrow.kol-ui-badge {
  min-height: 0;
  height: auto;
  border: 0;
  box-shadow: none;
}

.kol-comments-profile__editor-actions .kol-ui-button,
.kol-translator-profile__review-actions .kol-ui-button,
.kol-translator-profile__link-button.kol-ui-button,
.kol-translator-profile__review-form > .kol-ui-button,
.kol-translator-profile__stars .kol-ui-button {
  min-height: 0;
  height: auto;
  box-shadow: none;
}

.kol-translator-profile__stars .kol-ui-button {
  width: auto;
}

.kol-translator-profile__review-form input.kol-ui-input,
.kol-translator-profile__review-form textarea.kol-ui-textarea {
  display: block;
  height: auto;
  min-height: 0;
}
