/* Page title to intro description, 8px tighter than the utility class */
h1.mb-8 {
  margin-bottom: calc(2rem - 8px);
}

h1.mb-6 {
  margin-bottom: calc(1.5rem - 8px);
}

html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: #e4e4e4 transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: #e4e4e4;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #d8d8d8;
}

/* Skip link: hidden for sighted users, visible on keyboard focus (Tailwind sr-only not in output.css) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus,
.sr-only:focus-visible {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 50;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background-color: #ffffff;
  color: #0f172a;
  border-radius: 0.25rem;
  text-decoration: none;
  box-shadow: 0 0 0 3px rgba(0, 137, 255, 0.1);
  outline: 2px solid #0089ff;
  outline-offset: 2px;
}

/* Mues AI case study narrative blocks (between gallery images) */
.mues-case-block {
  width: min(100%, 655px);
  max-width: 655px;
  margin-left: auto;
  margin-right: auto;
}
.mues-case-block h2 {
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .mues-case-block h2 {
    font-size: 1.25rem;
  }
}
.mues-case-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.mues-case-block p,
.mues-case-block li {
  font-size: 1rem;
  line-height: 1.625;
  color: #777;
}
.mues-case-block strong,
.mues-case-block b {
  font-weight: 600;
}
.mues-case-block ul {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  list-style-type: disc !important;
  list-style-position: outside !important;
}
.mues-case-block .mues-bullet-list {
  list-style: disc;
  list-style-position: outside;
  padding-left: 1.5rem;
}
.mues-case-block li {
  display: list-item !important;
}
.mues-case-block li + li {
  margin-top: 0.5rem;
}
.mues-case-block ol {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}
.mues-case-block h2 + h3 {
  margin-top: 0.75rem;
}
.mues-case-block .mues-case-lead {
  margin-bottom: 1rem;
}

/* Project Styles */
.project-image {
  transition: transform 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.02);
}

.project-badge {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-card:hover .project-badge {
  opacity: 1;
}

.harman-ui-section:hover .project-badge {
  opacity: 1;
}

.ai-product-power-section:hover .project-badge {
  opacity: 1;
}

/* Link Styles */
a:hover {
  color: #0089FF !important;
}

.case-back {
  display: inline-block;
  margin: -4px 0 20px -8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #979797;
  line-height: 24px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.case-back:hover {
  background-color: #f4f4f4;
  color: #777 !important;
  text-decoration: none;
}

/* Inline links with optional left icon on hover — keeps anchor baseline with body text */
.link-with-logo {
  position: relative;
  display: inline;
  vertical-align: baseline;
  line-height: inherit;
}

.about-find-me {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2em 0.35em;
  max-width: 100%;
}

.about-find-me .link-with-logo {
  vertical-align: baseline;
}

.link-with-logo .link-logo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  border-radius: 2px;
  transition: opacity 0.2s ease;
}

.link-with-logo:hover .link-logo,
.link-with-logo:focus-within .link-logo {
  opacity: 1;
}

.link-with-logo a {
  display: inline;
  line-height: inherit;
  vertical-align: baseline;
  padding-left: 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.link-with-logo:hover a,
.link-with-logo:focus-within a {
  padding-left: 20px;
}

/* Button Styles */
.book-call-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  height: 32px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Open Runde', sans-serif;
  color: white;
  background-color: #0089FF;
  border: 1px solid #0089FF;
  border-radius: 24px;
  corner-shape: squircle;
  cursor: pointer;
  text-decoration: none;
}

.book-call-button:hover {
  color: white !important;
}

.portfolio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  height: 32px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Open Runde', sans-serif;
  color: #333;
  background-color: rgba(255, 255, 255, 1);
  border: 1px solid #E4E4E4;
  border-radius: 24px;
  corner-shape: squircle;
  cursor: pointer;
  text-decoration: none;
  margin-left: 4px;
}

.portfolio-button:hover {
  background-color: #fbfbfb;
  border-color: #d1d5db;
  color: #333 !important;
}

/* Portfolio "Next" button in portfolio page */
#portfolio-next-btn {
  width: 96px;
}

#portfolio-next-btn:hover {
  background-color: rgba(255, 255, 255, 1) !important;
  border-color: #eee !important;
  color: #777 !important;
}

#portfolio-next-btn span:first-child {
  color: rgba(151, 151, 151, 1);
  font-weight: 400;
}

#portfolio-next-btn span:last-child {
  color: #979797;
  font-weight: 400;
}

#portfolio-next-btn:hover span {
  color: #777 !important;
}

/* Project detail previous/next navigation */
.project-case-nav {
  width: min(100%, 655px);
  margin: 48px auto 0 !important;
  margin-bottom: 0 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Keep total distance to previous block exactly 48px */
.prose > *:has(+ .project-case-nav) {
  margin-bottom: 0 !important;
}

.prose.mx-auto.max-w-4xl.flex.flex-col.gap-8:has(+ .project-case-nav) {
  margin-bottom: 0 !important;
}

.project-case-nav .portfolio-button {
  margin-left: 0;
  font-size: 13px;
}

.project-case-nav .portfolio-button:hover {
  background-color: rgba(255, 255, 255, 1) !important;
  border-color: #eee !important;
  color: #777 !important;
}

.project-case-nav .portfolio-button span {
  font-size: 13px !important;
}

.project-case-nav .portfolio-button:hover span {
  color: #777 !important;
}

.project-case-nav .portfolio-button span:first-child {
  color: rgba(151, 151, 151, 1);
  font-weight: 400;
}

.project-case-nav .portfolio-button span:last-child {
  color: #979797;
  font-weight: 400;
}

.show-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  height: 32px;
  width: fit-content;
  max-width: 100%;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Open Runde', sans-serif;
  color: rgba(119, 119, 119, 1);
  background-color: #f5f5f5;
  border: 1px solid #f5f5f5;
  border-radius: 24px;
  corner-shape: squircle;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.show-more-button:hover {
  color: #333 !important;
  background-color: #f5f5f5 !important;
  border-color: #f5f5f5 !important;
}

.glossary-button:hover {
  background-color: #0077e6 !important;
  border-color: #0077e6 !important;
}

.glossary-button:active {
  transform: scale(0.98);
}

/* Badge Styles */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #166534;
  background-color: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.availability-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
}

/* Service Card Styles */
.service-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background-color: #fafafa;
  border: none;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.service-card-icon {
  flex-shrink: 0;
  display: block;
  color: #c8c8c8;
}

.service-card h3 {
  margin: 0;
  line-height: 1.35;
}

.service-card:hover {
  background-color: #f5f5f5;
  transform: translateY(-1px);
}

/* Open Source Project Card Styles */
.opensource-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.opensource-card:has(.pi) {
  grid-column: 1 / -1;
  order: 1;
  aspect-ratio: 8 / 3;
}

@media (max-width: 640px) {
  .opensource-projects-grid {
    grid-template-columns: 1fr;
  }

  .opensource-card:has(.pi) {
    grid-column: auto;
    aspect-ratio: 4 / 3;
  }
}

.opensource-card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 4 / 3;
  background-color: #fff;
  border: 1px solid #f4f4f4;
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
}

