:root {
  --site-width: 1120px;
  --safe-top: env(safe-area-inset-top, 0px);
  --nav-surface: #FFFDFF;
  --accent: #B76CDF;
  --accent-deep: #9E58CB;
  --accent-soft: #F5E9FD;
  --accent-pale: #FBF8FF;
  --text: #17141F;
  --text-soft: #625A73;
  --text-faint: #8E85A0;
  --line: #E8E0F1;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #FFFFFF;
  --surface-muted: rgba(255, 255, 255, 0.72);
  --shadow-lg: 0 24px 72px rgba(51, 26, 75, 0.08);
  --shadow-md: 0 16px 40px rgba(51, 26, 75, 0.08);
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(183, 108, 223, 0.18), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(183, 108, 223, 0.16), transparent 22%),
    linear-gradient(180deg, #FFFDFF 0%, #FAF7FE 56%, #F7F1FD 100%);
}

body.site-home-page {
  overflow-x: hidden;
}

.site-home {
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(183, 108, 223, 0.24);
}

.site-shell {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 22px 32px 0;
}

.site-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--nav-surface);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(183, 108, 223, 0.14);
}

.site-topbar-shell {
  padding-top: var(--safe-top);
  padding-bottom: 0;
}

.site-home-shell {
  padding-top: 0;
}

.site-home-main {
  padding-top: calc(108px + var(--safe-top));
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-home-header {
  position: relative;
  padding: 18px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.site-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.site-logo-mark img {
  width: 100%;
  height: 100%;
}

.site-logo-text {
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header-panel {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.site-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.site-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.site-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.header-install-link,
.hero-download-link,
.mobile-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.header-install-link:hover,
.hero-download-link:hover,
.mobile-download-link:hover {
  transform: translateY(-1px);
}

.button-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.button-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.header-install-link {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: none;
}

.header-install-link .button-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 360px);
  align-items: center;
  gap: 56px;
  padding: 92px 0 100px;
  overflow: hidden;
}

.hero-copy {
  max-width: 700px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 22px 0 18px;
  max-width: 620px;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.88;
}

.hero-copy .hero-note {
  margin: 0 0 4px;
  color: var(--text-faint);
  font-size: 0.85rem;
  line-height: 1.7;
}
.hero-copy .hero-note-container {
  margin: 0 0 28px;
}

.hero-download-link {
  width: fit-content;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: none;
}

.hero-download-link-mobile {
  display: none;
}

.hero-download-link .button-badge {
  background: var(--text);
  color: #FFFFFF;
}

.header-install-link.download-link-disabled,
.hero-download-link.download-link-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.header-install-link.download-link-disabled:hover,
.hero-download-link.download-link-disabled:hover {
  transform: none;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 100%;
}

.hero-visual::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 12%;
  bottom: 5%;
  height: 16%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(51, 26, 75, 0.12), rgba(51, 26, 75, 0.04) 52%, transparent 76%);
  filter: blur(18px);
  opacity: 0.55;
}

.hero-app-shot {
  position: relative;
  z-index: 1;
  width: min(100%, 330px);
  height: auto;
  filter: none;
}

.home-section {
  padding: 20px 0 28px;
  scroll-margin-top: 112px;
}

.hero-section {
  scroll-margin-top: 112px;
}

.section-heading {
  margin-bottom: 32px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: none;
  margin: 0;
  padding: 0;
  border-top: 0;
}

.feature-group {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px;
  border: 1px solid rgba(23, 20, 31, 0.05);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(247, 246, 251, 0.98), rgba(252, 251, 255, 0.92));
  box-shadow: 0 12px 34px rgba(23, 20, 31, 0.04);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(183, 108, 223, 0.16);
  color: var(--accent-deep);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-group-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.feature-group-header h3 {
  margin: 0;
  font-size: 1.46rem;
  letter-spacing: -0.03em;
}

.feature-group-header p {
  margin: 0;
  max-width: 27ch;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.feature-bullets {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.feature-bullet {
  margin: 0;
  padding: 0;
  list-style: disc;
  line-height: 1.55;
}

.feature-bullet::marker {
  color: var(--accent);
}

.feature-bullet-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-right: 8px;
}

.feature-bullet-detail {
  color: var(--text-faint);
  font-size: 0.94rem;
  font-weight: 400;
  letter-spacing: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  border-top: 0;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px;
  border: 1px solid rgba(183, 108, 223, 0.16);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(251, 248, 255, 0.86));
  box-shadow: var(--shadow-lg);
}

.pricing-card:nth-child(2) {
  background: linear-gradient(180deg, rgba(251, 248, 255, 0.98), rgba(244, 233, 253, 0.92));
}

