.pab-app,
.pab-app * {
  box-sizing: border-box;
}

.pab-app {
  --pab-ink: #18233f;
  --pab-muted: #63708d;
  --pab-violet: #6857e5;
  --pab-violet-dark: #4b3bc4;
  --pab-violet-soft: #efedff;
  --pab-teal: #0c9f93;
  --pab-teal-soft: #e8fbf7;
  --pab-orange: #ff8d4d;
  --pab-yellow: #ffc857;
  --pab-border: #dfe4f0;
  --pab-bg: #f5f7fc;
  --pab-white: #fff;
  position: relative;
  isolation: isolate;
  width: min(100%, 1120px);
  margin: 28px auto;
  color: var(--pab-ink);
  font-family: Inter, ui-rounded, "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.58;
  overflow: hidden;
  border: 1px solid #e2e5f2;
  border-radius: 28px;
  background: var(--pab-white);
  box-shadow: 0 24px 70px rgba(32, 42, 83, .14);
}

.pab-app button,
.pab-app input,
.pab-app textarea {
  font: inherit;
}

.pab-app button {
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none;
}

.pab-app button:focus-visible,
.pab-app input:focus-visible,
.pab-app textarea:focus-visible,
.pab-app a:focus-visible {
  outline: 3px solid rgba(255, 141, 77, .6);
  outline-offset: 3px;
}

.pab-app [hidden] {
  display: none !important;
}

.pab-bg-shape {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.pab-bg-shape-one {
  width: 360px;
  height: 360px;
  top: -220px;
  right: -130px;
  background: rgba(118, 100, 231, .12);
}

.pab-bg-shape-two {
  width: 280px;
  height: 280px;
  left: -180px;
  bottom: -170px;
  background: rgba(12, 159, 147, .1);
}

.pab-hero {
  position: relative;
  min-height: 690px;
  padding: 26px 44px 30px;
  background:
    radial-gradient(circle at 78% 26%, rgba(111, 92, 229, .1), transparent 25%),
    linear-gradient(145deg, #fff 0%, #fbfbff 54%, #f5f8ff 100%);
}

.pab-brand-row,
.pab-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pab-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pab-ink) !important;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .01em;
  text-decoration: none !important;
}

.pab-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #7768ed, #4d3cca);
  box-shadow: 0 7px 16px rgba(91, 73, 209, .28);
  font-size: 17px;
  font-weight: 900;
}

.pab-privacy-link {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d7dceb !important;
  border-radius: 999px !important;
  color: #35415f !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.pab-privacy-link svg {
  width: 18px;
  height: 18px;
  fill: var(--pab-teal);
}

.pab-privacy-link:hover {
  border-color: var(--pab-violet) !important;
  color: var(--pab-violet-dark) !important;
  background: #fff !important;
}

.pab-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
  align-items: center;
  gap: 52px;
  max-width: 950px;
  min-height: 390px;
  margin: 14px auto 4px;
}

.pab-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 13px;
  border-radius: 999px;
  color: #4e3ec5;
  background: #eeebff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pab-hero-copy h2 {
  max-width: 630px;
  margin: 14px 0 12px;
  color: #17213e;
  font-size: clamp(42px, 5.7vw, 68px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.055em;
}

.pab-hero-copy > p {
  max-width: 610px;
  margin: 0;
  color: #5d6883;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.pab-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.pab-feature-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e3e5f1;
  border-radius: 9px;
  color: #4d5873;
  background: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 700;
}

.pab-feature-pills b {
  color: var(--pab-teal);
}

.pab-hero-visual {
  position: relative;
  width: 340px;
  height: 310px;
  margin: 0 auto;
}

.pab-paper-stack {
  position: absolute;
  width: 242px;
  height: 278px;
  border-radius: 18px;
  background: #fff;
}

.pab-paper-back {
  top: 16px;
  left: 52px;
  transform: rotate(8deg);
  border: 1px solid #d9d4ff;
  background: #edeaff;
}

.pab-paper-front {
  top: 5px;
  left: 34px;
  transform: rotate(-3deg);
  border: 1px solid #e1e5f0;
  box-shadow: 0 26px 45px rgba(51, 44, 111, .18);
  overflow: hidden;
}

.pab-paper-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255,255,255,0), rgba(112,91,224,.03));
}

.pab-paper-top {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 178px;
  margin: 37px auto 29px;
}

.pab-paper-top span {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #7d6df0, #5644cf);
}