.opensource-card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.opensource-stage {
  position: relative;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.opensource-stage:not(.is-prompt) > .snb,
.opensource-stage:not(.is-prompt) > .so {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.opensource-stage.is-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 14px 56px;
}

.opensource-card:has(.pi) {
  overflow: visible;
}

.opensource-card:has(.pi-pop.is-open) .opensource-stage,
.opensource-card:has(.pi.is-active) .opensource-stage,
.opensource-card:has(.pi:focus-within) .opensource-stage {
  z-index: 8;
}

.opensource-card-meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.opensource-card:hover .opensource-card-meta,
.opensource-card:focus-within .opensource-card-meta {
  opacity: 1;
  transform: none;
}

.opensource-card:has(.pi-pop.is-open) .opensource-card-meta {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.opensource-card-name {
  pointer-events: auto;
  font-family: 'Open Runde', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: #1e293b;
  text-decoration: none;
  cursor: pointer;
}

.opensource-card-name:hover {
  color: #1e293b !important;
}

.opensource-card-open:hover {
  color: #17181A !important;
}

.opensource-card-open {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: #17181A;
  text-decoration: none;
  line-height: 0;
}

/* Slider Nav Button */
.opensource-card .snb {
  --snb-bg: transparent;
  --snb-hover-bg: #f7f7f7;
  --snb-border-color: #f2f2f2;
  --snb-icon-color: #17181A;
  --snb-divider-color: var(--snb-border-color);
  --snb-radius: 9999px;
  --snb-height: 36px;
  --snb-width: 90px;
  --snb-transition-duration: 0.28s;
  --snb-transition-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --snb-hover-padding: 2px;
  --snb-icon-size: 18px;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--snb-width);
  height: var(--snb-height);
  border-radius: var(--snb-radius);
  border: 1px solid var(--snb-border-color);
  background: var(--snb-bg);
  cursor: pointer;
  overflow: hidden;
}

.opensource-card .snb-js-slide-bg {
  position: absolute;
  top: var(--snb-hover-padding);
  bottom: var(--snb-hover-padding);
  left: var(--snb-hover-padding);
  right: 50%;
  background: var(--snb-hover-bg);
  border-radius: var(--snb-radius);
  pointer-events: none;
  z-index: 0;
  transform: scaleX(0) translateX(0);
  transform-origin: right center;
  transition: transform var(--snb-transition-duration) var(--snb-transition-easing);
}

.opensource-card .snb-js.snb-enter-right-prep .snb-js-slide-bg {
  transform: scaleX(0) translateX(100%);
  transition: none;
}

.opensource-card .snb-js.snb-hover-left .snb-js-slide-bg {
  transform: scaleX(1) translateX(0);
}

.opensource-card .snb-js.snb-hover-right .snb-js-slide-bg {
  transform: scaleX(1) translateX(100%);
}

.opensource-card .snb-js.snb-exit-from-left .snb-js-slide-bg {
  transform: scaleX(0) translateX(0);
}

.opensource-card .snb-js.snb-exit-from-right .snb-js-slide-bg {
  transform: scaleX(0) translateX(100%);
}

.opensource-card .snb-js.snb-hover-left .snb-divider,
.opensource-card .snb-js.snb-hover-right .snb-divider,
.opensource-card .snb-js.snb-enter-right-prep .snb-divider {
  opacity: 0;
}

.opensource-card .snb-left,
.opensource-card .snb-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--snb-icon-color);
  padding: 0;
  z-index: 1;
}

.opensource-card .snb-divider {
  width: 1px;
  height: 60%;
  min-height: 16px;
  background: var(--snb-divider-color);
  flex-shrink: 0;
  opacity: 1;
  transition: opacity var(--snb-transition-duration) var(--snb-transition-easing);
}

.opensource-card .snb-icon {
  width: var(--snb-icon-size);
  height: var(--snb-icon-size);
  display: block;
}

.opensource-card .snb-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Slider One — matches slider-one-component.vercel.app (md) */
.opensource-card .so {
  position: relative;
  z-index: 2;
  width: min(256px, 100%);
  --so-track-height: 36px;
  --so-track-radius: 12px;
  --so-track-bg: #f2f2f2;
  --so-track-border: #f2f2f2;
  --so-progress-bg: #ffffff;
}

.opensource-card .so-track {
  position: relative;
  min-height: var(--so-track-height);
  touch-action: none;
  user-select: none;
  cursor: pointer;
}

.opensource-card .so-track.is-drag,
.opensource-card .so-track.is-drag input[type="range"] {
  cursor: grabbing;
}

html.so-dragging,
html.so-dragging * {
  cursor: grabbing !important;
}

.opensource-card .so-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--so-track-height);
  transform: translateY(-50%);
  border-radius: var(--so-track-radius);
  background: var(--so-track-bg);
  border: 1px solid var(--so-track-border);
  pointer-events: none;
  transition: transform 0.15s ease;
}

.opensource-card .so-track.is-drag .so-track-bg {
  transform: translateY(-50%) scale(1.002);
}

.opensource-card .so-progress {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: calc(var(--so-track-height) - 4px);
  padding-inline: 2px;
  box-sizing: border-box;
  transform: translateY(-50%);
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
}

.opensource-card .so-progress-inner {
  position: relative;
  height: 100%;
  border-radius: 10px;
}

.opensource-card .so-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--so-progress-bg);
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
  transition: none;
}

.opensource-card .so-track:not(.is-drag) .so-fill {
  transition: width 0.08s ease-out;
}

.opensource-card .so-divider {
  position: absolute;
  width: 2px;
  border-radius: 999px;
  background: #c4c4c4;
  top: 8px;
  bottom: 8px;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.opensource-card .so-divider-main {
  right: 8px;
  opacity: 1;
}

.opensource-card .so-divider-left {
  left: 5px;
}

.opensource-card .so-divider-right {
  right: 6px;
}

.opensource-card .so-label,
.opensource-card .so-value {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #979797;
  pointer-events: none;
}

.opensource-card .so-label {
  left: 12px;
  font-weight: 500;
  z-index: 1;
}

.opensource-card .so-value {
  right: 12px;
  z-index: 4;
}

.opensource-card .so-track input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: 100%;
  height: 44px;
  margin: 0;
  transform: translateY(-50%);
  opacity: 0;
  cursor: pointer;
  z-index: 30;
  appearance: none;
  background: transparent;
}

/* Prompt Input */
.opensource-card .pi {
  position: relative;
  z-index: 2;
  width: 100%;
}

.opensource-card .pi-stack {
  width: 100%;
  max-width: 640px;
}

.opensource-card .pi-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.opensource-card .pi-files:not([hidden]) {
  margin-bottom: 8px;
}

.opensource-card .pi-files[hidden] { display: none; }

.opensource-card .pi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 6px 4px 8px;
  border-radius: 10px;
  border: 1px solid #e8e8e8;
  background: #fafafa;
  color: #1f1f1f;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
}

.opensource-card .pi-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opensource-card .pi-chip button {
  border: 0;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.opensource-card .pi,
.opensource-card .pi * { box-sizing: border-box; }

.opensource-card .pi-input {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding: 12px 12px 12px 16px;
  background: #ffffff;
  border: 1px solid #F4F4F4;
  border-radius: 16px;
  transition: border-radius 0.2s ease, border-color 0.2s ease;
}

.opensource-card .pi-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 32px;
}

.opensource-card .pi:not(.is-single-line) .pi-input-row {
  align-items: flex-start;
}

.opensource-card .pi.is-single-line .pi-input-row {
  align-items: center;
}

.opensource-card .pi-voice .pi-icon-mic {
  width: 24px;
  height: 24px;
}

.opensource-card .pi-input textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  padding: 1px 0;
  margin: 0;
  max-height: 72px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: -0.02em;
  color: #17181A;
  caret-color: #17181A;
}

.opensource-card .pi-input textarea::placeholder { color: #BBBBBB; }

.opensource-card .pi-voice {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #17181A;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease;
}

.opensource-card .pi-voice:hover {
  background: #2a2b2e;
}

.opensource-card .pi-voice:active {
  background: #1a1b1e;
}

.opensource-card .pi-icon-send,
.opensource-card .pi-icon-stop { display: none; }

.opensource-card .pi.has-text .pi-icon-mic,
.opensource-card .pi.is-recording .pi-icon-mic,
.opensource-card .pi.is-recording .pi-icon-send { display: none; }

.opensource-card .pi.has-text .pi-icon-send { display: block; }
.opensource-card .pi.is-recording .pi-icon-stop { display: block; }
.opensource-card .pi.is-recording.has-text .pi-icon-send { display: none; }

.opensource-card .pi-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: calc(100% - 32px);
  max-width: calc(100% - 32px);
  margin: 0 auto;
  height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 16px;
  border-radius: 0 0 16px 16px;
  border: 0 solid #F6F6F6;
  background: #FBFBFB;
  pointer-events: none;
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, border-color 0.2s ease;
}

.opensource-card .pi:hover .pi-toolbar,
.opensource-card .pi:focus-within .pi-toolbar,
.opensource-card .pi.is-active .pi-toolbar {
  height: 40px;
  opacity: 1;
  overflow: visible;
  border-width: 0 1px 1px;
  border-color: #F6F6F6;
  pointer-events: auto;
}