.pricing-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pricing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(183, 108, 223, 0.12);
  color: var(--accent-deep);
}

.pricing-icon img {
  width: 24px;
  height: 24px;
}

.pricing-card-title h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.pricing-card-title p {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 22px;
}

.pricing-price {
  font-size: clamp(1.8rem, 2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.pricing-note {
  color: var(--text-faint);
  font-size: 0.92rem;
}

.pricing-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
}

.pricing-list-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  line-height: 1.72;
}

.pricing-list-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transform: translateY(2px);
}

.pricing-list-icon {
  width: 18px;
  height: 18px;
}

.pricing-list-partial-symbol {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.pricing-list-item.is-included {
  color: var(--text);
}

.pricing-list-item.is-included .pricing-list-marker {
  color: var(--accent-deep);
}

.pricing-list-item.is-partial {
  color: #737373;
}

.pricing-list-item.is-partial .pricing-list-marker {
  color: #737373;
}

.pricing-list-item.is-excluded {
  color: var(--text-faint);
  opacity: 0.76;
}

.pricing-list-item.is-excluded .pricing-list-marker {
  color: var(--text-faint);
}

.pricing-list-item.is-included span:last-child {
  font-weight: 500;
}

.pricing-list-item.is-partial span:last-child {
  font-weight: 500;
}

.pricing-list-item.is-excluded span:last-child {
  text-decoration: line-through;
  text-decoration-color: rgba(142, 133, 160, 0.5);
}

.faq-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(183, 108, 223, 0.14);
}

.faq-item {
  border: 0;
  border-bottom: 1px solid rgba(183, 108, 223, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  list-style: none;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--text-soft);
  font-size: 2rem;
  line-height: 1;
  transition: transform 180ms ease, color 180ms ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent-deep);
}

.faq-item p {
  margin: 0 0 24px;
  padding:0 20px 0 0;
  color: var(--text-soft);
  line-height: 1.85;
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(135deg, #B76CDF 0%, #BE70E4 48%, #A05DD3 100%);
}

.site-footer-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 24px 32px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo-footer {
  color: #FFFFFF;
}

.site-logo-footer .site-logo-mark {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.94rem;
}

.site-footer a {
  text-decoration: none;
}

.mobile-download-banner {
  display: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.site-thread-page {
  background: #FFFFFF;
  font-family: "PingFang SC", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --thread-text: #111827;
  --thread-text-soft: #6b7280;
  --thread-text-muted: #9ca3af;
  --thread-line: #e5e7eb;
  --thread-chip-bg: #f3f4f6;
  --thread-chip-bg-strong: #f5f5f5;
  --thread-reference-bg: rgba(203, 213, 225, 0.75);
  --thread-primary: #b76cdf;
  --thread-primary-deep: #9e58cb;
}

.thread-shell {
  max-width: 760px;
  padding: calc(8px + var(--safe-top)) 16px 32px;
}

.error-shell {
  padding-top: 28px;
  padding-bottom: 44px;
}

.error-shell .site-header {
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid rgba(183, 108, 223, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
}

.site-section {
  border: 1px solid rgba(183, 108, 223, 0.16);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 28px;
  margin-bottom: 20px;
}

.site-section h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.reference-meta {
  color: var(--text-faint);
  font-size: 0.94rem;
}

.thread-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 4px 0 12px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.96) 76%, rgba(255, 255, 255, 0) 100%);
}

.thread-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.thread-topbar-button,
.query-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--thread-text);
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.thread-topbar-button:hover,
.thread-topbar-button:focus-visible,
.query-action-button:hover,
.query-action-button:focus-visible {
  background: #e5e7eb;
  color: var(--thread-text);
}

.thread-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.thread-alphacat-icon,
.query-brand-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.thread-open-app-link,
.thread-continue-link,
.thread-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--thread-primary);
  color: #FFFFFF;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
  transition: background 160ms ease;
}

.thread-open-app-link:hover,
.thread-open-app-link:focus-visible,
.thread-continue-link:hover,
.thread-continue-link:focus-visible {
  background: var(--thread-primary-deep);
}

.thread-download-link {
  border: 1px solid var(--thread-border);
  background: #FFFFFF;
  color: var(--thread-text);
}

.thread-download-link:hover,
.thread-download-link:focus-visible {
  background: #F3F4F6;
}

.thread-hero {
  margin-bottom: 20px;
}

.thread-page-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.thread-page-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 12px;
  border-radius: 999px;
  background: rgba(142, 133, 160, 0.55);
  vertical-align: middle;
}

