/* Halfpix v1.2.5 — one form geometry / focus contract. Loaded last. */
:root {
  --ui-form-focus: var(--ui-primary, #2f6d60);
  --ui-form-border: var(--ui-line-strong, #cbd8d3);
  --ui-form-radius: 13px;
}
/* Help text on the Username field must not stretch the adjacent Display name
   input. The label, control and hint occupy normal-flow rows. */
.hp-profile-editor .hp-profile-form > label.hp-field {
  display: flex;
  flex-direction: column;
  align-self: start;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
.hp-profile-editor .hp-profile-form > label.hp-field > span {
  display: block;
  margin: 0 !important;
  min-height: 20px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}
.hp-profile-editor .hp-profile-form > label.hp-field > :is(input,select) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 50px;
  min-height: 50px;
  flex: 0 0 auto;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--ui-form-border) !important;
  border-radius: var(--ui-form-radius) !important;
  background: #fff;
  font-size: 15px;
  line-height: 24px;
}
.hp-profile-editor .hp-profile-form > label.hp-field > textarea {
  flex: 0 0 auto;
  margin: 0;
  min-height: 132px;
  padding: 13px 14px;
  border-radius: var(--ui-form-radius) !important;
}
.hp-profile-editor .hp-profile-form > label.hp-field > small {
  display: block;
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
}
.hp-profile-editor .hp-profile-form > label.hp-field > input:disabled {
  color: var(--ui-ink-soft) !important;
  opacity: 1;
  background: var(--ui-surface-soft, #f7faf8) !important;
  -webkit-text-fill-color: var(--ui-ink-soft);
}
/* Shared accessible focus: green 2px outline with 2px separation. Neither
   a thick nested inner frame nor inconsistent form-specific halo. */
.hp-form .hp-field :is(input,textarea,select):focus,
.hp-profile-editor .hp-profile-form > label.hp-field > :is(input,textarea,select):focus {
  border-color: var(--ui-form-focus) !important;
  outline: 2px solid var(--ui-form-focus) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}
/* The comment composer is ONE interactive field group. Its container owns
   the border/focus state; the textarea itself is deliberately borderless. */
.hp-comments .comments-section__dock {
  position: sticky;
  z-index: 5;
  bottom: 12px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin-top: 18px;
  padding: 3px;
}
.hp-comments .comments-section__dock > .comment-composer-trigger {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid var(--ui-form-border);
  border-radius: var(--ui-form-radius);
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
  font-size: 14px;
}
.hp-comments .comment-composer-trigger:focus-visible,
.hp-comments .comment-composer:focus-within {
  border-color: var(--ui-form-focus) !important;
  outline: 2px solid var(--ui-form-focus) !important;
  outline-offset: 2px !important;
}
.hp-comments .comments-section__dock > .comment-composer {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 14px 15px 12px;
  border: 1px solid var(--ui-form-border) !important;
  border-radius: 16px;
  background: #fff !important;
  box-shadow: var(--ui-shadow-sm);
}
.hp-comments .comment-composer__header {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 8px;
  color: var(--ui-ink-soft);
  font-size: 13px;
}
.hp-comments .comment-composer__header label {
  cursor: text;
  color: var(--ui-ink-soft);
  font-size: 13px;
  font-weight: 700;
}
.hp-comments .comment-composer__header button {
  width: 34px;
  height: 34px;
}
.hp-comments .comments-section__dock .comment-composer textarea,
.hp-comments .comments-section__dock .comment-composer textarea:focus,
.hp-comments .comments-section__dock .comment-composer textarea:focus-visible {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 74px !important;
  max-height: 200px;
  margin: 0;
  padding: 3px 0 13px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  resize: none;
  color: var(--ui-ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}
.hp-comments .comment-composer textarea::placeholder { color: var(--ui-muted); opacity: 1; }
.hp-comments .comment-composer__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid var(--ui-line);
}
.hp-comments .comment-composer__actions > button:not(.comment-submit) {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--ui-muted);
}
.hp-comments .comment-composer__actions > button:not(.comment-submit):hover { background: var(--ui-surface-soft); color: var(--ui-form-focus); }
.hp-comments .comment-composer__actions > .comment-submit {
  margin-left: auto;
  min-width: 85px;
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  background: var(--ui-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.hp-comments .comment-composer__actions > .comment-submit:disabled { opacity: .45; cursor: not-allowed; }
.hp-comments .comment-composer__actions > :is(button,input):focus-visible,
.hp-comments .comment-composer__header button:focus-visible {
  outline: 2px solid var(--ui-form-focus) !important;
  outline-offset: 2px !important;
}
.hp-comments .comments-section__dock > .hp-comment-error {
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid #e9c5bf;
  border-radius: 10px;
  background: #fff3f1;
  color: #8b3c36;
  font-size: 13px;
}
.hp-comments .comments-section__dock > .hp-comment-error:empty { display: none; }
@media (max-width: 520px) {
  .hp-comments .comments-section__dock { bottom: 8px; margin-top: 12px; }
  .hp-comments .comments-section__dock > .comment-composer { padding: 12px; }
  .hp-comments .comment-composer__actions { gap: 5px; }
  .hp-comments .comment-composer__actions > .comment-submit { min-width: 78px; }
}
