/* Ask a Question — Digital Coach community Q&A */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

.dc-ask {
  --ask-ink: #0c2438;
  --ask-muted: #5a6d7e;
  --ask-brand: #0067b6;
  --ask-brand-deep: #004f8c;
  --ask-sky: #e8f2fa;
  --ask-line: #c9dcea;
  --ask-soft: #f0f7fc;
  --ask-ok: #166534;
  --ask-err: #b91c1c;
  --ask-paper: #fbfcfe;
  --ask-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ask-sans: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 72px;
  color: var(--ask-ink);
  font-family: var(--ask-sans);
}

/* —— Hero —— */
.dc-ask__hero {
  position: relative;
  overflow: hidden;
  margin: 12px 0 28px;
  min-height: clamp(220px, 36vh, 340px);
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(125deg, #053a63 0%, #0067b6 48%, #1a8ad4 100%);
  color: #fff;
  isolation: isolate;
}

.dc-ask__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(255, 255, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(0, 40, 80, 0.35), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.dc-ask__hero-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: clamp(36px, 6vw, 56px) clamp(20px, 4vw, 40px);
  animation: dc-ask-rise 0.7s ease both;
}

.dc-ask__brand {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.dc-ask__hero h1 {
  margin: 0 0 12px;
  font-family: var(--ask-display);
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
}

.dc-ask__lead {
  margin: 0 0 22px;
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 400;
}

.dc-ask__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dc-ask__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.dc-ask__btn:hover {
  transform: translateY(-1px);
}

.dc-ask__btn--primary {
  background: #fff;
  color: var(--ask-brand-deep) !important;
}

.dc-ask__btn--primary:hover {
  background: #f0f7fc;
}

.dc-ask__btn--ghost {
  background: transparent;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.dc-ask__btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.dc-ask__hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.dc-ask__orb {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  animation: dc-ask-float 8s ease-in-out infinite;
}

.dc-ask__orb--1 {
  width: 180px;
  height: 180px;
  right: 8%;
  top: 18%;
  background: rgba(255, 255, 255, 0.06);
}

.dc-ask__orb--2 {
  width: 90px;
  height: 90px;
  right: 22%;
  bottom: 16%;
  background: rgba(255, 255, 255, 0.08);
  animation-delay: -2.5s;
}

.dc-ask__orb--3 {
  width: 42px;
  height: 42px;
  right: 32%;
  top: 28%;
  background: rgba(255, 220, 120, 0.35);
  border-color: transparent;
  animation-delay: -4s;
}

/* —— Shared —— */
.dc-ask__flash {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #e8f7ee;
  color: var(--ask-ok);
  border: 1px solid #b7e4c7;
  font-weight: 600;
  animation: dc-ask-rise 0.4s ease both;
}

.dc-ask__error {
  padding: 16px;
  border-radius: 12px;
  background: #fee2e2;
  color: var(--ask-err);
  font-weight: 600;
}

.dc-ask__crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 20px;
  font-size: 0.88rem;
  color: var(--ask-muted);
}

.dc-ask__crumb a {
  color: var(--ask-brand) !important;
  text-decoration: none !important;
  font-weight: 600;
}

.dc-ask__crumb a:hover {
  text-decoration: underline !important;
}

/* —— Layout —— */
.dc-ask__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  animation: dc-ask-rise 0.55s ease 0.12s both;
}

.dc-ask__aside {
  width: 100%;
  max-width: 720px;
  position: static;
}

.dc-ask__form {
  background: #fff;
  border: 1px solid var(--ask-line);
  border-radius: 20px;
  padding: 28px 24px;
  display: grid;
  gap: 14px;
  box-shadow: 0 16px 40px rgba(12, 36, 56, 0.06);
}

.dc-ask__form .dc-ask__submit {
  justify-self: center;
  min-width: 200px;
}

.dc-ask__list-wrap {
  width: 100%;
  max-width: 720px;
}

.dc-ask__form-head {
  text-align: center;
  margin-bottom: 4px;
}

.dc-ask__form-head h2 {
  margin: 0 0 4px;
  font-family: var(--ask-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ask-ink);
}

.dc-ask__form-head .dc-ask__hint {
  text-align: center;
}

.dc-ask__hint {
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.dc-ask__form label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
}

.dc-ask__form label em {
  font-style: normal;
  font-weight: 500;
  color: var(--ask-muted);
}

.dc-ask__form input,
.dc-ask__form select,
.dc-ask__form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid #bfd2e4;
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  color: var(--ask-ink);
  background: var(--ask-paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dc-ask__form textarea {
  resize: vertical;
  min-height: 120px;
}

.dc-ask__form input:focus,
.dc-ask__form select:focus,
.dc-ask__form textarea:focus {
  outline: none;
  border-color: var(--ask-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 103, 182, 0.18);
}

.dc-ask__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dc-ask__full {
  grid-column: 1 / -1;
}

.dc-ask__submit {
  justify-self: start;
  margin-top: 4px;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: var(--ask-brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.dc-ask__submit:hover {
  background: var(--ask-brand-deep);
  transform: translateY(-1px);
}

.dc-ask__submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.dc-ask__form-msg {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.dc-ask__form-msg.is-ok {
  background: #e8f7ee;
  color: var(--ask-ok);
}

.dc-ask__form-msg.is-error {
  background: #fee2e2;
  color: var(--ask-err);
}

/* —— Feed —— */
.dc-ask__feed-head {
  margin-bottom: 12px;
}

.dc-ask__feed-head h2 {
  margin: 0 0 2px;
  font-family: var(--ask-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.dc-ask__feed-head p {
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.9rem;
}

.dc-ask__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.dc-ask__filter {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--ask-line);
  background: #fff;
  color: var(--ask-muted) !important;
  text-decoration: none !important;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dc-ask__filter.is-active,
.dc-ask__filter:hover {
  background: var(--ask-sky);
  color: var(--ask-brand) !important;
  border-color: #9fc4e0;
}

.dc-ask__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.dc-ask__list > li {
  animation: dc-ask-rise 0.45s ease both;
  animation-delay: calc(0.04s * var(--i, 0));
}

.dc-ask__item {
  display: grid;
  gap: 8px;
  padding: 16px 18px 16px 20px;
  background: #fff;
  border: 1px solid var(--ask-line);
  border-left: 3px solid var(--ask-brand);
  border-radius: 14px;
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dc-ask__item:hover {
  border-color: #9fc2df;
  border-left-color: var(--ask-brand-deep);
  box-shadow: 0 12px 28px rgba(12, 36, 56, 0.08);
  transform: translateY(-2px);
}

.dc-ask__item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dc-ask__replies {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ask-brand);
  white-space: nowrap;
}

.dc-ask__item-title {
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--ask-ink);
  font-weight: 700;
}

.dc-ask__item-snip {
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.dc-ask__item-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #7a8898;
}

.dc-ask__tag {
  justify-self: start;
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ask-sky);
  color: var(--ask-brand);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dc-ask__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0067b6, #1a8ad4);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.dc-ask__avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 0.82rem;
}

.dc-ask__avatar--xs {
  width: 22px;
  height: 22px;
  font-size: 0.68rem;
}

.dc-ask__empty {
  margin: 0;
  padding: 36px 20px;
  text-align: center;
  color: var(--ask-muted);
  background: #fff;
  border: 1px dashed var(--ask-line);
  border-radius: 16px;
}

.dc-ask__empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ask-ink);
  font-size: 1.05rem;
}

.dc-ask__empty p {
  margin: 0 0 14px;
}

.dc-ask__empty--page {
  max-width: 420px;
  margin: 24px auto;
}

/* —— Thread —— */
.dc-ask__thread {
  background: #fff;
  border: 1px solid var(--ask-line);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 22px;
  box-shadow: 0 16px 40px rgba(12, 36, 56, 0.05);
  animation: dc-ask-rise 0.5s ease both;
}

.dc-ask__thread-head h1 {
  margin: 10px 0 14px;
  font-family: var(--ask-display);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.dc-ask__meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dc-ask__meta {
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.92rem;
}

.dc-ask__meta strong {
  color: var(--ask-ink);
  font-weight: 600;
}

.dc-ask__body {
  color: #334155;
  line-height: 1.7;
  font-size: 1.02rem;
}

.dc-ask__body--rich h1,
.dc-ask__body--rich h2,
.dc-ask__body--rich h3 {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--ask-ink);
  line-height: 1.25;
}

.dc-ask__body--rich h1 {
  font-size: 1.35rem;
}

.dc-ask__body--rich h2 {
  font-size: 1.18rem;
}

.dc-ask__body--rich h3 {
  font-size: 1.05rem;
}

.dc-ask__body--rich p {
  margin: 0 0 10px;
}

.dc-ask__body--rich p:last-child {
  margin-bottom: 0;
}

.dc-ask__body--rich strong {
  font-weight: 700;
  color: var(--ask-ink);
}

.dc-ask__fmt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.dc-ask__fmt-btn {
  padding: 6px 12px;
  border: 1px solid #bfd2e4;
  border-radius: 8px;
  background: #f0f7fc;
  color: #0c2438;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.dc-ask__fmt-btn:hover {
  background: #dceaf6;
  border-color: #9fc2df;
}

.dc-ask__fmt-help {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #5a6d7e;
}

.dc-ask__body--question {
  padding: 16px 18px;
  background: var(--ask-soft);
  border-radius: 14px;
  border: 1px solid #d7e6f3;
}

.dc-ask__answers {
  display: grid;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--ask-line);
}

.dc-ask__answers-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dc-ask__answers-head h2 {
  margin: 0;
  font-family: var(--ask-display);
  font-size: 1.25rem;
}

.dc-ask__answers-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dc-ask__answers-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ask-brand);
  background: var(--ask-sky);
  padding: 4px 11px;
  border-radius: 999px;
}