.pab-paper-top i,
.pab-paper-top i::after {
  display: block;
  width: 117px;
  height: 9px;
  border-radius: 8px;
  background: #dedaf9;
}

.pab-paper-top i::after {
  content: "";
  width: 78px;
  height: 6px;
  margin-top: 10px;
  background: #ecedf5;
}

.pab-paper-line {
  height: 8px;
  margin-left: 32px;
  border-radius: 9px;
  background: #e9ebf4;
}

.pab-line-one { width: 174px; }
.pab-line-two { width: 135px; margin-top: 12px; }

.pab-paper-cards {
  display: flex;
  gap: 11px;
  margin: 35px 30px;
}

.pab-paper-cards span {
  flex: 1;
  height: 72px;
  border-radius: 11px;
  background: #ece9ff;
}

.pab-paper-cards span:nth-child(2) { background: #e6faf5; }
.pab-paper-cards span:nth-child(3) { background: #fff3dc; }

.pab-pencil {
  position: absolute;
  right: 14px;
  bottom: 24px;
  width: 25px;
  height: 196px;
  transform: rotate(39deg);
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(90deg, #f4af3f 0 24%, #ffd66f 24% 72%, #e89c30 72%);
  box-shadow: 0 15px 23px rgba(84, 64, 30, .2);
}

.pab-pencil::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -30px;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 31px solid #f2ddba;
}

.pab-pencil::after {
  content: "";
  position: absolute;
  left: 8px;
  top: -30px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 11px solid #3a3b48;
}

.pab-pencil span {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25px;
  height: 26px;
  border-radius: 0 0 6px 6px;
  background: #f08a8f;
  border-top: 6px solid #cfd1d7;
}

.pab-sparkle {
  position: absolute;
  color: var(--pab-violet);
  font-size: 28px;
  animation: pab-float 3.8s ease-in-out infinite;
}

.pab-sparkle-one { right: 12px; top: 16px; }
.pab-sparkle-two { left: 2px; bottom: 66px; color: var(--pab-orange); font-size: 21px; animation-delay: -1.2s; }

@keyframes pab-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(12deg); }
}

.pab-start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  width: min(100%, 900px);
  margin: -4px auto 0;
}

.pab-start-card {
  display: grid !important;
  grid-template-columns: 55px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 20px !important;
  border: 2px solid transparent !important;
  border-radius: 19px !important;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.pab-start-project {
  color: #332784 !important;
  background: #efedff !important;
  box-shadow: 0 12px 25px rgba(88, 68, 199, .1) !important;
}

.pab-start-performance {
  color: #075e5a !important;
  background: #e8faf6 !important;
  box-shadow: 0 12px 25px rgba(12, 142, 129, .1) !important;
}

.pab-start-card:hover {
  transform: translateY(-3px);
  border-color: currentColor !important;
  box-shadow: 0 18px 34px rgba(45, 48, 87, .15) !important;
}

.pab-start-icon {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .78);
}

.pab-start-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.pab-start-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pab-start-text strong {
  color: inherit;
  font-size: 17px;
  line-height: 1.2;
}

.pab-start-text small {
  color: #59637d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.pab-card-arrow {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #fff;
  background: currentColor;
  font-size: 0;
}

.pab-card-arrow::after {
  content: "→";
  color: #fff;
  font-size: 17px;
}

.pab-home-note {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  color: #7a849d;
  font-size: 12px;
  text-align: center;
}

/* Chat */
.pab-chat-shell {
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr) auto auto;
  min-height: 760px;
  max-height: 880px;
  background: #f4f6fb;
}

.pab-chat-header {
  min-height: 80px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--pab-border);
  background: #fff;
}

.pab-guide-avatar,
.pab-mini-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, #7b6cec, #5140c8);
  box-shadow: 0 7px 18px rgba(80, 62, 191, .25);
}

.pab-guide-avatar {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 22px;
}

.pab-guide-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  margin-left: -6px;
}

.pab-guide-title strong {
  color: var(--pab-ink);
  font-size: 16px;
  font-weight: 850;
}

.pab-guide-title span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #78829b;
  font-size: 12px;
  font-weight: 650;
}

.pab-guide-title i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25b79c;
  box-shadow: 0 0 0 3px #e2f8f3;
}

.pab-chat-header-actions {
  display: flex;
  gap: 8px;
}

.pab-icon-button {
  display: grid !important;
  place-items: center;
  width: 41px;
  height: 41px;
  padding: 0 !important;
  border: 1px solid #dce1ed !important;
  border-radius: 12px !important;
  color: #44506d !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
}

