:root {
  --bg: #07090f;
  --bg-soft: #0d1220;
  --panel: rgba(16, 20, 31, 0.74);
  --panel-strong: rgba(17, 21, 34, 0.92);
  --panel-main: rgba(15, 19, 31, 0.96);
  --panel-muted: rgba(11, 15, 24, 0.72);
  --panel-subtle: rgba(255, 255, 255, 0.03);
  --panel-border: rgba(168, 190, 255, 0.18);
  --panel-border-soft: rgba(255, 255, 255, 0.07);
  --panel-border-strong: rgba(188, 208, 255, 0.24);
  --text: #f7f9ff;
  --text-soft: rgba(232, 238, 255, 0.72);
  --text-dim: rgba(232, 238, 255, 0.48);
  --accent: #a8c1ff;
  --accent-strong: #e7eeff;
  --accent-glow: rgba(123, 160, 255, 0.34);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(83, 112, 255, 0.24), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(130, 199, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #06070b 0%, #090c14 34%, #070910 100%);
  font-family: "Inter", "Noto Sans SC", sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  position: relative;
  isolation: isolate;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: -2;
  animation: pulse 13s ease-in-out infinite alternate;
}

.ambient-a {
  top: 2rem;
  left: -6rem;
  width: 28rem;
  height: 28rem;
  background: rgba(82, 114, 255, 0.18);
}

.ambient-b {
  right: -5rem;
  top: 22rem;
  width: 24rem;
  height: 24rem;
  background: rgba(117, 180, 255, 0.12);
  animation-delay: -6s;
}

.noise {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(circle at center, black 40%, transparent 88%);
}

.home-page {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 5rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 2rem;
  padding: 4rem 0 2rem;
}

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

.eyebrow,
.section-kicker,
.chat-panel__label,
.starter-zone__label {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-size: 0.74rem;
  margin: 0 0 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 6.7rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  max-width: 760px;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 1.6rem 0 0;
  max-width: 680px;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.resume-conversation {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 1.3rem;
  padding: 1.15rem 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(11, 15, 26, 0.76);
  border: 1px solid rgba(168, 190, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.resume-conversation__copy {
  min-width: 0;
}

.resume-conversation__heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.resume-conversation__eyebrow {
  margin: 0 0 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.resume-conversation__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  background: rgba(168, 190, 255, 0.12);
  border: 1px solid rgba(189, 209, 255, 0.16);
  color: rgba(236, 242, 255, 0.88);
  font-size: 0.75rem;
  white-space: nowrap;
}

.resume-conversation__title {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.2;
}

.resume-conversation__meta,
.resume-conversation__hint {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
}

.resume-conversation__meta {
  font-size: 0.9rem;
  color: rgba(232, 238, 255, 0.58);
}

.resume-conversation__hint {
  font-size: 0.94rem;
  line-height: 1.65;
}

.resume-conversation__actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.resume-conversation__dismiss {
  border: 0;
  padding: 0.75rem 0.2rem;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.resume-conversation__dismiss:hover {
  color: var(--text);
}

.primary-button,
.secondary-button,
.card-action,
.chip-button,
.suggestion-button,
.related-mini-card button {
  border: 0;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  padding: 0.92rem 1.38rem;
  color: #06101e;
  background: linear-gradient(135deg, #f7fbff, #aac4ff 68%, #d6e4ff);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 14px 40px rgba(125, 164, 255, 0.34);
  font-weight: 700;
}

.secondary-button {
  padding: 0.92rem 1.38rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.primary-button:hover,
.secondary-button:hover,
.card-action:hover,
.chip-button:hover,
.suggestion-button:hover,
.related-mini-card button:hover,
.close-button:hover {
  transform: translateY(-2px);
}

.hero-floating-cards {
  position: relative;
  min-height: 640px;
}

.floating-card {
  position: absolute;
  width: min(100%, 290px);
  padding: 1.3rem 1.3rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(12, 16, 28, 0.8);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  cursor: pointer;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.floating-card::before,
.feature-card::before,
.stack-card::before,
.detail-panel::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -30%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(170, 193, 255, 0.26), transparent 66%);
  opacity: 0.7;
  pointer-events: none;
}

.floating-card:hover,
.feature-card:hover,
.stack-card:hover {
  border-color: rgba(202, 217, 255, 0.36);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 60px rgba(0, 0, 0, 0.44),
    0 0 44px rgba(113, 159, 255, 0.18);
}

.floating-card__index,
.feature-card__index,
.stack-card__index {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.floating-card h3,
.feature-card h3,
.stack-card h3,
.related-mini-card h4 {
  margin: 0.65rem 0 0;
  line-height: 1.2;
  font-size: 1.18rem;
  text-wrap: balance;
}

.floating-card p,
.feature-card p,
.stack-card p {
  margin: 0.8rem 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

.section-block {
  margin-top: 6.2rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}

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

.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.feature-card {
  position: relative;
  padding: 1.4rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(168, 190, 255, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  backdrop-filter: blur(18px);
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.feature-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.feature-card[data-span="7"] {
  grid-column: span 7;
}

.feature-card[data-span="5"] {
  grid-column: span 5;
}

.feature-card[data-span="6"] {
  grid-column: span 6;
}

.feature-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  background: rgba(132, 168, 255, 0.12);
  border: 1px solid rgba(161, 192, 255, 0.18);
  color: rgba(236, 242, 255, 0.84);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.card-action {
  margin-top: auto;
  padding: 0.78rem 1rem;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-self: flex-start;
}

.quick-ask-panel,
.stack-card,
.side-card,
.detail-panel__header,
.starter-zone {
  background: var(--panel);
  border: 1px solid rgba(168, 190, 255, 0.12);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.quick-ask-panel {
  padding: 1.4rem;
}

.quick-ask-input-row,
.chat-input-row {
  display: flex;
  gap: 0.85rem;
}

.chat-input-row {
  margin-top: 0.8rem;
  padding-top: 0.15rem;
}

.quick-ask-panel input,
.chat-input-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: var(--text);
  padding: 0.96rem 1.2rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.quick-ask-panel input:focus,
.chat-input-row input:focus {
  border-color: rgba(189, 209, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(113, 159, 255, 0.12);
}

.quick-chip-row,
.message-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.quick-chip-row {
  margin-top: 1rem;
}

.chip-button,
.suggestion-button {
  padding: 0.78rem 1rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-button {
  color: rgba(232, 238, 255, 0.62);
}

.suggestion-button:hover,
.chip-button:hover {
  background: rgba(255, 255, 255, 0.045);
}

.topic-library-block {
  position: relative;
}

.topic-library-block::before {
  content: "";
  position: absolute;
  inset: 24px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(149, 180, 255, 0.12), transparent);
}

.topic-library__header {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.topic-library__header .section-kicker {
  margin: 0 0 0.7rem;
}

.topic-library__header h2 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.topic-library__intro {
  margin: 0;
  max-width: 42ch;
  justify-self: end;
  color: rgba(226, 234, 255, 0.66);
  line-height: 1.75;
}

.topic-library-groups {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 1) 8%, rgba(0, 0, 0, 1) 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 1) 8%, rgba(0, 0, 0, 1) 92%, transparent);
}

.topic-library-belt {
  overflow: hidden;
  padding: 0.35rem 0 0.5rem;
}

.topic-library-belt__track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: topicLibrarySlide 42s linear infinite;
}

.topic-library-belt:hover .topic-library-belt__track {
  animation-play-state: paused;
}

.topic-library-group-card {
  width: clamp(320px, 28vw, 430px);
  min-height: 220px;
  padding: 1.25rem 1.25rem 1.15rem;
  border-radius: 26px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(10, 14, 25, 0.62);
  border: 1px solid rgba(168, 190, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 60px rgba(0, 0, 0, 0.24);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.topic-library-group-card::before {
  content: "";
  position: absolute;
  inset: -28% auto auto -24%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(151, 181, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.topic-library-group-card:nth-child(5n + 2)::before,
.topic-library-group-card:nth-child(5n + 4)::before {
  background: radial-gradient(circle, rgba(187, 157, 255, 0.18), transparent 68%);
}

.topic-library-group-card:hover {
  transform: translateY(-4px);
  border-color: rgba(198, 214, 255, 0.22);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.34),
    0 0 36px rgba(113, 159, 255, 0.12);
}

.topic-library-group-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.topic-library-group-card__eyebrow,
.topic-library-group-card__count {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topic-library-group-card__eyebrow {
  color: rgba(229, 236, 255, 0.38);
}

.topic-library-group-card__count {
  color: rgba(201, 216, 255, 0.58);
}

.topic-library-group-card h3 {
  margin: 1.1rem 0 0;
  max-width: 10ch;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: rgba(247, 249, 255, 0.98);
}

.topic-library-group-card__intro {
  margin: 0.9rem 0 0;
  max-width: 34ch;
  color: rgba(220, 228, 250, 0.7);
  line-height: 1.72;
  font-size: 0.95rem;
}

.topic-library-group-card__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.topic-library-group-card__topic-button {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(234, 240, 255, 0.76);
  font-size: 0.78rem;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.topic-library-group-card__topic-button:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(190, 207, 255, 0.18);
  transform: translateY(-1px);
}

.topic-library-group-card__toggle {
  margin-top: 0.95rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(216, 228, 255, 0.7);
  font-size: 0.84rem;
}

.topic-library-group-card__toggle:hover {
  color: rgba(241, 246, 255, 0.92);
}

.trust-note {
  padding: 4rem 0 2rem;
  color: var(--text-dim);
  font-size: 0.96rem;
}

.detail-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.hidden {
  display: none;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 12, 0.68);
  backdrop-filter: blur(18px);
}

.detail-panel {
  position: relative;
  width: min(1320px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  margin: 18px auto;
  padding: 2rem;
  overflow: auto;
  background:
    radial-gradient(circle at top left, rgba(111, 153, 255, 0.13), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 22%),
    rgba(10, 13, 22, 0.96);
  border: 1px solid rgba(168, 190, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  z-index: 2;
}

.detail-panel__header {
  position: relative;
  padding: 1.2rem 1.35rem;
  overflow: hidden;
}

.detail-panel__header {
  background:
    radial-gradient(circle at top left, rgba(144, 181, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.015)),
    rgba(14, 19, 31, 0.84);
  border-color: rgba(188, 208, 255, 0.13);
}

.detail-panel__header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.detail-hook,
.detail-summary {
  max-width: 860px;
  color: var(--text-soft);
}

.detail-hook {
  margin: 0.8rem 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

.detail-summary {
  margin: 0.72rem 0 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(223, 232, 255, 0.72);
}

.chat-layout {
  display: block;
  margin-top: 0.8rem;
}

.chat-panel {
  position: relative;
  padding: 1.15rem;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--panel-main);
  border: 1px solid var(--panel-border-strong);
  border-radius: 24px;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 44px rgba(113, 159, 255, 0.08);
}

.chat-panel::before {
  display: none;
}

.chat-system-note {
  margin: 0 0 0.8rem;
  padding: 0.66rem 0.82rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(231, 238, 255, 0.68);
  font-size: 0.9rem;
  line-height: 1.6;
}

.messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  max-height: 58vh;
  overflow: auto;
  padding: 0.15rem 0.2rem 0.15rem 0;
}

.message {
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  line-height: 1.72;
  animation: messageIn 240ms ease;
  max-width: 92%;
}

.message--assistant {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 3px 0 0 rgba(167, 196, 255, 0.2);
}

.message--pending {
  opacity: 0.78;
}

.message--user {
  align-self: flex-end;
  max-width: 82%;
  background: linear-gradient(135deg, rgba(161, 191, 255, 0.2), rgba(118, 153, 243, 0.12));
  border: 1px solid rgba(164, 194, 255, 0.24);
  box-shadow: 0 10px 24px rgba(74, 103, 190, 0.14);
}

.message strong {
  color: var(--accent-strong);
}

#chat-input:disabled,
#chat-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.detail-shell.chat-active .detail-panel {
  padding-top: 1rem;
}

.detail-shell.chat-active .detail-panel__header {
  padding: 0.9rem 1.05rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)),
    rgba(14, 18, 30, 0.72);
  border-color: rgba(255, 255, 255, 0.07);
}

.detail-shell.chat-active .detail-panel__header h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.15;
  max-width: 760px;
}

.detail-shell.chat-active .detail-hook,
.detail-shell.chat-active .detail-summary {
  display: block;
}

.detail-shell.chat-active .detail-hook {
  margin-top: 0.45rem;
  font-size: 0.94rem;
  line-height: 1.6;
  color: rgba(225, 233, 255, 0.72);
}

.detail-shell.chat-active .detail-summary {
  margin-top: 0.4rem;
  font-size: 0.86rem;
  line-height: 1.58;
  color: rgba(206, 218, 246, 0.62);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-shell.chat-active .chat-layout {
  display: block;
}

.detail-shell.chat-active .chat-panel {
  min-height: 500px;
}

.detail-shell.chat-active .messages {
  gap: 1rem;
}

.detail-shell.chat-active .message--assistant {
  max-width: 88%;
}


@keyframes pulse {
  from {
    transform: translate3d(0, 0, 0) scale(0.96);
    opacity: 0.7;
  }

  to {
    transform: translate3d(12px, -16px, 0) scale(1.06);
    opacity: 1;
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes topicLibrarySlide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 0.5rem));
  }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
    padding-top: 2.8rem;
  }

  .hero-floating-cards {
    min-height: 420px;
  }

  .floating-card {
    position: relative;
    inset: auto !important;
    margin-bottom: 1rem;
    width: 100%;
  }

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

  .feature-card[data-span="7"],
  .feature-card[data-span="5"] {
    grid-column: span 1;
  }

  .chat-layout,
  .topic-columns,
  .topic-library-groups,
  .topic-library__header {
    grid-template-columns: 1fr;
  }

  .topic-library__intro {
    justify-self: start;
    max-width: 56ch;
  }

  .topic-library-group-card {
    width: clamp(300px, 52vw, 380px);
  }
}

@media (max-width: 780px) {
  .home-page {
    width: min(100% - 24px, 1280px);
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .topic-library__header h2 {
    max-width: 12ch;
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .topic-library-groups {
    mask-image: none;
    -webkit-mask-image: none;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
  }

  .topic-library-groups::-webkit-scrollbar {
    display: none;
  }

  .topic-library-belt {
    overflow: visible;
  }

  .topic-library-belt__track {
    animation: none;
    padding-right: 1rem;
  }

  .topic-library-group-card {
    width: min(82vw, 340px);
    min-height: 206px;
    padding: 1rem;
    border-radius: 22px;
  }

  .topic-library-group-card h3 {
    font-size: clamp(1.35rem, 7vw, 1.7rem);
  }

  .topic-library-group-card__intro {
    font-size: 0.9rem;
  }

  .topic-library-group-card__topics {
    gap: 0.5rem;
  }

  .topic-library-group-card__topics span {
    font-size: 0.74rem;
  }

  .topic-library-card {
    padding: 0.9rem;
  }

  .topic-library-card__meta {
    flex-wrap: wrap;
  }

  .topic-library-card h4 {
    font-size: 0.95rem;
  }

  .topic-library-card p {
    font-size: 0.84rem;
  }

  .quick-ask-input-row,
  .chat-input-row,
  .resume-conversation {
    flex-direction: column;
  }

  .resume-conversation {
    align-items: flex-start;
  }

  .resume-conversation__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .detail-panel {
    width: min(100% - 16px, 1320px);
    margin: 8px auto;
    max-height: calc(100vh - 16px);
    padding: 0.85rem;
  }

  .detail-panel__header {
    padding: 0.95rem 1rem;
  }

  .detail-panel__header h2 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .detail-hook {
    margin-top: 0.55rem;
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .detail-summary {
    margin-top: 0.45rem;
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .chat-panel {
    min-height: auto;
    padding: 1rem 0.95rem 0.95rem;
  }

  .messages {
    max-height: none;
    gap: 0.7rem;
    padding-right: 0;
  }

  .message {
    padding: 0.82rem 0.88rem;
    border-radius: 15px;
    line-height: 1.64;
  }

  .message--user {
    max-width: 100%;
  }

  .chat-input-row {
    gap: 0.7rem;
    margin-top: 0.65rem;
  }

  .chat-input-row input {
    padding: 0.88rem 1rem;
  }

  #chat-submit-btn {
    width: 100%;
  }
}