.thread-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.32;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.thread-ancestor {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(251, 248, 255, 0.9), rgba(247, 241, 253, 0.8));
}

.thread-ancestor-label {
  margin-bottom: 6px;
  color: var(--text-faint);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.thread-content {
  display: flex;
  flex-direction: column;
}

.thread-query {
  position: relative;
  padding: 0 0 30px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--thread-line);
  scroll-margin-top: 88px;
}

.thread-query:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.thread-query.is-active::before {
  display: none;
}

.query-header {
  margin-bottom: 16px;
}

.thread-entry-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--thread-text);
  font-weight: 500;
}

.thread-entry-title.is-root {
  font-size: clamp(1.45rem, 4vw, 1.92rem);
}

.query-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  min-height: 28px;
}

.query-brand-pill,
.query-references-button,
.query-meta-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  font-size: 0.875rem;
  line-height: 1;
}

.query-brand-pill {
  gap: 4px;
  padding: 4px 8px;
  border-radius: 9999px;
  background: #f9fafb;
  color: #262627;
  font-weight: 400;
}

.query-brand-icon {
  color: #262627;
}

.query-references-button {
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: #f9fafb;
  color: #262627;
  gap: 0;
  cursor: pointer;
  transition: background 160ms ease;
}

.query-references-button:hover,
.query-references-button:focus-visible {
  background: #f1f5f9;
}

.query-reference-stack {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 20px;
  flex: 0 0 auto;
}

.query-reference-chip-text {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  white-space: nowrap;
  line-height: 1;
  color: #262627;
  font-weight: 400;
}

.favicon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  background: var(--thread-chip-bg);
  color: var(--thread-text-soft);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.favicon-badge img[data-favicon-image] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favicon-badge[data-favicon-failed="true"] img[data-favicon-image] {
  display: none;
}

.favicon-badge-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.favicon-badge-fallback-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.query-reference-favicon {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 1px solid #ffffff;
  transform: translateY(-50%);
}

.query-meta-time {
  margin-left: auto;
  color: var(--thread-text-soft);
  font-size: 0.875rem;
}

.query-meta-time .thread-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.query-answer {
  color: #1f2937;
  font-size: 18px;
  line-height: 1.45;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  overflow-wrap: break-word;
  -webkit-user-select: text;
  user-select: text;
}

.query-answer > :first-child {
  margin-top: 0;
}

.query-answer > :last-child {
  margin-bottom: 0;
}

.query-answer p,
.query-answer ul,
.query-answer ol,
.query-answer .table-scroll,
.query-answer pre,
.query-answer blockquote {
  margin: 8px 0;
}

.query-answer h1,
.query-answer h2,
.query-answer h3,
.query-answer h4,
.query-answer h5,
.query-answer h6 {
  margin: 12px 0 8px;
  color: #111827;
  font-weight: 500;
  letter-spacing: 0;
}

.query-answer h1 {
  font-size: 24px;
  line-height: 32px;
}

.query-answer h2 {
  font-size: 20px;
  line-height: 28px;
}

.query-answer h3 {
  font-size: 18px;
  line-height: 26px;
}

.query-answer h4 {
  font-size: 16px;
  line-height: 24px;
}

.query-answer h5 {
  font-size: 14px;
  line-height: 22px;
}

.query-answer h6 {
  font-size: 12px;
  line-height: 20px;
}

.query-answer strong {
  color: #111827;
  font-weight: 500;
}

.query-answer a {
  color: #2563eb;
  text-decoration: underline;
}

.query-answer a.markdown-reference-link {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  border-radius: 999px;
  background: var(--thread-reference-bg);
  color: #666666;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  vertical-align: middle;
}