.pab-icon-button:hover {
  color: var(--pab-violet-dark) !important;
  border-color: #bdb6ed !important;
  background: var(--pab-violet-soft) !important;
}

.pab-icon-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.pab-progress-wrap {
  padding: 12px 24px 10px;
  border-bottom: 1px solid #e6e9f2;
  background: #fff;
}

.pab-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #69748e;
  font-size: 11px;
  font-weight: 750;
}

.pab-progress-label strong { color: var(--pab-violet-dark); }

.pab-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eaf3;
}

.pab-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pab-violet), #9a7df4);
  transition: width .35s ease;
}

.pab-chat-log {
  min-height: 320px;
  padding: 24px clamp(18px, 4vw, 52px) 30px;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 95% 0%, rgba(112, 91, 224, .05), transparent 22%),
    #f4f6fb;
}

.pab-message-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 20px;
  animation: pab-message-in .3s ease both;
}

@keyframes pab-message-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pab-message-user { justify-content: flex-end; }

.pab-mini-avatar {
  width: 35px;
  height: 35px;
  margin-top: 19px;
  border-radius: 11px;
  font-size: 15px;
}

.pab-message-wrap {
  max-width: min(760px, calc(100% - 45px));
}

.pab-message-user .pab-message-wrap {
  max-width: min(680px, 86%);
}

.pab-message-meta {
  margin: 0 8px 5px;
  color: #7a849d;
  font-size: 11px;
  font-weight: 750;
}

.pab-message-user .pab-message-meta { text-align: right; }

.pab-bubble {
  padding: 15px 18px;
  border-radius: 8px 20px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
}

.pab-bot-bubble {
  border: 1px solid #e1e5ef;
  color: #303b57;
  background: #fff;
  box-shadow: 0 7px 21px rgba(45, 52, 83, .07);
}