.opensource-card .pi-toolbar-left,
.opensource-card .pi-toolbar {
  min-width: 0;
}

.opensource-card .pi-toolbar-left {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.opensource-card .pi-toolbar > .pi-tool {
  flex-shrink: 0;
}

.opensource-card .pi-tool {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #AAAAAA;
  cursor: pointer;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.48px;
  white-space: nowrap;
}

.opensource-card .pi-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.opensource-card .pi-tool-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.opensource-card .pi-tool-agent { color: #585BEF; }
.opensource-card .pi-tool-agent .pi-icon-task { display: none; }
.opensource-card .pi-tool-agent.is-task { color: #FFC135; }
.opensource-card .pi-tool-agent.is-task .pi-icon-agent { display: none; }
.opensource-card .pi-tool-agent.is-task .pi-icon-task { display: inline-flex; }

.opensource-card .pi-tool-sources:hover,
.opensource-card .pi-attach:hover { color: #979797; }
.opensource-card .pi-tool-sources.is-on { color: #777; }
.opensource-card .pi-tool-sources[aria-expanded="true"] { color: #585BEF; }

.opensource-card .pi-tool-model.is-deep { color: #777; }
.opensource-card .pi-tool-model.is-deep .pi-tool-icon { color: #FDCB59; }
.opensource-card .pi-tool-model:not(.is-deep) .pi-tool-icon { color: #AAAAAA; }

.opensource-card .pi-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  min-width: 0;
  height: 10px;
  overflow: hidden;
  opacity: 0;
  color: #AAAAAA;
  transition: width 0.15s ease, min-width 0.15s ease, opacity 0.15s ease;
}

.opensource-card .pi:hover .pi-caret,
.opensource-card .pi-tool[aria-expanded="true"] .pi-caret {
  width: 10px;
  min-width: 10px;
  opacity: 1;
}

.opensource-card .pi-tool-label {
  white-space: nowrap;
}

.opensource-card .pi-tool:hover { background: transparent; }

.opensource-card .pi-attach { padding: 0; color: #AAAAAA; }

.opensource-card .pi-pop {
  display: none;
  position: absolute;
  z-index: 6;
  top: calc(100% + 8px);
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #F4F4F4;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.opensource-card .pi-pop.is-open { display: flex; }
.opensource-card .pi-pop[data-pop="sources"] { min-width: 220px; }

.opensource-card .pi-option {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 4px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777;
  cursor: pointer;
  text-align: left;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.opensource-card .pi-option:hover { background: #F5F5F5; color: #17181A; }
.opensource-card .pi-option.is-selected { color: #17181A; }
.opensource-card .pi-option-label { flex: 1; min-width: 0; font-weight: 400; }

.opensource-card .pi-option-check {
  display: none;
  margin-left: auto;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.opensource-card .pi-option.is-selected .pi-option-check { display: block; }

.opensource-card .pi-source-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.opensource-card .pi-box {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  background: #fff;
  color: transparent;
}

.opensource-card .pi-box svg { display: block; }
.opensource-card .pi-box.is-on {
  border-color: #17181A;
  background: #17181A;
  color: #fff;
}

/* Selections Slider Styles */
.selections-slider-container:hover .selections-slider-btn {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.selections-slider-btn:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(229, 231, 235, 0.7) !important;
}

.selections-slider-btn:hover svg path {
  opacity: 0.9 !important;
}

.selections-dot:hover {
  background: #cbd5e1 !important;
}

.selections-dot.active {
  background: #dddddd !important;
  width: 24px !important;
}

/* Bottom Navigation Styles */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

.bottom-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #777;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Open Runde', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  transform: scale(1);
  opacity: 0.8;
  transform-origin: center;
}

.bottom-nav-item:first-child {
  transform-origin: left center;
}

.bottom-nav-item:last-child {
  transform-origin: right center;
}

.bottom-nav-item svg {
  color: #ddd;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item:hover {
  background: #f5f5f5;
  color: #0089FF;
  transform: scale(1.05);
  opacity: 1;
}

.bottom-nav-item:first-child:hover {
  transform: scale(1.05);
  transform-origin: left center;
}

.bottom-nav-item:last-child:hover {
  transform: scale(1.05);
  transform-origin: right center;
}

.bottom-nav-item:hover svg {
  color: #0089FF;
}

.bottom-nav-item:hover .nav-text {
  display: inline;
  animation: fadeIn 0.3s ease;
  font-size: 14px;
  transform: scale(1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-4px) scale(1);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.bottom-nav-item.active {
  background: #f5f5f5;
  color: #0089FF;
  transform: scale(1);
  opacity: 1;
}

.bottom-nav-item.active svg {
  color: #0089FF;
}

.bottom-nav-item.active .nav-text {
  display: inline;
  font-size: 14px;
}

.bottom-nav-item .nav-text {
  display: none;
  font-size: 14px;
}

.bottom-nav-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-nav {
  position: fixed;
  left: 8px;
  top: 50%;
  z-index: 1000;
  transform: translateY(-50%);
  padding-left: 20px;
  font-family: 'Open Runde', sans-serif;
  --dot-flight: 350ms;
  --dot-impact: 280ms;
  --dot-from: #0089FF;
  --dot-to: #0089FF;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav.is-sliding {
  opacity: 0;
  pointer-events: none;
}

.side-nav__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-nav__item {
  position: relative;
  height: 24px;
}

.side-nav__link {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 24px;
  padding: 0;
  border-radius: 3px;
  color: #737373;
  font-size: 12px;
  font-weight: 400;
  line-height: 24px;
  text-decoration: none;
  outline: none;
  transition: color 200ms ease;
}

.side-nav__link:hover,
.side-nav__link:focus-visible {
  color: #1a1a1a;
}

.side-nav__link.is-active,
.side-nav__link.is-active:hover,
.side-nav__link.is-active:focus-visible {
  color: #0089FF;
}

.side-nav__link:focus-visible {
  box-shadow: inset 0 0 0 1.5px rgba(26, 26, 26, 0.35);
}

.side-nav__label {
  display: inline-block;
  will-change: transform;
}

.side-nav__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--dot-to);
  pointer-events: none;
}

.side-nav__dot.is-travelling {
  animation: side-nav-dot-crossfade calc(var(--dot-flight) * 0.5) ease-out both;
}

@keyframes side-nav-dot-crossfade {
  from { background-color: var(--dot-from); }
  to { background-color: var(--dot-to); }
}

@media (max-width: 640px) {
  body:has(.bottom-nav) .side-nav {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .bottom-nav {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .side-nav {
    left: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-nav {
    transition: none;
  }

  .side-nav__dot.is-travelling {
    animation: none;
  }
}

/* Form Styles */
.email-input:focus {
  border-color: #0089FF;
}

/* Footer Responsive Styles */
@media (max-width: 768px) {
  .footer-header {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .footer-columns {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px 24px !important;
  }
}

@media (max-width: 480px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px 24px !important;
  }
  footer {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  .footer-header {
    margin-bottom: 32px !important;
  }
  .footer-columns {
    margin-bottom: 32px !important;
  }
}

/* Timeline Styles */
.timeline {
  margin-top: 0;
}

.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  align-items: baseline;
  padding: 0;
}

.timeline-date {
  font-size: 14px;
  color: #979797;
  min-width: 90px;
  font-variant-numeric: tabular-nums;
  font-family: "Chivo Mono", monospace;
  font-weight: 300;
  line-height: 1.6;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  font-size: 14px;
  color: #777;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .timeline-item {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
  }
  .timeline-date {
    min-width: auto;
  }
}

/* About2 — square favorite cards (pixel-perfect grid) */
.a2cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 64px;
  padding: 0;
  list-style: none;
}

.a2card-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.a2card-wrap:hover,
.a2card-wrap:focus-within {
  z-index: 2;
}

.a2card-wrap .a2card {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.a2card {
  position: relative;
  border: 1px solid #f4f4f4;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.a2card:focus-visible {
  outline: 2px solid #0089ff;
  outline-offset: 3px;
}

.a2card__tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px);
  z-index: 5;
  padding: 6px 10px;
  border-radius: 8px;
  background: #323232;
  color: #fff;
  font-family: "Open Runde", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.a2card-wrap:hover .a2card__tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* -- Card 1: GitHub heatmap ------------------------------------------- */
.a2card--gh {
  background: #e6f9f0;
  padding: 0;
}

.a2card--gh::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top right,
    rgba(230, 249, 240, 0.92) 0%,
    rgba(230, 249, 240, 0.62) 22%,
    rgba(230, 249, 240, 0.28) 42%,
    transparent 58%
  );
}

.a2card__gh-grid {
  --gh-cols: 12;
  --gh-rows: 10;
  --gh-cell: max(
    calc(100% / var(--gh-cols)),
    calc(100% / var(--gh-rows))
  );
  position: absolute;
  inset: 0;
  z-index: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(var(--gh-cols), var(--gh-cell));
  grid-template-rows: repeat(var(--gh-rows), var(--gh-cell));
  gap: 0;
  padding: 0;
  place-content: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom left,
    #000 0%,
    #000 24%,
    rgba(0, 0, 0, 0.45) 44%,
    rgba(0, 0, 0, 0.18) 58%,
    rgba(0, 0, 0, 0.06) 70%,
    transparent 82%
  );
  mask-image: linear-gradient(
    to bottom left,
    #000 0%,
    #000 24%,
    rgba(0, 0, 0, 0.45) 44%,
    rgba(0, 0, 0, 0.18) 58%,
    rgba(0, 0, 0, 0.06) 70%,
    transparent 82%
  );
}

.a2gh {
  display: block;
  box-sizing: border-box;
  border-radius: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.a2gh.l0 { background: #e6f9f0; }
.a2gh.l1 { background: #c8ead8; }
.a2gh.l2 { background: #9fd9b8; }
.a2gh.l3 { background: #5cb888; }

.a2card__gh-pill {
  position: absolute;
  z-index: 2;
  top: 22%;
  right: 16%;
  background: #ffffff;
  border-radius: 7px;
  padding: 3px 7px 3px 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Open Runde", sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #064e3b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  white-space: nowrap;
  pointer-events: none;
}

.a2card__gh-pill-ico {
  width: 10px;
  height: 10px;
  color: #064e3b;
  flex-shrink: 0;
}

.a2card__gh-stat {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 12px;
  right: 14px;
  pointer-events: none;
}

.a2card__gh-num {
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  font-family: "Open Runde", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #064e3b;
  line-height: 1;
  letter-spacing: -0.03em;
}

.a2card__gh-arrow {
  width: 12px;
  height: 12px;
  color: #064e3b;
  margin-top: 2px;
  flex-shrink: 0;
}

.a2card__gh-label {
  font-size: 11px;
  color: #0f5c40;
  margin-top: 4px;
  font-weight: 500;
  line-height: 1.3;
}

/* -- Card 2: Music ---------------------------------------------------- */
.a2card--music {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 40%, #d6e7f5 100%);
  padding: 0;
  align-items: stretch;
  text-align: left;
}

.a2card__music-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
  padding: 16px 16px 0;
  box-sizing: border-box;
}

.a2card__music-head {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.a2card__music-title {
  font-family: "Open Runde", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #323232;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.a2card__music-artist {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.a2card__music-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  border-radius: 6px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.a2card__music-btn:hover {
  opacity: 0.7;
}

.a2card__music-btn:active {
  transform: scale(0.92);
}

.a2card__music-btn:focus-visible {
  outline: 2px solid #0089ff;
  outline-offset: 2px;
}

.a2card__music-btn .a2card__music-btn-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.a2card__music-btn--play {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  color: #0089ff;
}

.a2card__music-btn--play:hover {
  color: #0077e6;
  opacity: 1;
}

.a2card__music-vinyl {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 2px;
  min-height: 0;
  overflow: hidden;
}

.a2card__music-vinyl-disc {
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #3a3a3a 0%, #323232 24%, #2a2a2a 100%);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 14px rgba(50, 50, 50, 0.14);
  position: relative;
  transform: translateY(calc(34% - 8px));
  animation: a2cardVinyl 16s linear infinite;
  animation-play-state: paused;
  overflow: hidden;
}

.a2card__music-vinyl-disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0,
    transparent 2.6px,
    rgba(0, 0, 0, 0.16) 2.6px,
    rgba(0, 0, 0, 0.16) 3.1px,
    rgba(255, 255, 255, 0.035) 3.1px,
    rgba(255, 255, 255, 0.035) 3.4px,
    transparent 3.4px,
    transparent 6.2px
  );
  -webkit-mask-image: radial-gradient(circle, transparent 0 28%, #000 29% 100%);
  mask-image: radial-gradient(circle, transparent 0 28%, #000 29% 100%);
}

.a2card.is-playing .a2card__music-vinyl-disc {
  animation-play-state: running;
}

@keyframes a2cardVinyl {
  from { transform: translateY(calc(34% - 8px)) rotate(0deg); }
  to { transform: translateY(calc(34% - 8px)) rotate(360deg); }
}

.a2card__music-vinyl-eye {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.a2card__music-vinyl-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .a2card__music-vinyl-disc { animation: none; }
}

/* -- Card 3: Tallinn weather ------------------------------------------- */
.a2card--weather {
  background-color: #121212;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.09) 0.55px,
    transparent 0.55px
  );
  background-size: 6px 6px;
  padding: 0;
  color: #ffffff;
  overflow: hidden;
  align-items: stretch;
}

.a2card--weather:hover,
.a2card--weather:focus-visible,
.a2card--weather:hover .a2card__weather-condition,
.a2card--weather:hover .a2card__weather-hilo,
.a2card--weather:hover .a2card__weather-city,
.a2card--weather:hover .a2card__weather-temp,
.a2card--weather:focus-visible .a2card__weather-condition,
.a2card--weather:focus-visible .a2card__weather-hilo,
.a2card--weather:focus-visible .a2card__weather-city,
.a2card--weather:focus-visible .a2card__weather-temp {
  color: #ffffff !important;
}

.a2card__weather-radar {
  position: absolute;
  top: 0;
  right: -2%;
  bottom: 16px;
  width: 74%;
  z-index: 0;
  pointer-events: none;
}

.a2card__weather-map {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: right bottom;
  transform: translateY(8px);
}

.a2card__weather-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  max-width: 56%;
  gap: 0;
}

.a2card__weather-meta {
  flex-shrink: 0;
  margin-top: 8px;
}

.a2card__weather-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.a2card__weather-condition {
  font-family: "Open Runde", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.a2card__weather-slashes {
  font-family: "Chivo Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: -0.1em;
  opacity: 0.85;
}

.a2card__weather-slashes.is-hidden {
  display: none;
}

.a2card__weather-hilo {
  margin-top: 3px;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #ffffff;
  opacity: 0.75;
}

.a2card__weather-city {
  margin-top: 0;
  font-family: "Open Runde", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
}

.a2card__weather-temp {
  margin-top: auto;
  padding-top: 8px;
  font-family: "Open Runde", sans-serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* -- Card 4: Favorite Stocks (wallet-style, light) ------------------- */
.a2card--stock {
  background-color: #ffffff;
  background-image: radial-gradient(
    circle at center,
    rgba(15, 23, 42, 0.07) 0.65px,
    transparent 0.65px
  );
  background-size: 7px 7px;
  padding: 14px 14px 0;
  text-align: left;
  align-items: stretch;
}

.a2card__stock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.a2card__stock-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.a2card__stock-logo svg {
  width: 14px;
  height: 14px;
  display: block;
}

.a2card__stock-tick {
  font-family: "Open Runde", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #323232;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.a2card__stock-value {
  display: flex;
  align-items: flex-start;
  gap: 1px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.a2card__stock-currency {
  font-family: "Open Runde", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #323232;
  line-height: 1;
  margin-top: 5px;
  letter-spacing: -0.02em;
}

.a2card__stock-whole {
  font-family: "Open Runde", sans-serif;
  font-size: 27px;
  font-weight: 600;
  color: #323232;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.a2card__stock-delta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.a2card__stock-arrow {
  width: 12px;
  height: 12px;
  color: #22c55e;
  flex-shrink: 0;
}

.a2card__stock-change {
  font-family: "Open Runde", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #22c55e;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.a2card__stock-period {
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
  letter-spacing: -0.01em;
}

.a2card__stock-chart {
  position: relative;
  flex: 1 1 auto;
  min-height: 54px;
  margin: 10px -14px 0;
  width: calc(100% + 28px);
  align-self: stretch;
}

.a2card__stock-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 54px;
}

.a2card--stock.is-down .a2card__stock-arrow,
.a2card--stock.is-down .a2card__stock-change {
  color: #ef4444;
}

/* Cards responsive (kept here so they stay grouped) */
@media (max-width: 768px) {
  .a2cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .a2cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .a2card { transition: none; }
  .a2card__tip { transition: none; }
}

/* About2 — horizontal bar timeline (hover / tap) */
.history-bars-section {
  margin-bottom: 40px;
  margin-top: 0;
}

.history-bars-section__title {
  font-size: 18px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 8px;
}

.history-bars-section__hint {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  line-height: 1.5;
}

.history-bars-scroller {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  margin-left: -2px;
  margin-right: -2px;
}

.history-bars {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 4px;
  height: 72px;
  width: max-content;
  padding: 0 2px;
}

.history-bars__bar {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 12px;
  min-width: 12px;
  max-width: 12px;
  height: 52%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 3px;
  background: #eee;
  cursor: pointer;
  color: inherit;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.2s ease,
    height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-end;
}

.history-bars__bar:nth-child(4n + 1) {
  height: 44%;
}
.history-bars__bar:nth-child(4n + 3) {
  height: 60%;
}

.history-bars__bar:hover,
.history-bars__bar:focus-visible {
  outline: none;
}

.history-bars__bar:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 137, 255, 0.25);
  z-index: 1;
}

.history-bars__bar.history-bars__bar--active {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 70%;
  background: #0089ff;
  border-radius: 4px;
}

.history-bars__bar.history-bars__bar--active:hover {
  background: #0077e6;
}

.history-bars__bar--future {
  position: relative;
  background: transparent !important;
  border: none;
  color: #eee;
  height: 56%;
  cursor: pointer;
}

.history-bars__bar--future .history-bars__bar-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.history-bars__bar--future.history-bars__bar--active {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 70%;
  background: #0089ff !important;
  border-radius: 4px;
}

.history-bars__bar--future.history-bars__bar--active .history-bars__bar-frame {
  opacity: 0;
}

.history-bars__bar--future.history-bars__bar--active:hover {
  background: #0077e6 !important;
}

.history-bars-detail {
  margin-top: 20px;
  padding: 20px 0 4px 0;
  border-top: 1px solid #f9f9f9;
  min-height: 112px;
}

.history-bars-detail__inner {
  will-change: opacity, transform;
}

.history-bars-detail__date {
  font-family: "Open Runde", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #0089ff;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.history-bars-detail__body {
  font-size: 14px;
  line-height: 1.6;
  color: #777;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .history-bars__bar {
    transition: none;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 640px) {
  .bottom-nav {
    gap: 1px;
    padding: 3px;
  }
  .bottom-nav-item {
    padding: 6px 8px;
    font-size: 12px;
  }
  .bottom-nav-item .nav-text {
    font-size: 12px;
  }
  .bottom-nav-item:hover .nav-text {
    font-size: 12px;
  }
  .bottom-nav-item.active .nav-text {
    font-size: 12px;
  }
  button:not(.history-bars__bar),
  .book-call-button {
    border-radius: 16px !important;
  }

  .w-full.border,
  video.border {
    border-radius: 12px !important;
  }
  .email-form {
    max-width: 100% !important;
  }
  .email-form > div {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .email-form .glossary-button,
  .email-form .email-input {
    width: 100% !important;
  }
}

/* Books Grid Styles */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px 16px;
  margin-top: 48px;
  width: 100%;
}

@media (min-width: 1200px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

.book-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  pointer-events: none;
  cursor: default;
  transition: transform 0.2s ease;
}

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 16px;
  background: #f5f5f5;
}

.book-title {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  margin-bottom: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author {
  font-size: 13px;
  color: #777;
  line-height: 1.4;
}

.book-staff-pick {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #0089FF;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 24px 16px;
  }
}

@media (max-width: 640px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 24px 12px;
  }
}

.case-video {
  margin: 0;
  border: 1px solid #F4F4F4;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  line-height: 0;
}

.case-video__media {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 640px) {
  .case-video {
    border-radius: 12px;
  }
}

/* Photo Grid Styles */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.photo-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.photo-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  aspect-ratio: 2/3;
  position: relative;
}

.photo-item img[data-reveal="fade"] {
  opacity: 0;
  background: #f5f5f5;
}

.photo-item img[data-reveal="fade"].is-revealed {
  opacity: 1;
}

.pixel-image-wrapper {
  border-radius: 12px;
}

.photo-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 0 0;
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

.photo-location {
  flex: 1;
}

.photo-date {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Resources Grid Styles */
/* Category Filter Styles */
.prose .category-filter,
.category-filter {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 32px !important;
  margin-bottom: 32px !important;
  align-items: center !important;
}

.sliding-pill {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: #f7f7f7;
  pointer-events: none;
  transition: none;
}

.is-pill-ready > .sliding-pill {
  transition:
    transform 0.34s cubic-bezier(0.22, 0.8, 0.28, 1),
    width 0.34s cubic-bezier(0.22, 0.8, 0.28, 1),
    height 0.34s cubic-bezier(0.22, 0.8, 0.28, 1);
}

@media (prefers-reduced-motion: reduce) {
  .is-pill-ready > .sliding-pill {
    transition: none;
  }
}

.prose .category-filter .category-btn,
.prose .category-btn,
.category-btn {
  display: inline-block !important;
  background: none !important;
  border: none !important;
  padding: 6px 12px !important;
  font-size: 14px !important;
  color: #777 !important;
  position: relative !important;
  z-index: 1 !important;
  cursor: pointer !important;
  transition: color 0.2s ease, font-weight 0.2s ease !important;
  font-family: 'Open Runde', sans-serif !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  margin: 0 !important;
  outline: none !important;
  width: auto !important;
  height: auto !important;
  float: none !important;
  clear: none !important;
}

.prose .category-btn:hover,
.category-btn:hover {
  background: transparent !important;
  color: #000 !important;
}

.prose .category-filter .category-btn.active,
.prose .category-btn.active,
.category-btn.active {
  color: #0089FF !important;
  font-weight: 500 !important;
  background: transparent !important;
  display: inline-block !important;
  border: none !important;
  padding: 6px 12px !important;
}

.category-filter--select {
  flex-wrap: nowrap !important;
  position: relative;
}

.category-dropdown {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.category-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Open Runde', sans-serif;
  color: #0089FF;
  background-color: #f7f7f7;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.category-dropdown__trigger:hover {
  color: #000;
}

.category-dropdown__trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 137, 255, 0.1);
}

.category-dropdown__value {
  white-space: nowrap;
}

.category-dropdown__chevron {
  flex-shrink: 0;
  color: #979797;
  transition: transform 0.2s ease;
}

.category-dropdown.is-open .category-dropdown__chevron {
  transform: rotate(180deg);
}

.category-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 100%;
  width: max-content;
  max-width: min(320px, calc(100vw - 48px));
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #F4F4F4;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.category-dropdown__menu[hidden] {
  display: none;
}

.category-dropdown__option {
  padding: 8px 12px;
  font-size: 14px;
  font-family: 'Open Runde', sans-serif;
  color: #777;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-dropdown__option:hover,
.category-dropdown__option:focus {
  background: #f7f7f7;
  color: #000;
  outline: none;
}

.category-dropdown__option--active {
  color: #0089FF;
  font-weight: 500;
  background: #f7f7f7;
}

.category-select-measurer {
  position: absolute;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Open Runde', sans-serif;
  pointer-events: none;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  margin-top: 32px;
}

.resources-promo-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: auto;
  max-width: calc(100vw - 48px);
  padding: 10px 12px;
  background: #f7f7f7;
  border-radius: 10px;
  text-decoration: none;
  color: #777;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.resources-promo-banner:hover {
  background: #f5f5f5;
  color: #666;
}

.resources-promo-banner:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 137, 255, 0.1);
}

.resources-promo-banner__text {
  flex-shrink: 0;
}

.resources-promo-banner__arrow {
  flex-shrink: 0;
  width: 0;
  height: 14px;
  overflow: hidden;
  opacity: 0;
  margin-left: 0;
  transform: translateX(-4px);
  transition:
    width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease,
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.resources-promo-banner:hover .resources-promo-banner__arrow,
.resources-promo-banner:focus-visible .resources-promo-banner__arrow {
  width: 14px;
  margin-left: 6px;
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 640px) {
  .resources-promo-banner {
    position: static;
    z-index: auto;
    width: 100%;
    max-width: none;
    margin-top: 32px;
  }
}

.resource-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
  border-radius: 8px;
}

.resource-item:hover {
  background-color: #f7f7f7;
}

.resource-favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  object-fit: contain;
  background: #f5f5f5;
}

.resource-favicon[src=""],
.resource-favicon:not([src]) {
  display: none;
}

.resource-content {
  flex: 1;
  min-width: 0;
}

.resource-title {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  margin-bottom: 4px;
  line-height: 1.4;
}

.resource-description {
  font-size: 13px;
  color: #777;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resources-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resources-grid--compact .resource-item {
  align-items: center;
  padding: 10px 12px;
}

.resources-grid--compact .resource-favicon {
  margin-top: 0;
}

.resources-grid--compact .resource-title {
  margin-bottom: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.det-tools-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 32px;
}

.det-category-group__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}

.det-category-group__heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #f7f7f7;
}

.prose .det-category-group__title,
.det-category-group__title {
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: normal;
  color: #111111;
}

.det-category-group__grid.resources-grid {
  margin-top: 0;
}

.det-category-group--solo .det-category-group__heading {
  display: none;
}

@media (max-width: 768px) {
  .resources-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
  .category-filter {
    flex-direction: row !important;
    gap: 12px;
  }
}

picture {
  display: contents;
}

/* Portfolio Images Styles */
.portfolio-images {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 0;
}

.portfolio-images img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid #F4F4F4;
  display: block;
}

.portfolio-item {
  display: none;
}

.portfolio-item.show {
  display: block;
}

@media (max-width: 640px) {
  .portfolio-images img {
    border-radius: 12px;
  }
}

.portfolio-heading-row ~ .category-filter {
  margin-bottom: 24px !important;
}

.portfolio-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.portfolio-view-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.portfolio-view-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #777;
  z-index: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.portfolio-view-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  padding: 6px 8px;
  border: 1px solid #F4F4F4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  color: #333;
  font-family: 'Open Runde', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.portfolio-view-btn:hover .portfolio-view-tip,
.portfolio-view-btn:focus-visible .portfolio-view-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-view-tip {
    transition: none;
  }
}

.portfolio-view-btn:hover {
  color: #000;
}

.portfolio-view-btn.is-active,
.portfolio-view-btn.is-active:hover {
  background: transparent;
  color: #0089FF;
}

.portfolio-view-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 137, 255, 0.1);
}