.query-answer a.markdown-research-link {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-image: url("/static/alphacat-research.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  color: var(--thread-text);
  text-decoration: none;
  vertical-align: middle;
  transition: background 160ms ease, color 160ms ease;
}

.query-answer a.markdown-research-link:hover,
.query-answer a.markdown-research-link:focus-visible {
  background-color: #F3F4F6;
  color: var(--thread-primary-deep);
}

.query-answer button.markdown-recall-evidence-link {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: var(--thread-reference-bg);
  background-image: url("/static/alphacat-recall-evidence.svg?v=20260601b");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  color: transparent;
  font-size: 0;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
}

.query-answer button.markdown-recall-evidence-link:hover,
.query-answer button.markdown-recall-evidence-link:focus-visible {
  background-color: #F3F4F6;
}

.query-answer ul,
.query-answer ol {
  padding-left: 1.35rem;
}

.query-answer li {
  margin-top: 0.46rem;
}

.query-answer li::marker {
  color: var(--thread-text);
  font-weight: 700;
}

.query-answer blockquote {
  margin: 8px 0;
  padding: 4px 0 4px 12px;
  border-left: 4px solid #d1d5db;
  border-radius: 0;
  background: #f9fafb;
  color: #6b7280;
}

.query-answer blockquote p:first-child {
  margin-top: 0;
}

.query-answer blockquote p:last-child {
  margin-bottom: 0;
}

.query-answer hr {
  height: 0;
  margin: 8px 0;
  border: 0;
  border-top: 1px solid #d1d5db;
}

.query-answer img {
  width: 100%;
  margin: 8px 0;
  border-radius: 8px;
}

.query-answer pre {
  overflow-x: auto;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
  color: #1f2937;
}

.query-answer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.query-answer pre code {
  color: inherit;
}

.query-answer :not(pre) > code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.query-answer .table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 8px 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e8ebef;
  border-radius: 4px;
  background: #ffffff;
}

.query-answer table {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
  background: #ffffff;
  table-layout: fixed;
}

.query-answer th,
.query-answer td {
  padding: 10px 12px;
  border: 0;
  color: #1f2937;
  font-size: 16px;
  line-height: 22px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.query-answer thead {
  background: #f1f2f4;
}

.query-answer tbody tr:nth-child(odd) {
  background: #ffffff;
}

.query-answer tbody tr:nth-child(even) {
  background: #f7f8fa;
}

.query-answer th,
.query-answer tbody td:first-child {
  color: #111827;
}

.query-answer td p,
.query-answer th p {
  margin: 0;
}

.thread-ancestor-link {
  color: var(--thread-primary-deep);
  text-decoration: none;
}

.query-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.thread-bottom-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 24px 0 8px;
}

.thread-continue-link,
.thread-download-link {
  min-width: 168px;
}

.thread-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(23, 20, 31, 0.92);
  color: #FFFFFF;
  font-size: 0.88rem;
  line-height: 1.2;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.thread-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.thread-scroll-bottom-button {
  position: fixed;
  right: max(16px, calc((100vw - 760px) / 2 + 16px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 58;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--thread-text-soft);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease, color 160ms ease, background 160ms ease;
}

.thread-scroll-bottom-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.thread-scroll-bottom-button:hover,
.thread-scroll-bottom-button:focus-visible {
  background: rgba(255, 255, 255, 0.96);
  color: var(--thread-text);
}

.thread-scroll-bottom-button .thread-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.reference-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.reference-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 71;
  max-height: min(72vh, 640px);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  background: #ffffff;
  box-shadow: 0 -18px 40px rgba(17, 24, 39, 0.12);
  transform: translateY(100%);
  transition: transform 220ms ease;
  overscroll-behavior-y: contain;
}

body.reference-sheet-open {
  overflow: hidden;
}

body.reference-sheet-open .reference-sheet-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.reference-sheet-open .reference-sheet {
  transform: translateY(0);
}

.reference-sheet-handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #d1d5db;
}

.reference-sheet-title {
  margin: 0;
  color: var(--thread-text);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.reference-sheet-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 12px;
}

.reference-sheet-close {
  position: absolute;
  left: 0;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--thread-text);
  transform: translateY(-50%);
  cursor: pointer;
}

.reference-sheet-close:hover,
.reference-sheet-close:focus-visible {
  background: #f3f4f6;
}

.reference-sheet-close .thread-icon {
  width: 20px;
  height: 20px;
}

