body {
  --lab-radius: 18px;
}

body #tech-hud,
body #tech-telemetry-rail,
body #tech-interface-layer,
body .tech-section-label {
  display: none;
}

body .landing-shell {
  padding-top: clamp(38px, 5vw, 64px);
}

body .landing-reveal {
  opacity: 1;
  transform: none;
}

html[theme='light'] body .lab-button:not(.secondary),
html[theme='light'] body #sendBtn {
  background: #08786f;
  color: #ffffff !important;
}

body #navbar {
  gap: 8px;
  padding: 0 10px;
}

body #title-nav {
  margin-left: 0;
  flex-shrink: 0;
}

body #title-nav > a {
  padding: 0 8px;
  white-space: nowrap;
}

body #vivia-logo {
  transform: none;
  margin-right: 0;
}

body #main-nav .main-nav-link {
  padding: 0 10px;
  white-space: nowrap;
  font-size: .86rem;
}

body #sub-nav {
  margin-right: 0;
  flex-shrink: 0;
}

body #main-grid > * {
  min-width: 0;
}

body #nav-dropdown.hidden {
  display: none;
}

.blog-intro {
  padding: 28px 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--lab-border);
}

.blog-intro h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  color: var(--lab-text);
}

.blog-intro p {
  margin: 0;
  color: var(--lab-text-muted);
  line-height: 1.8;
}

.blog-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
}

body .article-index-card .article-read-link {
  padding-inline: 24px;
}

@media (max-width: 1180px) {
  body #main-nav {
    display: none;
  }

  body #nav-menu-btn {
    display: flex;
  }

  body #nav-dropdown:not(.hidden) {
    display: block;
  }
}

body .hero {
  min-height: 410px;
  grid-template-columns: minmax(0, 1fr) 224px;
}

body .hero-title {
  font-size: clamp(3rem, 7vw, 5.3rem);
}

body .hero-title span {
  font-size: .37em;
  line-height: 1.5;
}

body .hero-description {
  max-width: 640px;
}

body .hero-profile,
body .hero-profile:hover,
body .focus-card,
body .focus-card:hover,
body .achievement-item,
body .achievement-item:hover {
  transform: none;
  cursor: default;
  box-shadow: none;
  border-color: var(--lab-border);
}

body .focus-card {
  min-height: 0;
  padding: 24px;
  background: var(--lab-panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body .focus-card h3,
body .focus-card p {
  margin: 0;
}

body .focus-icon {
  margin: 0;
  width: 36px;
  height: 36px;
  box-shadow: none;
}

body .focus-number {
  font-size: .7rem;
}

body .focus-card .text-link {
  margin-top: auto;
  padding-top: 12px;
}

.text-link,
.article-read-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  color: var(--lab-accent-strong) !important;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: underline !important;
  text-underline-offset: 5px;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

body .landing-section {
  margin-top: clamp(48px, 7vw, 80px);
}

body .landing-heading {
  font-size: clamp(1.55rem, 3.5vw, 2.25rem);
  line-height: 1.4;
}

body .landing-kicker,
body .community-kicker {
  letter-spacing: .07em;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

body .activity-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--lab-border);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--lab-panel-solid), var(--lab-panel));
  text-decoration: none !important;
  transition: border-color .2s ease, transform .2s ease;
}

body .activity-card:hover {
  border-color: var(--lab-accent);
  transform: translateY(-3px);
}

.activity-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--lab-text-muted);
  font-size: .75rem;
}

.activity-meta > span {
  color: var(--lab-accent-strong);
}

body .activity-card h3 {
  margin: 0;
  color: var(--lab-text);
  font-size: 1.12rem;
  line-height: 1.65;
}

body .activity-card p {
  margin: 0;
  color: var(--lab-text-muted);
  font-size: .9rem;
  line-height: 1.8;
}

.activity-read {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--lab-border);
  color: var(--lab-accent-strong);
  font-size: .84rem;
  font-weight: 600;
}

body .friend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

body .friend-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  text-decoration: none !important;
}

body .friend-card-top {
  display: flex;
  gap: 14px;
  align-items: center;
}

body .friend-identity {
  flex: 1;
  min-width: 0;
}

body .friend-name {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

body .friend-domain {
  font-size: .78rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

body .friend-card-footer {
  margin-top: auto;
  padding-top: 12px;
  font-size: .76rem;
  letter-spacing: 0;
}

body .article-entry .friend-description {
  min-height: 0;
  margin: 0;
  line-height: 1.8;
}

body .article-entry .community-kicker {
  margin: 0 0 10px;
}

body .article-entry .community-lead {
  margin: 14px 0 0;
}

body .community-hero {
  padding: 0 0 16px;
}

body .friend-toolbar {
  margin-top: 20px;
}

body #page-friends .article-header,
body #page-anonymous .article-header,
body #page-anonymous-replies .article-header,
body #page-assistant .article-header {
  display: none;
}

body #page-friends .article-entry,
body #page-anonymous .article-entry,
body #page-anonymous-replies .article-entry,
body #page-assistant .article-entry {
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
}

body .community-page {
  padding: 0;
}