.portfolio-eye-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.portfolio-slider {
  margin: 0 -24px 160px;
  overflow: visible;
}

#scroll-container[data-portfolio-view="list"] .portfolio-slider,
.portfolio-slider[hidden] {
  display: none;
}

#scroll-container[data-portfolio-view="slider"] .portfolio-list-view {
  display: none;
}

.portfolio-slider-viewport {
  position: relative;
  overflow: visible;
  filter: url("#portfolio-fan");
  height: min(78vh, 760px);
  cursor: grab;
  touch-action: pan-y;
  outline: none;
}

.portfolio-slider-viewport:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(0, 137, 255, 0.35);
}

.portfolio-slider-viewport.is-dragging {
  cursor: grabbing;
}

.portfolio-slider-track {
  display: flex;
  align-items: stretch;
  gap: 24px;
  height: 100%;
  width: max-content;
  padding-right: 48px;
  will-change: transform;
}

.portfolio-slider-panel {
  margin: 0;
  height: 100%;
  flex: 0 0 auto;
}

.portfolio-slider-panel img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  border-radius: 16px;
  border: 1px solid #F4F4F4;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 640px) {
  .portfolio-slider {
    margin: 0 -24px 96px;
  }

  .portfolio-slider-viewport {
    height: min(64vh, 520px);
  }

  .portfolio-slider-panel img {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-slider-viewport {
    filter: none;
  }

  .portfolio-slider-panel img {
    border-color: #F4F4F4;
  }
}