.dc-ask__submit--sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  min-width: 0;
}

.dc-ask__thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.dc-ask__answer {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ask-paper);
  border: 1px solid var(--ask-line);
  animation: dc-ask-rise 0.4s ease both;
  animation-delay: calc(0.05s * var(--i, 0));
}

.dc-ask__answer-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  margin-bottom: 10px;
}

.dc-ask__answer-head .dc-ask__avatar {
  grid-row: 1 / span 2;
}

.dc-ask__answer-who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.dc-ask__answer-who strong {
  font-size: 0.95rem;
}

.dc-ask__role {
  color: var(--ask-muted);
  font-size: 0.85rem;
}

.dc-ask__reply-num {
  justify-self: end;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ask-sky);
  color: var(--ask-brand);
  font-size: 0.72rem;
  font-weight: 700;
}

.dc-ask__answer-head time {
  grid-column: 2;
  color: #8a97a6;
  font-size: 0.78rem;
}

.dc-ask__form--reply {
  margin: 0;
  box-shadow: none;
  border: none;
  padding: 8px 4px 4px;
  background: #fff;
}

.dc-ask__reply-cta {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.dc-ask__reply-cta .dc-ask__submit {
  justify-self: center;
  min-width: 220px;
}

/* Reply popup */
body.dc-ask-modal-open {
  overflow: hidden;
}

.dc-ask-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dc-ask-modal.is-open,
.dc-ask-modal:not([hidden]) {
  display: flex !important;
}

.dc-ask-modal[hidden] {
  display: none !important;
}

.dc-ask-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 36, 56, 0.62);
}