body .friend-icon,
.friend-initial {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.friend-initial {
  display: grid;
  place-items: center;
  background: var(--lab-accent-soft);
  color: var(--lab-accent-strong);
  font-size: 1.35rem;
  font-weight: 700;
}

.friend-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}

.friend-search-row input {
  flex: 1;
  min-width: 140px;
  max-width: 460px;
  min-height: 46px;
  border: 1px solid var(--lab-border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--lab-panel-solid);
  color: var(--lab-text);
  font: inherit;
}

#friendResultCount {
  color: var(--lab-text-muted);
  font-size: .82rem;
}

body .friend-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

body .community-title {
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  line-height: 1.4;
}

body .community-lead {
  max-width: 660px;
  line-height: 1.85;
}

body .article-index-card .article-entry {
  margin-bottom: 0;
}

body .article-entry p {
  text-indent: 0;
}

body #search-close-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--lab-text);
  font-size: 1.6rem;
  cursor: pointer;
}

body .article-index-card .post-outline-text {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.8;
}

body .article-read-link {
  margin-top: 8px;
}

body .article-index-card .right-panel.non-pic {
  display: none;
}

body .reply-role,
body .reply-signal,
body .reply-date,
body .reply-count,
body .reply-wall-privacy {
  font-family: inherit;
  letter-spacing: 0;
  font-size: .78rem;
}

body .reply-question-copy,
body .reply-answer-copy {
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

body .reply-answer {
  padding: 14px;
  border-radius: 12px;
}

body .privacy-list li {
  border: 0;
  padding: 8px 0;
  background: transparent;
}

body .assistant-wrapper {
  display: block;
  padding: 0;
  min-height: 0;
  color: var(--lab-text);
  font-family: inherit;
}

body .cyber-container {
  max-width: none;
  background: var(--lab-panel-solid);
  border-color: var(--lab-border);
  border-radius: 18px;
  box-shadow: none;
}

body .cyber-header {
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
  border-color: var(--lab-border);
}

body .cyber-header h2 {
  color: var(--lab-text);
  font-family: inherit;
  font-size: 1.4rem;
  letter-spacing: 0;
}

body .cyber-header p,
body .assistant-help {
  color: var(--lab-text-muted);
  font-size: .86rem;
  line-height: 1.8;
}

body .cyber-body {
  height: clamp(300px, 50vh, 520px);
  padding: 20px;
}

body .cyber-body .msg {
  max-width: 90%;
  color: var(--lab-text);
  line-height: 1.8;
  overflow-wrap: anywhere;
  border-radius: 14px;
}

body .cyber-body .msg.ai {
  border-color: var(--lab-border);
  background: var(--lab-panel);
}

body .cyber-body .msg.user {
  background: var(--lab-accent-soft);
  border-color: var(--lab-border-strong);
}

body .cyber-input-area {
  gap: 12px;
  padding: 18px;
  align-items: end;
  background: var(--lab-panel-solid);
}

body #userInput {
  max-height: 180px;
  min-width: 0;
  font-family: inherit;
  color: var(--lab-text);
  background: var(--lab-bg-soft);
  border-color: var(--lab-border);
  line-height: 1.7;
}

body #sendBtn {
  min-width: 64px;
  min-height: 44px;
  color: #05201d;
  background: var(--lab-accent);
  font-family: inherit;
}

body a:focus-visible,
body button:focus-visible,
body input:focus-visible,
body textarea:focus-visible,
body select:focus-visible {
  outline: 2px solid var(--lab-accent-strong);
  outline-offset: 4px;
}

body .nav-icon {
  border: 0;
  padding: 0;
  font: inherit;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

body .skip-link {
  position: fixed !important;
  top: 8px;
  left: 12px;
  z-index: 10000;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--lab-panel-solid);
  color: var(--lab-text);
  border: 2px solid var(--lab-accent);
  transform: translateY(-200%);
}

html.keyboard-navigation body .skip-link:focus-visible {
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip-path: none;
  transform: none;
}

.main-nav-link[aria-current='page'],
.nav-dropdown-link[aria-current='page'] {
  color: var(--lab-accent-strong) !important;
  text-decoration: underline;
  text-underline-offset: 6px;
}

@media (max-width: 760px) {
  body .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 30px;
  }

  body .hero-profile {
    width: 200px;
    justify-self: start;
  }

  .activity-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body .activity-card {
    gap: 12px;
  }
}

@media (max-width: 640px) {
  body .friend-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body .hero-signal-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-family: inherit;
    letter-spacing: 0;
  }

  body .hero-signal-links {
    flex-wrap: wrap;
    justify-content: start;
    gap: 12px;
  }

  body .hero-signal-links a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  body .focus-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .friend-search-row label {
    width: 100%;
  }
}

@media (max-width: 380px) {
  body #navbar {
    gap: 4px;
    padding-inline: 6px;
  }

  body #title-nav > a {
    padding-inline: 4px;
  }

  body #sub-nav {
    gap: 2px;
  }

  body #sub-nav .nav-icon {
    width: 36px;
    height: 44px;
  }

  body .site-language-control {
    min-width: 82px;
    width: 82px;
  }

  body .site-language-select {
    min-width: 0;
    padding-right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  body .landing-reveal {
    opacity: 1;
    transform: none;
  }
}