/* AI Glossary Styles */
.glossary-layout {
  display: flex;
  gap: 64px;
  max-width: 655px;
  margin: 24px auto 0;
  align-items: flex-start;
  padding: 0;
}
.glossary-sidebar {
  position: fixed;
  left: 32px;
  top: 120px;
  width: 200px;
  flex-shrink: 0;
  align-self: flex-start;
}
.glossary-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  margin-bottom: 12px;
  font-family: 'Open Runde', sans-serif;
}
.glossary-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.glossary-sidebar-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #666;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}
.glossary-sidebar-btn:hover {
  background: linear-gradient(90deg, #f5f5f5 0%, #fafafa 100%);
  color: #000;
  transform: translateX(2px);
}
.glossary-sidebar-btn:active {
  transform: translateX(1px);
  background: #f0f0f0;
}
.glossary-sidebar-btn.active {
  background: linear-gradient(90deg, #f0f7ff 0%, #fafbfc 100%);
  color: #0089FF;
  font-weight: 600;
  transform: translateX(2px);
}
.glossary-sidebar-btn.active::before {
  height: 60%;
}
.glossary-content {
  flex: 1;
  min-width: 0;
  max-width: 65ch;
  width: 100%;
}
.glossary-term-title {
  font-size: 20px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 12px;
  font-family: 'Open Runde', sans-serif;
  line-height: 1.2;
}
.glossary-item {
  margin-bottom: 96px;
  scroll-margin-top: 120px;
  width: 100%;
  max-width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.glossary-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.glossary-item:last-child {
  margin-bottom: 0;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.glossary-term-description {
  font-size: 14px;
  line-height: 1.6;
  color: #777;
  margin-bottom: 12px;
}
.glossary-visualization {
  background: linear-gradient(135deg, #fafafa 0%, #f5f7fa 100%);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 32px;
  margin: 12px 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.token-visualization {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.token-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  animation: tokenItemFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  cursor: pointer;
}
.token-item:nth-child(1) { animation-delay: 0.05s; }
.token-item:nth-child(2) { animation-delay: 0.1s; }
.token-item:nth-child(3) { animation-delay: 0.15s; }
.token-item:nth-child(4) { animation-delay: 0.2s; }
.token-item:nth-child(5) { animation-delay: 0.25s; }
.token-item:nth-child(6) { animation-delay: 0.3s; }
.token-item:hover {
  border-color: #0089FF;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  transform: translateY(-5px) scale(1.03);
  z-index: 2;
}
.token-item:active {
  transform: translateY(-2px) scale(1.01);
  background: linear-gradient(135deg, #e0f0ff 0%, #d0e9fc 100%);
}
@keyframes tokenItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.token-text {
  font-weight: 500;
  color: #000;
}
.token-id {
  font-size: 11px;
  color: #999;
  font-family: 'Chivo Mono', monospace;
}
.tokenization-input-container {
  position: relative;
  margin-bottom: 16px;
}
.tokenization-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Chivo Mono', monospace;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}
.tokenization-input:hover {
  border: 1px solid #cbd5e1;
}
.tokenization-input:focus {
  border: 1px solid #0089FF;
  background: #fafbfc;
}
.tokenization-result-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f7fa 100%);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-height: 60px;
  margin-top: 16px;
  transition: all 0.25s ease;
}
.tokenization-result-container:hover {
  border: 1px solid #cbd5e1;
}
.tokenization-token {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: 'Chivo Mono', monospace;
  color: #000;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-block;
}
.tokenization-token:hover {
  border: 1px solid #0089FF;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  transform: translateY(-4px) scale(1.06);
  z-index: 10;
}
.tokenization-token:active {
  border: 1px solid #0089FF;
  transform: translateY(-1px) scale(1.02);
  background: linear-gradient(135deg, #e0f0ff 0%, #d0e9fc 100%);
}
.tokenization-token::after {
  content: attr(data-token-info);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: white;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  z-index: 100;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  max-width: 240px;
  white-space: normal;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 400;
}
.tokenization-token:not([data-token-info])::after,
.tokenization-token[data-token-info=""]::after {
  display: none;
}
.tokenization-token::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #e5e7eb;
  margin-bottom: 2px;
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.tokenization-token:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}
.tokenization-token:not([data-token-info]):hover::after,
.tokenization-token[data-token-info=""]:hover::after {
  display: none;
}
.tokenization-token:hover::before {
  opacity: 1;
}
.tokenization-token:not([data-token-info]):hover::before,
.tokenization-token[data-token-info=""]:hover::before {
  display: none;
}
.embedding-visualization {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.embedding-word {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  color: #666;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.9);
  animation: embeddingWordFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  cursor: pointer;
  position: relative;
  font-weight: 500;
}
.embedding-word::after {
  content: attr(data-similar-words);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: white;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
  z-index: 100;
  max-width: 280px;
  white-space: normal;
  text-align: left;
  line-height: 1.5;
  font-weight: 400;
}
.embedding-word:not([data-similar-words])::after,
.embedding-word[data-similar-words=""]::after {
  display: none;
}
.embedding-word::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #e5e7eb;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
  z-index: 101;
}
.embedding-word:hover {
  transform: scale(1.1) translateY(-3px);
  z-index: 5;
  border-color: #0089FF;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  color: #0089FF;
}
.embedding-word:active {
  transform: scale(1.05) translateY(-1px);
  background: linear-gradient(135deg, #e0f0ff 0%, #d0e9fc 100%);
}
.embedding-word:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}
.embedding-word:not([data-similar-words]):hover::after,
.embedding-word[data-similar-words=""]:hover::after {
  display: none;
}
.embedding-word:hover::before {
  opacity: 1;
}
.embedding-word:not([data-similar-words]):hover::before,
.embedding-word[data-similar-words=""]:hover::before {
  display: none;
}
.embedding-word.embedded {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-color: #0089FF;
  color: #0089FF;
  transform: scale(1.05);
  font-weight: 600;
}
.embedding-word.grouped {
  background: linear-gradient(135deg, #e8f4fd 0%, #d0e9fc 100%);
  border-color: #0089FF;
  transform: scale(1.03);
}
.embedding-word.grouped:hover {
  background: linear-gradient(135deg, #d0e9fc 0%, #b8dff9 100%);
  transform: scale(1.1) translateY(-3px);
}
.embedding-word.grouped:active {
  transform: scale(1.06) translateY(-1px);
}
@keyframes embeddingWordFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.latent-space-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  width: 100%;
  justify-content: center;
  align-items: center;
}
.latent-word {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: #666;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85) translateY(5px);
  font-weight: 500;
}
.latent-word:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-color: #0089FF;
  color: #0089FF;
  transform: scale(1.12) translateY(-3px);
  z-index: 5;
  font-weight: 600;
}
.latent-word:active {
  transform: scale(1.06) translateY(-1px);
  background: linear-gradient(135deg, #e0f0ff 0%, #d0e9fc 100%);
}
.latent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0089FF 0%, #0077e6 100%);
  opacity: 0;
  margin: 0 auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform: scale(0);
}
.latent-dot:hover {
  opacity: 1;
  transform: scale(2.2);
  background: linear-gradient(135deg, #0099ff 0%, #0088f5 100%);
  z-index: 5;
}
.latent-dot:active {
  transform: scale(1.8);
}
.neural-network-visualization {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  position: relative;
  padding: 24px;
}
.network-layer {
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
}
.network-layer::before {
  content: attr(data-layer-name);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #999;
  font-family: 'Inter', sans-serif;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.network-layer:hover::before {
  opacity: 1;
}
.network-node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0089FF 0%, #0077e6 100%);
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  animation: networkNodePulse 2s ease-in-out infinite;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.network-node::after {
  content: attr(data-node-info);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: white;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
  z-index: 100;
  max-width: 240px;
  white-space: normal;
  text-align: left;
  line-height: 1.5;
  font-weight: 400;
}
.network-node:not([data-node-info])::after,
.network-node[data-node-info=""]::after {
  display: none;
}
.network-node::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #e5e7eb;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
  z-index: 101;
}
.network-node:hover {
  opacity: 1;
  transform: scale(1.18);
  z-index: 10;
  background: linear-gradient(135deg, #0099ff 0%, #0088f5 100%);
}
.network-node:active {
  transform: scale(1.1);
  background: linear-gradient(135deg, #0077e6 0%, #0066d4 100%);
}
.network-node:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}
.network-node:not([data-node-info]):hover::after,
.network-node[data-node-info=""]:hover::after {
  display: none;
}
.network-node:hover::before {
  opacity: 1;
}
.network-node:not([data-node-info]):hover::before,
.network-node[data-node-info=""]:hover::before {
  display: none;
}
.network-connection {
  position: absolute;
  background: linear-gradient(to bottom, rgba(0, 137, 255, 0.2), rgba(0, 137, 255, 0.05));
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
}
.network-layer:hover .network-connection {
  opacity: 0.6;
}
@keyframes networkNodePulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}
@keyframes networkFlow {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.network-arrow {
  width: 0;
  height: 0;
  border-left: 10px solid #0089FF;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  opacity: 0.6;
  transition: all 0.3s ease;
  animation: networkFlow 0.6s ease forwards;
}
.network-layer:hover ~ .network-arrow {
  opacity: 1;
  transform: scale(1.1);
}
.parameter-visualization {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 500px;
}
.parameter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0089FF 0%, #0077e6 100%);
  opacity: 0;
  transform: scale(0);
  animation: parameterDotFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 137, 255, 0.3);
}
.parameter-dot:hover {
  opacity: 1;
  transform: scale(1.8);
  box-shadow: 0 0 12px rgba(0, 137, 255, 0.5);
  background: linear-gradient(135deg, #0099ff 0%, #0088f5 100%);
  z-index: 5;
}
.parameter-dot:active {
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(0, 137, 255, 0.4);
}
@keyframes parameterDotFadeIn {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 0.5;
    transform: scale(1);
  }
}
.model-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.model-example {
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 16px;
}
.model-example-question {
  font-size: 13px;
  color: #777;
  margin-bottom: 8px;
}
.model-example-answer {
  font-size: 14px;
  color: #000;
  font-weight: 500;
}
.transformer-visualization {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}
.transformer-word {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #000;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  z-index: 2;
  font-weight: 500;
}
.transformer-word::after {
  content: attr(data-attention-info);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: white;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
  z-index: 100;
  max-width: 240px;
  white-space: normal;
  text-align: left;
  line-height: 1.5;
  font-weight: 400;
}
.transformer-word:not([data-attention-info])::after,
.transformer-word[data-attention-info=""]::after {
  display: none;
}
.transformer-word::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #e5e7eb;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
  z-index: 101;
}
.transformer-word:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-color: #0089FF;
  color: #0089FF;
  transform: translateY(-3px) scale(1.06);
  z-index: 10;
  font-weight: 600;
}
.transformer-word:active {
  transform: translateY(-1px) scale(1.02);
  background: linear-gradient(135deg, #e0f0ff 0%, #d0e9fc 100%);
}
.transformer-word:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}
.transformer-word:not([data-attention-info]):hover::after,
.transformer-word[data-attention-info=""]:hover::after {
  display: none;
}
.transformer-word:hover::before {
  opacity: 1;
}
.transformer-word:not([data-attention-info]):hover::before,
.transformer-word[data-attention-info=""]:hover::before {
  display: none;
}
.transformer-word.attention-active {
  background: linear-gradient(135deg, #e8f4fd 0%, #d0e9fc 100%);
  border-color: #0089FF;
  font-weight: 600;
}
.attention-connection {
  position: absolute;
  height: 2px;
  background: linear-gradient(to right, rgba(0, 137, 255, 0.3), rgba(0, 137, 255, 0.1));
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.transformer-word:hover ~ .transformer-word .attention-connection,
.transformer-visualization:hover .attention-connection {
  opacity: 0.4;
}
.attention-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.attention-line {
  stroke: #0089FF;
  stroke-width: 1;
  opacity: 0.3;
}
.pre-training-visualization {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pre-training-word {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: #666;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9) translateY(5px);
  font-weight: 500;
}
.pre-training-word:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-color: #0089FF;
  color: #0089FF;
  transform: translateY(-4px) scale(1.08);
  z-index: 5;
  font-weight: 600;
}
.pre-training-word:active {
  transform: translateY(-1px) scale(1.03);
  background: linear-gradient(135deg, #e0f0ff 0%, #d0e9fc 100%);
}
@keyframes preTrainFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.85);
  }
  50% {
    transform: translateY(-2px) scale(1.05);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.fine-tuning-visualization {
  display: flex;
  gap: 12px;
  align-items: center;
}
.fine-tuning-before,
.fine-tuning-after {
  flex: 1;
  padding: 16px;
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 8px;
}
.fine-tuning-arrow {
  font-size: 24px;
  color: #0089FF;
}
.reinforcement-visualization {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.rl-step {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
}
.chain-of-thought {
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 24px;
}
.chain-step {
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 2px solid #0089FF;
}
.chain-step-title {
  font-weight: 600;
  color: #000;
  margin-bottom: 8px;
  font-size: 14px;
}
.chain-step-content {
  color: #777;
  font-size: 14px;
  line-height: 1.6;
}
.inference-visualization {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.inference-step {
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  color: #000;
}
.rag-visualization {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  padding: 24px;
}
.rag-step-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 600px;
  position: relative;
}
.rag-box {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 22px;
  flex: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rag-box::after {
  content: attr(data-step-info);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: white;
  color: #1e293b;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
  z-index: 100;
  max-width: 320px;
  white-space: normal;
  text-align: left;
  line-height: 1.5;
  font-weight: 400;
}
.rag-box:not([data-step-info])::after,
.rag-box[data-step-info=""]::after {
  display: none;
}
.rag-box::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #e5e7eb;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
  z-index: 101;
}
.rag-box:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-color: #0089FF;
  transform: translateY(-4px);
  border-width: 2px;
}
.rag-box:active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #e0f0ff 0%, #d0e9fc 100%);
}
.rag-box:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}
.rag-box:not([data-step-info]):hover::after,
.rag-box[data-step-info=""]:hover::after {
  display: none;
}
.rag-box:hover::before {
  opacity: 1;
}
.rag-box:not([data-step-info]):hover::before,
.rag-box[data-step-info=""]:hover::before {
  display: none;
}
.rag-box-title {
  font-size: 14px;
  color: #000;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: 'Open Runde', sans-serif;
  transition: color 0.2s ease;
}
.rag-box:hover .rag-box-title {
  color: #0089FF;
}
.rag-box-description {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  transition: color 0.2s ease;
}
.rag-box:hover .rag-box-description {
  color: #555;
}
.rag-arrow {
  font-size: 24px;
  color: #0089FF;
  opacity: 0.6;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.rag-step-row:hover .rag-arrow {
  opacity: 1;
  transform: scale(1.2);
}
.rag-arrow-down {
  font-size: 24px;
  color: #0089FF;
  opacity: 0.6;
  transition: all 0.3s ease;
}
.rag-step-row:hover ~ .rag-step-row .rag-arrow-down {
  opacity: 1;
}
.agent-visualization {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.agent-component {
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  color: #000;
  width: 100%;
  max-width: 300px;
  text-align: center;
}
.workflow-visualization {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.workflow-step {
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  color: #000;
  font-weight: 500;
}
.workflow-arrow {
  color: #0089FF;
  font-size: 18px;
}
.llm-visualization {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.llm-word {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #000;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  opacity: 0;
  cursor: pointer;
  transform: scale(0.95) translateY(5px);
  font-weight: 500;
}
@media (max-width: 1024px) {
  .glossary-layout {
    margin-top: 32px;
    gap: 32px;
  }
}
@media (max-width: 640px) {
  .glossary-layout {
    margin-top: 24px;
    gap: 24px;
    padding: 0;
  }
  .glossary-sidebar {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
  }
  .glossary-sidebar-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .glossary-sidebar-menu {
    gap: 6px;
  }
  .glossary-sidebar-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
  .glossary-item {
    margin-bottom: 64px;
    scroll-margin-top: 96px;
  }
  .glossary-term-title {
    font-size: 18px;
  }
  .glossary-term-description {
    font-size: 13px;
  }
  .glossary-visualization {
    padding: 20px;
    min-height: 0;
  }
  #context-window .glossary-visualization {
    max-height: 260px;
    overflow: auto;
  }
  .glossary-visualization,
  .tokenization-result-container,
  .embedding-visualization,
  .latent-space-grid,
  .model-examples,
  .rag-visualization {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
}
@media (max-width: 1024px) {
  .glossary-layout {
    flex-direction: column;
    align-items: stretch;
  }
  .glossary-sidebar {
    position: sticky;
    left: auto;
    width: 100%;
  }
  .glossary-sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .glossary-sidebar-btn {
    border: 1px solid #eeeeee;
    border-radius: 6px;
  }
  .glossary-reference {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* CMS styles removed (cms.html + /cms route disabled). */

/* Conversion modal – non-blocking, bottom-right, 10s delay, 24h dismiss */
.conversion-modal {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  width: 100%;
  max-width: 320px;
  padding: 20px 20px 22px 20px;
  background-color: #ffffff;
  border: 1px solid rgba(244, 244, 244, 1);
  border-radius: 16px;
  font-family: 'Open Runde', sans-serif;
  z-index: 1001;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}

/* Global click haptics + cursor microinteraction */
.haptic-burst-line {
  position: fixed;
  pointer-events: none;
  z-index: 1200;
  transform: translate(-50%, -50%);
  width: 1.5px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 137, 255, 0.85);
  transform-origin: center center;
  animation: haptic-line-burst 420ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes haptic-line-burst {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) rotate(var(--haptic-line-angle)) translateY(0) scaleY(0.35);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--haptic-line-angle))
      translateY(calc(-1 * var(--haptic-line-travel))) scaleY(1);
  }
}

.haptic-toggle {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(151, 151, 151, 0.92);
  cursor: pointer;
  z-index: 1150;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.82;
  padding: 0;
}

.haptic-toggle:hover {
  color: #777;
  opacity: 1;
}

.haptic-toggle:focus-visible {
  outline: 2px solid rgba(0, 137, 255, 0.28);
  outline-offset: 4px;
  border-radius: 4px;
}

.haptic-toggle .haptic-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.haptic-toggle .haptic-wave {
  opacity: 1;
  transition: opacity 0.18s ease;
}

.haptic-toggle.is-muted .haptic-wave {
  opacity: 0;
}

@media (max-width: 640px) {
  .haptic-toggle {
    display: none;
  }
}
.conversion-modal:hover {
  border-color: #eee;
}
.conversion-modal-visible {
  opacity: 1;
  transform: translateY(0);
}
.conversion-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #777;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: none;
}
.conversion-modal-close:hover {
  background: none;
  color: #777;
}
.conversion-modal-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.15px;
  color: rgba(151, 151, 151, 1);
  margin-bottom: 8px;
}
.conversion-modal-headline {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px;
  line-height: 1.3;
}
.conversion-modal-subtext {
  font-size: 14px;
  color: #777;
  margin: 0 0 14px;
  line-height: 1.4;
}
.conversion-modal-subtext .conversion-modal-keyword {
  transition: color 0.2s ease, font-family 0.2s ease;
}
.conversion-modal:hover .conversion-modal-keyword {
  font-family: 'Mynerve', cursive;
  color: #0089FF;
}
.conversion-modal-cta {
  display: inline-flex;
  margin-bottom: 0px;
}

@media (max-width: 639px) {
  .conversion-modal {
    left: 24px;
    right: 24px;
    /* Above main menu: 24px from viewport bottom + nav height + 24px gap */
    bottom: calc(24px + 48px + 24px);
    width: auto;
    max-width: none;
  }
}
