/* 문답넷 detail — learning SaaS UI, BIDLAB brand */

.mdab {
  --md-ink: #0d1b2a;
  --md-muted: #5c6570;
  --md-blue: #1a73e8;
  --md-line: #e8edf2;
  --md-soft: #f4f7fa;
  --md-green: #16a34a;
  --md-warn: #f59e0b;
  --md-max: 1120px;
  color: var(--md-ink);
  background: #fff;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.mdab * {
  box-sizing: border-box;
}

.mdab-wrap {
  width: min(var(--md-max), calc(100% - 40px));
  margin: 0 auto;
}

.mdab-label {
  margin: 0 0 10px;
  color: var(--md-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mdab-label--light {
  color: #9ec1f5;
}

.mdab h1,
.mdab h2 {
  display: block;
  margin: 0 0 16px;
  color: var(--md-ink);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.mdab h1 {
  font-size: clamp(24px, 3.2vw, 38px);
}

.mdab h2 {
  font-size: clamp(20px, 2.5vw, 30px);
}

@media (min-width: 900px) {
  .mdab-hero__copy h1 {
    font-size: clamp(26px, 2.6vw, 36px);
  }

  .mdab h2 {
    font-size: clamp(22px, 2.3vw, 28px);
  }
}

.mdab p {
  margin: 0 0 12px;
  color: var(--md-muted);
  font-size: 16px;
  line-height: 1.8;
  word-break: keep-all;
}

.mdab-lead {
  color: var(--md-ink);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.45;
}

.mdab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.mdab-btn--navy {
  background: var(--md-ink);
  color: #fff;
}

.mdab-btn--blue {
  background: var(--md-blue);
  color: #fff;
}

.mdab-btn--line {
  border: 1px solid var(--md-ink);
  color: var(--md-ink);
  background: #fff;
}

.mdab-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.mdab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* HERO */
.mdab-hero {
  padding: 52px 0 44px;
  min-height: auto;
  background: #fff;
}

.mdab-hero__grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.mdab-hero__stage {
  display: grid;
  gap: 12px;
}

.mdab-ui {
  padding: 16px;
  border: 1px solid var(--md-line);
  border-radius: 12px;
  background: #fff;
}

.mdab-ui__tag {
  margin: 0 0 8px;
  color: var(--md-blue);
  font-size: 12px;
  font-weight: 700;
}

.mdab-ui__q {
  margin: 0 0 10px;
  color: var(--md-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.mdab-ui ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mdab-ui li {
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--md-line);
  border-radius: 8px;
  font-size: 13px;
}

.mdab-ui li.is-on {
  border-color: var(--md-blue);
  background: #eef5ff;
  color: var(--md-blue);
  font-weight: 700;
}

.mdab-ui--bot {
  background: var(--md-blue);
  border-color: var(--md-blue);
  color: #fff;
}

.mdab-ui--bot p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.mdab-ui__botname {
  margin-bottom: 6px !important;
  color: #fff !important;
  font-weight: 800;
}

.mdab-ui__score {
  margin: 0 0 8px;
  color: var(--md-ink);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.mdab-ui__score span {
  font-size: 18px;
  color: var(--md-muted);
}

.mdab-ui--dash ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mdab-ui--dash li {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 8px 10px;
  background: var(--md-soft);
  border: 0;
  font-size: 13px;
}

.mdab-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf2;
}

.mdab-bar span {
  display: block;
  height: 100%;
  background: var(--md-blue);
}

.mdab-bar--warn span {
  background: var(--md-warn);
}

/* sections */
.mdab-block {
  padding: 56px 0;
}

.mdab-block--white {
  background: #fff;
}

.mdab-block--soft {
  background: var(--md-soft);
}

.mdab-split {
  display: grid;
  gap: 28px;
  align-items: start;
}

.mdab-flow {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.mdab-flow li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--md-line);
  background: #fff;
}

.mdab-flow span {
  color: var(--md-blue);
  font-size: 13px;
  font-weight: 800;
}

.mdab-cards {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.mdab-cards li {
  padding: 18px 16px;
  border: 1px solid var(--md-line);
  background: #fff;
}

.mdab-cards strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.mdab-cards p {
  margin: 0;
  font-size: 15px;
}

.mdab-check {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.mdab-check li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 22px;
  color: var(--md-ink);
  font-size: 15px;
  font-weight: 600;
}

.mdab-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--md-green);
}

.mdab-check--light li {
  color: rgba(255, 255, 255, 0.92);
}

.mdab-check--light li::before {
  background: #60a5fa;
}

/* chat UI */
.mdab-chat {
  border: 1px solid var(--md-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.mdab-chat__q,
.mdab-chat__a {
  padding: 18px;
}

.mdab-chat__label {
  margin: 0 0 6px;
  color: var(--md-blue);
  font-size: 13px;
  font-weight: 700;
}

.mdab-chat__q p:nth-child(2) {
  color: var(--md-ink);
  font-weight: 700;
}

.mdab-chat__q ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.mdab-chat__q li {
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--md-line);
  border-radius: 8px;
  font-size: 14px;
}

.mdab-chat__q li.is-on {
  border-color: var(--md-blue);
  background: #eef5ff;
}

.mdab-chat__q em {
  margin-left: 6px;
  color: var(--md-blue);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.mdab-chat__a {
  background: var(--md-blue);
}

.mdab-chat__a p {
  color: #fff;
}

.mdab-chat__bot {
  margin-bottom: 8px !important;
  font-weight: 800;
}

.mdab-tip {
  margin-top: 12px !important;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px !important;
}

/* score UI */
.mdab-score {
  padding: 22px 20px;
  border: 1px solid var(--md-line);
  border-radius: 14px;
  background: #fff;
}

.mdab-score__title {
  margin: 0 0 8px;
  color: var(--md-ink);
  font-size: 14px;
  font-weight: 700;
}

.mdab-score__num {
  margin: 0 0 8px;
  color: var(--md-blue);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.mdab-score__num span {
  color: var(--md-muted);
  font-size: 18px;
}

.mdab-score__msg {
  margin-bottom: 16px;
  color: var(--md-ink);
  font-weight: 600;
}

.mdab-score ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mdab-score li {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
}

.mdab-score li strong {
  text-align: right;
}

/* exam UI */
.mdab-exam {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--md-line);
  border-radius: 14px;
  background: #fff;
}

.mdab-exam__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mdab-exam__meta span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--md-soft);
  color: var(--md-muted);
  font-size: 12px;
  font-weight: 700;
}

.mdab-exam__q {
  color: var(--md-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}

.mdab-exam__q strong {
  color: var(--md-blue);
}

.mdab-exam__ans {
  margin: 14px 0;
  padding: 12px;
  border-radius: 8px;
  background: #fff5f5;
}

.mdab-exam__ans p {
  margin: 0;
  font-size: 14px;
}

.mdab-exam__ans .is-wrong {
  margin-top: 4px;
  color: #dc2626;
  font-weight: 700;
}

.mdab-exam__result {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.mdab-exam__result.is-fail {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.mdab-exam__model,
.mdab-exam__note {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: var(--md-soft);
}

.mdab-exam__model p,
.mdab-exam__note p {
  margin: 0;
  font-size: 14px;
}

.mdab-exam__model p + p,
.mdab-exam__note p + p {
  margin-top: 6px;
}

/* wrong note */
.mdab-wrong {
  padding: 18px;
  border: 1px solid var(--md-line);
  border-radius: 14px;
  background: #fff;
}

.mdab-wrong__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mdab-wrong__head span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
}

.mdab-wrong ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.mdab-wrong li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--md-line);
}

.mdab-wrong li:last-child {
  border-bottom: 0;
}

.mdab-wrong p {
  margin: 0;
  color: var(--md-ink);
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(#fef08a, #fef08a) left 70% / 100% 40% no-repeat;
}

.mdab-wrong span {
  color: var(--md-muted);
  font-size: 12px;
}

.mdab-wrong em {
  padding: 3px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.mdab-wrong em.is-weak {
  background: #ffedd5;
  color: #c2410c;
}

/* books */
.mdab-books {
  padding: 64px 0;
  background: var(--md-ink);
  color: #fff;
}

.mdab-books h2,
.mdab-books p {
  color: #fff;
}

.mdab-books p {
  color: rgba(255, 255, 255, 0.82);
}

.mdab-books__lead {
  margin-bottom: 12px !important;
  font-size: clamp(20px, 2.4vw, 28px) !important;
  font-weight: 800 !important;
  color: #fff !important;
  line-height: 1.35 !important;
}

.mdab-books__grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.mdab-books__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 18px;
  padding: 0;
  list-style: none;
}

.mdab-books__tags li {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.mdab-books__covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mdab-cover {
  min-height: 220px;
  padding: 20px 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mdab-cover--blue {
  background: linear-gradient(160deg, #1e3a8a, #1a73e8);
}

.mdab-cover--green {
  background: linear-gradient(160deg, #14532d, #16a34a);
}

.mdab-cover p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
}

.mdab-cover strong {
  margin: 8px 0 12px;
  font-size: 20px;
  line-height: 1.3;
}

.mdab-cover span {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 700;
}

/* roadmap */
.mdab-roadmap {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.mdab-roadmap li {
  padding: 18px 16px;
  border: 1px solid var(--md-line);
  background: #fff;
}

.mdab-roadmap span {
  display: block;
  margin-bottom: 6px;
  color: var(--md-blue);
  font-size: 13px;
  font-weight: 800;
}

.mdab-roadmap strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.mdab-roadmap p {
  margin: 0;
  font-size: 14px;
}

.mdab-who {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.mdab-who li {
  padding: 14px 16px;
  border: 1px solid var(--md-line);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  word-break: keep-all;
}

.mdab-cta {
  padding: 64px 0;
  background: var(--md-ink);
}

.mdab-cta h2,
.mdab-cta p {
  color: #fff;
}

.mdab-cta p {
  color: rgba(255, 255, 255, 0.85);
}

.mdab-back {
  margin: 0;
  padding: 24px 0 40px;
  text-align: center;
}

.mdab-back a {
  color: var(--md-blue);
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 768px) {
  .mdab-wrap {
    width: min(var(--md-max), calc(100% - 56px));
  }

  .mdab-hero {
    min-height: auto;
  }

  .mdab-hero__grid,
  .mdab-split,
  .mdab-books__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .mdab-hero__stage {
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-areas:
      "quiz bot"
      "quiz dash";
  }

  .mdab-ui--quiz {
    grid-area: quiz;
  }

  .mdab-ui--bot {
    grid-area: bot;
  }

  .mdab-ui--dash {
    grid-area: dash;
  }

  .mdab-flow {
    grid-template-columns: repeat(5, 1fr);
  }

  .mdab-flow li {
    flex-direction: column;
    align-items: flex-start;
    min-height: 96px;
  }

  .mdab-cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .mdab-cards--2 {
    grid-template-columns: 1fr 1fr;
  }

  .mdab-roadmap {
    grid-template-columns: 1fr 1fr;
  }

  .mdab-who {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .mdab-roadmap {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .mdab-wrap {
    width: calc(100% - 32px);
  }

  .mdab-hero,
  .mdab-block,
  .mdab-books,
  .mdab-cta {
    padding: 48px 0;
  }

  .mdab-hero {
    min-height: auto;
  }

  .mdab-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mdab-btn {
    width: 100%;
  }

  .mdab-score li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .mdab-score li strong {
    text-align: left;
  }

  .mdab-wrong li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mdab-books__covers {
    grid-template-columns: 1fr;
  }
}