.dc-ask-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #ffffff;
  color: #0c2438;
  opacity: 1;
  border-radius: 18px;
  padding: 28px 22px 22px;
  box-shadow: 0 24px 60px rgba(12, 36, 56, 0.35);
  border: 1px solid #d7e3ef;
}

.dc-ask-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #eef5fb;
  color: #0c2438;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.dc-ask-modal__close:hover {
  background: #dceaf6;
}

.dc-ask-modal .dc-ask__form-head h2,
.dc-ask-modal .dc-ask__hint,
.dc-ask-modal label,
.dc-ask-modal label span {
  color: #0c2438;
  opacity: 1;
}

.dc-ask-modal .dc-ask__hint {
  color: #5a6d7e;
}

.dc-ask-modal .dc-ask__submit {
  justify-self: center;
  min-width: 180px;
  opacity: 1;
  background: #000;
  color: #fff;
}

.dc-ask-modal .dc-ask__submit:hover {
  background: #111;
}

/* —— Motion —— */
@keyframes dc-ask-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dc-ask-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-ask__hero-inner,
  .dc-ask__layout,
  .dc-ask__thread,
  .dc-ask__list > li,
  .dc-ask__answer,
  .dc-ask__orb {
    animation: none !important;
  }

  .dc-ask__item:hover,
  .dc-ask__btn:hover,
  .dc-ask__submit:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .dc-ask__layout {
    gap: 28px;
  }

  .dc-ask__aside {
    max-width: 100%;
  }

  .dc-ask__grid {
    grid-template-columns: 1fr;
  }

  .dc-ask__hero {
    border-radius: 0 0 20px 20px;
    min-height: 0;
  }

  .dc-ask__orb--1 {
    width: 120px;
    height: 120px;
    right: -10px;
  }
}