.pab-user-bubble {
  white-space: pre-line;
  border-radius: 20px 8px 20px 20px;
  color: #fff;
  background: linear-gradient(145deg, #6f5ee7, #5140c8);
  box-shadow: 0 7px 18px rgba(79, 62, 194, .18);
}

.pab-bubble p { margin: 0 0 10px; }
.pab-bubble p:last-child { margin-bottom: 0; }
.pab-bubble h4 { margin: 15px 0 10px; color: #202c49; font-size: 14px; }

.pab-focus-card {
  margin: 13px 0;
  padding: 13px 15px;
  border-left: 4px solid var(--pab-violet);
  border-radius: 5px 12px 12px 5px;
  background: #f2f0ff;
}

.pab-focus-card span {
  display: block;
  margin-bottom: 4px;
  color: #695ad5;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}

.pab-focus-card strong { color: #332978; }

.pab-option-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pab-option-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e1e5ef;
  border-radius: 12px;
  background: #fafbfe;
}

.pab-option-list li > b {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #5f6577;
  background: #eceef5;
}

.pab-option-list li > span {
  display: flex;
  flex-direction: column;
  color: #35405b;
  font-weight: 700;
}

.pab-option-list li small {
  color: #6a5cd4;
  font-size: 10px;
  font-weight: 800;
}

.pab-option-list li.is-recommended {
  border-color: #bdb5ef;
  background: #f3f1ff;
}

.pab-option-list li.is-recommended > b { color: #fff; background: var(--pab-violet); }

.pab-soft-note,
.pab-warning-callout,
.pab-callout {
  margin-top: 13px !important;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 12px;
}

.pab-soft-note { color: #4e5874; background: #f4f6fa; }
.pab-warning-callout { color: #715221; background: #fff6df; border: 1px solid #f2dda4; }
.pab-callout { color: #18655e; background: #e9faf6; border: 1px solid #c2ede5; }

.pab-step-list,
.pab-outline {
  display: grid;
  gap: 9px;
}

.pab-step-list > div,
.pab-outline > div {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid #e4e7f0;
  border-radius: 11px;
  background: #fbfcfe;
}

.pab-step-list > div > b,
.pab-outline > div > b {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  color: #fff;
  background: var(--pab-violet);
}

.pab-step-list span,
.pab-outline span { display: flex; flex-direction: column; }
.pab-step-list strong,
.pab-outline strong { color: #293550; }
.pab-step-list small,
.pab-outline small { margin-top: 1px; color: #68738c; font-size: 12px; }

.pab-source-list,
.pab-tick-list,
.pab-question-list {
  margin: 11px 0;
  padding: 0;
  list-style: none;
}

.pab-source-list { display: grid; gap: 8px; }
.pab-source-list li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; background: #f7f8fc; }
.pab-source-list li > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: #fff; background: var(--pab-teal); font-weight: 850; }
.pab-source-list div { display: flex; flex-direction: column; }
.pab-source-list b { color: #34405b; }
.pab-source-list small { color: #778198; font-size: 11px; }

.pab-check-grid,
.pab-design-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pab-check-grid span {
  padding: 8px 10px;
  border-radius: 9px;
  color: #35665f;
  background: #effaf7;
  font-size: 11px;
  font-weight: 700;
}

.pab-design-grid > div {
  padding: 12px;
  border: 1px solid #e2e5ef;
  border-radius: 12px;
  background: #fbfcfe;
}

.pab-design-grid > div > span { display: block; margin-bottom: 3px; font-size: 21px; }
.pab-design-grid b { color: #2f3a56; }
.pab-design-grid p { margin: 3px 0 0; color: #6c7690; font-size: 11px; }

.pab-tick-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.pab-tick-list li,
.pab-question-list li {
  position: relative;
  padding: 8px 9px 8px 29px;
  border-radius: 9px;
  background: #f6f7fb;
  font-size: 12px;
}

.pab-tick-list li::before,
.pab-question-list li::before {
  position: absolute;
  left: 10px;
  color: var(--pab-teal);
  content: "✓";
  font-weight: 900;
}

.pab-citation-cards { display: grid; gap: 8px; }
.pab-citation-cards > div { padding: 11px 13px; border: 1px solid #e0e4ef; border-radius: 11px; background: #fafbfe; }
.pab-citation-cards span { display: block; margin-bottom: 5px; color: var(--pab-violet-dark); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.pab-citation-cards code { display: block; padding: 0; color: #48536d; background: transparent; white-space: normal; font-family: inherit; font-size: 11px; }

.pab-inline-example,
.pab-secondary-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  margin-top: 12px;
  padding: 9px 13px !important;
  border: 1px solid #bdb5ed !important;
  border-radius: 10px !important;
  color: #4d3bc2 !important;
  background: #f1efff !important;
  box-shadow: none !important;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pab-inline-example:hover,
.pab-secondary-button:hover { color: #fff !important; border-color: var(--pab-violet-dark) !important; background: var(--pab-violet-dark) !important; }

.pab-calendar-table {
  overflow: hidden;
  border: 1px solid #dde2ed;
  border-radius: 12px;
}

.pab-calendar-head,
.pab-calendar-row {
  display: grid;
  grid-template-columns: 90px 1.5fr 1fr;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
}

.pab-calendar-head { color: #fff; background: #5f50d2; font-size: 10px; }
.pab-calendar-row { border-top: 1px solid #e5e8f0; background: #fff; font-size: 10px; }
.pab-calendar-row:nth-child(odd) { background: #fafaff; }
.pab-calendar-row b { color: #4f41ba; }
.pab-calendar-row span { color: #424d67; }
.pab-calendar-row small { color: #6b758b; font-size: 9px; }

.pab-presentation-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pab-presentation-flow > div {
  display: flex;
  gap: 7px;
  padding: 10px;
  border-radius: 11px;
  background: #f4f2ff;
}

.pab-presentation-flow > div > b { color: var(--pab-violet); }
.pab-presentation-flow span { display: flex; flex-direction: column; color: #69738c; font-size: 10px; }
.pab-presentation-flow strong { color: #373063; font-size: 11px; }

.pab-question-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.pab-final-checklist { display: grid; gap: 7px; }
.pab-final-checklist label { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #e2e6ef; border-radius: 10px; background: #fafbfe; cursor: pointer; }
.pab-final-checklist input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--pab-teal); }
.pab-final-checklist span { flex: 1; font-size: 12px; }
.pab-final-checklist input:checked + span { color: #6c768e; text-decoration: line-through; }

.pab-success-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  padding: 15px;
  border-radius: 13px;
  color: #155d54;
  background: linear-gradient(145deg, #ddf8f1, #effcf8);
  border: 1px solid #b9e9de;
}

.pab-success-card > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: var(--pab-teal); font-size: 20px; }
.pab-success-card p { margin: 2px 0 0; font-size: 11px; }

.pab-safety-message { color: #773838; }
.pab-safety-message > strong { display: block; margin-bottom: 7px; color: #9b3030; font-size: 16px; }
.pab-retry-button { width: 100%; }

.pab-thinking-row { align-items: center; }
.pab-thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 64px;
  min-height: 42px;
  margin-top: 12px;
  padding: 12px 15px;
  border: 1px solid #e1e5ef;
  border-radius: 8px 18px 18px 18px;
  background: #fff;
}
.pab-thinking i { width: 7px; height: 7px; border-radius: 50%; background: #8b80d9; animation: pab-dot 1s ease-in-out infinite; }
.pab-thinking i:nth-child(2) { animation-delay: .15s; }
.pab-thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes pab-dot { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-5px); opacity: 1; } }

/* Form and quick replies */
.pab-input-panel {
  padding: 20px clamp(18px, 6vw, 80px) 23px;
  border-top: 1px solid var(--pab-border);
  background: #fff;
}

.pab-type-chip {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 4px 9px;
  border-radius: 6px;
  color: #5141c6;
  background: #eeecff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.pab-field { position: relative; margin-bottom: 13px; }
.pab-field label { display: block; margin-bottom: 5px; color: #2f3a56; font-size: 12px; font-weight: 800; }
.pab-field input,
.pab-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 58px 11px 13px;
  border: 1px solid #cfd5e3;
  border-radius: 11px;
  color: #242f4b;
  background: #fbfcfe;
  box-shadow: inset 0 1px 2px rgba(30, 39, 66, .03);
  font-size: 14px;
}
.pab-field textarea { min-height: 110px; padding-right: 62px; resize: vertical; }
.pab-field input::placeholder,
.pab-field textarea::placeholder { color: #9aa3b6; opacity: 1; }
.pab-field input:focus,
.pab-field textarea:focus { border-color: var(--pab-violet); background: #fff; outline: 0; box-shadow: 0 0 0 3px rgba(105, 87, 229, .12); }
.pab-field-count { position: absolute; right: 10px; bottom: 9px; color: #9aa2b4; font-size: 9px; font-weight: 700; }
.pab-field textarea + .pab-field-count { bottom: 10px; }

.pab-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 5px 0 12px;
  color: #5f6a84;
  font-size: 11px;
  cursor: pointer;
}
.pab-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--pab-violet); }

.pab-form-error {
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #efb3b3;
  border-radius: 9px;
  color: #922f2f;
  background: #fff0f0;
  font-size: 11px;
  font-weight: 700;
}

.pab-primary-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 49px;
  padding: 12px 18px !important;
  border: 2px solid var(--pab-violet-dark) !important;
  border-radius: 12px !important;
  color: #fff !important;
  background: linear-gradient(145deg, #7162ea, #5040c6) !important;
  box-shadow: 0 10px 22px rgba(77, 60, 190, .22) !important;
  font-weight: 850;
  cursor: pointer;
}
.pab-primary-button span,
.pab-primary-button b { color: #fff !important; }
.pab-primary-button:hover { transform: translateY(-1px); background: #4434b5 !important; box-shadow: 0 13px 26px rgba(77, 60, 190, .3) !important; }

.pab-reply-dock {
  padding: 13px 22px 15px;
  border-top: 1px solid #dfe3ed;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(45, 52, 83, .04);
}
.pab-reply-dock > p { margin: 0 0 8px; color: #707a91; font-size: 10px; font-weight: 750; }
.pab-quick-replies { display: flex; gap: 7px; padding: 2px 1px 6px; overflow-x: auto; scrollbar-width: thin; }
.pab-reply-button {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 39px;
  padding: 8px 11px !important;
  border: 1px solid #c7cde0 !important;
  border-radius: 10px !important;
  color: #394560 !important;
  background: #f8f9fc !important;
  box-shadow: none !important;
  cursor: pointer;
}
.pab-reply-button span { font-size: 15px; }
.pab-reply-button b { color: inherit !important; font-size: 11px; }
.pab-reply-button i { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: #fff; background: var(--pab-teal); font-size: 9px; font-style: normal; }
.pab-reply-button:hover { color: #fff !important; border-color: var(--pab-violet) !important; background: var(--pab-violet) !important; }
.pab-reply-button.is-done { color: #49716b !important; border-color: #bce2da !important; background: #eefaf7 !important; }
.pab-reply-button.is-done:hover { color: #fff !important; border-color: var(--pab-teal) !important; background: var(--pab-teal) !important; }
.pab-finish-button { color: #724b0d !important; border-color: #f2ce84 !important; background: #fff6df !important; }

.pab-decision-question {
  margin: 0 !important;
  color: #2d3754;
  font-size: 15px;
}

.pab-decision-replies {
  justify-content: center;
  gap: 12px;
  overflow: visible;
}

.pab-choice-yes,
.pab-choice-no {
  justify-content: center;
  min-width: 145px;
  min-height: 45px;
  border-width: 2px !important;
  font-size: 13px;
}

.pab-choice-yes {
  color: #075f57 !important;
  border-color: #48bcae !important;
  background: #e7faf6 !important;
}

.pab-choice-no {
  color: #7a3940 !important;
  border-color: #e7a7ad !important;
  background: #fff1f2 !important;
}

.pab-choice-yes:hover {
  color: #fff !important;
  border-color: #078c81 !important;
  background: #078c81 !important;
}

.pab-choice-no:hover {
  color: #fff !important;
  border-color: #ba515b !important;
  background: #ba515b !important;
}

.pab-chat-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 22px;
  border-top: 1px solid #e5e8f1;
  color: #8992a7;
  background: #f8f9fc;
  font-size: 9px;
}
.pab-chat-footer button { padding: 0 !important; border: 0 !important; color: #5d4dd0 !important; background: transparent !important; box-shadow: none !important; font-weight: 800; text-decoration: underline; cursor: pointer; }

/* Modals */
body.pab-modal-open { overflow: hidden; }
.pab-modal,
.pab-example-modal {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}
.pab-modal-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 45, .72); backdrop-filter: blur(4px); }
.pab-modal-card,
.pab-example-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 12, 35, .35);
  animation: pab-modal-in .22s ease both;
}
@keyframes pab-modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.pab-modal-card { padding: 28px; }
.pab-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid !important;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border: 1px solid #dce1ec !important;
  border-radius: 50% !important;
  color: #3f4962 !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.pab-modal-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 13px; border-radius: 15px; background: var(--pab-teal-soft); font-size: 24px; }
.pab-modal-card h3 { margin: 0 45px 6px 0; color: #202b47; font-size: 23px; }
.pab-modal-lead { margin: 0 0 15px; color: #68738d; font-size: 13px; }
.pab-privacy-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.pab-privacy-list li { padding: 11px 12px; border-radius: 10px; color: #535e77; background: #f6f7fb; font-size: 12px; }
.pab-privacy-list b { color: #303b57; }
.pab-kvkk-note { margin: 13px 0; padding: 10px 12px; border-left: 4px solid var(--pab-teal); border-radius: 4px 9px 9px 4px; color: #48635f; background: #effaf7; font-size: 11px; }
.pab-modal-accept { margin-top: 5px; }

.pab-example-dialog { width: min(100%, 760px); }
.pab-example-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 22px; border-bottom: 1px solid #e2e6ef; background: #f8f9fd; }
.pab-example-head span { color: var(--pab-violet); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.pab-example-head h3 { margin: 1px 0 0; color: #202b47; font-size: 20px; }
.pab-example-head button { display: grid !important; place-items: center; width: 37px; height: 37px; padding: 0 !important; border: 1px solid #d8ddea !important; border-radius: 50% !important; color: #424d67 !important; background: #fff !important; box-shadow: none !important; font-size: 24px; cursor: pointer; }
.pab-example-content { padding: 24px; background: #edf0f6; }
.pab-example-note { margin: 0; padding: 10px 20px; color: #6c7690; background: #fff; font-size: 10px; text-align: center; }

.pab-cover-example,
.pab-bibliography-example,
.pab-page-example,
.pab-poster-example {
  position: relative;
  width: min(100%, 470px);
  min-height: 590px;
  margin: 0 auto;
  border: 1px solid #cbd2e0;
  color: #23304b;
  background: #fff;
  box-shadow: 0 13px 30px rgba(35, 43, 68, .13);
}

.pab-cover-example {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 42px 35px 30px;
  text-align: center;
}
.pab-cover-example::before,
.pab-cover-example::after { content: ""; position: absolute; inset: 15px; border: 2px solid #7061dc; pointer-events: none; }
.pab-cover-example::after { inset: 21px; border-width: 1px; border-color: #bcb5ed; }
.pab-cover-school { font-size: 15px; font-weight: 900; letter-spacing: .04em; }
.pab-cover-subject { margin-top: 10px; color: #5e6881; font-size: 13px; font-weight: 750; }
.pab-cover-art { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 190px; margin: 58px 0 25px; color: #ff984f; }
.pab-cover-art i { width: 92px; height: 92px; border: 14px solid #ece9ff; border-radius: 25px; transform: rotate(45deg); }
.pab-cover-art::after { content: "P"; position: absolute; color: #5f4fd2; font-size: 36px; font-style: normal; font-weight: 900; }
.pab-cover-title { max-width: 350px; color: #4a3cbd; font-size: 25px; font-weight: 950; line-height: 1.2; }
.pab-cover-kind { margin-top: 7px; color: #6b7590; font-size: 11px; font-weight: 800; letter-spacing: .09em; }
.pab-cover-info { width: 260px; margin: 52px 0 0 auto; text-align: left; }
.pab-cover-info p { margin: 8px 0; font-size: 11px; }
.pab-cover-year { margin-top: auto; font-size: 10px; font-weight: 800; }

.pab-bibliography-example { padding: 50px 45px; }
.pab-bibliography-example h4 { margin: 0 0 42px; color: #312675; font-size: 22px; text-align: center; }
.pab-bibliography-example p { margin: 0 0 20px; padding-left: 23px; color: #3f4962; font-size: 12px; text-indent: -23px; }
.pab-example-tip { margin-top: 40px; padding: 11px 13px; border-radius: 9px; color: #6e5527; background: #fff4d9; font-size: 10px; }

.pab-page-example { min-height: 620px; padding: 54px 50px 45px; }
.pab-page-margin { position: absolute; inset: 32px; border: 1px dashed #ef9b71; pointer-events: none; }
.pab-page-number { position: absolute; right: 45px; top: 34px; color: #7c8495; font-size: 10px; }
.pab-page-example h4 { position: relative; margin: 0 0 28px; color: #4335aa; font-size: 18px; }
.pab-page-example h5 { position: relative; margin: 24px 0 12px; color: #34405d; font-size: 13px; }
.pab-page-example p { position: relative; width: 76%; height: 7px; margin: 0 0 10px; border-radius: 6px; background: #e4e7ee; }
.pab-page-example p.wide { width: 100%; }
.pab-page-example p.medium { width: 88%; }
.pab-page-visual { position: relative; display: grid; place-items: center; height: 190px; margin-top: 26px; border: 1px solid #c8d0df; border-radius: 6px; color: #758097; background: linear-gradient(135deg, #eaf8f5, #efedff); font-size: 10px; font-weight: 800; }
.pab-page-example > small { position: relative; display: block; margin-top: 7px; color: #798296; font-size: 9px; text-align: center; }
.pab-page-label { position: absolute; left: 34px; bottom: 12px; color: #df7448; font-size: 8px; }

.pab-poster-example { min-height: 590px; padding: 25px; border: 8px solid #5d4bcf; background: #fffaf2; }
.pab-poster-example header { padding: 20px 16px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #6e5de2, #4838b4); text-align: center; }
.pab-poster-example header small { display: block; margin-bottom: 5px; color: #ddd8ff; font-size: 9px; letter-spacing: .15em; }
.pab-poster-example header strong { display: block; color: #fff; font-size: 23px; line-height: 1.15; }
.pab-poster-body { display: grid; grid-template-columns: 1.35fr .65fr; gap: 13px; margin-top: 15px; }
.pab-poster-image { display: grid; place-items: center; height: 300px; border-radius: 14px; color: #257268; background: linear-gradient(145deg, #d8f6ef, #bcebe0); font-size: 11px; font-weight: 900; }
.pab-poster-message { margin-top: 13px; padding: 14px; border-radius: 12px; color: #7e5111; background: #ffe8b1; font-size: 12px; font-weight: 900; text-align: center; }
.pab-poster-body aside { display: grid; gap: 10px; }
.pab-poster-body aside div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 105px; padding: 10px; border-radius: 12px; color: #46506a; background: #fff; border: 1px solid #e1dfed; text-align: center; }
.pab-poster-body aside b { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 5px; border-radius: 50%; color: #fff; background: #ff8f50; }
.pab-poster-body aside span { font-size: 10px; font-weight: 750; }
.pab-poster-example footer { margin-top: 15px; padding-top: 10px; border-top: 1px solid #d8d2ed; color: #626d86; font-size: 9px; font-weight: 750; text-align: center; }

@media (max-width: 760px) {
  .pab-app { margin: 12px auto; border-radius: 20px; }
  .pab-hero { min-height: 0; padding: 20px 18px 24px; }
  .pab-brand-row { align-items: flex-start; }
  .pab-brand { font-size: 12px; }
  .pab-privacy-link { min-height: 36px; padding: 7px 10px; font-size: 0; }
  .pab-privacy-link svg { width: 19px; height: 19px; }
  .pab-hero-grid { grid-template-columns: 1fr; gap: 10px; min-height: 0; margin: 40px auto 8px; text-align: center; }
  .pab-hero-copy h2 { margin-inline: auto; font-size: clamp(39px, 12vw, 56px); }
  .pab-hero-copy > p { font-size: 16px; }
  .pab-feature-pills { justify-content: center; }
  .pab-hero-visual { width: 260px; height: 235px; transform: scale(.82); margin: -5px auto -20px; }
  .pab-start-grid { grid-template-columns: 1fr; }
  .pab-start-card { min-height: 96px; padding: 15px !important; }
  .pab-home-note { align-items: flex-start; font-size: 10px; }

  .pab-chat-shell { min-height: min(820px, calc(100vh - 24px)); max-height: none; grid-template-rows: auto auto minmax(260px, 48vh) auto auto; }
  .pab-chat-header { min-height: 72px; padding: 11px 14px; }
  .pab-guide-title { margin-left: -8px; }
  .pab-guide-avatar { width: 43px; height: 43px; }
  .pab-icon-button { width: 38px; height: 38px; }
  .pab-progress-wrap { padding-inline: 15px; }
  .pab-chat-log { padding: 18px 12px 24px; }
  .pab-message-row { gap: 7px; }
  .pab-mini-avatar { width: 30px; height: 30px; font-size: 12px; }
  .pab-message-wrap { max-width: calc(100% - 37px); }
  .pab-message-user .pab-message-wrap { max-width: 91%; }
  .pab-bubble { padding: 13px 14px; font-size: 13px; }
  .pab-input-panel { padding: 16px 15px 18px; }
  .pab-reply-dock { padding: 10px 12px 11px; }
  .pab-decision-replies { display: grid; grid-template-columns: 1fr 1fr; }
  .pab-choice-yes,
  .pab-choice-no { min-width: 0; width: 100%; }
  .pab-chat-footer { padding-inline: 12px; }
  .pab-chat-footer span { max-width: 80%; }
  .pab-check-grid,
  .pab-design-grid,
  .pab-tick-list,
  .pab-question-list { grid-template-columns: 1fr; }
  .pab-presentation-flow { grid-template-columns: 1fr; }
  .pab-calendar-head { display: none; }
  .pab-calendar-row { grid-template-columns: 75px 1fr; }
  .pab-calendar-row small { grid-column: 2; }
  .pab-modal-card { padding: 23px 18px 18px; }
  .pab-example-content { padding: 10px; }
  .pab-cover-example,
  .pab-bibliography-example,
  .pab-page-example,
  .pab-poster-example { min-height: 520px; }
  .pab-cover-example { padding-inline: 27px; }
  .pab-cover-art { margin-top: 43px; }
  .pab-cover-info { width: 230px; margin-top: 38px; }
  .pab-bibliography-example { padding: 42px 30px; }
  .pab-page-example { padding: 48px 35px 40px; }
  .pab-poster-example { padding: 14px; }
}

@media (max-width: 420px) {
  .pab-brand span:last-child { display: none; }
  .pab-feature-pills span:nth-child(3) { display: none; }
  .pab-start-card { grid-template-columns: 48px minmax(0, 1fr) 25px; gap: 10px; }
  .pab-start-icon { width: 46px; height: 46px; }
  .pab-start-text strong { font-size: 15px; }
  .pab-guide-title strong { font-size: 14px; }
  .pab-guide-title span { font-size: 10px; }
  .pab-cover-title { font-size: 20px; }
  .pab-poster-body { grid-template-columns: 1fr; }
  .pab-poster-body aside { grid-template-columns: repeat(3, 1fr); }
  .pab-poster-body aside div { min-height: 80px; padding: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .pab-app *,
  .pab-app *::before,
  .pab-app *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body * { visibility: hidden !important; }
  .pab-app,
  .pab-app * { visibility: visible !important; }
  .pab-app { position: absolute; inset: 0; width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .pab-chat-shell { display: block !important; max-height: none; background: #fff; }
  .pab-chat-header,
  .pab-progress-wrap,
  .pab-message-user,
  .pab-input-panel,
  .pab-reply-dock,
  .pab-chat-footer,
  .pab-modal,
  .pab-example-modal { display: none !important; }
  .pab-chat-log { max-height: none; padding: 0; overflow: visible; background: #fff; }
  .pab-message-row { break-inside: avoid; margin-bottom: 12px; }
  .pab-mini-avatar { display: none; }
  .pab-message-wrap { max-width: 100%; width: 100%; }
  .pab-bot-bubble { border-color: #bbb; box-shadow: none; }
  .pab-inline-example { display: none !important; }
}