.reference-sheet-list {
  overflow-y: auto;
  max-height: calc(min(72vh, 640px) - 84px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.reference-sheet-empty {
  padding: 24px 0 18px;
  color: var(--thread-text-soft);
  text-align: center;
}

.recall-evidence-item {
  padding: 12px 0;
}

.recall-evidence-item + .recall-evidence-item {
  border-top: 1px solid #f3f4f6;
}

.recall-evidence-item-label {
  margin-bottom: 6px;
  color: var(--thread-text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.recall-evidence-item-text {
  color: var(--thread-text);
  font-size: 1rem;
  line-height: 1.6;
}

.reference-sheet-item {
  display: block;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}

.reference-sheet-item + .reference-sheet-item {
  border-top: 1px solid #f3f4f6;
}

.reference-sheet-item:hover,
.reference-sheet-item:focus-visible {
  background: #fafafa;
}

.reference-sheet-item-title {
  margin-top: 8px;
  margin-bottom: 8px;
  color: var(--thread-text);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.reference-sheet-item-description {
  margin-bottom: 8px;
  color: #374151;
  font-size: 0.94rem;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.reference-sheet-item-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--thread-text-soft);
  font-size: 0.875rem;
  margin: 4px 0 8px;
}

.reference-sheet-favicon {
  width: 16px;
  height: 16px;
  margin-right: 2px;
  border-radius: 999px;
}

.reference-sheet-meta-dot {
  margin: 0 4px;
  color: var(--thread-text-muted);
}

@media (max-width: 980px) {
  .hero-section {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 24px;
  }

  .hero-visual {
    width: 100%;
    justify-content: center;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-shell {
    padding: 14px 18px 0;
  }

  .site-home-main {
    padding-top: calc(82px + var(--safe-top));
  }

  .site-home-header {
    flex-wrap: wrap;
    padding: 12px 0;
    border-radius: 0;
  }

  .site-menu-toggle {
    display: inline-block;
  }

  .site-header-panel {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-top: 12px;
    padding: 12px 0 4px;
    border: 0;
    border-top: 1px solid rgba(183, 108, 223, 0.18);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-header-panel.is-open {
    display: flex;
  }

  .site-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .site-nav a {
    width: 100%;
    padding: 10px 0;
  }

  .site-nav a.is-active::after {
    right: auto;
    width: 36px;
  }

  .header-install-link {
    width: 100%;
  }

  .hero-section {
    gap: 18px;
    padding: 34px 0 46px;
  }

  .hero-visual {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .hero-download-link-desktop {
    display: none;
  }

  .hero-download-link-mobile {
    display: inline-flex;
    width: min(100%, 320px);
    justify-content: center;
    justify-self: center;
  }

  .hero-copy p {
    margin-top: 18px;
    margin-bottom: 14px;
    max-width: none;
    font-size: 1rem;
    line-height: 1.8;
  }

  .hero-copy .hero-note {
    margin-bottom: 4px;
    font-size: 0.85rem;
  }

  .hero-copy .hero-note-container {
    margin: 0 0 20px;
  }

  .hero-app-shot {
    width: min(78vw, 320px);
  }

  .home-section {
    padding: 18px 0 22px;
  }

  .section-heading {
    margin-bottom: 22px;
  }

  .feature-group {
    padding: 22px;
    border-radius: 24px;
  }

  .feature-group-header {
    margin-top: 18px;
  }

  .feature-group-header p {
    max-width: none;
  }

  .feature-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-icon {
    width: 44px;
    height: 44px;
  }

  .feature-bullets {
    gap: 6px;
  }

  .pricing-card {
    padding: 22px;
    border-radius: 24px;
  }

  .pricing-price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .faq-item {
    padding: 0;
    border-radius: 0;
  }

  .faq-item summary {
    padding: 20px 0;
    font-size: 1.08rem;
  }

  .faq-item p {
    margin-bottom: 20px;
  }

  .site-footer {
    margin-top: 56px;
  }

  .site-footer-inner {
    padding: 18px 18px 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .error-shell {
    padding-top: 14px;
    padding-bottom: 30px;
  }

  .error-shell .site-header,
  .site-section {
    padding: 20px;
    border-radius: 22px;
  }

  .thread-shell {
    padding: calc(8px + var(--safe-top)) 14px 28px;
  }

  .thread-topbar {
    padding-bottom: 10px;
  }

  .thread-open-app-link,
  .thread-continue-link,
  .thread-download-link {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.86rem;
  }

  .thread-hero {
    margin-bottom: 18px;
  }

  .thread-query {
    padding-bottom: 24px;
    margin-bottom: 22px;
  }

  .thread-entry-title.is-root {
    font-size: 1.42rem;
  }

  .query-meta-time {
    margin-left: auto;
  }

  .query-answer {
    font-size: 17px;
    line-height: 1.45;
  }

  .query-answer pre {
    padding: 14px 16px;
    border-radius: 8px;
  }

  .thread-bottom-cta {
    padding-top: 22px;
  }
}

@media (max-width: 480px) {
  .site-logo-text {
    font-size: 1.06rem;
  }

  .hero-copy h1 {
    font-size: 2.3rem;
  }

  .header-install-link,
  .hero-download-link,
  .mobile-download-link {
    gap: 10px;
    padding: 11px 14px;
    font-size: 0.95rem;
  }

  .button-icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .thread-topbar-button,
  .query-action-button {
    width: 32px;
    height: 32px;
  }

  .thread-open-app-link {
    padding: 0 13px;
  }

  .query-meta {
    gap: 8px;
    font-size: 0.84rem;
  }

  .reference-sheet {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
