:root {
  --cw-mobile-gutter: 24px;
}

html {
  scroll-padding-top: 96px;
}

.nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.nav .logo {
  flex: 0 0 auto;
  min-width: 0;
}

.nav .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 auto;
}

.nav .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav .nav-link:hover,
.nav .nav-link[aria-current="page"] {
  color: var(--ink-0);
  background: rgba(255, 255, 255, 0.04);
}

.nav .nav-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.nav-trial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.72);
  background: var(--blue, #4f98d8);
  color: #f8fbff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 14px 34px -18px rgba(79, 152, 216, 0.62);
}

.nav-trial-btn:hover {
  background: var(--blue-bright, #60a5fa);
  color: #f8fbff;
}

@media (max-width: 980px) {
  html {
    scroll-padding-top: 136px;
  }

  .nav .nav-inner {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav .nav-links {
    order: 3;
    display: flex !important;
    flex: 0 0 calc(100% + (var(--cw-mobile-gutter) * 2));
    width: calc(100% + (var(--cw-mobile-gutter) * 2));
    margin: 0 calc(var(--cw-mobile-gutter) * -1) -2px;
    padding: 2px var(--cw-mobile-gutter) 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  }

  .nav .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav .nav-link {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 13px;
    scroll-snap-align: start;
  }

  .nav .nav-cta {
    order: 2;
    margin-left: auto;
  }

  .nav-trial-btn,
  .btn,
  .feature-nav a,
  .toc a,
  .share-buttons a,
  .share-buttons button,
  .blog-toolbar input,
  .blog-toolbar select,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .blog-toolbar {
    min-width: 0;
  }

  .blog-toolbar input,
  .blog-toolbar select {
    width: 100%;
    min-width: 0;
  }

  .estimator-help {
    width: 44px;
    height: 44px;
    font-size: 12px;
  }

  .estimator-control-row input[type="range"] {
    min-height: 44px;
  }

  .footer ul {
    gap: 6px;
  }

  .footer ul li {
    margin-bottom: 6px;
  }

  .footer ul a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-color: rgba(96, 165, 250, 0.58) rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
    box-shadow: inset -18px 0 18px -18px rgba(96, 165, 250, 0.5);
  }

  .table-wrap:focus-visible {
    outline: 2px solid var(--blue-bright, #60a5fa);
    outline-offset: 3px;
  }
}

@media (max-width: 920px) {
  .feature-visual {
    display: block;
    overflow: hidden;
  }

  .feature-visual .atmosphere {
    display: none;
  }

  .fv-stack {
    display: grid;
    gap: 14px;
  }

  .fv-activity,
  .fv-expense,
  .fv-notif {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    margin-top: 14px;
  }

  .fv-activity {
    padding: 14px;
  }

  .fv-activity .head,
  .fv-activity .body,
  .fv-updates-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .fv-activity .body .right-panel {
    width: 100%;
  }
}

@media (max-width: 620px) {
  :root {
    --cw-mobile-gutter: 20px;
  }

  html {
    scroll-padding-top: 148px;
  }

  .container,
  .container-narrow {
    padding-left: var(--cw-mobile-gutter);
    padding-right: var(--cw-mobile-gutter);
  }

  .nav .nav-inner {
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .nav .nav-link {
    padding: 10px 12px;
  }

  .nav-trial-btn {
    padding-left: 14px;
    padding-right: 14px;
  }

  .feature-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .feature-nav::-webkit-scrollbar {
    display: none;
  }

  .feature-nav a {
    flex: 0 0 auto;
  }

  .fv-expense .e-grid,
  .mock-stats,
  .mock-fin-grid,
  .fv-cases-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fv-cases-list,
  .fv-updates {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fv-cases-list-head,
  .fv-cases-list-row {
    min-width: 560px;
  }

  .fv-update-row {
    min-width: 520px;
  }
}

@media (max-width: 420px) {
  :root {
    --cw-mobile-gutter: 18px;
  }
}

@media (max-width: 360px) {
  :root {
    --cw-mobile-gutter: 16px;
  }
}
